Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

HTML support #3

Open
DanielJackson-Oslo opened this issue Mar 2, 2020 · 6 comments
Open

HTML support #3

DanielJackson-Oslo opened this issue Mar 2, 2020 · 6 comments

Comments

@DanielJackson-Oslo
Copy link

Hi!

Have you attempted integrating something like https://wkhtmltopdf.org/ for full HTML support?

@jussiniinikoski
Copy link
Owner

No I haven't, JSON is currently somewhat easier format to structure around. We could try to have some inline elements like anchors or other formatting tags in Paragraph elements..

@DanielJackson-Oslo
Copy link
Author

I did some research, and seems like wkhtmltopdf and all other html + css readers are too complex for wasm, as f.ex. wkthmltopdf includes all of Qt. :(

@DanielJackson-Oslo
Copy link
Author

My usecase is to generate PDFs from HTML emails. Easy to do backend, but I'd like to do it client side for privacy and security reasons.

@jussiniinikoski
Copy link
Owner

If you need to reproduce the actual appearance of the email, then it will be pretty difficult at the moment. You'd essentially need a browser in browser to provide layout, styles etc.

But if all emails look the same then you could propably "hardcode" styling into WASM output..

@llamadeus
Copy link

@DanielJackson-Oslo I'm trying to do something similar. This is a great project. I really like the idea of implementing a pdf library in Rust for WASM and I really appreciate your effort @jussiniinikoski, but IMHO pdfmake seems like the next best option.

@niutech
Copy link

niutech commented May 23, 2023

If Qt apps, QML browser or PC emulators can run in WASM, why couldn't a headless web engine be ported to WASM? Maybe port litehtml or lexbor to WASM and integrate with WASM-PDF?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants