Skip to main content


Someone made https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/857 and it's the kind of patch that is hard to evaluate.

It's to allow restricting rsvg-convert to outputting certain PDF versions. Cairo's default is PDF 1.7, but that causes a warning when embedding such PDFs in #TeXLaTeX.

There are two cases of the relevant warning in texlive (https://github.com/search?q=repo%3ATeX-Live%2Ftexlive-source+%22Found+pdf+version%22&type=code) - and as far as I can tell, both are ancient.

So, I'm torn between "having --pdf1.5 is gross in terms of usability" and "this lets people solve a problem".

This entry was edited (10 months ago)
in reply to penguin42

@penguin42 I was initially concerned about forcing people to learn about the obscurities of PDF versions.

I'm thinking about explicitly mentioning LaTeX in the man page, so at least it's not a bunch of options without a clear reason for existing.

in reply to Federico Mena Quintero

I wouldn't beat yourself up too much about them having to learn; I mean you aren't creating the knob - you're just passing Cairo's knob through to the user; it might be worth checking if anything else does that and standardise the option naming/format.
in reply to penguin42

@penguin42 trying to decide between "--format pdf --pdf-version 1.5" or "--format pdf1.5" 😅
in reply to Federico Mena Quintero

I suggest --cairo PdfVersion=SOMETHING where 'SOMETHING' is the output of cairo's version_to_string(PdfVersion ...)
in reply to Federico Mena Quintero

hmm... Almost sounds like one might want the classic solution for the classic tools.

In this case the classic solution would be a stand-alone tool to convert 1.7 to 1.5 in the "Unix way".

Might depends on the differences in output.

in reply to Jon A. Cruz

@joncruz Heh, I mean, the meat of the patch is a single line of code, that tells Cairo which PDF version to emit. I'd rather do that than send people on a side quest to find how to convert PDF versions. A tiny bit of maintenance load for me, vs. hours wasted for everyone.

(I'd really prefer it if LaTeX would update their defaults (does it really default to emitting PDF 1.4 or something?), but I understand the reasons for its glacial development pace at the core.)

in reply to Federico Mena Quintero

at least it's just connecting the dots. ie nobody is patching Cairo PDF backend here.

Maybe it's gross, but PDF is gross.