Click here to Skip to main content
15,908,112 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am using drupal to create websites.
I have a requirement where in, whne a PDF on my website is downloaded a disclaimer page is attached to it and should open on the first page of the client. But I cannot modify the actual pdf.

So I need a way to create a copy of the file and append a page to it when it is clicked on for download.

I am not sure how this can be done. So any solutions are welcome with any script language or tags.

Any help would be appreciated.

Thanks

User2507
Posted
Updated 2-Dec-10 20:22pm
v2
Comments
fjdiewornncalwe 3-Dec-10 8:13am    
I think your requirements are a little confused. You cannot modify the actual pdf, but when someone requests it, you want to modify the pdf with a new page and send it to the client. That is a bit self-defeating, isn't it? Why can't you just have a cache of the pdfs stored on your server with the disclaimer already attached and then just reference and send those?

1 solution

Hi,

we're using itextsharp (free) to create and serve pdfs on our webserver.

I guess it is also possible to modifiy/concat content to an
existing pdf-file. Just google for "itextsharp" and "modify existing
pdf".

So in theory you can open your original pdf, make your modifications
with itextsharp and then save the changed document to your browsers
response stream.

GL
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900