[jira] [Commented] (PDFBOX-4244) PDType0Font.load returns null

2018-06-14 Thread Jaroslav Mencl (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16512243#comment-16512243
 ] 

Jaroslav Mencl commented on PDFBOX-4244:


Hi Tilman, this helped! The code now seems to work.

Jaroslav

 

> PDType0Font.load returns null
> -
>
> Key: PDFBOX-4244
> URL: https://issues.apache.org/jira/browse/PDFBOX-4244
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.9
> Environment: Windows 10, NetBeans 8.2
>Reporter: Jaroslav Mencl
>Priority: Major
> Attachments: EECode39N.ttf
>
>
> Dear,
>  
> I need to put some barcode text into pdf using my jsp code. I use two fonts, 
> code39u.ttf and EECode39N.ttf (the behavior is the same with some system 
> fonts, whereas other work ok).
> PDType0Font.load function returns null, even if these fonts are correctly 
> installed and can be used elsewhere in my Windows OS. The load function does 
> not crash (that means the font file is found and ok).
> I used 2.0.8 version, but new 2.0.9 generates the error too.
>  
> Can you give me any help, please?
>  
> Jaroslav



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4244) PDType0Font.load returns null

2018-06-13 Thread Tilman Hausherr (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16511424#comment-16511424
 ] 

Tilman Hausherr commented on PDFBOX-4244:
-

I ran this code:
{code}
System.out.println(PDType0Font.load(new PDDocument(), new 
File("EECode39N.ttf")));
{code}
and got this output:
{code}
PDType0Font/PDCIDFontType2 null
{code}
so it's not null. Either you misunderstood the "null" (which is misleading, 
it's just the PostScript name), or you really did get null, then it might be 
you have several versions in your classpath. Please clean up everything, or 
start a new mini project to check if the error still comes.


> PDType0Font.load returns null
> -
>
> Key: PDFBOX-4244
> URL: https://issues.apache.org/jira/browse/PDFBOX-4244
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.9
> Environment: Windows 10, NetBeans 8.2
>Reporter: Jaroslav Mencl
>Priority: Major
> Attachments: EECode39N.ttf
>
>
> Dear,
>  
> I need to put some barcode text into pdf using my jsp code. I use two fonts, 
> code39u.ttf and EECode39N.ttf (the behavior is the same with some system 
> fonts, whereas other work ok).
> PDType0Font.load function returns null, even if these fonts are correctly 
> installed and can be used elsewhere in my Windows OS. The load function does 
> not crash (that means the font file is found and ok).
> I used 2.0.8 version, but new 2.0.9 generates the error too.
>  
> Can you give me any help, please?
>  
> Jaroslav



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4244) PDType0Font.load returns null

2018-06-13 Thread Jaroslav Mencl (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16510694#comment-16510694
 ] 

Jaroslav Mencl commented on PDFBOX-4244:


Hello, this is my piece of code:

 

java.io.File origFile = new java.io.File("c:\\temp\\emptypdf.pdf");
 PDDocument doc = PDDocument.load(origFile);
 PDPage page = doc.getPage(0);
 PDPageContentStream cs = new PDPageContentStream(doc, page, 
PDPageContentStream.AppendMode.APPEND, true, true);
 String winDir = System.getenv("WINDIR");
 String fontName = "EECode39N.ttf";
 org.apache.pdfbox.pdmodel.font.encoding.Encoding e = WinAnsiEncoding.INSTANCE;
 PDFont font = PDType0Font.load(doc, new File(winDir + "\\Fonts\\" + fontName));

 

Thank you for your help,

Jaroslav

> PDType0Font.load returns null
> -
>
> Key: PDFBOX-4244
> URL: https://issues.apache.org/jira/browse/PDFBOX-4244
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.9
> Environment: Windows 10, NetBeans 8.2
>Reporter: Jaroslav Mencl
>Priority: Major
> Attachments: EECode39N.ttf
>
>
> Dear,
>  
> I need to put some barcode text into pdf using my jsp code. I use two fonts, 
> code39u.ttf and EECode39N.ttf (the behavior is the same with some system 
> fonts, whereas other work ok).
> PDType0Font.load function returns null, even if these fonts are correctly 
> installed and can be used elsewhere in my Windows OS. The load function does 
> not crash (that means the font file is found and ok).
> I used 2.0.8 version, but new 2.0.9 generates the error too.
>  
> Can you give me any help, please?
>  
> Jaroslav



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org



[jira] [Commented] (PDFBOX-4244) PDType0Font.load returns null

2018-06-12 Thread Tilman Hausherr (JIRA)


[ 
https://issues.apache.org/jira/browse/PDFBOX-4244?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16509830#comment-16509830
 ] 

Tilman Hausherr commented on PDFBOX-4244:
-

Please upload or link to one of the fonts where this happens. Also include any 
log output you got and the exact code line that you used.

> PDType0Font.load returns null
> -
>
> Key: PDFBOX-4244
> URL: https://issues.apache.org/jira/browse/PDFBOX-4244
> Project: PDFBox
>  Issue Type: Bug
>  Components: FontBox
>Affects Versions: 2.0.9
> Environment: Windows 10, NetBeans 8.2
>Reporter: Jaroslav Mencl
>Priority: Major
>
> Dear,
>  
> I need to put some barcode text into pdf using my jsp code. I use two fonts, 
> code39u.ttf and EECode39N.ttf (the behavior is the same with some system 
> fonts, whereas other work ok).
> PDType0Font.load function returns null, even if these fonts are correctly 
> installed and can be used elsewhere in my Windows OS. The load function does 
> not crash (that means the font file is found and ok).
> I used 2.0.8 version, but new 2.0.9 generates the error too.
>  
> Can you give me any help, please?
>  
> Jaroslav



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: dev-h...@pdfbox.apache.org