print to pdf
Florian Diesch
diesch at spamfence.net
Tue Jun 27 13:27:19 UTC 2006
Gabriel Dragffy <dragffy at yandex.ru> wrote:
> Is there anyway to print webpages I view in firefox to PDF? I go to the print
> dialogue but only postscript is listed. Is it possible to print to PDF?
More a kind of a work around:
Save the following script (say /usr/local/bin/topdf), make it executable
(chmod a+rw /usr/local/bin/topdf). In firefox go to the printing dialog
and change the print command in the printer properties to /usr/local/bin/topdf.
,----[ topdf ]
| #!/bin/sh
|
| name="`zenity --title="Print to PDF file" --text='Enter filename:' --entry`"
|
| if [ $? -gt 0 ]; then exit 1; fi
| name="/tmp/$name.pdf"
|
| ps2pdf - "$name"
`----
Now when printing a simple dialogs opens where you can give
a filename. The page is then printed to /tmp/filename.pdf with filename
replaced to whatever to entered.
Florian
--
<http://www.florian-diesch.de/>
More information about the ubuntu-users
mailing list