Welcome Guest Search | Active Topics | Sign In | Register

EO.Pdf Getting existing permissions Options
James72
Posted: Wednesday, April 22, 2015 9:55:08 PM
Rank: Newbie
Groups: Member

Joined: 4/22/2015
Posts: 1
Hi,
We have a requirement to check certain permissions on existing certified PDF documents.

The below code will always return true, irrespective of the existing document on the files.

How can I get the existing permission flags?

Code: C#
string ftoo = @"d:\path to open\file.pdf";

            PdfDocument document = new PdfDocument(ftoo);
  
            Console.WriteLine(document.Security.Permissions.HasFlag(PdfDocumentPermissions.Commenting));
            Console.WriteLine(document.Security.Permissions.HasFlag(PdfDocumentPermissions.Printing));


Many thanks,
James.
eo_support
Posted: Thursday, April 23, 2015 9:38:55 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,196
Hi,

We tested this here and it seems to be working fine. Can you send us a test PDF file so that we can take a look? Please see here on how to send us test file:

http://www.essentialobjects.com/forum/test_project.aspx

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.