From 449c99d65f7dcbbfc0c73259ea6266cff8c42dad Mon Sep 17 00:00:00 2001 From: KB Bot Date: Wed, 17 Jun 2026 10:57:12 +0000 Subject: [PATCH 1/2] Added new kb article remove-password-from-pdf-telerik-pdfprocessing --- ...password-from-pdf-telerik-pdfprocessing.md | 98 +++++++++++++++++++ 1 file changed, 98 insertions(+) create mode 100644 knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md diff --git a/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md b/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md new file mode 100644 index 00000000..6876ef07 --- /dev/null +++ b/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md @@ -0,0 +1,98 @@ +--- +title: Removing Password from a PDF Using Telerik PdfProcessing +description: Learn how to use Telerik PdfProcessing to remove a password from a PDF file by importing a password-protected PDF and exporting it without encryption. +type: how-to +page_title: How to Remove Password from a PDF Using Telerik PdfProcessing +meta_title: How to Remove Password from a PDF Using Telerik PdfProcessing +slug: remove-password-from-pdf-telerik-pdfprocessing +tags: pdfprocessing,telerik document processing,password,remove password,exportsettings,isencrypted +res_type: kb +ticketid: 1715470 +--- + +## Environment + + + + + + + + + + + + +
ProductTelerik Document Processing PdfProcessing
Version2026.2.519
+ +## Description + +I want to remove the password from a PDF file using Telerik PdfProcessing. The file is currently password-protected, but I need to save it as a new document without any password or encryption. + +This knowledge base article also answers the following questions: +- How to open a password-protected PDF and save it without a password? +- How to remove password protection from a PDF using Telerik PdfProcessing? +- How to create a non-encrypted PDF from a password-protected file? + +## Solution + +To remove a password from a PDF using Telerik PdfProcessing, import the password-protected PDF by providing the password, and then export it without encryption or passwords. + +1. Use the `PdfFormatProvider`'s `ImportSettings` to supply the password for the protected PDF. +2. Handle the `UserPasswordNeeded` or `OwnerPasswordNeeded` event to provide the password when required. +3. Import the document. +4. When exporting, ensure that the `ExportSettings.IsEncrypted` property is set to `false` (default) and do not set values for `UserPassword` or `OwnerPassword`. This will export the document without password protection. + +The following example demonstrates this process: + +```csharp +using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf; +using Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Import; +using Telerik.Windows.Documents.Fixed.Model; +using System.IO; + +// Create PdfFormatProvider and configure import settings +PdfFormatProvider provider = new PdfFormatProvider(); +PdfImportSettings settings = new PdfImportSettings(); +bool isPasswordProtected = false; + +// Handle UserPasswordNeeded event +settings.UserPasswordNeeded += (s, a) => +{ + isPasswordProtected = true; + a.Password = "YourPasswordHere"; // Supply the user password +}; + +// Handle OwnerPasswordNeeded event +settings.OwnerPasswordNeeded += (s, a) => +{ + isPasswordProtected = true; + a.Password = "OwnerPasswordHere"; // Supply the owner password +}; + +provider.ImportSettings = settings; + +// Import the password-protected PDF +RadFixedDocument document; +using (Stream stream = File.OpenRead("input.pdf")) +{ + document = provider.Import(stream); + // Document is loaded if the password is correct +} + +// Configure export settings +provider.ExportSettings.IsEncrypted = false; // Ensure no encryption + +// Export the document to a new PDF file +string pdfOutputPath = "output.pdf"; +File.Delete(pdfOutputPath); +using (Stream output = File.OpenWrite(pdfOutputPath)) +{ + provider.Export(document, output); +} +``` + +## See Also + +- [PdfFormatProvider Export Settings](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings#export-settings) +- [PdfFormatProvider Overview](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/overview) From 8601e651c0cfb29ae969471f3a6af791476918ec Mon Sep 17 00:00:00 2001 From: "PROGRESS\\ykaraman" Date: Wed, 17 Jun 2026 14:20:11 +0300 Subject: [PATCH 2/2] KB - PDF - remove password from file --- ...password-from-pdf-telerik-pdfprocessing.md | 51 ++++++++----------- .../pdf/pdfformatprovider/settings.md | 1 + 2 files changed, 22 insertions(+), 30 deletions(-) diff --git a/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md b/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md index 6876ef07..253a47ae 100644 --- a/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md +++ b/knowledge-base/remove-password-from-pdf-telerik-pdfprocessing.md @@ -1,33 +1,24 @@ ---- -title: Removing Password from a PDF Using Telerik PdfProcessing -description: Learn how to use Telerik PdfProcessing to remove a password from a PDF file by importing a password-protected PDF and exporting it without encryption. -type: how-to -page_title: How to Remove Password from a PDF Using Telerik PdfProcessing -meta_title: How to Remove Password from a PDF Using Telerik PdfProcessing -slug: remove-password-from-pdf-telerik-pdfprocessing -tags: pdfprocessing,telerik document processing,password,remove password,exportsettings,isencrypted -res_type: kb -ticketid: 1715470 +--- +title: Removing Password from a PDF Using Telerik PdfProcessing +description: Learn how to use Telerik PdfProcessing to remove a password from a PDF file by importing a password-protected PDF and exporting it without encryption. +type: how-to +page_title: How to Remove Password from a PDF Using Telerik PdfProcessing +meta_title: How to Remove Password from a PDF Using Telerik PdfProcessing +slug: remove-password-from-pdf-telerik-pdfprocessing +tags: pdf,pdfprocessing,password,encryption,import,export +res_type: kb +ticketid: 1715470 --- ## Environment - - - - - - - - - - - -
ProductTelerik Document Processing PdfProcessing
Version2026.2.519
+| Version | Product | Author | +| --- | --- | --- | +| 2026.2.519 | [RadPdfProcessing]({%slug radpdfprocessing-overview%}) | [Yoan Karamanov](https://www.telerik.com/blogs/author/yoan-karamanov) | ## Description -I want to remove the password from a PDF file using Telerik PdfProcessing. The file is currently password-protected, but I need to save it as a new document without any password or encryption. +Use [RadPdfProcessing]({%slug radpdfprocessing-overview%}) to open a password-protected PDF file and save it again as a new document without password protection or encryption. This knowledge base article also answers the following questions: - How to open a password-protected PDF and save it without a password? @@ -36,12 +27,12 @@ This knowledge base article also answers the following questions: ## Solution -To remove a password from a PDF using Telerik PdfProcessing, import the password-protected PDF by providing the password, and then export it without encryption or passwords. +To remove a password from a PDF using [PdfFormatProvider]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}), import the password-protected document with [PdfImportSettings]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#import-settings), then export it with [PdfExportSettings]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#export-settings) without encryption. -1. Use the `PdfFormatProvider`'s `ImportSettings` to supply the password for the protected PDF. -2. Handle the `UserPasswordNeeded` or `OwnerPasswordNeeded` event to provide the password when required. -3. Import the document. -4. When exporting, ensure that the `ExportSettings.IsEncrypted` property is set to `false` (default) and do not set values for `UserPassword` or `OwnerPassword`. This will export the document without password protection. +1. Use the [ImportSettings]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#import-settings) property of [PdfFormatProvider]({%slug radpdfprocessing-formats-and-conversion-pdf-pdfformatprovider%}) to supply the password for the protected PDF. +2. Handle the [UserPasswordNeeded]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#import-settings) or [OwnerPasswordNeeded]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#import-settings) event to provide the password when required. +3. Import the document into a [RadFixedDocument]({%slug radpdfprocessing-model-radfixeddocument%}). +4. When exporting, keep [ExportSettings]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#export-settings) configured so that [IsEncrypted]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#export-settings) is `false` and leave [UserPassword]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#export-settings) and [OwnerPassword]({%slug radpdfprocessing-formats-and-conversion-pdf-settings%}#export-settings) unset. The following example demonstrates this process: @@ -94,5 +85,5 @@ using (Stream output = File.OpenWrite(pdfOutputPath)) ## See Also -- [PdfFormatProvider Export Settings](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings#export-settings) -- [PdfFormatProvider Overview](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/overview) +* [PdfFormatProvider Export Settings](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings#export-settings) +* [PdfFormatProvider Overview](https://www.telerik.com/document-processing-libraries/documentation/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/overview) diff --git a/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings.md b/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings.md index 75319297..5347ddbf 100644 --- a/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings.md +++ b/libraries/radpdfprocessing/formats-and-conversion/pdf/pdfformatprovider/settings.md @@ -85,3 +85,4 @@ The following example shows how to create a `PdfExportSettings` object with cust * [Handling Exceptions]({%slug radpdfprocessing-handling-exceptions%}) * [How to Comply with PDF/A Standard]({%slug radpdfprocessing-concepts-comply-with-pdfa-standard%}) * [Optimizing and Reducing the Size of PDF Files with RadPdfProcessing]({%slug optimize-and-reduce-pdf-size-radpdfprocessing%}) +* [Removing Password from a PDF Using Telerik PdfProcessing]({%slug remove-password-from-pdf-telerik-pdfprocessing%})