vscode-markdown-preview-enhanced
vscode-markdown-preview-enhanced copied to clipboard
Export to PDF (prince) not coloring full page
Description When using prince css settings to color the entire page a given color the export to PDF from this extension generates a PDF that has white background. Entering the same css (and html) on the prince’s site directly it generates a correct PDF. See the attachments.
Environment
- VSCode: 1.85.1
- Markdown Preview Enhanced: 0.8.11
How to reproduce Use a simple markdown (See “Some Document.md” attachment) (multiple paragraphs with title and headings).. and the css settings to color the entire page a given color (for prince pdf export)
body {
background-color: plum;
padding: 50px;
}
@page {
background-color: plum;
padding: 100px;
margin: 50px;
}
with proper integration in the extension’s style.less file:
/* Please visit the URL below for more information: */
/* https://shd101wyy.github.io/markdown-preview-enhanced/#/customize-css */
.markdown-preview.markdown-preview {
&.prince {
body {
background-color: plum;
padding: 50px;
}
@page {
background-color: plum;
padding: 100px;
margin: 50px;
}
}
}
The same markdown (as html) / css entered on prince’s site (https://www.princexml.com/try/) generates this PDF (entire page is plum).
While the Markdown Preview Enhanced extension generates this PDF (edges of the page are plum with the center white)
The original markdown:
And the html entered on prince’s site (same content as the markdown):