How do I insert an already attached PDF file into a page so that only the first page of the PDF is displayed as a preview? It should work the same way as if I had inserted the PDF file using "Insert image and file" in the DataCenter version. How can I display an already attached PDF file as a card without uploading the file again?
Hi @Wolfgang Lutz, the page-one preview is a display setting you flip after the file is sitting in the page body, so there's nothing to switch while it's only in the attachments list. In the editor, click the file and the floating toolbar carries a view switch. Thumbnail is the state that draws page one. Card is that same state, and Atlassian's own docs disagree on the label, "View inline or as a card" on one page and "Change view" with Inline and Thumbnail on another.
Getting it into the body is the part that's actually blocked, and yes it means uploading again. The cloud editor's picker only offers a file from your computer, so the download-and-re-upload above is the route today. DC's Insert > Files lists previously uploaded files and the ! autocomplete reaches them too, and none of that came across. It's tracked as CLOUD-12503, Under Consideration, 665 votes, and Atlassian's last word on it is a 2024 status update from the Confluence Editor PM: "We are actively exploring how we can bring this capability across to the Cloud Editor."
The attachment URL above has /download/ in the path, so it resolves as the file download, which matches what you got. Card is doing double duty on this thread as well. A smart link renders as a metadata card, which Atlassian describes as showing "metadata like project details and summary", and the Attachments macro renders a list. The first page only comes from the file itself sitting in the body.
No Cloud doc I could find actually states that the thumbnail renders page one. Nearest Atlassian text is CONFCLOUD-67140, "PDF thumbnail doesn't show first page contents with new editor", closed as Fixed in 2021.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got that wrong, @Wolfgang Lutz. The PDF macro reads a file that's already attached, so there's no second upload, and @Duc Thang TRAN had it right.
Type /pdf and pick PDF. File Name is a dropdown listing what's already attached. I ran it on a Cloud site today, because the doc for that macro sits under a legacy-editor heading and reads as though it's gone.
No first-page card though. I fed it a three-page test file and all three pages rendered down the page, there's no setting for which page to show, and the Page Name field next to it picks a different Confluence page rather than a page of the PDF. Card and thumbnail are views on a file inserted as a file, so the re-upload only comes back if you want that look.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We now have many pages in a Confluence Datacenter environment where multiple PDFs are displayed on a single page. The first page of each PDF is shown as a preview. Clicking on this preview displays the PDF file in preview mode. Perfect!
This isn't possible in Confluence Cloud. There's no way to display it similarly using the current standard methods, except when uploading a PDF file. If layout changes are needed, the PDF file has to be re-attached. What was Atlassian thinking? I don't think we're the only ones using this feature. Are we?
A simple solution: Allow selection of already attached files when inserting images and attachments. Why doesn't Atlassian implement this?
Cheers Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is one of the strangest 'feature' of Confluence Cloud. But afaik there's no way to get a file from the page's attachment page onto an actual page.
(think there's also a ticket begging Atlassian to make this available...)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Servus @Kris Klima _K15t_ !
THX for you feedback.
I can't believe what Atlassian users put up with.
Cheers Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's a trade off :D
In my trade, the lack of file management features is an annoyance. Stuff that matters to me works better.
That's why people create their own file libraries - a page/pages (or even spaces) with attachments such as images placed in excerpts or synced blocks macros, and then they reuse those content bits across the actual content.
Or apps that allow you to build genuine image libraries.
But I do agree with you, those are workarounds. The fact that an attachment dropped onto a page goes to Attachments, but not the other way 'round is from the 'what were they thinking' department.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, the workaround is that in the bottom right corner you click on info icon -> go to attachments -> download attachment and re-upload it.
In that same attachments page it will be visible as version 2 of the same file.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Servus @Tomislav Sablic !
THX for you feedback.
But that's the point; I want to avoid re-uploading and deleting the additional file upload.
I don't think this feature is too much to ask of Atlassian. I can't imagine that a newly released software product could be sold with such a bug.
Cheers Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Wolfgang Lutz
Use macro "Insert image and file" then Link, and paste the attachment URL:
https://{yourdomain}/wiki/download/attachments/{pageId}/{attachmentName}
OR list attachement via macro attachements :
Type /Attachments, then set:
Page Title : the page where the file actually lives
Filename Patterns : *pdf to show only PDFs or attachmentName
Hope this can help
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Servus @Duc Thang TRAN !
THX for you feedback.
This link only download the file. A preview isn't possible.
Cheers Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just tried it with my solution, and it works with an external image (not for pdf)
For a PDF, you can use the PDF macro. Just specify the page where located your pdf , then select the PDF file you want to display in preview mode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, insert, select preview, that all works, but save the page. The PDF isn't displayed. Definitely a bug. :-(
As I see this is a very old bug: [CONFCLOUD-67859] Can't insert pdf attachment in pdf macro from another page - Create and track feature requests for Atlassian products.
Cheers Wolfgang
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It's real, Wolfgang, and it isn't something you configured wrong. I reproduced it on a clean Cloud site this morning. Page A holds lz-probe.pdf, page B carries the PDF macro pointing at page A, and the saved page comes back Error rendering macro 'viewpdf' : Failed to find attachment with Name lz-probe.pdf. The same macro with the file attached to the page it sits on renders the viewer normally. Then I attached that same filename to page B and changed nothing else, so the stored macro still names page A, and it rendered straight away. The macro resolves the file by name against the page it lives on, and the page you pick is ignored at render time. I built those probe pages over the REST API, so the Page Name field in the editor is the one part I'm taking on inference. Your half of it matches though, it saves clean and then shows nothing. Which also means it's no escape from the re-upload, since attaching the file to that page is the only thing that makes it work.
CONFCLOUD-67859 isn't the ticket for it though. That one was opened in 2019 and it's Closed as Cannot Reproduce, its steps have the PDF on the same page being edited, and the symptom there is the Insert button doing nothing rather than a page that saves and then errors. File a fresh one with those two pages in it and you've got about as clean a report as they get.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.