PDF export (Rust-native) #679
Replies: 3 comments 4 replies
-
|
Hi, excellent idea! Do you think this would be a completely independent tool? Would you want to print to PDF the canvas as it is or are you thinking in creating a completely new backend? |
Beta Was this translation helpful? Give feedback.
-
|
I'm very interested in giving some help developing this adapter. However, I'm currently tied up with other commitments and realistically won't be able to contribute for now. That said, I'd like to share something that might be useful in the meantime: here's a link to the PDF export logic/code we implemented for a
|
Beta Was this translation helpful? Give feedback.
-
|
After some research and thinking more about this, I think the more robust direction is a dedicated print-layout pipeline:
So the PDF backend itself could still be modular, but the important part is probably the intermediate print layout model. That avoids coupling PDF export too tightly to the interactive spreadsheet canvas, while still allowing the existing editor to call it as an export feature. A simple first version could support active-sheet export with practical defaults, but I think the API should avoid assuming “one sheet = one PDF page”. Large sheets may span multiple pages, selected ranges may be exported, print areas may define separate page blocks, and multi-sheet exports may need per-sheet settings. The shape I would imagine is something like:
I have a more detailed pseudo-API sketch if useful, but the core idea is: The PDF export should probably be modeled as a spreadsheet print/export pipeline, not as a direct canvas snapshot. Therefore a separate package. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi! Would you consider adding PDF export support (e.g., export a worksheet to a paginated PDF)?
A Rust-native PDF export would fit nicely with with the project's Rust-first approach and would also be useful for WASM/server environments.
Implementation idea (optional):
This could be done by introducing a render/layout layer that produces “drawing primitives” (rects/lines/text/images) and then a PDF backend.
Possible Rust PDF backends I found:
If this is something you’d be open to, I’m happy to help — especially the PDF backend portion.
Beta Was this translation helpful? Give feedback.
All reactions