viewpdf macro is not working
Asked by Shlomi Moshkovits:

Hi,

I'm using Confluence Cloud and I am trying to display a pdf using the viewpdf macro (documentation: <https://confluence.atlassian.com/confcloud/pdf-macro-724765266.html>) on a file that is attached to the same page.

The macro doesn't list the name of the file. Manually entering the macro also doesn't help.

    {viewpdf:Colors.pdf}

Any ideas what's wrong?

Appreciate your help.


Answers:
author: Shannon S
body: Hello Shlomi,

Thank you for contacting us.

I am attempting to test this myself on my Cloud instance, but it seems to be working for me. Can you tell me if you have this issue with any PDF file and on all pages? Have you been able to test this with the new editing experience?

Regards,

Shannon

comments: author: Julian Piatek
body: Hi Shannon,

I have the exact same problem.

I have checked with a few PDF files and also with the excel and powerpoint view macros and none of them show any files in the drop-down list. I have tried this both with and without specifying the page where the attachments are located.

This behaviour happens with the new editing experience.

Best regards,

Julian


author: Shannon S
body: Hello Julian,

Welcome to Atlassian Community, and thank you for joining this conversation!

There is a bug for both the PDF macro and the Office macros where they are not able to fetch the attachments on the new editing experience:

* [CONFCLOUD-65753](https://jira.atlassian.com/browse/CONFCLOUD-65753) *Excel/Word/PPT Macro throws 401/403 errors when trying to fetch the relevant attachments on a page*
* [CONFCLOUD-66870](https://jira.atlassian.com/browse/CONFCLOUD-66870) *Fabric PDF Macro does not see attachments on page*

In Shlomi's example, he's using the wiki markup for the old editor in order to reference the attachment. It is not possible to reference macros in the new editor using the curly bracket. For this reason, I did not think he was using the new editing experience.

If you can confirm this problem is only with the [new editing experience](https://confluence.atlassian.com/confcloud/confluence-editing-improvements-945107733.html) and not the old experience, then I can confirm you have run into the bugs above. Please click **This affects my team** and you will automatically be added to the list of watchers and receive updates on the bugs.

I hope that's clear, but do let me know if you have any questions about that.

Regards,

Shannon


author: Shlomi Moshkovits
body: Thanks Shanonn,

I wasn't aware that the curly brackets are not relevant in the new editor. thanks for clarifying this.

Indeed, I am using the new editor, so I will track the bugs you mentioned.

Regards,

Shlomi.


author: Shannon S
body: Shlomi,

No worries, happy to help!

Thank you for helping to report the bugs!

Regards,

Shannon


author: Andreas Binner
body: Nice that this is a known issue (from June - now we have November!)... anyway, I do not understand the mentioned "workaround":

*Simply add add attachments to page with preview Icon.*

Could someone elaborate? What is the "Preview Icon"?

BR  
Andreas


author: Shannon S
body: Andreas,

Welcome to Atlassian Community. It's nice to have you!

I'm not quite sure what that was referring to, but I've updated the bug with the current workaround. You'll want to attach PDF directly to the page and preview from there, rather than using the **PDF Macro** if you are still having issues with it.

As a note; my list of PDF attachments don't load on the page at first when I am trying to use that macro, but they appear after a few seconds, so see if the same happens for you.

Regards,

Shannon


author: Andreas Binner
body: Thanks Shannon,

now I understand. Preview it without using the PDF Macro.

In any case, it is like you described. The attachment actually shows up eventually in the PDF macro's list - although it is not clear to me when exactly this starts happen ing!

BR

Andreas


author: Shannon S
body: Hi Andreas,

No problem! Thank you for bringing this to us again! I've updated the bug ticket to include that information in case users are experiencing the same delay.

Once your list of attached PDF files load, are you able to use the PDF macro as expected?

Regards,

Shannon


author: Andreas Binner
body: Yes. It does.

Maybe a new bug ticket: The "Edit" dialog of the PDF macro (and for that matter all the MS Office macros) does not open in the Apple Safari browser ...

BR  
Andreas


author: Shannon S
body: Hello Andreas,

Thank you for letting me know that. As far as I am aware, Safari is not fully compatible with the Atlassian Companion app at this time due to the following bug:

* [CONFCLOUD-67604](https://jira.atlassian.com/browse/CONFCLOUD-67604) *Attachments macro: view and edit options don't work on Firefox and Safari*

In the meantime, you can edit files with the latest version of Chrome browser.

Let me know if you have any questions about that.

Regards,

Shannon


author: Alexander Senior
body: Hi,

I'm not sure if I'm experiencing the same bug or a related one. I'm trying to preview a PDF on another page. When I'm editing the macro, I can see the PDF in the list of files fine, but nothing happens when I try to preview it in the preview section of the Edit macro dialogue box, and when I click on Save nothing happens. Is this the same bug or a different one?

Edit: I'm (currently) using Chrome version 78.0.3904.108.


author: Shannon S
body: Hi Alexander,

Nice to meet you! Welcome to Atlassian Community.

In this case, there's a spinning wheel when you try to either open the preview or edit when in Firefox or Safari. I assume you're in either one of those?

If you're not getting a spinning wheel, then we can confirm if you're running into the same bug by taking a look at your logs. You can raise a ticket with the [Cloud Support Team](https://support.atlassian.com/contact) and we can help determine the cause of your Companion app issue.

Regards,

Shannon


author: Alexander Senior
body: Hi Shannon, a few things

* I'm using Chrome, not Firefox or Safari
* I'm not trying to edit a file using the Atlassian Companion app. There's a PDF file attached to page A, and I'm trying to insert it on page B using the viewpdf macro. Both pages are in the same space.
* When I try to do this using the macro, I'm able to find the PDF fine, but it won't display in the Preview pane, and clicking on the Save button does nothing (even though it's clickable). The edit PDF macro looks like this when I try to use it: ![viewpdf macro screenshot.png](https://community.atlassian.com/t5/image/serverpage/image-id/74325iAE93D970AEB3765E/image-dimensions/619x381?v=v2 "viewpdf macro screenshot.png")

I'll raise a ticket with support in any case.

Regards,

Alexander.


author: Shannon S
body: Alexander,

Thank you for confirming that. I found your support ticket and I'll be watching it for the solution.

Please feel free to share the solution that worked for you here once it's resolved.

Regards,

Shannon


author: Alexander Senior
body: Thanks Shannon, I'll keep the thread updated.


author: Alexander Senior
body: In talking with support, it looks like this is a bug with the viewpdf macro, it's in Atlassian's list of bugs to fix: [CONFCLOUD-67859: Can't insert pdf attachment in pdf macro](https://jira.atlassian.com/browse/CONFCLOUD-67859) .


author: Shannon S
body: Hi Alexander,

Thank you for the update! I'll include this thread on that case. I looks like it doesn't happen for every user, so we will need to investigate further to understand the cause.

I assume you're already watching it, but if not, you can click **This affects my team** and you'll receive email updates in the future about its progress.

Regards,

Shannon


author: Alexander Senior
body: Thanks Shannon, I'm watching the issue and another bug that I also encountered.


author: Niko Tzioras
body: [@Alexander Senior](/t5/user/viewprofilepage/user-id/3599607) if you still have the problem you can try my workaround I posted on the Bug Ticket:

[https://jira.atlassian.com/browse/CONFCLOUD-67859?focusedCommentId=2374283\&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2374283](https://jira.atlassian.com/browse/CONFCLOUD-67859?focusedCommentId=2374283&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-2374283)


author: Stephen Bitzelberger
body: Greetings all - I've had this issue as well. I'd like to ask if the pages you have issues with this on have a colon in the page title. I've noticed that pages that have a ":" in the page title, the PDF macro will not show the list of attachments. Once you remove the colon, it works fine.

comments: author: Alexander Senior
body: Hi Stephen, neither of our pages has a colon in the title.


author: Alexandra Dodds
body: My Page title had a ':' in it and you're right - just changed the page title and it worked


author: Sven Alebrand
body: Same problem and solution here - in 2021 and with Confluence Server 7.4.7... :-(


author: Shannon S
body: Hi [@Sven Alebrand](/t5/user/viewprofilepage/user-id/3921173)

The issues mentioned here are specific to Confluence Cloud in 2019. Confluence Server/DC are developed separately from Cloud, so you'll want to report this directly to the [Server/DC support team](https://support.atlassian.com/contact) or create a new community question.

Thank you for your help!

Shannon


author: Teri Berschneider
body: Is this still a known bug? The PDF macros will show me the list of attachments from a page, but nothing happens when I click "Insert".

comments: author: Shannon S
body: Hello Teri,

Thank you for following-up here. You'll be able to see the status of the bug when you visit the link provided above.

For example, the following bugs:

* [CONFCLOUD-66870](https://jira.atlassian.com/browse/CONFCLOUD-66870) *Fabric PDF Macro does not see attachments on a page*
* [CONFCLOUD-67604](https://jira.atlassian.com/browse/CONFCLOUD-67604) *Attachments macro: view and edit options don't work on Firefox and Safari*

Both of these are still in the initial stages, one during the data collection stage, and the other has been added to our short-term backlog.

I recommend clicking **This affects my team** to help us keep track of how many users are affected by these bugs. You can also watch the case and you'll receive updates via email.

Let me know if you have any questions about that.

Regards,

Shannon


author: Alexandra Dodds
body: I am seeing PDF and PPT macro issue atm. It worked on one page but now it fails on all

comments: author: Shannon S
body: Alexandra,

Welcome to Atlassian Community! It's great to have you join us.

Could you elaborate on the issue you're seeing with PPT/PDF files? Is it the exact same issue here as in [CONFCLOUD-67859](https://jira.atlassian.com/browse/CONFCLOUD-67859)? In that case, the issue is when the user clicks *Insert*, nothing happens.

If you are experiencing any other behavior, you can raise a new question here, or a ticket with [Cloud Support](https://support.atlassian.com/contact) if you are not on a free Cloud plan.

Regards,

Shannon


author: Alexandra Dodds
body: Hi Shanon, I don't get to press Insert for these macros as it's greyed out. Even if my file is attached to the page, the file drop-down has no files to select from, so looks like the macro is not retrieving the attachments?


author: Shannon S
body: Alexandra,

In that case, you're likely being affected by one of the first bugs I sent in this thread:

* [CONFCLOUD-66870](https://jira.atlassian.com/browse/CONFCLOUD-66870) *Fabric PDF Macro does not see attachments on a page*

When testing this, the only workaround I discovered was by dragging-and dropping the PDF onto the page, you can preview the PDF by clicking on the macro below:

![](https://jira.atlassian.com/secure/attachment/380160/380160_CleanShot_2019-11-12_at_12_16_35.png)

Can you confirm if you're able to preview PDF attachments this way?

Regards,

Shannon


author: Alexandra Dodds
body: Hi Shanon, I had a ':' in my Page title and, following Stephen's advice below, it worked once i changed the title.


author: Shannon S
body: Hi Alexandra,

Thank you for the confirmation!

Take care,

Shannon


Tags: cloud

confluence-cloud

pdf