Creating password-protected PDF-Files with API

This Forum is for the use of Software Developers requiring help and assistance for Tracker Software's PDF-XChange Printer Drivers SDK (only) - Please use the PDF-Tools SDK Forum for Library DLL assistance.

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Sean - Tracker, Chris - Tracker Supp, Tracker Supp-Stefan, Ivan - Tracker Software, Andrew - Tracker Support, Tracker - Clarion Support, John - Tracker Supp, Support Staff, moderators

Post Reply
DMS
User
Posts: 2
Joined: Fri Oct 19, 2007 1:21 pm
Location: Cologne, Germany

Creating password-protected PDF-Files with API

Post by DMS » Fri Oct 19, 2007 1:42 pm

In the XCange-Printer-Driver there is the option for using a password for protecting the PDF-file.
Is there a parameter in ihre API nearly like this:

SavObj.SetParamStr 0, "Save.Password", "MickeyMouse"
(this example doesn't work)

to add an password dynamicly to severeal PDF-files?

Thanks
Dirk Mannchen

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Oct 19, 2007 3:47 pm

Hi,

Please see the Driver help file (DRV_API.CHM) - you need to do this :

to set the password you need to call:

SavObj.SetParamStr 0, "Security.Use", "Yes"
SavObj.SetParamStr 0, "Security.UserPwd", "MickeyMouse"

however the PDF-XChange drivers are not designed/intended for modification to existing PDF files (ssuming that this is your intention), the drivers primary function is to create new PDF files - the PDF-XChange PRO or PDF-Tools SDK's are provided for this purpose - using the functionality of the XCPRO35 library - and the PXCp_EnableSecurity function.

See the XCPRO35.CHM file for more detailed info.

HTH
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

DMS
User
Posts: 2
Joined: Fri Oct 19, 2007 1:21 pm
Location: Cologne, Germany

Post by DMS » Fri Oct 19, 2007 7:51 pm

Thanks, thats I was looking for, we always create new PDF-Files with our software. The users should have the option to protect several PDF-Prints which contain confidential data with a password. We can now add a Input-Dialog in which such a password can be entered.

John - Tracker Supp
Site Admin
Posts: 8202
Joined: Tue Jun 29, 2004 10:34 am
Location: Vancouver Island - Canada
Contact:

Post by John - Tracker Supp » Fri Oct 19, 2007 10:13 pm

Pleasure - pleased all is well :)
If posting files to this forum - you must archive the files to a ZIP, RAR or 7z file or they will not be uploaded - thank you.

Best regards
Tracker Support
http://www.tracker-software.com

Post Reply