Hello,

 

I downloaded your PDFBox-library for Java and I am using it for some time in
Eclipse. It works great, I think! But I have one single problem:

When I want to use a font like Arial, your website tells me
(http://pdfbox.apache.org/userguide/cookbook/creation.html =>
HelloWorldTTF-example) that I have to use PDFont font =
PDTrueTypeFont.loadTTF(document, "Arial.ttf"); to do this. I find out that
this will only work if I put this Arial.ttf in the correct folder in my
Eclipse Workspace. Then the HelloWorldTTF-example works and the document
will be saved on a given location. (Let's call this document "Test.pdf")

 

The trouble in this is that when I start this Test.pdf, the text is printed
in the right font, on the right position, but there also appears an alert
which says: "The font 'ArialMT' contains an invalid /Widths" (translated
from Dutch). Also when I restart and restart the Test.pdf again, the alert
appears everytime! Look in the assignment for what I mean.

I also have the opportunity to print in de PDFBox-library. When I do this
and I use an virtual printer, that prints/saves documents in *.pdf, the
alert won't appear and everything works well.

 

Can you please explain me what is going wrong with that doc.save(file);? Or
am I doing something wrong?

Thanks for your time,

 

Greetings from the Netherlands,

 

Richard van Heest

<<image001.jpg>>

Reply via email to