Could  you attach a file created this way to the issue?

Tilman

Am 19.03.2015 um 00:48 schrieb Andrew Munn:
Windows 8.  I have acrobat reader installed if that matters.

Thanks for the tip. I can do this:

        PDFont font = PDType0Font.load(document, new 
File("c:\\windows\\fonts\\arial.ttf");

and the doc is displayed fine in acrobat reader on the machine I used to
create it but if I open it on my android device the text does not appear.
I guess this is not a portable way to define a font?

-Andrew




On Thu, 19 Mar 2015, Tilman Hausherr wrote:

Yes, see mentioned workaround in
https://issues.apache.org/jira/browse/PDFBOX-2714

Maybe register in JIRA and add yourself as a watcher there, so you'll get
updates.

Btw what windows version are you using?

Tilman

Am 19.03.2015 um 00:03 schrieb Andrew Munn:
I am testing out code like this on Windows w/PDFbox 2.0.0:

        PDFont fontPlain = PDType1Font.TIMES_ROMAN;
        PDPageContentStream cos = new PDPageContentStream(document, page1);
        cos.setFont(fontPlain, 12);
          cos.drawString("Hello World");
          cos.endText();

And I'm getting the same error mentioned recently on stackoverflow.  Is
there a workaround?  I don't really care what font gets used.

http://stackoverflow.com/questions/29111310/pdfbox-2-0-0-type1fonts-working-on-one-computer-not-another

java.lang.IllegalArgumentException: No glyph for U+0048 in font Times-Bold
        at
org.apache.pdfbox.pdmodel.font.PDType1Font.encode(PDType1Font.java:303)
        at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:268)
        at
org.apache.pdfbox.pdmodel.PDPageContentStream.showText(PDPageContentStream.java:316)
        at
org.apache.pdfbox.pdmodel.PDPageContentStream.drawString(PDPageContentStream.java:282)

Thanks!

Andrew

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


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

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



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

Reply via email to