stable

Clone or download

Read-only

feat: apply styles defined in pdf template

The PDF template can provide its own style. Those style will be applied when the user asks for PDF export. We now use `print-js` library that will launch the print dialog on a given dom element. This dom element is responsible to give a printer version of the document. This allow us to not have to worry about buttons, modals, or other UI element that should not be printed. It is hidden by default on the screen view. Basic styles are added as an example. You can remove/change them to see the change whenever you want to print the artidoc. Those styles will be tailored later to have nice defaults. Part of story #38630: Export to file Change-Id: Id8cbb176e9918242e1dd4109c2ac45b799d781de

Modified Files

Name
M plugins/artidoc/scripts/artidoc/package.json +1 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/pnpm-lock.yaml +7 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/DocumentLayout.vue +2 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/export/pdf/PdfExportMenuItem.vue +22 −1 Go to diff View file
A plugins/artidoc/scripts/artidoc/src/components/print/PrinterVersion.vue +54 −0 Go to diff View file
A plugins/artidoc/scripts/artidoc/src/components/print/SectionPrinterVersion.vue +71 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/components/section/header/SectionHeader.vue +1 −1 Go to diff View file
A plugins/artidoc/scripts/artidoc/src/helpers/extract-artifact-sections-from-artidoc-sections.ts +37 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/helpers/pdf-template.ts +1 −0 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/helpers/stubs/InjectSectionsStoreStub.ts +6 −1 Go to diff View file
M plugins/artidoc/scripts/artidoc/src/stores/useSectionsStore.ts +9 −2 Go to diff View file
A plugins/pdftemplate/include/PdfTemplate/Default/pdf-template-default.css +50 −0 Go to diff View file
M plugins/pdftemplate/include/PdfTemplate/PdfTemplateCollectionRetriever.php +1 −0 Go to diff View file
M src/common/Export/Pdf/Template/PdfTemplate.php +1 −0 Go to diff View file