[PD] pd pretty print

Peter P. peterparker at fastmail.com
Tue Sep 26 13:25:53 CEST 2017

Hi list,

this topic is somewhat known. How do I print postscript (vector graphic)
from Pd's "Print..." menu entry?

For now pd creates postscript files, which can be converted to pdf using 
optioanlly followed by
(at least on Linux). Nevertheless the font type, size and positions are
different (and ugly) compared to the initial patch. Miller kindly shared
his awk script on this list, to change fontsizes in the .ps files. Andy
Farnell seems to have worked on this as well. If I am not mistaken it
does something like

	awk 'BEGIN  {last = -10}
        /findfont 8/  {
            $1 = "/Courier-Bold"
            $3 = 11.3
        }' $1 > /tmp/tmp2.ps

I am wondering about the following: Depending on the patch fontsize, the
"/findfont 8/" might hold a different value. I am wondering how these
values correspond to pd font sizes, as this seems to have changed a bit
over the last years. 

Printing the testtone.pd patch with a Pd fontsize of 12 yields
testtone.ps which holds entries of the form.
	/DejaVuSansMono-Bold findfont 7

Changing them with a modified version of above awk script to 
	/Courier-Bold findfont 12
and running ps2pdf and pdfcrop on it will give fonts too small compared
to the tcltk GUI yet at slightly elevated vertical position (see the
attached file testtone-crop.pdf).

I am wondering what, as of 2017, is the best practice to pretty print pd
patches in vector graphic format and hope to additionally find out why it
is so hard to do.

Thank you for your help and comments!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testtone-crop.pdf
Type: application/pdf
Size: 11452 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20170926/e0681dcc/attachment.pdf>

More information about the Pd-list mailing list