I’ve written a Gimp plug-in to automate some very routine and standard formatting I do frequently where I combine two multi-page pdf’s, do some minor manipulations (scale some sheets, re-position, merge), then output to a pdf. The plug-in is written and working fine. The only trouble I have is that the final pdf quality leaves something to be desired.
I’ve determined that the less-than-desirable image quality is a function of the resolution in which the original pdf’s are loaded into gimp, which I achieve using the gimp-file-load-layers procedure. I wonder if there is any way to set the resolution of the imported pdf’s (as I would if I were opening them manually) or to replicate the function of the gimp-file-load-layers procedure in my own plugin while implementing a resolution control.
I do not know how to open a PDF with a specific ppi setting in a Gimp script. Gimp works in pixels so I might do some pre-processing with (say) ImageMagick to convert a PDF into a raster image of a suitable size for Gimp.
What I do know is Gimp will remember the last used PDF imported ppi value, on a per-session basis. Close Gimp and start again.