+1 for this issue no longer being relevant -- John
> On 26 Feb 2014, at 15:15, "Tilman Hausherr (JIRA)" <[email protected]> wrote: > > > [ > https://issues.apache.org/jira/browse/PDFBOX-567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13913702#comment-13913702 > ] > > Tilman Hausherr commented on PDFBOX-567: > ---------------------------------------- > > Is this issue still relevant? load() and loadNonSeq() have a parameter which > can be filled with a real file or with a memory buffer. > >> PDDocument always creates a real file. Added a constructor option to allow >> for the use of a memory buffer rather than a file. >> ----------------------------------------------------------------------------------------------------------------------------- >> >> Key: PDFBOX-567 >> URL: https://issues.apache.org/jira/browse/PDFBOX-567 >> Project: PDFBox >> Issue Type: Improvement >> Components: PDModel >> Reporter: Yonas Jongkind >> Attachments: PDDocument.java, PDDocument.java.diff >> >> >> Added another constructor that allows for the use of a memory buffer >> instead. Better for my usage and less clutter in the temp directory by far. >> $ diff -w >> 'C:/Users/yonasj/AppData/Local/Temp/PDDocument.java-revBASE.svn000.tmp.java' >> 'C:/dev/pdfbox/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/PDDocument.java' >> 48a49 >>> import org.apache.pdfbox.io.RandomAccessBuffer; >> 120a122,134 >>> this(false); >>> } >>> /** >>> * Constructor, creates a new PDF Document with no pages. You need to >>> add >>> * at least one page for the document to be valid. >>> * @param memoryScratchFile When true the temp pdf is stored in memory, >>> when false as a real file. >>> * @throws IOException If there is an error creating this document. >>> */ >>> public PDDocument(boolean memoryScratchFile) throws IOException >>> { >>> if (memoryScratchFile) { >>> document = new COSDocument(new RandomAccessBuffer()); >>> } else { >> 121a136 >>> } >> 305c320 >> < PDStream dest = new PDStream( new COSStream( src.getStream(), >> document.getScratchFile() ) ); >> --- >>> PDStream dest = new PDStream( new COSStream( >>> importedPage.getContents().getStream(), document.getScratchFile() ) ); > > > > -- > This message was sent by Atlassian JIRA > (v6.1.5#6160)
