Conv2pdf
v1.3.0Convert Office files, images, e-books and web pages to PDF; merge, split, compress or protect PDFs.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
convert_to_pdf Convert to PDF
Converts a document, an image, an e-book or a web page saved as a file to PDF: Word, Excel, PowerPoint, OpenDocument, Apple Pages, RTF, TXT, CSV, PNG, JPG, WebP, GIF, TIFF, HEIC, EPUB, PostScript (PS, EPS), XPS (XPS, OXPS), Markdown (MD) and HTML. The converter is chosen from the extension of the file. An HTML file is printed as a browser would print it; a Markdown file is laid out as GitHub shows it, tables, code and math included, and must be saved as UTF-8. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
convert_url_to_pdf Convert Web Page to PDF
Converts the public web page at an address to PDF, as a browser prints it: the text stays selectable and the links work. The page is opened without a session, so a page behind a login is out of reach. The address is sent to Conv2pdf, which opens the page, and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Where to write the PDF, such as ~/Documents/page.pdf: absolute, or relative to the working directory of the server. An existing file is never overwritten. |
url * | string | Address of the page, starting with https:// or http://. |
convert_heic_to_jpg Convert HEIC to JPG
Converts an iPhone HEIC or HEIF photo to a JPG image. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
convert_pdf_to_word Convert PDF to Word
Converts a PDF that contains real text to an editable Word document (DOCX). A scanned PDF, made of images without text, is refused. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
convert_pdf_to_images Convert PDF to Images
Renders each page of a PDF as an image at 150 DPI. The result is one ZIP archive with an image per page. Up to 100 pages. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
format | string | Format of the images. Default: png. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
merge_pdfs Merge PDFs
Combines several PDFs into one, in the order given. 2 files on the Dev plan, up to 20 on paid plans. The result is written next to the first file. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_paths * | array | Paths of the PDFs on this computer, in the order they must appear in the result. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
extract_pdf_pages Extract Pages From PDF
Copies the pages you list into a new PDF, in the order you write them. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
pages * | string | Pages to keep, in the order wanted: numbers and ranges separated by commas, such as 1-5,7,10-12. 11- runs to the last page. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
split_pdf Split PDF
Puts every page of a PDF in its own PDF file. The result is one ZIP archive, with page-001.pdf, page-002.pdf and so on. Up to 200 pages. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
rotate_pdf Rotate PDF
Rotates every page of a PDF clockwise. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
rotation * | integer | Rotation in degrees, clockwise. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
add_page_numbers Add Page Numbers to PDF
Prints the page number at the bottom of every page of a PDF. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
format | string | full prints the page and the total, as "3 / 12"; simple prints "3". Default: full. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
position | string | Where the number goes. Default: bottom-center. |
add_watermark Add Watermark to PDF
Stamps a text diagonally across every page of a PDF. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
text * | string | Text of the watermark, such as CONFIDENTIAL: 50 characters at most, Latin letters, digits and punctuation. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
compress_pdf Compress PDF
Reduces the size of a PDF by lowering the resolution of its images. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Password of the PDF, only if it asks for one to open. The result has no password. |
quality | string | Resolution kept for the images: low is 72 DPI and gives the smallest file, medium 150 DPI, high 300 DPI. Default: medium. |
protect_pdf Protect PDF With Password
Encrypts a PDF (AES-256) so that it asks for a password to open, and optionally forbids printing or copying. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
password * | string | Password needed to open the PDF, 6 to 64 characters. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
prevent_copy | boolean | Forbid copying text. Default: false. |
prevent_print | boolean | Forbid printing. Default: false. |
unlock_pdf Unlock PDF
Removes the password and the restrictions of a PDF whose password is known. It does not find a forgotten password. The file is uploaded to Conv2pdf and the call counts as one conversion.
| Parameter | Type | Description |
|---|---|---|
input_path * | string | Path of the file on this computer: absolute, or relative to the working directory of the server. |
output_path | string | Where to write the result. Optional: by default next to the input file, under a name that is not taken. An existing file is never overwritten. |
password | string | Current password of the PDF. Leave it out for a PDF that opens without a password but restricts printing or copying. |
get_quota Get Quota
Returns the plan of the Conv2pdf API key and how many conversions it has used and may still use. Reading the quota is free.