justinY
asked on
put password to a pdf file in C++
Hi Experts,
I need to put a password to a pdf file. How can I do that?
Thanks
I need to put a password to a pdf file. How can I do that?
Thanks
ASKER
Thanks zvytas. But I dont know C#. Can you give me C++ version?
PDF is a difficult format to manipulate programmatically!
I recently had an application which needed to print data from a database onto a PDF formatted certificate. I changed the PDF certificate into a PDF form. I used the FDF toolkit from adobe to create an FDF file with the field data. I then needed to merge the FDF data into the PDF form fields. (There are commercial C++ libraries available to do this, most quite expensive and most designed to work as a server process) Then I modified the "pdftk" source code (open source) to create a DLL to merge the FDF data into the PDF form and create a PDF file, which was not a trivial undertaking!
My recommendation to you would be to create a PDF form as a template with a field to hold your password string (requires a full copy of Acrobat, the reader can't do this). Then your code can write an FDF file using the Adobe FDF Toolkit headers and library. Adobe Reader can merge the form data into the PDF form if both files are available to the user.
The other option would be to use libharu to assemble the pdf file directly.
Cheers,
Chris
I recently had an application which needed to print data from a database onto a PDF formatted certificate. I changed the PDF certificate into a PDF form. I used the FDF toolkit from adobe to create an FDF file with the field data. I then needed to merge the FDF data into the PDF form fields. (There are commercial C++ libraries available to do this, most quite expensive and most designed to work as a server process) Then I modified the "pdftk" source code (open source) to create a DLL to merge the FDF data into the PDF form and create a PDF file, which was not a trivial undertaking!
My recommendation to you would be to create a PDF form as a template with a field to hold your password string (requires a full copy of Acrobat, the reader can't do this). Then your code can write an FDF file using the Adobe FDF Toolkit headers and library. Adobe Reader can merge the form data into the PDF form if both files are available to the user.
The other option would be to use libharu to assemble the pdf file directly.
Cheers,
Chris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
good stuff.
Thank you so much
Thank you so much
http://stackoverflow.com/questions/370571/password-protected-pdf-using-c