JPEG2000 Rendering Issues in Acrobat Pro 10.1.4


Using PDFNET SDK we combine individual PDF documents into one document we call a "package." This package is sent to our clients' users whereby they are using Adobe Acrobat X Pro 10.1.4. On occasion, some of these documents, the user reports some pages (e.g. one of the merged documents) of the package are unreadable (blank, white pages) and result in the following message from Acrobat:

"Insufficient data for an Image"

This issue is a known problem and has long since been resolved but we simply cannot tell our clients' users to update to their version (a large corporation) (REF:

We understand this issue has to do with JPEG2000 and the way that Acrobat implemented it specifically in the 10.1.4 version.

We are attempting to solve this issue for their users but not quite sure what can be done within PDFNET SDK.

Any advice would be helpful.

As much as possible PDFNet avoids modifying images that are already in a PDF file.

If your objective is to repair the file so that it will view in Adobe Acrobat products, then the easiest way would be to use our Optimizer class.

Where you would use something like the following.

Optimizer.MonoImageSettings mono_image_settings = new Optimizer.MonoImageSettings(); mono_image_settings.SetCompressionMode(Optimizer.MonoImageSettings.CompressionMode.e_flate); mono_image_settings.ForceRecompression(true); mono_image_settings.ForceChanges(true); Optimizer.ImageSettings gray_image_settings = new Optimizer.ImageSettings(); gray_image_settings.SetCompressionMode(Optimizer.ImageSettings.CompressionMode.e_jpeg); gray_image_settings.ForceRecompression(true); gray_image_settings.ForceChanges(true);

Exact code needed depends on whether the image is mono, gray, or color. If it is JPEG2000 scan image, then probably gray, but might be color. I believe Acrobat also suffers the issue of “insufficient data” for JBIG2 images, which is why I included the mono settings above also, as this has helped other previously.

If you don’t want to use Optimizer, then you can search our forum on resampling images and do it yourself.!searchin/pdfnet-sdk/resample

Hi Ryan!

Optimizing has proved successful. What I am trying understand is how does Optimizer determine what is Monochrome, Grayscale, or full-color? For example, you can see the original document has BPC set to 1 and ColorSpace is \DeviceGray yet only the MonoImageSettings actually have any affect on solving the problem? If changing the BPC to 8, would that make a difference?

There is no DeviceMono color space in a PDF, so it is the BPC 1 that separates a mono image from a gray scale image. In both cases the number of channels is 1. If an image has more than 1 channel, then it will be treated as a Color Image.

Mono : 1 Channel 1 BPC Gray : 1 Channel Color: 2+ Channels

Changing the BPC of the image would almost certainly “break” the image, causing it not to render correctly.