You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While I'm using pdf2dom library to convert a PDF file into a web form, I get a stack trace printed out on the standard error, and I can't manage to remove it from the standard error to have it my logs instead. It seems to be because GlyphTable.java has a ex.printStackTrace() on line 77, instead of using the log.error() mechanism.
Is it possible to change this to remove any output to the standard error ?
The stack trace I get is the following:
org.mabb.fontverter.io.DataTypeSerializerException: org.mabb.fontverter.io.DataTypeSerializerException: org.mabb.fontverter.opentype.TtfGlyph
at org.mabb.fontverter.io.DataTypeBindingDeserializer.deserialize(DataTypeBindingDeserializer.java:47)
at org.mabb.fontverter.opentype.TtfGlyph.parse(TtfGlyph.java:80)
at org.mabb.fontverter.opentype.GlyphTable.readData(GlyphTable.java:74)
at org.mabb.fontverter.opentype.OpenTypeParser.readTableDataEntries(OpenTypeParser.java:75)
at org.mabb.fontverter.opentype.OpenTypeParser.parse(OpenTypeParser.java:47)
at org.mabb.fontverter.opentype.OpenTypeParser.parse(OpenTypeParser.java:35)
at org.mabb.fontverter.converter.PsType0ToOpenTypeConverter.getOtfFromDescendantFont(PsType0ToOpenTypeConverter.java:64)
at org.mabb.fontverter.converter.PsType0ToOpenTypeConverter.convert(PsType0ToOpenTypeConverter.java:43)
at org.mabb.fontverter.pdf.PdfFontExtractor.convertType0FontToOpenType(PdfFontExtractor.java:215)
at org.fit.pdfdom.FontTable$Entry.loadType0TtfDescendantFont(FontTable.java:192)
at org.fit.pdfdom.FontTable$Entry.getData(FontTable.java:145)
at org.fit.pdfdom.FontTable$Entry.isEntryValid(FontTable.java:161)
at org.fit.pdfdom.FontTable.addEntry(FontTable.java:48)
at org.fit.pdfdom.PDFBoxTree.processFontResources(PDFBoxTree.java:385)
at org.fit.pdfdom.PDFBoxTree.updateFontTable(PDFBoxTree.java:361)
at org.fit.pdfdom.PDFBoxTree.processPage(PDFBoxTree.java:206)
at org.apache.pdfbox.text.PDFTextStripper.processPages(PDFTextStripper.java:319)
at org.apache.pdfbox.text.PDFTextStripper.writeText(PDFTextStripper.java:266)
at xxx.pdf2formly.PDFFormlyTree.writeText(PDFFormlyTree.java:112)
at xxx.pdf2formly.PDFFormlyTreeTest.convertExistingForm(PDFFormlyTreeTest.java:77)
at xxx.pdf2formly.PDFFormlyTreeTest.convertForm1(PDFFormlyTreeTest.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:383)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:344)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:125)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:417)
Caused by: org.mabb.fontverter.io.DataTypeSerializerException: org.mabb.fontverter.opentype.TtfGlyph
at org.mabb.fontverter.io.DataTypeBindingDeserializer.deserialize(DataTypeBindingDeserializer.java:71)
at org.mabb.fontverter.io.DataTypeBindingDeserializer.deserialize(DataTypeBindingDeserializer.java:45)
... 46 more
Caused by: org.mabb.fontverter.io.DataTypeSerializerException: int org.mabb.fontverter.opentype.TtfGlyph.instructionLength org.mabb.fontverter.opentype.TtfGlyph
at org.mabb.fontverter.io.DataTypeBindingDeserializer.deserialize(DataTypeBindingDeserializer.java:65)
... 47 more
Caused by: java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at org.mabb.fontverter.io.DataTypeBindingDeserializer.readSingleValue(DataTypeBindingDeserializer.java:105)
at org.mabb.fontverter.io.DataTypeBindingDeserializer.deserializeProperty(DataTypeBindingDeserializer.java:92)
at org.mabb.fontverter.io.DataTypeBindingDeserializer.deserialize(DataTypeBindingDeserializer.java:63)
... 47 more
The text was updated successfully, but these errors were encountered:
@SYugel I haven't made any modification to the code, because I don't know if there's a proper fix to prevent the original problem (the one throwing an exception).
But if you're just interested in removing the stack trace from the standard error, simply replacing the ex.printStackTrace(); by something like log.error("Error parsing glyph", ex); should work.
Hi.
While I'm using pdf2dom library to convert a PDF file into a web form, I get a stack trace printed out on the standard error, and I can't manage to remove it from the standard error to have it my logs instead. It seems to be because GlyphTable.java has a ex.printStackTrace() on line 77, instead of using the log.error() mechanism.
Is it possible to change this to remove any output to the standard error ?
The stack trace I get is the following:
The text was updated successfully, but these errors were encountered: