Skip to content

Instantly share code, notes, and snippets.

@groupdocs-com-kb
Last active March 29, 2024 14:51
Remove Metadata from PPTX using C#. For more information, please follow link: https://kb.groupdocs.com/redaction/net/remove-metadata-from-pptx-using-csharp/
using GroupDocs.Redaction.Options;
using GroupDocs.Redaction.Redactions;
namespace GroupDocs.Redaction
{
internal class RemoveMetadatafromPPTXusingCSharp
{
static void Main(string[] args)
{
// Set License to avoid the limitations of Redaction library
License lic = new License();
lic.SetLicense(@"GroupDocs.Redaction.lic");
// Control document redaction process, allowing to open,
// redact and save documents
using (Redactor redactor = new Redactor(@"input.pptx"))
{
// Erase Author, Manager and Company
// redactor.Apply(new EraseMetadataRedaction(MetadataFilters.Author
// | MetadataFilters.Manager | MetadataFilters.Company));
// Erase all metadata
redactor.Apply(new EraseMetadataRedaction(MetadataFilters.All));
redactor.Save(new SaveOptions()
{
AddSuffix = true,
RasterizeToPDF = false
});
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment