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

Print output limited to first page #266

Closed
silasdavis opened this issue Nov 8, 2022 · 4 comments
Closed

Print output limited to first page #266

silasdavis opened this issue Nov 8, 2022 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@silasdavis
Copy link

silasdavis commented Nov 8, 2022

I would like to use clerk to generate a PDF that can be combined into a broader data pack thingy.

I've tried printing to PDF from browsers but the browsers I have tested (Brave, Firefox) both only print a single page so it is heavily truncated.

Any idea on how I might get a
nice PDF output, or what would be required to implement such a feature?

Example:

https://github.clerk.garden/nextjournal/clerk-demo/commit/cb212b2edc64e762bcd1af56417ef9f6b2fde5b1/notebooks/data_science.html

produces:

clerk.pdf

@jackrusher
Copy link
Collaborator

Sorry, generating PDF is out of scope for Clerk. I recommend that you investigate other third party HTML->PDF solutions for this purpose.

@behrica
Copy link
Contributor

behrica commented Dec 1, 2022

I have the same issue.
The "Browser print function" does not work with Clerk.
So the html rendered by Clerk cannot be printed. (it apperas as a single page)

@jackrusher
Copy link
Collaborator

@behrica Yeah, there's something weird going on with the viewport in the rendered HTML. We intend to fix it, but it's also not a top priority atm.

@mk mk changed the title [Feature] PDF output? Print output limited to first page Feb 8, 2023
@mk mk reopened this Feb 8, 2023
@mk mk added the bug Something isn't working label Feb 8, 2023
@philippamarkovics
Copy link
Member

That only the first page was printing has already been fixed with 0bf2437. I’ve added a bunch of additional print styles (see 1709741) that hide superfluous elements, improve font size, &c, and try to avoid breaking in between elements (with medium success because browser sometimes enforce their own heuristics).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants