atlassian-python-api
atlassian-python-api copied to clipboard
Exporting as pdf
Hi,
Trying to export as pdf, but only getting an empty pdf.
`def save_file(content, title): file_pdf = open(title + ".pdf", "w") file_pdf.write(content) file_pdf.close() print("Completed")
if name == "main": label = "apitesting" pages = confluence.get_all_pages_by_label(label=label, start=0, limit=10) for page in pages: response = confluence.get_page_as_pdf(page["id"]) save_file(content=response, title=page["title"])`
Error message suggests write() argument must be str, not bytes.
Any clues?