Hello,
What I would like to do is create a button which will send to my API some kind of page ID (or whatever) on which the button was clicked. Next, having this ID, I want to download the content of that page (I assume this will be done by the confluence API). Can you please explain me where can I find the appropriate API functions + the necessary data by which I can download the page?
After some investigation I have managed to create valid requests. BUT: I want to download the content of a certain page and generate PDF out of that - how can I do this? According to API specification after getting stuff from confluence there is no data I need (no text I wrote, just some info)
Community moderators have prevented the ability to post new answers.
Hi Szki,
On this link you can find many examples of REST commands to use with Confluence:
https://developer.atlassian.com/confdev/confluence-rest-api/confluence-rest-api-examples
Since you already have the ID page, you could try to get the content like this:
curl -u admin:admin http://localhost:8090/confluence/rest/api/content/5210259?expand=body.storage | python -mjson.tool > page.html
However, if you want only the text you might need to work to get the output clean (with no codes together).
To convert this in .pdf, I believe this will need to be done on your code. I mean, JAVA has your own way to convert text into .pdf, PHP has another way as well.
Hope this helps.
Regards,
Renato Rudnicki
Thank you for the answer. Currently I'm using C# and I'm downloading the document through code (not curl). And there I need to generate PDF out of that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do you have a code sample of this? did you figure out how to convert to pdf? I am looking to do the same thing.
Thanks!
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.