pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brzrk One <brz...@gmail.com>
Subject Re: Merge documents with streaming?
Date Fri, 05 Jun 2015 15:33:04 GMT
Nothing (:*mostly* nothing:) is impossible, it's just a matter of how much
programming it will require!

I've used perl scripts to check/regenerate the xref table after I used a
text editor to twiddle objects... on one level, the PDF file is just text...

In the simple case, one could write a script that iterated over the
files, renumbering all the object ids, replacing the
references, concatenating all the pieces, and building a combined xref
table at the end. I think the output could be streamed, and the files would
not need to be kept in memory.

Of course, there are those *non*-simple cases which seem to comprise the
bulk of PDF examples...

On Fri, Jun 5, 2015 at 11:14 AM, Morris, Mark <Mark.Morris@experian.com>

> Since I’ve gotten no response, is it safe to assume this is something
> that’s architecturally impossible?
> Thanks,
> Mark
> > On Jun 3, 2015, at 11:12 AM, Morris, Mark <Mark.Morris@experian.com>
> wrote:
> >
> > Hello! I’m generating multiple pdf documents using a commercial tool,
> then merging them into one document to deliver to the user. This all works,
> but I’m trying to reduce the memory footprint, and the current approach
> builds everything in memory.
> >
> > So I wondered if this is possible: Create a document that streams to a
> file, then keep concatenating more pdf documents to the end, without
> needing to have the whole thing in memory at any time. I’ve looked through
> the API and didn’t see a way, but it’s new to me so I’m sure I could have
> missed something.
> >
> > Thanks for any assistance!
> >
> > Regards,
> > Mark

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message