Print preview, save as PDF, document has borders
Hello:
I absolutely love marked! I am using it to create a technical book and want to output the document as PDF. I am making use of the page break comment functionality to enable page breaks when using print preview -> pdf conversion. The page breaks work wonderfully. However, I notice when I go that route that my entire document has a gray border around the edges. This border does not show up if I simply export to PDF. I would just export to PDF but that doesn't respect my breaks. :(
--
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Brett on 13 Jan, 2013 04:03 PM
Are you using the Github theme? It includes a grey border which will show up in export. If you want to work around that, you can create a custom CSS file that removes the border and keeps the rest the same. The base stylesheets and instructions are here. Let me know if you need a hand with the CSS.
2 Posted by Grant Shipley on 14 Jan, 2013 08:24 PM
Yeah, some help would be great as I have never used CSS. I see several border tags in the .css file but most seem to be applied to tables?
I assume it may be somewhere in this block:
@media print {
}
3 Posted by Grant Shipley on 14 Jan, 2013 09:06 PM
Ah, I think I figured it out. I downloaded the default styles and removed the border from the #wrapper and that seems to work. Am I missing anything here?
wrapper {
}
to
wrapper {
}
Support Staff 4 Posted by Brett on 14 Jan, 2013 09:10 PM
Nope, that's exactly right. Nice work :).
5 Posted by jamie on 01 Apr, 2014 10:47 PM
I'm having a similar issue with the Marked theme for Byword (http://bywordapp.com/extras/). I don't see a colored border when the using the theme in Marked 2, but when I export to PDF there's a grey border. I want to remove the grey border in the PDF. I took a look at the CSS, but I don't see where to remove the border. Can you point me in the right direction? Also, is there a way to inspect the css that will be rendered to PDF so I can find where I need to make changes?
6 Posted by jamie on 02 Apr, 2014 02:31 AM
I tried adding the following CSS to the Additional CSS box in preferences, but I still get the grey border:
@media print {
#wrapper {
border: none;
}
}
Support Staff 7 Posted by Brett on 02 Apr, 2014 01:25 PM
In the @media print section, add background-color: #fff to the body
rule.
body {
overflow: auto;
background-color: #fff;
}
You can inspect using right-click->Inspect Element, but you can't
specifically inspect the PDF/Print output.
-Brett