How to insert into "PDF Space Export Title Page" HTML the first page title selected for export?

Graham Hannington March 15, 2019

I'm choosing my words carefully here, because I've seen similar questions derailed by wording issues...

I have a page in my personal Confluence space. The page has multiple descendant pages in its tree hierarchy. I want to export that page and its descendants to a single PDF file. I want the title page of the PDF to cite the title of that "root" page.

I can do that just fine.

My problem: each time I want to do that—export a different root page and its descendants to a PDF—I have to edit the "PDF Space Export Title Page" HTML and manually insert (paste) the title of the root page.

For example, given the following tree hierarchy of pages that I want to export to a single PDF:

  • Migrating from A to B
    • History
    • Required tasks
      • Task 1
      • Task 2
      • Task 3
    • Differences between A and B

I must edit the "PDF Space Export Title Page" HTML, and insert the text "Migrating from A to B". For example (some details of this HTML are specific to my space, my CSS):

<div class="pagebreak">
<p><img style="height: 0.75in;" src="/download/attachments/197013166/MyCompany_Logo.png"/></p>
<h1 class="cover">Migrating from A to B</h1>
<p>My name<br/>
15 March 2019</p>
</div>
<div class="pagebreak">
<h1>About this document</h1>
<p>This document consists of pages from the internal Company wiki that have been exported to a portable document format (PDF) file.</p>
<p>Some links in this document refer to wiki pages not included in this document. These links refer to the live wiki on the Company intranet.</p>
</div>
<h1>Contents</h1>

I don't want to do that. I don't want to have to manually insert the page title.

I want to specify a placeholder instead. (How) can I do that?

I don't want to install a plugin. I understand that some plugin developers might respond, "That's a shame, because my plugin can do that"!

I have a similar question about inserting the current date in the PDF title page. I've seen similar questions; but again, they've been derailed by wording issues. So I might create a separate question about that. Maybe user name, too.

 

 

1 answer

0 votes
Vero Rivas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2022

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events