DOC/DOCX - when removing only "Author" property, the “Content type”, “Scale” property will also be removed


#1

Remove doc/docx properties, the “Content type”, “Scale” property will be removed. and the ContentType is empty.

We are using v18.6 and here’s the demo codes:
var format = new DocFormat(filePath);
DocMetadata metaData = ((DocFormat)format).DocumentProperties;
The metaData.ContentType is empty, and it is read only, cannot be assigned to.

Here’s the test file and screenshot.
testfiles.zip (80.3 KB)


#2

@Glority_Developer,

Thanks for using GroupDocs.Metadata for .NET and sharing your concerns.

The code you are using is to get document properties for Doc/Docx file format. Would you please share the code you are using to remove Doc/Docx properties?


#3

Here’re the codes:

var format = new DocFormat(filePath);
DocMetadata metaData = ((DocFormat)format).DocumentProperties;
metaData.Author = string.Empty;
format.Save(outPath);

Btw, we also find that when removing only the Author property, the language and Version number properties will also be removed. Here’s the test file for this issue.
DOC.zip (18.0 KB)


#4

@Glority_Developer,

Thanks for providing details. We investigated your issue and were able to reproduce it at our end. We have logged it in our internal Issue Tracking System as METADATANET-2460 for further investigation. We shall keep you notified in case of any updates.