I'm trying to convert, from the command line, .png files of screenshots created by scrot to pdf files. I can successfully do this within shotwell, but I'd like to do it from the command line. For some reason, the command
convert file.png file.pdf
does a conversion, but it's not a literal one (and wont print properly)
For comparison purposes, I've posted on the web the output from convert
https://are.berkeley.edu/courses/ARE211/currentYear/convert.pdf
and the output from shotwell.
https://are.berkeley.edu/courses/ARE211/currentYear/shotwell.pdf
As you can see, the file convert.pdf is much much lower resolution, larger font, and most importantly, doesn't print properly using the standard lpr command.
Are the any off-the-shelf, easily installable, png to pdf conversion programs that would do a better job than convert? Or alternatively are there options to convert that I could use that would result in an exact conversion? There are a billion flags for convert, but I really don't know where to start.
Thanks for any help!
I use the Phatch. You will have to create the actionlist with the graphical user interface (gui), and later invoke it from the command line.
Install:
Phatch is not only about converting from one format to another, but you can also batch crop, rotate, etc. After install select the program from the dash or type
phatch
into the command line. Now the gui will open. Click on the green cross and search for the "Save" command to add it to the actionlist. Define type as "pdf" and an output folder (and other parameters if you want to). Default output folder is ~/desktop/phatch. If the program can't find the indicated folder during the convert action, it will create it automatically. Now press Ctrl+Shift+S and save the actionlist giving it a name like "convert2pdf". Default path where actionlists are stored is ~/.local/share/phatch/actionlists. I recommend to choose your home folder for now. Now you have defined an actionlist which converts to pdf.
You have to do this previous step only once. From now on you can invoke the actionlist every time you need from the terminal in the following way:
Everything inside the ~/folder/to/convert will be converted to pdf and put into the output folder on your desktop. The original files won't be deleted.