tags:

views:

47

answers:

1

Where I work we get PDF templetes from our clients and we convert them into html templates that we can change out tokens in the page with other info and mail them out to their clients.

The reason we convert them into html is because the text can wrap if any of the info is too long.

The process can be slow since we can only do 1 at a time on a single computer because of a GDI problem. So we have a farm that creates the pdf docs that need to be mailed out.

The GDI problem. http://support.microsoft.com/kb/939884/en-us/

The hotfix does not seam to fix the problem.

Is there a better way of doing this that would be more efferent or easier to do with out having to change from pdf->html->pdf

+1  A: 

Have a look at iTextSharp. You can use the PdfStamper object to dink with the original PDF and spit out customized versions very quickly. You might need to do a little massaging of the source PDF (define some form obejcts in Acrobat, etc) to get it to do exactly what you want, but it's very high performance compared to the process you're describing. We use it to generate thousands of PDFs a day (with customized info inserted for each customer), and it's free. A little tricky to get your head around (steep learning curve). I'd highly suggest buying the eBook "iText In Action"- the samples there make the whole thing much easier to grok.

nitzmahone