Hardcoded values in PDF export metadata - #2015
Conversation
zuzanna-maria
commented
Jul 29, 2025
- Metadata of Presentation exports (PDF format) no longer show incorrect hardcoded values for 'Author'/'Title' ('Author' removed, 'Title' is now title of Presentation document) (fixes Presentation’s PDF exports have hardcoded properties #1981)
yflory
left a comment
There was a problem hiding this comment.
As explained in a comment, I'm not sure this is the correct solution to fix this issue. With this change, we're going to remove the "creator" field from document imported by users into CryptPad using the "File"/"Import" menu.
I think a cleaner way to fix the original issue would be to remake the base templates for empty documents (spreadsheet, doc and slides). This would also allow us to change the default language to English instead of French. But there is a risk of breaking all the existing CryptPad OO documents if we change the base template so we'd have to properly test it.
If it's too difficult to change the base template without breaking the current documents, we should improve this PR by only calling this asc_setCoreProps function if the document has not been imported.
My comments are mainly about the "creator" field. I think it's fine to update the title every time the user wants to exports the file.
| getEditor().asc_setCoreProps({ | ||
| 'title': title, | ||
| 'creator': '' | ||
| }); |
There was a problem hiding this comment.
It's nice to have found this API to change the title and creator of the inner document properties, but I think we should use it a bit more carefully.
I don't think we should erase the creator everytime: when users import an existing document into CryptPad, they probably want to preserve the original metadata.