Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Openning a png file in ubuntu, I can see the menu item for 'print to file'. How can I do the same on shell? PS: I prefer installing no extra package, due to lack of root access.

EDIT: the operating system is ubuntu 11.10

share|improve this question

convert xyz.png xyz.pdf should do the trick.

See man convert for more options.

share|improve this answer
+1 - additionally you can use wildcards: convert *.png file.pdf – Geppettvs D'Constanzo Jun 30 '12 at 18:49
does this require extra packages? – Richard Jun 30 '12 at 19:27
Yes it requires the ImageMagick package, although it was there by default on my Ubuntu 12.04 – abhshkdz Jun 30 '12 at 19:29
Also there by default on lubuntu 12.10. – Rasmus Nov 23 '12 at 7:59
Works like a charm. PDF looks beautiful. Original images are unharmed. – GlenPeterson Sep 23 '13 at 12:54

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.