[reportlab-users] About Helvetica font
adam hyde
adam at flossmanuals.net
Fri Oct 24 10:34:14 EDT 2008
hi,
if you use Ghostscript after you have made the PDF it can force embed
all fonts
adam
On Fri, 2008-10-24 at 16:32 +0200, Enrique Comesaña Figueroa wrote:
> Hello,
>
> I am trying to generate a PDF document with embedded fonts. I have no
> problem with other fonts but Helvetica. It always appear in the list
> of fonts in the properties document even if i do not use it.
> And if I try to embed it in a document which uses this font, reportlab
> generates it but do not embed the Helvetica font.
>
> Can anyone help me?, If that is not possible, can anyone suggest me
> any other way to generate pdf with ALL fonts embedded?
>
> This is my python code:
>
> from reportlab.pdfbase import pdfmetrics
> from reportlab.pdfbase.ttfonts import TTFont
> from reportlab.pdfgen.canvas import Canvas
>
> justFace = pdfmetrics.EmbeddedType1Face('./Helvetica.afm', './Helvetica.pfb')
> pdfmetrics.registerTypeFace(justFace)
> justFont = pdfmetrics.Font('Helvetica','Helvetica','WinAnsiEncoding')
> pdfmetrics.registerFont(justFont)
>
> c = Canvas('temp.pdf')
> c.setFont('Helvetica', 32)
> c.drawString(10, 150, "Some text")
> c.save()
>
>
> I have have the files Helvetica.afm and Helvetica.pfd in the same
> folder as the python script
> And pdffonts command return me this properties of the PDF document:
>
> >>> pdffonts temp.pdf
> name type emb sub uni object ID
> ------------------------------------ ----------------- --- --- --- ---------
> Helvetica Type 1 no no no 2 0
>
> Many thanks,
> Enrique
> _______________________________________________
> reportlab-users mailing list
> reportlab-users at reportlab.com
> http://two.pairlist.net/mailman/listinfo/reportlab-users
--
Adam Hyde
Founder FLOSS Manuals
http://www.flossmanuals.net
More information about the reportlab-users
mailing list