PDF Generating Tool Support Forum

HOME   Login   Register    Search




  Subject: pd4ml:permissions
   PostPosted: 28 Jun 2017, 21:17 
I wanted to use <pd4ml:permissions> tag to prevent printing, modifying, saving etc and for some reason it is not working.
In particular, I wanted to prevent saving the PDF created.

My code was like
Code:
<pd4ml:permissions
   password="empty"
   rights="-2581"
   strongEncryption="false" />


I got rights = -2581 after computing
Code:
0xffffffff ^ PD4Constants.AllowCopy  ^ PD4Constants.AllowContentExtraction ^ PD4Constants.AllowPrint
which gave -2581

Do you guys find why it's not working as expected?
Is 'PD4Constants.AllowCopy' same as saving the PDF?
What would be the correct "rights" integer value to preventing the PDF to be saved?

Thanks a lot for your pointers and help. I appreciate.


  Subject: Re: pd4ml:permissions
   PostPosted: 10 Feb 2020, 16:28 
Any updates on this?


  Subject: Re: pd4ml:permissions
   PostPosted: 17 Feb 2020, 22:50 
I suspect the value should not be negative in the particular context. Ty to use

0x7fffffff ^ PD4Constants.AllowCopy ^ PD4Constants.AllowContentExtraction ^ PD4Constants.AllowPrint = 2147481067

The skipped greatest bit does not impact the document permissions.



[Reply]     [ 3 posts ] 

cron
Copyright ©2004-10 zefer|org. All rights reserved. Bookmark and Share