Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

How to know whether PDF file has password?

$
0
0
 Hi!
  string dataDir = Path.GetFullPath("../../../Data/");
  string password="abc";
            
  if(....) How to know whether PDF file has password?
     //Open PDF with Password
     Document pdfDocument1 = new Document(dataDir + "input.pdf",password); 
  else
     Document pdfDocument1 = new Document(dataDir + "input.pdf");

How to know?

Viewing all articles
Browse latest Browse all 3131

Trending Articles