Skip navigation
Currently Being Moderated

PDF optimize / reduce file size / downsample with embedded PNG images

Nov 9, 2012 4:40 AM

Tags: #png #pdf_optimizer #reduce_file_size #embedded_png

Hi everyone

 

This is something that I've stumbled on for a while.

 

I often generate PDFs from SVG documents using Inkscape and the SVG documents often have embedded PDFs and the resulting PDF size can be quite large because of the high-resolution images.

 

I'm attempting to reduce the file size of the PDF in Acrobat (v8), using the PDF Optimizer and "Reduce file size" functions.

The problem is that the file size doesn't go down no matter what I select as the output dpi of the images in the PDF Optimizer.

 

My PDF size is 350MB, running PDF Optimizer I can get that down to 348MB as it must be removing other junk from the file as per my optimizer settings. And when I look at "Audit space usage", images account for 99.66% of the file.

When zooming in to the PDF the images are still crisp so the original resolution is preserved.

 

The same PDF Optimizer settings work on PDFs that have JPEG images embedded. So I'm pretty sure it's because of the embedded PNGs but it's not obvious that this will be the case from the user interface. I can understand JPEG compression not being applied to embedded PNGs but I would have thought the downsample functions should still be applied.

 

One solution I have found is to run the PDF through the PDF printer and getting it to use an appropriate Distiller setting. The problem is that took about an hour for this particular PDF. I would expect a PDF Optimize operation on a similar resolution/page count/file size PDF to take about 3-8 minutes.

 

Is there any way to downsample the image resolution of embedded PNG images in a PDF without having to modify the source?

Is this a feature that is available in more recent versions of Acrobat (I'm using v8) or is it a planned feature in the future?

Has anyone else encountered this and found any other work arounds?

 

I should point out that the reason I am exporting from Inkscape as PDF rather than PS/EPS, then running through Distiller, is that I have noticed text boxes and images being chopped around in the resulting PDF when going to PS/EPS first. Exporting a PDF directly from Inkscape is the only way I've found to preserve the document layout exactly as per the SVG.

 

Cheers, B

 
Replies
  • Currently Being Moderated
    Nov 9, 2012 4:53 AM   in reply to jasd834

    Whatever is causing this serious problem, it isn't the choice of PNG. There's nothing special about PNG which makes it impossible or even difficult to reduce resolution.  There may be something about the way Inkscape is making the PDF that makes it impossible, but it's not easy to see what that is.

     

    Unless... are you able to use the Touch-up Object tool (not Select Object) and select images? Does it select small images, or small stripes or pieces instead?

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 6:03 AM   in reply to jasd834

    I'd say the problem is only superficially similar, since it refers to PNGs getting bigger when Acrobat creates a PDF - and you specifically aren't doing that, I think. I have no idea, since they could save a PNG from Photoshop, then didn't just save a PDF from Photoshop, but that doesn't help you.

     

    Can you reproduce this with a simple PDF - just one picture, perhaps? If so, you could share the PDF using acrobat.com (somehow) and others could take a look.

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 9, 2012 2:53 PM   in reply to jasd834

    The PDF creation software (cairo?) has certainly done something odd. It has wrapped up the image in a tiling pattern, then painted the pattern just once. PDF shrinking software isn't likely to mess with the contents of patterns, they are normally tiny special effect bitmaps not to be adjusted... maybe there's an option to change this on creation.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points