PDF.co
App · File Conversion · 35 actions
Convert, create, edit and read PDFs with PDF.co: turn PDFs into text, CSV, JSON, Excel or images and make PDFs from HTML, web pages and Office files; merge, split, compress, watermark, fill forms, replace text and add passwords; and pull data out with barcode reading, Document Parser templates and the AI invoice parser.
Actions
| Action | What it does |
|---|---|
| Add an image to a PDF | Place an image, such as a logo, stamp or signature, on a PDF's pages at a chosen position and size. |
| Add text watermark | Stamp a line of text, such as DRAFT or CONFIDENTIAL, on every page of a PDF (or the pages you choose) at a chosen position, size and color. |
| Combine files into one PDF | Combine PDFs, Word documents, spreadsheets, images and ZIP files of them into a single PDF, in the order given. |
| Compress a PDF | Make a PDF smaller by shrinking its images and fonts, for example to fit an email attachment limit. |
| Convert a document to PDF | Turn a Word document (DOC or DOCX), PowerPoint (PPT or PPTX), RTF, TXT or XPS file into a PDF. |
| Convert a spreadsheet to PDF | Turn an Excel spreadsheet (XLS or XLSX) or a CSV file into a PDF. |
| Convert a web page to PDF | Save any public web page as a PDF, the way a browser prints it, with a chosen page size, orientation, margins, header and footer. |
| Convert HTML to PDF | Turn HTML into a PDF, such as an invoice or report built in an earlier step, with a chosen page size, orientation, margins, header and footer. |
| Convert images to PDF | Put JPG, PNG or TIFF images into one PDF, one image per page, in the order given: for example photos of receipts. |
| Convert PDF to CSV | Turn the tables in a PDF or scanned image into CSV: the rows come back as text for a later step, and as a saved .csv file to attach or upload. |
| Convert PDF to Excel | Turn the tables in a PDF or scanned image into an Excel spreadsheet, keeping the columns, rows and fonts. |
| Convert PDF to HTML | Turn a PDF or scanned image into a web page that keeps its text, fonts and layout. |
| Convert PDF to images | Turn each page of a PDF into an image, for previews, thumbnails or posting a page somewhere that does not take PDFs. |
| Convert PDF to JSON | Turn a PDF or scanned image into structured JSON: every page with its text, tables and their positions, for a later step to pick values out of. |
| Convert PDF to text | Read the text out of a PDF or a scanned image, ready for a later step to search, summarize or store. |
| Delete pages from a PDF | Remove pages from a PDF, such as a cover sheet or blank pages, and keep the rest. |
| Fill a PDF form | Fill in the fields of a fillable PDF form, such as a tax or application form, by field name. |
| Find text in a PDF | Search a PDF or scanned image for text and get every match with its page and position, for example to check a document mentions a name before sending it on. |
| Generate a barcode | Make a QR code or barcode image (PNG) holding a value such as a link, an order number or a product code, optionally with your logo in the middle of a QR code. |
| Get credit balance | Get how many PDF.co credits the account has left, for example to send a warning before they run out. |
| Get PDF info | Read a PDF's details: page count and size, title, author and dates, and whether it is encrypted and what it allows. |
| List document parser templates | List the Document Parser templates on the account, both your own and the ones PDF.co provides, with the ID needed to parse a document. |
| Make a PDF searchable | Run OCR on a scanned PDF or image and add an invisible text layer, so its text can be searched, selected and copied. |
| Merge PDFs | Combine two or more PDFs into one, in the order given. |
| Parse an invoice with AI | Read any invoice, whatever its layout, with PDF.co's AI: the vendor, customer, invoice number and dates, totals, payment details and line items, with no template to set up. |
| Parse document | Pull the fields and tables out of a PDF or image using one of your PDF.co Document Parser templates: for example the invoice number, due date, and line items on an invoice. |
| Password protect a PDF | Encrypt a PDF with a password, and choose whether people can print, copy, edit, comment on or fill in the protected file. |
| Read barcodes | Scan a PDF or image for barcodes and QR codes and read their values, with the page and position of each. |
| Read form fields | List the fillable fields in a PDF form with each one's name, type, current value and position: the names Fill a PDF form needs. |
| Remove a PDF's password | Remove the password and restrictions from a protected PDF, given its password, so later steps can read and change it. |
| Remove text from a PDF | Find text in a PDF and remove it from the page, such as account numbers or names before sharing a document. |
| Replace text in a PDF | Find text in a PDF and put other text in its place, such as filling [CLIENT-NAME] in a contract template with a real name. |
| Rotate pages | Turn some or all of a PDF's pages clockwise by 90, 180 or 270 degrees. |
| Split PDF by page ranges | Split a PDF into several files, one for each page range you give, for example one file per chapter or per invoice. |
| Split PDF by text | Split a PDF into several files wherever a page contains some text or a barcode, for example at every page that says 'Invoice No.' in a batch of scanned invoices. |
Add an image to a PDF
Place an image, such as a logo, stamp or signature, on a PDF's pages at a chosen position and size.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Image
image_urltextRequired - The image to place, PNG or JPG: upload one, pick a file from an earlier step, or paste a public link to it.
- Horizontal position (X)
xnumberRequired - How far from the left edge to place the image, in points (72 points is an inch).From 0 to 100000.
- Vertical position (Y)
ynumberRequired - How far from the top edge to place the image, in points.From 0 to 100000.
- Width
widthnumber - The image's width, in points. Leave blank to keep its own size; give only one of width and height to keep its shape.From 1 to 100000.
- Height
heightnumber - The image's height, in points.From 1 to 100000.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "signed.pdf",
"size_bytes": 92160,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "signed.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 92160,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/signed.pdf"
}Add text watermark
Stamp a line of text, such as DRAFT or CONFIDENTIAL, on every page of a PDF (or the pages you choose) at a chosen position, size and color.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Text
texttextRequired - The text to stamp on the pages.
- Horizontal position (X)
xnumber - How far from the left edge to place the text, in points (72 points is an inch). Leave blank for 50.From 0 to 100000.
- Vertical position (Y)
ynumber - How far from the top edge to place the text, in points. Leave blank for 50.From 0 to 100000.
- Font size
font_sizenumber - The size of the text, in points.From 1 to 500. Default:
14. - Color
colortext - A color name such as Red, or a hex color such as #FF0000. Put two more digits first for transparency: #80FF0000 is half transparent red. Leave blank for black.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the watermarked PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The watermarked PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved watermarked PDF, in the shape steps that send or upload files expect.
filenametext- Name of the watermarked PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the watermarked PDF in bytes.
urltext- PDF.co's link to the watermarked PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "watermarked.pdf",
"size_bytes": 86016,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "watermarked.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 86016,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/watermarked.pdf"
}Combine files into one PDF
Combine PDFs, Word documents, spreadsheets, images and ZIP files of them into a single PDF, in the order given. Costs more credits than Merge PDFs, so use that when every file is already a PDF.
Inputs
- Files
fileslistRequired - The files to combine, in order (at least two): uploads, files from earlier steps, or public links. Paste several links separated by commas.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the combined PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The combined PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved combined PDF, in the shape steps that send or upload files expect.
file_countnumber- How many files were combined.
filenametext- Name of the combined PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the combined PDF in bytes.
urltext- PDF.co's link to the combined PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "combined.pdf",
"size_bytes": 307200,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"file_count": 3,
"filename": "combined.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 307200,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/combined.pdf"
}Compress a PDF
Make a PDF smaller by shrinking its images and fonts, for example to fit an email attachment limit.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- How much to compress
compression_leveltext - Stronger compression makes a smaller file with softer images.One of:
low(Low (best quality)),medium(Medium (recommended)),high,aggressive(Aggressive (smallest file)). Default:medium. - PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the compressed PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The compressed PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved compressed PDF, in the shape steps that send or upload files expect.
filenametext- Name of the compressed PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the compressed PDF in bytes.
urltext- PDF.co's link to the compressed PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "compressed.pdf",
"size_bytes": 24576,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "compressed.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 24576,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/compressed.pdf"
}Convert a document to PDF
Turn a Word document (DOC or DOCX), PowerPoint (PPT or PPTX), RTF, TXT or XPS file into a PDF.
Inputs
- Document
source_urltextRequired - The document: upload one, pick a file from an earlier step, or paste a public link to it.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "proposal.pdf",
"size_bytes": 65536,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "proposal.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 65536,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/proposal.pdf"
}Convert a spreadsheet to PDF
Turn an Excel spreadsheet (XLS or XLSX) or a CSV file into a PDF.
Inputs
- Spreadsheet
source_urltextRequired - The spreadsheet or CSV file: upload one, pick a file from an earlier step, or paste a public link to it.
- Fit pages to the content
autosizetrue/false - For a CSV file, size each page to fit its content. An Excel file keeps its worksheets' own page setup.Default:
false. - File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "report.pdf",
"size_bytes": 45056,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "report.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 45056,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/report.pdf"
}Convert a web page to PDF
Save any public web page as a PDF, the way a browser prints it, with a chosen page size, orientation, margins, header and footer.
Inputs
- Web page address
page_urltextRequired - The address of the page, starting with https://.
- Paper size
paper_sizetext - The page size, such as Letter, Legal, A4 or A3, or a width and height such as 200mm 300mm. Leave blank for A4.
- Orientation
orientationtext - Whether the pages are upright or sideways.One of:
Portrait,Landscape. Default:Portrait. - Margins
marginstext - Page margins, overriding the page's own: one value for every side, or top, right, bottom and left separated by spaces, in px, mm, cm or in.
- Print backgrounds
print_backgroundtrue/false - Include background colors and images, as a browser does on screen.Default:
true. - Header
headertext - HTML to put at the top of every page, for example a title or a page number.
- Footer
footertext - HTML to put at the bottom of every page.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "example.pdf",
"size_bytes": 102400,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "example.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 102400,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/example.pdf"
}Convert HTML to PDF
Turn HTML into a PDF, such as an invoice or report built in an earlier step, with a chosen page size, orientation, margins, header and footer.
Inputs
- HTML
htmltextRequired - The HTML to turn into a PDF, styles included.
- File name
nametext - The name to give the PDF. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
- Paper size
paper_sizetext - The page size, such as Letter, Legal, A4 or A3, or a width and height such as 200mm 300mm. Leave blank for A4.
- Orientation
orientationtext - Whether the pages are upright or sideways.One of:
Portrait,Landscape. Default:Portrait. - Margins
marginstext - Page margins, overriding the page's own: one value for every side, or top, right, bottom and left separated by spaces, in px, mm, cm or in.
- Print backgrounds
print_backgroundtrue/false - Include background colors and images, as a browser does on screen.Default:
true. - Header
headertext - HTML to put at the top of every page, for example a title or a page number.
- Footer
footertext - HTML to put at the bottom of every page.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
nametext- Name of the PDF, the same as filename.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "invoice.pdf",
"size_bytes": 84213,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "invoice.pdf",
"name": "invoice.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 84213,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/invoice.pdf"
}Convert images to PDF
Put JPG, PNG or TIFF images into one PDF, one image per page, in the order given: for example photos of receipts.
Inputs
- Images
imageslistRequired - The images, in page order: uploads, files from earlier steps, or public links. Paste several links separated by commas.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
image_countnumber- How many images went into the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "images.pdf",
"size_bytes": 204800,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "images.pdf",
"image_count": 2,
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 204800,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/images.pdf"
}Convert PDF to CSV
Turn the tables in a PDF or scanned image into CSV: the rows come back as text for a later step, and as a saved .csv file to attach or upload.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the CSV file. The .csv extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the CSV file.
credits_usednumber- PDF.co credits this step used.
csvtext- The CSV itself, as text.
csv_urltext- PDF.co's link to the CSV file. It works for one hour; use document_ref for the copy saved in Lodol.
document_reftext- The CSV file saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved CSV file, in the shape steps that send or upload files expect.
filenametext- Name of the CSV file.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the CSV file in bytes.
Example output
{
"content_type": "text/csv",
"credits_used": 42,
"csv": "\"Item\",\"Quantity\",\"Price\",\"Total\"\r\n\"Item 1\",\"1\",\"40.00\",\"40.00\"\r\n\"Item 2\",\"2\",\"30.00\",\"60.00\"\r\n",
"csv_url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/7588d614c9ad41eb98ec317a02abda63/result.csv",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "text/csv",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "result.csv",
"size_bytes": 95,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "result.csv",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 95
}Convert PDF to Excel
Turn the tables in a PDF or scanned image into an Excel spreadsheet, keeping the columns, rows and fonts.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Excel format
formattext - XLSX opens in any current spreadsheet app. XLS is the older format, for software that needs it.One of:
xlsx(XLSX (recommended)),xls(XLS (Excel 97 to 2003)). Default:xlsx. - Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the spreadsheet. The .xlsx or .xls extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the spreadsheet.
credits_usednumber- PDF.co credits this step used.
document_reftext- The spreadsheet saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved spreadsheet, in the shape steps that send or upload files expect.
filenametext- Name of the spreadsheet.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the spreadsheet in bytes.
urltext- PDF.co's link to the spreadsheet. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "result.xlsx",
"size_bytes": 9216,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "result.xlsx",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 9216,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/result.xlsx"
}Convert PDF to HTML
Turn a PDF or scanned image into a web page that keeps its text, fonts and layout. The HTML comes back as text and as a saved .html file.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the HTML file. The .html extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the HTML file.
credits_usednumber- PDF.co credits this step used.
document_reftext- The HTML file saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved HTML file, in the shape steps that send or upload files expect.
filenametext- Name of the HTML file.
htmltext- The HTML itself, as text.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the HTML file in bytes.
urltext- PDF.co's link to the HTML file. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "text/html",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "text/html",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "result.html",
"size_bytes": 2048,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "result.html",
"html": "<html><body><p>Invoice No. 123456</p></body></html>",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 2048,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/result.html"
}Convert PDF to images
Turn each page of a PDF into an image, for previews, thumbnails or posting a page somewhere that does not take PDFs. Every image is saved.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Image format
formattext - PNG is sharp and lossless; JPG is smaller; WEBP is smaller still; TIFF is for print and archiving.One of:
png,jpg,webp,tiff. Default:png. - Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
credits_usednumber- PDF.co credits this step used.
documentslist- The page images saved in Lodol, in order, in the shape steps that send or upload files expect.
formattext- The image format: png, jpg, webp or tiff.
image_countnumber- How many images were made, one per page.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
urlslist- PDF.co's links to the page images, in order. They work for one hour; use documents for the copies saved in Lodol.
Example output
{
"credits_used": 42,
"documents": [
{
"content_type": "image/png",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "sample-page1.png",
"size_bytes": 20480,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
},
{
"content_type": "image/png",
"document_ref": "doc_9a160154e2f437f9b6b19d63b1f59e30",
"filename": "sample-page2.png",
"size_bytes": 20481,
"url": "/actions/core/serve-document/doc_9a160154e2f437f9b6b19d63b1f59e30?teamId=6512a1b2c3d4e5f600000001"
}
],
"format": "png",
"image_count": 2,
"page_count": 2,
"remaining_credits": 98722216,
"urls": [
"https://pdf-temp-files.s3.us-west-2.amazonaws.com/1e9a7f2c46834160903276716424382b/sample-page1.png",
"https://pdf-temp-files.s3.us-west-2.amazonaws.com/1e9a7f2c46834160903276716424382b/sample-page2.png"
]
}Convert PDF to JSON
Turn a PDF or scanned image into structured JSON: every page with its text, tables and their positions, for a later step to pick values out of.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
credits_usednumber- PDF.co credits this step used.
dataobject- The document as PDF.co structures it: document.page holds each page with its rows and text.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
Example output
{
"credits_used": 42,
"data": {
"document": {
"page": {
"index": "0",
"row": [
{
"column": [
{
"text": "Invoice No. 123456"
}
]
}
]
},
"pageCount": "1"
}
},
"page_count": 2,
"remaining_credits": 98722216
}Convert PDF to text
Read the text out of a PDF or a scanned image, ready for a later step to search, summarize or store. OCR reads scans and keeps the layout; the text layer alone is faster and cheaper for PDFs made on a computer.
Inputs
- PDF or image
source_urltextRequired - The PDF or image: upload one, pick a file from an earlier step, or paste a public link to it.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- How to read it
modetext - OCR reads scanned pages and keeps columns and tables lined up, at 21 credits a page. The text layer alone costs 4 credits a page but finds nothing on a scan.One of:
ocr(OCR, reads scans too (recommended)),simple(Text layer only (cheaper)). Default:ocr. - OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
credits_usednumber- PDF.co credits this step used.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
texttext- The text read from the PDF.
Example output
{
"credits_used": 42,
"page_count": 2,
"remaining_credits": 98722216,
"text": "Your Company Name\r\nInvoice No. 123456\r\nInvoice Date 01/01/2016\r\nItem 1 1 40.00 40.00\r\nTOTAL 200.00\r\n"
}Delete pages from a PDF
Remove pages from a PDF, such as a cover sheet or blank pages, and keep the rest.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Pages
pagestextRequired - Which pages to delete, counting from 1: 1 is the first page, 2-3 the second and third, and 4- runs from the fourth page to the end. Separate several with commas.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "trimmed.pdf",
"size_bytes": 40960,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "trimmed.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 40960,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/trimmed.pdf"
}Fill a PDF form
Fill in the fields of a fillable PDF form, such as a tax or application form, by field name. Use Read form fields to find the names.
Inputs
- PDF form
source_urltextRequired - The PDF form: upload one, pick a file from an earlier step, or paste a public link to it.
- Field values
fieldsobjectRequired - Each field's name and the value to put in it. For a checkbox use true or false; for a list or radio button, the option's value.
- Lock the filled form
flattentrue/false - Turn the filled fields into plain page content, so the form can no longer be edited.Default:
false. - PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the filled PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The filled PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved filled PDF, in the shape steps that send or upload files expect.
filenametext- Name of the filled PDF.
filled_countnumber- How many fields were filled in.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the filled PDF in bytes.
urltext- PDF.co's link to the filled PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "f1040-filled.pdf",
"size_bytes": 312320,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "f1040-filled.pdf",
"filled_count": 3,
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 312320,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/f1040-filled.pdf"
}Find text in a PDF
Search a PDF or scanned image for text and get every match with its page and position, for example to check a document mentions a name before sending it on.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Text to find
search_texttextRequired - The text to look for.
- Treat as a regular expression
regextrue/false - Match the text as a regular expression, for example Invoice No\. \d+ to find every invoice number.Default:
false. - How words match
match_modetext - Smart match finds the words even next to punctuation. Whole words only skips matches inside longer words. Anywhere matches the exact characters, even mid word.One of:
SmartMatch(Smart match (recommended)),ExactMatch(Whole words only),None(Anywhere). Default:SmartMatch. - Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
credits_usednumber- PDF.co credits this step used.
match_countnumber- How many matches were found.
matcheslist- Every match, in page order.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
Example output
{
"credits_used": 42,
"match_count": 1,
"matches": [
{
"height": 11.04,
"left": 436.54,
"page_index": 0,
"text": "Invoice Date 01/01/2016",
"top": 130.46,
"width": 122.85
}
],
"page_count": 2,
"remaining_credits": 98722216
}Generate a barcode
Make a QR code or barcode image (PNG) holding a value such as a link, an order number or a product code, optionally with your logo in the middle of a QR code.
Inputs
- Value
valuetextRequired - What the barcode holds, such as a link or a code.
- Barcode type
barcode_typetext - The kind of barcode, such as QRCode, Code128, DataMatrix, EAN13, UPCA or PDF417. Leave blank for a QR code. See https://docs.pdf.co/api-reference/barcode/overview for all 46.
- Logo
decoration_imagetext - An image to put in the middle of a QR code, such as your logo: upload one, pick a file from an earlier step, or paste a public link. QR codes only.
- File name
output_nametext - The name to give the image. The .png extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
barcode_typetext- The kind of barcode that was made.
content_typetext- MIME type of the barcode image.
credits_usednumber- PDF.co credits this step used.
document_reftext- The barcode image saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved barcode image, in the shape steps that send or upload files expect.
filenametext- Name of the barcode image.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the barcode image in bytes.
urltext- PDF.co's link to the barcode image. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"barcode_type": "QRCode",
"content_type": "image/png",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "image/png",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "barcode.png",
"size_bytes": 1830,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "barcode.png",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 1830,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/barcode.png"
}Get credit balance
Get how many PDF.co credits the account has left, for example to send a warning before they run out.
Inputs
None.
Outputs
remaining_creditsnumber- PDF.co credits left on the account.
Example output
{
"remaining_credits": 99795868
}Get PDF info
Read a PDF's details: page count and size, title, author and dates, and whether it is encrypted and what it allows.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
authortext- The PDF's author, if it says.
createdtext- When the PDF was created, as PDF.co reports it.
creatortext- The app the document was made in.
credits_usednumber- PDF.co credits this step used.
encryptedtrue/false- Whether the PDF is encrypted.
infoobject- Everything PDF.co reported, as it sent it.
keywordstext- The PDF's keywords, if it has any.
modifiedtext- When the PDF was last changed.
page_countnumber- How many pages the PDF has.
page_heightnumber- The first page's height, in points.
page_widthnumber- The first page's width, in points.
permissionsobject- What the PDF's security settings allow.
producertext- The app that made the PDF.
remaining_creditsnumber- PDF.co credits left on the account.
subjecttext- The PDF's subject, if it has one.
titletext- The PDF's title, if it has one.
Example output
{
"author": "Alice V. Knox",
"created": "8/15/2001 2:50:36 PM",
"creator": "Adobe PageMaker 6.52",
"credits_used": 7,
"encrypted": false,
"info": {
"Encrypted": false,
"PageCount": 1,
"Title": "Kid's News 1"
},
"keywords": "",
"modified": "9/20/2001 6:23:02 PM",
"page_count": 1,
"page_height": 792.0,
"page_width": 612.0,
"permissions": {
"commenting": true,
"copying": true,
"editing": true,
"form_filling": true,
"printing": true
},
"producer": "Acrobat Distiller 4.0 for Windows",
"remaining_credits": 77732,
"subject": "Kid's News 1",
"title": "Kid's News 1"
}List document parser templates
List the Document Parser templates on the account, both your own and the ones PDF.co provides, with the ID needed to parse a document.
Inputs
None.
Outputs
remaining_creditsnumber- PDF.co credits left on the account.
template_countnumber- How many templates were returned.
templateslist- The templates available on the account.
Example output
{
"remaining_credits": 94229,
"template_count": 2,
"templates": [
{
"description": "Parses invoices and extracts invoice number, company name, due date, amount, tax",
"id": "1",
"title": "Invoice Parser",
"type": "system"
},
{
"description": "Untitled",
"id": "40",
"title": "Untitled",
"type": "user"
}
]
}Make a PDF searchable
Run OCR on a scanned PDF or image and add an invisible text layer, so its text can be searched, selected and copied.
Inputs
- PDF or image
source_urltextRequired - The PDF or image: upload one, pick a file from an earlier step, or paste a public link to it.
- OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the searchable PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The searchable PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved searchable PDF, in the shape steps that send or upload files expect.
filenametext- Name of the searchable PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the searchable PDF in bytes.
urltext- PDF.co's link to the searchable PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "searchable.pdf",
"size_bytes": 133120,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "searchable.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 133120,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/searchable.pdf"
}Merge PDFs
Combine two or more PDFs into one, in the order given. To include Word documents, spreadsheets or images, use Combine files into one PDF.
Inputs
- PDFs
file_urlslistRequired - The PDFs to merge, in order (at least two): uploads, files from earlier steps, or public links. Paste several links separated by commas.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the merged PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The merged PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved merged PDF, in the shape steps that send or upload files expect.
file_countnumber- How many PDFs were merged.
filenametext- Name of the merged PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the merged PDF in bytes.
urltext- PDF.co's link to the merged PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "merged.pdf",
"size_bytes": 153600,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"file_count": 2,
"filename": "merged.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 153600,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/merged.pdf"
}Parse an invoice with AI
Read any invoice, whatever its layout, with PDF.co's AI: the vendor, customer, invoice number and dates, totals, payment details and line items, with no template to set up. Costs 100 credits a page and can take up to a few minutes.
Inputs
- Invoice
source_urltextRequired - The invoice, as a PDF or image: upload one, pick a file from an earlier step, or paste a public link to it. One invoice per file.
- Extra fields
custom_fieldslist - More values to read beyond the standard ones, named in camelCase, such as storeNumber or deliveryDate. They come back under others.
- Line item columns
line_item_fieldsobject - The columns every line item should have, each named in camelCase with the type string or number, such as description: string and unitPrice: number. Leave blank to take whatever columns the invoice has.
Outputs
credits_usednumber- PDF.co credits this step used.
customerobject- Who it is for: billTo and shipTo, each with a name and address.
invoiceobject- The invoice's own details: invoiceNo, invoiceDate, poNo, orderNo, paymentTerms and dueDate.
job_idtext- PDF.co's id for the parsing job.
line_item_countnumber- How many line items were read.
line_itemslist- The invoice's lines, each with the columns the invoice has (or the ones asked for).
othersobject- Anything else, such as notes and extra fields.
page_countnumber- How many pages PDF.co processed.
payment_detailsobject- The amounts and how to pay: total, subtotal, tax, discount, shipping and bankingInformation.
remaining_creditsnumber- PDF.co credits left on the account.
vendorobject- Who sent the invoice: name, address, contactInformation and entityId.
Example output
{
"credits_used": 100,
"customer": {
"billTo": {
"name": "Lanny Lane Ltd."
}
},
"invoice": {
"invoiceDate": "JAN 5, 2025",
"invoiceNo": "67893566"
},
"job_id": "7830deca-2e66-11ef-9ad3-8eff830e7461",
"line_item_count": 2,
"line_items": [
{
"description": "Item 1",
"quantity": "2",
"total": "19.90"
},
{
"description": "Item 2",
"quantity": "5",
"total": "100.00"
}
],
"others": {},
"page_count": 1,
"payment_details": {
"tax": "$10.00",
"total": "$1,272.35"
},
"remaining_credits": 106472,
"vendor": {
"address": {
"city": "Jacksonville"
},
"name": "ACME Inc."
}
}Parse document
Pull the fields and tables out of a PDF or image using one of your PDF.co Document Parser templates: for example the invoice number, due date, and line items on an invoice.
Inputs
- PDF or image
source_urltextRequired - The PDF or image: upload one, pick a file from an earlier step, or paste a public link to it.
- Template
template_idtextRequired - The Document Parser template that says which fields and tables to pull out. PDF.co provides built-in templates (such as Invoice Parser), and you can create your own at https://app.pdf.co/document-parser/templates.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
fieldsobject- Each field the template found, by name.
objectslist- The raw result from PDF.co, including each value's position on the page.
page_countnumber- Number of pages in the document.
remaining_creditsnumber- PDF.co credits left on the account.
tableslist- Every table the template found.
template_nametext- Name of the template used to read the document.
template_versiontext- Version of the template used to read the document.
Example output
{
"fields": {
"companyName": "Amazon Web Services, Inc",
"dateDue": "2018-04-03T00:00:00",
"invoiceId": "123456789",
"total": 6.58
},
"objects": [
{
"name": "invoiceId",
"objectType": "field",
"pageIndex": 0,
"rectangle": [
0,
0,
0,
0
],
"value": "123456789"
}
],
"page_count": 1,
"remaining_credits": 60803,
"tables": [
{
"name": "table",
"row_count": 1,
"rows": [
{
"amount": "5.57",
"description": "Data Transfer"
}
]
}
],
"template_name": "Generic Invoice [en]",
"template_version": "4"
}Password protect a PDF
Encrypt a PDF with a password, and choose whether people can print, copy, edit, comment on or fill in the protected file.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Owner password
owner_passwordtextRequired - The password that unlocks every permission and can remove the protection.
- Open password
user_passwordtext - A password needed just to open the PDF. Leave blank to let anyone open it, with the permissions below.
- Encryption
encryptiontext - How the PDF is encrypted. AES 256 bit is the strongest; RC4 is only for very old PDF readers.One of:
AES_128bit(AES 128 bit),AES_256bit(AES 256 bit (strongest)),RC4_128bit(RC4 128 bit),RC4_40bit(RC4 40 bit (weakest)). Default:AES_128bit. - Allow printing
allow_printingtrue/false - Let people print the PDF.Default:
true. - Allow copying
allow_copyingtrue/false - Let people copy text and images out of the PDF.Default:
true. - Allow editing
allow_editingtrue/false - Let people change the PDF's content.Default:
true. - Allow comments
allow_commentingtrue/false - Let people add and change comments and annotations.Default:
true. - Allow form filling
allow_form_fillingtrue/false - Let people fill in the PDF's form fields and sign it.Default:
true. - File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the protected PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The protected PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved protected PDF, in the shape steps that send or upload files expect.
filenametext- Name of the protected PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the protected PDF in bytes.
urltext- PDF.co's link to the protected PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "protected.pdf",
"size_bytes": 54272,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "protected.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 54272,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/protected.pdf"
}Read barcodes
Scan a PDF or image for barcodes and QR codes and read their values, with the page and position of each.
Inputs
- PDF or image
source_urltextRequired - The PDF or image: upload one, pick a file from an earlier step, or paste a public link to it.
- Barcode types
barcode_typeslistRequired - The kinds of barcode to look for; PDF.co needs to be told. Common ones are QRCode, Code128, Code39, EAN13, UPCA, PDF417 and DataMatrix. Give one per entry, or several separated by commas.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
Outputs
barcode_countnumber- How many barcodes were found.
barcodeslist- The barcodes found, as PDF.co reports them: Value, TypeName, Page (counting from 0), Rect and Confidence.
credits_usednumber- PDF.co credits this step used.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
Example output
{
"barcode_count": 1,
"barcodes": [
{
"Confidence": 1,
"Metadata": "",
"Page": 0,
"RawData": "",
"Rect": "{X=448,Y=23,Width=106,Height=112}",
"Type": 14,
"TypeName": "QRCode",
"Value": "abcdef123456"
}
],
"credits_used": 42,
"page_count": 2,
"remaining_credits": 98722216
}Read form fields
List the fillable fields in a PDF form with each one's name, type, current value and position: the names Fill a PDF form needs.
Inputs
- PDF form
source_urltextRequired - The PDF form: upload one, pick a file from an earlier step, or paste a public link to it.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
Outputs
credits_usednumber- PDF.co credits this step used.
field_countnumber- How many fields the form has.
fieldslist- The form's fields, in the order PDF.co lists them.
page_countnumber- How many pages the PDF has.
remaining_creditsnumber- PDF.co credits left on the account.
Example output
{
"credits_used": 8,
"field_count": 2,
"fields": [
{
"height": 14.0,
"left": 238.6,
"name": "topmostSubform[0].Page1[0].f1_02[0]",
"page": 1,
"top": 111.99,
"type": "EditBox",
"value": "",
"width": 228.39
},
{
"height": 8.0,
"left": 340.39,
"name": "topmostSubform[0].Page1[0].c1_01[1]",
"page": 1,
"top": 67.99,
"type": "CheckBox",
"value": "False",
"width": 8.0
}
],
"page_count": 3,
"remaining_credits": 59987
}Remove a PDF's password
Remove the password and restrictions from a protected PDF, given its password, so later steps can read and change it.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- PDF password
passwordtextRequired - The PDF's current password.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the unprotected PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The unprotected PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved unprotected PDF, in the shape steps that send or upload files expect.
filenametext- Name of the unprotected PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the unprotected PDF in bytes.
urltext- PDF.co's link to the unprotected PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "unprotected.pdf",
"size_bytes": 53248,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "unprotected.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 53248,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/unprotected.pdf"
}Remove text from a PDF
Find text in a PDF and remove it from the page, such as account numbers or names before sharing a document.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Text to remove
search_stringslistRequired - Each piece of text to remove, one per entry.
- Match capitals exactly
case_sensitivetrue/false - Only remove text with the same capitals.Default:
true. - Treat as regular expressions
regextrue/false - Match the texts as regular expressions, for example \d{4}-\d{4} for any two groups of four digits.Default:
false. - Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "redacted.pdf",
"size_bytes": 61440,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "redacted.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 61440,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/redacted.pdf"
}Replace text in a PDF
Find text in a PDF and put other text in its place, such as filling [CLIENT-NAME] in a contract template with a real name.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Replacements
replacementsobjectRequired - Each text to find, and what to put in its place.
- Match capitals exactly
case_sensitivetrue/false - Only replace text with the same capitals.Default:
true. - Treat as regular expressions
regextrue/false - Match the texts to find as regular expressions.Default:
false. - Replacements per text
replacement_limitnumber - The most times to replace each text. Leave blank or set 0 to replace every one.From 0 to 10000.
- Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- PDF password
passwordtext - The password that opens the PDF, if it has one.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "agreement.pdf",
"size_bytes": 71680,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "agreement.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 71680,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/agreement.pdf"
}Rotate pages
Turn some or all of a PDF's pages clockwise by 90, 180 or 270 degrees.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Turn by
angletext - How far to turn the pages, clockwise.One of:
90(90 degrees (a quarter turn)),180(180 degrees (upside down)),270(270 degrees (a quarter turn back)). Default:90. - Pages
pagestext - Which pages to use, counting from 0: 0 is the first page, 0-2 the first three, 3- runs from the fourth page to the end, and !0 is the last page. Separate several with commas. Leave blank for every page.
- File name
output_nametext - The name to give the PDF this step makes. The .pdf extension is added if you leave it off. Leave blank to let PDF.co name it.
Outputs
content_typetext- MIME type of the PDF.
credits_usednumber- PDF.co credits this step used.
document_reftext- The PDF saved in Lodol, for a later step to attach, upload or process. Empty when the file was too large to keep a copy of.
documentslist- The saved PDF, in the shape steps that send or upload files expect.
filenametext- Name of the PDF.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
size_bytesnumber- Size of the PDF in bytes.
urltext- PDF.co's link to the PDF. It works for one hour; use document_ref for the copy saved in Lodol.
Example output
{
"content_type": "application/pdf",
"credits_used": 42,
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "rotated.pdf",
"size_bytes": 51200,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
}
],
"filename": "rotated.pdf",
"page_count": 2,
"remaining_credits": 98722216,
"size_bytes": 51200,
"url": "https://pdf-temp-files.s3.us-west-2.amazonaws.com/3ec287356c0b4e02b5231354f94086f2/rotated.pdf"
}Split PDF by page ranges
Split a PDF into several files, one for each page range you give, for example one file per chapter or per invoice.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Page ranges
page_rangestextRequired - The page ranges to cut into files, counting from 1 and separated by commas: 1-2,3,4- makes one file of the first two pages, one of the third, and one of the rest. !1 is the last page, and * makes one file per page.
Outputs
credits_usednumber- PDF.co credits this step used.
documentslist- The split files saved in Lodol, in order, in the shape steps that send or upload files expect.
file_countnumber- How many files were made.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
urlslist- PDF.co's links to the split files, in order. They work for one hour; use documents for the copies saved in Lodol.
Example output
{
"credits_used": 42,
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "result_page1-2.pdf",
"size_bytes": 20480,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
},
{
"content_type": "application/pdf",
"document_ref": "doc_9a160154e2f437f9b6b19d63b1f59e30",
"filename": "result_page3-4.pdf",
"size_bytes": 20481,
"url": "/actions/core/serve-document/doc_9a160154e2f437f9b6b19d63b1f59e30?teamId=6512a1b2c3d4e5f600000001"
}
],
"file_count": 2,
"page_count": 2,
"remaining_credits": 98722216,
"urls": [
"https://pdf-temp-files.s3.us-west-2.amazonaws.com/1e9a7f2c46834160903276716424382b/result_page1-2.pdf",
"https://pdf-temp-files.s3.us-west-2.amazonaws.com/1e9a7f2c46834160903276716424382b/result_page3-4.pdf"
]
}Split PDF by text
Split a PDF into several files wherever a page contains some text or a barcode, for example at every page that says 'Invoice No.' in a batch of scanned invoices.
Inputs
- PDF
source_urltextRequired - The PDF: upload one, pick a file from an earlier step, or paste a public link to it.
- Split where a page has
search_texttextRequired - The text that starts a new file. A barcode works too, written the PDF.co way, such as [[barcode:qrcode /value/]].
- Treat as a regular expression
regextrue/false - Match the text as a regular expression instead of exactly.Default:
false. - Match capitals exactly
case_sensitivetrue/false - Only match the text with the same capitals.Default:
true. - Leave out the matching pages
exclude_key_pagestrue/false - Drop the pages the text was found on, for example separator sheets, instead of starting each file with one.Default:
false. - OCR language
ocr_languagetext - The language of scanned pages and images, as a PDF.co language code such as eng, deu or spa; join two with a plus, as in eng+deu. Leave blank for English.
Outputs
credits_usednumber- PDF.co credits this step used.
documentslist- The split files saved in Lodol, in order, in the shape steps that send or upload files expect.
file_countnumber- How many files were made.
page_countnumber- How many pages PDF.co processed.
remaining_creditsnumber- PDF.co credits left on the account.
urlslist- PDF.co's links to the split files, in order. They work for one hour; use documents for the copies saved in Lodol.
Example output
{
"credits_used": 42,
"documents": [
{
"content_type": "application/pdf",
"document_ref": "doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91",
"filename": "batch_page1.pdf",
"size_bytes": 20480,
"url": "/actions/core/serve-document/doc_4b7c1e2a9d3f45c88a1e6f0b2d5c7e91?teamId=6512a1b2c3d4e5f600000001"
},
{
"content_type": "application/pdf",
"document_ref": "doc_9a160154e2f437f9b6b19d63b1f59e30",
"filename": "batch_page3.pdf",
"size_bytes": 20481,
"url": "/actions/core/serve-document/doc_9a160154e2f437f9b6b19d63b1f59e30?teamId=6512a1b2c3d4e5f600000001"
}
],
"file_count": 2,
"page_count": 2,
"remaining_credits": 98722216,
"urls": [
"https://pdf-temp-files.s3.us-west-2.amazonaws.com/1e9a7f2c46834160903276716424382b/batch_page1.pdf",
"https://pdf-temp-files.s3.us-west-2.amazonaws.com/1e9a7f2c46834160903276716424382b/batch_page3.pdf"
]
}