Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Dynamic Title Pages

Drew Miller November 20, 2013

In confluence, when I export a page/space I would like a dynamically made title page to be created. What is the best way to go about this?

So far I have tried going to the look and feel under spaces and adding code to the PDF layout and stylesheet.

Ideally I would like a full page image with title text(from the page/solution) for the cover, and on the next page, table of contents. The code I have below kinda of does this, but simple tradtional CSS attributes like changing the 'color' of the title do not work. Forget about trying to do a gradient, which is a feature I would like implemented in future releases. Addtionally , debuging the code is painstankly slow, eg making style sheet changes, saving them, navigating to a page, exporting to a pdf, generating the pdf, downloading the pdf, ect , to see the changes is a 3-4 minute process each time.

Is there anymore documentation, debugging, or solutions that you can reccomend? The only other idea I can come up with is going in confluence source and adding in a custom method call that will do exactly what I want, but this has the downside of a deployment cost and lacks support for future releases.

Code for Layout:

  1. <div class="fsTitlePage" style="margin-left:auto;margin-right:auto; page-break-after:always; height:800px; width:500px; ">
  2. <img style="position:absolute; left:0;top:0;" src="http://d2l72tm4ce9ozj.cloudfront.net/confluence_template/cover.jpeg" />
  3. </div>

Code for Stylesheet:

  1. .fsTitlePage
  2. {
  3. position:relative;
  4. color:white;
  5. }
  6. .fsTitle
  7. {
  8. font-size: 42px;
  9. font-weight: bold;
  10. margin: 72px 0 4px 0;
  11. text-align:center;
  12. color:white !important;
  13. }
  14. /* Turn off the default section numbering for this TOC item */
  15. .toclvl0:before
  16. {
  17. display:none;
  18. counter-reset: chapter 0;
  19. }
  20. /* Hide the default page numbering for this TOC item */
  21. .toclvl0 .tocnum
  22. {
  23. display: none;
  24. color:white !important;
  25. }
  26. /* Move and style this TOC item */
  27. .toclvl0
  28. {
  29. position:absolute;
  30. top:450px;
  31. left:100px;
  32. font-size: 38px;
  33. font-weight: bold;
  34. margin: 125px 0 4px 0;
  35. text-align:center;
  36. color:white !important;
  37. }
  38. @page
  39. {
  40. margin-top: 2.54cm;
  41. margin-bottom: 2.54cm;
  42. margin-left: 1.27cm;
  43. margin-right: 1.27cm;
  44. @bottom-left
  45. {
  46. content: "Copyright © 2013, OpenPeak Inc.";
  47. font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
  48. font-size: 8pt;
  49. color:grey;
  50. }
  51. @bottom-right
  52. {
  53. content: "OpenPeak Confidential and Proprietary";
  54. font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
  55. font-size: 8pt;
  56. color: grey;
  57. margin-bottom:5px;
  58. }
  59. @top-right
  60. {
  61. content: "Page " counter(page);
  62. font-family: ConfluenceInstalledFont, Helvetica, Arial, sans-serif;
  63. font-size: 8pt;
  64. color:grey;
  65. }
  66. /* Any other page-specific rules */
  67. }
  68. table.sectionMacro
  69. {
  70. table.sectionMacro
  71. {
  72. display: table;
  73. }
  74. table.sectionMacro>tbody
  75. {
  76. display: table;
  77. }
  78. table.sectionMacro>tbody>tr
  79. {
  80. display: table-row;
  81. }
  82. table.sectionMacro>tbody>tr>td
  83. {
  84. display: table-cell;
  85. }
  86. }

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Josch Bencke
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.
November 25, 2013

Puhhh .... I used Scroll office for this :D Much easier ;-)

TAGS
AUG Leaders

Atlassian Community Events