Skip to content

Hardcoded values in PDF export metadata - #2015

Merged
yflory merged 8 commits into
stagingfrom
hardcoded_pdfs
Oct 13, 2025
Merged

Hardcoded values in PDF export metadata#2015
yflory merged 8 commits into
stagingfrom
hardcoded_pdfs

Conversation

@zuzanna-maria

Copy link
Copy Markdown
Contributor

@zuzanna-maria zuzanna-maria self-assigned this Jul 29, 2025
@zuzanna-maria zuzanna-maria added the Ready to Review This PR is ready to be checked by another team member label Aug 11, 2025
@zuzanna-maria zuzanna-maria added Ready to Test This PR is ready to be tested and removed Ready to Review This PR is ready to be checked by another team member labels Sep 2, 2025

@yflory yflory left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread www/common/onlyoffice/inner.js Outdated
getEditor().asc_setCoreProps({
'title': title,
'creator': ''
});

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@yflory yflory removed the Ready to Test This PR is ready to be tested label Sep 29, 2025
@yflory
yflory merged commit d00f8e8 into staging Oct 13, 2025
@zuzanna-maria
zuzanna-maria deleted the hardcoded_pdfs branch February 10, 2026 11:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants