This is a migrated thread and some comments may be shown as answers.

Checking if pdf file is password protected

1 Answer 1141 Views
PdfProcessing
This is a migrated thread and some comments may be shown as answers.
Zygmunt
Top achievements
Rank 1
Iron
Iron
Iron
Zygmunt asked on 20 Apr 2021, 10:37 AM

Hello

Is it posible to check if pdf file is password protected using Telerik Tools?

 

All the best

1 Answer, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 22 Apr 2021, 11:54 AM

Hello Zygmunt,

The import settings of the PdfFormatProvider class (used to import PDF documents in PdfProcessing) expose an event that is fired when the document is password-protected - UserPasswordNeeded. You can use that event to determine whether a password is needed for opening the document. For more details and examples on the matter, please check the Settings help topic for PdfFormatProvider.

I hope this information is helpful.

Regards,
Tanya
Progress Telerik

Тhe web is about to get a bit better! 

The Progress Hack-For-Good Challenge has started. Learn how to enter and make the web a worthier place: https://progress-worthyweb.devpost.com.

Tags
PdfProcessing
Asked by
Zygmunt
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Tanya
Telerik team
Share this question
or