The pdftocairo command line tool does not report certain errors. The cases which I have observed are:
- when specifying the -scale-to option for conversions to types that do not accept it (e.g., for SVG), the option and its value are ignored with no error message
- when only one of -paperw and -paperh are specified, both are silently ignored
- when giving to -paperw or -paperh a non-integer value (e.g., "42.3"), or indeed any other erroneous value that cannot be parsed as an integer, the conversion is aborted and no error message is displayed (only the exit code reflects that something went wrong); by contrast negative integers do not make the conversion fail but mean that -paperw and -paperh are silently ignored.
I think pdftocairo should display an error when the conversion was not actually performed, and display warnings (or display an error and fail) when some parameters were ignored.
I've pushed a fix for the invalid use of -scale-to, use of only one of -paper[wh], and non-integer -paper[wh]
I'll leave this bug open until the failure to error on the use of negative integers is fixed. This should probably be fixed in parseargs.cc (eg by adding a positive integer arg type). Then all arguments across all the utils that only take positive integers can be updated to use this type.
I may also consider changing -paper[wh] to floating-point. I don't think there is any reason to restrict the paper size to an integer.
-- GitLab Migration Automatic Message --
This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/poppler/poppler/issues/614.