Export a Confluence page to PDF from shell

Eugene Tan January 2, 2014

Hello, I am trying to export a confluence page to a pdf in some build automation (Jenkins).

I have managed to get the pageId of the page I want to export.

When I tried to use the URL in the following fashion

wget {url copied from the tools -> export pdf } -o blah.pdf

I get the following error


$ wget https://confluence.blah.com:8443/spaces/flyingpdf/pdfpageexport.action?pageId=13959783

--2014-01-02 15:20:09-- https://confluence.blah.com:8443/spaces/flyingpdf/pdfpageexport.action?pageId=13959783

Resolving confluence.blah.com(confluence.blah.com)... 105.144.22.63

Connecting to confluence.sisa.samsung.com(confluence.blah.com)|105.144.22.63|:8443... connected.

ERROR: The certificate of ‘confluence.blah.com’ is not trusted.

ERROR: The certificate of ‘confluence.blah.com’ hasn't got a known issuer.

Any suggestions on how I can go about exporting a pageId from confluence to PDF?.
THank you,
/et

5 answers

1 vote
Renjith Pillai
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2014

Add --no-check-certificate to wget command line and it should work mostly.

0 votes

For you guys asking how to handle authentication you should be able to pass --user and --password to wget.

0 votes
Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2014

Did you ever get this to work along with authentication?

0 votes
Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 26, 2014

Has anyone ever got this working? How did you handle authentication?

0 votes
MJ
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 5, 2014

If you want to perform actions on your Confluence instance through cli, I would advice you to have a look at the Atlassian Command Line Interface. Several examples of command you can use, among which pdf page exports, can be found here

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events