PDF.co API v.1.00
NOTE: This documentation applies to both PDF.co and its on-prem version called ByteScout API Server. Remarks in the documentation highlight a difference between on-prem and cloud versions if any.
- Key Benefits
- Not a developer? Use PDF.co via No-Code, Business Automation and RPA platforms integrations
- Known Issues
- Source Code Samples for JS, PHP, Java, .NET, CLI and others
- Contact Support
- Technical Notes
PDF.co API Benefits
- Security: PDF.co API runs on the secure and certified Amazon AWS infrastructure. All data transfers are encrypted by SSL/TLS encryption. See the security page for more details. On-prem version can run on any hosting provider and cloud storage of your choice.
- Asynchronous mode is supported so you can process large files and documents with hundreds of pages in the cloud.
- Battle tested by thousands of production users. Our engines are tested in production by thousands of enterprise users.
- Credits based system. For every page/image or a single call processed credits are reduced on your account. You can purchase credits with one-time payments or subscribe for monthly credits. You can check how many credits are left using
credits
property in output or andremainingCredits
property to check how many credits are left. For details please explore your API logs. - On-Prem API Server and On-Prem SDK are also available. Enterprise users may easily switch to
ByteScout API Server
that provides similar API interface and install it on their own server. Contact support for more information about on-prem version.
Not a developer? Use PDF.co via No-Code, Business Automation and RPA platforms integrations
You can use PDF.co on popular platforms including:
Known Issues
- (PHP language):
SSL certificate error: unable to get local issuer certificate
. To resolve the issue with checking https certificate please check this solution on Stackoverflow
Source Code Samples
We have hundreds of ready to copy-paste source code samples!
Explore Hundreds of Source Code Sample Apps on Github. Samples apps are available for Javascript, Node.js, PHP, Java, C#, Visual Basic, ASP.NET, Powershell, CLI and others!
Contact Tech Support
Our team of engineers is happy to help with the integration, coding of proof of concept projects and any other questions. To contact us please:
- Submit a Ticket (recommended)
- or send email to pdfco@bytescout.zendesk.com
Technical Notes
How to upload files to API
- Request a temporary URL for upload using
/file/upload/get-presigned-url
. This will return JSON withpresignedUrl
property that contains a link you should upload into usingPUT
andurl
property that contains a link to the uploaded file. - Upload your file using
PUT
to thispresignedUrl
link generated on the previous step. Once finished, your file can be accessed using the link fromurl
link from the step1
- Congrats! Now you can access your uploaded file using that link from
url
param from step1
. Now you can call any API method with your link set asurl
param.
Security Note: Uploaded files are auto-removed within 60
minutes by default. You can also remove your file earlier using /file/delete
endpoint.
On-Prem Version only: Depending on your settings, your files are stored on your server or in the cloud storage of your choice or on your file server. If you use cloud storage (like AWS S3) then you need to set up an auto-removal policy for uploaded files or remove files using /file/delete
endpoint.
How to run a background job
We’ve designed a special async
mode that is available for almost all endpoints. If your call takes more than 25
seconds then you need to run it as a background job that can work for up to 15-20 minutes and can process large documents and files.
When you set async
param to true
, your call returns jobId
param containing unique ID of your background job. Use /job/check
to read a background job status to find when your output file is ready for download.
Step by step:
- Add the
async
parameter and set it totrue
. 2 Enableasync
mode by settingasync
input parameter totrue
. This will tell API method to create background job and immediately return unique id of this new background job injobId
property in the output along with the finalurl
. Use this url to access the output file (if any) once the job is finished. - Now check the status of that new background job using
/job/check
withjobId
parameter set to the jobId value from the previous step. Repeat and check until it returnsstatus
assuccess
. Recommended interval for checking is 1-2 seconds for small documents and 10-15 seconds for large documents.
Status Errors Returned by API
API returns https status but also returns JSON that includes status
parameter indicating error.
Status value | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
402 | not enough credits |
403 | forbidden (source file or url is not accessible) |
408 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key. Get your API key here
Indices
- /pdf/documentparser (output as CSV)
- /pdf/documentparser (output as JSON)
- /pdf/documentparser (output as JSON, custom template code)
- /pdf/documentparser (output as XML)
- /pdf/documentparser/results
- /pdf/documentparser/results
- /pdf/documentparser/results/:id
- /pdf/documentparser/templates
- /pdf/documentparser/templates/:id
01. Document Parser
Document Parser automatically extracts fields, tables, values from invoices, statements, orders and other PDF and scanned documents.
Built-in templates:
- Invoices (currently, English language only) can be parsed by the built-in template
1
(set thetemplateId
param to1
).
Helper tools:
- Document Parser Template Editor (or check a standalone version here)
- Manual Template Coding Guide
Some Sample Templates
Simple templates (extracting data from fixed coordinates) can be easily created with Document Parser template editor
Complex templates are also supported. You can edit them using the editor and also can edit manually.
Sample PDF document: PDF document with tables and multiple pages
Below is the template that demonstrates parsing of multi-page table using only regular expressions for the table start, end, and rows. If regular expression cannot be used for every table row (for example, if the table contains empty cells), try the second template below (MultiPageTable-template2
) showcasing another approach.
MultipageTable-template1.json:
{
"templateVersion": 3,
"templatePriority": 0,
"sourceId": "Multipage Table Test",
"detectionRules": {
"keywords": []
},
"fields": {
"total": {
"type": "regex",
"expression": "TOTAL {{DECIMAL}}",
"dataType": "decimal"
}
},
"tables": [
{
"name": "table1",
"start": {
"expression": "Item\\s+Description\\s+Price\\s+Qty\\s+Extended Price"
},
"end": {
"expression": "TOTAL\\s+\\d+\\.\\d\\d"
},
"row": {
"expression": "^\\s*(?<itemNo>\\d+)\\s+(?<description>.+?)\\s+(?<price>\\d+\\.\\d\\d)\\s+(?<qty>\\d+)\\s+(?<extPrice>\\d+\\.\\d\\d)"
},
"columns": [
{
"name": "itemNo",
"type": "integer"
},
{
"name": "description",
"type": "string"
},
{
"name": "price",
"type": "decimal"
},
{
"name": "qty",
"type": "integer"
},
{
"name": "extPrice",
"type": "decimal"
}
],
"multipage": true
}
]
}
NOTE: put this template code into the template
param as string. You can also just add this template into your templates and reference to it using templateId
param.
1. /pdf/documentparser (output as CSV)
Description: Gets data from documents using a data extraction template. With this API method you may extract data from custom areas, by search, form fields, tables, multiple pages and more!
Additional tools and guides:
- Document Parser Template Editor
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.templateId
. required. Sets Id of document parser template to be used. View and manage your templates at https://app.pdf.co/document-parsertemplate
. optional. You can pass code of document parser template to be used directly.inline
. optional. Set totrue
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default isJSON
. You can override default output format toCSV
orXML
to generate CSV or XML output accordingly.storeResult
. optional. Set totrue
if you want to store results generated in PDF.co. You can view stored data extraction results at https://app.pdf.co/document-parserpassword
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"templateId": "1",
"outputFormat": "CSV",
"generateCsvHeaders": true,
"async": false,
"encrypt": "false",
"inline": "true",
"password": "",
"storeResult": false
}
More example Requests/Responses:
I. Example Request: /pdf/documentparser (output as CSV)
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"templateId": "1",
"outputFormat": "CSV",
"generateCsvHeaders": true,
"async": false,
"encrypt": "false",
"inline": "true",
"password": ""
}
I. Example Response: /pdf/documentparser (output as CSV)
{
"body": "companyName,companyName2,invoiceId,dateIssued,dateDue,bankAccount,total,subTotal,tax,tableNames,tables\r\n\"Amazon Web Services, Inc\",\"Amazon Web Services, Inc\",123456789,2018-04-03T00:00:00,2018-04-03T00:00:00,123456789012,6.58,,1.01,table,\r\n\r\n",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample-invoice.csv",
"remainingCredits": 60804
}
Status Code: 200
2. /pdf/documentparser (output as JSON)
Description: Gets data from documents using a data extraction template. With this API method you may extract data from custom areas, by search, form fields, tables, multiple pages and more!
Additional tools and guides:
Parameters
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.templateId
. required. Sets Id of document parser template to be used. View and manage your templates at https://app.pdf.co/document-parsertemplate
. optional. You can pass code of document parser template to be used directly.inline
. optional. Set totrue
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default isJSON
. You can override default output format toCSV
orXML
to generate CSV or XML output accordingly.storeResult
. optional. Set totrue
if you want to store results generated in PDF.co. You can view stored data extraction results at https://app.pdf.co/document-parserpassword
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"outputFormat": "JSON",
"templateId": "1",
"async": false,
"encrypt": "false",
"inline": "true",
"password": "",
"profiles": "",
"storeResult": false
}
More example Requests/Responses:
I. Example Request: /pdf/documentparser (output as JSON)
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"outputFormat": "JSON",
"templateId": "1",
"async": false,
"encrypt": "false",
"inline": "true",
"password": "",
"profiles": ""
}
I. Example Response: /pdf/documentparser (output as JSON)
{
"body": {
"objects": [
{
"name": "companyName",
"objectType": "field",
"value": "Amazon Web Services, Inc",
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "companyName2",
"objectType": "field",
"value": "Amazon Web Services, Inc",
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "invoiceId",
"objectType": "field",
"value": "123456789",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "dateIssued",
"objectType": "field",
"value": "2018-04-03T00:00:00",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "dateDue",
"objectType": "field",
"value": "2018-04-03T00:00:00",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "bankAccount",
"objectType": "field",
"value": "123456789012",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "total",
"objectType": "field",
"value": 6.58,
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "subTotal",
"objectType": "field",
"value": ""
},
{
"name": "tax",
"objectType": "field",
"value": 1.01,
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"objectType": "table",
"name": "table",
"rows": []
}
],
"templateName": "Generic Invoice [en]",
"templateVersion": "4",
"timestamp": "2020-08-21T19:23:31"
},
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample-invoice.json",
"remainingCredits": 60803
}
Status Code: 200
3. /pdf/documentparser (output as JSON, custom template code)
Description: Parses and gets data from documents using previously prepared custom data extraction template. With this API method you may extract data from custom areas, by search, form fields, tables, multiple pages and more!
Template tools and guides:
Parameters
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.templateId
. required. Sets Id of document parser template to be used. View and manage your templates at https://app.pdf.co/document-parsertemplate
. optional. You can pass code of document parser template to be used directly.inline
. optional. Set totrue
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default isJSON
. You can override default output format toCSV
orXML
to generate CSV or XML output accordingly.storeResult
. optional. Set totrue
if you want to store results generated in PDF.co. You can view stored data extraction results at https://app.pdf.co/document-parserpassword
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf",
"template": "{\r\n \"templateVersion\": 3,\r\n \"templatePriority\": 0,\r\n \"sourceId\": \"Multipage Table Test\",\r\n \"detectionRules\": {\r\n \"keywords\": [\r\n \"Sample document with multi-page table\"\r\n ]\r\n },\r\n \"fields\": {\r\n \"total\": {\r\n \"type\": \"regex\",\r\n \"expression\": \"TOTAL {{DECIMAL}}\",\r\n \"dataType\": \"decimal\"\r\n }\r\n },\r\n \"tables\": [\r\n {\r\n \"name\": \"table1\",\r\n \"start\": {\r\n \"expression\": \"Item\\\\s+Description\\\\s+Price\\\\s+Qty\\\\s+Extended Price\"\r\n },\r\n \"end\": {\r\n \"expression\": \"TOTAL\\\\s+\\\\d+\\\\.\\\\d\\\\d\"\r\n },\r\n \"row\": {\r\n \"expression\": \"^\\\\s*(?<itemNo>\\\\d+)\\\\s+(?<description>.+?)\\\\s+(?<price>\\\\d+\\\\.\\\\d\\\\d)\\\\s+(?<qty>\\\\d+)\\\\s+(?<extPrice>\\\\d+\\\\.\\\\d\\\\d)\"\r\n },\r\n \"columns\": [\r\n {\r\n \"name\": \"itemNo\",\r\n \"type\": \"integer\"\r\n },\r\n {\r\n \"name\": \"description\",\r\n \"type\": \"string\"\r\n },\r\n {\r\n \"name\": \"price\",\r\n \"type\": \"decimal\"\r\n },\r\n {\r\n \"name\": \"qty\",\r\n \"type\": \"integer\"\r\n },\r\n {\r\n \"name\": \"extPrice\",\r\n \"type\": \"decimal\"\r\n }\r\n ],\r\n \"multipage\": true\r\n }\r\n ]\r\n}",
"outputFormat": "JSON",
"async": false,
"encrypt": "false",
"inline": "true",
"profiles": "",
"password": "",
"storeResult": false
}
More example Requests/Responses:
I. Example Request: POST /pdf/documentparser
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
inline | true | optional. Must be one of: true , false . |
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf | required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
templateId | 1 | optional. ID of the template to be used. Add, manage templates at https://app.pdf.co/document-parser-templates |
I. Example Response: POST /pdf/documentparser
{
"body": {
"objects": [
{
"name": "companyName",
"objectType": "field",
"value": "Amazon Web Services, Inc",
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "companyName2",
"objectType": "field",
"value": "Amazon Web Services, Inc",
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "invoiceId",
"objectType": "field",
"value": "123456789",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "dateIssued",
"objectType": "field",
"value": "2018-04-03T00:00:00",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "dateDue",
"objectType": "field",
"value": "2018-04-03T00:00:00",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "total",
"objectType": "field",
"value": 6.58,
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "subTotal",
"objectType": "field",
"value": ""
},
{
"name": "tax",
"objectType": "field",
"value": 1.01,
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"objectType": "table",
"name": "table",
"rows": []
}
],
"templateName": "Generic Invoice [en]",
"templateVersion": "4",
"timestamp": "2020-07-16T22:04:25"
},
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample-invoice.json",
"remainingCredits": 77731
}
Status Code: 200
4. /pdf/documentparser (output as XML)
Description: Gets data from documents using a data extraction template. With this API method you may extract data from custom areas, by search, form fields, tables, multiple pages and more!
Additional tools and guides:
Parameters
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.templateId
. required. Sets Id of document parser template to be used. View and manage your templates at https://app.pdf.co/document-parsertemplate
. optional. You can pass code of document parser template to be used directly.inline
. optional. Set totrue
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default isJSON
. You can override default output format toCSV
orXML
to generate CSV or XML output accordingly.storeResult
. optional. Set totrue
if you want to store results generated in PDF.co. You can view stored data extraction results at https://app.pdf.co/document-parserpassword
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"outputFormat": "JSON",
"templateId": "1",
"async": false,
"encrypt": "false",
"inline": "true",
"password": "",
"profiles": "",
"storeResult": false
}
More example Requests/Responses:
I. Example Request: /pdf/documentparser (output as JSON)
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/sample-invoice.pdf",
"outputFormat": "JSON",
"templateId": "1",
"async": false,
"encrypt": "false",
"inline": "true",
"password": "",
"profiles": ""
}
I. Example Response: /pdf/documentparser (output as JSON)
{
"body": {
"objects": [
{
"name": "companyName",
"objectType": "field",
"value": "Amazon Web Services, Inc",
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "companyName2",
"objectType": "field",
"value": "Amazon Web Services, Inc",
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "invoiceId",
"objectType": "field",
"value": "123456789",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "dateIssued",
"objectType": "field",
"value": "2018-04-03T00:00:00",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "dateDue",
"objectType": "field",
"value": "2018-04-03T00:00:00",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "bankAccount",
"objectType": "field",
"value": "123456789012",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "total",
"objectType": "field",
"value": 6.58,
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"name": "subTotal",
"objectType": "field",
"value": ""
},
{
"name": "tax",
"objectType": "field",
"value": 1.01,
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
]
},
{
"objectType": "table",
"name": "table",
"rows": []
}
],
"templateName": "Generic Invoice [en]",
"templateVersion": "4",
"timestamp": "2020-08-21T19:23:31"
},
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample-invoice.json",
"remainingCredits": 60803
}
Status Code: 200
5. /pdf/documentparser/results
Return all document parser results for this user. Please use GET request.
Endpoint:
Method: GET
Type:
URL: https://api.pdf.co/v1/pdf/documentparser/results
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Query params:
Key | Value | Description |
---|---|---|
templateId | 1 | optional. Return all results for this document parser template id. Must be a String. |
More example Requests/Responses:
I. Example Request: JSON pdf/documentparser/results
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Query:
Key | Value | Description |
---|---|---|
templateId | 40 | optional. Return all results for this document parser template id. Must be a String. |
I. Example Response: JSON pdf/documentparser/results
{
"results": [
{
"id": 74,
"templateId": 40,
"body": {
"fields": {
"date": {
"value": ""
},
"amount": {
"value": "2",
"pageIndex": 0
}
},
"sourceId": null,
"templateId": null,
"templateVersion": "3"
},
"createdAt": "2020-03-23T11:17:30.152Z",
"filename": "EINPresswire-Report-512260784-bytescout-announces-release-of-its-data-extraction-tools-for-on-cloud-deployments.pdf"
}
],
"remainingCredits": 94220
}
Status Code: 200
6. /pdf/documentparser/results
Description Create document parser result for this user. Please use POST request.
Input Parameters
Param | Description |
---|---|
templateId | optional. Create document parser result with this template id. Must be a String. |
result | optional. JSONB storage for storing document parser result. Must be a String. |
resultType | optional. Result format. Valid values: JSON, YAML, XML, CSV. Must be a String. |
fileUrl | optional. URL to source PDF File. Must be a String. |
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser/results
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"fileUrl": "https://github.com/bytescout/ByteScout-SDK-SourceCode/raw/master/Document%20Parser%20SDK/DigitalOcean.pdf",
"templateId": 48,
"formatType": "CSV",
"result": "companyName,companyName2,invoiceId,dateIssued,dateDue,total,subTotal,tax\r\n,,,,,450.00,,\r\n\r\n"
}
7. /pdf/documentparser/results/:id
DELETE document parser result with given id. Please use DELETE request.
Endpoint:
Method: DELETE
Type:
URL: https://api.pdf.co/v1/pdf/documentparser/results/:id
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
URL variables:
Key | Value | Description |
---|---|---|
id | Required. ID of result to delete. |
8. /pdf/documentparser/templates
Return all data extraction templates for document parser for this user. Please use GET request.
Endpoint:
Method: GET
Type:
URL: https://api.pdf.co/v1/pdf/documentparser/templates
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
More example Requests/Responses:
I. Example Request: pdf/documentparser/templates
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
I. Example Response: pdf/documentparser/templates
{
"templates": [
{
"id": 40,
"type": "user",
"title": "Untitled",
"description": "Untitled"
},
{
"id": 1,
"type": "system",
"title": "Invoice Parser",
"description": "Parses invoices and extracts invoice number, company name, due date, amount, tax"
}
],
"remainingCredits": 94229
}
Status Code: 0
9. /pdf/documentparser/templates/:id
Returns detailed information for document parser template by template’s id. Please use GET request.
Endpoint:
Method: GET
Type: RAW
URL: https://api.pdf.co/v1/pdf/documentparser/templates/:id
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
URL variables:
Key | Value | Description |
---|---|---|
id | 1 |
02. PDF Translate
Get detailed information about PDF document, its properties and security permissions.
For one-time check of PDF file information (including pdf form fields information if any) you can also use this page: https://app.pdf.co/pdf-info.
1. /pdf/translate
Translates text in PDF from one language to another using ML and AI.
NOTE: by default translation is limited to the very first page. Use pages
param to set another range of pages to translate.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.langFrom
defines ID of the source language (see the list of available languages below). String. Default isen
(English)langTo
defines ID of the target language (see the list of available languages below). String. Required.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.password
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
The List of Supported Languages
Language | Id |
---|---|
Afrikaans | af |
Albanian | sq |
Amharic | am |
Arabic | ar |
Armenian | hy |
Azerbaijani | az |
Bengali | bn |
Bosnian | bs |
Bulgarian | bg |
Catalan | ca |
Chinese (Simplified) | zh |
Chinese (Traditional) | zh-TW |
Croatian | hr |
Czech | cs |
Danish | da |
Dari | fa-AF |
Dutch | nl |
English | en |
Estonian | et |
Farsi (Persian) | fa |
Filipino Tagalog | tl |
Finnish | fi |
French | fr |
French (Canada) | fr-CA |
Georgian | ka |
German | de |
Greek | el |
Gujarati | gu |
Haitian Creole | ht |
Hausa | ha |
Hebrew | he |
Hindi | hi |
Hungarian | hu |
Icelandic | is |
Indonesian | id |
Italian | it |
Japanese | ja |
Kannada | kn |
Kazakh | kk |
Korean | ko |
Latvian | lv |
Lithuanian | lt |
Macedonian | mk |
Malay | ms |
Malayalam | ml |
Maltese | mt |
Mongolian | mn |
Norwegian | no |
Persian | fa |
Pashto | ps |
Polish | pl |
Portuguese | pt |
Romanian | ro |
Russian | ru |
Serbian | sr |
Sinhala | si |
Slovak | sk |
Slovenian | sl |
Somali | so |
Spanish | es |
Spanish (Mexico) | es-MX |
Swahili | sw |
Swedish | sv |
Tagalog | tl |
Tamil | ta |
Telugu | te |
Thai | th |
Turkish | tr |
Ukrainian | uk |
Urdu | ur |
Uzbek | uz |
Vietnamese | vi |
Welsh | cy |
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/translate
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | your api key for PDF.co API access. Get yours at https://app.pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-csv/sample.pdf",
"name": "result-translate-en-to-de",
"langFrom": "en",
"langto": "de",
"async": false
}
03. PDF Info Reader
Get detailed information about PDF document, its properties and security permissions.
For one-time check of PDF file information (including pdf form fields information if any) you can also use this page: https://app.pdf.co/pdf-info.
1. /pdf/info
Extracts basic information about input PDF file, PDF file security permissions, and other information. If you want to extract information about fillable fields (checkboxes, radiboxes, listboxes) from PDF then please use /pdf/info/fields
instead.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/info
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | your api key for PDF.co API access. Get yours at https://app.pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-info/sample.pdf"
}
More example Requests/Responses:
I. Example Request: POST /pdf/info
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-info/sample.pdf | required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
password | optional. Password of PDF file. Must be a String. |
I. Example Response: POST /pdf/info
{
"info": {
"PageCount": 1,
"Author": "Alice V. Knox",
"Title": "Kid's News 1",
"Producer": "Acrobat Distiller 4.0 for Windows",
"Subject": "Kid's News 1",
"CreationDate": "8/15/2001 2:50:36 PM",
"Bookmarks": "",
"Keywords": "",
"Creator": "Adobe PageMaker 6.52",
"Encrypted": false,
"PageRectangle": {
"Location": {
"IsEmpty": true,
"X": 0,
"Y": 0
},
"Size": "612, 792",
"X": 0,
"Y": 0,
"Width": 612,
"Height": 792,
"Left": 0,
"Top": 0,
"Right": 612,
"Bottom": 792,
"IsEmpty": false
},
"ModificationDate": "9/20/2001 6:23:02 PM",
"EncryptionAlgorithm": 0,
"PermissionPrinting": true,
"PermissionModifyDocument": true,
"PermissionContentExtraction": true,
"PermissionModifyAnnotations": true,
"PermissionFillForms": true,
"PermissionAccessibility": true,
"PermissionAssemble": true,
"PermissionHighQualityPrint": true
},
"error": false,
"status": 200,
"remainingCredits": 77732
}
Status Code: 200
03.1 PDF Forms Info Reader
Get information about fillable fields inside PDF form file.
For one-time check of PDF file information (including pdf form fields information if any) you can also use this page: https://app.pdf.co/pdf-info.
1. /pdf/info/fields
Extracts information about fillable PDF fields (fillable edit boxes, fillable checkboxes, radioboxes, comboboxes) from input PDF file along with general information about input PDF document. The purpose of this endpoint is to get information about fillable PDF for use with PDF.co pdf filler (/pdf/edit/add
method)
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/info/fields
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf"
}
More example Requests/Responses:
I. Example Request: /pdf/info/fields
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf"
}
I. Example Response: /pdf/info/fields
{
"info": {
"PageCount": 3,
"Author": "SE:W:CAR:MP",
"Title": "2019 Form 1040",
"Producer": "macOS Version 10.15.1 (Build 19B88) Quartz PDFContext",
"Subject": "U.S. Individual Income Tax Return",
"CreationDate": "8/7/2020 11:17:29 AM",
"Bookmarks": "",
"Keywords": "Fillable",
"Creator": "Adobe LiveCycle Designer ES 9.0",
"Encrypted": false,
"PasswordProtected": false,
"PageRectangle": {
"Location": {
"IsEmpty": true,
"X": 0,
"Y": 0
},
"Size": "612, 792",
"X": 0,
"Y": 0,
"Width": 612,
"Height": 792,
"Left": 0,
"Top": 0,
"Right": 612,
"Bottom": 792,
"IsEmpty": false
},
"ModificationDate": "8/7/2020 11:17:29 AM",
"EncryptionAlgorithm": "None",
"PermissionPrinting": true,
"PermissionModifyDocument": true,
"PermissionContentExtraction": true,
"PermissionModifyAnnotations": true,
"PermissionFillForms": true,
"PermissionAccessibility": true,
"PermissionAssemble": true,
"PermissionHighQualityPrint": true,
"FieldsInfo": {
"Fields": [
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[0]",
"Value": "False",
"Left": 95.5989990234375,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
"Value": "False",
"Left": 138.7989959716797,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[2]",
"Value": "False",
"Left": 225.19900512695312,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[3]",
"Value": "False",
"Left": 340.39898681640625,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[4]",
"Value": "False",
"Left": 441.1990051269531,
"Top": 67.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].FilingStatus[0].f1_01[0]",
"Value": "",
"Left": 208.8000030517578,
"Top": 90,
"Width": 331.20001220703125,
"Height": 11.9990234375
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_02[0]",
"Value": "",
"Left": 36,
"Top": 111.9990234375,
"Width": 200.60000610351562,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_03[0]",
"Value": "",
"Left": 238.60000610351562,
"Top": 111.9990234375,
"Width": 228.39999389648438,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
"Value": "",
"Left": 468,
"Top": 111.9990234375,
"Width": 108,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"Value": "",
"Left": 36,
"Top": 136,
"Width": 200.60000610351562,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
"Value": "",
"Left": 238.60000610351562,
"Top": 136,
"Width": 228.39999389648438,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].f1_07[0]",
"Value": "",
"Left": 468,
"Top": 136,
"Width": 108,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].Address[0].f1_08[0]",
"Value": "",
"Left": 36,
"Top": 160.0009765625,
"Width": 380.6000061035156,
"Height": 14.00103759765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].Address[0].f1_09[0]",
"Value": "",
"Left": 418.6000061035156,
"Top": 160.0009765625,
"Width": 48.399993896484375,
"Height": 14.00103759765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].Address[0].f1_10[0]",
"Value": "",
"Left": 36,
"Top": 183.9990234375,
"Width": 431,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].Address[0].f1_11[0]",
"Value": "",
"Left": 36,
"Top": 208,
"Width": 222.20001220703125,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].Address[0].f1_12[0]",
"Value": "",
"Left": 260.20001220703125,
"Top": 208,
"Width": 142,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[0].Address[0].f1_13[0]",
"Value": "",
"Left": 404.20001220703125,
"Top": 208,
"Width": 62.79998779296875,
"Height": 14.0009765625
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].PresidentialElection[0].c1_02[0]",
"Value": "False",
"Left": 513.2000122070312,
"Top": 188,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].PresidentialElection[0].c1_03[0]",
"Value": "False",
"Left": 542,
"Top": 188,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].StandardDeduction[0].c1_04[0]",
"Value": "False",
"Left": 167.5989990234375,
"Top": 224,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].StandardDeduction[0].c1_05[0]",
"Value": "False",
"Left": 261.1990051269531,
"Top": 224,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].StandardDeduction[0].c1_06[0]",
"Value": "False",
"Left": 95.5989990234375,
"Top": 235.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].AgeBlindness[0].c1_07[0]",
"Value": "False",
"Left": 117.1989974975586,
"Top": 253.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].AgeBlindness[0].c1_08[0]",
"Value": "False",
"Left": 246.7989959716797,
"Top": 253.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].AgeBlindness[0].c1_09[0]",
"Value": "False",
"Left": 340.39898681640625,
"Top": 253.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl[1].AgeBlindness[0].c1_10[0]",
"Value": "False",
"Left": 469.9989929199219,
"Top": 253.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].IfMoreThanFour[0].c1_11[0]",
"Value": "False",
"Left": 568,
"Top": 210.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row1[0].f1_14[0]",
"Value": "",
"Left": 36,
"Top": 287.99700927734375,
"Width": 207.8000030517578,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row1[0].f1_15[0]",
"Value": "",
"Left": 244.8000030517578,
"Top": 287.99700927734375,
"Width": 86.40000915527344,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row1[0].f1_16[0]",
"Value": "",
"Left": 332.20001220703125,
"Top": 287.99700927734375,
"Width": 84.39999389648438,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row1[0].c1_12[0]",
"Value": "False",
"Left": 453.20001220703125,
"Top": 289.9960021972656,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row1[0].c1_13[0]",
"Value": "False",
"Left": 532.4000244140625,
"Top": 289.9960021972656,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row2[0].f1_17[0]",
"Value": "",
"Left": 36,
"Top": 299.9960021972656,
"Width": 207.8000030517578,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row2[0].f1_18[0]",
"Value": "",
"Left": 244.8000030517578,
"Top": 299.9960021972656,
"Width": 86.40000915527344,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row2[0].f1_19[0]",
"Value": "",
"Left": 332.20001220703125,
"Top": 299.9960021972656,
"Width": 84.39999389648438,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row2[0].c1_14[0]",
"Value": "False",
"Left": 453.20001220703125,
"Top": 301.9949951171875,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row2[0].c1_15[0]",
"Value": "False",
"Left": 532.4000244140625,
"Top": 301.9949951171875,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row3[0].f1_20[0]",
"Value": "",
"Left": 36,
"Top": 311.9949951171875,
"Width": 207.8000030517578,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row3[0].f1_21[0]",
"Value": "",
"Left": 244.8000030517578,
"Top": 311.9949951171875,
"Width": 86.40000915527344,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row3[0].f1_22[0]",
"Value": "",
"Left": 332.20001220703125,
"Top": 311.9949951171875,
"Width": 84.39999389648438,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row3[0].c1_16[0]",
"Value": "False",
"Left": 453.20001220703125,
"Top": 313.9939880371094,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row3[0].c1_17[0]",
"Value": "False",
"Left": 532.4000244140625,
"Top": 313.9939880371094,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row4[0].f1_23[0]",
"Value": "",
"Left": 36,
"Top": 323.9939880371094,
"Width": 207.8000030517578,
"Height": 11.9990234375
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row4[0].f1_24[0]",
"Value": "",
"Left": 244.8000030517578,
"Top": 323.9939880371094,
"Width": 86.40000915527344,
"Height": 11.9990234375
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row4[0].f1_25[0]",
"Value": "",
"Left": 332.20001220703125,
"Top": 323.9939880371094,
"Width": 84.39999389648438,
"Height": 11.9990234375
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row4[0].c1_18[0]",
"Value": "False",
"Left": 453.20001220703125,
"Top": 325.9930114746094,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].Dependents[0].Table_Dependents[0].Row4[0].c1_19[0]",
"Value": "False",
"Left": 532.4000244140625,
"Top": 325.9930114746094,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_26[0]",
"Value": "",
"Left": 504,
"Top": 335.9989929199219,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_27[0]",
"Value": "",
"Left": 252,
"Top": 348.0010070800781,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_28[0]",
"Value": "",
"Left": 504,
"Top": 348.0010070800781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_29[0]",
"Value": "",
"Left": 252,
"Top": 360,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_30[0]",
"Value": "",
"Left": 504,
"Top": 360,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_31[0]",
"Value": "",
"Left": 252,
"Top": 371.9989929199219,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_32[0]",
"Value": "",
"Left": 504,
"Top": 371.9989929199219,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_33[0]",
"Value": "",
"Left": 252,
"Top": 384.0010070800781,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_34[0]",
"Value": "",
"Left": 504,
"Top": 384.0010070800781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_35[0]",
"Value": "",
"Left": 252,
"Top": 396,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_36[0]",
"Value": "",
"Left": 504,
"Top": 396,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].c1_20[0]",
"Value": "False",
"Left": 465.2030029296875,
"Top": 410.74798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_37[0]",
"Value": "",
"Left": 504,
"Top": 407.9989929199219,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_38[0]",
"Value": "",
"Left": 504,
"Top": 420.0010070800781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_39[0]",
"Value": "",
"Left": 504,
"Top": 432,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_40[0]",
"Value": "",
"Left": 504,
"Top": 443.9989929199219,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].ReadOrderControl_Lns1-8b[0].f1_41[0]",
"Value": "",
"Left": 504,
"Top": 456.0010070800781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_42[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 468,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_43[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 479.9989929199219,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_44[0]",
"Value": "",
"Left": 504,
"Top": 492,
"Width": 72,
"Height": 12
},
{
"PageIndex": 1,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page1[0].f1_45[0]",
"Value": "",
"Left": 504,
"Top": 504.0000305175781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].Lines12a-12b_ReadOrder[0].c2_01[0]",
"Value": "False",
"Left": 246.8000030517578,
"Top": 38.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].Lines12a-12b_ReadOrder[0].c2_02[0]",
"Value": "False",
"Left": 290,
"Top": 38.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].Lines12a-12b_ReadOrder[0].c2_03[0]",
"Value": "False",
"Left": 333.1990051269531,
"Top": 38.9990234375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Lines12a-12b_ReadOrder[0].f2_01[0]",
"Value": "",
"Left": 345.6000061035156,
"Top": 36,
"Width": 36,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Lines12a-12b_ReadOrder[0].f2_02[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 36,
"Width": 71.25,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_03[0]",
"Value": "",
"Left": 504,
"Top": 48,
"Width": 72,
"Height": 12.0009765625
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Lines13a-13b_ReadOrder[0].f2_04[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 60.0009765625,
"Width": 71.25,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_05[0]",
"Value": "",
"Left": 504,
"Top": 72.0009765625,
"Width": 72,
"Height": 12.00103759765625
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_06[0]",
"Value": "",
"Left": 504,
"Top": 83.9990234375,
"Width": 72,
"Height": 11.99896240234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_07[0]",
"Value": "",
"Left": 504,
"Top": 96.0009765625,
"Width": 72,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_08[0]",
"Value": "",
"Left": 504,
"Top": 108,
"Width": 72,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_09[0]",
"Value": "",
"Left": 504,
"Top": 119.9990234375,
"Width": 72,
"Height": 11.99896240234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Line18_ReadOrder[0].f2_10[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 144,
"Width": 71.25,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Line18_ReadOrder[0].f2_11[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 155.9990234375,
"Width": 71.25,
"Height": 11.99896240234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Line18_ReadOrder[0].f2_12[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 168.0009765625,
"Width": 71.25,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Line18_ReadOrder[0].f2_13[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 180,
"Width": 71.25,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_14[0]",
"Value": "",
"Left": 504,
"Top": 192.0009765625,
"Width": 72,
"Height": 12
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_15[0]",
"Value": "",
"Left": 504,
"Top": 204.0009765625,
"Width": 72,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_16[0]",
"Value": "",
"Left": 504,
"Top": 216,
"Width": 72,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].c2_04[0]",
"Value": "False",
"Left": 465.20001220703125,
"Top": 230.49798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_17[0]",
"Value": "",
"Left": 504,
"Top": 227.9990234375,
"Width": 72,
"Height": 11.99896240234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].RoutingNo[0].f2_18[0]",
"Value": "",
"Left": 172.8000030517578,
"Top": 240.0009765625,
"Width": 129.45298767089844,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].c2_05[0]",
"Value": "False",
"Left": 377.3999938964844,
"Top": 243,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].c2_05[1]",
"Value": "False",
"Left": 435,
"Top": 243,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].AccountNo[0].f2_19[0]",
"Value": "",
"Left": 172.822998046875,
"Top": 252.4990234375,
"Width": 244.08001708984375,
"Height": 11.0009765625
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_20[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 263.9990234375,
"Width": 71.25,
"Height": 11.99896240234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_21[0]",
"Value": "",
"Left": 504,
"Top": 276.0009765625,
"Width": 72,
"Height": 11.9990234375
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].f2_22[0]",
"Value": "",
"Left": 410.3999938964844,
"Top": 288,
"Width": 71.25,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].ThirdPartyDesignee[0].c2_06[0]",
"Value": "False",
"Left": 491.6000061035156,
"Top": 302.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].ThirdPartyDesignee[0].c2_06[1]",
"Value": "False",
"Left": 491.6000061035156,
"Top": 313.75,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].ThirdPartyDesignee[0].f2_23[0]",
"Value": "",
"Left": 144,
"Top": 324,
"Width": 144,
"Height": 18
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].ThirdPartyDesignee[0].f2_24[0]",
"Value": "",
"Left": 324,
"Top": 324,
"Width": 93.60000610351562,
"Height": 18
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].ThirdPartyDesignee[0].f2_25[0]",
"Value": "",
"Left": 504,
"Top": 330.0010070800781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Signatures[0].f2_26[0]",
"Value": "",
"Left": 325,
"Top": 376.0010070800781,
"Width": 134.79998779296875,
"Height": 19.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Signatures[0].f2_27[0]",
"Value": "",
"Left": 504,
"Top": 384.0010070800781,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Signatures[0].f2_28[0]",
"Value": "",
"Left": 325,
"Top": 406,
"Width": 134.79998779296875,
"Height": 19.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Signatures[0].f2_29[0]",
"Value": "",
"Left": 504,
"Top": 414,
"Width": 72,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Signatures[0].f2_30[0]",
"Value": "",
"Left": 136.8000030517578,
"Top": 425.9989929199219,
"Width": 135.8000030517578,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].Signatures[0].f2_31[0]",
"Value": "",
"Left": 324,
"Top": 425.9989929199219,
"Width": 252,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_32[0]",
"Value": "",
"Left": 93.5999984741211,
"Top": 448.0010070800781,
"Width": 121.4000015258789,
"Height": 14.001007080078125
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_33[0]",
"Value": "",
"Left": 447.3999938964844,
"Top": 448.0010070800781,
"Width": 55.600006103515625,
"Height": 14.001007080078125
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].CheckIf[0].c2_07[0]",
"Value": "False",
"Left": 511.20001220703125,
"Top": 450.9700012207031,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "CheckBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].CheckIf[0].c2_07[1]",
"Value": "False",
"Left": 511.20001220703125,
"Top": 462.99798583984375,
"Width": 8,
"Height": 8
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_34[0]",
"Value": "",
"Left": 158.39999389648438,
"Top": 461.9989929199219,
"Width": 229.39999389648438,
"Height": 11.94000244140625
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_35[0]",
"Value": "",
"Left": 432,
"Top": 461.9989929199219,
"Width": 72,
"Height": 11.94000244140625
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_36[0]",
"Value": "",
"Left": 158.39999389648438,
"Top": 474.0010070800781,
"Width": 301.3999938964844,
"Height": 11.998992919921875
},
{
"PageIndex": 2,
"Type": "EditBox",
"FieldName": "topmostSubform[0].Page2[0].PaidPreparer[0].Preparer[0].f2_37[0]",
"Value": "",
"Left": 509.7449951171875,
"Top": 474.0010070800781,
"Width": 66.2550048828125,
"Height": 11.998992919921875
}
]
}
},
"error": false,
"status": 200,
"remainingCredits": 59987
}
Status Code: 200
04. PDF Add Text, Signatures and Images to PDF
Add text, images, links to PDF files. You can update or modify PDF and scanned PDF files.
Interactive helper tool: PDF viewer displaying X and Y coordinates.
1. /pdf/edit/add
Add text, images, signatures, text fields, unchecked checkbox, checked checkbox to existing PDF file. You can fill out out existing PDF forms and documents and create new filable PDF forms using this method.
To find X
and Y
coordinates for placing text, images or objects please use special PDF viewer displaying X and Y coordinates.
To save image or pdf for re-use as a template please use link from Dropbox or Google Drive or from other storage. Or use built-in PDF.co Files storage. If you need to draw a signature and save as image then use this page.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.annotations[]
. optional. Array of text objects to be added on top of pdf. Text objects can be ready-only ("type": "text"
by default), input pdf input fields ("type": "textField"
) or checkboxes ("type": "checkbox"
). Sample:"annotations": [ { "text": "Testing Clickable Links \r\n(CLICK ME!)", "x": 200, "y": 200, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://bytescout.com/" }, { "text": "Testing Clickable Links \r\n(CLICK ME!)", "x": 200, "y": 200, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://bytescout.com/", "fontName": "Colibri", "fontItalic": true, "fontBold": true, "fontStrikeout": false, "fontUnderline": true, "type": "text" }, { "text": "sample pdf input field with prefilled text", "x": 10, "y": 30, "size": 12, "pages": "0-", "type": "TextField", "id": "textfield1" }, { "x": 100, "y": 150, "size": 12, "pages": "0-", "type": "Checkbox", "id": "checkbox2" } ]
See font list for all PDF.co supported fonts.
images[]
optional. Array of image urls (also can be a link to Files storage or datauri link) to be added on top of PDF file. Images can be loaded from URL or from URLs for internal file storage. Sample:"images": [ { "url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png", "x": 200, "y": 250, "pages": "0", "link": "www.pdf.co" } ]
fields[]
optional. Array of values to update filable pdf fields in input pdf. You can create your own automated PDF filler for your pdf forms using this array. Sample:"fields: [ { "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", "pages": "1", "text": "True" }, { "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", "pages": "1", "text": "True" } ]
password
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": true,
"name": "newDocument",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
"annotations": [
{
"text": "Sample Text 1",
"x": 150,
"y": 100,
"size": 20,
"pages": "0-"
},
{
"text": "Sample Text 2 - Click here to test link\r\n(CLICK ME!)",
"x": 250,
"y": 240,
"size": 24,
"pages": "0-",
"color": "CCBBAA",
"link": "https://bytescout.com/",
"fontName": "Colibri",
"fontItalic": true,
"fontBold": true,
"fontStrikeout": false,
"fontUnderline": true
},
{
"text": "Simple text 3",
"x": 100,
"y": 230,
"size": 12,
"pages": "0-",
"type": "Text"
},
{
"text": "sample text 3 - input text field",
"x": 100,
"y": 170,
"size": 16,
"pages": "0-",
"type": "TextField",
"id": "textfield1"
},
{
"x": 200,
"y": 120,
"size": 16,
"pages": "0-",
"type": "Checkbox",
"id": "checkbox2"
},
{
"x": 200,
"y": 140,
"size": 16,
"pages": "0-",
"type": "CheckboxChecked",
"id": "checkbox3"
}
],
"images": [
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"x": 270,
"y": 150,
"width": 159,
"height": 43,
"pages": "0"
},
{
"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgMAAAEtCAYAAACVlWOMAAAgAElEQVR4Xu3dCXxkVZn38f9zK72wiCjdgEInadx1RnFkHDckCQiiIi7grqDMNEmQAXV05p1XBcdlXEFHuxN6FFF5RwUXcGNPAoq7CKKOG3SSRhS6W5ul6Sbpus/7OZWq5FZ1JankJuncvr/6fOYzM6Tuued879N1n3vuWUx8EEAAAQQQQCDXApbr1tN4BBBAAAEEEBDJAEGAAAIIIIBAzgVIBnIeADQfAQQQQAABkgFiAAEEEEAAgZwLkAzkPABoPgIIIIAAAiQDxAACCCCAAAI5FyAZyHkA0HwEEEAAAQRIBogBBBBAAAEEci5AMpDzAKD5CCCAAAIIkAwQAwgggAACCORcgGQg5wFA8xFAAAEEECAZIAYQQAABBBDIuQDJQM4DgOYjgAACCCBAMkAMIIAAAgggkHMBkoGcBwDNRwABBBBAgGSAGEAAAQQQQCDnAiQDOQ8Amo8AAggggADJADGAAAIIIIBAzgVIBnIe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kSuQmCC",
"x": 10,
"y": 230,
"pages": "0-"
}
]
}
More example Requests/Responses:
I. Example Request: /pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": true,
"name": "newDocument",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
"annotations": [
{
"text": "Sample Text 1",
"x": 150,
"y": 100,
"size": 20,
"pages": "0-"
},
{
"text": "Sample Text 2 - Click here to test link\r\n(CLICK ME!)",
"x": 250,
"y": 240,
"size": 24,
"pages": "0-",
"color": "CCBBAA",
"link": "https://bytescout.com/",
"fontName": "Colibri",
"fontItalic": true,
"fontBold": true,
"fontStrikeout": false,
"fontUnderline": true
},
{
"text": "Simple text 3",
"x": 100,
"y": 230,
"size": 12,
"pages": "0-",
"type": "Text"
},
{
"text": "sample text 3 - input text field",
"x": 100,
"y": 170,
"size": 16,
"pages": "0-",
"type": "TextField",
"id": "textfield1"
},
{
"x": 200,
"y": 120,
"size": 16,
"pages": "0-",
"type": "Checkbox",
"id": "checkbox2"
},
{
"x": 200,
"y": 140,
"size": 16,
"pages": "0-",
"type": "CheckboxChecked",
"id": "checkbox3"
}
],
"images": [
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"x": 270,
"y": 150,
"width": 159,
"height": 43,
"pages": "0"
},
{
"url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgMAAAEtCAYAAACVlWOMAAAgAElEQVR4Xu3dCXxkVZn38f9zK72wiCjdgEInadx1RnFkHDckCQiiIi7grqDMNEmQAXV05p1XBcdlXEFHuxN6FFF5RwUXcGNPAoq7CKKOG3SSRhS6W5ul6Sbpus/7OZWq5FZ1JankJuncvr/6fOYzM6Tuued879N1n3vuWUx8EEAAAQQQQCDXApbr1tN4BBBAAAEEEBDJA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AEEEMi2AMlAtq8ftUcAAQQQQCC1AMlAakIKQAABBBBAINsCJAPZvn7UHgEEEEAAgdQCJAOpCSkAAQQQQACBbAuQDGT7+lF7BBBAAAEEUguQDKQmpAAEEEAAAQSyLUAykO3rR+0RQAABBBBILUAykJqQAhBAAAEEEMi2AMlAtq8ftUcAAQQQQCC1AMlAakIKQAABBBBAINsCJAPZvn7UHgEEEEAAgdQCJAOpCSkAAQQQQACBbAuQDGT7+lF7BBBAAAEEUgv8fwA4c3jZPFf8AAAAAElFTkSuQmCC",
"x": 10,
"y": 230,
"pages": "0-"
}
]
}
I. Example Response: /pdf/edit/add
{
"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c336bfcef1a473d98492bda25d8da03/newDocument.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEO7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDHWK1dY4d4lOgsheliKBATwE%2FZewASPTEnPxTn%2BOdYhP4h3gljAJfqbRvQptDX7wdWLmrBS7Tg4qTU6pAbxIdXChGPjBWpSbtiADJKmqkmyhkUmE8GSM1%2FGtJO6bga2pgzvFLXmzxjTf3%2BFNqwYOvbyApIZdVLoPpEKY6PlCflQtLTd30dhelm6xpB8pitbdhSjdz8KCBjIobVy%2Fjwybwp6OQgB%2FT6QkIo2dU07gtFREdn5jhRyvnS5lkccweBV1%2Bw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHMV5P3JOS/20210316/us-west-2/s3/aws4_request&X-Amz-Date=20210316T124309Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=95287bf3c007fed4c2c5aeea1ce75c846cc6c68b22aaf35175ebe41a105f54e1",
"pageCount": 1,
"error": false,
"status": 200,
"name": "newDocument",
"remainingCredits": 9913694,
"credits": 3
}
Status Code: 200
2. /pdf/edit/add (with simplified parameters)
You can add text, images, signatures to pdf and also can fill interactive pdf forms. This method uses simplified version of /pdf/edit/add
that allows you to add multiple text, images, fill pdf fields using simplified string representations
To find X
and Y
coordinates for placing text, images or objects please use special PDF viewer displaying X and Y coordinates.
To save image or pdf for re-use as a template please use link from Dropbox or Google Drive or from other storage. Or use built-in PDF.co Files storage. If you need to draw a signature and save as image then use this page.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.annotationsString
optional. Add one or more text objects on top of pdf. Each text object to be added can be described asx;y;pages;text;fontsize;fontname;fontcolor;link;transparent
. Sample:20;20;0-;Testing Text;24;Arial;FF0000;www.pdf.co;false
. To separate multiple objects, use|
separator. where24
is the font size. You can also add styles intoto the font size using the following modifiers:+bold
for bold style+italic
for italic style+underline
for underline style+strikeout
for strikeout style
See full list of fonts supported for all PDF.co supported fonts.
For example, for font size 24 and `bold`, `italic`, `underline` and `strikeout` styles:
250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true
imagesString
optional. Adds one or more images on top of pdf. Each image object can be defined asx;y;pages;urltoimage;linkToOpen;width;height
Example: 20;80;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200
. To separate multiple objects, use |
separator.
fieldsString
optional. Set values for fillable pdf fields (i.e. fill pdf fields in pdf forms). To fill fields in PDF form, use the following formatpage;fieldName;value
. Example:0;editbox1;text is here
. To fill checkbox, usetrue
, for example:0;checkbox1;true
. To separate multiple objects, use|
separator. To get the list of all fillable fields in PDF form please use/pdf/info/fields
endpoint.password
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": false,
"name": "f1040-form-filled",
"url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"annotationsString": "250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true",
"imagesString": "100;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png|400;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200",
"fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
}
More example Requests/Responses:
I. Example Request: JSON simplified /pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": false,
"name": "f1040-form-filled",
"url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"annotationsString": "20;20;0-;PDF form filled with PDF.co API;24;Arial;FF0000;www.pdf.co;true",
"imagesString": "100;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png|400;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200",
"fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
}
I. Example Response: JSON simplified /pdf/edit/add
{
"url": "https://pdf-temp-files.s3.amazonaws.com/03c5c55183c74f8d94a4ec952e4e32ad/f1040-form-filled.pdf",
"pageCount": 3,
"error": false,
"status": 200,
"name": "f1040-form-filled",
"remainingCredits": 60822
}
Status Code: 200
05. PDF Fill PDF Forms
PDF filler for fillable PDF forms using PDF.co.
To find names of PDF form fields names, please use this interactive tool.
To get the list of all fillable fields inside PDF form, please use /pdf/info/fields
endpoint.
If you need to create your own fillable form then please check PDF Create Fillable PDF Forms
topic.
1. /pdf/edit/add
adds text, images, text fields, unchecked checkbox, checked checkbox to existing PDF file. You can fill out out existing PDF forms and documents and create new fillable PDF forms using this method.
adds text, images, text fields, unchecked checkbox, checked checkbox to existing PDF file. You can fill out out existing PDF forms and documents and create new fillable PDF forms using this method.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.annotations[]
. optional. Array of text objects to be added on top of pdf. Text objects can be ready-only ("type": "text"
by default), input pdf input fields ("type": "textField"
) or checkboxes ("type": "checkbox"
). Sample:"annotations": [ { "text": "Testing Clickable Links \r\n(CLICK ME!)", "x": 200, "y": 200, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://bytescout.com/" }, { "text": "Testing Clickable Links \r\n(CLICK ME!)", "x": 200, "y": 200, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://bytescout.com/", "fontName": "Colibri", "fontItalic": true, "fontBold": true, "fontStrikeout": false, "fontUnderline": true, "type": "text" }, { "text": "sample pdf input field with prefilled text", "x": 10, "y": 30, "size": 12, "pages": "0-", "type": "TextField", "id": "textfield1" }, { "x": 100, "y": 150, "size": 12, "pages": "0-", "type": "Checkbox", "id": "checkbox2" } ]
See font list for all PDF.co supported fonts.
images[]
optional. Array of image objects to be added on top of PDF file. Images can be loaded from URL or from URLs for internal file storage. Sample:"images": [ { "url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png", "x": 200, "y": 250, "pages": "0", "link": "www.pdf.co" } ]
fields[]
optional. Array of values to update filable pdf fields in input pdf. You can create your own automated PDF filler for your pdf forms using this array. Sample:"fields: [ { "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", "pages": "1", "text": "True" }, { "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", "pages": "1", "text": "True" } ]
password
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": false,
"name": "f1040-filled",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"fields": [
{
"fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
"pages": "1",
"text": "True"
},
{
"fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
"pages": "1",
"text": "John A."
},
{
"fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
"pages": "1",
"text": "Doe"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
"pages": "1",
"text": "123456789"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"pages": "1",
"text": "Joan B."
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"pages": "1",
"text": "Joan B."
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
"pages": "1",
"text": "Doe"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
"pages": "1",
"text": "987654321"
}
],
"annotations":[
{
"text":"Sample Filled with PDF.co API using /pdf/edit/add. Get fields from forms using /pdf/info/fields",
"x": 10,
"y": 10,
"size": 12,
"pages": "0-",
"color": "FFCCCC",
"link": "https://pdf.co"
}
],
"images": [
]
}
More example Requests/Responses:
I. Example Request: POST /pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": false,
"name": "f1040-filled",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"fields": [
{
"fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
"pages": "1",
"text": "True"
},
{
"fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
"pages": "1",
"text": "John A."
},
{
"fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
"pages": "1",
"text": "Doe"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
"pages": "1",
"text": "123456789"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"pages": "1",
"text": "Joan B."
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
"pages": "1",
"text": "Joan B."
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
"pages": "1",
"text": "Doe"
},
{
"fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
"pages": "1",
"text": "987654321"
}
],
"annotations":[
{
"text":"Sample Filled with PDF.co API using /pdf/edit/add. Get fields from forms using /pdf/info/fields",
"x": 10,
"y": 10,
"size": 12,
"pages": "0-",
"color": "FFCCCC",
"link": "https://pdf.co"
}
],
"images": [
]
}
I. Example Response: POST /pdf/edit/add
{
"url": "https://pdf-temp-files.s3.amazonaws.com/6e12bf1e57e347a381e69d626159de92/f1040-filled.pdf",
"pageCount": 3,
"error": false,
"status": 200,
"name": "f1040-filled",
"remainingCredits": 61317
}
Status Code: 200
2. /pdf/edit/add (with simplified params)
You can add fill pdf fields in existing PDF PDF forms. This method uses simplified version of /pdf/edit/add
.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.annotationsString
optional. Add one or more text objects on top of pdf. Each text object to be added can be described asx;y;pages;text;fontsize;fontname;fontcolor;link;transparent
. Sample:20;20;0-;Testing Text;24;Arial;FF0000;www.pdf.co;false
. To separate multiple objects, use|
separator. where24
is the font size. You can also add styles intoto the font size using the following modifiers:+bold
for bold style+italic
for italic style+underline
for underline style+strikeout
for strikeout style
See font list for all PDF.co supported fonts. For example, for font size 24 and
bold
,italic
,underline
andstrikeout
styles:
250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true
imagesString
optional. Adds one or more images on top of pdf. Each image object can be defined asx;y;pages;urltoimage;linkToOpen;width;height
for example:20;80;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200
. To separate multiple objects, use|
separator.fieldsString
optional. Set values for fillable pdf fields (i.e. fill pdf fields in pdf forms). To fill fields in PDF form, use the following formatpage;fieldName;value
. Sample:0;editbox1;text is here
. To fill checkbox, usetrue
, for example:0;checkbox1;true
. To separate multiple objects, use|
separator. To get the list of all fillable fields in PDF form please use/pdf/info/fields
endpoint.password
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": false,
"name": "f1040-form-filled",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
}
More example Requests/Responses:
I. Example Request: JSON simplified /pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": false,
"name": "f1040-form-filled",
"url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
"annotationsString": "20;20;0-;PDF form filled with PDF.co API;24;Arial;FF0000;www.pdf.co;true",
"imagesString": "100;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png|400;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200",
"fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
}
I. Example Response: JSON simplified /pdf/edit/add
{
"url": "https://pdf-temp-files.s3.amazonaws.com/03c5c55183c74f8d94a4ec952e4e32ad/f1040-form-filled.pdf",
"pageCount": 3,
"error": false,
"status": 200,
"name": "f1040-form-filled",
"remainingCredits": 60822
}
Status Code: 200
06. PDF Create Fillable PDF Forms
Create new PDF forms with fillable edit boxes, checkboxes and other fillable fields.
To fill pdf forms or to add text, links, images please check pdf/edit/add
endpoint instead.
1. /pdf/edit/add
You can create fillable PDF form from existing PDF by adding editable text boxes and checkboxes.
adds text, images, text fields, unchecked checkbox, checked checkbox to existing PDF file. You can fill out out existing PDF forms and documents and create new fillable PDF forms using this method.
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.annotations[]
. optional. Array of text objects to be added on top of pdf. Text objects can be ready-only ("type": "text"
by default), input pdf input fields ("type": "textField"
) or checkboxes ("type": "checkbox"
). Sample:"annotations": [ { "text": "Testing Clickable Links \r\n(CLICK ME!)", "x": 200, "y": 200, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://bytescout.com/" }, { "text": "Testing Clickable Links \r\n(CLICK ME!)", "x": 200, "y": 200, "size": 24, "pages": "0-", "color": "CCBBAA", "link": "https://bytescout.com/", "fontName": "Colibri", "fontItalic": true, "fontBold": true, "fontStrikeout": false, "fontUnderline": true, "type": "text" }, { "text": "sample pdf input field with prefilled text", "x": 10, "y": 30, "size": 12, "pages": "0-", "type": "TextField", "id": "textfield1" }, { "x": 100, "y": 150, "size": 12, "pages": "0-", "type": "Checkbox", "id": "checkbox2" } ]
See font list for all PDF.co supported fonts.
images[]
optional. Array of image objects to be added on top of PDF file. Images can be loaded from URL or from URLs for internal file storage. Sample:"images": [ { "url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png", "x": 200, "y": 250, "pages": "0", "link": "www.pdf.co" } ]
fields[]
optional. Array of values to update filable pdf fields in input pdf. You can create your own automated PDF filler for your pdf forms using this array. Sample:"fields: [ { "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", "pages": "1", "text": "True" }, { "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", "pages": "1", "text": "True" } ]
password
optional. Password of PDF file. Must be a Stringasync
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": true,
"name": "newDocument",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
"annotations":[
{
"text":"sample prefilled text",
"x": 10,
"y": 30,
"size": 12,
"pages": "0-",
"type": "TextField",
"id": "textfield1"
},
{
"x": 100,
"y": 150,
"size": 12,
"pages": "0-",
"type": "Checkbox",
"id": "checkbox2"
},
{
"x": 100,
"y": 170,
"size": 12,
"pages": "0-",
"link": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"type": "CheckboxChecked",
"id":"checkbox3"
}
],
"images": [
{
"url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"x": 200,
"y": 250,
"pages": "0",
"link": "www.pdf.co"
}
]
}
More example Requests/Responses:
I. Example Request: POST /pdf/edit/add
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"async": false,
"encrypt": true,
"name": "newDocument",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
"annotations":[
{
"text":"Testing, one, two, three.",
"x": 10,
"y": 10,
"size": 12,
"pages": "0-"
},
{
"text":"Testing Clickable Links \r\n(CLICK ME!)",
"x": 200,
"y": 200,
"size": 24,
"pages": "0-",
"color": "CCBBAA",
"link": "https://bytescout.com/"
},
{
"text":"Simple text label (default type)",
"x": 100,
"y": 100,
"size": 12,
"pages": "0-",
"type": "Text"
},
{
"text":"sample prefilled text",
"x": 10,
"y": 30,
"size": 12,
"pages": "0-",
"type": "TextField",
"id": "textfield1"
},
{
"x": 100,
"y": 150,
"size": 12,
"pages": "0-",
"type": "Checkbox",
"id": "checkbox2"
},
{
"x": 100,
"y": 170,
"size": 12,
"pages": "0-",
"link": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"type": "CheckboxChecked",
"id":"checkbox3"
}
],
"images": [
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"x": 450,
"y": 10,
"pages": "0"
},
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"x": 450,
"y": 100,
"width": 50,
"height": 50,
"pages": "0"
},
{
"url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png",
"x": 200,
"y": 250,
"pages": "0",
"link": "www.pdf.co"
}
]
}
I. Example Response: POST /pdf/edit/add
{
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/d5c6efa549194ffaacb2eedd318e0320/newDocument.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzECMaDJJV7qKrpnGUrZHrwSKBATR5rxVlQoU0zj3r4jyHPt7yj4HoCIBi65IbMRWVX8qZZtKL9YGUzP%2FcemlqVd4Vi5%2B80Sg%2BymqQtaQ8qSFqKA82JnV%2BNBDatIigZIZha%2BrQM3jSC%2FZhX1zxsfLLsaH3K5nBnkjT3gi%2FZnx%2FgqrlIhf3m2xRFaTlgHrBADlK9KKPIijSusD4BTIo%2FQ433xx%2FQEaGWdX0nu4NuiByyXNPsBCAI3im9LMUCujjqF79ocyLHA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHCSWKUQ4T/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T092641Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=2aa88d39aaf4b5891e4cb42d5675a64486098558d7159b37b75252209bdd6a95",
"pageCount": 1,
"error": false,
"status": 200,
"name": "newDocument",
"remainingCredits": 77762
}
Status Code: 200
07. PDF Search Text
Search text in PDF and get coordinates. Supports regular expressions.
1. /pdf/find
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.searchString
text to search. Can contain regular expressions if you setregexSearch
param totrue
.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.inline
optional. Must be one of:true
,false
.wordMatchingMode
optional. Must be a String.password
optional. Password of PDF file. Must be a StringregexSearch
optional. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/find
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"async": "false",
"encrypt": "false",
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"searchString": "Invoice Date \\d+/\\d+/\\d+",
"regexSearch": "true",
"name": "output",
"pages": "0-",
"inline": "true",
"wordMatchingMode": "",
"password": ""
}
More example Requests/Responses:
I. Example Request: /pdf/find
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"async": "false",
"encrypt": "false",
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"searchString": "Invoice Date \\d+/\\d+/\\d+",
"regexSearch": "true",
"name": "output",
"pages": "0-",
"inline": "true",
"wordMatchingMode": "",
"password": ""
}
I. Example Response: /pdf/find
{
"body": [
{
"text": "Invoice Date 01/01/2016",
"left": 436.5400085449219,
"top": 130.4599995137751,
"width": 122.85311957550027,
"height": 11.040000486224898,
"pageIndex": 0,
"bounds": {
"location": {
"isEmpty": false,
"x": 436.54,
"y": 130.46
},
"size": "122.853119, 11.0400009",
"x": 436.54,
"y": 130.46,
"width": 122.853119,
"height": 11.0400009,
"left": 436.54,
"top": 130.46,
"right": 559.3931,
"bottom": 141.5,
"isEmpty": false
},
"elementCount": 1,
"elements": [
{
"index": 0,
"left": 436.5400085449219,
"top": 130.4599995137751,
"width": 122.85311957550027,
"height": 11.040000486224898,
"angle": 0,
"text": "Invoice Date 01/01/2016",
"isNewLine": true,
"fontIsBold": true,
"fontIsItalic": false,
"fontName": "Helvetica-Bold",
"fontSize": 11,
"fontColor": "0, 0, 0",
"fontColorAsOleColor": 0,
"fontColorAsHtmlColor": "#000000",
"bounds": {
"location": {
"isEmpty": false,
"x": 436.54,
"y": 130.46
},
"size": "122.853119, 11.0400009",
"x": 436.54,
"y": 130.46,
"width": 122.853119,
"height": 11.0400009,
"left": 436.54,
"top": 130.46,
"right": 559.3931,
"bottom": 141.5,
"isEmpty": false
}
}
]
}
],
"pageCount": 1,
"error": false,
"status": 200,
"name": "output",
"remainingCredits": 59970
}
Status Code: 200
08. PDF Search and Replace Text
Description: Search and replace text of your choice in a pdf file
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example 1: single text replacement
GET
https://api.pdf.co/v1/pdf/edit/replace-text?url=https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf&searchString=conspicuous&replaceString=replaced&x-api-key=YOUR-API-KEY
or
POST
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"searchString": "conspicuous feature",
"replaceString": "Replaced1",
"caseSensitive": true,
"name": "finalFile"
}
or
cURL (uploading your file along with the request)
curl -F "x-api-key=PASTE_YOUR_API_KEY_HERE" -F "searchString=conspicuous feature" -F "replaceString=Replaced1" -F "file=@./sample.pdf" https://api.pdf.co/v1/pdf/edit/replace-text
Example 2: batch texts replacement
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"searchStrings": [
"conspicuous feature",
"Martian"
],
"replaceStrings": [
"Replaced1",
"Replaced2"
],
"caseSensitive": true,
"name": "finalFile"
}
1. /pdf/edit/replace-text (mutliple replacements)
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.searchStrings[]
array of strings to search.replaceStrings[]
arrao of replacements strings.caseSensitive
optional. Set tofalse
to use case-insensitive search.name
optional. File name for generated output. Must be a String.password
optional. Password of PDF file. Must be a String.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/replace-text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"searchStrings": [
"Your Company Name",
"Client Name"
],
"replaceStrings": [
"XYZ LLC",
"ABCD"
],
"caseSensitive": true,
"pages": "",
"password":"",
"name": "finalFile"
}
More example Requests/Responses:
I. Example Request: /pdf/edit/replace-text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"searchStrings": [
"conspicuous feature",
"Martian"
],
"replaceStrings": [
"Replaced1",
"Replaced2"
],
"caseSensitive": true,
"name": "finalFile"
}
I. Example Response: /pdf/edit/replace-text
{
"url": "https://pdf-temp-files.s3.amazonaws.com/5e02856782ea4f90b0c47c052565ae01/finalFile.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "finalFile",
"remainingCredits": 98298
}
Status Code: 200
2. /pdf/edit/replace-text (single replacement)
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.searchString
required for single text replacement. Word or phrase to be replaced. Must be a String.replaceString
required for single text replacement. Word to be replaced with. Must be a String.caseSensitive
optional. Set tofalse
to use case-insensitive search.name
optional. File name for generated output. Must be a String.password
optional. Password of PDF file. Must be a String.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/replace-text
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf | required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
name | finalFile | optional. File name for generated output. Must be a String. |
caseSensitive | true | optional. true or false . Set to false by default |
searchString | Your Company Name | required for single text replacement. Word to be replaced. Must be a String |
replaceString | XYZ LLC | required for single text replacement. Word to be replaced with. Must be a String |
More example Requests/Responses:
I. Example Request: /pdf/edit/replace-text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf | optional. URL of the source PDF file. Must be a String. |
name | finalFile | optional. File name for generated output. Must be a String. |
caseSensitive | true | optional. true or false . Set to false by default |
searchString | onspicuous feature | required for single text replacement. Word to be replaced. Must be a String |
replaceString | Replaced1 | required for single text replacement. Word to be replaced with. Must be a String |
I. Example Response: /pdf/edit/replace-text
{
"url": "https://pdf-temp-files.s3.amazonaws.com/1a0e9a51e2d04fe4bcce0a6a31c365a8/finalFile.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "finalFile",
"remainingCredits": 98310
}
Status Code: 200
09. PDF Search and Replace Text with Image
Search and replace text in PDF.
1. /pdf/edit/replace-text-with-image
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.searchString
required for single text replacement. Word or phrase to be replaced. Must be a String.replaceImage
required. Image url to be inserted in doc:http://www.xyz.com/image.png
.caseSensitive
optional. Set tofalse
to use case-insensitive search.name
optional. File name for generated output. Must be a String.password
optional. Password of PDF file. Must be a String.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/pdf/edit/replace-text-with-image
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf | required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
caseSensitive | true | optional. true or false . Set to false by default |
searchString | Your Company Name | required. Word to be replaced. Must contain at least 1 word. Example: 'Hello' |
replaceImage | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png | required. Image url to be inserted in doc: http://www.xyz.com/image.png |
pages | 0 | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash - , for example: 0,2-5,7- . To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7 ) page till the end of the document. Must be a String. |
More example Requests/Responses:
I. Example Request: /pdf/edit/replace-text-with-image
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"caseSensitive": true,
"searchString": "Hypothesis",
"replaceImage": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png",
"pages": "0"
}
I. Example Response: /pdf/edit/replace-text-with-image
{
"url": "https://pdf-temp-files.s3.amazonaws.com/0e8f486dbf8a4764a1468b3d7c222e4c/sample.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "sample.pdf",
"remainingCredits": 59926
}
Status Code: 200
10. PDF Search and Delete Text from PDF
Search text in PDF and remove found text from PDF.
1. /pdf/edit/delete-text (multiple replacements)
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.searchStrings[]
array of strings to search.caseSensitive
optional. Set tofalse
to use case-insensitive search.name
optional. File name for generated output. Must be a String.password
optional. Password of PDF file. Must be a String.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/delete-text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"name": "pdfWithTextDeleted",
"caseSensitive": "false",
"searchStrings": [
"Notes",
"City, State Zip"
]
}
More example Requests/Responses:
I. Example Request: /pdf/edit/delete-text (multiple replacements)
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"name": "pdfWithTextDeleted",
"caseSensitive": "false",
"searchStrings": [
"conspicuous feature"
]
}
I. Example Response: /pdf/edit/delete-text (multiple replacements)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/c4367f7cf8794f12b4e8899d8101fced/pdfWithTextDeleted.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "pdfWithTextDeleted",
"remainingCredits": 59914
}
Status Code: 200
2. /pdf/edit/delete-text (single replacement)
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.searchString
string to search.caseSensitive
optional. Set tofalse
to use case-insensitive search.name
optional. File name for generated output. Must be a String.password
optional. Password of PDF file. Must be a String.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/edit/delete-text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"name": "pdfWithTextDeleted",
"caseSensitive": "false",
"searchString": "Notes"
}
More example Requests/Responses:
I. Example Request: /pdf/edit/delete-text (single replacement)
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"name": "pdfWithTextDeleted",
"caseSensitive": "false",
"searchString": "conspicuous feature"
}
I. Example Response: /pdf/edit/delete-text (single replacement)
{
"url": "https://pdf-temp-files.s3.amazonaws.com/9c674faed1d9444a8912bfb4695c2754/pdfWithTextDeleted.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "pdfWithTextDeleted",
"remainingCredits": 59902
}
Status Code: 200
11. PDF to Text Searchable PDF
Convert PDF and scanned images into text-searchable PDF.
1. /pdf/makesearchable
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default is “eng”. Supported values: eng, spa, deu, fra and many others. You can also specify 2 languages to be used, for example: eng+deu.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.password
optional. Password of PDF file. Must be a String.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/makesearchable
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-make-searchable/sample.pdf",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
More example Requests/Responses:
I. Example Request: /pdf/makesearchable
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-make-searchable/sample.pdf",
"lang": "eng",
"pages": "",
"name": "result.pdf",
"password": "",
"async": "false",
"encrypt": false,
"profiles": ""
}
I. Example Response: /pdf/makesearchable
{
"url": "https://pdf-temp-files.s3.amazonaws.com/94628af2d2fd4621aad039f2d0701d66/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 60607
}
Status Code: 200
12. PDF To CSV
Convert PDF and scanned images into CSV representation with layout, columns, rows, tables.
1. /pdf/convert/to/csv
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to change CSV separator:{ 'profiles': [ { 'profile1': { 'CSVSeparatorSymbol': ';' } } ] }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/csv
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-csv/sample.pdf",
"lang": "eng",
"inline": "true",
"unwrap": "",
"pages": "0-",
"rect": "",
"async": "false",
"encrypt": "false",
"name": "result.csv",
"password": "",
"lineGrouping": "",
"profiles": ""
}
13. PDF To JSON
Convert PDF and scanned images into JSON representation with text, fonts, images, vectors, formatting preserved.
1. /pdf/convert/to/json
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to change CSV separator:{ 'profiles': [ { 'profile1': { 'CSVSeparatorSymbol': ';' } } ] }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/json2
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf",
"inline": true
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/json
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-json/sample.pdf",
"inline": true
}
I. Example Response: /pdf/convert/to/json
{
"body": {
"document": {
"page": {
"@index": "0",
"row": [
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "24.0",
"@fontStyle": "Bold",
"@color": "#538DD3",
"@x": "36.00",
"@y": "34.44",
"@width": "242.81",
"@height": "24.00",
"#text": "Your Company Name"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "76.94",
"@width": "66.62",
"@height": "11.04",
"#text": "Your Address"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "91.46",
"@width": "69.14",
"@height": "11.04",
"#text": "City, State Zip"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": ""
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "461.02",
"@y": "115.94",
"@width": "98.42",
"@height": "11.04",
"#text": "Invoice No. 123456"
}
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": ""
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "436.54",
"@y": "130.46",
"@width": "122.90",
"@height": "11.04",
"#text": "Invoice Date 01/01/2016"
}
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "36.00",
"@y": "154.94",
"@width": "63.62",
"@height": "11.04",
"#text": "Client Name"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "169.70",
"@width": "40.34",
"@height": "11.04",
"#text": "Address"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "184.22",
"@width": "69.14",
"@height": "11.04",
"#text": "City, State Zip"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "233.30",
"@width": "28.70",
"@height": "11.04",
"#text": "Notes"
}
},
{
"text": ""
},
{
"text": ""
},
{
"text": ""
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "36.00",
"@y": "316.25",
"@width": "22.58",
"@height": "11.04",
"#text": "Item"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "247.61",
"@y": "316.25",
"@width": "44.64",
"@height": "11.04",
"#text": "Quantity"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "398.95",
"@y": "316.25",
"@width": "26.91",
"@height": "11.04",
"#text": "Price"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "533.14",
"@y": "316.25",
"@width": "26.30",
"@height": "11.04",
"#text": "Total"
}
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "341.33",
"@width": "30.62",
"@height": "11.04",
"#text": "Item 1"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "286.13",
"@y": "341.33",
"@width": "6.12",
"@height": "11.04",
"#text": "1"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "398.35",
"@y": "341.33",
"@width": "27.51",
"@height": "11.04",
"#text": "40.00"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "531.94",
"@y": "341.33",
"@width": "27.50",
"@height": "11.04",
"#text": "40.00"
}
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "362.45",
"@width": "30.62",
"@height": "11.04",
"#text": "Item 2"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "286.13",
"@y": "362.45",
"@width": "6.12",
"@height": "11.04",
"#text": "2"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "398.35",
"@y": "362.45",
"@width": "27.51",
"@height": "11.04",
"#text": "30.00"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "531.94",
"@y": "362.45",
"@width": "27.50",
"@height": "11.04",
"#text": "60.00"
}
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "383.57",
"@width": "30.62",
"@height": "11.04",
"#text": "Item 3"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "286.13",
"@y": "383.57",
"@width": "6.12",
"@height": "11.04",
"#text": "3"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "398.35",
"@y": "383.57",
"@width": "27.51",
"@height": "11.04",
"#text": "20.00"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "531.94",
"@y": "383.57",
"@width": "27.50",
"@height": "11.04",
"#text": "60.00"
}
}
]
},
{
"column": [
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "36.00",
"@y": "404.93",
"@width": "30.62",
"@height": "11.04",
"#text": "Item 4"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "286.13",
"@y": "404.93",
"@width": "6.12",
"@height": "11.04",
"#text": "4"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "398.35",
"@y": "404.93",
"@width": "27.51",
"@height": "11.04",
"#text": "10.00"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@x": "531.94",
"@y": "404.93",
"@width": "27.50",
"@height": "11.04",
"#text": "40.00"
}
}
]
},
{
"column": [
{
"text": ""
},
{
"text": ""
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "389.11",
"@y": "425.83",
"@width": "36.75",
"@height": "11.04",
"#text": "TOTAL"
}
},
{
"text": {
"@fontName": "Arial",
"@fontSize": "11.0",
"@fontStyle": "Bold",
"@x": "525.82",
"@y": "425.83",
"@width": "33.62",
"@height": "11.04",
"#text": "200.00"
}
}
]
}
]
}
}
},
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.json",
"remainingCredits": 60583
}
Status Code: 200
14. PDF To TEXT
Convert PDF and scanned images to Text with layout preserved.
1. /pdf/convert/to/text
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to change CSV separator:{ 'profiles': [ { 'profile1': { 'CSVSeparatorSymbol': ';' } } ] }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"inline": true
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/text
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-text/sample.pdf",
"inline": true
}
I. Example Response: /pdf/convert/to/text
{
"body": " Your Company Name \r\n Your Address \r\n City, State Zip \r\n Invoice No. 123456 \r\n Invoice Date 01/01/2016 \r\n Client Name \r\n Address \r\n City, State Zip \r\n\r\n Notes \r\n\r\n\r\n Item Quantity Price Total \r\n Item 1 1 40.00 40.00 \r\n Item 2 2 30.00 60.00 \r\n Item 3 3 20.00 60.00 \r\n Item 4 4 10.00 40.00 \r\n TOTAL 200.00\r\n",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.txt",
"remainingCredits": 60577
}
Status Code: 200
15. PDF To XLS
Convert PDF and scanned images to spreadsheet with layout and fonts preserved.
1. /pdf/convert/to/xls
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to change CSV separator:{ 'profiles': [ { 'profile1': { 'CSVSeparatorSymbol': ';' } } ] }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/xls
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/xls
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf"
}
I. Example Response: /pdf/convert/to/xls
{
"url": "https://pdf-temp-files.s3.amazonaws.com/544e26441de7451ab287152b7159d350/sample.xls",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.xls",
"remainingCredits": 60572
}
Status Code: 200
16. PDF To XLSX
Convert PDF to spreadsheet with layout and fonts preserved.
1. /pdf/convert/to/xls
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to change CSV separator:{ 'profiles': [ { 'profile1': { 'CSVSeparatorSymbol': ';' } } ] }
Endpoint:
Method: POST
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/pdf/convert/to/xlsx
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Query params:
Key | Value | Description |
---|---|---|
Body:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf | required. URL of the source PDF file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
name | result.xlsx | optional. File name for generated output. Must be a String. |
password | optional. Password of PDF file. Must be a String. | |
pages | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash - , for example: 0,2-5,7- . To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7 ) page till the end of the document. Must be a String. |
More example Requests/Responses:
I. Example Request: /pdf/convert/to/xls
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Query:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Optional. Please use http headers instead when possible because passing your API key as parameter for POST or GET is not secure and is for legacy app compatibility only. |
Body:
{
"url": "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-excel/sample.pdf"
}
I. Example Response: /pdf/convert/to/xls
{
"url": "https://pdf-temp-files.s3.amazonaws.com/60c6b9f50280495a9567f73a0a394252/sample.xlsx",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.xlsx",
"remainingCredits": 60568
}
Status Code: 200
17. PDF To XML
Convert PDF to XML with information about text value, tables, fonts, images, objects positions.
1. /pdf/convert/to/xml
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/xml
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-xml/sample.pdf"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/xml
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-xml/sample.pdf",
"inline": true
}
I. Example Response: /pdf/convert/to/xml
{
"body": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<document>\r\n <page index=\"0\">\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"24.0\" fontStyle=\"Bold\" color=\"#538DD3\" x=\"36.00\" y=\"34.44\" width=\"242.81\" height=\"24.00\">Your Company Name</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"76.94\" width=\"66.62\" height=\"11.04\">Your Address</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"91.46\" width=\"69.14\" height=\"11.04\">City, State Zip</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"461.02\" y=\"115.94\" width=\"98.42\" height=\"11.04\">Invoice No. 123456</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"436.54\" y=\"130.46\" width=\"122.90\" height=\"11.04\">Invoice Date 01/01/2016</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"36.00\" y=\"154.94\" width=\"63.62\" height=\"11.04\">Client Name</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"169.70\" width=\"40.34\" height=\"11.04\">Address</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"184.22\" width=\"69.14\" height=\"11.04\">City, State Zip</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"233.30\" width=\"28.70\" height=\"11.04\">Notes</text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"36.00\" y=\"316.25\" width=\"22.58\" height=\"11.04\">Item</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"247.61\" y=\"316.25\" width=\"44.64\" height=\"11.04\">Quantity</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"398.95\" y=\"316.25\" width=\"26.91\" height=\"11.04\">Price</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"533.14\" y=\"316.25\" width=\"26.30\" height=\"11.04\">Total</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"341.33\" width=\"30.62\" height=\"11.04\">Item 1</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"341.33\" width=\"6.12\" height=\"11.04\">1</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"341.33\" width=\"27.51\" height=\"11.04\">40.00</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"341.33\" width=\"27.50\" height=\"11.04\">40.00</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"362.45\" width=\"30.62\" height=\"11.04\">Item 2</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"362.45\" width=\"6.12\" height=\"11.04\">2</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"362.45\" width=\"27.51\" height=\"11.04\">30.00</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"362.45\" width=\"27.50\" height=\"11.04\">60.00</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"383.57\" width=\"30.62\" height=\"11.04\">Item 3</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"383.57\" width=\"6.12\" height=\"11.04\">3</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"383.57\" width=\"27.51\" height=\"11.04\">20.00</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"383.57\" width=\"27.50\" height=\"11.04\">60.00</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"36.00\" y=\"404.93\" width=\"30.62\" height=\"11.04\">Item 4</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"286.13\" y=\"404.93\" width=\"6.12\" height=\"11.04\">4</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"398.35\" y=\"404.93\" width=\"27.51\" height=\"11.04\">10.00</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" x=\"531.94\" y=\"404.93\" width=\"27.50\" height=\"11.04\">40.00</text>\r\n </column>\r\n </row>\r\n <row>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text>\r\n </text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"389.11\" y=\"425.83\" width=\"36.75\" height=\"11.04\">TOTAL</text>\r\n </column>\r\n <column>\r\n <text fontName=\"Arial\" fontSize=\"11.0\" fontStyle=\"Bold\" x=\"525.82\" y=\"425.83\" width=\"33.62\" height=\"11.04\">200.00</text>\r\n </column>\r\n </row>\r\n </page>\r\n</document>",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.xml",
"remainingCredits": 60563
}
Status Code: 200
18. PDF to HTML
Convert PDF and scanned images into HTML representation with text, fonts, images, vectors, formatting preserved.
1. /pdf/convert/to/html
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.unwrap
optional. Unwrap lines into a single line within table cells whenlineGrouping
is enabled. Must be one of:true
,false
.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.lang
optional. Sets OCR language to be used for scanned PDF, PNG, JPG douments when extracting text from them. Default iseng
. Supported values:eng
,spa
,deu
,fra
,jpn
,chi_sim
,chi_tra
,kor
. You can also specify two languages to be used on the same page, for example:eng+deu
,jpn+kor
or other combinations. For more languages please contact our customer support.inline
optional. Must be one of:true
to return data as inline orfalse
to return link to output file (default).lineGrouping
optional. optional. Line grouping within table cells. Set to1
to enable the grouping. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"inline": false
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.pdf",
"inline": false
}
I. Example Response: /pdf/convert/to/html
{
"url": "https://pdf-temp-files.s3.amazonaws.com/a7a86e9f29f84f5180624bdec1facfc2/index.html",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.html",
"remainingCredits": 60110
}
Status Code: 200
19. PDF to JPG
Description: PDF to JPEG conversion. High quality rendering. Also works great for thumbnails generation and previews. GET
or POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"pages" : "",
"password" : "",
"url" : "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf"
}
1. /pdf/convert/to/jpg
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to turn on / off layers for rendering:{ "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf", "pages": "0", "profiles": "{\"profiles\": [{\"profile1\": {\"RenderTextObjects\": false,\"RenderVectorObjects\": true,\"RenderImageObjects\": true}} ]}" }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/jpg
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf",
"pages": "0-"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/jpg
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf",
"pages": "0"
}
I. Example Response: /pdf/convert/to/jpg
{
"urls": [
"https://pdf-temp-files.s3.amazonaws.com/163425dc6d0244c4a281d3e1a244c68a/sample.jpg"
],
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.jpg",
"remainingCredits": 60728
}
Status Code: 200
20. PDF to PNG
Description: PDF to PNG conversion. High quality rendering. Also works great for thumbnails generation and previews. GET
or POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
!! ! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"pages" : "",
"password" : "",
"url" : "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf"
}
1. /pdf/convert/to/png
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to turn on / off layers for rendering:{ "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf", "pages": "0", "profiles": "{\"profiles\": [{\"profile1\": {\"RenderTextObjects\": false,\"RenderVectorObjects\": true,\"RenderImageObjects\": true}} ]}" }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/png
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf",
"pages": "0"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/png
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf",
"pages": "0"
}
I. Example Response: /pdf/convert/to/png
{
"urls": [
"https://pdf-temp-files.s3.amazonaws.com/c9f65eaac1e740cf9aadc2f102e571ec/sample.png"
],
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.png",
"remainingCredits": 60716
}
Status Code: 200
21. PDF to TIFF
Description: PDF to high quality TIFF images conversion. High quality rendering. Also works great for thumbnails generation and previews. GET
or POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"name" : "result.tiff",
"pages" : "",
"password" : "",
"url" : "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf"
}
1. /pdf/convert/to/tiff
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.rect
optional. Defines coordinates for extraction, e.g.51.8, 114.8, 235.5, 204.0
. You can use PDF.co PDF Viewer with coordinates to easily select and copy coordinates. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns UseJobId
that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.name
optional. File name for generated output. Must be a String.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples. For example, to turn on / off layers for rendering:{ "url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf", "pages": "0", "profiles": "{\"profiles\": [{\"profile1\": {\"RenderTextObjects\": false,\"RenderVectorObjects\": true,\"RenderImageObjects\": true}} ]}" }
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/to/tiff
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf",
"pages": "0-"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/to/tiff
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-to-image/sample.pdf | optional. URL of the source PDF file. Must be a String. |
name | result.tiff | optional. File name for generated output. Must be a String. |
password | optional. Password of PDF file. Must be a String. | |
pages | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash - , for example: 0,2-5,7- . To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7 ) page till the end of the document. Must be a String. |
I. Example Response: /pdf/convert/to/tiff
{
"url": "https://pdf-temp-files.s3.amazonaws.com/e6fb9be16cd14a8c94e94cdcef2afb45/result.tiff",
"pageCount": 2,
"error": false,
"status": 200,
"name": "result.tiff",
"remainingCredits": 98162
}
Status Code: 200
22. PDF from CSV (CSV to PDF)
Description: Convert CSV, XLS, XLSX to PDF conversion. GET
or POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"name" : "result.pdf",
"pages" : "",
"url" : "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/csv-to-pdf/sample.csv"
}
1. /pdf/convert/from/csv
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.name
optional. File name for generated output. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns Use JobId that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/csv
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/csv-to-pdf/sample.csv",
"pages": "0-",
"name": "result.pdf"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/from/csv
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description | |
---|---|---|---|
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/csv-to-pdf/sample.csv | optional. URL of the source PDF file. Must be a String. | |
name | result.pdf | optional. File name for generated output. Must be a String. | |
pages | optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at 0 (zero). To set a range use the dash - , for example: 0,2-5,7- . To set a range from index to the last page use range like this: 2- (from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example: 0,2-5,7- means first page, then 3rd page to 6th page, and then the range from 8th (index = 7 ) page till the end of the document. Must be a String. |
I. Example Response: /pdf/convert/from/csv
{
"url": "https://pdf-temp-files.s3.amazonaws.com/01ede81738a44b4fa5a6b909115ae0a3/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 98506
}
Status Code: 200
23. PDF from Doc, DocX, RTF, TXT, XPS (Document to PDF)
Description: Convert DOC, DOCX, RTF, TXT, XPS files into PDF. GET
or POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"name" : "result.pdf",
"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/doc-to-pdf/sample.docx"
}
1. /pdf/convert/from/doc
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.pages
optional. Comma-separated list of page indices (or ranges) to process. IMPORTANT: the very first page starts at0
(zero). To set a range use the dash-
, for example:0,2-5,7-
. To set a range from index to the last page use range like this:2-
(from page #3 as the index starts at zero and till the of the document). For ALL pages just leave this param empty. Example:0,2-5,7-
means first page, then 3rd page to 6th page, and then the range from 8th (index =7
) page till the end of the document. Must be a String.name
optional. File name for generated output. Must be a String.encrypt
optional. Enable encryption for output file. Must be one of:true
,false
.async
optional. Runs processing asynchronously. Returns Use JobId that you may use with/job/check
to check state of the processing (possible states:working
,failed
,aborted
andsuccess
). Must be one of:true
,false
.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/doc
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/doc-to-pdf/sample.docx",
"pages": "0-",
"name": "result.pdf"
}
More example Requests/Responses:
I. Example Request: POST /pdf/convert/from/doc
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
encrypt | true | optional. Enable encryption for output file. Must be one of: true , false . |
url | https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/doc-to-pdf/sample.docx | required. URL of the source file. Must be a String. To use your file please upload it first to the temporary storage, see Upload and Manage Files section below to learn how to do it. |
name | result.pdf | optional. File name for generated output. Must be a String. |
I. Example Response: POST /pdf/convert/from/doc
{
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/efc283805b4a47da87910826d4ddf063/result.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEKz%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDFzXkfTapcUbLLKahiKBAbIL4F2wV3gvozuGDxmOpWUu9ETuVzkYKjMuNLAFzVZeSgRm9Yuaj7ubad9uOLQkL65GNgBQoy1Xm%2FxtLWD9tegUYd3hFvYfIWMfkWjuROwMGTZeD3CMacDPdFkP%2BUSG4aXOZb8MoG2PXnsd9UUeOvrevZkCVTg77OBXIteBCPOojSjeis%2F5BTIoVCi%2FrwV5kEGkbfBwtgsfQL3MxSbg7j%2Fud%2F3oGbUWW7zsemcfiHTiFg%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHAK44PZ6O/20200812/us-west-2/s3/aws4_request&X-Amz-Date=20200812T103301Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=6a176281828de74c917a4ff5bacd46eeca50221178bf34d01cac331f172e51c3",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 61165
}
Status Code: 200
24. PDF from URL (URL to PDF)
Description: Create PDF from URL. POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
1. /pdf/convert/from/url
Generate PDF from URL or link to HTML page. You can set the following params:
url
required. Link to input HTML file or website page to be conerted. You can pass link to file from Google Drive, Dropbox or another online file service that can generate shareable links. You can also use built-in PDF.co cloud storage located at https://app.pdf.co/files or upload your file as temporary file right before making this API call (seeUpload and Manage Files
section for more details on uploading files via API).async
optional. Set totrue
to run as async job in background (recommended for heavy documents).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.templateData
optional. You can also use Handlebars & Mustache style html templates. SettemplateData
to the string representsation of input JSON data for your template
Sample template: https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-1.html
Example input data for this template:
{
"invoice": {
"id": "0021",
"date": "August 29, 2041",
"dateDue": "September 29, 2041"
},
"issuer": {
"name": "Sarah Connor",
"company": "T-800 Research Lab",
"address": "435 South La Fayette Park Place, Los Angeles, CA 90057",
"website": "www.example.com",
"email": "info@example.com"
},
"client": {
"name": "Cyberdyne Systems",
"company": "Cyberdyne Systems",
"address": "18144 El Camino Real, Sunnyvale, California"
}
}
Note: you should set templateData
to the escaped version (use JSON.stringify(object)
or similar). For a sample on using templates please check PDF from HTML Template
set of samples below.
header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.
The header
and footer
params should contain valid HTML markup with the following classes used to inject printing values into them:
date
: formatted print date title
: document title url
: document location pageNumber
: current page number totalPages
: total pages in the document
For example, the following markup will generate Page N of NN
page numbering:
<span style='font-size:10px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span>
Sample JSON for PDF generation with more advanced header and footer. Note that the top and bottom page margins are important because the page content may overlap the footer or header.
{
"url": "https://wikipedia.org",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
profiles
optional. Must be a Strings containing JSON profile. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://wikipedia.org/wiki/Wikipedia:Contact_us",
"margins": "5mm",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"profiles": "{ \"CustomScript\": \";; // put some custom js script here \"}"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/from/url (with header and footer)
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://wikipedia.org",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
Status Code: 0
II. Example Request: JSON POST /pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://wikipedia.org/wiki/Wikipedia:Contact_us",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false
}
II. Example Response: JSON POST /pdf/convert/from/url
{
"url": "https://pdf-temp-files.s3.amazonaws.com/980bc13f061344809c75e83ce181851c/Contact_us.pdf",
"pageCount": 3,
"error": false,
"status": 200,
"name": "Contact_us.pdf",
"remainingCredits": 60637
}
Status Code: 200
25. PDF from HTML (HTML to PDF)
Description: Convert HTML code snippet into full featured PDF. GET
or POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
POST
{
"name" : "result.pdf",
"html" : "true",
"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-to-html/sample.html"
}
1. /pdf/convert/from/html
Generate PDF from HTML input. You can also set the following params:
html
required. Input HTML code to be converted. If you need to convert link or url to PDF then use/pdf/convert/from/url
endpoint instead.async
optional. Set totrue
to run as async job in background (recommended for heavy documents).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.templateData
optional string. String with JSON data to replace inside HTML. If this property has JSON code inside (note that it should be represented as escaped string) then the engine will process input HTML (or in URL) as Handlebars HTML template and will replace data in the template accordingly. For example:{{invoice.company}}
in HTML will be replaced withACME Company
iftemplateData
is set to{invoice: {company: \"ACME Company\"}}
.templateData
optional. You can also use Handlebars & Mustache style html templates. SettemplateData
to the string representsation of input JSON data for your template
Sample template: https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-1.html
Example input data for this template:
{
"invoice": {
"id": "0021",
"date": "August 29, 2041",
"dateDue": "September 29, 2041"
},
"issuer": {
"name": "Sarah Connor",
"company": "T-800 Research Lab",
"address": "435 South La Fayette Park Place, Los Angeles, CA 90057",
"website": "www.example.com",
"email": "info@example.com"
},
"client": {
"name": "Cyberdyne Systems",
"company": "Cyberdyne Systems",
"address": "18144 El Camino Real, Sunnyvale, California"
}
}
Note: you should set templateData
to the escaped version (use JSON.stringify(object)
or similar). For a sample on using templates please check PDF from HTML Template
set of samples below.
header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.
The header
and footer
params should contain valid HTML markup with the following classes used to inject printing values into them:
date
: formatted print date title
: document title url
: document location pageNumber
: current page number totalPages
: total pages in the document
For example, the following markup will generate Page N of NN
page numbering:
<span style='font-size:10px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span>
Sample JSON for PDF generation with more advanced header and footer. Note that the top and bottom page margins are important because the page content may overlap the footer or header.
{
"html": ""<!DOCTYPE html><html><head><meta charSet=\"utf-8\"/><style type=\"text/css\">body { font-family: \"Arial\" }</style></head><body><h1>Hello</h1></body></html>",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "<h1>Hello World!</h1><a href='https://pdf.co'>Go to PDF.co</a>",
"name": "result.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false
}
More example Requests/Responses:
I. Example Request: /pdf/convert/from/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "<h1>Hello World!</h1>",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": ""
}
I. Example Response: /pdf/convert/from/html
{
"url": "https://pdf-temp-files.s3.amazonaws.com/97dc323f32794eae8fa6602f5bd981c1/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 60646
}
Status Code: 200
II. Example Request: /pdf/convert/from/html (with header and footer)
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "<!DOCTYPE html><html><head><meta charSet=\"utf-8\"/><style type=\"text/css\">body { font-family: \"Arial\" }</style></head><body><h1>Hello</h1></body></html>",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
Status Code: 0
2. /pdf/convert/from/html (with custom profiles and custom js to disable links)
Generate PDF from HTML input. You can also set the following params:
html
required. Input HTML code to be converted. If you need to convert link or url to PDF then use/pdf/convert/from/url
endpoint instead.async
optional. Set totrue
to run as async job in background (recommended for heavy documents).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.templateData
optional string. String with JSON data to replace inside HTML. If this property has JSON code inside (note that it should be represented as escaped string) then the engine will process input HTML (or in URL) as Handlebars HTML template and will replace data in the template accordingly. For example:{{invoice.company}}
in HTML will be replaced withACME Company
iftemplateData
is set to{invoice: {company: \"ACME Company\"}}
.templateData
optional. You can also use Handlebars & Mustache style html templates. SettemplateData
to the string representsation of input JSON data for your template
Sample template: https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-1.html
Example input data for this template:
{
"invoice": {
"id": "0021",
"date": "August 29, 2041",
"dateDue": "September 29, 2041"
},
"issuer": {
"name": "Sarah Connor",
"company": "T-800 Research Lab",
"address": "435 South La Fayette Park Place, Los Angeles, CA 90057",
"website": "www.example.com",
"email": "info@example.com"
},
"client": {
"name": "Cyberdyne Systems",
"company": "Cyberdyne Systems",
"address": "18144 El Camino Real, Sunnyvale, California"
}
}
Note: you should set templateData
to the escaped version (use JSON.stringify(object)
or similar). For a sample on using templates please check PDF from HTML Template
set of samples below.
header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.
The header
and footer
params should contain valid HTML markup with the following classes used to inject printing values into them:
date
: formatted print date title
: document title url
: document location pageNumber
: current page number totalPages
: total pages in the document
For example, the following markup will generate Page N of NN
page numbering:
<span style='font-size:10px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span>
Sample JSON for PDF generation with more advanced header and footer. Note that the top and bottom page margins are important because the page content may overlap the footer or header.
{
"html": ""<!DOCTYPE html><html><head><meta charSet=\"utf-8\"/><style type=\"text/css\">body { font-family: \"Arial\" }</style></head><body><h1>Hello</h1></body></html>",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "<h1>Hello World!</h1>",
"name": "result.pdf",
"margins": "5px 5px 5px 5px",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"profiles": "{\"orientation\": \"landscape\", \"paperSize\": \"letter\" }"
}
More example Requests/Responses:
I. Example Request: /pdf/convert/from/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "<h1>Hello World!</h1>",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": ""
}
I. Example Response: /pdf/convert/from/html
{
"url": "https://pdf-temp-files.s3.amazonaws.com/97dc323f32794eae8fa6602f5bd981c1/result.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 60646
}
Status Code: 200
II. Example Request: /pdf/convert/from/html (with header and footer)
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "<!DOCTYPE html><html><head><meta charSet=\"utf-8\"/><style type=\"text/css\">body { font-family: \"Arial\" }</style></head><body><h1>Hello</h1></body></html>",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
Status Code: 0
26. PDF from Email
Description: Convert email files (MSG or EML) code into PDF. Extracts attachments (if any) from input email and embeds into PDF as pdf attachments.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
1. /email/decode
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/email/decode
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml"
}
More example Requests/Responses:
I. Example Request: /email/decode
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml"
}
I. Example Response: /email/decode
{
"body": {
"from": "test@example.com",
"fromName": "",
"to": [
{
"address": "test2@example.com",
"name": ""
}
],
"cc": [],
"bcc": [],
"sentAt": null,
"receivedAt": null,
"subject": "Test email with attachments",
"bodyHtml": null,
"bodyText": "Test Email Message with 2 PDF files as attachments\r\n\r\n",
"attachmentCount": 2
},
"error": false,
"status": 200,
"name": "sample.json",
"remainingCredits": 60095
}
Status Code: 200
2. /email/extract-attachments
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/email/extract-attachments
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml"
}
More example Requests/Responses:
I. Example Request: POST /email/extract-attachments
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-extractor/sample.eml"
}
I. Example Response: POST /email/extract-attachments
{
"body": {
"from": "test@example.com",
"subject": "Test email with attachments",
"bodyHtml": null,
"bodyText": "Test Email Message with 2 PDF files as attachments\r\n\r\n",
"attachments": [
{
"filename": "DigitalOcean.pdf",
"url": "https://pdf-temp-files.s3.amazonaws.com/2943e6bb80e646ec92e839292e95d542/DigitalOcean.pdf"
},
{
"filename": "sample.pdf",
"url": "https://pdf-temp-files.s3.amazonaws.com/e10e37fbb438432a83ece50ccdc719b3/sample.pdf"
}
]
},
"pageCount": 2,
"error": false,
"status": 200,
"name": "sample.json",
"remainingCredits": 60085
}
Status Code: 200
3. /pdf/convert/from/email
Generate PDF from MSG
or EML
file and creates PDF file with email and attachments (if any). You can set the following params:
url
required. Link to input EML or MSG file to be converted. You can pass link to file from Google Drive, Dropbox or another online file service that can generate shareable links. You can also use built-in PDF.co cloud storage located at https://app.pdf.co/files or upload your file as temporary file right before making this API call (seeUpload and Manage Files
section for more details on uploading files via API).embedAttachments
optional.True
by default. Set totrue
to automatically embeds all attachments from original input email MSG or EML fileas files into final output PDF. Set tofalse
if you don’t want to embed attachments so it will convert only the body of input email.convertAttachments
optional.true
by default. Set tofalse
if you don’t want to convert attachments from original email and want to embed them as original files (as embedded pdf attachments). Converts attachments that are supported by API (doc, docx, html, png, jpg etc) into PDF and merges into output final PDF. Non-supported file types are added as PDF attachments (Adobe Reader or another viewer maybe required to view PDF attachments).async
optional. Set totrue
to run as async job in background (recommended for heavy documents).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/email
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-to-pdf/sample.eml",
"embedAttachments": true,
"convertAttachments": true,
"paperSize": "Letter",
"name": "email-with-attachments",
"async": false,
"encrypt": false
}
More example Requests/Responses:
I. Example Request: /pdf/convert/from/url (with header and footer)
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://wikipedia.org",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div style='width:100%'><span style='font-size:10px;margin-left:20px;width:50%;float:left'>LEFT SUBHEADER</span><span style='font-size:8px;width:30%;float:right'>RIGHT SUBHEADER</span></div>",
"footer": "<div style='width:100%;text-align:right'><span style='font-size:10px;margin-right:20px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span>.</span></div>"
}
Status Code: 0
II. Example Request: JSON POST /pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://wikipedia.org/wiki/Wikipedia:Contact_us",
"margins": "5mm",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false
}
II. Example Response: JSON POST /pdf/convert/from/url
{
"url": "https://pdf-temp-files.s3.amazonaws.com/980bc13f061344809c75e83ce181851c/Contact_us.pdf",
"pageCount": 3,
"error": false,
"status": 200,
"name": "Contact_us.pdf",
"remainingCredits": 60637
}
Status Code: 200
4. /pdf/convert/from/email with Orientation and paper Size
url
required. URL to the source file. Supports links from Google Drive, Dropbox and from built-in PDF.co files storage. For uploading files via API please check Files Upload section.profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
profiles
string may contain JSON string containing options like orientation, paper size, margins. Example: {'orientation': 'landscape', 'paperSize': 'letter', 'margins': '5mm'}
Available options inside profiles:
margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/email
Headers:
Key | Value | Description |
---|---|---|
Content-Type | application/json | |
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/email-to-pdf/sample.eml",
"embedAttachments": true,
"name": "email-with-attachments",
"async": false,
"encrypt": false,
"profiles": "{\"orientation\": \"landscape\", \"paperSize\": \"letter\" }"
}
27. PDF from HTML template (Mustache or HandleBars style)
Description: Creates PDF from HTML template. POST
request.
Status Errors
Code | Description |
---|---|
200 | The request has succeeded |
400 | bad input parameters |
401 | unauthorized |
403 | not enough credits |
405 | Timeout error. To process large documents or files please use asynchronous mode ( set async parameter to true) and then check the status using /job/check endpoint. If file contains many pages then specify a page range using pages parameter. The number of pages of the document can be obtained using the endpoint /pdf/info |
PDF.co supports Handlebars & Mustache HTML templates. It works like this: HTML or URL to HTML contains HTML code with special macros like {{invoice.company}}
inside. To put data for to be replaced in the template use templateData
property with the string representation of JSON data object inside (use JSON.stringify(object)
or similar to generate string from JSON).
So if you are setting templateData
property to JSON like this { invoice: { company: \"ACME Company\"}}
then {{invoice.company}}
inside HTML template is getting replaced with ACME Company
.
For more information about Handlebars & Mustache templates please visit https://handlebarsjs.com/.
1. /pdf/convert/from/html (using simple inline HTML template)
You can generate PDF from HTML template. Just pass HTML template with Mustache or Handlebars variables as input.
html
required. HTML template with Mustache and Handlebars template. If you need to convert from url then please use/pdf/convert/from/url
endpoint instead.margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.async
optional. Set totrue
to run as async job in background (recommended for heavy documents).templateData
optional. Set to string with JSON data for template if your HTML is a template (Handlebars & Mustache style). And you should settemplateData
param to the escaped string (useJSON.stringify(object)
or similar)profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "Sample template: <strong>{{variable1}}</strong> and <strong>{{variable2}}</strong>",
"name": "newDocument.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\"variable1\": \"Hello from variable1\", \"variable2\": \"Hello from variable 2\"}"
}
More example Requests/Responses:
I. Example Request: JSON POST (simple template) /pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"html": "Sample template: <strong>{{variable1}}</strong> and <strong>{{variable2}}</strong>",
"name": "newDocument.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\"variable1\": \"Hello from variable1\", \"variable2\": \"Hello from variable 2\"}"
}
I. Example Response: JSON POST (simple template) /pdf/convert/from/url
{
"url": "https://pdf-temp-files.s3.amazonaws.com/3f10116dafe4498aa0c498ac1735fb76/newDocument.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "newDocument.pdf",
"remainingCredits": 60065
}
Status Code: 200
2. /pdf/convert/from/url (invoice template 1)
Generate PDF from HTML templates (Mustache and Handlebars template styles are supported). Input Parameters
url
required. Url to HTML template. Mustache and Handlebars templates are supported. You can pass link to file from Google Drive, Dropbox or another online file service that can generate shareable links. You can also use built-in PDF.co cloud storage located at https://app.pdf.co/files or upload your file as temporary file right before making this API call (seeUpload and Manage Files
section for more details on uploading files via API).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.async
optional. Set totrue
to run as async job in background (recommended for heavy documents).templateData
optional. Set to string with JSON data for template if your HTML is a template (Handlebars & Mustache style).
Example of JSON for template data:
{
"invoice": {
"id": "0021",
"date": "August 29, 2041",
"dateDue": "September 29, 2041"
},
"issuer": {
"name": "Sarah Connor",
"company": "T-800 Research Lab",
"address": "435 South La Fayette Park Place, Los Angeles, CA 90057",
"website": "www.example.com",
"email": "info@example.com"
},
"client": {
"name": "Cyberdyne Systems",
"company": "Cyberdyne Systems",
"address": "18144 El Camino Real, Sunnyvale, California",
"website": "www.example.com",
"email": "sales@example.com"
},
"items": [
{
"name": "T-800 Prototype Research",
"price": "$1000.00"
},
{
"name": "T-800 Cloud Sync Setup",
"price": "$300.00"
},
{
"name": "Skynet Domain Setup",
"price": "$50.00"
},
{
"name": "T-800 OS License",
"price": "$350.00"
},
{
"name": "T-800 Vision Testing",
"price": "$150.00"
},
],
"discount": "$100.00%",
"tax": "$126.88 (7.5%)",
"total": "$1876.88",
"paid": true,
"note": "Thank you for your business with us.",
"primaryColor": "#E4135A",
"secondaryColor": "#00538B",
"textColor": "#3F4254"
}
And you should set templateData
to the escaped version (use JSON.stringify(object)
or similar)
profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-1.html",
"name": "newInvoice.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\r\n \"invoice\": {\r\n \"id\": \"0021\",\r\n \"date\": \"August 29, 2041\",\r\n \"dateDue\": \"September 29, 2041\"\r\n },\r\n \"issuer\": {\r\n \"name\": \"Sarah Connor\",\r\n \"company\": \"T-800 Research Lab\",\r\n \"address\": \"435 South La Fayette Park Place, Los Angeles, CA 90057\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"info@example.com\"\r\n },\r\n \"client\": {\r\n \"name\": \"Cyberdyne Systems\",\r\n \"company\": \"Cyberdyne Systems\",\r\n \"address\": \"18144 El Camino Real, Sunnyvale, California\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"sales@example.com\"\r\n },\r\n \"items\": [\r\n {\r\n \"name\": \"T-800 Prototype Research\",\r\n \"price\": \"$1000.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Cloud Sync Setup\",\r\n \"price\": \"$300.00\"\r\n },\r\n {\r\n \"name\": \"Skynet Domain Setup\",\r\n \"price\": \"$50.00\"\r\n },\r\n {\r\n \"name\": \"T-800 OS License\",\r\n \"price\": \"$350.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Vision Testing\",\r\n \"price\": \"$150.00\"\r\n },\r\n ],\r\n \"discount\": \"$100.00\",\r\n \"tax\": \"$126.88 (7.5%)\",\r\n \"total\": \"$1876.88\",\r\n \"paid\": true,\r\n \"note\": \"Thank you for your business with us.\",\r\n \"primaryColor\": \"#E4135A\",\r\n \"secondaryColor\": \"#00538B\",\r\n \"textColor\": \"#3F4254\"\r\n }"
}
More example Requests/Responses:
I. Example Request: JSON POST (sample invoice template 1) /pdf/convert/from/html
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-1.html",
"name": "newInvoice.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\r\n \"invoice\": {\r\n \"id\": \"0021\",\r\n \"date\": \"August 29, 2041\",\r\n \"dateDue\": \"September 29, 2041\"\r\n },\r\n \"issuer\": {\r\n \"name\": \"Sarah Connor\",\r\n \"company\": \"T-800 Research Lab\",\r\n \"address\": \"435 South La Fayette Park Place, Los Angeles, CA 90057\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"info@example.com\"\r\n },\r\n \"client\": {\r\n \"name\": \"Cyberdyne Systems\",\r\n \"company\": \"Cyberdyne Systems\",\r\n \"address\": \"18144 El Camino Real, Sunnyvale, California\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"sales@example.com\"\r\n },\r\n \"items\": [\r\n {\r\n \"name\": \"T-800 Prototype Research\",\r\n \"price\": \"$1000.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Cloud Sync Setup\",\r\n \"price\": \"$300.00\"\r\n },\r\n {\r\n \"name\": \"Skynet Domain Setup\",\r\n \"price\": \"$50.00\"\r\n },\r\n {\r\n \"name\": \"T-800 OS License\",\r\n \"price\": \"$350.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Vision Testing\",\r\n \"price\": \"$150.00\"\r\n },\r\n ],\r\n \"discount\": \"$100.00\",\r\n \"tax\": \"$126.88 (7.5%)\",\r\n \"total\": \"$1876.88\",\r\n \"paid\": true,\r\n \"note\": \"Thank you for your business with us.\",\r\n \"primaryColor\": \"#E4135A\",\r\n \"secondaryColor\": \"#00538B\",\r\n \"textColor\": \"#3F4254\"\r\n }"
}
I. Example Response: JSON POST (sample invoice template 1) /pdf/convert/from/html
{
"url": "https://pdf-temp-files.s3.amazonaws.com/81329c3acdbe430092c76f1cec8e0fa8/newInvoice.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "newInvoice.pdf",
"remainingCredits": 60074
}
Status Code: 200
3. /pdf/convert/from/url (invoice template 2)
Generate PDF from HTML templates (Mustache and Handlebars template styles are supported). Input Parameters
url
required. Url to HTML template. Mustache and Handlebars templates are supported. You can pass link to file from Google Drive, Dropbox or another online file service that can generate shareable links. You can also use built-in PDF.co cloud storage located at https://app.pdf.co/files or upload your file as temporary file right before making this API call (seeUpload and Manage Files
section for more details on uploading files via API).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.async
optional. Set totrue
to run as async job in background (recommended for heavy documents).templateData
optional. Set to string with JSON data for template if your HTML is a template (Handlebars & Mustache style).
Example of JSON for template data:
{
"invoice": {
"id": "0021",
"date": "August 29, 2041",
"dateDue": "September 29, 2041"
},
"issuer": {
"name": "Sarah Connor",
"company": "T-800 Research Lab",
"address": "435 South La Fayette Park Place, Los Angeles, CA 90057",
"website": "www.example.com",
"email": "info@example.com"
},
"client": {
"name": "Cyberdyne Systems",
"company": "Cyberdyne Systems",
"address": "18144 El Camino Real, Sunnyvale, California",
"website": "www.example.com",
"email": "sales@example.com"
},
"items": [
{
"name": "T-800 Prototype Research",
"price": "$1000.00"
},
{
"name": "T-800 Cloud Sync Setup",
"price": "$300.00"
},
{
"name": "Skynet Domain Setup",
"price": "$50.00"
},
{
"name": "T-800 OS License",
"price": "$350.00"
},
{
"name": "T-800 Vision Testing",
"price": "$150.00"
},
],
"discount": "$100.00%",
"tax": "$126.88 (7.5%)",
"total": "$1876.88",
"paid": true,
"note": "Thank you for your business with us.",
"primaryColor": "#E4135A",
"secondaryColor": "#00538B",
"textColor": "#3F4254"
}
And you should set templateData
to the escaped version (use JSON.stringify(object)
or similar)
profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-2.html",
"name": "newInvoice.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\r\n \"invoice\": {\r\n \"id\": \"0021\",\r\n \"date\": \"August 29, 2041\",\r\n \"dateDue\": \"September 29, 2041\"\r\n },\r\n \"issuer\": {\r\n \"name\": \"Sarah Connor\",\r\n \"company\": \"T-800 Research Lab\",\r\n \"address\": \"435 South La Fayette Park Place, Los Angeles, CA 90057\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"info@example.com\"\r\n },\r\n \"client\": {\r\n \"name\": \"Cyberdyne Systems\",\r\n \"company\": \"Cyberdyne Systems\",\r\n \"address\": \"18144 El Camino Real, Sunnyvale, California\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"sales@example.com\"\r\n },\r\n \"items\": [\r\n {\r\n \"name\": \"T-800 Prototype Research\",\r\n \"price\": \"$1000.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Cloud Sync Setup\",\r\n \"price\": \"$300.00\"\r\n },\r\n {\r\n \"name\": \"Skynet Domain Setup\",\r\n \"price\": \"$50.00\"\r\n },\r\n {\r\n \"name\": \"T-800 OS License\",\r\n \"price\": \"$350.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Vision Testing\",\r\n \"price\": \"$150.00\"\r\n },\r\n ],\r\n \"discount\": \"$100.00%\",\r\n \"tax\": \"$126.88 (7.5%)\",\r\n \"total\": \"$1876.88\",\r\n \"paid\": true,\r\n \"note\": \"Thank you for your business with us.\",\r\n \"primaryColor\": \"#E4135A\",\r\n \"secondaryColor\": \"#00538B\",\r\n \"textColor\": \"#3F4254\"\r\n }"
}
More example Requests/Responses:
I. Example Request: JSON POST (sample invoice template 2) /pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-2.html",
"name": "newInvoice.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\r\n \"invoice\": {\r\n \"id\": \"0021\",\r\n \"date\": \"August 29, 2041\",\r\n \"dateDue\": \"September 29, 2041\"\r\n },\r\n \"issuer\": {\r\n \"name\": \"Sarah Connor\",\r\n \"company\": \"T-800 Research Lab\",\r\n \"address\": \"435 South La Fayette Park Place, Los Angeles, CA 90057\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"info@example.com\"\r\n },\r\n \"client\": {\r\n \"name\": \"Cyberdyne Systems\",\r\n \"company\": \"Cyberdyne Systems\",\r\n \"address\": \"18144 El Camino Real, Sunnyvale, California\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"sales@example.com\"\r\n },\r\n \"items\": [\r\n {\r\n \"name\": \"T-800 Prototype Research\",\r\n \"price\": \"$1000.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Cloud Sync Setup\",\r\n \"price\": \"$300.00\"\r\n },\r\n {\r\n \"name\": \"Skynet Domain Setup\",\r\n \"price\": \"$50.00\"\r\n },\r\n {\r\n \"name\": \"T-800 OS License\",\r\n \"price\": \"$350.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Vision Testing\",\r\n \"price\": \"$150.00\"\r\n },\r\n ],\r\n \"discount\": \"$100.00%\",\r\n \"tax\": \"$126.88 (7.5%)\",\r\n \"total\": \"$1876.88\",\r\n \"paid\": true,\r\n \"note\": \"Thank you for your business with us.\",\r\n \"primaryColor\": \"#E4135A\",\r\n \"secondaryColor\": \"#00538B\",\r\n \"textColor\": \"#3F4254\"\r\n }"
}
I. Example Response: JSON POST (sample invoice template 2) /pdf/convert/from/url
{
"url": "https://pdf-temp-files.s3.amazonaws.com/3296ac4a8121401cad7b8a38a8864b53/newInvoice.pdf",
"pageCount": 1,
"error": false,
"status": 200,
"name": "newInvoice.pdf",
"remainingCredits": 60071
}
Status Code: 200
4. /pdf/convert/from/url (invoice template 3)
Generate PDF from HTML templates (Mustache and Handlebars template styles are supported). Input Parameters
url
required. Url to HTML template. Mustache and Handlebars templates are supported. You can pass link to file from Google Drive, Dropbox or another online file service that can generate shareable links. You can also use built-in PDF.co cloud storage located at https://app.pdf.co/files or upload your file as temporary file right before making this API call (seeUpload and Manage Files
section for more details on uploading files via API).margins
optional. set to css style margins like10px
,5mm
,5in
for all sides or5px 5px 5px 5px
(the order of margins istop
,right
,bottom
,left
).paperSize
optional. Can beLetter
,A4
,A5
,A6
or custom size in pixels, mm or inches with width and height separated by space like this:200 300
,200px 300px
,200mm 300mm
,20cm 30cm
or6in 8in
.orientation
optional. set toPortrait
orLandscape
.Portrait
by default.printBackground
optional.true
by default. Set tofalse
to disbale printing of background.header
optional. Set to HTML for header to be applied on every page at the header.footer
optional. Set to HTML for footer to be applied on every page at the bottom.async
optional. Set totrue
to run as async job in background (recommended for heavy documents).templateData
optional. Set to string with JSON data for template if your HTML is a template (Handlebars & Mustache style).
Example of JSON for template data:
{
"invoice": {
"id": "0021",
"date": "August 29, 2041",
"dateDue": "September 29, 2041"
},
"issuer": {
"name": "Sarah Connor",
"company": "T-800 Research Lab",
"address": "435 South La Fayette Park Place, Los Angeles, CA 90057",
"website": "www.example.com",
"email": "info@example.com"
},
"client": {
"name": "Cyberdyne Systems",
"company": "Cyberdyne Systems",
"address": "18144 El Camino Real, Sunnyvale, California",
"website": "www.example.com",
"email": "sales@example.com"
},
"items": [
{
"name": "T-800 Prototype Research",
"price": "$1000.00"
},
{
"name": "T-800 Cloud Sync Setup",
"price": "$300.00"
},
{
"name": "Skynet Domain Setup",
"price": "$50.00"
},
{
"name": "T-800 OS License",
"price": "$350.00"
},
{
"name": "T-800 Vision Testing",
"price": "$150.00"
},
],
"discount": "$100.00%",
"tax": "$126.88 (7.5%)",
"total": "$1876.88",
"paid": true,
"note": "Thank you for your business with us.",
"primaryColor": "#E4135A",
"secondaryColor": "#00538B",
"textColor": "#3F4254"
}
And you should set templateData
to the escaped version (use JSON.stringify(object)
or similar)
profiles
optional. Must be a String. You can set additional and extra options using this parameter that allows you to set custom configuration. See profiles samples for examples.
Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/pdf/convert/from/url
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/cloudapi-templates/template-invoice-3.html",
"name": "newInvoice.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false,
"templateData": "{\r\n \"invoice\": {\r\n \"id\": \"0021\",\r\n \"date\": \"August 29, 2041\",\r\n \"dateDue\": \"September 29, 2041\"\r\n },\r\n \"issuer\": {\r\n \"name\": \"Sarah Connor\",\r\n \"company\": \"T-800 Research Lab\",\r\n \"address\": \"435 South La Fayette Park Place, Los Angeles, CA 90057\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"info@example.com\"\r\n },\r\n \"client\": {\r\n \"name\": \"Cyberdyne Systems\",\r\n \"company\": \"Cyberdyne Systems\",\r\n \"address\": \"18144 El Camino Real, Sunnyvale, California\",\r\n \"website\": \"www.example.com\",\r\n \"email\": \"sales@example.com\"\r\n },\r\n \"items\": [\r\n {\r\n \"name\": \"T-800 Prototype Research\",\r\n \"price\": \"$1000.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Cloud Sync Setup\",\r\n \"price\": \"$300.00\"\r\n },\r\n {\r\n \"name\": \"Skynet Domain Setup\",\r\n \"price\": \"$50.00\"\r\n },\r\n {\r\n \"name\": \"T-800 OS License\",\r\n \"price\": \"$350.00\"\r\n },\r\n {\r\n \"name\": \"T-800 Vision Testing\",\r\n \"price\": \"$150.00\"\r\n },\r\n ],\r\n \"discount\": \"$100.00%\",\r\n \"tax\": \"$126.88 (7.5%)\",\r\n \"total\": \"$1876.88\",\r\n \"paid\": true,\r\n \"note\": \"Thank you for your business with us.\",\r\n \"primaryColor\": \"#E4135A\",\r\n \"secondaryColor\": \"#00538B\",\r\n \"textColor\": \"#3F4254\"\r\n }"
}