Re: [iText-questions] iText Open Type Font

2009-01-14 Thread mister bean

There are known problems with this font. See
http://forum.soft32.com/mac/System-Fonts-Display-Font-Book-ftopict4205.html
which discusses it in length.

Unless someone else points you to something in your iText code, I would look
very carefully at the font. Try using some .otf font that's not a peculiar
subset of Apple's own version and see if that works with the same code.

---mr. bean

>>> re >>>


Hua Nguyen Hung wrote:
> 
>  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
> 

-- 
View this message in context: 
http://www.nabble.com/iText-Open-Type-Font-tp21451159p21452108.html
Sent from the iText - General mailing list archive at Nabble.com.


--
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

Re: [iText-questions] iText Open Type Font

2009-01-14 Thread Thimo Seitz
Hello.

I’ve noticed that in your Fontpath is a blank after “Fonts”. Is that correct ?



Maybe you have a issue with your encoding of your sourcefile. Have you verified 
that your compiler and your jvm is using the same encoding as your 
sourcecode-editor ? e.g. UTF-8

If not, try to escape your chars like \u, where  is a Unicode character 
code.

Best Regards
Thimo Seitz


Dipl.-Inf. (FH) Thimo Seitz
Geschäftsführer Entwicklung
Flyer-Ex Software GmbH
Am Weichselgarten 7
91058 Erlangen/Tennenlohe
Tel. 09131 / 691-189

thimo.se...@flyer-ex.de<mailto:thimo.se...@flyer-ex.de>
http://www.flyer-ex.de


Von: Hua Nguyen Hung [mailto:h.n.h...@cuvel.com]
Gesendet: Mittwoch, 14. Januar 2009 04:57
An: itext-questions@lists.sourceforge.net
Betreff: [iText-questions] iText Open Type Font

 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

[iText-questions] iText Open Type Font

2009-01-13 Thread Hua Nguyen Hung
 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