What PDFBox version are you using? Hopefully 2.0
Which line and which character brings this error?
Try also using the LiberationSans-Regular file from the source code
download.
Tilman
Am 06.05.2016 um 16:35 schrieb Macamba:
Ah, now I see it. Do not use the download link as in "Links to HEAD: (view) (download)
(annotate)". You'll get gibberish, but if you use the view you'll get the "English
русский язык Tiếng Việt" text.
My venerable VI clone on Windows cannot work with that text.
If I run the right code in Eclipse, however, I get:
Exception in thread "main" java.lang.IllegalArgumentException: No glyph for
U+1EBF in font LiberationSans-Regular
at
org.apache.pdfbox.pdmodel.font.PDCIDFontType2.encode(PDCIDFontType2.java:411)
at
org.apache.pdfbox.pdmodel.font.PDType0Font.encode(PDType0Font.java:351)
at org.apache.pdfbox.pdmodel.font.PDFont.encode(PDFont.java:286)
at
org.apache.pdfbox.pdmodel.PDPageContentStream.showText(PDPageContentStream.java:411)
at
org.apache.pdfbox.examples.pdmodel.EmbeddedFonts.main(EmbeddedFonts.java:53)
Thanks for the input.
-----Original Message-----
From: Tilman Hausherr [mailto:[email protected]]
Sent: vrijdag 6 mei 2016 14:26
To: [email protected]
Subject: Re: unmappable character for encoding Cp1252
Am 06.05.2016 um 14:21 schrieb Macamba:
Hi all,
Is it me or is the EmbeddedFonts example in the pdmodel directory of the pdfbox
examples on SVN Apache not working?
I get The following output:
src\org\apache\pdfbox\examples\pdmodel\EmbeddedFonts.java:63: error: unmappable
character for encoding Cp1252
stream.showText("English ÐÇÐâÐ?Ð?ð║ð©ð╣ Ð?ðÀÐïð║ Tiß║┐ng Viß╗çt");
^
src\org\apache\pdfbox\examples\pdmodel\EmbeddedFonts.java:63: error: unmappable
character for encoding Cp1252
stream.showText("English ÐÇÐâÐ?Ð?ð║ð©ð╣ Ð?ðÀÐïð║ Tiß║┐ng Viß╗çt");
^
src\org\apache\pdfbox\examples\pdmodel\EmbeddedFonts.java:63: error: unmappable
character for encoding Cp1252
stream.showText("English ÐÇÐâÐ?Ð?ð║ð©ð╣ Ð?ðÀÐïð║ Tiß║┐ng Viß╗çt");
^
3 errors
Error: Could not find or load main class
src.org.apche.pdfbox.examples.pdmodel.EmbeddedFonts
Location:
https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFonts.java?view=log
Line 63 in the code reads:
stream.showText("English руÑÑкий Ñзык Tiếng Việt");
Should that not be human readable text?
Yes... it is human readable text with this link:
https://svn.apache.org/viewvc/pdfbox/trunk/examples/src/main/java/org/apache/pdfbox/examples/pdmodel/EmbeddedFonts.java?view=markup
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]