Re: Code for publishing PDF from Confluence

Subject: Re: Code for publishing PDF from Confluence
From: Robert Lauriston <robert -at- lauriston -dot- com>
To: Melanie Albrecht <melanie -dot- albrecht -at- gmail -dot- com>, TECHWR-L Writing <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Tue, 8 Jul 2014 08:32:37 -0700

I've been using Confluence as my authoring environment for a year. It
works well, but I don't believe it's possible to get the native PDF
output to look professional.

https://answers.atlassian.com/questions/185951/documentation-pdf-export-a-la-atlassian-s

After spending a lot of time trying and not getting the information I
needed from Atlassian support, I gave up and have been using Scroll
PDF Exporter. Here's the custom content formatting CSS I use:

/* Enable heading numbering */
/* commented out by Robert */
/* @import url('css/common-heading-numbering.css') print; */

/* Enable toc numbering */
/* commented out by Robert */
/* @import url('css/common-toc-numbering.css') print; */

/* Generate border between header/footer and page content */
@page {
border-top: 1px solid black;
border-bottom: 1px solid black;
}

/* Export on title page */
div.titlepage {
position: relative;
min-height: 220mm;
}
div.titlepage .static {
position: absolute;
bottom: 0;
}

.titlepage .exportinfo {
padding: 2mm 5mm;
/* background-color: #eeeeee; */
}

.titlepage .exportinfo strong {
width: 20mm;
display: block;
float: left;
}

/* **** Robert's additions start here *** */

/* heading, paragraph, and character style overrides */

h1, h2, h3, h4, h5, h6 {
page-break-after: avoid;
font-weight: bolder;
font-family: SourceSansPro;
-fs-keep-with-inline: keep;
}

h1 { font-size: 2em; margin: .67em 0 }
h2 { font-size: 1.5em; margin: .75em 0 }
h3 { font-size: 1.17em; margin: .83em 0 }
h4 { font-size: 1em; margin: 1.165 em 0 }
h5 { font-size: .83em; margin: 1.5em 0 }
h6 { font-size: .75em; margin: 1.67em 0 }

body { font-family: SourceSansPro; }

p { font-size: 10pt; line-height: 12pt; margin: 0 0 6pt ; }

/* .wikicontent excludes TOC from change*/
.wikicontent ol,
.wikicontent ul {
margin-bottom: 6pt;
margin-top: 6pt;
}

/* add headers when table crosses page break */

div.tablewrap table.confluenceTable {
-fs-table-paginate: paginate;
border-collapse: separate;
border: 1px solid #DDDDDD;
border-spacing: 0px;
}

/* set monofont */

tt, code {
font-family: DejaVuSansMono;
font-size: 8pt; }
pre {
font-family: DejaVuSansMono;
font-size: 8pt;
line-height: 10pt; }

/* override TOC formatting */

ul.toc a:link { color: black; }

ul.toc a::after {
content: leader(dotted) target-counter(attr(href), page);
}

/* wrap pre text - disabled due to bug
see https://k15t.jira.com/browse/EXP-501

pre {
white-space: pre-wrap;
word-wrap: break-word;
} */

pre {
word-wrap: break-word;
} *


/* avoid bad page breaks */

div.section-1 {
page-break-before: always;
}

/* for keep-with-next-p macro */

li.keep-with-next, p.keep-with-next {
page-break-after:avoid;
}



On Tue, Jul 8, 2014 at 4:09 AM, Melanie Albrecht
<melanie -dot- albrecht -at- gmail -dot- com> wrote:
> Hello
>
> Next week, I start a new job, writing doc for users and administrators of a
> big complex security software product.
>
> The Development team already use Confluence for their internal wiki, and I
> am considering using it to also write the doc. However, the boss really
> wants me to be able to publish as PDF.
>
> The internet tells me that you can configure Confluence to produce a
> pleasant-looking PDF, using CSS and HTML.
>
> However, I have not been able to find any examples. I can write clean HTML
> and really basic CSS, but I have no idea where to start with this.
>
> Do you know of any examples?
>
> Also, do you have any opinions about the sensibleness of authoring in
> Confluence and publishing to PDF?
>
> Thanks,
> Melanie
>
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Doc-To-Help 2014 v1 now available. SharePoint 2013 support, NetHelp enhancements, and more. Read all about it.
>
> Learn more: http://bit.ly/NNcWqS
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> You are currently subscribed to TECHWR-L as robert -at- lauriston -dot- com -dot-
>
> To unsubscribe send a blank email to
> techwr-l-leave -at- lists -dot- techwr-l -dot- com
>
>
> Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
> http://www.techwhirl.com/email-discussion-groups/ for more resources and info.
>
> Looking for articles on Technical Communications? Head over to our online magazine at http://techwhirl.com
>
> Looking for the archived Techwr-l email discussions? Search our public email archives @ http://techwr-l.com/archives


^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Doc-To-Help 2014 v1 now available. SharePoint 2013 support, NetHelp enhancements, and more. Read all about it.

Learn more: http://bit.ly/NNcWqS

^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-leave -at- lists -dot- techwr-l -dot- com


Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
http://www.techwhirl.com/email-discussion-groups/ for more resources and info.

Looking for articles on Technical Communications? Head over to our online magazine at http://techwhirl.com

Looking for the archived Techwr-l email discussions? Search our public email archives @ http://techwr-l.com/archives


References:
Code for publishing PDF from Confluence: From: Melanie Albrecht

Previous by Author: Re: user expecttations - web-based help
Next by Author: Re: Code for publishing PDF from Confluence
Previous by Thread: Re: Code for publishing PDF from Confluence
Next by Thread: Re: Code for publishing PDF from Confluence


What this post helpful? Share it with friends and colleagues:


Sponsored Ads