-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Description
Feature Request
When a document is processed through Templify, the document metadata properties (Author, Title, Subject, etc.) are copied as-is from the source template. There is currently no way to set or override these properties during template processing.
Use Case
Consumers need the ability to set the Author property (and other document metadata) on the output document after rendering. For example, setting the Author to reflect the application that generated the document rather than the original template author.
Proposed Solution
Add a DocumentProperties class to configure document metadata via PlaceholderReplacementOptions:
var options = new PlaceholderReplacementOptions
{
DocumentProperties = new DocumentProperties
{
Author = "My Application"
}
};
var processor = new DocumentTemplateProcessor(options);
processor.ProcessTemplate(templateStream, outputStream, data);Properties to support:
- Author (Creator)
- Title
- Subject
- Description (Comments)
- Keywords
- Category
- LastModifiedBy
Properties left as null should preserve the original template values (backward compatible).
Implementation Notes
- Uses
WordprocessingDocument.PackageProperties(OPC standard API) - Applied as a post-processing step alongside
UpdateFieldsOnOpen - Follows existing patterns: immutable
initproperties, null = don't touch
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels