You can export your Confluence content to PDF by using one of the default templates included with the app, or your own custom template.

Export to PDF

Depending on whether you use a default template or a custom template, you can use the selected template to export your Confluence content. Simply open the page you want to export, then click Page Tools (•••)Export to PDF. Make sure to select the option with the PDF icon, otherwise you'll be using Confluence's inbuilt PDF Exporter.

This opens the export dialog, where you can choose which template you want to use. After selecting your desired template, you can click Show Details to display several customization options:

TabNameDescription
LabelsInclude/excludeDefine page labels to include/exclude child pages - learn more here
LabelsIndex termsIf checked, page labels will be used as index terms
ContentEnable numbered headingsIf checked, headings will use the numbering defined in the export template
Content

Keep multi-column page layouts

If checked, the export uses the Confluence page layout
ContentEnable links to external websitesIf checked, web links in the PDF will be clickable
ContentEnable links to Confluence

If checked, links to your Confluence site will be clickable

ContentRepeat table header if table breaks to a new pageIf checked, table headers will be repeated if the table breaks onto a new page
ContentInsert a page break after every Confluence pageIf checked, a page break will be inserted after every Confluence page in the PDF export
ContentAttachmentsIf the option Embed referenced attachments is checked, the generated PDF export will contain the attachments included on the exported pages
MacrosShow 'Table Of Content' macro outputIf checked, the Confluence Table of Contents macro (if added to the page) will be included in the export
MacrosShow 'Children' macro outputIf checked, the Confluence Children Display macro (if added to the page) will be included in the export
MacrosConvert image gallery tables to listsIf checked, images in gallery macros are displayed in a list rather than a grid
CaptionsFigure captions

If an image is assigned a caption using the Scroll Title macro, you can select whether to display that caption before or after the image

CaptionsTable captionsIf a table is assigned a caption using the Scroll Title macro, you can select whether to display that caption before or after the table
File OptionsOptimize links for printing

If checked, a footer section displaying the full URLs of all links on the page is added. Further customisation options remain available for link suffixes, see Define template settings for additional information.

File OptionsMake document PDF/A-3 compliantIf checked, a PDF/A (ISO-standardized) version of the PDF is created upon export. This file type is intended for archiving purposes and long-term preservation of electronic documents.
File OptionsImage compressionDefine whether images are compressed in the export. Reducing the image quality (e.g. Low quality), increases the compression for exported images and will reduce the size of the exported file. As a result, images may appear distorted.

PDF Metadata

Title/Author/Subject/Keywords

Define metadata within the available fields to include in the generated PDF export

BookmarksPDF Bookmarks

Define the number of heading levels used to create bookmarks in the generated PDF Export. After choosing a specific heading level, PDF bookmarks will be created for the selected and all previous heading levels.

e.g. Choosing Heading 3 will create bookmarks for heading levels 1, 2 and 3.

BookmarksExpanded levels

Define how many bookmark heading levels are displayed in the export. Bookmarks will be expanded up until the selected heading level

BookmarksBookmarks PanelIf checked, the bookmark panel will automatically be displayed when the export is opened in the PDF reader (eg. Adobe)

After you have selected the customization options you want, click Export.

Hide elements of the export dialogue

 Click here to expand...

If you want to hide certain elements of the export dialogue from users, you can do so by injecting custom CSS into the export dialog iframe. Copy the following code:

<script>

	var Arrive=function(e,t,n){"use strict";function r(e,t,n){l.addMethod(t,n,e.unbindEvent),l.addMethod(t,n,e.unbindEventWithSelectorOrCallback),l.addMethod(t,n,e.unbindEventWithSelectorAndCallback)}function i(e){e.arrive=f.bindEvent,r(f,e,"unbindArrive"),e.leave=d.bindEvent,r(d,e,"unbindLeave")}if(e.MutationObserver&&"undefined"!=typeof HTMLElement){var o=0,l=function(){var t=HTMLElement.prototype.matches||HTMLElement.prototype.webkitMatchesSelector||HTMLElement.prototype.mozMatchesSelector||HTMLElement.prototype.msMatchesSelector;return{matchesSelector:function(e,n){return e instanceof HTMLElement&&t.call(e,n)},addMethod:function(e,t,r){var i=e[t];e[t]=function(){return r.length==arguments.length?r.apply(this,arguments):"function"==typeof i?i.apply(this,arguments):n}},callCallbacks:function(e,t){t&&t.options.onceOnly&&1==t.firedElems.length&&(e=[e[0]]);for(var n,r=0;n=e[r];r++)n&&n.callback&&n.callback.call(n.elem,n.elem);t&&t.options.onceOnly&&1==t.firedElems.length&&t.me.unbindEventWithSelectorAndCallback.call(t.target,t.selector,t.callback)},checkChildNodesRecursively:function(e,t,n,r){for(var i,o=0;i=e[o];o++)n(i,t,r)&&r.push({callback:t.callback,elem:i}),i.childNodes.length>0&&l.checkChildNodesRecursively(i.childNodes,t,n,r)},mergeArrays:function(e,t){var n,r={};for(n in e)e.hasOwnProperty(n)&&(r[n]=e[n]);for(n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},toElementsArray:function(t){return n===t||"number"==typeof t.length&&t!==e||(t=[t]),t}}}(),c=function(){var e=function(){this._eventsBucket=[],this._beforeAdding=null,this._beforeRemoving=null};return e.prototype.addEvent=function(e,t,n,r){var i={target:e,selector:t,options:n,callback:r,firedElems:[]};return this._beforeAdding&&this._beforeAdding(i),this._eventsBucket.push(i),i},e.prototype.removeEvent=function(e){for(var t,n=this._eventsBucket.length-1;t=this._eventsBucket[n];n--)if(e(t)){this._beforeRemoving&&this._beforeRemoving(t);var r=this._eventsBucket.splice(n,1);r&&r.length&&(r[0].callback=null)}},e.prototype.beforeAdding=function(e){this._beforeAdding=e},e.prototype.beforeRemoving=function(e){this._beforeRemoving=e},e}(),a=function(t,r){var i=new c,o=this,a={fireOnAttributesModification:!1};return i.beforeAdding(function(n){var i,l=n.target;(l===e.document||l===e)&&(l=document.getElementsByTagName("html")[0]),i=new MutationObserver(function(e){r.call(this,e,n)});var c=t(n.options);i.observe(l,c),n.observer=i,n.me=o}),i.beforeRemoving(function(e){e.observer.disconnect()}),this.bindEvent=function(e,t,n){t=l.mergeArrays(a,t);for(var r=l.toElementsArray(this),o=0;o<r.length;o++)i.addEvent(r[o],e,t,n)},this.unbindEvent=function(){var e=l.toElementsArray(this);i.removeEvent(function(t){for(var r=0;r<e.length;r++)if(this===n||t.target===e[r])return!0;return!1})},this.unbindEventWithSelectorOrCallback=function(e){var t,r=l.toElementsArray(this),o=e;t="function"==typeof e?function(e){for(var t=0;t<r.length;t++)if((this===n||e.target===r[t])&&e.callback===o)return!0;return!1}:function(t){for(var i=0;i<r.length;i++)if((this===n||t.target===r[i])&&t.selector===e)return!0;return!1},i.removeEvent(t)},this.unbindEventWithSelectorAndCallback=function(e,t){var r=l.toElementsArray(this);i.removeEvent(function(i){for(var o=0;o<r.length;o++)if((this===n||i.target===r[o])&&i.selector===e&&i.callback===t)return!0;return!1})},this},s=function(){function e(e){var t={attributes:!1,childList:!0,subtree:!0};return e.fireOnAttributesModification&&(t.attributes=!0),t}function t(e,t){e.forEach(function(e){var n=e.addedNodes,i=e.target,o=[];null!==n&&n.length>0?l.checkChildNodesRecursively(n,t,r,o):"attributes"===e.type&&r(i,t,o)&&o.push({callback:t.callback,elem:i}),l.callCallbacks(o,t)})}function r(e,t){return l.matchesSelector(e,t.selector)&&(e._id===n&&(e._id=o++),-1==t.firedElems.indexOf(e._id))?(t.firedElems.push(e._id),!0):!1}var i={fireOnAttributesModification:!1,onceOnly:!1,existing:!1};f=new a(e,t);var c=f.bindEvent;return f.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t);var o=l.toElementsArray(this);if(t.existing){for(var a=[],s=0;s<o.length;s++)for(var u=o[s].querySelectorAll(e),f=0;f<u.length;f++)a.push({callback:r,elem:u[f]});if(t.onceOnly&&a.length)return r.call(a[0].elem,a[0].elem);setTimeout(l.callCallbacks,1,a)}c.call(this,e,t,r)},f},u=function(){function e(){var e={childList:!0,subtree:!0};return e}function t(e,t){e.forEach(function(e){var n=e.removedNodes,i=[];null!==n&&n.length>0&&l.checkChildNodesRecursively(n,t,r,i),l.callCallbacks(i,t)})}function r(e,t){return l.matchesSelector(e,t.selector)}var i={};d=new a(e,t);var o=d.bindEvent;return d.bindEvent=function(e,t,r){n===r?(r=t,t=i):t=l.mergeArrays(i,t),o.call(this,e,t,r)},d},f=new s,d=new u;t&&i(t.fn),i(HTMLElement.prototype),i(NodeList.prototype),i(HTMLCollection.prototype),i(HTMLDocument.prototype),i(Window.prototype);var h={};return r(f,h,"unbindAllArrive"),r(d,h,"unbindAllLeave"),h}}(window,"undefined"==typeof jQuery?null:jQuery,void 0);

</script>

<script>

	document.arrive('#k15t-exp-pdf-export-dialog-web-item-spark-app-container-iframe', function(element){

		element.addEventListener('load', function(event) {
 		   var that = this;
     	   function addTag(html) {
      	     that.contentDocument.querySelector('head').appendChild(document.createRange().createContextualFragment(html))
     	   }
     	   addTag('<style>#pdf-export-dialog #tab-content .field-group:last-child{ display: none; }</style>');
		})
	})
</script>
CODE

And add the code to Confluence's custom HTML at General configuration > Custom HTML > in the 'At end of the BODY' text box. By default, the code will hide the three-color k15t symbol in the bottom-left of the menu, but you can hide other elements by changing content in the <style> tags on the following line:

addTag('<style> .k15t{display: none !important;} </style>');

For example, if you wanted to hide the 'Macros' tab, you could insert the following code between the <style> tabs: a[href*="tab-macros"]{display: none !important;}

You can also hide specific elements in there, for example:

  • adding addTag('<style>#pdf-export-dialog #tab-content .field-group:last-child{ display: none; }</style>') would hide the last element on the dialog
  • adding addTag('<style>#pdf-export-dialog #tab-content .field-group:nth-child(1) { display: none; }</style>') would hide the first element on the dialog (nth-child(1).
  • adding addTag('<style>#pdf-export-dialog .aui-tabs.horizontal-tabs, #pdf-export-dialog .aui-dialog2-content .aui-button {display: none !important;}</style>') would hide all tabs and the Show/Hide Details link