You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@pdfbox.apache.org by "Tory S. Anderson" <we...@toryanderson.com> on 2015/12/29 00:18:57 UTC

Adding outline or bookmarks to merge-job

I'm working on a Clojure web app with the following function flow:

User uploaded docx -> mongodb -> docx4j converts each to PDF -> 
PDFBox Merger Utility merges all to a single PDF.

So far so good; everything is working. However, I need to be able 
to add bookmarks (outline nodes) to the produced PDF, preferably 
as I'm merging them. I'm not sure how best to do this, and whether 
the approach should be

1. Add outline to the individual PDFs BEFORE the merge (do 
outlines survive merges?)
2. Somehow add contents at the correct places during/after the 
merge.

Any suggestions would be useful, as I'm new to PDFBox.

- Tory

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org


Re: Adding outline or bookmarks to merge-job

Posted by Tilman Hausherr <TH...@t-online.de>.
Am 29.12.2015 um 00:18 schrieb Tory S. Anderson:
> I'm working on a Clojure web app with the following function flow:
>
> User uploaded docx -> mongodb -> docx4j converts each to PDF -> PDFBox 
> Merger Utility merges all to a single PDF.
>
> So far so good; everything is working. However, I need to be able to 
> add bookmarks (outline nodes) to the produced PDF, preferably as I'm 
> merging them. I'm not sure how best to do this, and whether the 
> approach should be
>
> 1. Add outline to the individual PDFs BEFORE the merge (do outlines 
> survive merges?)
> 2. Somehow add contents at the correct places during/after the merge.

Both is possible. Yes, they do survive merge. Not sure about 1.8.10, but 
sure about 2.0.

Re how create bookmarks, look at the examples for CreateBookmarks.java.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: users-help@pdfbox.apache.org