I'm a beginner in Java programming and also here at stackoverflow. Currently I'm trying to print PDF-Files with the com.sun.pdfview library. It works very often, but with some documents I get the following Error:
java.lang.IllegalArgumentException: Unknown encoding: SymbolSetEncoding
at com.sun.pdfview.font.PDFFontEncoding.getBaseEncoding(PDFFontEncoding.java:199)
at com.sun.pdfview.font.PDFFontEncoding.<init>(PDFFontEncoding.java:78)
at com.sun.pdfview.font.PDFFont.getFont(PDFFont.java:133)
at com.sun.pdfview.PDFParser.getFontFrom(PDFParser.java:1166)
at com.sun.pdfview.PDFParser.iterate(PDFParser.java:719)
at com.sun.pdfview.BaseWatchable.run(BaseWatchable.java:101)
at java.lang.Thread.run(Thread.java:722)
I should inform you, that these documents are written in a caucasian language (georgian) and the typical font is Sylfaen.
the error occurs in the following code:
PDFRenderer pgs = new PDFRenderer(page, g2, imgbounds, null,null);
try {
page.waitForFinish();
pgs.run();
I believe that these documents need to use a different encoding or I need to specify the font, unfortunately I couldn't find an ankle where I can take a look or change setting.
Thank you
Martin