Dear everyone !  I have problem with Font when create pdf file . I use Open 
Type Font  (AquaKanaRegular )

 

with encoding IDENTITY-H ,the pdf file do not have any content .

 

Anyone know the problem , please help me !

 

Platform I use to test :

                OS : Mac  10.4.8

                Java JDK :1.5

                iText version : 2.1.4 

                Adobe Reader : 8.1.3

 

This is my code

 

public class TestMain {

                public static void main(String[] args){

                                Document document = new Document();

                                

                                String text = "aおはじょございますa";

                                try{

                

                                                PdfWriter.getInstance(document, 
new FileOutputStream("HelloWorld.pdf"));

                                                                

                                                document.open();

                                

                                                Font bf = 
FontFactory.getFont("/System/Library/Fonts 
/AquaKanaRegular.otf",BaseFont.IDENTITY_H, BaseFont.EMBEDDED, 14f);

                                

                                                document.add(new 
Paragraph(text, bf));

                                }

                                catch(DocumentException de){

                                                
System.out.println(de.getMessage());

                                }

                                catch(IOException ioe){

                                                
System.out.println(ioe.getMessage());

                                }

                                

                                document.close();

                }

}

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to