17.05.2014 Views

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

PDFlib 8 Windows COM/.NET Tutorial

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

JPEG files written by Adobe Photoshop and other Adobe applications. <strong>PDFlib</strong> applies<br />

a workaround which is necessary to correctly process Photoshop-generated CMYK<br />

JPEG files. <strong>PDFlib</strong> will also read clipping paths from JPEG images created with Adobe<br />

Photoshop.<br />

JPEG images in the EXIF format as created by many digital cameras are treated as sRGB<br />

images; an sRGB ICC profile will be attached to the image unless the honoriccprofile option<br />

is false or another ICC profile has been assigned to the image with the iccprofile option.<br />

JPEG 2000 images. JPEG 2000 images (ISO 15444-2) require PDF 1.5 or above, and are always<br />

handled in pass-through mode. <strong>PDFlib</strong> supports JPEG 2000 images as follows:<br />

> JP2 and JPX baseline images (usually *.jp2 or *.jpf) are supported, subject to the color<br />

space conditions below. All valid color depth values are supported.<br />

The following color spaces are supported: sRGB, sRGB-grey, ROMM-RGB, sYCC,<br />

e-sRGB, e-sYCC, CIELab, ICC-based color spaces (restricted and full ICC profile), and<br />

CMYK. <strong>PDFlib</strong> will not alter the original color space in the JPEG 2000 image file.<br />

> Images containing a soft mask can be used with the mask option to prepare a mask<br />

which can be applied to other images.<br />

> External ICC profiles can not be applied to a JPEG 2000 image, i.e. the iccprofile option<br />

must not be used. ICC profiles contained in the JPEG 2000 image file will always be<br />

kept, i.e. the honoriccprofile option is always true.<br />

Note JPM compound image files according to ISO 15444-6 (usually *.jpm) are not supported.<br />

JBIG2 images. <strong>PDFlib</strong> supports single- and multi-page flavors of JBIG2 images<br />

(ISO 14492). JBIG2 images always contain black/white pixel data and require PDF 1.4 or<br />

above.<br />

Due to the nature of JBIG2 compression, several pages in a multi-page JBIG2 stream<br />

may refer to the same global segments. If more than one page of a multi-page JBIG2<br />

stream is converted the global segments can be shared among the generated PDF images.<br />

Since the calls to load_image( ) are independent from each other you must inform<br />

<strong>PDFlib</strong> in advance that multiple pages from the same JBIG2 stream will be converted.<br />

This works as follows:<br />

> When loading the first page all global segments are copied to the PDF. Use the following<br />

option list for load_image( ):<br />

page=1 copyglobals=all<br />

> When loading subsequent pages from the same JBIG2 stream the image handle<br />

for page 1 must be provided so that <strong>PDFlib</strong> can create references to the global segments<br />

which have been copied with page 1. Use the following option list for load_<br />

image( ):<br />

page=2 imagehandle=<br />

The client application must make sure that the copyglobals/imagehandle mechanism is<br />

only applied to multiple pages which are extracted from the same JBIG2 image stream.<br />

Without the copyglobals options <strong>PDFlib</strong> will automatically copy all required data for the<br />

current page.<br />

182 Chapter 7: Importing Images and PDF Pages (Edition for <strong>COM</strong>, .<strong>NET</strong>, and REALbasic)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!