0

Is there a way to take one PDF file with lets say 4 pages, and convert it to 4 PDF files (with a PHP library perhaps, as that's what I'm using for my backend).

So each PDF file(4) would correspond to a page in the original file.

The reason I want to do this is to enable commenting per page in the PDF.

pbaba
  • 9
  • 5
  • What have tried so far? You could try looking at PDFLib – ajtrichards Nov 10 '12 at 21:29
  • use fpdf - https://github.com/lsolesen/fpdf/blob/master/tutorial/tuto1.htm ... and this is a possible duplicate - http://stackoverflow.com/questions/10721497/edit-existing-pdf-multiple-page-file-using-fpdf-pdfi – Dinesh Nov 10 '12 at 21:41

1 Answers1

2

I'd rather recommend using pdftk. It can split or merge pdf files easily.

From PHP you can call a Linux script that calls the pdftk command line tool, or call it directly.

Hope that helped!

EDIT: I said Linux thinking in a Linux hosted web, but pdftk exists for Windows and Mac also.

felixgaal
  • 2,403
  • 15
  • 24