.NET コアアプリの C# と正規表現を使用して PDF ファイルをサニタイズする

Office および OpenOffice のドキュメント、スプレッドシート、プレゼンテーション、および Windows、Linux、macOS 上の PDF から機密情報を検索して削除します


.NET API のドキュメント テキストの秘匿化

メタデータの変更やコメントの削除機能を含む、PDF、Word、Excel、PowerPoint のドキュメントおよび画像からの機密情報や機密情報をサニタイズするための、形式に依存しない単一のインターフェイス。 GroupDocs.Redaction for .NET ツールを使用すると、機密情報を編集して編集した文書を PDF に保存し、すべてのページをラスター イメージに変換したり、文書を元の形式で保存してさらに編集したりできます。

C# 経由の正規表現を使用して PDF からのテキストを秘匿化する

GroupDocs.Redaction を使用すると、.NET 開発者は正規表現の最大限の強度を使用して、いくつかの簡単な手順で PDF ファイルを秘匿化できます。

  • Redactor クラスのインスタンスを作成し、PDF ファイルをロードします
  • RegexRedaction クラスのインスタンスを作成して、テキストを検索して置換します
  • RegexRedaction のオブジェクトを使用して Redactor.Apply メソッドを呼び出す

リダクション API を使ってみる

コマンドラインから nuget install GroupDocs.Redaction としてインストールするか、Visual Studio のパッケージ マネージャー コンソールから Install-Package GroupDocs.Redaction を使用してインストールします。 あるいは、ダウンロード からオフライン MSI インストーラーまたは ZIP ファイル内の DLL を取得し、プロジェクト内で手動で参照します。

using (Redactor redactor = new Redactor(@"sample.pdf"))
{
	redactor.Apply(new RegexRedaction("\\d{2}\\s*\\d{2}[^\\d]*\\d{6}", new ReplacementOptions(System.Drawing.Color.Blue)));
	redactor.Save();
}

PDF Ja Live Demo

Checkout the free online demo for PDF Ja.

No need to set up

No need to write any code

Just upload the source file

Get the download link

What is PDF File Format?

Portable Document Format (PDF) is a type of document created by Adobe back in 1990s. The purpose of this file format was to introduce a standard for representation of documents and other reference material in a format that is independent of application software, hardware as well as Operating System. PDF files can be opened in Adobe Acrobat Reader/Writer as well in most modern browsers like Chrome, Safari, Firefox via extensions/plug-ins. Most of the commercially available software suites also offer conversion of their documents to PDF file format without the requirement of any additional software component.

Read More

Other Ja Options

CSV Ja

(Comma Seperated Values)

DOC Ja

(Microsoft Word Binary Format)

DOCM Ja

(Microsoft Word 2007 Marco File)

DOCX Ja

(Office 2007+ Word Document)

DOT Ja

(Microsoft Word Template Files)

DOTM Ja

(Microsoft Word 2007+ Template File)

DOTX Ja

(Microsoft Word Template File )

POT Ja

(Microsoft PowerPoint Template Files)

POTM Ja

(Microsoft PowerPoint Template File)

PPS Ja

(PowerPoint Slide Show)

PPSM Ja

(Macro-enabled Slide Show)

PPSX Ja

(PowerPoint Slide Show)

PPT Ja

(Microsoft PowerPoint 97-2003)

PPTM Ja

(Macro-enabled Presentation File)

PPTX Ja

(Open XML presentation Format)

RTF Ja

(Rich Text Format)

XLS Ja

(Microsoft Excel Spreadsheet (Legacy))

XLSM Ja

(Macro-enabled Spreadsheet)

XLSX Ja

(Open XML Workbook)

XLT Ja

(Excel 97 - 2003 Template)

XLTM Ja

(Excel Macro-Enabled Template)

XLTX Ja

(Excel Template)

Back to top
 日本