Disinfetta i file RTF tramite C# ed espressioni regolari nelle app .NET principali

Trova e rimuovi informazioni riservate da documenti, fogli di lavoro e presentazioni Office e OpenOffice nonché RTF su Windows, Linux e macOS


Redazione del testo del documento per l'API .NET

Un’unica interfaccia indipendente dal formato per la sanificazione delle informazioni riservate e classificate dai documenti e dalle immagini PDF, Word, Excel, PowerPoint, inclusa la possibilità di modificare i metadati e rimuovere i commenti. Con lo strumento GroupDocs.Redaction for .NET puoi eliminare le informazioni classificate e salvare il documento redatto in PDF, trasformando tutte le pagine in immagini raster o mantenendo il documento nel suo formato originale per ulteriori modifiche.

Oscura il testo da RTF utilizzando le espressioni regolari tramite C#

GroupDocs.Redaction consente agli sviluppatori .NET di utilizzare tutta la forza delle espressioni regolari per redigere il file RTF con pochi semplici passaggi.

  • Crea un’istanza della classe Redactor e carica il file RTF
  • Crea un’istanza della classe RegexRedaction per trovare e sostituire il testo
  • Richiama il metodo Redactor.Apply con oggetto di RegexRedaction

Inizia con l'API Redaction

Installa dalla riga di comando come nuget install GroupDocs.Redaction o tramite Package Manager Console di Visual Studio con Install-Package GroupDocs.Redaction. In alternativa, scarica il programma di installazione MSI offline o le DLL in un file ZIP da download e fai riferimento a esso manualmente nel tuo progetto.

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

RTF It Live Demo

Checkout the free online demo for RTF It.

No need to set up

No need to write any code

Just upload the source file

Get the download link

What is RTF File Format?

Introduced and documented by Microsoft, the Rich Text Format (RTF) represents a method of encoding formatted text and graphics for use within applications. The format facilitates cross-platform document exchange with other Microsoft Products, thus serving the purpose of interoperability. This capability makes it a standard of data transfer between word processing software and, hence, contents can be transferred from one operating system to another without losing document formatting. The file format specifications are available by Microsoft for public download and can be referred to from developer’s perspective.

Read More

Other It Options

CSV It

(Comma Seperated Values)

DOC It

(Microsoft Word Binary Format)

DOCM It

(Microsoft Word 2007 Marco File)

DOCX It

(Office 2007+ Word Document)

DOT It

(Microsoft Word Template Files)

DOTM It

(Microsoft Word 2007+ Template File)

DOTX It

(Microsoft Word Template File )

PDF It

(Portable Document Format)

POT It

(Microsoft PowerPoint Template Files)

POTM It

(Microsoft PowerPoint Template File)

PPS It

(PowerPoint Slide Show)

PPSM It

(Macro-enabled Slide Show)

PPSX It

(PowerPoint Slide Show)

PPT It

(Microsoft PowerPoint 97-2003)

PPTM It

(Macro-enabled Presentation File)

PPTX It

(Open XML presentation Format)

XLS It

(Microsoft Excel Spreadsheet (Legacy))

XLSM It

(Macro-enabled Spreadsheet)

XLSX It

(Open XML Workbook)

XLT It

(Excel 97 - 2003 Template)

XLTM It

(Excel Macro-Enabled Template)

XLTX It

(Excel Template)

Back to top
 Italiano