Conversation
|
Size Change: +31 B (0%) Total Size: 4.2 MB
|
bb87039 to
d9c3b8b
Compare
88608a6 to
d950526
Compare
|
🚀 Preview will be available at https://1832-docs.ppr-docs.beta.numerique.gouv.fr/ You can use the existing account with these credentials:
You can also create a new account if you want to. Once this Pull Request is merged, the preview will be destroyed. |
859c3ae to
5576c01
Compare
c2979d3 to
1df902a
Compare
src/frontend/apps/impress/src/features/docs/doc-export/utils_print.ts
Dismissed
Show dismissed
Hide dismissed
1df902a to
b674d65
Compare
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
113fa60 to
1a926bb
Compare
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
We can now print a doc with the native browser print dialog. This feature uses the browser's built-in print capabilities to generate a print preview and allows users to print directly from the application. It has as well a powerfull print to PDF feature that leverages the browser's PDF generation capabilities for better compatibility and quality. Co-authored-by: AntoLC <anthony.le-courric@mail.numerique.gouv.fr> Co-authored-by: Cyril <c.gromoff@gmail.com>
We added a feature to print documents directly from the browser. The function is called `window.print()`, this name collides with Python's `print()` function. To avoid false positives in our CI when checking for print statements, we limit the search to only the backend code.
When trying to print with a embed PDF the browser's print dialog stays blocked and the user can't print the document. Changing the PDF block to use an iframe instead of an embed resolves this issue.
We harden the security check on url to prevent attacks.
When comparing PDF screenshots, we can have some minor differences due to the different environments (OS, fonts, etc.). To avoid false positives in our regression tests, we can set a threshold for the number of different pixels allowed before considering the test as failed. If the test fails we will now report the PDF and the differences to identify quickly what are the regressions.
1a926bb to
1d8b730
Compare
|
Seems like a sensible approach. You lose a bit of control versus first converting to Typst and then to PDF, but it gives you a bit more control on the front-end |
Purpose
If we want to print our docs, they are now displayed correctly.
Demo
Enregistrement.2026-01-26.114028.mp4