Support Center

Bitdepth in a multipage PDF file

Christian Nov 12, 2013 04:31PM EST

Hello support,

Using VB6 and Imageman 8.80, how can I find out the correct bit colour of a given page on a PDF file?

I'm using the TWAIN control to create a multipage PDF file - say the first page is B&W, second page B&W, third page is 24-bit true colour. Since the code saves one page at a time, I can check the ImageBitDepth property, determine the best compression, and the resulting file is small. All's fine!

Later on I'll change the file, replacing page 2 with an image coming from another Imageman control. I load an Imageman control with the file, set page=0, get the hImage of this page, send it to a new file, set page=1, get this page... etc. Problem is, this time "ImageBitDepth" is always 24 since there's one 24-bit image inside the PDF, so the new file gets very much larger than the original one.

Is there a way to get some kind of a "page bit depth"? I tried to use the ImageAttributes collection, to no avail - the only attribute in it is "EXTENSION" (by the way, I used some others when creating the file, like "SOFTWARE", why is it not listed?). Maybe I could use a PDF-specific attribute when creating the original file, to store the bit depth of that specific page? How could this be done?


1 Data Techniques Response

Up -1 Rated Down
DTI Support  Data Techniques Employee Nov 12, 2013 04:54PM EST


At this time there is no way in the ActiveX controls to load the PDF page into an object of the same bitdepth as the original image. This actually is implemented in our .Net components but not ActiveX at this time. I've added a request for consideration to add this to the OCX controls.

Thanks for your interest in our products and please let us know if you have any questions.

Data Techniques Support

This question is closed to new answers.

Contact Us