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

ASF subversion and git services commented on PDFBOX-3007:
---------------------------------------------------------

Commit 1d81320af6b673e79df1fe5321b3007faf6619d6 in pdfbox-docs's branch 
refs/heads/master from [~lehmi]
[ https://git-wip-us.apache.org/repos/asf?p=pdfbox-docs.git;h=1d81320 ]

PDFBOX-3007: adjust example as proposed by Tilman Hausherr


> Preflight cookbook example is inefficient
> -----------------------------------------
>
>                 Key: PDFBOX-3007
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-3007
>             Project: PDFBox
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.8.10, 1.8.11
>            Reporter: Tilman Hausherr
>            Assignee: Andreas Lehmkühler
>            Priority: Minor
>             Fix For: 1.8.11
>
>
> The example shown in
> http://pdfbox.apache.org/1.8/cookbook/pdfavalidation.html
> passes a DataSource object. This results in the creation of a temporary file. 
> The constructor with the DataSource makes only sense when working with URLs. 
> (And that only if http is cached, because preflight does an openStream() for 
> each PDF stream!)
> It would be better to replace
> {code}
> FileDataSource fd = new FileDataSource(args[0]);
> PreflightParser parser = new PreflightParser(fd);
> {code}
> with
> {code}
> PreflightParser parser = new PreflightParser(args[0]);
> {code}
> Edit: removed 2.0, as the example may have to change after solving 
> PDFBOX-3007.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to