Skip to main content
Known Participant
August 4, 2017
Question

Acrobat SDK Export with CCITT

  • August 4, 2017
  • 2 replies
  • 1156 views

I have created an Acrobat Plugin using Visual Studio 2013 and C++.

In that plugin, I am doing the following:

  1. Create a new PDF document
  2. Use AVConversionConvertToPDF and PDEElementCopy to create a PDEImage ( I repeat for 2 images: a 1-bit monochrome TIF and an 8-bit grayscale TIF)
  3. Use PDEContentAddElem to add the images to a new document.
  4. Save document

The saved document has the 2 images with the proper values (bit depth, dimensions), except for 'Filters'.  The 1-bit monochrome image shows JBIG2 as a filter, but I want to use CCITT.

Can I change the compression for a PDEImage element before I save the PDF file?

Note: I am not using PDEImageCreate because AVConversionConvertToPDF handles all types of image formats already.  The resulting PDF file is fine, except for the image's compression.

This topic has been closed for replies.

2 replies

lrosenth
Adobe Employee
Adobe Employee
August 4, 2017

You can change the settings in the AVConversionConvertToPDF API call to specify which compression algorithm to use

Known Participant
August 16, 2017

Thanks for the reply.

I looked at the function closer, and see no settings options like compression algorithms.  The AVConversionConvertToPDF method has 5 parameters:

flags, for thing like asynchronous operation or display or not display dialogs.

inPath, for the input filename

inFileSys, for the input file system (looks promising but I see nothing regards to compression)

outPDDoc, for the output PDDoc

statusMonitor, for a status monitor.

Where would I change the compression specification?

lrosenth
Adobe Employee
Adobe Employee
August 16, 2017

In the ASCab of settings.

Known Participant
August 4, 2017

Update: I just found out that the use of JBIG2 compression was based on the Preferences / Convert to PDF / TIF settings.

I can change it there to CCITT and get what I want.

Now, how can I change that value programmatically?

Or my original question still stands: How can I convert the PDEImage to be CCITT encoded?