Skip to content
Discussion options

You must be logged in to vote

In Python3:

r = requests.get(self.server + api_schema, headers=self.bareer)
r.raise_for_status()
with open('temp/labels.pdf', 'wb') as output:
     for chunk in r.iter_content(chunk_size=1024):
          output.write(chunk)

source: https://pdfshift.io/guides/convert-html-to-pdf-with-python/

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by matmair
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
stock Related to Stock models api Relates to the API
1 participant
Converted from issue

This discussion was converted from issue #2703 on March 02, 2022 16:31.