Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SEVERE: Can't read the embedded Type1 font NAAZAV+CairoFont-0-0 #8

Open
melisabok opened this issue Jan 28, 2017 · 5 comments
Open

Comments

@melisabok
Copy link
Owner

SEVERE: Can't read the embedded Type1 font NAAZAV+CairoFont-0-0
java.io.IOException: Found Token[kind=NAME, text=bind] but expected ND
	at org.apache.fontbox.type1.Type1Parser.readDef(Type1Parser.java:719)
	at org.apache.fontbox.type1.Type1Parser.readDictValue(Type1Parser.java:350)
	at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:528)
	at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
	at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
	at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:262)
	at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
	at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
	at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:829)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:486)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:460)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
	at technology.tabula.ObjectExtractor.extractPage(ObjectExtractor.java:27)
	at technology.tabula.PageIterator.next(PageIterator.java:29)
	at technology.tabula.ObjectExtractor.extract(ObjectExtractor.java:59)
	at technology.tabula.UtilsForTesting.getPage(UtilsForTesting.java:30)
	at technology.tabula.TestSpreadsheetExtractor.testExtractTableWithExternallyDefinedRulings(TestSpreadsheetExtractor.java:468)
	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:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
@melisabok
Copy link
Owner Author

SEVERE: Can't read the embedded Type1 font BJGGWD+CairoFont-1-0

@melisabok
Copy link
Owner Author

SEVERE: Can't read the embedded Type1 font SDETRK+CairoFont-2-0

@jazzido
Copy link

jazzido commented Mar 3, 2017

Do you know which file triggers this? There's a bug in PDFBOX that might be relevant

@melisabok
Copy link
Owner Author

This is the only test that is triggering the errors:
TestSpreadsheetExtractor.testExtractTableWithExternallyDefinedRulings

The file is: src/test/resources/technology/tabula/us-007.pdf

But the test doesn't fail, it passes. And I completed the test adding asserts to all the elements of the table.

I also upgraded pdfbox to the last snapshot and the errors are still triggering. It seems to be another parse error:

java.io.IOException: Found Token[kind=NAME, text=bind] but expected ND

The only issue similar to this that I found is PDFBOX-2518.

@melisabok
Copy link
Owner Author

Theses are the three stacktraces:

SEVERE: Can't read the embedded Type1 font NAAZAV+CairoFont-0-0
java.io.IOException: Found Token[kind=NAME, text=bind] but expected ND
	at org.apache.fontbox.type1.Type1Parser.readDef(Type1Parser.java:728)
	at org.apache.fontbox.type1.Type1Parser.readDictValue(Type1Parser.java:350)
	at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:537)
	at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
	at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
	at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:262)
	at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
	at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
	at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:838)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
	at technology.tabula.ObjectExtractor.extractPage(ObjectExtractor.java:27)
	at technology.tabula.PageIterator.next(PageIterator.java:29)
	at technology.tabula.ObjectExtractor.extract(ObjectExtractor.java:59)
	at technology.tabula.UtilsForTesting.getPage(UtilsForTesting.java:30)
	at technology.tabula.TestSpreadsheetExtractor.testExtractTableWithExternallyDefinedRulings(TestSpreadsheetExtractor.java:372)
	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:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Mar 04, 2017 12:17:57 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNING: Using fallback font ArialMT for NAAZAV+CairoFont-0-0
Mar 04, 2017 12:17:57 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
SEVERE: Can't read the embedded Type1 font BJGGWD+CairoFont-1-0
java.io.IOException: Found Token[kind=NAME, text=bind] but expected ND
	at org.apache.fontbox.type1.Type1Parser.readDef(Type1Parser.java:728)
	at org.apache.fontbox.type1.Type1Parser.readDictValue(Type1Parser.java:350)
	at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:537)
	at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
	at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
	at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:262)
	at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
	at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
	at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:838)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
	at technology.tabula.ObjectExtractor.extractPage(ObjectExtractor.java:27)
	at technology.tabula.PageIterator.next(PageIterator.java:29)
	at technology.tabula.ObjectExtractor.extract(ObjectExtractor.java:59)
	at technology.tabula.UtilsForTesting.getPage(UtilsForTesting.java:30)
	at technology.tabula.TestSpreadsheetExtractor.testExtractTableWithExternallyDefinedRulings(TestSpreadsheetExtractor.java:372)
	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:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

Mar 04, 2017 12:17:57 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
WARNING: Using fallback font ArialMT for BJGGWD+CairoFont-1-0
Mar 04, 2017 12:17:57 PM org.apache.pdfbox.pdmodel.font.PDType1Font <init>
SEVERE: Can't read the embedded Type1 font SDETRK+CairoFont-2-0
java.io.IOException: Found Token[kind=NAME, text=bind] but expected ND
	at org.apache.fontbox.type1.Type1Parser.readDef(Type1Parser.java:728)
	at org.apache.fontbox.type1.Type1Parser.readDictValue(Type1Parser.java:350)
	at org.apache.fontbox.type1.Type1Parser.parseBinary(Type1Parser.java:537)
	at org.apache.fontbox.type1.Type1Parser.parse(Type1Parser.java:64)
	at org.apache.fontbox.type1.Type1Font.createWithSegments(Type1Font.java:85)
	at org.apache.pdfbox.pdmodel.font.PDType1Font.<init>(PDType1Font.java:262)
	at org.apache.pdfbox.pdmodel.font.PDFontFactory.createFont(PDFontFactory.java:62)
	at org.apache.pdfbox.pdmodel.PDResources.getFont(PDResources.java:143)
	at org.apache.pdfbox.contentstream.operator.text.SetFontAndSize.process(SetFontAndSize.java:60)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processOperator(PDFStreamEngine.java:838)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStreamOperators(PDFStreamEngine.java:495)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processStream(PDFStreamEngine.java:469)
	at org.apache.pdfbox.contentstream.PDFStreamEngine.processPage(PDFStreamEngine.java:150)
	at technology.tabula.ObjectExtractor.extractPage(ObjectExtractor.java:27)
	at technology.tabula.PageIterator.next(PageIterator.java:29)
	at technology.tabula.ObjectExtractor.extract(ObjectExtractor.java:59)
	at technology.tabula.UtilsForTesting.getPage(UtilsForTesting.java:30)
	at technology.tabula.TestSpreadsheetExtractor.testExtractTableWithExternallyDefinedRulings(TestSpreadsheetExtractor.java:372)
	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:497)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)

could be related with some Font in my machine?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants