[neomutt-users] Print html to pdf

philipp at thumfart.info philipp at thumfart.info
Fri Mar 20 16:28:35 CET 2020


Thanks Jakub, that already helps me a lot.

Do you know of any way to also get this to work for html e-mails? As far as I understand the neomutt print command only forwards the plain text file.

--
Mit freundlichen Grüßen
With kind regards

Mag. Philipp S. Thumfart

On 20.03.2020 15:52, Jakub Jindra wrote:
> Hi Philipp,
>
> I have following script for printing to PDF:
>
> #!/usr/bin/env sh
> OPEN_PDF="open -a Preview"
>
> tmpfile=$(mktemp)
> perl -pe 's/\e\[[\d;]*m//g;' | \
> 	iconv -f utf-8 -t iso-8859-2 -c | \
> 	a2ps -B -X iso2 -o - | \
> 	ps2pdf - $tmpfile
>
> $OPEN_PDF $tmpfile
> sleep 1
> rm $tmpfile
> #### END
>
> set print_command = "/path/to/the/script/above.sh"
>
> Change OPEN_PDF command to suit your needs.
> You need perl, iconv, a2ps and ghostscript.
>
> To create PDF with with all headers run before printing.
> :unset weed
>
> My PDFs are quite ugly. If anyone has prettier way I would also like to see it.
>
> Best,
> Jakub
>
> On 2020-03-20 15:08, philipp at thumfart.info wrote:
> > Hey everybody!
> >
> > I was wondering if there is currently a way to print plain text e-mails to pdf?
> >
> > Furthermore, is it possible to print html e-mails (including their header information)?
> >
> > Thanks in advance!
> >
> > --
> > Mit freundlichen Grüßen
> > With kind regards
> >
> > Mag. Philipp S. Thumfart
> >
>
>
>
> --
> Jakub Jindra


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://mailman.neomutt.org/pipermail/neomutt-users-neomutt.org/attachments/20200320/59b81e49/attachment.sig>


More information about the neomutt-users mailing list