Image XObject in PDF

Good day everyone, I have a few questions with regard on the Image XObject and I hope u guys can help to clear my confusion.
Say if i insert a tiff image (Using PDEImageCreate) into a blank pdf and save it, the image will be saved as a Image XObject stream in the pdf.
Question 1
Is the attribute/properties of the tiff image perserved in the XObject stream in the pdf? Or is it that only the raw pixel values of the tiff image got
extracted and save into the pdf stream? No tiff image headers is saved?
Question 2
When the pdf file is opened later, is the Adobe reader aware that this image is a tiff image (the 1 that I have imported previously) and uses the libtiff to render and display the image? Or is it that it just extract the raw pixel values and display accordingly in the pdf page?
Thanks for the time to answer my questions

Correct.  Raster images are stored in PDF as image XObjects.
PDF only supports two kinds of images - JPEG and "raw raster" (aka an array of bits in the colorspace), so
1) the fact that it started life as a TIFF is NOT preserved.  It's just the raw pixels.  HOWEVER, you can use the plugin APIs to load an image's metadata into the PDF so that it can be read at some later date.
2) No, because it's not a TIFF any longer.

Similar Messages

  • Image XObject in PDF - Part 2

    Hi everyone,
    With regard to the previous thread on "Image XObject in PDF", I posted a question on the retention of the image attribute saved on the PDF.
    I understand from Irosenth that PDF only supports jpeg and "raw raster" images on storage. I also asked a question on libtiff and when does
    Acrobat uses their own proprietiary tiff library. lrosenth highlighted that the library is only invoked when Acrobat saves and extracts images
    from a PDF file and there is no other circumstances where the tiff library is used.
    Question 1
    How about PDF XFDF forms? I understand that in forms, we can specify a imagefield of contenttype:"Image/tif" with the base64 encoded
    values of the tif image embedded in the form. In such case, will the tiff library be invoked by the Acrobat to parse and render the tif image?
    Question 2
    If the image libraries can be invoke in such a way, does this apply to other images such as JPEG. JPX, GIF and PNG?
    Thanks

    Hi Irosenth, thanks for the point.
    However, I came across an xml-based form stored as a stream (flate-encoded)  in a PDF.
    The decoded stream is as follows:
    Isn't the self.tiff64 an base64-encoded form of a raw TIFF image (Not stored as an image XObject)?
    <?xml version="1.0" encoding="UTF-8" ?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/">
    <config xmlns="http://www.xfa.org/schema/xci/1.0/">
    <present>
    <pdf>
    <version>1.65</version>
    <interactive>1</interactive>
    <linearized>1</linearized>
    </pdf>
    <xdp>
    <packets>*</packets>
    </xdp>
    <destination>pdf</destination>
    </present>
    </config>
    <template baseProfile="interactiveForms" xmlns="http://www.xfa.org/schema/xfa-template/2.4/">
    <subform name="topmostSubform" layout="tb" locale="en_US">
    <pageSet>
    <pageArea id="PageArea1" name="PageArea1">
    <contentArea name="ContentArea1" x="0pt" y="0pt" w="612pt" h="792pt" />
    <medium short="612pt" long="792pt" stock="custom" />
    </pageArea>
    </pageSet>
    <subform name="Page1" x="0pt" y="0pt" w="612pt" h="792pt">
    <break before="pageArea" beforeTarget="#PageArea1" />
    <bind match="none" />
    <field name="ImageField1" w="28.575mm" h="1.39mm" x="37.883mm" y="29.25mm">
    <ui>
    <imageEdit />
    </ui>
    </field>
    <?templateDesigner expand 1?>
    </subform>
    <?templateDesigner expand 1?>
    </subform>
    <?templateDesigner FormTargetVersion 24?>
    <?templateDesigner Rulers horizontal:1, vertical:1, guidelines:1, crosshairs:0?>
    <?templateDesigner Zoom 94?>
    </template>
    <xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:data>
    <topmostSubform>
    <ImageField1 xfa:contentType="image/tif" href="">'''+self.tiff64 +'''</ImageField1>
    </topmostSubform>
    </xfa:data>
    </xfa:datasets>
    <PDFSecurity xmlns="http://ns.adobe.com/xtd/" print="1" printHighQuality="1" change="1" modifyAnnots="1" formFieldFilling="1" documentAssembly="1" contentCopy="1" accessibleContent="1" metadata="1" />
    <form checksum="a5Mpguasoj4WsTUtgpdudlf4qd4=" xmlns="http://www.xfa.org/schema/xfa-form/2.8/">
    <subform name="topmostSubform">
    <instanceManager name="_Page1" />
    <subform name="Page1">
    <field name="ImageField1" />
    </subform>
    <pageSet>
    <pageArea name="PageArea1" />
    </pageSet>
    </subform>
    </form>
    </xdp:xdp>

  • What raw raster image format in pdf ?

    hello,
    I understood  from "image xobject in pdf" question from bokhandbok that  an xobject image can be either a jpeg  or a raw raster  format.
    But to me,  raw is not a standardized format like DNG or tiff/ep are.
    so, where can i find a description of the raw raster image format of the pdf ?
    is it related to any existing norms like iso 12234-2, dng, etc.
    if not, where can i find a description of this format ?
    thanks a lot,
    denis

    No, an image expects raw bitmap data in the format defined by the PDF Reference.
    However, an image is stored as a stream, and a stream can have a filter applied. There are many possible filters and one is DCTDecode, which roughly corresponds to a "JPEG file".
    So, an image with JPEG file data and the DCTDecode filter can work.
    "Raw" is a convenient way to talk about "uncompressed image data" but you are right that it is not a standard. Fortunately, PDF is well standardised and precisely described in ISO 32000-1.

  • How to insert an image in a pdf document

    I used the "Stamper" example and modified the fuction to insert image to my pdf doc.
    PDAnnot CreateStampAnnotationAt(AVPageView pageView, AVDevRect *rect)
    to add a picture Annotation into page.
    when system calling the callback function "AnnotDraw" to draw the Cos Object in that Annotation ,the function "AVPageViewDrawCosObj(pageView, coApp, &avdr)" doesn't work.Here is the code:
    ASFixedRect pdLocation;
    PDAnnot annot = {0,0};
    CosObj cAnnotObj, cIntObj, cStmObj, attributesDict, LengthEntry, cNullObj;
    CosObj cAPDictObj, cStmDictObj, cBBoxObj, cProcSetObj, cResObj;
    CosObj fontResObj, fontResObj2, cObj;
    CosDoc cdoc;
    ASStm stm;
    char buf[512];
    PDPage pdPage;
    ASUns32 s;
    ASFile picFile = NULL;
    DURING
            //handle clicks (with no drag, or only in one direction), by creating a default size annot
            if((rect->top == rect->bottom) || (rect->right == rect->left))
                    rect->top +=75;
                    rect->right += 150;
            pdPage = AVPageViewGetPage(pageView);
            AVDoc avDoc = AVPageViewGetAVDoc(pageView);
            AVPageViewDeviceRectToPage ( pageView, rect, &pdLocation);
            // Add the new annotation to the page.
            annot = PDPageAddNewAnnot(pdPage, -1, Stamper_K, &pdLocation);
            cAnnotObj = PDAnnotGetCosObj(annot);
            cdoc = PDDocGetCosDoc(PDPageGetDoc(pdPage));
            // See PDF Specification for more information on the Flags key.
            cIntObj = CosNewInteger (cdoc, false, 4L);
            CosDictPutKeyString(cAnnotObj, Flags_KStr, cIntObj);
            cAPDictObj = CosNewDict(cdoc, false, 1L);
            cNullObj = CosNewNull();
            ASFileSysOpenFile (ASGetDefaultFileSys (),ASPathFromPlatformPath("c:\\test.jpeg"), ASFILE_READ, &picFile);
            stm = ASFileStmRdOpen (picFile, 4096);
            attributesDict        = CosNewDict(cdoc, false, 5);
            LengthEntry = CosNewInteger(cdoc, false,11594 );
            CosDictPutKeyString(attributesDict, Length_KStr, LengthEntry);
            cStmObj = CosNewStream(cdoc, true, stm, 0, true, attributesDict, cNullObj, s);
            cStmDictObj = CosStreamDict(cStmObj);
            CosDictPutKeyString(cStmDictObj, "Type", CosNewNameFromString(cdoc, false, "XObject"));
            CosDictPutKeyString(cStmDictObj, "Subtype", CosNewNameFromString(cdoc, false, "Image"));
            CosDictPutKeyString(cStmDictObj, "Width", CosNewInteger(cdoc, false , 151));
            CosDictPutKeyString(cStmDictObj, "Height", CosNewInteger(cdoc, false , 151));
            CosDictPutKeyString(cStmDictObj, "ColorSpace", CosNewNameFromString(cdoc, false, "DeviceRGB"));
            CosDictPutKeyString(cStmDictObj, "BitsPerComponent", CosNewInteger(cdoc, false , 8));
            cBBoxObj = CosNewArray(cdoc, false, 4L);
            CosArrayInsert(cBBoxObj, 0L, CosNewInteger(cdoc, false, 0L));
            CosArrayInsert(cBBoxObj, 1L, CosNewInteger(cdoc, false, 0L));
            CosArrayInsert(cBBoxObj, 2L, CosNewInteger(cdoc, false, 100L));
            CosArrayInsert(cBBoxObj, 3L, CosNewInteger(cdoc, false, 100L));
            CosDictPutKeyString(cStmDictObj, "BBox", cBBoxObj);
            CosDictPut(cAPDictObj, FaceNormal_K, cStmObj);
            CosDictPutKeyString(cAnnotObj, Appearance_KStr, cAPDictObj);
    HANDLER
            AVAlertNote(ASGetErrorString(ERRORCODE, buf, sizeof(buf)));
    END_HANDLER
    Please help.

    BMP image?
    Or Is it possible to insert any text instead of image?
    But I need to work just like the stamper sample present in sdk. that is when i click on the pdf document any text has to be inserted instead of the image. I should not be to type the text in the pdf, but it should work exactly similiar to the stamper sample, but text has to be inserted instead of an image.
    How can this be done? Is it possible to do?
    Please help.

  • Figuring out how to extract images from a PDF file

    Hi,
    I'm trying to write a small app that extracts all images from a PDF file. I already wrote a nice parser and it works good but the only problem is that I can't quite figure out from the reference how to decode all images in a PDF file to normal files such as tiffs, jpegs, bmps etc. For now I'm focusing on XObject images and not dealing with inline images.
    From what I understand so far just by trying and looking at open sources I figured that if I see a XObject Image with a DCTDecode filter, taking the stream data without doing anything to it and saving it as a jpeg file works. But doing the same to FlateDecoded streams or CCITTFax didn't work.
    What is the right way to properly extract the images?

    In general you have to
    * decode the stream
    * extract the pixel data
    * use ColorSpace, BitsPerComponent, Decode and Width to unpack pixel
    values
    * reconstruct an image file format according to its specification
    There are no other shortcuts. The DCTDecode shortcut (which doesn't
    work for CMYK JPEG files) is just a piece of fantastic good luck.
    Aandi Inston

  • Javascript access to images in a PDF

    Hello,
    i'm a newbie to javascripting adobe apps, so i hope you'll excuse me if the question is just too stupid...
    I need to open in photoshop all the images in a pdf document. The pdf doc is singlepaged, usually with a single image (it's a adverting page in a magazine). When I have to do a quick retouch on a image, i choose Touchup Object, select the image, right click and choose Modify Image (actually I am using Acrobat in Italian: i hope the traslation makes sense) and Photoshop pops up. I modify the image and save it.
    Is it possible to script this process?
    My basic question actually is: how do i have access to the image in the pdf document? Exploring the contents of the pdf I see the image is in a XObject: can i get to it via javascript?
    any help is really appreciated! thanks
    Mauroo

    What you're trying to do requires a plug-in written in C/C++.  It cannot be accomplished with Acrobat JavaScript.

  • Image XObject using /F file specification

    We are having a problem where instead of the stream data being on the Image XObject itself, we want to use a stream that is an attached file (we are manually writing the pdf file at this point using internal tools).  Inevitably, it keeps trying to get that file from the disk and failing. 
    This same file specification we are using as the /F property on the XObject dictionary is the same one in the as we have as an entry in the EmbeddedFiles name tree, and the file does appear appropriately in the attachments list.  The file spec includes all the correct /F filename and /EF<</F reference>> to the actual data stream. 
    The XObject dictionary still has a zero byte stream associated with it, and the /Length property set to 0.  And we're using raw RGB values, so no filter (/Filter or /FFilter) needs to be specified.
    The error we keep getting is "This file cannot be found" (fileErrFNF).  If we extract the file, then we get a different error of "You do not have access to this file" (fileErrPerm), unless supposedly, you are running Acrobat Pro, in which case it works as you would expect, but that doesn't solve the problem of us wanting to have it embedded as a file and be read internally, not from disk.
    So the file specification should be correct, since we can see the embedded file in the attachments and extract it correctly.  And the XObject dictionary should be set up correctly, since when the file is extracted, we can get it to render if running Pro.  It's just that for some reason, we can't get the XObject to look for the EmbeddedFile instead of an external file.
    We are using Acrobat Reader 9 for viewing and building this against the "PDF Reference, version 1.7" specifications.  This also fails when using AR8 as well.
    Options that we have tried varying are not including the EmbeddedFiles name tree entry (thus making it invisible), including or excluding the UF or DOS/Mac/Unix values on the file specification dictionary and /EF dictionary.  We've tried removing the base /F value entirely, and only had the /EF dictionary.  What else can we try to get this to work?

    Here are the objects as have I described above:
    63 0 obj
    <<
        /Type /Filespec
        /F (pic1.rawrgb)
        /UF (p i c 1 . r a w r g b )
        /Desc (embedded image)
        /EF
        <<
            /F 125 0 R
            /UF 125 0 R
        >>
    >>
    70 0 obj
    <<
        /Names [(pic1.rawrgb) 63 0 R]
    >>
    99 0 obj
    <<
        /BitsPerComponent 8
        /ColorSpace /DeviceRGB
        /Width 200
        /Height 200
        /Subtype /Image
        /Type /XObject
        /F 63 0 R
        /Length 0
    >>
    stream
    endstream
    125 0 obj
    <<
        /Type /EmbeddedFile
        /Length 120000
    >>
    stream
    % 120000 bytes of 8 bits per color RGB for a 200x200 pixel image without any filtering
    endstream

  • Why do images within a PDF look jagged when viewed in Acrobat Pro 10.1.6?

    Using a MacBook Pro running Mac OS version 10.7.5 with NVIDIA GeForce GT 650M 1024 MB graphics card. High-resolution source images look fine in other software, and embedded images in a PDF look fine when viewed on Google Drive, but curves and diagonal lines look jagged when viewed in Acrobat Pro 10.1.6. Checking smoothing options in Preferences only adjusts the position of the jagged edges; it neither enhances nor ameliorates them.
    I created a sample PDF to illustrate the problem I'm having. Created in illustrator, exported to PNG and converted to PDF. Here is a screenshot of the source PNG side-by-side with the PDF I created from it:
    Please note that when I preview the PDF in Finder, and when I view the PDF in Chrome using Google Drive, the image looks fine. Here's a link to the sample PDF:
    http://www.sendspace.com/file/77f5m6
    Any assistance is appreciated. Thanks!

    Unfortunately, as I mentioned in my original post, I've already tried toggling smoothing options. They don't make the jagged edges go away—they just change them slightly. In some cases, as with the sample file provided, it does help smooth the art out, but it never looks as good as it did going in, in a recent project, toggling smoothing options didn't affect the appearance of the image at all. Zoom does not appear to relieve the artifacting.
    A little clarification: this PDF was created from a flat PNG, but I have had this issue with PNGs and TIFFs as well, generated by both Photoshop and Illustrator. To reiterate, the PDFs display fine in other software—Finder preview looks great, and the same file viewed in my browser via Google Drive looks as intended as well. A colleague was able to replicate this issue in Acrobat on his Windows machine. This appears to be a rendering issue specific to Acrobat with regards to the files I use it to create.

  • How can I create an iBook using iBooks Author using images from a PDF?

    I have a complex book with custom fonts and lots of images, and the client wants it on the iPad. So my most reasonable option seems to be to take images from a PDF and use them for the pages. However, images in iBook Author don't get "laid out" as expected in Portrait mode. How can I  create a layout that is essentially one image per page in portrait mode, and then convert that to landscape mode? Or is there an easier way to go about this?

    tk0us wrote:
    Make sure you have disabled portrait in the Inspector.
    I don't understand why portrait mode defaults images and other "widgets" to thumbnails. The original format of the book (and of 99% of all books I'm guessing) is in portrait format. By forcing the book to work only in landscape mode it's forcing the page image to be half the size, and that makes using this book particularly difficult. Is there no way to force the pages to be full-size in portrait mode?

  • Saving multiple images from a PDF to use later

    How can I save individual images from a PDF to use later?  I would like to be able to save them in a separate folder?

    When you open the pdf, you'll see the import pdf window. Just click the Images radio button, then select the images you want to open in PSE, and then save them in the editor:

  • When I try to print an jpeg or png from Photoshop all it does is convert the image to a PDF & plop it on my desktop- it won't print the image. Any suggestions as to how to fix this?

    When I try to print an jpeg or png from Photoshop all it does is convert the image to a PDF & plop it on my desktop- it won't print the image. Any suggestions as to how to fix this?

    Yes, the printer is on, it’s selected in Printer Set-Up & I’ve never had this problem before. It’s definitely a Photoshop issue as every other type of file prints fine. I’ve uninstalled Pshop & am now reinstalling. Hope that will do the trick.

  • HELP Trying to add a printable image to a pdf Acro Prof 6

    I've already spent 4 days too many on this project. I've been asked to take this pdf and create one identical for the company. It's a fillable form also so instead of trying to recreate everything from scratch I was able to edit the text and change over everything that I needed to, which wasnt much.
    Except.... I can not get our company logo on the top of the page. I have Acrobat Professional 6. Yesterday I finally thought I solved the problem going under Tools -> Advanced Commenting -> Attach -> Paste from clipboard. But because its just a "comment" when I go to print it wont show up.
    I've been told to just add an image to the Header, yet I am unable to figure out how... Once I'm under this section it only allows for Text, not an image.
    I'm really pulling my hair out here over this... If anyone can please tell me how to add an image to a pdf (which is a fillable form) that when printed will actually show up as well PLEASE HELP.

    I just opened the watermark tool in AA8. I don't have AA6 handy. It has a scaling and location on the page after I select a graphic file to import. It also shows a sample page so I can see how it will display. I do not remember how watermarks worked on AA6. Will try in a bit.
    For AA6, it looks like you can only put in a PDF file. In that case, use a word processor to create the desired result you want for the background (the entire page, not just the logo. Then create a PDF to use for the watermark or background. Open the watermark/background tool and insert your new PDF (not sure if you should use background or watermark - might give both a try and see if that does the job. At least it appears to be what my system suggests. You need to be sure you use the same paper size since AA6 places the whole page you create. You might be able to use other sized, but then you have to deal with centering and such. Unless you have time to play a bit, I would create it the one the same size paper as I have suggested and then it is one less thing to have to work out.

  • How do I hide the file names/path names of embedded images in a PDF document?

    I created a PDF document from a Word document, and the problem is that the PDF document shows the file names and path names for all of the embedded images in the PDF document. I don't want that information displayed. I don't want to send the PDF out to clients and have them read the names I've assigned to those images, plus it looks messy. And I've lost many of the original image files so they only exist in the Word document, thus I can't go back and rename them. I searched the internet for an answer but I couldn't find one anywhere.

    When you create a tagged (accessible) PDF file from Word, placed bitmap images will use their filename as the "ALT text" if you don't define something else for the text to say, because an image without any ALT text is a failure against the accessibility standards. You can't change that default action, so you should put your own meaningful text into the ALT field for each image - which is what you should be doing anyway if the PDF is standards-compliant.
    You can can set the text in Word, but it depends on your version as to where the dialogs are - Google for it - or you can change/delete it in Acrobat using the tags navigation pane on the left side of the window (right-click the sidebar if it's not visible). Drill down through the tags structure to find the "<Figure>" tag you want to change, right-click and choose Properties, then put something in the "Alternative text" field. This process isn't something you can easily automate, but if you don't need tags at all, you can save without tags (or print to PDF).

  • CMYK image in a PDF is involuntarily converted to RGB when you send from Acrobat Pro DC to Photoshop for editing

    Hi,
    When I send a CMYK image from Adobe Acrobat Pro DC to Photoshop CC 2014 to be edited, it opens up as RGB in Photoshop CC 2014. If I do the same with Adobe Acrobat XI on another machine, the image opens as CMYK, as it should normally do. As we had created the print-ready PDF in the first place, we know that the image is definitely CMYK and is properly opened in Photoshop if we use Adoba Acrobat Pro XI. We of course can go back to the original document and edit the linked image and re-export a new PDF. But on many occasions we need to do last minute corrections on images by editing them externally in Photoshop.
    Best,
    Refik Telhan

    It's really necessary to know by which program you had created the PDF.
    Here comes a test PDF for questions like yours, created by InDesign:
    http://docs-hoffmann.de/riptest05072013.pdf
    Different images:
    sRGB, pRGB=ProphotoRGB, CMYK , all with individually embedded profile,
    Grayscales: without embedded profiles, because InDesign doesn't embed gray profiles,
    Lab: without profile, because Lab is automatically detected and not ambiguuos.
    Of course, using so many different images in one PDF is useful only for tests.
    An actual test:
    Touch Up Object Grayscale and edit in Photoshop. There is no embedded profile
    but the image is in PS detected as Grayscale. One has to assign a profile.
    Re-imported in the doc, it is a Grayscale JPEG*, before it was a Grayscale ZIP.
    In Acrobat 8 one can check the actual content of a PDF by
    Advanced > Print Production > Preflight
    In newer versions this is still available but somewhere else.
    I'm using version 8, because I uninstalled X on purpose.
    Best regards --Gernot Hoffmann
    *Edited:
    As far as I remember, there is no special code for Grayscale JPEGs, it's just a JPEG
    with zeros in the Cb Cr channels ... like an R=G=B gray image.

  • Poor image quality in pdf for Aperture book

    Can anyone tell me how to retain the quality of original images when I export to PDF for book production in Aperture?
    I am trying to produce a book with 11 pages, in large soft back format.  Most of the images are black and white, and all are PNGs.  Individual files size are typically 12MB - 20MB, and  the longer side of the images is mostly over 5000 pixels.  They all look very clean and crisp full screen in Aperture, and there are no warning triangles in the page make-ups to highlight any instances of poor resolution.
    I’m producing the PDF, via ‘Print’ > ‘Save as PDF’.  The resulting file is 2.6MB.
    Viewed in Preview, some of the images in the PDF superficially appear to be OK.  Some are not - and are very indistinct.  Zooming in on the images in Preview shows that very few are useable.
    I produced a colour book, with larger pages last year and was very happy with both the PDF and the finished book in print.  Some example file sizes from that one were:  15.3MB (3950x2633) and 9.30MB (2880x 1920).
    I had expected the black and white images to work even better. 
    What am I doing wrong here?
    I'm using Aperture 3.2.1 on a MacBook Pro running 10.6.8.

    I just remade the same book - as a test - in the extra large hardback format (ie. the one I used for the previous publication, last year).
    This time, the pictures are fine.  The images appear to be the same quality in the PDF as the originals - much, much better.  The size of the file has increased massively too > up from just 2.6MB to 52.8MB.
    So does the books production function work well only with the biggest, most expensive option? 
    I'd really appreciate some feedback from anyone who's tried the different sizes, and preferably some brilliant ideas to make them all work equally well.

Maybe you are looking for