Details
Description
I tried to build pdfbox 1.8.6 (and 1.8.7) using IKVM according to this instructions. Everything went fine, but If I tested this code below on some pdf (e.g. PDF) I get exception on line with writeText. If I tested the same with pdfbox 1.8.5 I had no problems.
class MyPDFTextStripper : PDFTextStripper { ... java.io.StringWriter outputStream = new java.io.StringWriter(); writeText(document, outputStream); // Exception ... }
Exception: An unhandled exception of type 'System.TypeInitializationException' occurred in pdfbox-1.8.7.dll Additional information: The type initializer for 'org.apache.fontbox.cmap.CMap' threw an exception.
Stack trace: at org.apache.fontbox.cmap.CMap..ctor() at org.apache.fontbox.cmap.CMapParser.parse(String resourceRoot, InputStream input) at org.apache.pdfbox.pdmodel.font.PDFont.parseCmap(String cmapRoot, InputStream cmapStream) at org.apache.pdfbox.pdmodel.font.PDSimpleFont.extractToUnicodeEncoding() at org.apache.pdfbox.pdmodel.font.PDSimpleFont.determineEncoding() at org.apache.pdfbox.pdmodel.font.PDType1Font.determineEncoding() at org.apache.pdfbox.pdmodel.font.PDFont..ctor(COSDictionary fontDictionary) at org.apache.pdfbox.pdmodel.font.PDSimpleFont..ctor(COSDictionary fontDictionary) at org.apache.pdfbox.pdmodel.font.PDType1Font..ctor(COSDictionary fontDictionary) at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(COSDictionary dic) at org.apache.pdfbox.pdmodel.PDResources.getFonts() at org.apache.pdfbox.util.PDFStreamEngine.getFonts() at org.apache.pdfbox.util.operator.SetTextFont.process(PDFOperator operator, List arguments) at org.apache.pdfbox.util.PDFStreamEngine.processOperator(PDFOperator operator, List arguments) at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(COSStream ) at org.apache.pdfbox.util.PDFStreamEngine.processSubStream(PDPage aPage, PDResources resources, COSStream cosStream) at org.apache.pdfbox.util.PDFStreamEngine.processStream(PDPage aPage, PDResources resources, COSStream cosStream) at org.apache.pdfbox.util.PDFTextStripper.processPage(PDPage page, COSStream content) at org.apache.pdfbox.util.PDFTextStripper.processPages(List pages) at org.apache.pdfbox.util.PDFTextStripper.writeText(PDDocument doc, Writer outputStream)
Attachments
Issue Links
- is duplicated by
-
PDFBOX-2705 Add IKVM support to Maven build
- Closed