You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (JIRA)" <ji...@apache.org> on 2015/10/06 18:44:26 UTC
[jira] [Created] (PDFBOX-3007) Preflight cookbook example is
inefficient
Tilman Hausherr created PDFBOX-3007:
---------------------------------------
Summary: Preflight cookbook example is inefficient
Key: PDFBOX-3007
URL: https://issues.apache.org/jira/browse/PDFBOX-3007
Project: PDFBox
Issue Type: Bug
Components: Documentation
Affects Versions: 1.8.10, 1.8.11, 2.0.0
Reporter: Tilman Hausherr
Fix For: 1.8.11, 2.0.0
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: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org