Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Friday, July 7, 2017 4:59:17 PM(UTC)
Nick Villalobos

Groups: Registered
Posts: 119

Was thanked: 4 time(s) in 4 post(s)

There are many times when you want to keep information within a PDF private from others and within the LEADTOOLS SDK you can add PDF Security Options to your document to keep information hidden from others. Below you will a small code snippet that add these security options to a PDF File.
Code:

//Load PDF File
PDFFile pdfFile = new PDFFile(fileName);

// Set the security options
pdfFile.SecurityOptions = new PDFSecurityOptions();
pdfFile.SecurityOptions.UserPassword = "PASSWORD";
pdfFile.SecurityOptions.PrintEnabled = false;
pdfFile.SecurityOptions.CopyEnabled = false;
pdfFile.SecurityOptions.HighQualityPrintEnabled = false;
pdfFile.SecurityOptions.EncryptionMode = PDFEncryptionMode.RC128Bit;

// Encrypt the file by saving it to the destination file
pdfFile.Convert(1, -1, destinationFileName);



Now when this file is attempted to be opened, it will ask for a password first. You can view more information on the PDFSecurityOptions Class here:
https://www.leadtools.co.../pdfsecurityoptions.html
Nick Villalobos
Developer Support Engineer
LEAD Technologies, Inc.

LEAD Logo
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

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.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.038 seconds.