Skip to main content

A Python3 client for Pdfcrowd API.

Project description

The Pdfcrowd API lets you easily create PDF from web pages or raw HTML code in your Python3 applications.

To use the API, you need an account on pdfcrowd.com, if you don’t have one you can sign up here. This will give you a username and an API key.

An example:

import pdfcrowd

try:
    # create an API client instance
    client = pdfcrowd.Client("username", "apikey")

    # convert a web page and store the generated PDF into a pdf variable
    pdf = client.convertURI('http://example.com')

    # convert an HTML string and save the result to a file
    html="<html><body>In-memory HTML.</body></html>"
    client.convertHtml(html, open('html.pdf', 'wb'))

    # convert an HTML file
    client.convertFile('/path/to/local/file.html', open('file.pdf', 'wb'))

except pdfcrowd.Error as why:
    print('Failed: {}'.format(why))

Project details


Release history Release notifications | RSS feed

This version

2.7

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pdfcrowd3-2.7.zip (6.3 kB view details)

Uploaded Source

File details

Details for the file pdfcrowd3-2.7.zip.

File metadata

  • Download URL: pdfcrowd3-2.7.zip
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pdfcrowd3-2.7.zip
Algorithm Hash digest
SHA256 c6050bc4d8aed8d7b9f3fbc7997048f7f3b039356fea8ccd8e557ad7327cc8a5
MD5 71bce1179db8e89805921db0c29960ea
BLAKE2b-256 1bf041fb26c62001c1b97ab02cb11c508d7c6f29f191b685a99fc088b1235f47

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page