[jira] [Commented] (PDFBOX-3510) "java.io.IOException: Stream closed" while parsing a page without contents
[ https://issues.apache.org/jira/browse/PDFBOX-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517366#comment-15517366 ] Tilman Hausherr commented on PDFBOX-3510: - I'm returning an empty stream now. This is better because getContentStreams() returns an empty list, and it's a good practice not to return null anyway. A snapshot build will be available soon here https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-app/2.0.4-SNAPSHOT/ > "java.io.IOException: Stream closed" while parsing a page without contents > -- > > Key: PDFBOX-3510 > URL: https://issues.apache.org/jira/browse/PDFBOX-3510 > Project: PDFBox > Issue Type: Bug > Components: PDModel >Affects Versions: 2.0.3 > Environment: $ git status -uno > On branch trunk > Your branch is behind 'origin/trunk' by 61 commits, and can be fast-forwarded. >Reporter: Esteban Nicolas Ruiz >Priority: Minor > Labels: newbie > > I get the following exception while parsing page number 4 from > http://openil.sourceforge.net/docs/DevIL%20Manual.pdf > with PDFStreamParser.parse(). The dictionary for page 4 doesn't contain a > "/Contents" entry. > java.io.IOException: Stream closed > Stream closed > java.io.IOException: Stream closed > at java.io.PushbackInputStream.ensureOpen(Unknown Source) > at java.io.PushbackInputStream.read(Unknown Source) > at > org.apache.pdfbox.pdfparser.InputStreamSource.read(InputStreamSource.java:46) > at > org.apache.pdfbox.pdfparser.BaseParser.skipSpaces(BaseParser.java:1275) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:142) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:115) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3510) "java.io.IOException: Stream closed" while parsing a page without contents
[ https://issues.apache.org/jira/browse/PDFBOX-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517357#comment-15517357 ] ASF subversion and git services commented on PDFBOX-3510: - Commit 1762083 from [~tilman] in branch 'pdfbox/branches/2.0' [ https://svn.apache.org/r1762083 ] PDFBOX-3510: return empty input stream if no content stream in a page > "java.io.IOException: Stream closed" while parsing a page without contents > -- > > Key: PDFBOX-3510 > URL: https://issues.apache.org/jira/browse/PDFBOX-3510 > Project: PDFBox > Issue Type: Bug > Components: PDModel >Affects Versions: 2.0.3 > Environment: $ git status -uno > On branch trunk > Your branch is behind 'origin/trunk' by 61 commits, and can be fast-forwarded. >Reporter: Esteban Nicolas Ruiz >Priority: Minor > Labels: newbie > > I get the following exception while parsing page number 4 from > http://openil.sourceforge.net/docs/DevIL%20Manual.pdf > with PDFStreamParser.parse(). The dictionary for page 4 doesn't contain a > "/Contents" entry. > java.io.IOException: Stream closed > Stream closed > java.io.IOException: Stream closed > at java.io.PushbackInputStream.ensureOpen(Unknown Source) > at java.io.PushbackInputStream.read(Unknown Source) > at > org.apache.pdfbox.pdfparser.InputStreamSource.read(InputStreamSource.java:46) > at > org.apache.pdfbox.pdfparser.BaseParser.skipSpaces(BaseParser.java:1275) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:142) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:115) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3510) "java.io.IOException: Stream closed" while parsing a page without contents
[ https://issues.apache.org/jira/browse/PDFBOX-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517358#comment-15517358 ] ASF subversion and git services commented on PDFBOX-3510: - Commit 1762084 from [~tilman] in branch 'pdfbox/trunk' [ https://svn.apache.org/r1762084 ] PDFBOX-3510: return empty input stream if no content stream in a page > "java.io.IOException: Stream closed" while parsing a page without contents > -- > > Key: PDFBOX-3510 > URL: https://issues.apache.org/jira/browse/PDFBOX-3510 > Project: PDFBox > Issue Type: Bug > Components: PDModel >Affects Versions: 2.0.3 > Environment: $ git status -uno > On branch trunk > Your branch is behind 'origin/trunk' by 61 commits, and can be fast-forwarded. >Reporter: Esteban Nicolas Ruiz >Priority: Minor > Labels: newbie > > I get the following exception while parsing page number 4 from > http://openil.sourceforge.net/docs/DevIL%20Manual.pdf > with PDFStreamParser.parse(). The dictionary for page 4 doesn't contain a > "/Contents" entry. > java.io.IOException: Stream closed > Stream closed > java.io.IOException: Stream closed > at java.io.PushbackInputStream.ensureOpen(Unknown Source) > at java.io.PushbackInputStream.read(Unknown Source) > at > org.apache.pdfbox.pdfparser.InputStreamSource.read(InputStreamSource.java:46) > at > org.apache.pdfbox.pdfparser.BaseParser.skipSpaces(BaseParser.java:1275) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:142) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:115) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3510) "java.io.IOException: Stream closed" while parsing a page without contents
[ https://issues.apache.org/jira/browse/PDFBOX-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15517222#comment-15517222 ] Esteban Nicolas Ruiz commented on PDFBOX-3510: -- I'm sorry, I though that this would happen with almost any utility, but it's doesn't. Sample code: public class EmptyPageBugTest { public static void main(String[] args) throws IOException { PDDocument doc = PDDocument.load(new File(args[0])); int count=1; for (PDPage pdPage : doc.getPages()) { System.out.println("Page: "+count); PDFStreamParser parser = new PDFStreamParser(pdPage); parser.parse(); parser.getTokens(); count+=1; } } } I'm running: java -classpath "pdfbox-2.0.3.jar;commons-logging-1.2.jar;." emptypagebugtest.EmptyPageBugTest "DevIL Manual.pdf" Page: 1 Page: 2 Page: 3 Page: 4 Exception in thread "main" java.io.IOException: Stream closed at java.io.PushbackInputStream.ensureOpen(Unknown Source) at java.io.PushbackInputStream.read(Unknown Source) at org.apache.pdfbox.pdfparser.InputStreamSource.read(InputStreamSource.java:46) at org.apache.pdfbox.pdfparser.BaseParser.skipSpaces(BaseParser.java:1244) at org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:142) at org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:115) at emptypagebugtest.EmptyPageBugTest.main(EmptyPageBugTest.java:29) Environment information: Windows 10 environment. Java version: java -version java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) Client VM (build 25.102-b14, mixed mode, sharing) > "java.io.IOException: Stream closed" while parsing a page without contents > -- > > Key: PDFBOX-3510 > URL: https://issues.apache.org/jira/browse/PDFBOX-3510 > Project: PDFBox > Issue Type: Bug > Components: PDModel > Environment: $ git status -uno > On branch trunk > Your branch is behind 'origin/trunk' by 61 commits, and can be fast-forwarded. >Reporter: Esteban Nicolas Ruiz >Priority: Minor > Labels: newbie > > I get the following exception while parsing page number 4 from > http://openil.sourceforge.net/docs/DevIL%20Manual.pdf > with PDFStreamParser.parse(). The dictionary for page 4 doesn't contain a > "/Contents" entry. > java.io.IOException: Stream closed > Stream closed > java.io.IOException: Stream closed > at java.io.PushbackInputStream.ensureOpen(Unknown Source) > at java.io.PushbackInputStream.read(Unknown Source) > at > org.apache.pdfbox.pdfparser.InputStreamSource.read(InputStreamSource.java:46) > at > org.apache.pdfbox.pdfparser.BaseParser.skipSpaces(BaseParser.java:1275) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:142) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:115) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-3510) "java.io.IOException: Stream closed" while parsing a page without contents
[ https://issues.apache.org/jira/browse/PDFBOX-3510?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15514353#comment-15514353 ] Tilman Hausherr commented on PDFBOX-3510: - What version are you using, and what is your code, or what utility did you run? > "java.io.IOException: Stream closed" while parsing a page without contents > -- > > Key: PDFBOX-3510 > URL: https://issues.apache.org/jira/browse/PDFBOX-3510 > Project: PDFBox > Issue Type: Bug > Components: PDModel > Environment: $ git status -uno > On branch trunk > Your branch is behind 'origin/trunk' by 61 commits, and can be fast-forwarded. >Reporter: Esteban Nicolas Ruiz >Priority: Minor > Labels: newbie > > I get the following exception while parsing page number 4 from > http://openil.sourceforge.net/docs/DevIL%20Manual.pdf > with PDFStreamParser.parse(). The dictionary for page 4 doesn't contain a > "/Contents" entry. > java.io.IOException: Stream closed > Stream closed > java.io.IOException: Stream closed > at java.io.PushbackInputStream.ensureOpen(Unknown Source) > at java.io.PushbackInputStream.read(Unknown Source) > at > org.apache.pdfbox.pdfparser.InputStreamSource.read(InputStreamSource.java:46) > at > org.apache.pdfbox.pdfparser.BaseParser.skipSpaces(BaseParser.java:1275) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parseNextToken(PDFStreamParser.java:142) > at > org.apache.pdfbox.pdfparser.PDFStreamParser.parse(PDFStreamParser.java:115) -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org