"Recently Updated" Macro does not Export to PDF
Asked by Bill Altmann:

I am using the **Recently Updated** macro on my Confluence page. I have selected a space and a label, and added that label to each of the pages in the space (about 12 pages).

When I show the Confluence page, I see a nice table, listing the author and last-published date for each page marked with the label.

When I export this set of pages to PDF, including the 'main page' with the inserted macro (using Space Tools), I see in place of the macro's table only an error:

```
error rendering macro "recently-updated-dashboard" : null
```

*Why does this not work?*

What I really want is to retrieve the "last published" dates from all the pages in my suite of export-to-PDF pages, in a table or in the footer of each page produced by each such page. It's important to me to know - in the PDF - the modified dates for the content, since Confluence does not have a "Revision" specifier that I can find. {I realize that Confluence is not a Document Management System, but when making a PDF - and especially when printing a PDF on paper - it's important for the reader and the Support person to know the "Revision" of the material.}

I am using Atlassian Cloud.


Answers:
author: AnnWorley
body: I am not sure why it doesn't work - it doesn't work for me either. So I opened a bug for the development team to get to the bottom of it: [Error rendering macro 'recently-updated-dashboard' in space PDF export](https://jira.atlassian.com/browse/CONFCLOUD-59152)

Does the user macro offered by Jan Orlandini on the Community work for your use case?[PDF export: Include page version number / history and date of print](https://community.atlassian.com/t5/Confluence-questions/PDF-export-Include-page-version-number-history-and-date-of-print/qaq-p/125980#)

comments: author: Bill Altmann
body: I do not understand how to use the 'source code' he lists, for a macro.

If I need to build this as a User Macro, I need to get admin access, which I do not have. Do you recommend to venture into building one's own macros? The cost of marketplace macro offerings seems open-ended, as our company grows.


author: AnnWorley
body: For more on user macros please see [Writing User Macros](https://confluence.atlassian.com/doc/writing-user-macros-4485.html). It shows where to put the code in the Confluence UI.

Please check whether it looks like a reasonable learning curve and decide whether to start developing user macros based on your comfort level. Marketplace solutions tend to be more powerful, where user macros can be very focussed. As you hinted, the ability to create your own macros could save money as your company grows.

Does your team have a staging instance where you could experiment with your macros and be granted more permissions than on Production? That would be a way to practice without making your Confluence admins too nervous.


author: Bill Altmann
body: Apparently 'user macro is only available for server' not for cloud. is this true?

See <https://community.atlassian.com/t5/Answers-Developer-Questions/Creating-User-Macros-in-Confluence/qaq-p/477369>

What does 'restricted function' mean? Available to admins or to no one?


author: AnnWorley
body: Oh Bill, I saw you were on Cloud when I created the bug but forgot when I made the user macro recommendation. I don't like to bear unpleasant news but it's true that user macros are a restricted function in Cloud.

I encourage you to add your comments and vote to [Error rendering macro 'recently-updated-dashboard' in space PDF export](https://jira.atlassian.com/browse/CONFCLOUD-59152) to emphasize your use case.

Cloud does include CSS customization for PDF exports, I do not know how to pull version info with CSS, however. I will have to defer to the rest of the Community.


author: AnnWorley
body: Oops! You posted while I was typing - restricted functions in Cloud are altogether unavailable on the Cloud platform.


author: Bill Altmann
body: Too bad.

Do you know the reason for the restricted function on Cloud for user macros?

Is there any way to capture the XML output from the "Export to PDF" before it goes to through the CSS style sheet phase? What I really want is to understand the details of the XML being created by Confluence when exporting, so that I can add to the **supported** CSS style sheet when exporting, and control more of the pages.

I see this list of restrictions:  
<https://confluence.atlassian.com/confcloud/restricted-functions-in-confluence-cloud-734070955.html?_ga=2.79204820.1377732552.1519669824-1972884014.1516129034>


author: AnnWorley
body: User macros are not supported in Cloud because they can introduce unsupportable configurations.

I do not know of a mechanism that would intercept the conversion to PDF before the styles are applied.

There are quite a few PDF export utilities on the Atlassian Marketplace: [PDF Export Add-ons](https://marketplace.atlassian.com/search?product=confluence&query=pdf) Perhaps one of these would suit your case.


author: Bill Altmann
body: I created a new space - a completely new space - named "Staging Space".

My admin gave me permissions there that I don't have on our "production" space.

I created a page on the Staging Space, and entered onto it the **Recently Updated** macro.

I entered "Staging Space" in the 'Spaces' field of the macro. I entered 'page' in the 'type' field, and the same label in the 'label' field that I used in the original space's page's **Recently Updated** macro (the beginning of this chat).

So, now I have one new page in a new space, and on that page I have the Recently Updated macro, specifying the name of the new space only.

***Why, on this new page, do I see the same extensive list of recently updated pages from the original space?*** I expected to see only the one page listed.

(In the last screen grab below, the red area is only there to obscure the page details. You may see that the macro lists many pages as 'recently updated'.)

![Screen Shot 2018-02-27 at 11.18.27 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/15965i4DF2D16D074C2BFA/image-size/large?v=v2&px=999 "Screen Shot 2018-02-27 at 11.18.27 AM.png")![Screen Shot 2018-02-27 at 11.18.50 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/15967iE941D8467B51268A/image-size/large?v=v2&px=999 "Screen Shot 2018-02-27 at 11.18.50 AM.png")![Screen Shot 2018-02-27 at 11.19.19 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/15968i39919A2B0B894408/image-size/large?v=v2&px=999 "Screen Shot 2018-02-27 at 11.19.19 AM.png")

comments: author: AnnWorley
body: I got the same behavior on my test instance - I found this bug report: [recently-updated-dashboard macro does not allow exclusion of spaces](https://jira.atlassian.com/browse/CONFCLOUD-14327) Feel free to comment or vote on it to provide feedback to the development team.


author: Bill Altmann
body: As I add new pages to the new space, they are added to the **Recently Updated** macro output list in the "My Spaces" column. There does not seem to be any filtering to respect the 'Spaces' value I put in the field in the macro - it's listing ++all++ the pages I've recently updated.


author: Bill Altmann
body: We're doing great today, huh? More bugs?

Maybe that bug report you point to is not very effective, since it's been open since 2009 and commented on most recently in 2010. :-(


author: AnnWorley
body: Please refer to our [Bug Fixing Policy](https://confluence.atlassian.com/doc/bug-fixing-policy-206865207.html) for information on what makes a bug report effective. Your input on the bug actually adds to the impact.


Tags: export

macro