[ 
https://issues.apache.org/jira/browse/PDFBOX-3007?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tilman Hausherr updated PDFBOX-3007:
------------------------------------
    Affects Version/s:     (was: 2.0.0)

> 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
>            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}
> When working on that one, the example could also be copied to the 2.0 
> cookbook directory.



--
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