Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Section
Column
width50%
Panel
titleBGColor#B0C4DE
titleContents Summary
Table of Contents
stylenone
outlinetrue
typelist
Column
 
Info

The code in below examples uses some methods defined in the Common Utilities.

Filter Metadata

Using GroupDocs.Redaction API, you can filter document metadata using MetadataFilter. You can set the filter to All, or any combination of metadata. Following is the table with the full list of MetadataFilter items: 

Filter
Numeric value
Description

Version

262144Document's version

TotalEditingTime

131072Total editing time

Title

65536Document title

Template

32768Document template name

Subject

16384Subject of the document

RevisionNumber

8192Revision number
None0Empty filter setting, matches no metadata items

NameOfApplication

2048Name of application where the document was created

Manager

4096Author's manager name

LastSavedTime

1024Last saved date and time

LastSavedBy

256Last saved by user

LastPrinted

128Last printed date and time

Keywords

1048576Document's keywords

HyperlinkBase

64Hyperlink base

Description

524288Document's description

CreatedTime

32Created time

ContentType

2097152Content type

ContentStatus

16Content status

Company

8Company of the Author

Comments

4Document comment

Category

2Category of the document

Author

1Author of the document

All

4194304All types of the metadata items

The Recipe

  • Load Document using Redactor.Load(@"C:\sample.pdf")

  • Filter Author, Manager and NameOfApplication using RedactWith(new EraseMetadataRedaction(MetadataFilter.Author | MetadataFilter.Manager | MetadataFilter.NameOfApplication))

  • Save document using Document.Save() 

The Code

HTML
<script src="https://gist.github.com/GroupDocsGists/c07d0159236b9e57058cc6484d265c3b.js"></script>