7 Replies Latest reply: Feb 13, 2013 12:14 AM by Test Screen Name RSS

    JPEG file embedded in PDF (CMYK)

    blvd4

      Hello,

       

      As I understand the PDF Specifications it's possible to directly include a JPEG file in a PDF.

      It has to be encapsulated into a XObject and its filter must be set to DCTDecode.

      (Even the JPEG header and such get stored in the final PDF)

       

      So I wrote a litte program using the Adobe PDFL that create such file, basically it reads the entire JPEG file using a ASStm [ASFileStmRdOpen()] which is called by the [PDEImageCreate()].

      I set in the Create() call that the stream is encoded.

      Of course it creates alongside this the appropriate PDEColorSpace.

       

      In the end all of this works in RGB I get the intended output.

      But when I use CMYK JPEG file, the PDF I get is the negative of the image (as if I applied Adjustements->Invert in Photoshop). Did I miss something for CMYK files ?

       

      Below links to download the test files & the result :

       

      - CMYK (JPG) http://dl.free.fr/h2jecWBpj  (PDF) http://dl.free.fr/gv5zecOEp

      - RGB    (JPG) http://dl.free.fr/nccbrL1mg  (PDF) http://dl.free.fr/ho5kqmkD4

       

      Thanks for the help.

       

      Message was edited by: blvd4