-
-
Notifications
You must be signed in to change notification settings - Fork 6
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
Improved printing to PDF #206
Comments
I started making some of these improvements while working on the new In general, for any element we want to hide on print, it's as simple as adding this to the
That made it easy to hide the back button and some of the end bits. Because we wanted to hide items defined in the base I also learned that, for tables and figures, we can add this style to them:
This generally prevents figures from getting split, but, it can create some obnoxiously large white space. Probably worth doing, as any more complex solution would (probably?) involve a more sophisticated layout engine. If we want to do this, we should probably do it on the |
I think we can mark this one off after #227. There are still cases where some long figures may get broken up. Like we discussed, we can always put a |
It looks like we also may need to make some changes to specifically target Firefox, where the header and charts each have issues. |
New issue that popped up... for charts specifically, with current settings, the top-most tick label can potentially get cut off and appear on the previous page. A simple solution that worked in at least one example was to simply add some padding above the figure. We could build a print-specific padding into the |
Tracking improvements in generating PDFs from our Articles here on the Research page. Some of these things will be specific to Articles, whereas others will likely generalize to other use cases (like the Blog). Some specific things listed below, possibly worth creating separate issues for depending on their complexity. I think most of this can be done by tweaking our print-specific styles and then relying on Print -> Save as PDF, rather than engineering some brand new PDF solution.
A current PDF is enclosed here for reference.
CarbonPlan-2021-Forest-Risks-Explainer.pdf
cc @katamartin
The text was updated successfully, but these errors were encountered: