Comments (5)
It should be possible to change the output size just by modifying the CSS. I checked that when I originally wrote this extension. But it is possible that some change along the way messed that up. I'll check it out and get back to you!
from vscode-dmbinder.
Further to this I've rendered two documents, one A4, one with default measurements. The default measurements one works, as to be expected. The A4 one renders with white space on the right-hand and bottom-side of the page, and adds a blank page afterwards and the bottom of the page on a separate page (edited due to using wrong code). Attached is both the resulting PDF and the file used to generate it. Had to rename A4.md to A4.txt, so that it would upload to github.
from vscode-dmbinder.
Perfect! Thank you for providing those, they help immensely! I do see what you're seeing and I'll work on the fix!
from vscode-dmbinder.
Fixed in version 0.5.7
from vscode-dmbinder.
I will add additional features in a future version that will allow you to set the paper size for an entire campaign, but for your benefit, I made a quick fix for you to be able to set it on a per document basis until then! Simply set the page size at the very beginning (make sure there are no empty lines or any other text before this block or it will be rendered instead of interpreted as PDF options) of the markdown file like so:
---
pageSize: A4
---
<style>
...
</style>
Lorem ipsum
...
Notes
- For your reference (or anybody else's) until I can update the documentation, you can find a list of
pageSize
options in the changelog here.- These are defined by the
Puppeteer
library, so apologies if there are any paper sizes not supported.
- These are defined by the
- This options block isn't required for any markdown files, just the ones where you want to set the PDF's page size
- If you omit this option (or the whole block from
---
to---
) from a markdown file, it simply defaults to the 'Letter' setting
- If you omit this option (or the whole block from
- This does not fix needing to include custom CSS styles (at least not yet)
- If I remember to, I'll come back and comment on this issue when I add the ability to simply specify this option and not need any additional CSS styles to render non US Letter sized documents
from vscode-dmbinder.
Related Issues (18)
- PDF Rendering adds blank page to the end of every file
- "Automaticaly generate component blocks" tags and add spaces at the end of html self closing ones HOT 1
- Command Not Found HOT 3
- It would be interesting to see a 'jupyter notebook' style HOT 2
- Page Number code? HOT 4
- Issue with exporting files HOT 9
- DMBinder Extension Breaking Markdown Previews Outside of a Campaign HOT 1
- DMBinder view isn't filtered on file extension
- New issue with exporting to PDF. Possible Regression of Issue # HOT 2
- Needs support for installing to vscodium HOT 3
- Backgrounds / Stylesheet Images Not Loading HOT 5
- Split view breaks if more than one campaign in workspace
- background-url images not loading from any source HOT 6
- PDF Rendering doesn't work if you don't load the markdown-it module HOT 1
- PDF Rendering sometimes doesn't properly render capital letters HOT 2
- Component Autogeneration Removes Any Comments in the Markdown Document HOT 1
- Customizing css for rendering HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-dmbinder.