pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hewson <j...@jahewson.com>
Subject Re: Windows font error
Date Thu, 23 Apr 2015 06:55:52 GMT
Hi,

> On 21 Apr 2015, at 19:49, Andrew Munn <andrew@nmedia.net> wrote:
> 
> I am adding some text to a PDF and when I open it in acrobat viewer I get 
> two errors:
> 
> "An error exists on this page.  Acrobat may not display the page 
> correctly.  Please contact the person who created teh PDF document to 
> correct the problem"
> 
> and a couple secs later:
> 
> "Cannot find or create the font 'AAAAVG+ArielMT'.  Some character may not 
> display or print correctly."
> 
> And the characters are replaced with little round dots.
> 
> I am running the latest 2.0.0 snapshot.  Code is:
> 
> File f1 = new File("C:\\windows\\fonts\\arial.ttf");
> font = PDType0Font.load(document, f1);
> PDPageContentStream cos = new PDPageContentStream(document, p, true, true);
> cos.showText("my text");

Can you include the complete, working code which you're using, e.g. where did "p" come from?
It looks like you're trying to append content to an existing page, is that correct?

-- John

> Other fonts either do the same thing (lsans.ttf,times.ttf) or give the 
> error about the missing glyph.  If I render that page as a PNG and save it 
> the font appears correctly.
> 
> Thanks
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
> For additional commands, e-mail: users-help@pdfbox.apache.org
> 

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


Mime
View raw message