Skip to content

export_page(psgr_id) does not really returns pdf #892

@amitkrout

Description

@amitkrout

I followed atlassian confluence API doc - https://atlassian-python-api.readthedocs.io/confluence.html, but it could not help me to download the confluence page in pdf format. Please refer the below script

from atlassian import Confluence

confluence = Confluence(
    url='https://confluence.xxxx/',
    username='*****',
    password='****',
    api_version='cloud'
)

pageID="123456"
file_name = 'test.pdf'

def save_file_to_local(file_name, content):
    file_pdf = open(file_name, 'wb')
    file_pdf.write(content)
    file_pdf.close()

response = confluence.export_page(pageID)

save_file_to_local(file_name=file_name, content=response)

NOTE: It creates a pdf file but i cannot open it because the pdf format is damaged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions