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

John Hewson edited comment on PDFBOX-1396 at 10/11/14 1:07 AM:
---------------------------------------------------------------

> Currently parser gets that information after stream was read

No, it doesn't because PDFs are not sequential files, they are random-access. 
Some parsers (such as the old PDFBox parser) try to read the file sequentially 
- but this is their problem.


was (Author: jahewson):
No, it doesn't because PDFs are not sequential files, they are random-access.

> The Length of stream should be written directly, not by reference
> -----------------------------------------------------------------
>
>                 Key: PDFBOX-1396
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-1396
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Writing
>    Affects Versions: 1.7.1
>            Reporter: Juraj Lonc
>            Priority: Minor
>         Attachments: PDFBOX-1396_COSStream.patch, PDFBOX-1396_COSWriter.patch
>
>
> The Length value of stream is written by reference:
> "2 0 obj
> <<
> /Length 8 0 R
> /Subtype /XML
> /Type /Metadata
> >>
> stream"
> but it is always better to tell parser the length of stream BEFORE the stream 
> comes to parser. Currently parser gets that information after stream was 
> read, which is sort of useless...
> Proper structure should look like this:
> "2 0 obj
> <<
> /Length 3576
> /Subtype /XML
> /Type /Metadata
> >>
> stream"



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

Reply via email to