Security: API runs on the secure Amazon AWS infrastructure. All data transfers are encrypted by SSL/TLS encryption.
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 user. Our engines are tested in production by thousands of enterprise user.
Credits based system. For evert page/image processed credits are reduced on your account. You get monthly amount of credits based on your subscription, also you may always purchase additional credits. Separate methods like uploading, background job also consumes credits. You may always see how may credits are left using remainingCredits
property in the returned result or by exploring your API logs
On-Premise API Server and SDKs are available
Not a developer? Zapier, UiPath, Integromat and hundreds of other integrations are available
Code | Description |
---|---|
200 |
The request has succeeded |
400 |
bad input parameters |
401 |
unauthorized |
403 |
not enough credits |
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 yours here
We’ve designed special async
that is available for almost all endpioints. With async mode you can process large files and documents with hundreds of pages.
async
mode is no more than 25
seconds. If your call to API (for example, if you run text recognition on 100+ pages scanned document) takes more time then you should use async
mode by setting async
to true
.async
mode by setting async
input parameter to true
. This will tell API method to reate background job and immediately return unique id of this new background job in jobId
property in the output along with the final url
. Use this url to access output file (if any) once the job is finished./job/check
. Wait until it returns status
as success
/file/upload/get-presigned-url
. This will return presignedUrl
to be used for uploading and url
that must be used to access uploaded file.PUT
to this presignedUrl
generated on the previous step. Once finished, your file can be accessed using the url
link from step 1
url
param. Set async
param to true
so API method will return immediately and will send you output URL (or set of URLs) along with jobId
immediately. jobId
is the unique identificator of the background job that will be running on the server.status
of this background job using /job/check
API method with jobId
param. It will return execution status
./job/check
returns status
param as success
you may use the previously generated output URL (or set of URLs) to download generated data.We have hundreds of ready to copy Explore Source Code Samples on Github available for Javascript, Node.js, PHP, Java, C# and Visual Basic NET.
SSL certificate error: unable to get local issuer certificate
error then please check this solution on StackoverflowOur team of engineers is happy to help with the integration, coding of proof of concept projects and any other questions. To contact us please:
Checks status of background job that was previously created with PDF.co API.
jobId
required. Id of background that was started asynchronously. Must be a String. To start new async background job, you should set async
to true
for API methods.force
optional. Set to true
to forcely check the status of the background job. Intended to be used with really long and heavy background jobs only.Returns JSON with status of the background job.
Available status values:
working
background job is currently in work or does not exist.success
background job was successfully finished.failed
background job failed for some reason (see message
for more details).aborted
background job was aborted.unknown
unknown background job id. Available only when force
is set to true
for input request.Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/job/check
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"jobid": "12345"
}
More example Requests/Responses:
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"jobid": "12345"
}
{
"status": "working",
"remainingCredits": 60227
}
Status Code: 200
Generate high quality barcode images. Supports QR Code, Datamatrix, Code 39, Code 128, PDF417 and many other barcode types.
type
optional. Sets barcode type. QRCode
is default. Available values: Code128
, Code39
, Postnet
, UPCA
, EAN8
, ISBN
, Codabar
, I2of5
, Code93
, EAN13
, JAN13
, Bookland
, UPCE
, PDF417
, PDF417Truncated
, DataMatrix
, QRCode
, Aztec
, Planet
, EAN128
, GS1_128
, USPSSackLabel
, USPSTrayLabel
, DeutschePostIdentcode
, DeutschePostLeitcode
, Numly
, PZN
, OpticalProduct
, SwissPostParcel
, RoyalMail
, DutchKix
, SingaporePostalCode
, EAN2
, EAN5
, EAN14
, MacroPDF417
, MicroPDF417
, GS1_DataMatrix
, Telepen
, IntelligentMail
, GS1_DataBar_Omnidirectional
, GS1_DataBar_Truncated
, GS1_DataBar_Stacked
, GS1_DataBar_Stacked_Omnidirectional
, GS1_DataBar_Limited
, GS1_DataBar_Expanded
, GS1_DataBar_Expanded_Stacked
, MaxiCode
, Plessey
, MSI
, ITF14
, GTIN12
, GTIN8
, GTIN13
, GTIN14
.
inline
. optional. Set to true to generate datauri
url instead of file.
decorationImage
optional. works for QR Code only. Set this to the image that you want to be inserted logo inside QR Code barcode. 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.
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/barcode/generate
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:
{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"decorationImage": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-generator/logo.png"
}
More example Requests/Responses:
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:
{
"name": "barcode.png",
"value": "abcdef123456",
"type": "QRCode",
"inline": false,
"decorationImage": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-generator/logo.png"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/9a87556a8b9e4f4eae60843e697250d4/barcode.png",
"error": false,
"status": 200,
"name": "barcode.png",
"remainingCredits": 60631
}
Status Code: 200
Read barcodes from images and PDF. Can read all popular barcode types from QR Code
and Code 128
, EAN
to Datamatrix
, PDF417
, GS1
and many other barcodes.
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.
type
. optional. Comma-separated list of barcode types to decode. Barcode types supported: AustralianPostCode
, Aztec
, CircularI2of5
, Codabar
, CodablockF
, Code128
, Code16K
, Code39
, Code39Extended
, Code39Mod43
, Code39Mod43Extended
, Code93
, DataMatrix
, EAN13
, EAN2
, EAN5
, EAN8
, GS1
, GS1DataBarExpanded
, GS1DataBarExpandedStacked
, GS1DataBarLimited
, GS1DataBarOmnidirectional
, GS1DataBarStacked
, GTIN12
, GTIN13
, GTIN14
, GTIN8
, IntelligentMail
, Interleaved2of5
, ITF14
, MaxiCode
, MICR
, MicroPDF
, MSI
, PatchCode
, PDF417
, Pharmacode
, PostNet
, PZN
, QRCode
, RoyalMail
, RoyalMailKIX
, Trioptic
, UPCA
, UPCE
, UPU
. 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.
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/barcode/read/from/url
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/barcode-reader/sample.pdf",
"types": "Code128,Code39,Interleaved2of5,EAN13",
"pages": "0",
"encrypt": false,
"async": false
}
More example Requests/Responses:
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/barcode-reader/sample.pdf",
"types": "Code128,Code39,Interleaved2of5,EAN13",
"pages": "0",
"encrypt": false,
"async": false
}
{
"barcodes": [
{
"Value": "test123",
"RawData": "",
"Type": 2,
"Rect": "{X=111,Y=60,Width=255,Height=37}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
"Confidence": 0.90625155,
"Metadata": "",
"TypeName": "Code128"
},
{
"Value": "123456",
"RawData": "",
"Type": 4,
"Rect": "{X=111,Y=129,Width=306,Height=37}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
"Confidence": 0.7710818,
"Metadata": "",
"TypeName": "Code39"
},
{
"Value": "0112345678901231",
"RawData": "",
"Type": 2,
"Rect": "{X=111,Y=198,Width=305,Height=37}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
"Confidence": 0.9156459,
"Metadata": "",
"TypeName": "Code128"
},
{
"Value": "12345670",
"RawData": [
1,
2,
3,
4,
5,
6,
7,
0
],
"Type": 5,
"Rect": "{X=111,Y=267,Width=182,Height=0}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
"Confidence": 1,
"Metadata": "",
"TypeName": "I2of5"
},
{
"Value": "1234567890128",
"RawData": "",
"Type": 6,
"Rect": "{X=102,Y=336,Width=71,Height=72}",
"Page": 0,
"File": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/barcode-reader/sample.pdf",
"Confidence": 0.895925164,
"Metadata": "",
"TypeName": "EAN13"
}
],
"pageCount": 1,
"error": false,
"status": 200,
"remainingCredits": 60661
}
Status Code: 200
Document Parser automatically extracts fields, tables, values from invoices, statements, orders and other PDF and scanned documents.
You can use built-in templates like Generic Invoice Parser
(templateId
1
) and others.
Or you can create your own data extraction templates using document parser template editor. Templates support extraction by coordinates, by patterns. Multiple languages are supported inside the same document. Document parser can also extract tables, fields, multipaged tables, text.
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!
To create parsing templates please use document parser template editor
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 to true
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default is JSON
. You can override default output format to CSV
or XML
to generate CSV or XML output accordingly.storeResult
. optional. Set to true
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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.Example
Sample PDF document with tables and multiple pages:
https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf
Sample Document Parser Template Code (YML or JSON):
---
# Template that demonstrates parsing of multi-page table using only
# regular expressions for the table start, end, and rows.
# If regular expression cannot be written for every table row (for example,
# if the table contains empty cells), try the second method demonstrated
# in `MultiPageTable-template2.yml` template.
templateVersion: 3
templatePriority: 0
sourceId: Multipage Table Test
detectionRules:
keywords:
- Sample document with multi-page table
fields:
total:
type: regex
expression: TOTAL {{DECIMAL}}
dataType: decimal
tables:
- name: table1
start:
# regular expression to find the table start in document
expression: Item\s+Description\s+Price\s+Qty\s+Extended Price
end:
# regular expression to find the table end in document
expression: TOTAL\s+\d+\.\d\d
row:
# regular expression to find table rows
expression: '^\s*(?\d+)\s+(?.+?)\s+(?\d+\.\d\d)\s+(?\d+)\s+(?\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: to set custom template code, encode it and put into template
param. You can also save it in PDF.co and refere using templateId
instead.
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
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# Template that demonstrates parsing of multi-page table using only\r\n# regular expressions for the table start, end, and rows.\r\n# If regular expression cannot be written for every table row (for example,\r\n# if the table contains empty cells), try the second method demonstrated\r\n# in `MultiPageTable-template2.yml` template.\r\ntemplateVersion: 3\r\ntemplatePriority: 0\r\nsourceId: Multipage Table Test\r\ndetectionRules:\r\n keywords:\r\n - Sample document with multi-page table\r\nfields:\r\n total:\r\n type: regex\r\n expression: TOTAL {{DECIMAL}}\r\n dataType: decimal\r\ntables:\r\n- name: table1\r\n start:\r\n # regular expression to find the table start in document\r\n expression: Item\\s+Description\\s+Price\\s+Qty\\s+Extended Price\r\n end:\r\n # regular expression to find the table end in document\r\n expression: TOTAL\\s+\\d+\\.\\d\\d\r\n row:\r\n # regular expression to find table rows\r\n expression: '^\\s*(?\\d+)\\s+(?.+?)\\s+(?\\d+\\.\\d\\d)\\s+(?\\d+)\\s+(?\\d+\\.\\d\\d)'\r\n columns:\r\n - name: itemNo\r\n type: integer\r\n - name: description\r\n type: string\r\n - name: price\r\n type: decimal\r\n - name: qty\r\n type: integer\r\n - name: extPrice\r\n type: decimal\r\n multipage: true",
"outputFormat": "JSON",
"async": false,
"encrypt": "false",
"inline": "true",
"profiles": "",
"password": "",
"storeResult": false
}
More example Requests/Responses:
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 |
{
"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
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!
To create parsing templates please use 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 to true
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default is JSON
. You can override default output format to CSV
or XML
to generate CSV or XML output accordingly.storeResult
. optional. Set to true
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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.Example
Sample PDF document with tables and multiple pages:
https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf
SampleTemplate.yml:
---
# Template that demonstrates parsing of multi-page table using only
# regular expressions for the table start, end, and rows.
# If regular expression cannot be written for every table row (for example,
# if the table contains empty cells), try the second method demonstrated
# in `MultiPageTable-template2.yml` template.
templateVersion: 3
templatePriority: 0
sourceId: Multipage Table Test
detectionRules:
keywords:
- Sample document with multi-page table
fields:
total:
type: regex
expression: TOTAL {{DECIMAL}}
dataType: decimal
tables:
- name: table1
start:
# regular expression to find the table start in document
expression: Item\s+Description\s+Price\s+Qty\s+Extended Price
end:
# regular expression to find the table end in document
expression: TOTAL\s+\d+\.\d\d
row:
# regular expression to find table rows
expression: '^\s*(?\d+)\s+(?.+?)\s+(?\d+\.\d\d)\s+(?\d+)\s+(?\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: this template should be set as template
param. Also you see Template Creation Guide and download Document Parser Template Editor for Windows Desktop for full experience.
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-us-west-2.amazonaws.com/files/demo-files/cloud-api/document-parser/MultiPageTable.pdf",
"inline": "true",
"template": "---
detectionRules:
keywords:
- "Sample document with multi-page table"
fields:
total:
dataType: decimal
expression: "TOTAL {{DECIMAL}}"
type: regex
sourceId: "Multipage Table Test"
tables:
-
columns:
-
name: itemNo
type: integer
-
name: description
type: string
-
name: price
type: decimal
-
name: qty
type: integer
-
name: extPrice
type: decimal
end:
expression: TOTAL\s+\d+\.\d\d
multipage: true
name: table1
row:
expression: ^\s*(?\d+)\s+(?.+?)\s+(?\d+\.\d\d)\s+(?\d+)\s+(?\d+\.\d\d)
start:
expression: "Item\\s+Description\\s+Price\\s+Qty\\s+Extended Price"
templatePriority: 0
templateVersion: 3
"
}
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:
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": ""
}
{
"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
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!
To create parsing templates please use document parser template editor
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 to true
to return results inside the response. Otherwise endpoint will return a link to output file generated.outputFormat
. optional. Default is JSON
. You can override default output format to CSV
or XML
to generate CSV or XML output accordingly.storeResult
. optional. Set to true
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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": ""
}
{
"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
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:
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. |
{
"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
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"
}
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. |
Return all YAML formatted 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:
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/ |
{
"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
Return 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 |
Files Storage
You can upload files as temporary files into PDF.co. Temporary files are stored for 1 hour by default and then auto removed.
To store files permanently (pdf templates, images you want to re-use) please use PDF.co built-in files storage at https://app.pdf.co/files instead.
You can also use 3rd party cloud services:
public link
to a file from Dropboxanyone with a link
anyone with a link
IMPORTANT NOTE FOR GOOGLE DRIVE/DOCS users: free Google Drive/Docs limits number of requests to their files. If you use link to file or document from Google Drive or Google Drive then make sure you have no more than 5-10 requests per minute. Otherwise Google Drive returns no file or error page.
Temporary Files Upload
You can upload temporary files up to 2GB in size. Please note that to process these files you should use async=true
mode with data extraction and tools endpoints along with /job/check
to check status of background jobs you create.
**Steps to Upload **
/file/upload/get-presigned-url
. It will generate link for uploading (presignedUrl
) and final link (url
)presignedUrl
link using PUT
method within next 30 minutes.url
to access the file you have just uploaded.Note: all uploaded files are considered to be temporary files and are automatically permanently removed after 1 hour.
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: Uploading a Temporary File
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
GET
https://api.pdf.co/v1/file/upload/get-presigned-url?name=test.pdf&encrypt=true
200
{
"presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=....",
"error": false,
"status": 200,
"name": "test.pdf",
"remainingCredits": 93574
}
PUT
https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....
--form 'file=@/path/to/file'
200
{
}
Now you can access your file using link from "url" param to from the first step.
Description: Deletes temp file (that was uploaded by you or generated by API)
IMPORTANT: All temp files are autoremoved after 1 hour. You may use /file/delete
methods to explicitely force remove temp files once you don’t need them.
Parameters
url
required. URL of previously uploaded temporary file or output file that was generated by API method.Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/file/delete
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"file": "https://pdf-temp-files.s3.amazonaws.com/b5c1e67d98ab438292ff1fea0c7cdc9d/sample.pdf"
}
More example Requests/Responses:
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Body:
{
"error": false,
"status": 200,
"remainingCredits": 77778
}
Status Code: 200
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 |
---|---|---|
file | https://pdf-temp-files.s3.amazonaws.com/b5c1e67d98ab438292ff1fea0c7cdc9d/sample.pdf | required. URL of the file to calculate hash. Must be a String. |
{
"error": false,
"status": 200,
"remainingCredits": 9999986
}
Status Code: 200
Description: Calculate and return MD5 hash of file by url. Commonly used to control if source document has been changed or not because every little change will cause hash string to differ as well. GET
or POST
request.
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.Endpoint:
Method: POST
Type: RAW
URL: https://api.pdf.co/v1/file/hash
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"
}
More example Requests/Responses:
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"
}
{
"hash": "d942e5becdcb0386598cce15e9e56deb1ca9d893b8578a88eca4a62f02c4000b",
"remainingCredits": 98143
}
Status Code: 200
Description: Uploads a small (up to 100KB) local file as a temporary file in PDF.co storage. Note: temporary files are automatically permanently removed after 1 hour.
Status Errors
Code | Description |
---|---|
200 |
The request has succeeded |
400 |
bad input parameters |
401 |
unauthorized |
403 |
not enough credits |
405 |
Timeout error. To upload large documents or files please use /file/upload/get-presigned-url instead to get url that you should upload into (see source code samples |
Example
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
Endpoint:
Method: POST
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/file/upload
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. Your API key for PDF.co. Get your API key at https://app.pdf.co/ |
Body:
Key | Value | Description |
---|---|---|
file | required. Local file should be selected |
More example Requests/Responses:
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 |
---|---|---|
name | optional. The name the file will be stored with. Must be a String. | |
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf | required. URL of the file to upload. Must be a String. |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/1a4a92ac805c41c28ef75a24e0f35ba5/sample.pdf",
"error": false,
"status": 200,
"name": "sample.pdf",
"remainingCredits": 98145
}
Status Code: 200
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 |
---|---|---|
file | required. Local file should be selected |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/28b6041bcfe34c469ed44f15f0594d5f/logo.dat",
"error": false,
"status": 200,
"name": "logo",
"remainingCredits": 77772
}
Status Code: 200
Description: Creates temporary file using base64 source data. You may use this temporary file URL with other API methods. Temporary files are automatically permanently removed after 1 hour. 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
{
"file" : "image/gif;base64,R0lGODlhEAAQAPUtACIiIScnJigoJywsLDIyMjMzMzU1NTc3Nzg4ODk5OTs7Ozw8PEJCQlBQUFRUVFVVVVhYWG1tbXt7fInDRYvESYzFSo/HT5LJVJPJVJTKV5XKWJbKWZbLWpfLW5jLXJrMYaLRbaTScKXScKXScafTdIGBgYODg6alprLYhbvekr3elr3el9Dotf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAABAAEAAABpJAFGgkKhpFIRHpw2qBLJiLdCrNTFKt0wjD2Xi/G09l1ZIwRJeNZs3uUFQtEwCCVrM1bnhJYHDU73ktJQELBH5pbW+CAQoIhn94ioMKB46HaoGTB5WPaZmMm5wOIRcekqChliIZFXqoqYYkE2SaoZuWH1gmAgsIvr8ICQUPTRIABgTJyskFAw1ZDBAO09TUDw0RQQA7"
}
Endpoint:
Method: POST
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/file/upload/base64
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 |
---|---|---|
file | image/gif;base64,R0lGODlhEAAQAPUtACIiIScnJigoJywsLDIyMjMzMzU1NTc3Nzg4ODk5OTs7Ozw8PEJCQlBQUFRUVFVVVVhYWG1tbXt7fInDRYvESYzFSo/HT5LJVJPJVJTKV5XKWJbKWZbLWpfLW5jLXJrMYaLRbaTScKXScKXScafTdIGBgYODg6alprLYhbvekr3elr3el9Dotf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAABAAEAAABpJAFGgkKhpFIRHpw2qBLJiLdCrNTFKt0wjD2Xi/G09l1ZIwRJeNZs3uUFQtEwCCVrM1bnhJYHDU73ktJQELBH5pbW+CAQoIhn94ioMKB46HaoGTB5WPaZmMm5wOIRcekqChliIZFXqoqYYkE2SaoZuWH1gmAgsIvr8ICQUPTRIABgTJyskFAw1ZDBAO09TUDw0RQQA7 | required. Base64-encoded file bytes. Must be a String. |
More example Requests/Responses:
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 |
---|---|---|
file | image/gif;base64,R0lGODlhEAAQAPUtACIiIScnJigoJywsLDIyMjMzMzU1NTc3Nzg4ODk5OTs7Ozw8PEJCQlBQUFRUVFVVVVhYWG1tbXt7fInDRYvESYzFSo/HT5LJVJPJVJTKV5XKWJbKWZbLWpfLW5jLXJrMYaLRbaTScKXScKXScafTdIGBgYODg6alprLYhbvekr3elr3el9Dotf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAABAAEAAABpJAFGgkKhpFIRHpw2qBLJiLdCrNTFKt0wjD2Xi/G09l1ZIwRJeNZs3uUFQtEwCCVrM1bnhJYHDU73ktJQELBH5pbW+CAQoIhn94ioMKB46HaoGTB5WPaZmMm5wOIRcekqChliIZFXqoqYYkE2SaoZuWH1gmAgsIvr8ICQUPTRIABgTJyskFAw1ZDBAO09TUDw0RQQA7 | required. Base64-encoded file bytes. Must be a String. |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/7588d614c9ad41eb98ec317a02abda63/uploadfile.txt",
"error": false,
"status": 200,
"remainingCredits": 77769
}
Status Code: 200
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 |
---|---|---|
file | image/gif;base64,R0lGODlhEAAQAPUtACIiIScnJigoJywsLDIyMjMzMzU1NTc3Nzg4ODk5OTs7Ozw8PEJCQlBQUFRUVFVVVVhYWG1tbXt7fInDRYvESYzFSo/HT5LJVJPJVJTKV5XKWJbKWZbLWpfLW5jLXJrMYaLRbaTScKXScKXScafTdIGBgYODg6alprLYhbvekr3elr3el9Dotf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAAAAAAAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40NTQ1NQAsAAAAABAAEAAABpJAFGgkKhpFIRHpw2qBLJiLdCrNTFKt0wjD2Xi/G09l1ZIwRJeNZs3uUFQtEwCCVrM1bnhJYHDU73ktJQELBH5pbW+CAQoIhn94ioMKB46HaoGTB5WPaZmMm5wOIRcekqChliIZFXqoqYYkE2SaoZuWH1gmAgsIvr8ICQUPTRIABgTJyskFAw1ZDBAO09TUDw0RQQA7 | required. Base64-encoded file bytes. Must be a String. |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/a8ac8a3cec3344f08f556bfd2d678b2f/uploadfile.txt",
"error": false,
"status": 200,
"remainingCredits": 98145
}
Status Code: 200
Description: This method generates links to upload your local file to. Use this presignedUrl
from the response to upload your file. Once you upload your file to this presignedUrl
using PUT
, you can use url
link to access the uploaded file.
With this method you can upload files up to 2GB in size. Please note that to process these files you should use async=true
mode with data extraction and tools endpoints along with /job/check
to check status of background jobs you create.
**Steps to Upload **
/file/upload/get-presigned-url
. It will generate link for uploading (presignedUrl
) and final link (url
)presignedUrl
link using PUT
method within next 30 minutes.url
to access the file you have just uploaded.Important: all uploaded files are considered to be temporary files and are automatically permanently removed after 1 hour.
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
GET
https://api.pdf.co/v1/file/upload/get-presigned-url?name=test.pdf&encrypt=true
200
{
"presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=....",
"error": false,
"status": 200,
"name": "test.pdf",
"remainingCredits": 93574
}
PUT
https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....
--form 'file=@/path/to/file'
200
{
}
Now you can access your file using link from "url" param to from the first step.
Endpoint:
Method: GET
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/file/upload/get-presigned-url
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 |
---|---|---|
name | test.pdf | The name the file will be stored with. Must be a String. |
encrypt | true | Enable encryption for output file. Must be one of: true , false . |
More example Requests/Responses:
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 |
---|---|---|
name | test.pdf | The name the file will be stored with. Must be a String. |
encrypt | true | Enable encryption for output file. Must be one of: true , false . |
{
"presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host&X-Amz-Signature=8650913644b6425ba8d52b78634698e5fc8970157d971a96f0279a64f4ba87fc",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDA9KaTOXRjkCdCqSTCKBAW9tReCLk1fVTZBH9exl9VIbP8Gfp1pE9hg6et94IBpNamOaBJ6%2B9Vsa5zxfiddlgA%2BxQ4tpd9gprFAxMzjN7UtjU%2B2gf%2FKbUKc2lfV18D2wXKd1FEhC6kkGJVL5UaoFONG%2Fw2jXfLxe3nCfquMEDo12XzcqIQtNFWXjKPWBkQEvmii4tfTyBTIot4Na%2BAUqkLshH0R7HVKlEBV8btqa0ctBjwzwpWkoU%2BF%2BCtnm8Lm4Eg%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHEGHTOA4W/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=243419ac4a9a315eebc2db72df0817de6a261a684482bbc897f0e7bb5d202bb9",
"error": false,
"status": 200,
"name": "test.pdf",
"remainingCredits": 98145
}
Status Code: 200
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Query:
Key | Value | Description |
---|---|---|
name | myFile.png | The filename for your future file that will be uploaded. Must be a String. |
encrypt | true | Enable encryption for output file. Must be one of: true , false . |
{
"presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/63f7f641a3144f84ac209b4f514bc0df/myFile.png?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T091225Z&X-Amz-SignedHeaders=host&X-Amz-Signature=14d3eb91305d96804deccb6985cbbd4552705f5ddb2144b901a97c8e7abc1ac3",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/63f7f641a3144f84ac209b4f514bc0df/myFile.png?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzECMaDC5PzTA618EQiHoskyKBAeYQcVKbK%2B0F5nnjBV6MKbPNvueaFlSBSPxPi31BdtFzw1jAIXjAvATkBwTPRx%2FVwhszDtYQRVkbhsZF6HLotVUedrcdGHOrsWV5DpN2xKgnX7xRcJrvUu0wieaJHDmHzFL1eNzFwj2927L%2BtadEfmz1a0SiEImJZujcLF78lJZ5mSj7s8D4BTIok4Xja8wyqnBBp2EOcZw8qrUxeR7Ufd0aw4bf7Z1Cur1f0PFg8hlrYQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHAPA4HUJS/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T091225Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=26e27b48c5284665914fdd981d7b0b5b6e70e64839f28621f3dc82256e492879",
"error": false,
"status": 200,
"name": "myFile.png",
"remainingCredits": 77779
}
Status Code: 200
Description: Downloads file from a source url and uploads it as a temporary file. Temporary files are automatically permanently removed after 1 hour.
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
{
"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf"
}
Endpoint:
Method: POST
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/file/upload/url
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 |
---|---|---|
name | sample.pdf | optional. The name the file will be stored with. Must be a String. |
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf | required. URL of the file to upload. Must be a String. |
More example Requests/Responses:
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 |
---|---|---|
name | sample.pdf | optional. The name the file will be stored with. Must be a String. |
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf | required. URL of the file to upload. Must be a String. |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/4e36f2962b7f4248b7167f4389d534d5/sample.pdf",
"error": false,
"status": 200,
"name": "sample.pdf",
"remainingCredits": 77767
}
Status Code: 200
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 |
---|---|---|
name | optional. The name the file will be stored with. Must be a String. | |
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf | required. URL of the file to upload. Must be a String. |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/1a4a92ac805c41c28ef75a24e0f35ba5/sample.pdf",
"error": false,
"status": 200,
"name": "sample.pdf",
"remainingCredits": 98145
}
Status Code: 200
Description: Downloads file from a source url and uploads it as a temporary file. Temporary files are automatically permanently removed after 1 hour.
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
{
"url" : "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf"
}
Endpoint:
Method: GET
Type: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/file/upload/url
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 |
---|---|---|
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf |
More example Requests/Responses:
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Query:
Key | Value | Description |
---|---|---|
url | https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/97415d1c45a04b29ac42c8dc01883316/sample.pdf",
"error": false,
"status": 200,
"name": "sample.pdf",
"remainingCredits": 77765
}
Status Code: 200
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/703aa298cfe745baa3449fbdaba4d1d7/sample.pdf",
"error": false,
"status": 200,
"name": "sample.pdf",
"remainingCredits": 98145
}
Status Code: 200
presignedUrl
--formdata file=…With this method you can upload files up to 2GB in size. Please note that to process these files you should use async=true
mode with data extraction and tools endpoints along with /job/check
to check status of background jobs you create.
**Steps to Upload **
/file/upload/get-presigned-url
. It will generate link for uploading (presignedUrl
) and final link (url
)presignedUrl
link using PUT
method within next 30 minutes.url
to access the file you have just uploaded.Important: all uploaded files are considered to be temporary files and are automatically permanently removed after 1 hour.
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 |
Workflow
Sample Request:
! Don’t forget to set x-api-key
url param or http header param (preferred) to API key, get yours here
Generate secure link where you will upload your
GET
https://api.pdf.co/v1/file/upload/get-presigned-url?name=test.pdf&encrypt=true
200
{
"presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=....",
}
Now all PUT to upload file to "presignedUrl" you've got:
https://pdf-temp-files.s3-us-west-2.amazonaws.com/28e191b14f3a4f43b16fcef1d53d191e/test.pdf?X-Amz-Expires=900&....
--form 'file=@/path/to/file'
200
{
}
Now your file is available via link from "url" param from the first step
Endpoint:
Method: PUT
Type: POST params, JSON or FORMDATA
URL:
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 |
---|---|---|
file | Local file to upload. |
More example Requests/Responses:
Headers:
Key | Value | Description |
---|---|---|
x-api-key | {{x-api-key}} | Required. API key for PDF.co. Get yours at https://pdf.co/ |
Query:
Key | Value | Description |
---|---|---|
name | test.pdf | The name the file will be stored with. Must be a String. |
encrypt | true | Enable encryption for output file. Must be one of: true , false . |
{
"presignedUrl": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=900&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIZJDPLX6D7EHVCKA/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host&X-Amz-Signature=8650913644b6425ba8d52b78634698e5fc8970157d971a96f0279a64f4ba87fc",
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c72bf56341142ba83c8f98b47f14d62/test.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDA9KaTOXRjkCdCqSTCKBAW9tReCLk1fVTZBH9exl9VIbP8Gfp1pE9hg6et94IBpNamOaBJ6%2B9Vsa5zxfiddlgA%2BxQ4tpd9gprFAxMzjN7UtjU%2B2gf%2FKbUKc2lfV18D2wXKd1FEhC6kkGJVL5UaoFONG%2Fw2jXfLxe3nCfquMEDo12XzcqIQtNFWXjKPWBkQEvmii4tfTyBTIot4Na%2BAUqkLshH0R7HVKlEBV8btqa0ctBjwzwpWkoU%2BF%2BCtnm8Lm4Eg%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHEGHTOA4W/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T143951Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=243419ac4a9a315eebc2db72df0817de6a261a684482bbc897f0e7bb5d202bb9",
"error": false,
"status": 200,
"name": "test.pdf",
"remainingCredits": 98145
}
Status Code: 200
presignedUrl
--formdata file=…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 |
---|---|---|
file | Local file to upload. |
Status Code: 200
Add text, images, links to PDF files. You can update or modify PDF and scanned PDF files.
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"
}
]
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 String
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
and success
). 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": "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/",
"fontName": "Colibri",
"fontItalic": true,
"fontBold": true,
"fontStrikeout": false,
"fontUnderline": true
},
{
"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"
}
]
}
More example Requests/Responses:
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"
}
]
}
{
"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
You can add text, images, fill pdf fields in existing PDF files and PDF forms. This method uses simplified version of /pdf/edit/add
that allows you to add multiple text, images, fill pdf fields.
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 as x;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.
where 24
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 styleFor 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 as x;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 format page;fieldName;value
. Sample: 0;editbox1;text is here
. To fill checkbox, use true
, 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 String
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
and success
). 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:
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"
}
{
"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
Create PDF forms with fillable edit boxes, checkboxes and other fillable fields.
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"
}
]
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 String
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
and success
). 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:
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"
}
]
}
{
"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
Delete pages from PDF document.
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 remove. IMPORTANT: the very first page starts at 1
(one). To set a range use the dash -
, for example: 1,2-5,7-
. To set a range from index to the last page use range like this: 2-
. For ALL pages just leave this param empty. Must be a String.
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/delete-pages
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.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"pages": "1-2",
"name": "result.pdf"
}
More example Requests/Responses:
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.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"pages": "1-2",
"name": "result.pdf"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/d15e5b2c89c04484ae6ac7244ac43ac2/result.pdf",
"pageCount": 2,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 60100
}
Status Code: 200
PDF filler for fillable PDF forms using PDF.co. To get a list of all fillable fields inside specific 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.
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"
}
]
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 String
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
and success
). 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:
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": [
]
}
{
"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
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 as x;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.
where 24
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 styleFor 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 as x;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 format page;fieldName;value
. Sample: 0;editbox1;text is here
. To fill checkbox, use true
, 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 String
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
and success
). 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:
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"
}
{
"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
Get information about fillable fields inside PDF form file.
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:
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"
}
{
"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
Get detailed information about PDF document, its properties and security permissions.
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:
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. |
{
"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
Merge PDF from two or more PDF files into a new one.
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.
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
and success
). Must be one of: true
, false
.
name
optional. name of the output file.
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/merge
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-merge/sample1.pdf,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample2.pdf"
}
More example Requests/Responses:
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-merge/sample1.pdf,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-merge/sample2.pdf | optional. URL of the source PDF file. Must be a String. |
name | result.pdf | optional. File name for generated output. Must be a String. |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/result.pdf",
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 98465
}
Status Code: 200
Optimize PDF document to reduce its 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.name
optional. File name for generated output. Must be a String.password
optional. Password of PDF file. Must be a String.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
and success
). 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: POST params, JSON or FORMDATA
URL: https://api.pdf.co/v1/pdf/optimize
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-optimize/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 | result.pdf | optional. File name for generated output. Must be a String. |
password | optional. Password of PDF file. Must be a String. |
More example Requests/Responses:
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-optimize/sample.pdf",
"name": "result.pdf",
"password": ""
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/c3bde960dcc54bcebc14a72ab1521fa9/result-compressed.pdf",
"fileSize": 798621,
"pageCount": 5,
"error": false,
"status": 200,
"name": "result-compressed.pdf",
"remainingCredits": 59877
}
Status Code: 200
Merge PDF from two or more PDF files into a new one.
url
required. URL to the source file. Must be a String. 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 (see Upload and Manage Files
section for more details on uploading files via API).ownerPassword
- The owner password will be required for document modification.userPassword
- The user password only allows to view and print the document.encryptionAlgorithm
- Encryption algorithm. Valid values: RC4_40bit
, RC4_128bit
, AES_128bit
, AES_256bit
.allowAccessibilitySupport
- Allow or prohibit content extraction for accessibility needs. true/false
allowAssemblyDocument
- Allow or prohibit assembling the document. true/false
allowPrintDocument
- Allow or prohibit printing PDF document. true/false
allowFillForms
- Allow or prohibit filling of interactive form fields (including signature fields) in PDF document. true/false
allowModifyDocument
- Allow or prohibit modification of PDF document. true/false
allowContentExtraction
- Allow or prohibit copying content from PDF document. true/false
allowModifyAnnotations
- Allow or prohibit interacting with text annotations and forms in PDF document. true/false
printQuality
- Allowed printing quality. Valid values: HighResolution
, LowResolution
.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
and success
). Must be one of: true
, false
.name
optional. name of the output file.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/security/add
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-merge/sample1.pdf",
"ownerPassword": "12345",
"userPassword": "54321",
"EncryptionAlgorithm": "AES_128bit",
"AllowAccessibilitySupport": true,
"AllowAssemblyDocument": false,
"AllowPrintDocument": false,
"AllowFillForms": false,
"AllowModifyDocument": false,
"AllowContentExtraction": false,
"AllowModifyAnnotations": false,
"PrintQuality": "LowResolution",
"encrypt": false,
"async": false
}
url
required. URL to the source file. Must be a String. 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 (see Upload and Manage Files
section for more details on uploading files via API).
password
- The owner/user password to open file and to remove security features.
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
and success
). Must be one of: true
, false
.
name
optional. name of the output file.
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/security/remove
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-security/ProtectedPDFFile.pdf",
"password": "admin@123",
"name": "unprotected"
}
Search text in PDF and get coordinates. Supports regular expressions.
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 set regexSearch
param to true
.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.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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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": ""
}
{
"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
Search text in PDF and remove found text from PDF.
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 to false
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 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.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
and success
). 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.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"name": "pdfWithTextDeleted",
"caseSensitive": "false",
"searchStrings": [
"conspicuous feature"
]
}
More example Requests/Responses:
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"
]
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/c4367f7cf8794f12b4e8899d8101fced/pdfWithTextDeleted.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "pdfWithTextDeleted",
"remainingCredits": 59914
}
Status Code: 200
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 to false
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 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.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
and success
). 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.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"name": "pdfWithTextDeleted",
"caseSensitive": "false",
"searchString": "conspicuous feature"
}
More example Requests/Responses:
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"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/9c674faed1d9444a8912bfb4695c2754/pdfWithTextDeleted.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "pdfWithTextDeleted",
"remainingCredits": 59902
}
Status Code: 200
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"
}
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 to false
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 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.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
and success
). 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.amazonaws.com/files/demo-files/cloud-api/pdf-split/sample.pdf",
"searchStrings": [
"conspicuous feature",
"Martian"
],
"replaceStrings": [
"Replaced1",
"Replaced2"
],
"caseSensitive": true,
"pages": "",
"password":"",
"name": "finalFile"
}
More example Requests/Responses:
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"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/5e02856782ea4f90b0c47c052565ae01/finalFile.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "finalFile",
"remainingCredits": 98298
}
Status Code: 200
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 to false
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 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.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
and success
). 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.amazonaws.com/files/demo-files/cloud-api/pdf-split/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 | 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 |
More example Requests/Responses:
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 |
{
"url": "https://pdf-temp-files.s3.amazonaws.com/1a0e9a51e2d04fe4bcce0a6a31c365a8/finalFile.pdf",
"pageCount": 4,
"error": false,
"status": 200,
"name": "finalFile",
"remainingCredits": 98310
}
Status Code: 200
Search and replace text in PDF.
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 to false
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 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.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
and success
). 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.amazonaws.com/files/demo-files/cloud-api/pdf-split/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 | Hypothesis | 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/image-to-pdf/image1.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:
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"
}
{
"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
Split PDF into multiple PDF files.
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
Define comma-separated indices of pages (or ranges) that you want to split from the document. The first page indice is always 1
. For example, if you have a 7 page document that you want split into 3 separate PDFs but different number of pages it would go like this: 1, 2, 3-
or 1, 2, 3-7
which will result in 1 PDF with page one, 1 PDF with page two and one PDF with the rest of the pages. You can also use inverted page numbers adding ‘!’ before the number. E.g. “!1” means “the last page”, “2-!2” means “from the second to the penultimate page”, “!2-” - last two pages". Also, you can use a single asterisk ("*") character as the range to split the document into separate pages. SPECIAL CASES: You can use a single asterisk *
symbol to split the document into separate pages. Parameter 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
and success
). Must be one of: true
, false
.name
optional. name of the output file.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/split
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",
"pages": "1-2,3-",
"name": "result.pdf"
}
More example Requests/Responses:
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 | result.pdf | optional. File name for generated output. Must be a String. |
pages | 1-2,3- | Define comma-separated indices of pages (or ranges) that you want to split from the document. The first page indice is always 1 . For example, if you have a 7 page document that you want split into 3 separate PDFs but different number of pages it would go like this: 1, 2, 3- or 1, 2, 3-7 which will result in 1 PDF with page one, 1 PDF with page two and one PDF with the rest of the pages. Must be a String. |
{
"urls": [
"https://pdf-temp-files.s3.amazonaws.com/1e9a7f2c46834160903276716424382b/result_page1-2.pdf",
"https://pdf-temp-files.s3.amazonaws.com/c976b9f89a2e460786a3d5c0deeeef67/result_page3-4.pdf"
],
"pageCount": 4,
"error": false,
"status": 200,
"name": "result.pdf",
"remainingCredits": 98441
}
Status Code: 200
Convert PDF and scanned images into CSV representation with layout, columns, rows, tables.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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": ""
}
Convert PDF and scanned images into JSON representation with text, fonts, images, vectors, formatting preserved.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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/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
}
More example Requests/Responses:
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
}
{
"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
Convert PDF and scanned images to Text with layout preserved.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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
}
{
"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
Convert PDF and scanned images to spreadsheet with layout and fonts preserved.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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"
}
{
"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
Convert PDF to spreadsheet with layout and fonts preserved.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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"
}
{
"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
Convert PDF to XML with information about text value, tables, fonts, images, objects positions.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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
}
{
"body": "\r\n\r\n \r\n \r\n \r\n Your Company Name\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Your Address\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n City, State Zip\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Invoice No. 123456\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Invoice Date 01/01/2016\r\n \r\n \r\n \r\n \r\n Client Name\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Address\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n City, State Zip\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Notes\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Item\r\n \r\n \r\n Quantity\r\n \r\n \r\n Price\r\n \r\n \r\n Total\r\n \r\n \r\n \r\n \r\n Item 1\r\n \r\n \r\n 1\r\n \r\n \r\n 40.00\r\n \r\n \r\n 40.00\r\n \r\n \r\n \r\n \r\n Item 2\r\n \r\n \r\n 2\r\n \r\n \r\n 30.00\r\n \r\n \r\n 60.00\r\n \r\n \r\n \r\n \r\n Item 3\r\n \r\n \r\n 3\r\n \r\n \r\n 20.00\r\n \r\n \r\n 60.00\r\n \r\n \r\n \r\n \r\n Item 4\r\n \r\n \r\n 4\r\n \r\n \r\n 10.00\r\n \r\n \r\n 40.00\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n TOTAL\r\n \r\n \r\n 200.00\r\n \r\n \r\n \r\n",
"pageCount": 1,
"error": false,
"status": 200,
"name": "sample.xml",
"remainingCredits": 60563
}
Status Code: 200
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"
}
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 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.|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
and success
). 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:
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. |
{
"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
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"
}
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 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.|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
and success
). 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:
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. |
{
"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
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
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:
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"
}
{
"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
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:
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"
}
{
"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
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 (see Upload and Manage Files
section for more details on uploading files via API).embedAttachments
optional. True
by default. Set to true
to automatically embeds all attachments from original input email MSG or EML fileas files into final output PDF. Set to false
if you don’t want to embed attachments so it will convert only the body of input email.convertAttachments
optional. true
by default. Set to false
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 to true
to run as async job in background (recommended for heavy documents).margins
optional. set to css style margins like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. 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:
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
}
{
"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
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>LEFT SUBHEADERRIGHT SUBHEADER</div>",
"footer": "<div>Page of .</div>"
}
Status Code: 0
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"
}
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 to true
to run as async job in background (recommended for heavy documents).
margins
optional. set to css style margins like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. Portrait
by default.
printBackground
optional. true
by default. Set to false
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 with ACME Company
if templateData
is set to {invoice: {company: \"ACME Company\"}}
.
templateData
optional. You can also use Handlebars & Mustache style html templates. Set templateData
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:
Page of .
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": ""Hello",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div>LEFT SUBHEADERRIGHT SUBHEADER</div>",
"footer": "<div>Page of .</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": "Hello World!",
"name": "result.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": "",
"async": false,
"encrypt": false
}
More example Requests/Responses:
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": "Hello World!",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "5px 5px 5px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "",
"footer": ""
}
{
"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
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": "Hello",
"async": false,
"encrypt": false,
"name": "result.pdf",
"margins": "40px 5px 40px 5px",
"paperSize": "Letter",
"orientation": "Portrait",
"printBackground": true,
"header": "<div>LEFT SUBHEADERRIGHT SUBHEADER</div>",
"footer": "<div>Page of .</div>"
}
Status Code: 0
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/.
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 like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. Portrait
by default.printBackground
optional. true
by default. Set to false
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 to true
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 set templateData
param to the escaped string (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/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:
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\"}"
}
{
"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
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 (see Upload and Manage Files
section for more details on uploading files via API).margins
optional. set to css style margins like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. Portrait
by default.printBackground
optional. true
by default. Set to false
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 to true
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
{
"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:
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 }"
}
{
"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
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 (see Upload and Manage Files
section for more details on uploading files via API).margins
optional. set to css style margins like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. Portrait
by default.printBackground
optional. true
by default. Set to false
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 to true
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
{
"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:
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 }"
}
{
"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
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 (see Upload and Manage Files
section for more details on uploading files via API).margins
optional. set to css style margins like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. Portrait
by default.printBackground
optional. true
by default. Set to false
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 to true
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
{
"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 }"
}
Description: Create PDF file from one or more JPG, PNG, TIF images. 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-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.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.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
and success
). Must be one of: true
, false
.name
optional. name of the output file.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/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-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image1.png,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg"
}
More example Requests/Responses:
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/image-to-pdf/image1.png,https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/image-to-pdf/image2.jpg"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/5ef3d4033e344ec091bbeb3cfd848633/image2.pdf",
"pageCount": 2,
"error": false,
"status": 200,
"name": "image2.pdf",
"remainingCredits": 59871
}
Status Code: 200
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 |
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 (see Upload and Manage Files
section for more details on uploading files via API).
async
optional. Set to true
to run as async job in background (recommended for heavy documents).
margins
optional. set to css style margins like 10 px
or 5px 5px 5px 5px
paperSize
optional. Can be Letter
, A4
, A5
, A6
or custom size like 200x200
orientation
optional. set to Portrait
or Landscape
. Portrait
by default.
printBackground
optional. true
by default. Set to false
to disbale printing of background.
templateData
optional. You can also use Handlebars & Mustache style html templates. Set templateData
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:
Page of .
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>LEFT SUBHEADERRIGHT SUBHEADER</div>",
"footer": "<div>Page of .</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/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
}
More example Requests/Responses:
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>LEFT SUBHEADERRIGHT SUBHEADER</div>",
"footer": "<div>Page of .</div>"
}
Status Code: 0
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
}
{
"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
Create PDF from XLS, XLSX or CSV spreadsheet.
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.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
and success
). Must be one of: true
, false
.worksheetIndex
optional. default worksheet index (zero by default).name
optional. name of the output file.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/xls/convert/to/pdf
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/other/Input.xls"
}
More example Requests/Responses:
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 |
---|---|---|
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/other/Input.xls | optional. URL of the XLS file. Must be a String. |
inline | true | optional. Must be one of: true , false . |
{
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/25533bda87b3465e8e8d489d6e23403b/Input.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGgaDHksDAqw%2FKcvC2zJ4iKBAXCElPxYDMJDksV4mvBcFV4LRCYlZyx933mtf4jvOXh7E4ajPzJB8KjRcdngotG97e1fKUnw2VFIfLV3Bnd47pIL%2F2QMZLBDy3N6ZAAA5Max2DU2QNTi3t5TpEy%2BTTpm1IX2sMtDT9IbKaCGfBfn%2B9fP4hvejyFgEVUGaQHibxgR5iiopvTyBTIo9tVd2zglZtZwYE09DybJipdUk7GW4q5ZKHLy7m87KNpLFFNh0%2BjvFQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHIIIV5B6J/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T140735Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=49b33fec607f3bf298d24876712a936ffc5de03d7b3e54b6c3b2f0755cbe9b18",
"pageCount": 1,
"error": false,
"status": 200,
"name": "Input.pdf",
"remainingCredits": 98467
}
Status Code: 200
Convert PDF and scanned images into HTML representation with text, fonts, images, vectors, formatting preserved.
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 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.
unwrap
optional. Unwrap lines into a single line within table cells when lineGrouping
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 is eng
. 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 or false
to return link to output file (default).
lineGrouping
optional. optional. Line grouping within table cells. Set to 1
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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
}
{
"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
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"
}
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 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.
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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"
}
{
"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
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"
}
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 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.
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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"
}
{
"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
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"
}
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 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.
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 Use JobId
that you may use with /job/check
to check state of the processing (possible states: working
, failed
, aborted
and success
). 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:
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. |
{
"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
Convert PDF and scanned images into text-searchable PDF.
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 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.password
optional. Password of PDF file. Must be a String.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
and success
). 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:
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": ""
}
{
"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
Convert XLS into CSV comma separated values file.
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.name
optional. File name for generated output. Must be a String.worksheetIndex
optional. index of worksheet to use.quotationSymbol
optional. Must be a String.separatorSymbol
optional. Must be a String.inline
optional. Set to true
to return resulted content in the response instead of link to results. Must be one of: true
, false
.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
and success
). 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/xls/convert/to/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/other/Input.xls"
}
More example Requests/Responses:
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/other/Input.xls"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/bd58508fdbaf41cb81309e2195276305/Input.csv",
"error": false,
"status": 200,
"name": "Input.csv",
"remainingCredits": 59856
}
Status Code: 200
Convert XLS, XLSX or CSV into 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.name
optional. File name for generated output. Must be a String.worksheetIndex
optional. index of worksheet to use.inline
optional. Set to true
to return resulted content in the response instead of link to results. Must be one of: true
, false
.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
and success
). 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/xls/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/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls"
}
More example Requests/Responses:
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/other/Input.xls"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/d30b0c85ee244123aa0c13094aa80d2c/Input.html",
"error": false,
"status": 200,
"name": "Input.html",
"remainingCredits": 59862
}
Status Code: 200
Convert XLS, XLSX or CSV into 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.name
optional. File name for generated output. Must be a String.worksheetIndex
optional. index of worksheet to use.inline
optional. Set to true
to return resulted content in the response instead of link to results. Must be one of: true
, false
.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
and success
). 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/xls/convert/to/json
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/other/Input.xls"
}
More example Requests/Responses:
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/other/Input.xls"
}
{
"url": "https://pdf-temp-files.s3.amazonaws.com/c4e7e487bf324c3b955f5aa7388e3e17/Input.json",
"error": false,
"status": 200,
"name": "Input.json",
"remainingCredits": 59859
}
Status Code: 200
Convert XLS, XLSX or CSV into Text file.
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.name
optional. File name for generated output. Must be a String.worksheetIndex
optional. index of worksheet to use.inline
optional. Set to true
to return resulted content in the response instead of link to results. Must be one of: true
, false
.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
and success
). 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/xls/convert/to/txt
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/other/Input.xls"
}
Convert XLS, XLSX or CSV into 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.name
optional. File name for generated output. Must be a String.worksheetIndex
optional. index of worksheet to use.inline
optional. Set to true
to return resulted content in the response instead of link to results. Must be one of: true
, false
.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
and success
). 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/xls/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/ |
Content-Type | application/json |
Body:
{
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/other/Input.xls"
}
More example Requests/Responses:
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 |
---|---|---|
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/other/Input.xls | optional. URL of the source XLS file. Must be a String. |
inline | true | optional. Must be one of: true , false . |
{
"url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/18009bcb2d414cb794fa41032cbd7d0b/Input.json?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEGcaDPYo6i5PK8497%2BllZiKBAYbQsgUq76LLLL265cy6QB5rJhrQEQBVlw2XdYpfNuBogitkFJE7ZdUKvIuP4h3%2BxJ861WpOUhheZSE5P4GpCoac6gUYJB5Qv8IEXBIDNjevMwI4ZYaHjUIqhRSjenDuMDCd406CXFDlqKrJM%2BzYmWnL%2FC2YNyN0CVr6snsvnaS7ySiFovTyBTIoG8X6teTW6Niw6yZIjR2QfkLQ20P720ku%2BsZwtImqLuxxxyzUJwLdBQ%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHFZBBM6NT/20200302/us-west-2/s3/aws4_request&X-Amz-Date=20200302T135827Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=59606ca78a0de19115f3981b3bef3e8ca12649fa0612e90171bb0edc4c63f909",
"error": false,
"status": 200,
"name": "Input.json",
"remainingCredits": 98516
}
Status Code: 200