Site iconJava PDF Blog

How to copy bookmarks from one PDF to another

How to copy bookmarks from one PDF to another

JPedal already has the ability to read bookmarks from PDF files so now you can chain this functionality with our OutlineWriter to copy bookmarks from one PDF to another.

How to Copy bookmarks using Java

  1. Add JPedal to your class or module path. (download the trial jar).
  2. Next, read the outline into a Document object:

  3. Then, write the Document object to the destination PDF:
  4. Copy bookmarks using the command line
    JPedal also provides a convenient command line method to copy bookmarks between PDF files:

Working with PDFs can be troublesome. We have a list of different articles for you to understand the PDF format and maximise its functionality.