tag:support.markedapp.com,2011-09-11:/discussions/problems/94813-background-css-images-not-exportingMarked: Discussion 2015-12-17T20:31:17Ztag:support.markedapp.com,2011-09-11:Comment/358215612015-01-19T21:43:28Z2015-01-19T21:43:28Zbackground CSS images not exporting<div><p>I forced backgrounds to white in a recent update, which turned
out to be<br>
a bad idea. I had done it for consistency in exporting the
built-in<br>
themes, but didn't account for cases like yours. The next update
will<br>
restore the functionality.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/358215612015-01-19T21:48:47Z2015-01-19T21:48:48Zbackground CSS images not exporting<div><p>Thanks Brett, I appreciate the quick response.</p></div>Norm Copelandtag:support.markedapp.com,2011-09-11:Comment/358215612015-07-11T04:01:51Z2015-07-11T04:01:51Zbackground CSS images not exporting<div><p>Is this still an issue? I'm trying to use an image as a kind of
letterhead-ish thing at the top of the page, and it shows up in
Marked, but doesn't export to PDF. The image below shows my Marked
preview. The PDF leaves the space, but no background-image. I've
tried it in both SVG (preferred) and PNG formats.</p></div>davidjohnmacdonaldtag:support.markedapp.com,2011-09-11:Comment/358215612015-07-11T13:21:57Z2015-07-11T13:22:14Zbackground CSS images not exporting<div><p>The current version of Marked 2 sets backgrounds to white when
exporting via the print system. You have to override this using the
@media print {} css block in your custom CSS. See this post from
<a href="http://mygeekdaddy.net/2015/07/03/getting-my-daily-to-do-list-out-of-omnifocus/">
MyGeekDaddy.net</a> for an example.</p>
<p>Note that Marked adds a body class based on the name of your
custom css file, which can be used to create a rule with higher
specificity in order to override the default page background
settings. So if your CSS file is named "Custom.css", you can use
"body.custom" in the @media print {} block to set your own
background for print.</p>
<p>Also note that there are margin and size changes that take
place, so the position of the exported background may take some
additional tweaks to get it where you want it in the output.</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/358215612015-07-11T13:41:13Z2015-07-11T13:41:13Zbackground CSS images not exporting<div><p>Perfect. Thanks, Brett. My only nitpick is that it seems like I
have to put a !important after every line of my @media print block
to override the white background. It's not a big deal; just looks a
little weird. However, it functions great.</p>
<p>I didn't know about @media print before. Very handy. I plan on
using it a lot more now.</p></div>davidjohnmacdonaldtag:support.markedapp.com,2011-09-11:Comment/358215612015-12-16T12:04:40Z2015-12-16T12:04:40Zbackground CSS images not exporting<div><p>Hi,</p>
<p>I am having the same problem, however I can not get it
running.</p>
<p>I added this to the body and to the @media print
"body.custom":<br></p>
<pre>
<code>background: url('...Logo.pdf') no-repeat right top;</code>
</pre>
The Preview works put I do not get the desired result for the pdf
output.<br>
Can you help me?<br>
Maybe someone can provide a css that works?</div>k.wilczektag:support.markedapp.com,2011-09-11:Comment/358215612015-12-16T14:50:33Z2015-12-16T14:50:33Zbackground CSS images not exporting<div><p>Positioning logo images for print vs preview is not easy and
often<br>
requires extra markup. I may be able help to some extent if you
post<br>
images of the preview, your current CSS, the logo image, and any
details<br>
about what the PDF is giving you vs what you need.</p>
<p>Because this isn't currently a feature of Marked 2, I can't put
a lot of<br>
time into hacking away as part of customer support, just as a
warning.</p>
<p>-Brett</p></div>Bretttag:support.markedapp.com,2011-09-11:Comment/358215612015-12-17T20:31:15Z2015-12-17T20:31:15Zbackground CSS images not exporting<div><p>Her my css and the logo that I changes a bit to keep it
anonymous.</p></div>k.wilczek