When exporting a document with bitmap images in it, Inkscape won’t downsample them to a lower resolution, despite the “Resolution for rasterization (dpi)” setting in the PDF export dialog. That export dialog setting only applies to bitmaps that have had filters applied against them. See bug 246677.
4 years ago I figured out how to work around this and today I had to relearn it. So as to not repeat this in another 4 years, I’m documenting this here for posterity.
The workaround is to apply an identity filter to each bitmap before saving it. An identity filter is one that doesn’t do anything, but because it is a filter it forces Inkscape to do the downsampling upon export. Because an identity filter doesn’t actually do anything, there isn’t one available in the Filters menu, but we can create one.
To create a reusable identity filter:
- Open a new Inkscape file
- From the Filters menu, select Filter Editor…
- In the Filter Editor pane, click the New button. This will add the filter “filter1” to the Filter list
- Double click “filter1” and rename it “Identity”
- To the right of the Add Effect: button there is a drop-down. Change it to Color Matrix, and hit the Add Effect: button
- Save the document as “Identity filter.svg”
- Now put the file where Inkscape can find it:
- Linux/OS X: ~/.config/inkscape/filters
- Windows XP: C:\Documents and Settings\[USERNAME]\Application Data\Inkscape\filters
- Windows Vista and later: C:\Users\[USERNAME]\AppData\Roaming\Inkscape\filters
- The ‘filters’ directory may not exist, in which case just create it.
- Close and restart Inkscape
- This should add the Personal submenu under the Filters menu which should include our Identity filter.
To use the identity filter:
- In your Inkscape file, select the bitmaps you want to downsample. Be sure not to select any vector images or text since you don’t want to rasterize that.
- From the Filters menu, select Personal > Identity
- Now when you save the document as a PDF, adjust the “Resolution for rasterization (dpi)” setting. 90 is a decent number for documents that are being viewed on a computer screen. 150 is probably the smallest you want to go for anything that is being printed.