[jira] [Commented] (PDFBOX-3645) Probably not handling header read on bad PDFs

2017-01-17 Thread G. Ralph Kuntz (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-3645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15826396#comment-15826396
 ] 

G. Ralph Kuntz commented on PDFBOX-3645:


It was an observation.

> Probably not handling header read on bad PDFs
> -
>
> Key: PDFBOX-3645
> URL: https://issues.apache.org/jira/browse/PDFBOX-3645
> Project: PDFBox
>  Issue Type: Bug
>  Components: Parsing
>Affects Versions: 2.0.4
>Reporter: G. Ralph Kuntz
>Priority: Minor
>
> In COSParser.parseHeader, the code on line 1893 tries to handle PDFs where 
> the version number is split on a separate line from the "%PDF-". It assigns 
> the newly read line to `header`, detects a line that starts with a digit, 
> then breaks.
> On line 1902, the code tries again to match the header "%PDF-xxx", but will 
> not succeed in the case where the version was on a separate line, because 
> `header` will contain only the version number and not the leading `%PDF-`.



--
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] [Created] (PDFBOX-3645) Probably not handling header read on bad PDFs

2017-01-08 Thread G. Ralph Kuntz (JIRA)
G. Ralph Kuntz created PDFBOX-3645:
--

 Summary: Probably not handling header read on bad PDFs
 Key: PDFBOX-3645
 URL: https://issues.apache.org/jira/browse/PDFBOX-3645
 Project: PDFBox
  Issue Type: Bug
  Components: Parsing
Affects Versions: 2.0.4
Reporter: G. Ralph Kuntz
Priority: Minor


In COSParser.parseHeader, the code on line 1893 tries to handle PDFs where the 
version number is split on a separate line from the "%PDF-". It assigns the 
newly read line to `header`, detects a line that starts with a digit, then 
breaks.

On line 1902, the code tries again to match the header "%PDF-xxx", but will not 
succeed in the case where the version was on a separate line, because `header` 
will contain only the version number and not the leading `%PDF-`.



--
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] [Created] (PDFBOX-2396) Comment on `org.apache.pdfbox.util.Splitter.createNewDocumentIfNecessary` is out of date

2014-10-01 Thread G. Ralph Kuntz (JIRA)
G. Ralph Kuntz created PDFBOX-2396:
--

 Summary: Comment on 
`org.apache.pdfbox.util.Splitter.createNewDocumentIfNecessary` is out of date
 Key: PDFBOX-2396
 URL: https://issues.apache.org/jira/browse/PDFBOX-2396
 Project: PDFBox
  Issue Type: Bug
  Components: Utilities
Affects Versions: 2.0.0
Reporter: G. Ralph Kuntz
Priority: Minor


The header comment on the `createNewDocumentIfNecessary` method suggests that 
the method can be overridden in subclasses This is not true since the method is 
private. The example in the method will not work.

The header comment for `splitAtPage` should be updated with the example since 
it is the method will will be used to implement that example.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Comment Edited] (PDFBOX-2355) newDocuments is private in Splitter

2014-09-17 Thread G. Ralph Kuntz (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137658#comment-14137658
 ] 

G. Ralph Kuntz edited comment on PDFBOX-2355 at 9/17/14 6:04 PM:
-

> Clearly you're the first person to try to use the subclassing functionality 
> it provides

I kind of figured :-)

I used reflection to access the private field. I'll rewrite it properly once 
the new code is released.


was (Author: grkuntzmd):
> Clearly you're the first person to try to use the subclassing functionality 
> it provides

I kind of figured :-)

> newDocuments is private in Splitter
> ---
>
> Key: PDFBOX-2355
> URL: https://issues.apache.org/jira/browse/PDFBOX-2355
> Project: PDFBox
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 1.8.6
> Environment: Ubuntu 14.04, Java 8_20
>Reporter: G. Ralph Kuntz
>Assignee: John Hewson
>  Labels: pdfbox
> Fix For: 2.0.0
>
>
> The method `createNewDocument` in `Splitter` is protected, so it can be 
> overridden, but one of the things it needs to do with the new document is add 
> it to the `newDocuments` list, which is private.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (PDFBOX-2355) newDocuments is private in Splitter

2014-09-17 Thread G. Ralph Kuntz (JIRA)

[ 
https://issues.apache.org/jira/browse/PDFBOX-2355?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14137658#comment-14137658
 ] 

G. Ralph Kuntz commented on PDFBOX-2355:


> Clearly you're the first person to try to use the subclassing functionality 
> it provides

I kind of figured :-)

> newDocuments is private in Splitter
> ---
>
> Key: PDFBOX-2355
> URL: https://issues.apache.org/jira/browse/PDFBOX-2355
> Project: PDFBox
>  Issue Type: Bug
>  Components: Utilities
>Affects Versions: 1.8.6
> Environment: Ubuntu 14.04, Java 8_20
>Reporter: G. Ralph Kuntz
>Assignee: John Hewson
>  Labels: pdfbox
> Fix For: 2.0.0
>
>
> The method `createNewDocument` in `Splitter` is protected, so it can be 
> overridden, but one of the things it needs to do with the new document is add 
> it to the `newDocuments` list, which is private.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Created] (PDFBOX-2355) newDocuments is private in Splitter

2014-09-16 Thread G. Ralph Kuntz (JIRA)
G. Ralph Kuntz created PDFBOX-2355:
--

 Summary: newDocuments is private in Splitter
 Key: PDFBOX-2355
 URL: https://issues.apache.org/jira/browse/PDFBOX-2355
 Project: PDFBox
  Issue Type: Bug
  Components: Utilities
Affects Versions: 1.8.6
 Environment: Ubuntu 14.04, Java 8_20
Reporter: G. Ralph Kuntz
Priority: Critical


The method `createNewDocument` in `Splitter` is protected, so it can be 
overridden, but one of the things it needs to do with the new document is add 
it to the `newDocuments` list, which is private.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)