> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Rainer Langbehn
> Sent: Tuesday, April 06, 2004 5:21 AM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] Font mapping
>
> Hi,
>
> first of all, thanks for this great PDF library.
>
> We need to map some base-14 fonts (the newer ones) to their
> former set of
> base-14 fonts to be downwards compatible (PDF 1.2, Acrobat 3.0), e.g.
>
> Arial MT -> Helvetica
> Times New Roman PS MT -> Times
>
These are truetype fonts not the base 14.
> We're doing this by inspecting the font dictionary of each
> page and replacing
> the basefont with the corresponding font mapping, if
> necessary, like this
>
> private static void setBaseFont(PdfDictionary font, PdfName
> baseFont) {
> font.put(PdfName.BASEFONT, baseFont);
> font.put(PdfName.SUBTYPE, PdfName.TYPE1);
> font.remove(PdfName.FIRSTCHAR);
> font.remove(PdfName.LASTCHAR);
> font.remove(PdfName.FONTDESCRIPTOR);
> font.remove(PdfName.WIDTHS);
> }
>
> Is this the preferred way to replace a basefont? Is it
> necessary to replace
> the firstchar, lastchar, fontdescriptor and widths too? The
> specs say no for
> the 14 standard fonts.
>
You are replacing TT fonts. You need the keep the widths, firstchar and
lastchar but not the font descriptor.
Best Regards,
Paulo Soares
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions