8 Replies Latest reply on Feb 14, 2016 6:47 AM by rob day

    Weight of PDF differs depending compression of placed image

    peterl32211345

      Hi

       

      I placed a tiff image (LWZ compressed) in InDesign and exported to a PDFX1a PDF. Downsampling the images to 300dpi and compressing to maximum jpeg. The PDF weight was around 15 Mb.

      Then I re saved the tiff image as a jpeg and did a new export to PDFX1a in exactly the same way. The PDF weight was around 3 Mb.

      I really cant understand what is happening here. The analyzed the images in the PDF in Acrobat and they both seam the same.

       

      The difference of the image is not that big tiff 40 Mb and the jpeg 27Mb.

       

      What's the explanation to this?

       

      Thanks

      Peter

        • 1. Re: Weight of PDF differs depending compression of placed image
          Eugene Tyson Adobe Community Professional & MVP

          Tiff with LZW compression is basically like zipping the image data, it's a compression that is lossless.

           

          JPEG is destructive, in that it is lossy (information is lost), it's not compressed, it's completely removed.

           

          The (Automatic) JPEG at Maximum quality means that compression is applied to each individual image based on the image attributes. For images that appear to be content as vector/text then it uses ZIP compression.

           

          So when InDesign looks at your Tiff compressed LZW file format, it won't apply jpeg compression.

           

          Compression is only applied to the images that need compression (or don't already have compression to be more precise)

          • 2. Re: Weight of PDF differs depending compression of placed image
            peterl32211345 Level 1

            Thanks for a quick response.

             

            Interesting, so a tiff can actually be lossy. Never realized that.

             

            But anyway... I still cant get it to work or don't understand right.

            Changing from (automatic) JPEG to just JPEG in the PDF export does not make any difference.

            Also saving the tiff with jpeg compression does not yield a change. PDF weight stays at around 15Mb.

             

            Side question: Can I see in photoshop what compression was applied to a tiff image?

            • 3. Re: Weight of PDF differs depending compression of placed image
              Gaurki Level 1

              I could not recreate this using LZW compressed TIF images (with and without layers) and saving a Max quality JPG from the same file in Photoshop. Tried numerous PDF export settings from InDesign with the result always being equally sized PDF files.

               

              The only thing that made a PDF size difference is when I saved the JPG in photoshop with a lower quality setting. Obviously when Indesign exports a PDF containing an already low-quality JPG it will be smaller than the same PDF with a high quality JPG. Doesn't seem like that would cause such a large difference and you should be able to see a quality difference between the 2 PDFs if this was your case. May need more details to recreate the issue; let us know if the image file has any other unusual attributes (Bitmap? color profile? spot channel? transparency?)

               

              Note: Eugene is not saying TIFFs are lossy. JPEGs are lossy, TIFFs are lossless. PSDs are also lossless and I recommend resaving TIFF files as PSDs whenever possible, this will result in lighter files that inDesign usually processes better but that keep layers/transparency and without the lost data from JPG compression. I remember that LZW compressed TIFFs can cause issues with some commercial printer software and it also be preventing your version of inDesign from either downsampling or JPG compressing the file on export; if you do save TIF images I recommend not using any type of compression.

              • 4. Re: Weight of PDF differs depending compression of placed image
                rob day Adobe Community Professional & MVP

                 

                But anyway... I still cant get it to work or don't understand right.

                 

                It sounds like you are expecting the amount of compression applied to the placed TIFF or JPEG to carry through to the exported PDF?

                 

                When you place a JPEG and export to PDF the file size savings realized in the original JPEG are not included in the exported PDF. InDesign simply takes the incoming pixels (artifacts included) and recompresses them using the settings you have chosen in the Compression tab. So the only advantage to a workflow that places JPEG is the disk savings you would get from the original JPEGs, which would be pennywise given current storage costs. All that matters is the compression you apply in the export dialog

                 

                An easy test to show this is—take a heavily compressed JPEG, place it, and export with compression and downsampling turned off. Here I have a single, heavily compress, high res image placed on the page (min.jpg). In the Links panel its file size is 300K. If I export to PDF/X-1a with compression turned off, the resulting PDF is considerably larger (54mb) than the JPEG file because the pixels get converted to CMYK with no compression.

                 

                Screen Shot 2016-02-09 at 1.23.18 PM.png

                 

                 

                Also, any compression artifacts from the original JPEG would still exist—the PDF zoomed in:

                 

                Screen Shot 2016-02-09 at 1.32.02 PM.png

                • 5. Re: Weight of PDF differs depending compression of placed image
                  rob day Adobe Community Professional & MVP

                  This shows the effects of the export compression. Note that the OriginalRGB.psd and the export to RGB with no compression (NoCompressRGB.pdf) match in file size even though the placed file is the compressed, 300K, min.jpg.

                   

                  NoCompessCMYK.pdf is larger because PDF/X-1a forces RGB to CMYK:

                   

                  Screen Shot 2016-02-09 at 1.42.35 PM.png

                  • 6. Re: Weight of PDF differs depending compression of placed image
                    rob day Adobe Community Professional & MVP

                    Obviously when Indesign exports a PDF containing an already low-quality JPG it will be smaller than the same PDF with a high quality JPG.

                     

                    When you take the same image and save it as a minimum and maximum quality JPEG, the placed pixels that InDesign starts with on the export would be very different. The minimum quality JPEG would have many more artifacts and repeating pixels and you would expect a (slightly) smaller export given the same settings. But that's just because the two files have different pixels and not because of the original JPEG compression.

                    • 7. Re: Weight of PDF differs depending compression of placed image
                      peterl32211345 Level 1

                      Hi,

                      Thanks for all your explanations.

                       

                      I think a have a strange problem though that is difficult to figure out. Maybe it is a "broken" image. (Coping the pixels of that image in a new Photoshop image did not help)

                       

                      I have an image (car) that does not compress in the PDF properly if it is not saved as a jpeg. I did the same test with a second image (mountain) and it worked the way I would expected.

                       

                      Car.png

                       

                      Mountain.png

                      Here you can see first the sizes of the placed images. Everything seems normal

                      Then each image placed in InDesign and exported to a PDFX-1a with jpeg compression.

                      Not that the car image does not compress properly if it is not a jpeg to start with. Mountain is ok. All PDF's roughly the same size.

                       

                      I checked the image object in the PDF's and they all are marked as jpegs.

                      Sample-Sizes.png

                      • 8. Re: Weight of PDF differs depending compression of placed image
                        rob day Adobe Community Professional & MVP

                        It looks like you might be either embedding or pasting the images? Normally the file format of linked images wouldn't affect the file size of the InDesign file. So here I'm saving the same RGB image as JPEG and PSD and linking them on a letter sized page and you can see the size of the InDesign file doesn't change and is considerably smaller than the image file sizes.

                         

                        Screen Shot 2016-02-14 at 9.32.54 AM.png

                         

                        When you link the preview is a proxy, which is the same no matter what the link's format is. Seeing that the file size of your Test-INDD-psd.indd is larger than the .PSD image tells me something's wrong with your test file.