Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pdf support #114

Merged
merged 13 commits into from
Feb 2, 2024
Merged

Pdf support #114

merged 13 commits into from
Feb 2, 2024

Conversation

Sowasvonbot
Copy link
Contributor

Enable pdf as command line flag for --output-formats and render the html-document to a pretty printed pdf

@Sowasvonbot Sowasvonbot reopened this Dec 10, 2023
@mhatzl
Copy link
Contributor

mhatzl commented Dec 20, 2023

Converting supported.um to PDF prints the following error message:

thread '<unnamed>' panicked at C:\Users\ManuelHatzl\.cargo\registry\src\index.crates.io-6f17d22bba15001f\headless_chrome-1.0.8\src\browser\transport\web_socket_connection.rs:117:25:
Got a weird message: Close(Some(CloseFrame { code: Normal, reason: "" }))

The PDF is correctly generated, but I guess headless chromium fails at cleanup?

@Sowasvonbot
Copy link
Contributor Author

Converting supported.um to PDF prints the following error message:

thread '<unnamed>' panicked at C:\Users\ManuelHatzl\.cargo\registry\src\index.crates.io-6f17d22bba15001f\headless_chrome-1.0.8\src\browser\transport\web_socket_connection.rs:117:25:
Got a weird message: Close(Some(CloseFrame { code: Normal, reason: "" }))

The PDF is correctly generated, but I guess headless chromium fails at cleanup?

This Bug is known in headless-chrome: rust-headless-chrome/rust-headless-chrome#441
Will be fixed in the next release

Copy link
Contributor

@mhatzl mhatzl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good for the initial pdf support.
The CloseFrame error is fixed in the main branch of headless chromium, but this version is not yet published.
We internally agreed to wait for the official release, because the pdf is rendered correctly already anyways.

@mhatzl mhatzl marked this pull request as ready for review January 29, 2024 15:50
@mhatzl mhatzl merged commit 498ca1f into unimarkup:main Feb 2, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants