fix: hide diagram toolbars during PDF export (#204)#208
Conversation
|
@rajat12826 is attempting to deploy a commit to the ThisIs-Developer Team on Vercel. A member of the Team first needs to authorize it. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Thanks @rajat12826 for submitting a proposed fix and sorry for the delayed response. I tested both provided examples and also checked the current behavior, but I was not able to reproduce the issue on my side. The Mermaid controls, such as Fullscreen, Copy, PNG, and SVG, are not appearing in either the PDF preview or the exported PDF for me. Could you please share the exact reproduction steps, including the Mermaid code? A short screen recording would be especially helpful. That will help me verify the issue properly and review the PR accurately. |
Screencast.From.2026-07-05.20-10-58.mp4Thanks for checking! I've attached a short screen recording showing the issue on my setup. The video demonstrates the reproduction steps and shows that the diagram toolbar icons are included in the exported PDF before applying this fix. |
|
Hi @rajat12826, I have a small request. I use Windows, so I cannot properly test the app on macOS Safari or Chrome. I used BrowserStack for a quick test, but the session ends after around one minute, so it is difficult to test many features. Could you please check a few features on macOS, especially in Chrome and Safari? No pressure at all. If you notice any issue, please let me know. It would help me review and fix it properly. Thank you again for your help. |
|
Thank you! Thanks again! |


Fixes #204
Description
When exporting a document to PDF via the print layout, UI elements such as the fullscreen and copy icons for Mermaid and other diagrams were unintentionally remaining visible on the generated PDF.
This PR resolves the issue by updating the
@media printCSS block instyles.cssto hide all diagram-specific toolbars during PDF export, ensuring a clean document without interactive UI artifacts.Changes Made
.diagram-toolbar,.mermaid-toolbar,.abc-toolbar,.plantuml-toolbar,.d2-toolbar,.graphviz-toolbar,.stl-toolbar) to thedisplay: none !important;rule within the@media printblock.