0

I would like to know if it is possible to load a PDF and edit it.

The PDF is a brochure with few pages, i would like to put in few images from my database and save it.

Thank you

3 Answers 3

1

You can import pages of an existing PDF document with FPDI. After that you can place the images on top of them with the standard Image() method of FPDF.

0

Editing a PDF is very difficult programmatically, especially if it wasn't programmatically generated.

A better option would be to make your source file an HTML file, then make your edits to the HTML and convert it to PDF.

3
  • Thank you. Ok do you think if is it possible to transform an HTML and CSS page to PDF. Its very important to keep the structure of my brochure. Aug 31, 2014 at 1:22
  • See answers here stackoverflow.com/questions/391005/…
    – frazras
    Aug 31, 2014 at 1:42
  • Editing a PDF is indeed very difficult programmatically. However, the advice to go from PDF to HTML is rather questionable, because it is very difficult to do a proper representation of the contents (and get that back to PDF); if it is nearly possible depends a lot on the input file.
    – Max Wyss
    Aug 31, 2014 at 14:34
0

If this is a one-time task, it would be easiest to open the document in Acrobat (Pro), and exchange the images using the Edit text and Images tool.

Another way with Acrobat would be creating a Button form field over the image to be replaced (transparent border, transparent background, no action). Then you import the new image as icon, and flatten the page afterwards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.