Jump to content

How easy to edit existing PDF?


OM2

Recommended Posts

I need to edit an existing PDF and add text.

 

I need to first search for a string.

From the location where the string is matched, I want to add text 1.5cm below.

 

Is this possible?

 

The PDF has no protection or anything - just plain PDF.

 

What code libraries do I need?

 

Thanks.

 

Link to comment
Share on other sites

If you use Zend Framework, it supports editing PDF by default. 

 

However, I'm not very sure about your needs? Are you looking for a way to open, modify and save PDF file itself using PHP? Or do you just need to get content from PDF, modify it, and then output modified content on website?

Link to comment
Share on other sites

thanks for the replies guys.

it's to edit labels from a courier.

they give 4 labels per sheet.

for each order you can have a 12 digit reference - NOTHING else.

it would be great if i could have an area of text where i could put all order details.

so... the code would read in a csv with full order details - with many orders...

search for the 12 digit reference string... and then below add more information for the order.

 

overwriting PDF or making a new one - either would be ok.

 

let me know what u guys think.

Link to comment
Share on other sites

The key thing if I understand correctly would be to be able to use PHP to read the pdf doc.  Then with the info from that you can create your own new doc (pdf or not) by combining your info with the pdf's data.  No reason to be outputting a new pdf is there?  Unless you need to create a specific image that must fit some exact format which a pdf creator can do.  Personally I use FPDF which is pretty darn accurate and not too difficult to pick up.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.