Skip to main content

Website to PDF is a simple tool for converting a website to PDF. It returns the PDF file generated from the website.

Project description

Website to PDF API

Website to PDF is a simple tool for converting a website to PDF. It returns the PDF file generated from the website.

Build Status Code Climate Prod Ready

This is a Python API Wrapper for the Website to PDF API


Installation

pip install apiverve-websitetopdf

Configuration

Before using the websitetopdf API client, you have to setup your account and obtain your API Key.
You can get it by signing up at https://apiverve.com


Usage

The Website to PDF API documentation is found here: https://docs.apiverve.com/api/websitetopdf.
You can find parameters, example responses, and status codes documented here.

Setup

# Import the client module
from apiverve_websitetopdf.apiClient import WebsitetopdfAPIClient

# Initialize the client with your APIVerve API key
api = WebsitetopdfAPIClient("[YOUR_API_KEY]")

Perform Request

Using the API client, you can perform requests to the API.

Define Query
query = {  "marginTop": 0.4,  "marginBottom": 0.4,  "marginLeft": 0.4,  "marginRight": 0.4,  "landscape": false,  "url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts" }
Simple Request
# Make a request to the API
result = api.execute(query)

# Print the result
print(result)
Example Response
{
  "status": "ok",
  "error": null,
  "data": {
    "marginLeft": "0.4in",
    "marginRight": "0.4in",
    "marginTop": "0.4in",
    "marginBottom": "0.4in",
    "landscape": false,
    "pdfName": "0b69c0df-5c25-4144-9294-336097221f63.pdf",
    "expires": 1725356417742,
    "url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts",
    "downloadURL": "https://storage.googleapis.com/apiverve-helpers.appspot.com/websitetopdf/0b69c0df-5c25-4144-9294-336097221f63.pdf?GoogleAccessId=1089020767582-compute%40developer.gserviceaccount.com&Expires=1725356417&Signature=BCTQNzcQ75OKe2OtBB3lk1ONj%2B4fv07c6uuTCS3OFW2cvJsMe6nsHY%2FC5XNQzHjHEc5O5UuQ86euB52jm%2FX6VF0JUg04LlDmkQcF%2BQTrb9tvYORFv3r9%2BMk4uiZSvt8v7%2FifuMAyJcI0jll4Ot7zpCdRejHltJrVHaxYYqYMHq8ClcBhmpcddWuFSAfY5WENGJ%2FPCv9W%2F1LLYKOJu0YOZtOsHuRRs8Q7DZ1Pnk3EajZbhJKwtgpJ%2F7A1b%2F5guOHDJ2DLKN21BMocPZCCBIBOn%2BlEanbx6JBOT%2FE6IzbHlfsVwIoPIFA1osyJVxjskjsmM%2B7LBogJlUP41OA%2BGd25SA%3D%3D"
  },
  "code": 200
}

Customer Support

Need any assistance? Get in touch with Customer Support.


Updates

Stay up to date by following @apiverveHQ on Twitter.


Legal

All usage of the APIVerve website, API, and services is subject to the APIVerve Terms of Service and all legal documents and agreements.


License

Licensed under the The MIT License (MIT)

Copyright (©) 2024 APIVerve, and Evlar LLC

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Download files

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

Source Distribution

apiverve_websitetopdf-1.1.5.tar.gz (8.0 kB view details)

Uploaded Source

Built Distribution

apiverve_websitetopdf-1.1.5-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file apiverve_websitetopdf-1.1.5.tar.gz.

File metadata

  • Download URL: apiverve_websitetopdf-1.1.5.tar.gz
  • Upload date:
  • Size: 8.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for apiverve_websitetopdf-1.1.5.tar.gz
Algorithm Hash digest
SHA256 0f6000de581826e2379e83e168b0905ddb24d95f59e90dcb7bceac3033224996
MD5 7fbcaedd3af1afe1652f6d24b7bc3816
BLAKE2b-256 7a792910ed4299668fa377c96f734b05e9cfe97bb97e5b23eff86e7103dfc57c

See more details on using hashes here.

File details

Details for the file apiverve_websitetopdf-1.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for apiverve_websitetopdf-1.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d0f5d893cb023d36e5682725dcc0f862cd447ba835ce40b1452dd0e7c4c750b4
MD5 60571abfc4583f77c9c7175bb0fa7688
BLAKE2b-256 6e46a225d7528829db8eadd1ff38868128bea4c4ffc90851e99e70d63eac5a00

See more details on using hashes here.

Supported by

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