Cassandra, On Sep 26, 2013, at 10:39 AM, Cassandra Targett <casstarg...@gmail.com> wrote: >> I'll take a look at the CSS - this is the one, right?: >> <https://cwiki.apache.org/confluence/spaces/flyingpdf/viewpdfstyleconfig.action?key=solr> >> >> About the interim HTML, I found this description of how to get it: >> <https://confluence.atlassian.com/display/CONF35/Exporting+Confluence+Pages+and+Spaces+to+HTML>. > > My first reaction was that it wouldn't work: The HTML export exports > the selected pages into a .zip file of HTML files (one file for each > wiki page). The interim-HTML for the PDF is one big single HTML file. > They're different exports, using different stylesheets. However, it > would make sense if the HTML was similar, so I took a look with my own > Confluence instance and the two exports use many of the same divs for > the same elements. It's not 1:1, but you could at least figure out > what the right divs are. The big difference will be heading levels - > the PDF flattens them all depending on the page hierarchy. > > There are also CSS' in place that you don't see and default rules that > are applied if you haven't overridden them. And then I also think > there are some styles put into the HTML itself that would override > anything in the CSS. A few weeks ago I was working on a number of > possible changes to the PDF, the formatting of code samples being one > of them, but after two days working on it, I gave up for now. It > really isn't fun to work on.
I added the following to the PDF stylesheet: /* trim leading blank line from pre-formatted code blocks */ div.codeContent>pre { margin-top: -6px; } and it seems to do the trick - the top and bottom vertical whitespace look balanced to me now on two individual pages I exported. I'll export the whole thing now and look at every box to make sure this isn't doing the wrong thing somewhere. Steve --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org