Open MSoeb opened 1 year ago
The base html-to-pdf.service.ts
in the client that is responsible for this translation is supposed to be a more generic type of class with no specific OpenSlides functionality.
It therefore wouldn't be very appropriate to change the element styles to fit the OpenSlides-specific styles, however I think it would be possible to add the ability to define a set of custom styles when calling the convertHtml
function.
In that case we could define a global constant with style definitions that result in the above, that can be imported and given to the function as needed (named something like OPENSLIDES_PDFMAKE_STYLES
)
In that case we could define a global constant with style definitions that result in the above, that can be imported and given to the function as needed (named something like
OPENSLIDES_PDFMAKE_STYLES
)
On second thought, since in Openslides h1
always has the accent color of the current theme, it should probably not a constant and we should define a getter function in some common service that accesses the theme
From my naive perspective, it looks like the styles are defined in https://github.com/OpenSlides/openslides-client/blob/78cf482ef2dfbef592b9fd53a6cd43708a73d354/client/src/app/gateways/export/html-to-pdf.service/html-to-pdf.service.ts#L59-L64 and could just be adapted to a dynamic parameter based on the current style.
if the pdf is shown in the current style, it will be better for the user to orient himself in the pdf while reading because it is the same layout like openslides then
The layout of the headings changed with the integration of the new editor. Here is the new difference between headings in the motion and the export:
Motion headings:
PDF headings:
Description: The formatting of headings is not identical in OpenSlides and in exported PDF documents.
Openslides formatting:
PDF export formatting:
Reproduction:
What should happen: The formatting should be identical between OpenSlides text edit and pdf export.
Update 28.10.2024: Please take care of the comment, what has changed with the new editor.