PdfSaveOptions.DisplayDocTitle behavior

Hello,
If we pass the file as stream how will you determine the file name to set for this property?

Let’s see here:

Aspose.Imaging.ImageOptions.PdfOptions.PdfDocumentInfo.Title

String Property - So we can set it manually.
I know Document.BuiltInDocumentProperties.Title can be set, but it’s not inside Words.Saving.PdfSaveOptions.

This will make the end user’s code more complex to handle it.
What if like Imaging, can be set inside Words.Saving.PdfSaveOptions like?

Words.Saving.PdfSaveOptions.DisplayDocTitleFileName As String
or
Words.Saving.PdfSaveOptions.DocTitle As String

No need to override the DisplayDocTitle behavior.
Just in case if DisplayDocTitle is going to get it from the file name and an stream is passed, use DocTitle to set the property.

This behavior looks best to me, how do you think?

Thanks :slight_smile:

@australian.dev.nerds The document title is taken from BuiltinDocumentProperties.Title property. So you can simply specify it.

1 Like

Please be kind and review the updated comments above :slight_smile:

@australian.dev.nerds The title is not supposed to be in PdfSaveOptions since Aspose.Words behaves the same way as MS Word and both Aspose.Words and MS Word takes document title from document built-in properties.