views:

77

answers:

2

I'm trying to create a web script that will allow me to alter PDF templates that I have uploaded and re-output them. I have tried Zend already which allows me to write to a PDF but that means leaving the PDF blank in certain space which is to primitive for what I need. PDFFlip was not any better.

We need to implement functionality so we can remove content from the PDF as well as remove and replace. I have looked at CAM::PDF and changepagestring.pl but I'm not sure it's up to the job. I was hard pressed to find any real usage examples and Perl is not a language I have used before.

This is for a web project but I am flexible with the language we use, ideally PHP or ASP.NET C# would be great. Preferably not Java unless there is no other way.

I should also point out that I looked through the FoxitReader SDK without any luck. I never tried to implement it but I found no mention of find and replace like functionality.

Thanks in advance.

+1  A: 

You can tinker with PDF text but it is not straight-forward just to search and replace. The text is designed as an end-file format not for easy editing. I wrote a blog post explaining some of the issues at http://pdf.jpedal.org/java-pdf-blog/bid/12670/PDF-text

mark stephens
Thanks for you reply, I was aware that PDF was a display format and hard to get text from. I had seen your article posted on this forum when I was doing my research. While it's not a solution to my answer I will up vote as it makes a good read.
Ben
A: 

Hello!

May be as workaround it's better to hold and fill in templates in some more comfortable for editing format? E.g. you can keep your templates as Microsoft Word templates and then export them to PDF after filling. This thread may be useful on this way.

PDF file format isn't quite appropriate for editing.

As another way may be you can prepare your templates as PDFs containing form fields. In this case filling of form fields is common and well-known task and there a lot of pdf components for this.

Vitaliy Shibaev
The PDF's have been exported from InDesign and are business card layouts. I am unaware if you are able to create form fields that are easier to fill from inDesign?
Ben