Skip to end of metadata
Go to start of metadata

Available:

Confluence 3.0 and later

 

In Confluence 3.0, we moved the PDF export engine to a Confluence plugin. Therefore, you can no longer use Confluence's built-in remote API to export a space as a PDF. There is a new replacement API that is part of the new PDF export Confluence plugin.

On this page:

XML-RPC Information

  • The URL for XML-RPC requests is http://<<confluence-install>>/rpc/xmlrpc .
  • All XML-RPC methods must be prefixed by pdfexport.

SOAP Information

To find out more about the SOAP API, simply point your SOAP 'stub generator' at the WSDL file, located at http://<confluence-install>/rpc/soap-axis/pdfexport?wsdll.

For reference, the pdfexport WSDL file is here.

Methods

  • String login(String username, String password) - log in a user. Returns a String authentication token to be passed as authentication to all other remote calls. It's not bulletproof auth, but it will do for now. Must be called before any other method in a 'remote conversation'. From 1.3 onwards, you can supply an empty string as the token to be treated as being the anonymous user.
  • public String exportSpace(String token, String spaceKey) - exports the entire space as a PDF. Returns a url to download the exported PDF. Depending on how you have Confluence set up, this URL may require you to authenticate with Confluence. Note that this will be normal Confluence authentication, not the token based authentication that the web service uses.
  • No labels

3 Comments

  1. I've added a feature request to be able to export only a set of pages as the use case of exporting the whole space is not always possible (or desirable)

    http://jira.atlassian.com/browse/CONF-16574

    Bye

  2. I tried the following link to get the pdf export of a specific page:

    https://wiki.yourcompany.com/spaces/flyingpdf/pdfpageexport.action?pageId=<the real page number>

    All it did is open the login page of the confluence wiki. I logged in and was presented with a page saying 'page could not be found'

    I used the SOAP method exportSpaces(String token, String spacekey); and then tryed to open the file using the url with fopen(). This gave me an error 'failed to open stream. No such file or directory'. Then I tried creating an html link with the url. The first time It  worked  with the link, I clicked the link and a window opend asking to open the file or save it. Now all i get when i click the link is object not found. I would like the script to download the file and save it in a folder on the webserver. How can I do this?

    Susan Hallwood

  3. Anonymous

    Can anyone provide an example of how "All XML-RPC methods must be prefixed by pdfexport" is implemented? I'm writing a python script to export Spaces to PDF