[ https://issues.apache.org/jira/browse/PDFBOX-2544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14275546#comment-14275546 ]
Tilman Hausherr commented on PDFBOX-2544: ----------------------------------------- [~majo] Any news on this? [~lehmi] the build.xml file of pdfbox has an "1.8.7" in it. > Building pdfbox 1.8.6 or 1.8.7 using IKVM > ----------------------------------------- > > Key: PDFBOX-2544 > URL: https://issues.apache.org/jira/browse/PDFBOX-2544 > Project: PDFBox > Issue Type: Bug > Components: .NET, FontBox, Text extraction > Affects Versions: 1.8.6, 1.8.7 > Environment: Windows 8.1 Pro, IKVM 8.0.5415 or IKVM 7.2.4630.5, JDK 7 > (or 8) 64 bit, .NET 4.0 > Reporter: Marian Mar > Labels: .NET, IKVM, build, c# > > I tried to build pdfbox 1.8.6 (and 1.8.7) using IKVM according to > [this|http://stackoverflow.com/questions/8441991/how-to-build-pdfbox-for-net > instructions] instructions. Everything went fine, but If I tested this code > below on some pdf (e.g. > [PDF|http://www.energy.umich.edu/sites/default/files/pdf-sample.pdf]) I get > exception on line with writeText. If I tested the same with pdfbox 1.8.5 I > had no problems. > {code} > class MyPDFTextStripper : PDFTextStripper { > ... > java.io.StringWriter outputStream = new java.io.StringWriter(); > writeText(document, outputStream); // Exception > ... > } > {code} > {code} > 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. > {code} > {code} > 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) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)