Remove protection

A forum for questions or concerns related to the PDF-XChange Core API SDK

Moderators: TrackerSupp-Daniel, Tracker Support, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Tracker Supp-Stefan

Forum rules
DO NOT post your license/serial key, or your activation code - these forums, and all posts within, are public and we will be forced to immediately deactivate your license.

When experiencing some errors, use the IAUX_Inst::FormatHRESULT method to see their description and include it in your post along with the error code.
Post Reply
Tom Princen
User
Posts: 83
Joined: Wed Mar 25, 2015 10:15 am

Remove protection

Post by Tom Princen »

What s the best way to remove the protection from a PDF? (without entering the pass)

I noticed that when I print to the tracker virtual printer the created PDF is not protected anymore.
Problem is that i do not know how to use virtual printer to create PDFs without the save as window is prompted... Or is that not possible?
(the C# samples do not work on my PC)

Or is there an easier way? Without using the driver dlls?
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Remove protection

Post by Sasha - Tracker Dev Team »

Hello Tom,

The best way would be to use the IPXC_Document::SetStdEncryption method with the SEM_NoEncryption as a first argument. Note that this will work when the document has authorization for changes meaning that the owner password was used.

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
Tom Princen
User
Posts: 83
Joined: Wed Mar 25, 2015 10:15 am

Re: Remove protection

Post by Tom Princen »

This will not work because the passord is not available...

Is it possible to use the printer without the save file dialog?
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Remove protection

Post by Ivan - Tracker Software »

This will not work because the passord is not available...
Unfortunately, to remove protection from existing document, you have to have owner permissions for this document.
Is it possible to use the printer without the save file dialog?
Is this question related to Core API SDK? Or you are talking now about Driver API SDK?
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Tom Princen
User
Posts: 83
Joined: Wed Mar 25, 2015 10:15 am

Re: Remove protection

Post by Tom Princen »

then ideed is it for the driver API
User avatar
Ivan - Tracker Software
Site Admin
Posts: 3549
Joined: Thu Jul 08, 2004 10:36 pm
Location: Vancouver Island - Canada
Contact:

Re: Remove protection

Post by Ivan - Tracker Software »

Yes, it is possible. You have to set property "Save.ShowSaveDialog" to 0, and "Save.File" to the full file name where document should be stored.
For more information, please refer to Driver API help.
Tracker Software (Project Director)

When attaching files to any message - please ensure they are archived and posted as a .ZIP, .RAR or .7z format - or they will not be posted - thanks.
Tom Princen
User
Posts: 83
Joined: Wed Mar 25, 2015 10:15 am

Re: Remove protection

Post by Tom Princen »

Can I use this:

create a new page in a new document. And copy all contents from the protected page on the new page?
And then save the new document.

How do I copy all the contents?
User avatar
Tracker Supp-Stefan
Site Admin
Posts: 17892
Joined: Mon Jan 12, 2009 8:07 am
Location: London
Contact:

Re: Remove protection

Post by Tracker Supp-Stefan »

Hello Tom,

Technically this is possible, but you are in this way effectively circumventing the security restrictions placed by the author of the document - something that is not exactly good practice ;)

Regards,
Stefan
Post Reply