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": "512e8a7c-32f6-4fc4-9d48-33d8de1c07a8.pdf",
    "expires": 1723789170645,
    "url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/concepts",
    "downloadURL": "https://storage.googleapis.com/apiverve.appspot.com/websitetopdf/512e8a7c-32f6-4fc4-9d48-33d8de1c07a8.pdf?GoogleAccessId=635500398038-compute%40developer.gserviceaccount.com&Expires=1723789170&Signature=bgLti%2FSsLz%2BCmsv2LK77sezP%2FDyhlOr5haK6SMZUAuuL5F8ZtRmXDSQGlpYe4jvpauUPSF5MeW%2Bs%2B1D7o3DqX1rh7NQ1h8ct1qG5th0qWlchqPolP%2BxkpWVib6NAWmfRx3LeepgIYs%2BezwYUIMFgoLoXj3p3lEcyCTv9dlZGV9MdZfoDoJSKc2xAMBEXj6nRCMCBRBLLVgpycxGh3qhJrWEET%2FbkxaEcQ1QbYVTYC5V1fGaEJyTKjJc0JySuoGM0lvatqjJ5%2BHDDKLedjh718Qyr1caiq52vcFH4sIlF9%2B0mse%2FCtmRsVL0Nb8udKnLODBo9CmcJmvKAkWqquMljIQ%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.4.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

apiverve_websitetopdf-1.1.4-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apiverve_websitetopdf-1.1.4.tar.gz
  • Upload date:
  • Size: 7.8 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.4.tar.gz
Algorithm Hash digest
SHA256 b1005028f492e90529c41c6ce402e3d4302a953b64ad2bb0506a942193171682
MD5 7532c88f14557b0053abe55310d125ff
BLAKE2b-256 05b6e6c56d012f69e01a969e4e8233276cc2b98321bf270a3c64e17c79999119

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for apiverve_websitetopdf-1.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 be9e082ada65e6c7837f027610cae54ab6d195c4aa5659ab6512216df57ac282
MD5 62052f4a198868599b1f8c402a2aa0c0
BLAKE2b-256 ae1783c016bbc1e8c02e5abaaab3210976164807cc239680d9230cf2938b5d88

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