Just type in the CSS you want to apply, as though you were putting it in a file. Here’s an example which will at least show you that the CSS is getting applied:
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
border: 0;
font-family: inherit;
font-size: 200% !important;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0;
padding: 0;
vertical-align: baseline;
}
Copy and paste the above into the Custom CSS box and click the box to apply it. Save your settings and then open a page on your site and click the PDF button. That should give you some idea of what it can do to the output.
TCPDF does not actually read an external file for CSS. Instead, the style data in the file must be embedded in the HTML fed to it. Storing it in the db is actually easier than providing a method for editing the CSS and then saving to an external file (though I originally considered doing that).
The roadmap for the plugin provides that at some point, we want the shortcode to allow for importing an external CSS file. This would/will make it easy to apply a specific set of styles to a single post (or group of them), overriding the site-wide CSS stored in the db.
If you look at the main class (wp-post-to-pdf-enhanced.php), scan down to line 365 (version 1.0.2) to see how we inject the CSS into the HTML for handing off to TCPDF:
// Apply global css, if set in config
if ($this->options['applyCSS']){
$html .= '<style>'.$this->options['customCss'].'</style>';
}
You can see that what we’re doing is just taking the CSS from the database and wrapping it in <style>
tags.
I hope this answers your question!
Cheers
Lewis