Export to PDF and Include attachments
Asked by Liam Brennan:

Hi,

I have created a page and have links on that page to attachments (on the same page). When I export to PDF the links dont work as the attachments arent also exported. Is there a way to export the page with attachments via the embedded links?


Answers:
author: Liam Brennan
body: Looks like this cant be done. Export to word and then imbed the attachments as I meanted earlier I guess!


author: Sarik Grover
body: Dear All, I see the problem been discussed back in 2017, has this now been updated in Confluence by any chance. We are in 2021 and I still have not found way to do it.

Also the new editor seem to have taken us backwards as far as I see.


author: Patrick Dung
body: Hello,

I have submitted a suggestion request in here:

<https://jira.atlassian.com/browse/CONF-44246>

comments: author: Ridhy
body: Has anyone tried this does it work?


author: Ridhy
body: I am still trying to figure this out. Does the attachment export work with the new version of Confluence 5.10.8?


author: Patrick Dung
body: I am still using 5.10.4 and did not test 5.10.8.  
Did the new minor version upgrade had new feature that would export attachments inside PDF?


author: Ridhy
body: I'm not sure that is what I was asking whether the new version has a feature to support this export. This is our biggest pain point and the reason we are not able to use Confluence so trying to see how we can overcome this.

You had mentioned in this thread that you were able to use pdftk to add attachments how does this work and how do you go about adding it?


author: Ridhy
body: Looks like your response was removed. I see you used it as a standalone program but then when you exported that file from Confluence were you able to export the attachment within that PDF?


author: Patrick Dung
body: My last comment was removed as spam ??

For further info, just check the JIRA issue in here

<https://jira.atlassian.com/browse/CONF-44246>  

Ridhy, I did the test as a POC (to show that it is possible to attach a file inside a PDF).  
When you open the PDF in acrobat reader, it is possible to save the embedded attachment.  
The POC did not involve Confluence.


author: Don Mankewich
body: It appears that this is still an issue in Confluence Server 6.4.2. I'm working on an evaluation licence but that shouldn't matter.

When I export a space to PDF and that space has PDF attachments, the attachments are not included in the output PDF. Instead, a link back to the Confluence instance is inserted in the output PDF if the PDF attachment was linked on the Confluence page. The link breaks if the PDF is viewed on another machine.

If the PDF attachment is included in the Confluence page as a thumbnail, the exported PDF just includes a .jpg image with a label of the PDF file name but the actual PDF file is not included.

So neither method works and I see that the Jira issue is still unresolved. Is there any timeline for resolving this issue. It's quite a serious shortcoming because it's impossible to generate a stand-alone complete PDF from the Confluence space to distribute to remote users not on the same network.


author: Daniel Borcherding
body: Hello Liam,

What version of Confluence are you using. I did a quick test in Confluence 4.3.3 and it looks like the behavior for exported pdf's that include attachments is to link them back to the attachments on the Confluence instance. You are right in pointing out that there is no physical export of the attachments that come with this page pdf export.

Are you looking for a way to create a self contained PDF export what does not reference the Confluence site? Are you embedding images into the page that are not getting rendered out correctly? Is there a common theme among those attachments that are not exporting as expected?

comments: author: Liam Brennan
body: Hi,

To answer your question, I am looking to create a self contained PDF export that embeds the attachments into the document. For example, to achieve what I am looking for in Microsoft Word I would go to insert - object - create from file and it embeds a file within the document so if I send anyone the document the attachments are enclosed in a single file. This is what I want to achieve in Confluence.

Thanks Liam


author: Ridhy
body: I am looking to do the same and can't seem to export the attachments within the document. Ideally we would like to send the exported document with the attachments included.


author: John Chin
body: Hi Liam,

Does this [JIRA PDF View Plugin](https://marketplace.atlassian.com/plugins/com.midori.jira.plugin.pdfview-metadata) help?

comments: author: Liam Brennan
body: Hi, Its in confluence where I want to export a page into PDF and include the embedded links/attachments