Let Settings → Export set or strip the metadata of exported files (#878) #1061
No reviewers
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo!1061
Loading…
Reference in a new issue
No description provided.
Delete branch "878-export-metadata"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A new Settings → Export page says what every exported PDF, Word and
OpenDocument file carries. For each of the title, the author, the subject,
the keywords and the language a person chooses from the document (what
an export always wrote, and the default), always this with a value of
their own, or leave it out. One switch, Strip all metadata, leaves out
everything but the language. The language stays unless it is turned off
as well, and the page says why: a screen reader reads a file in the
language it declares, and PDF/UA requires one.
The choice is eleven new profile fields (accounts migration 0048).
documents.properties.Policyreads them andresolveis the one placethe layers meet: the document's values, then the default, then whatever
was typed for one file in the export dialog (#480), which still goes
over the default, and strip all last, as a promise about every file.
The Word and OpenDocument writers, the PDF's page and the snapshot title
all go through it. The export dialog starts from the default, and while
everything is stripped it says so, with a link, instead of showing fields
it would ignore. A file whose title is left out is still downloaded under
the neutral title, and a stripped snapshot is recorded as sent without
its properties.
A language left out leaves the properties, not the text: the Word and
OpenDocument styles still set the paragraphs in it, and the PDF's page
keeps its
lang, since WeasyPrint hyphenates and picks fonts by it.WeasyPrint has no option for leaving its name out: it writes /Producer
into the information dictionary and pdf:Producer into the XMP packet
regardless. It does take a finisher, called before a byte is written, so
pdf.finishtakes out /Producer, /Creator and the dates (and their XMPcounterparts) when everything is stripped, and /Lang when the language is
left out. The page asks for that in a
<meta name="postulo-scrub">,which WeasyPrint reads as custom metadata and writes nowhere. The
Chromium backend is not changed, and still names itself.
base_portfolio.html read the contact's name straight into
<meta name="author">, so a portfolio exported without its propertiesnamed its author all the same; it now writes the properties as base_cv
does.
The setting is part of the account archive: format 76, written and read
back through each column like the other preferences.
The default lives in Settings only. A per-document choice of from the
document, always this or leave it out in the export dialog is left
for later.
Closes #878
Notes for review
dc:languageand the PDF's/Langonly. The page'slangand the DOCX/ODT styles keep it, because hyphenation and font choice depend on it.finisherhook (pdf.finish). It removes/Producer,/Creator, both dates and their XMP counterparts.pdf/ua-1. The decision kept only the language.base_portfolio.htmlwrote the contact as author even when exported without properties.PROFILE_FIELDS. Migrationaccounts 0048_export_metadata.🤖 Generated with Claude Code
6692e75a20f23f34e29af23f34e29af8878c8f61f8878c8f61f5836719bff5836719bfa58db02dd7a58db02dd7ecd2a497a5ecd2a497a56f95f7c9c9