Create new PDF from existing PDF with PHP

3

I have a project that I need to add header / footer / watermark, dynamically in existing PDF files, through the PHP language.

I've researched a lot and still can not find a way to do this.

Is it possible to edit existing PDFs in PHP and add information?

Or, would it be possible to create a new PDF, through an existing one, and thus be able to edit the contents of this new PDF?

Another way I thought would be to turn the existing PDF into HTML and turn that HTML into a new PDF with the header / footer / watermark.

    
asked by anonymous 07.01.2016 / 11:31

1 answer

2

There are many questions in a single question, but that's fine. Well, I want to tell you that 60% of what you want is not possible. There are several PHP classes that deal with PDFs. You can create PDF, but editing PDF may be a long way. Depende muito do que significa editar pdf . Creating a footer for example could be relatively easy, but changing a text in pdf will depend on many factors, starting with the way this PDF was created. See this example

    
07.01.2016 / 16:44