http://article.gmane.org/gmane.comp.windows.dotnet.itextsharp.general/10
19

Paulo 

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of Ragnar Birgisson
> Sent: Friday, January 12, 2007 12:41 PM
> To: [email protected]
> Subject: [iText-questions] Open type fonts on Mac
> 
> Hi,
> 
> I have a problem with open type fonts on Mac. I'm trying to 
> use an open 
> type font with IDENTY_H encoding, but for some reason the 
> generated PDF 
> does not print correctly from Mac OS X ( 10.4.8). I've tried 
> to print it 
> from Adobe Acrobat 7.0 and the default Mac Preview program. Acrobat 
> prints it as garbage and the preview program prints nothing.
> It works fine when printed from either Windows or Linux, and 
> any other 
> encoding than IDENTITY_H also works fine on Mac.
> 
> When I view the font information in Acrobat I can see that it 
> does not 
> identify my open type font as embedded. However ,when I open 
> the PDF in 
> Illustrator it detects that the font is indeed embedded. 
> Also, if I take 
> this PDF and save it from Adobe Illustrator,  then I can print it 
> correctly from Acrobat.
> 
> I don't know that much about fonts or how iText supports open 
> type fonts 
> so perhaps somebody has some ideas on what the problem is.
> 
> I've attached the resulting PDF and the Caflisch font that I use. The 
> code that generates the PDF is:
> 
> 
>         Document document = new Document(PageSize.A4, 50, 50, 50, 50);
>         try {
>             PdfWriter writer = PdfWriter.getInstance(document, new 
> FileOutputStream("cff_font.pdf"));
>             document.open();
> 
>             BaseFont bfLiz_CP1252 = BaseFont.createFont("liz.otf", 
> BaseFont.CP1252, true);
>             BaseFont bfCaflisch_CP1252 = 
> BaseFont.createFont("CaflischScriptPro-Regular.otf", 
> BaseFont.CP1252, true);
>             BaseFont bfCaflisch_IDENTITY_H = 
> BaseFont.createFont("CaflischScriptPro-Regular.otf", 
> BaseFont.IDENTITY_H, true);
> 
>             String textLiz_CP1252 = "Some text with the otf 
> font LIZ ( 
> CP1252 encoding ).";
> 
>             String textCaflisch_CP1252 = "Some text with the otf font 
> Caflisch ( CP1252 encoding ).";
> 
>             String textCaflisch_INDENTITY_H = "Some text with the otf 
> font Caflisch ( IDENTITY_H encoding ).";
> 
>             document.add(new Paragraph(textLiz_CP1252, new 
> Font(bfLiz_CP1252, 14)));
>             document.add(new Paragraph(textCaflisch_CP1252, new 
> Font(bfCaflisch_CP1252, 14)));
>             document.add(new Paragraph(textCaflisch_INDENTITY_H, new 
> Font(bfCaflisch_IDENTITY_H, 14)));
> 
>             document.close();
>         }
>         catch (Exception de) {
>             de.printStackTrace();
>         }
> 
> 
> 
> 
> -- 
> 
> 
> Best Regards
> 
> Ragnar Birgisson
> Software Development Manager
> Encode ApS
> Christiansgade 70
> 5000 Odense C
> 
> Tlf: +45 70 22 55 35
> Email: [EMAIL PROTECTED]
> http://www.encode.dk
> 
> 


Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter 
informação confidencial ou legalmente protegida. A incorrecta transmissão desta 
mensagem não significa a perca de confidencialidade. Se esta mensagem for 
recebida por engano, por favor envie-a de volta para o remetente e apague-a do 
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de 
usar, revelar ou distribuir qualquer parte desta mensagem. 

Disclaimer:
This message is destined exclusively to the intended receiver. It may contain 
confidential or legally protected information. The incorrect transmission of 
this message does not mean the loss of its confidentiality. If this message is 
received by mistake, please send it back to the sender and delete it from your 
system immediately. It is forbidden to any person who is not the intended 
receiver to use, distribute or copy any part of this message.


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to