Changing secured document: PlaceHeadersAndFooters vs op.document.addHeaderAndFooter  SOLVED

PDF-XChange Editor SDK for Developers

Moderators: TrackerSupp-Daniel, Tracker Support, Paul - Tracker Supp, Vasyl-Tracker Dev Team, Chris - Tracker Supp, Sean - Tracker, Ivan - Tracker Software, 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
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Changing secured document: PlaceHeadersAndFooters vs op.document.addHeaderAndFooter

Post by zarkogajic »

Hi Support,

I have a password protected document where "Changing the Document" is *not* allowed.

Trying to add header/footer using op.document.addHeaderAndFooter would result in exception: "No permissions for this operation." - I guess as expected.

Adding header/footer using PlaceHeadersAndFooters - and the header/footer is placed - no exceptions being raised.

Is this by design? Why is IOperation for header/footer working differently than (the underlying call to) PlaceHeadersAndFooters ?

-žarko
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Changing secured document: PlaceHeadersAndFooters vs op.document.addHeaderAndFooter

Post by zarkogajic »

Hi Support,

The same thing with op.document.addWatermarks vs PlaceWatermark.

Also, the same thing when a document is PDFA - and the "*no* changing of document" is implicit (so, not set via standard security / password).

p.s.
To be clear: I like it that PlaceWatermark / PlaceHeadersAndFooters ignores the "no changing of document" flag - I just need to understand why is this working in that way ... ? I would be more happy with "by design" than "a bug" :)


-žarko
Sasha - Tracker Dev Team
User
Posts: 5522
Joined: Fri Nov 21, 2014 8:27 am
Contact:

Re: Changing secured document: PlaceHeadersAndFooters vs op.document.addHeaderAndFooter

Post by Sasha - Tracker Dev Team »

Hello zarkogajic,

Well this shouldn't be like that. But we can leave this for a while if you need it to behave that way. Though someday this can be changed (not in the nearest future but still).

Cheers,
Alex
Subscribe at:
https://www.youtube.com/channel/UC-TwAMNi1haxJ1FX3LvB4CQ
zarkogajic
User
Posts: 1372
Joined: Thu Sep 05, 2019 12:35 pm

Re: Changing secured document: PlaceHeadersAndFooters vs op.document.addHeaderAndFooter  SOLVED

Post by zarkogajic »

Hi Alex,

So, not by design on purpose :)

Ok, please leave it - and if possible don't change it. And if you do in the future, please DO mark this as a change (in builds history) when that happens... as at the moment I'm counting on it that PlaceWatermark / PlaceHeadersAndFooters will do the work even on "protected" documents...

-žarko
User avatar
Paul - Tracker Supp
Site Admin
Posts: 6900
Joined: Wed Mar 25, 2009 10:37 pm
Location: Chemainus, Canada
Contact:

Changing secured document: PlaceHeadersAndFooters vs op.document.addHeaderAndFooter

Post by Paul - Tracker Supp »

:)
Best regards

Paul O'Rorke
Tracker Support North America
http://www.tracker-software.com
Post Reply