You are not embedding the fonts.
----- Original Message -----
From: "Nandu" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, August 07, 2005 11:53 PM
Subject: [iText-questions] Fonts in the PDF
> Hi,
>
> Using iText API I am creating a PDF document that is exactly same as that
of a
> PDF document created in the regular manner using Adobe tools (framemaker
and
> acrobat). Since the original document was created using Arial fonts, I am
also
> using Arial font. But the fonts in the PDF document generated don't look
like
> the original document.
>
> File->Document Properties->Fonts in the original document is shown below:
>
> Original Font Type Encoding Actual Font Type
> Arial,BoldItalic TrueType Windows Embedded Subset TrueType
> Arial TrueType Windows Embedded Subset TrueType
> Arial, Bold TrueType Windows Embedded Subset TrueType
> Arial, Italic TrueType Windows Embedded Subset TrueType
>
> File->Document Properties->Fonts in the document that I generate is shown
below:
>
> Original Font Type Encoding Actual Font Type
> Arial-BoldMT TrueType Windows
> ArialMT TrueType Windows
> Arial-BoldMT TrueType Windows Arial-BoldMT TrueType
> ArialMT TrueType Windows ArialMT TrueType
>
> Obviously I am doing something wrong in the initialization of the fonts.
> How do I ensure that the font is as close as possible to the original one?
>
> void initFonts() {
> // Register the entire Fonts directory
> FontFactory.registerDirectory("C:\\Windows\\fonts");
> Font defaultFont = null;
> try {
> BaseFont bf = BaseFont.createFont("C:\\windows\\fonts\\arial.ttf",
> BaseFont.CP1252, BaseFont.EMBEDDED);
> defaultFont = new Font(bf, 8);
> } catch(DocumentException dex) {
> // Intialize the default Font as Arial
> defaultFont = FontFactory.getFont("Arial", 8);
> }
> }
>
> Thanks for your help.
>
> Regards,
> Nandu
>
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions