1

I have an Inkscape file that contains (linked) raster images. One 5 MB raster image is used in four places, but is clipped to a small area (i.e. most of it is hidden).

When I export to PDF, the file is very large, at over four times the size of the raster image. I presume that Inkscape embeds the full raster image four times in the PDF.

Is there a simple way to reduce the size of the PDF? One way could be to manually crop the raster image, but then I'd have to lay the page out again. Is there a way to make Inkscape not export the hidden areas?

1 Answer 1

0

I am pretty sure that there is no way to make Inkscape do what you want (but given the nature of this statement, I cannot back this up in any way).

The following things might help you though:

  • Unless your raster image has to be positioned very precisely, you can position your manually cropped raster image easily by leaving the old image and positioning the new one on top of it and then delete the old one.
  • You can reduce the file size of your raster image without cropping it by making the invisible areas all in one colour and using a format (like PNG) that is good at compressing such areas. (I am not quite sure as to how well Inkscape pertains bitmap formats, but it’s worth a try.)
  • You can run your final PDF through Ghostscript or another appropriate PDF tool that is capable of detecting duplicate images and reduce your file size by using this knowledge.
4
  • Yes, I agree that it's a difficult question to "answer", but I'll be fairly open in accepting appropriate workarounds. The first option would be my final choice, but I tested the second option in gimp and found no change in file size. That is, I deleted half of the image, and re-exported as png, but it was still the same size (in fact, 5 KB larger).
    – Sparhawk
    Nov 8, 2014 at 23:37
  • The third option seems reasonable, but I think once I optimise the original linked images (e.g. via the first two options), it should hopefully prove unnecessary. (Also, I couldn't find how to do this in Ghostscript.)
    – Sparhawk
    Nov 9, 2014 at 0:15
  • @Sparhawk: You can ask a separate question about doing this in Ghostscript (if one doesn’t already exist).
    – Wrzlprmft
    Nov 9, 2014 at 9:32
  • Ok, that's fair enough, but then (for my purposes) the latter two options don't really answer my question.
    – Sparhawk
    Nov 9, 2014 at 9:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .