PDF Macro

Add the PDF macro to a page to display the content of a PDF document. First attach the document to a Confluence page, then use the macro to display the document.

This is great for sharing presentations, design documents, whitepapers, and other visual data.

This macro displays your file in a viewer, with next and back buttons, rather than showing a simple preview. 


On this page:

Screenshot: A page with a PDF macro displaying an A4 PDF document. 

Add this macro to your page

To add the PDF macro to a page:

  1. Upload the PDF file to your page, then publish the page. See Upload Files to learn how to do this. 
  2. From the editor toolbar, choose Insert > Other Macros.
  3. Choose PDF from the Confluence content category.
  4. Select the attached file you want to display. 
  5. Choose Insert

You can then publish your page to see the macro in action. 

Screenshot: Configuring the PDF macro in the macro browser.

Change the macro parameters

Macro parameters are used to change the behaviour of a macro.

To change the macro parameters:

  1. In the editor, click the macro placeholder and choose Edit.
  2. Update the parameters as required then choose Insert.

Here's a list of the parameters available in this macro. 

Parameter

Default

Description

Page Name
(page)

The page which contains the macro

Enter a page name, if you wish to display a document which is attached to another Confluence page.


File Name
(name)

none

The file name of the PDF document to be displayed. The document must be attached to a page on your Confluence site.

Where the parameter name used in Confluence storage format or wikimarkup is different to the label used in the macro browser, it will be listed below in brackets (example).

Other ways to add this macro

Add this macro as you type

Type followed by the start of the macro name, to see a list of macros. 

Add this macro using wiki markup

This is useful when you want to add a macro outside the editor, for example as custom content in the sidebar, header or footer of a space.

Macro name: viewpdf

Macro body: None.

{viewpdf:page=Docs|name=My document.pdf}
Last modified on Aug 12, 2020

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.