Forums

Articles
Create
cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 

How to export space to PDF with date time

Rafael Fernandez Coelho January 2, 2024

Hello!

I am trying to export some pages to PDF with date and time of the export.

I was able to export a page tree (I don't know if it's the name in english, but I'm refering to a page with all of it's child pages) using the export in space settings, but I'm unable to find a way to add the date and time of export.

Currently I'm trying to adjust the footer in the export PDF settings (https://support.atlassian.com/confluence-cloud/docs/customize-exports-to-pdf/) using JS but it was not mentioned in the doc so I don't know if it's supported (it was a Bing suggestion and as I don't know a lot about it I decided to try ... obviously no luck so far)

I searched here but was unable to find anything about it šŸ™ (at least nothing native without using apps)

Thanks!!

Rafa Coelho

2 answers

1 accepted

0 votes
Answer accepted
Rafael Fernandez Coelho January 4, 2024

Hello!

 

I just asked the support about it and I'll share their answer - in case someone end up here while searching for something like this 

 

I tried copying their message but got some errors here while trying to post, so in summary: there isn't a feature for that, at least for now, and he sent me link of two suggestions

https://jira.atlassian.com/browse/CONFCLOUD-55765

https://jira.atlassian.com/browse/CONFCLOUD-16733

Also, he suggested using third-party apps, like this https://marketplace.atlassian.com/apps/7019/scroll-pdf-exporter-for-confluence?hosting=cloud&tab=overview

0 votes
Barbara Szczesniak
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 3, 2024

@Rafael Fernandez Coelho Those PDF Settings look similar to the Space Settings > Look and feel > Page layout. If you look there, it says you can use wiki markup to add text, links, macros, and images. Looking at the help there, it doesn't mention how to add a date, but maybe you (or someone else) knows what markup to use to get the current date.

Rafael Fernandez Coelho January 3, 2024

Hey @Barbara Szczesniak thanks for the idea

I didn't look there previously, I was focusing on the PDF export settings only, but it would work for us - however for what I found while searching, and also asking AI, aparently there is no direct markup that could get current date

 

And in the PDF settings only HTML+CSS is supported, at least that is what I understood from the documentation and it does not mention if JS is supported somewhow. The only piece of code that I was able to find depends on JS

 


<p>text 1</p>

<p id="datetime"></p>

<p>text 2</p>

<script>

  var now = new Date();

  var datetime = now.toLocaleString();

  document.getElementById("datetime").innerHTML = datetime;

</script>


 

If you know some workaround to add the current date to the page itself without being the date macro it could help us - but for what I found while searching it's only possible using apps or on server

 

Thanks again!

Barbara Szczesniak
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 3, 2024

I have the full version of Acrobat, so I find it easier to add the date in the footer once the PDF is created. Of course, I only needed to make my first PDF yesterday. (and then today, the people I made it for asked for a Word version)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events