Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

api2pdf

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

api2pdf - npm Package Compare versions

Comparing version
2.0.0
to
2.0.1
+21
LICENSE.txt
MIT License
Copyright (c) 2018 Api2Pdf
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.
+7
-6
Metadata-Version: 2.1
Name: api2pdf
Version: 2.0.0
Version: 2.0.1
Summary: This client library is a wrapper for the Api2Pdf.com REST API. See full REST api documentation at https://www.api2pdf.com/documentation/v2. Api2Pdf is a powerful API that supports HTML to PDF, URL to PDF, HTML to Image, URL to Image, Thumbnail / image preview of an Office file, Office files (Word to PDF), HTML to Docx, HTML to excel, PDF to HTML, merge PDFs together, add bookmarks to PDFs, add passwords to PDFs

@@ -217,3 +217,4 @@ Home-page: https://github.com/api2pdf/api2pdf.python

**Add bookmarks to existing PDF**
url = 'https://link-to-pdf
url = 'https://link-to-pdf'
bookmarks = [

@@ -227,3 +228,3 @@ { 'Page': 0, 'Title': 'Introduction' },

url = 'https://link-to-pdf
url = 'https://link-to-pdf'
password = 'hello'

@@ -236,5 +237,5 @@ response = a2p.PdfSharp.add_password(url, password)

**Api2PdfResponse: download_pdf()**
**Api2PdfResponse: download_file()**
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `download_pdf()` method to download the pdf to a file-like object which you can then save to your local cache. If the pdf generation was unsuccessful, it will throw a FileNotFoundException.
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `download_file()` method to download the pdf to a file-like object which you can then save to your local cache. If the pdf generation was unsuccessful, it will throw a FileNotFoundException.

@@ -249,3 +250,3 @@ ```

pdf_as_file_object = merge_result.download_pdf()
pdf_as_file_object = merge_result.download_file()
```

@@ -252,0 +253,0 @@

@@ -0,1 +1,2 @@

LICENSE.txt
README.md

@@ -2,0 +3,0 @@ setup.py

@@ -156,5 +156,5 @@ import requests

def download_pdf(self):
def download_file(self):
USERAGENT = {'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'}
if self.result['success']:
if self.result['Success']:
downloaded_file = requests.get(self.result['FileUrl'], headers=USERAGENT)

@@ -161,0 +161,0 @@ data = downloaded_file.content

Metadata-Version: 2.1
Name: api2pdf
Version: 2.0.0
Version: 2.0.1
Summary: This client library is a wrapper for the Api2Pdf.com REST API. See full REST api documentation at https://www.api2pdf.com/documentation/v2. Api2Pdf is a powerful API that supports HTML to PDF, URL to PDF, HTML to Image, URL to Image, Thumbnail / image preview of an Office file, Office files (Word to PDF), HTML to Docx, HTML to excel, PDF to HTML, merge PDFs together, add bookmarks to PDFs, add passwords to PDFs

@@ -217,3 +217,4 @@ Home-page: https://github.com/api2pdf/api2pdf.python

**Add bookmarks to existing PDF**
url = 'https://link-to-pdf
url = 'https://link-to-pdf'
bookmarks = [

@@ -227,3 +228,3 @@ { 'Page': 0, 'Title': 'Introduction' },

url = 'https://link-to-pdf
url = 'https://link-to-pdf'
password = 'hello'

@@ -236,5 +237,5 @@ response = a2p.PdfSharp.add_password(url, password)

**Api2PdfResponse: download_pdf()**
**Api2PdfResponse: download_file()**
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `download_pdf()` method to download the pdf to a file-like object which you can then save to your local cache. If the pdf generation was unsuccessful, it will throw a FileNotFoundException.
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `download_file()` method to download the pdf to a file-like object which you can then save to your local cache. If the pdf generation was unsuccessful, it will throw a FileNotFoundException.

@@ -249,3 +250,3 @@ ```

pdf_as_file_object = merge_result.download_pdf()
pdf_as_file_object = merge_result.download_file()
```

@@ -252,0 +253,0 @@

@@ -209,3 +209,4 @@ # api2pdf.python

**Add bookmarks to existing PDF**
url = 'https://link-to-pdf
url = 'https://link-to-pdf'
bookmarks = [

@@ -219,3 +220,3 @@ { 'Page': 0, 'Title': 'Introduction' },

url = 'https://link-to-pdf
url = 'https://link-to-pdf'
password = 'hello'

@@ -228,5 +229,5 @@ response = a2p.PdfSharp.add_password(url, password)

**Api2PdfResponse: download_pdf()**
**Api2PdfResponse: download_file()**
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `download_pdf()` method to download the pdf to a file-like object which you can then save to your local cache. If the pdf generation was unsuccessful, it will throw a FileNotFoundException.
On any `Api2PdfResponse` that succesfully generated a pdf, you can use the handy `download_file()` method to download the pdf to a file-like object which you can then save to your local cache. If the pdf generation was unsuccessful, it will throw a FileNotFoundException.

@@ -241,3 +242,3 @@ ```

pdf_as_file_object = merge_result.download_pdf()
pdf_as_file_object = merge_result.download_file()
```

@@ -244,0 +245,0 @@

@@ -8,3 +8,3 @@ import setuptools

name="api2pdf",
version="2.0.0",
version="2.0.1",
author="Zack Schwartz",

@@ -11,0 +11,0 @@ author_email="support@api2pdf.com",