The PDF.co connector lets your AI agent act in each user's PDF.co account. Each user connects their own PDF.co API key once, and Scalekit sends it with every call, so your agent never handles credentials. It comes with 39 tools.
- Tools
- 39
- What they doRead · write · destructive
- 5 · 34 · 05 read34 write0 destructive
- Users sign in with
- API key
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the PDF.co connection
In AgentKit > Connections, create a PDF.co connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Authorize a user and make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'import { createInterface } from 'node:readline/promises'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'pdfco'const identifier = 'user_123'// Generate an authorization link for the userconst { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })console.log('Authorize PDF.co:', link)const rl = createInterface({ input: process.stdin, output: process.stdout })await rl.question('Press Enter after authorizing...')rl.close()// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'pdfco_get_credit_balance',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "pdfco"identifier = "user_123"# Generate an authorization link for the userlink_response = actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)print("Authorize PDF.co:", link_response.link)input("Press Enter after authorizing...")# Make your first callresult = actions.execute_tool(tool_input={},tool_name="pdfco_get_credit_balance",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyEach user opens the link once and enters their PDF.co credentials there. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_toolpdfco_get_credit_balanceGet the number of PDF.co credits left on the account.Read-onlyGet Credit Balance
Get the number of PDF.co credits left on the account. Returns remainingCredits. Use pdfco_get_credit_balance before large jobs or when a call fails with HTTP 402 (not enough credits).
Inputs
This tool takes no inputs.
pdfco_get_document_parser_templateGet one Document Parser template by ID, including its full definition.Read-onlyGet Document Parser Template
Get one Document Parser template by ID, including its full definition. Returns id, type, title, description, created_at, updated_at and body (the template definition text). Use pdfco_get_document_parser_template to inspect or copy a template before calling pdfco_parse_document. Use pdfco_list_document_parser_templates to find IDs.
Inputs
template_idstringrequired- ID of the Document Parser template, from pdfco_list_document_parser_templates. Example: 1.
pdfco_get_presigned_upload_urlCreate a temporary presigned upload link for a local file; this tool does not upload anything.Read-onlyGet Presigned Upload URL
Create a temporary presigned upload link for a local file; this tool does not upload anything. The caller then sends the file bytes with an HTTP PUT to presignedUrl (with the same Content-Type), and uses the returned url as the input URL for other PDF.co tools. Returns presignedUrl (PUT target, valid about 15 minutes), url (the link to pass to other tools once uploaded, valid about an hour), name and credits. Use pdfco_get_presigned_upload_url when the source file is not already at a public URL. Files up to 2 GB can be uploaded; process them with async true.
Inputs
namestringrequired- File name for the upload, with extension. Example: contract.pdf.
contenttypestring- MIME type the file will be uploaded with; send the same Content-Type header in the PUT. Defaults to application/octet-stream. Example: application/pdf.
pdfco_list_document_parser_templatesList the Document Parser templates available to the account, both PDF.co system templates and your own.Read-onlyList Document Parser Templates
List the Document Parser templates available to the account, both PDF.co system templates and your own. Returns templates, each with id, type (system or user), title and description. Use pdfco_list_document_parser_templates to find a template_id for pdfco_parse_document. Use pdfco_get_document_parser_template to read one template's definition.
Inputs
This tool takes no inputs.
pdfco_list_html_templatesList the HTML-to-PDF templates available to the account: PDF.co's system templates and your own.Read-onlyList HTML Templates
List the HTML-to-PDF templates available to the account: PDF.co's system templates and your own. Returns templates, each with id, title, description, type (system or user), test_json (sample data) and updated_at. Use pdfco_list_html_templates to find a template_id and sample data for pdfco_html_template_to_pdf.
Inputs
This tool takes no inputs.
pdfco_add_passwordEncrypt a PDF with an owner and/or user password and set what readers may do: print, copy, edit, fill forms, annotate, assemble pages or extract for accessibility.WriteAdd Password to PDF
Encrypt a PDF with an owner and/or user password and set what readers may do: print, copy, edit, fill forms, annotate, assemble pages or extract for accessibility. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_add_password to protect or restrict a PDF. Use pdfco_remove_password to unlock one.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/password-protect/sample.pdf.
allow_accessibility_supportboolean- Set false to prohibit content extraction for accessibility tools. Defaults to true (allowed).
allow_assembly_documentboolean- Set false to prohibit inserting, deleting or rotating pages. Defaults to true (allowed).
allow_content_extractionboolean- Set false to prohibit copying text and images. Defaults to true (allowed).
allow_fill_formsboolean- Set false to prohibit filling form and signature fields. Defaults to true (allowed).
allow_modify_annotationsboolean- Set false to prohibit adding or changing annotations and form fields. Defaults to true (allowed).
allow_modify_documentboolean- Set false to prohibit editing the document. Defaults to true (allowed).
allow_print_documentboolean- Set false to prohibit printing. Defaults to true (allowed).
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
encryption_algorithmstring- Encryption algorithm. Defaults to AES_128bit; AES_128bit or AES_256bit is recommended.one of
RC4_40bitRC4_128bitAES_128bitAES_256bit expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: protected.pdf.
owner_passwordstring- Owner password, needed to change or remove the restrictions. Example: OwnerPass123.
print_qualitystring- Allowed print quality when printing is allowed. Defaults to HighResolution.one of
LowResolutionHighResolution user_passwordstring- User password that readers must enter to open the PDF. Leave empty to allow opening without a password (restrictions still apply). Example: ReadPass123.
pdfco_add_to_pdfEdit a PDF by drawing text, stamping images (logos, signatures) and adding new fillable fields or checkboxes at given coordinates, and optionally filling existing form fields in the same call.WriteAdd Text, Images and Fields to PDF
Edit a PDF by drawing text, stamping images (logos, signatures) and adding new fillable fields or checkboxes at given coordinates, and optionally filling existing form fields in the same call. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_add_to_pdf to annotate, stamp, sign or build a form. Use pdfco_fill_pdf_form when you only need to fill existing fields, and pdfco_replace_text to change existing words. Provide at least one of annotations, images or fields.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/sample.pdf.
annotationsarray- Text objects or new form fields to draw. Each object needs text, x and y (points from the top-left corner); optional: pages (0-based ranges), type (text, textField, TextFieldMultiline or checkbox for a new fillable field, with an id), size, color (#RRGGBB or #AARRGGBB), fontName, fontBold, fontUnderline, fontStrikeout, width, height, alignment (left, center, right), link and RotationAngle. Use {{$$newLine}} or \n for line breaks and {{$$PageNumber}} for page numbers. Example: [{"text": "APPROVED", "x": 400, "y": 30, "size": 24, "color": "#FF0000", "pages": "0"}].
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
fieldsarray- Existing form fields to fill. Each object needs fieldName (the exact name from pdfco_get_pdf_form_fields) and text (the value; for a checkbox use true, X or 1 to tick it; for a radio button or combo box use the item value or index). Optional: pages, size, fontName, fontBold, fontItalic, fontUnderline, fontStrikeout. Example: [{"fieldName": "topmostSubform[0].Page1[0].f1_02[0]", "text": "John"}, {"fieldName": "topmostSubform[0].Page1[0].c1_1[0]", "text": "true"}].
imagesarray- Images or PDF pages to place on top of the document, such as a logo or signature image. Each object needs url (public image or PDF link, or a data URI), x and y; optional: width, height, pages (0-based ranges), link and keepAspectRatio (default true). Example: [{"url": "https://example.com/signature.png", "x": 400, "y": 700, "width": 120, "pages": "!0"}].
namestring- File name for the generated output file. Example: edited.pdf.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced settings as a JSON-encoded string. Examples: {"FlattenDocument()": []} makes the result read-only; {"Pages[0].SetCropBox()": ["28", "28", "539", "786"]} crops page 1. See https://developer.pdf.co/api/profiles.
pdfco_auto_rotate_pagesDetect the text orientation of each page with AI/OCR and rotate sideways or upside-down pages upright, typically for scans.WriteAuto-rotate PDF Pages
Detect the text orientation of each page with AI/OCR and rotate sideways or upside-down pages upright, typically for scans. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_auto_rotate_pages when page orientation is unknown or mixed. Use pdfco_rotate_pages to rotate specific pages by a fixed angle. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-rotate/sample_rotated.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
pdfco_check_jobCheck the status of a background PDF.co job started with async true, and get its result when it is done.WriteCheck Job
Check the status of a background PDF.co job started with async true, and get its result when it is done. Each check uses a small number of credits. Returns status (working, success, failed or aborted), message, url of the finished output, pageCount, credits and remainingCredits; some endpoints also return inline results. HTTP 404 Job not found means the job ID is unknown for this API key, so stop polling. Use pdfco_check_job after any tool that returned a jobId. While status is working, wait a few seconds and check again; on success read the file at url.
Inputs
job_idstringrequired- The jobId returned by the call that started the background job. Example: 6YSZD3U872ZYYFEDMQCQSGEEO8YSF5WA--151-300.
pdfco_compress_pdfReduce a PDF's file size by downsampling and recompressing images and subsetting fonts, with a preset level or advanced settings.WriteCompress PDF
Reduce a PDF's file size by downsampling and recompressing images and subsetting fonts, with a preset level or advanced settings. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_compress_pdf before emailing or uploading large PDFs. Start with the default medium preset; use high or aggressive for smaller files at lower image quality. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-compress/sample.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true color_qualityinteger- JPEG quality for colour and greyscale images, 1 (smallest file) to 100 (best quality). Defaults to 60. Example: 75.
compression_levelstring- Compression preset: low (lightest, keeps the highest image resolution), medium (default, balanced), high, or aggressive (smallest file).one of
lowmediumhighaggressive configobject- Advanced overrides merged on top of the preset, only for what a preset can't do: images (color, grayscale, monochrome downsample and compression), fonts (subset, compress) and save (garbage level). Example: {"images": {"color": {"downsample": {"ppi": 100, "threshold": 150}}}}. See https://developer.pdf.co/api/pdf-compress.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: compressed.pdf.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
pdfco_delete_pagesRemove selected pages from a PDF and return the remaining pages as a new PDF.WriteDelete PDF Pages
Remove selected pages from a PDF and return the remaining pages as a new PDF. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_delete_pages to drop pages from one document. Use pdfco_split_pdf to separate pages into several files.
Inputs
pagesstringrequired- Pages to delete, 1-based: comma-separated numbers and ranges such as 1,3,5-7 or 4- (page 4 to the end). Reverse numbers like !1 are not supported here.
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-split/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: result.pdf.
pdfco_delete_textRemove text from a PDF by search text or by page area, optionally covering it with a coloured patch for a visible redaction.WriteDelete or Redact Text
Remove text from a PDF by search text or by page area, optionally covering it with a coloured patch for a visible redaction. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_delete_text to redact or strip text. Use pdfco_replace_text to substitute new text instead. Provide search_strings, redactions, or both.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
case_sensitiveboolean- Set false for case-insensitive matching. Defaults to true.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
make_unsearchableboolean- Set true to turn every page into an image after deleting, so no text can be searched or copied. Defaults to false.
namestring- File name for the generated output file. Example: redacted.pdf.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced settings as a JSON-encoded string. Example: {"UsePatch": true, "PatchColor": "#000000", "RemoveTextUnderPatch": true} draws black boxes over the deleted text (a visible redaction). See https://developer.pdf.co/api/profiles.
redactionsarray- Rectangular areas to remove, each with page (0-based), x, y, width and height in points from the top-left corner. Example: [{"page": 0, "x": 50, "y": 100, "width": 200, "height": 20}].
regexboolean- Set true to treat the search strings as regular expressions. Defaults to false.
replacement_limitinteger- Maximum matches to change for each search string; 0 (default) changes every match. Example: 1.
search_stringsarray- Texts to delete. Provide search_strings, redactions, or both. Example: ["Invoice", "Confidential"].
pdfco_document_to_pdfConvert an office document to PDF: Word, RTF, TXT, XPS or PowerPoint with source_format doc, or CSV and Excel spreadsheets with source_format csv.WriteDocument to PDF
Convert an office document to PDF: Word, RTF, TXT, XPS or PowerPoint with source_format doc, or CSV and Excel spreadsheets with source_format csv. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_document_to_pdf for one office file. Use pdfco_image_to_pdf for images, pdfco_merge_documents to convert and combine several files, and pdfco_url_to_pdf for web pages. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source document. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/doc-to-pdf/sample.docx.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true autosizeboolean- Spreadsheet sources only (source_format csv; ignored for doc): set true to size pages to fit the content; false uses the worksheet's page setup.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: document.pdf.
pagesstring- Spreadsheet sources only (source_format csv; ignored for doc): pages to include, 0-based ranges such as 0,2-4. Leave empty for all.
source_formatstring- Type of the source file: doc for DOC, DOCX, RTF, TXT, XPS, PPT and PPTX (PowerPoint is best effort; macros do not run); csv for CSV, XLS and XLSX. Defaults to doc.one of
doccsvdefaultdoc
pdfco_fill_pdf_formFill the existing fillable fields of a PDF form (text boxes, checkboxes, radio buttons, combo boxes) by field name.WriteFill PDF Form
Fill the existing fillable fields of a PDF form (text boxes, checkboxes, radio buttons, combo boxes) by field name. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_fill_pdf_form to complete a form such as a tax or application form. Call pdfco_get_pdf_form_fields first to get the exact field names. Use pdfco_add_to_pdf to place text on a PDF that has no fillable fields.
Inputs
fieldsarrayrequired- Existing form fields to fill. Each object needs fieldName (the exact name from pdfco_get_pdf_form_fields) and text (the value; for a checkbox use true, X or 1 to tick it; for a radio button or combo box use the item value or index). Optional: pages, size, fontName, fontBold, fontItalic, fontUnderline, fontStrikeout. Example: [{"fieldName": "topmostSubform[0].Page1[0].f1_02[0]", "text": "John"}, {"fieldName": "topmostSubform[0].Page1[0].c1_1[0]", "text": "true"}].
urlstringrequired- Public URL of the source PDF form. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: filled.pdf.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced settings as a JSON-encoded string. Example: {"FlattenDocument()": []} flattens the filled form so the values can no longer be edited. See https://developer.pdf.co/api/profiles.
pdfco_find_textSearch a PDF for a word, phrase or regular expression and return where each match is, without changing the file.WriteFind Text in PDF
Search a PDF for a word, phrase or regular expression and return where each match is, without changing the file. Returns body, an array of matches with text, pageIndex, left, top, width and height in points, plus pageCount and credits. With inline false it returns a url to a JSON file instead. Use pdfco_find_text to check whether text exists or get coordinates for pdfco_add_to_pdf. Use pdfco_replace_text or pdfco_delete_text to change the matches.
Inputs
search_stringstringrequired- Text to search for, or a regular expression when regex_search is true (escape backslashes as \\). Example: Invoice Date \d+/\d+/\d+.
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
inlineboolean- Defaults to true (matches returned in body). Set false to get a url to a JSON file of matches instead.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
regex_searchboolean- Set true to treat search_string as a regular expression. Defaults to false.
word_matching_modestring- How matches are bounded: SmartMatch (default, flexible word boundaries), ExactMatch (whole words only) or None (plain substring).one of
SmartMatchExactMatchNone
pdfco_generate_barcodeCreate a barcode or QR code image from a value, optionally with a logo in the middle of a QR code.WriteGenerate Barcode
Create a barcode or QR code image from a value, optionally with a logo in the middle of a QR code. Returns url, a temporary link to the PNG image (valid for expiration minutes), plus credits and remainingCredits. Use pdfco_generate_barcode to make a code image, then pdfco_add_to_pdf to stamp it on a PDF. Use pdfco_read_barcodes to decode existing codes.
Inputs
valuestringrequired- The text or number to encode. It must fit the chosen type's character set, e.g. digits only for EAN13. Example: https://example.com/order/1042.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
decoration_imagestring- QR codes only: public URL of a logo image to place in the centre of the code. Example: https://example.com/logo.png.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: barcode.png.
profilesstring- Advanced settings as a JSON-encoded string: Angle (0, 1, 2 or 3 for 0, 90, 180 or 270 degrees), NarrowBarWidth in pixels, CaptionFont such as Arial, 12. Example: {"Angle": 1, "NarrowBarWidth": 3}.
typestring- Barcode symbology. Defaults to QRCode. Common choices: QRCode, Code128, Code39, DataMatrix, EAN13, UPCA, PDF417.one of
QRCodeAustralianPostCodeAztecCodabarCodablockFCode128Code16KCode39Code39ExtendedCode39Mod43Code39Mod43ExtendedCode93DataMatrixDPMDataMatrixEAN13EAN2EAN5EAN8GS1DataBarExpandedGS1DataBarExpandedStackedGS1DataBarLimitedGS1DataBarOmnidirectionalGS1DataBarStackedGTIN12GTIN13GTIN14GTIN8IntelligentMailInterleaved2of5ITF14MaxiCodeMICRMicroPDFMSIPatchCodePDF417PharmacodePostNetPZNRoyalMailRoyalMailKIXTriopticUPCAUPCEUPUdefaultQRCode
pdfco_get_pdf_form_fieldsList the fillable form fields in a PDF, with each field's name, type, current value, page and position.WriteGet PDF Form Fields
List the fillable form fields in a PDF, with each field's name, type, current value, page and position. Returns info with the document properties plus FieldsInfo.Fields: an array of fields with PageIndex, Type (EditBox, CheckBox, RadioButton, ComboBox and others), FieldName, Value, Text and the field rectangle. Use pdfco_get_pdf_form_fields to learn the exact field names before calling pdfco_fill_pdf_form. Use pdfco_get_pdf_info for general document properties.
Inputs
urlstringrequired- Public URL of the source PDF form. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
pdfco_get_pdf_infoRead a PDF's properties and security settings without changing it.WriteGet PDF Info
Read a PDF's properties and security settings without changing it. Returns info with PageCount, Title, Author, Subject, Keywords, Creator, Producer, creation and modification dates, page size (PageRectangle), Encrypted and the permission flags (printing, modifying, copying, form filling and others). Use pdfco_get_pdf_info to check page count, metadata or protection before other operations. Use pdfco_get_pdf_form_fields to list fillable form fields.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-info/sample.pdf.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
pdfco_html_template_to_pdfCreate a PDF from a saved PDF.co HTML template by filling its {{macros}} with your JSON data, for invoices, receipts or reports.WriteHTML Template to PDF
Create a PDF from a saved PDF.co HTML template by filling its {{macros}} with your JSON data, for invoices, receipts or reports. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_html_template_to_pdf with a template ID from pdfco_list_html_templates. Use pdfco_html_to_pdf to convert raw HTML instead. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
template_datastringrequired- Data for the template's Mustache/Handlebars macros, as a JSON string (recommended) or CSV text; an object is also accepted and sent as JSON. Example: {"invoice_id": "1042", "paid": true}.
template_idintegerrequired- ID of a PDF.co HTML template, from pdfco_list_html_templates or the HTML to PDF Templates page in the PDF.co dashboard. Example: 1.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true do_not_wait_full_loadboolean- Set true to convert after minimal loading instead of waiting for the full page load, which is faster but may miss late content. Defaults to false.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
footerstring- HTML printed at the bottom of every page, with the same classes as header. Example: <span style='font-size:10px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span></span>.
headerstring- HTML printed at the top of every page. Classes date, title, url, pageNumber and totalPages are filled in, e.g. <span class='pageNumber'></span>. Leave room with margins.
marginsstring- Page margins overriding the page CSS, as "top right bottom left" or one value for all sides, in px, mm, cm or in. Example: 40px 20px 40px 20px.
media_typestring- CSS media type used for rendering: print (default), screen or none.one of
printscreennone namestring- File name for the generated output file. Example: document.pdf.
orientationstring- Page orientation. Defaults to Portrait.one of
PortraitLandscape paper_sizestring- Paper size: Letter, Legal, Tabloid, Ledger, A0 to A6, or a custom "width height" with px, mm, cm or in (e.g. 200mm 300mm). Defaults to A4.
print_backgroundboolean- Set false to leave out background colours and images. Defaults to true.
pdfco_html_to_pdfRender HTML markup into a PDF with a headless browser, with optional paper size, orientation, margins, header and footer.WriteHTML to PDF
Render HTML markup into a PDF with a headless browser, with optional paper size, orientation, margins, header and footer. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_html_to_pdf when you have the HTML. Use pdfco_url_to_pdf for a live web page, and pdfco_html_template_to_pdf to fill a saved PDF.co HTML template with JSON data. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
htmlstringrequired- The HTML to convert, as a full document or a fragment; inline CSS and JavaScript run before rendering. The request body is limited to 4 MB. Example: <h1>Invoice 1042</h1><p>Total: $120</p>.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true do_not_wait_full_loadboolean- Set true to convert after minimal loading instead of waiting for the full page load, which is faster but may miss late content. Defaults to false.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
footerstring- HTML printed at the bottom of every page, with the same classes as header. Example: <span style='font-size:10px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span></span>.
headerstring- HTML printed at the top of every page. Classes date, title, url, pageNumber and totalPages are filled in, e.g. <span class='pageNumber'></span>. Leave room with margins.
marginsstring- Page margins overriding the page CSS, as "top right bottom left" or one value for all sides, in px, mm, cm or in. Example: 40px 20px 40px 20px.
media_typestring- CSS media type used for rendering: print (default), screen or none.one of
printscreennone namestring- File name for the generated output file. Example: document.pdf.
orientationstring- Page orientation. Defaults to Portrait.one of
PortraitLandscape paper_sizestring- Paper size: Letter, Legal, Tabloid, Ledger, A0 to A6, or a custom "width height" with px, mm, cm or in (e.g. 200mm 300mm). Defaults to A4.
print_backgroundboolean- Set false to leave out background colours and images. Defaults to true.
pdfco_image_to_pdfConvert one or more JPG, PNG or TIFF images into a PDF, one page per image, in the order given.WriteImage to PDF
Convert one or more JPG, PNG or TIFF images into a PDF, one page per image, in the order given. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_image_to_pdf for photos and scans. Use pdfco_document_to_pdf for office files and pdfco_merge_documents to combine images with other documents.
Inputs
urlsarrayrequired- Public URLs of the JPG, PNG or TIFF images, in page order. You can also pass one comma-separated string. Example: ["https://example.com/scan1.png", "https://example.com/scan2.jpg"].
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: images.pdf.
pdfco_merge_documentsConvert and combine files of different types (PDF, Word, Excel, RTF, TXT, images, or ZIP archives of them) into one PDF, in the order given.WriteMerge Documents
Convert and combine files of different types (PDF, Word, Excel, RTF, TXT, images, or ZIP archives of them) into one PDF, in the order given. Uses more credits than a PDF-only merge because each file is converted first. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_merge_documents for mixed file types. Use pdfco_merge_pdfs when every input is already a PDF. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlsarrayrequired- Source file URLs to combine, in output order: PDF, DOC, DOCX, XLS, XLSX, RTF, TXT, PNG, JPG or ZIP archives of these (not HEIC or WEBP). Each must be publicly reachable by PDF.co. You can also pass one comma-separated string. Example: ["https://example.com/a.docx", "https://example.com/b.png"].
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: merged.pdf.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
pdfco_merge_pdfsCombine two or more PDF files into one PDF, in the order given.WriteMerge PDFs
Combine two or more PDF files into one PDF, in the order given. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_merge_pdfs when every input is a PDF. Use pdfco_merge_documents when inputs mix Word, Excel, images or ZIP files.
Inputs
urlsarrayrequired- Source file URLs to combine, in output order. Each must be publicly reachable by PDF.co. You can also pass one comma-separated string. Example: ["https://example.com/a.pdf", "https://example.com/b.pdf"].
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: merged.pdf.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
pdfco_parse_documentExtract named fields, tables and values from a PDF or scanned image using a Document Parser template, either a saved template ID or a template definition passed inline.WriteParse Document with Template
Extract named fields, tables and values from a PDF or scanned image using a Document Parser template, either a saved template ID or a template definition passed inline. Returns body.objects, a list of extracted items with name, objectType (field or table), value or rows, and pageIndex, plus templateName; in async mode returns jobId and the url of the JSON, CSV or XML output to read once pdfco_check_job reports success. Use pdfco_parse_document for recurring layouts you have a template for. Use pdfco_parse_invoice for invoices without a template, and pdfco_list_document_parser_templates to find template IDs. Provide template_id or template. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF or scanned image. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/document-parser/sample-invoice.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- Async calls only: set true to include the parsed results in the completed pdfco_check_job response as well as the output file url.
namestring- File name for the generated output file. Example: result.json.
output_formatstring- Format of the output file: JSON (default), CSV or XML.one of
JSONCSVXML pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
templatestring- A Document Parser template definition (YAML or JSON text) to use directly instead of a saved template_id. See https://developer.pdf.co/api/documentparser/overview.
template_idinteger- ID of a saved Document Parser template, from pdfco_list_document_parser_templates. Provide template_id or template. Example: 1.
pdfco_parse_invoiceExtract structured data from an invoice of any layout with PDF.co's AI invoice parser, with no template needed.WriteParse Invoice with AI
Extract structured data from an invoice of any layout with PDF.co's AI invoice parser, with no template needed. Always runs as a background job. Returns jobId and a url right away; poll pdfco_check_job until status is success, then read the JSON at url: vendor, customer, invoice (number, dates, totals, tax), paymentDetails, others and lineItems. Use pdfco_parse_invoice for invoices only, one invoice per file (split multi-invoice files with pdfco_split_pdf first; 100 pages max). Use pdfco_parse_document for other document types or when you have a template.
Inputs
urlstringrequired- Public URL of the source invoice (PDF or image). PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/document-parser/sample-invoice.pdf.
custom_fieldstring- Extra fields to extract beyond the standard invoice schema, as comma-separated camelCase names. Example: storeNumber,deliveryDate,purchaseOrderRef.
line_item_structureobject- Exact shape for every line item: keys are camelCase field names you choose and values are "string" or "number". Example: {"description": "string", "quantity": "number", "unitPrice": "number", "totalPrice": "number"}.
pdfco_pdf_to_csvConvert tables and text in a PDF or scanned image to CSV, detecting columns, rows and table borders.WritePDF to CSV
Convert tables and text in a PDF or scanned image to CSV, detecting columns, rows and table borders. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. With inline true on a synchronous call the CSV text is returned in body. Use pdfco_pdf_to_csv to get tabular data as CSV. Use pdfco_pdf_to_excel for an .xlsx or .xls workbook, and pdfco_pdf_to_json for text with coordinates. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF or scanned image (PDF, PNG, JPG, TIFF). PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-csv/sample.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- Set true to also return the extracted content inside the response body field, in addition to the url of the output file. Applies to synchronous calls (async false); keep false for large documents.
langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
line_groupingstring- How to group text lines inside table cells: 1 merges rows whose cells all align, 2 merges cells down each column, 3 joins single-cell rows to the row above. Leave empty for no grouping.one of
123 namestring- File name for the generated output file. Example: result.csv.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
rectstring- Area to extract from, in PDF points from the top-left corner, as "x y width height". Leave empty to use the whole page. Example: 51.8 114.8 235.5 204.0.
unwrapboolean- Set true to join wrapped lines inside a table cell into one line. Only applies when line_grouping is 1.
pdfco_pdf_to_excelConvert tables and text in a PDF or scanned image to an Excel workbook (.xlsx by default, or .xls), keeping layout and fonts.WritePDF to Excel
Convert tables and text in a PDF or scanned image to an Excel workbook (.xlsx by default, or .xls), keeping layout and fonts. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_pdf_to_excel when the user wants a spreadsheet file. Use pdfco_pdf_to_csv for CSV text, and pdfco_document_to_pdf with source_format csv to turn a spreadsheet back into a PDF. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF or scanned image (PDF, PNG, JPG, TIFF). PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-excel/sample.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
formatstring- Excel file format of the output: xlsx (Excel 2007+, default) or xls (legacy Excel 97-2003).one of
xlsxxlsdefaultxlsx langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
line_groupingstring- How to group text lines inside table cells: 1 merges rows whose cells all align, 2 merges cells down each column, 3 joins single-cell rows to the row above. Leave empty for no grouping.one of
123 namestring- File name for the generated output file. Example: result.xlsx.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
rectstring- Area to extract from, in PDF points from the top-left corner, as "x y width height". Leave empty to use the whole page. Example: 51.8 114.8 235.5 204.0.
unwrapboolean- Set true to join wrapped lines inside a table cell into one line. Only applies when line_grouping is 1.
pdfco_pdf_to_htmlConvert a PDF or scanned image to an HTML page, keeping text, fonts, images and layout, or to plain HTML with simple true.WritePDF to HTML
Convert a PDF or scanned image to an HTML page, keeping text, fonts, images and layout, or to plain HTML with simple true. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_pdf_to_html to publish or display a PDF as a web page. Use pdfco_pdf_to_text when you only need the words. Use pdfco_html_to_pdf for the opposite direction. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF or scanned image (PDF, PNG, JPG, TIFF). PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-html/sample.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true columnsboolean- Set true if the PDF is laid out in columns like a newspaper, so text is read column by column. Defaults to false.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- Set true to also return the extracted content inside the response body field, in addition to the url of the output file. Applies to synchronous calls (async false); keep false for large documents.
langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
line_groupingstring- How to group text lines inside table cells: 1 merges rows whose cells all align, 2 merges cells down each column, 3 joins single-cell rows to the row above. Leave empty for no grouping.one of
123 namestring- File name for the generated output file. Example: result.html.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
rectstring- Area to extract from, in PDF points from the top-left corner, as "x y width height". Leave empty to use the whole page. Example: 51.8 114.8 235.5 204.0.
simpleboolean- Set true for plain HTML without the original layout styling. Defaults to false (rich HTML and CSS that keeps the document design).
unwrapboolean- Set true to join wrapped lines inside a table cell into one line. Only applies when line_grouping is 1.
pdfco_pdf_to_jsonConvert a PDF or scanned image to JSON that describes each page as rows and columns of text objects with font, colour and position.WritePDF to JSON
Convert a PDF or scanned image to JSON that describes each page as rows and columns of text objects with font, colour and position. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. With inline true on a synchronous call the JSON is returned in body.document. Use pdfco_pdf_to_json when you need text with coordinates and formatting. Use pdfco_pdf_to_text for plain text, pdfco_pdf_to_csv for tables, pdfco_parse_document to pull named fields with a template, or pdfco_parse_invoice for invoices. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF or scanned image (PDF, PNG, JPG, TIFF). PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-json/sample.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- Set true to also return the extracted content inside the response body field, in addition to the url of the output file. Applies to synchronous calls (async false); keep false for large documents.
langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
line_groupingstring- How to group text lines inside table cells: 1 merges rows whose cells all align, 2 merges cells down each column, 3 joins single-cell rows to the row above. Leave empty for no grouping.one of
123 namestring- File name for the generated output file. Example: result.json.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
rectstring- Area to extract from, in PDF points from the top-left corner, as "x y width height". Leave empty to use the whole page. Example: 51.8 114.8 235.5 204.0.
unwrapboolean- Set true to join wrapped lines inside a table cell into one line. Only applies when line_grouping is 1.
pdfco_pdf_to_textExtract text from a PDF or scanned image as plain text that keeps the page layout, running OCR on scanned pages.WritePDF to Text
Extract text from a PDF or scanned image as plain text that keeps the page layout, running OCR on scanned pages. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Set async false with inline true on small files to get the text in body directly. Use pdfco_pdf_to_text for layout-preserving text with OCR. Use pdfco_pdf_to_text_simple for a faster, cheaper pass on digital PDFs, and pdfco_pdf_to_json or pdfco_pdf_to_csv for structured output. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Public URL of the source PDF or scanned image (PDF, PNG, JPG, TIFF). PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- Set true to also return the extracted content inside the response body field, in addition to the url of the output file. Applies to synchronous calls (async false); keep false for large documents.
langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
line_groupingstring- How to group text lines inside table cells: 1 merges rows whose cells all align, 2 merges cells down each column, 3 joins single-cell rows to the row above. Leave empty for no grouping.one of
123 namestring- File name for the generated output file. Example: result.txt.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
rectstring- Area to extract from, in PDF points from the top-left corner, as "x y width height". Leave empty to use the whole page. Example: 51.8 114.8 235.5 204.0.
unwrapboolean- Set true to join wrapped lines inside a table cell into one line. Only applies when line_grouping is 1.
pdfco_pdf_to_text_simpleExtract the text layer of a digital PDF quickly, without OCR, layout analysis or profiles; uses fewer credits than full text extraction.WritePDF to Text (Simple)
Extract the text layer of a digital PDF quickly, without OCR, layout analysis or profiles; uses fewer credits than full text extraction. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. With inline true on a synchronous call the text is returned in body. Use pdfco_pdf_to_text_simple for fast text from PDFs that already contain selectable text. Use pdfco_pdf_to_text for scanned pages or layout-preserving output.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- Set true to also return the extracted content inside the response body field, in addition to the url of the output file. Applies to synchronous calls (async false); keep false for large documents.
namestring- File name for the generated output file. Example: result.txt.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
pdfco_read_barcodesFind and decode barcodes and QR codes in a PDF or image, such as QR Code, Code 128, Code 39, EAN, UPC, DataMatrix and PDF417.WriteRead Barcodes
Find and decode barcodes and QR codes in a PDF or image, such as QR Code, Code 128, Code 39, EAN, UPC, DataMatrix and PDF417. Can also detect checkboxes and form marks on scans. Returns barcodes, an array with Value, TypeName, Page, Rect (position) and Confidence for each code found, plus pageCount and credits. Use pdfco_read_barcodes to decode codes. Use pdfco_generate_barcode to create one, and pdfco_split_pdf_by_text to split a PDF at barcode pages.
Inputs
typesstringrequired- Comma-separated barcode types to look for, e.g. QRCode,Code128,Code39,DataMatrix,EAN13,UPCA,PDF417 (see https://developer.pdf.co/api/barcode/overview). To detect form marks on scans use Checkbox, Rectangle, Oval, UnderlinedField, Segment, HorizontalLine or VerticalLine.
urlstringrequired- Public URL of the source PDF or image. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/barcode-reader/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
pdfco_remove_passwordRemove the password and permission restrictions from a PDF, producing an unprotected copy.WriteRemove Password from PDF
Remove the password and permission restrictions from a PDF, producing an unprotected copy. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_remove_password with the PDF's password to unlock it before other edits. Use pdfco_add_password to protect a PDF. Only unlock documents you are allowed to.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/password-protect/sample_protected.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: unlocked.pdf.
passwordstring- The PDF's current password (owner or user). Example: s3cret.
pdfco_replace_textFind text in a PDF and replace it with new text, for example to fill placeholders such as [CLIENT-NAME] in a template.WriteSearch and Replace Text
Find text in a PDF and replace it with new text, for example to fill placeholders such as [CLIENT-NAME] in a template. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_replace_text to change wording. Use pdfco_delete_text to remove or black out text, pdfco_replace_text_with_image to swap text for an image, and pdfco_find_text to locate text without changing the file.
Inputs
replace_stringsarrayrequired- Replacement texts, one per search string and in the same order. Example: ["John Doe", "Acme Inc"].
search_stringsarrayrequired- Texts to find. Each one is replaced by the item at the same position in replace_strings. Example: ["[CLIENT-NAME]", "[CLIENT-COMPANY]"].
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-search-and-replace/sample-agreement-template-signature-page-1.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
case_sensitiveboolean- Set false for case-insensitive matching. Defaults to true.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: result.pdf.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
regexboolean- Set true to treat the search strings as regular expressions. Defaults to false.
replacement_limitinteger- Maximum matches to change for each search string; 0 (default) changes every match. Example: 1.
pdfco_replace_text_with_imageFind text in a PDF and replace it with an image, for example to drop a logo or signature into a placeholder.WriteReplace Text with Image
Find text in a PDF and replace it with an image, for example to drop a logo or signature into a placeholder. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_replace_text_with_image when the placeholder is text. Use pdfco_add_to_pdf to place an image at fixed coordinates, and pdfco_replace_text for text-to-text replacement.
Inputs
replace_imagestringrequired- Public URL (or data URI) of the image to insert where the text was found. Example: https://example.com/logo.png.
search_stringstringrequired- Text to find and replace with the image. Example: Your Company Name.
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-to-text/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
case_sensitiveboolean- Set false for case-insensitive matching. Defaults to true.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: result.pdf.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages.
passwordstring- Password to open the source PDF, if it is password-protected. Example: s3cret.
profilesstring- Advanced PDF.co profile settings as a JSON-encoded string, for options without their own input. Example: {"CheckPermissions": false} to skip the document-permission check (only if you own the document). See https://developer.pdf.co/api/profiles.
regexboolean- Set true to treat the search strings as regular expressions. Defaults to false.
replacement_limitinteger- Maximum matches to change for each search string; 0 (default) changes every match. Example: 1.
pdfco_rotate_pagesRotate all or selected pages of a PDF by 90, 180 or 270 degrees.WriteRotate PDF Pages
Rotate all or selected pages of a PDF by 90, 180 or 270 degrees. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_rotate_pages when you know which pages and angle. Use pdfco_auto_rotate_pages to let PDF.co detect and fix the orientation of scanned pages.
Inputs
angleintegerrequired- Clockwise rotation in degrees: 90, 180 or 270 (0 leaves pages unchanged).one of
090180270 urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-rotate/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
namestring- File name for the generated output file. Example: rotated.pdf.
pagesstring- Pages to process, 0-based: comma-separated page numbers and ranges such as 0,2,5-10 or 3- (page 3 to the end); !0 is the last page. Leave empty for all pages. Example: 0,2 rotates the first and third pages.
pdfco_split_pdfSplit a PDF into several PDFs by page numbers or ranges, one output file per range.WriteSplit PDF
Split a PDF into several PDFs by page numbers or ranges, one output file per range. Returns urls, an array of temporary links to the output PDFs, plus pageCount and credits. With async it returns jobId and a url to a JSON file listing the outputs; pass inline true to get the list in the pdfco_check_job response. Use pdfco_split_pdf when you know the page ranges. Use pdfco_split_pdf_by_text to split wherever a text or barcode appears, and pdfco_delete_pages to drop pages from one document.
Inputs
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-split/sample.pdf.
asyncboolean- Set true to run the job in the background: the call returns a jobId and reserved output url at once; poll pdfco_check_job until status is success. Scalekit stops waiting after 10 seconds, so use true for large or many-page files.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- For async calls, set true to include the list of output URLs in the completed pdfco_check_job response.
namestring- File name for the generated output file. Example: part.pdf.
pagesstring- Page ranges to split out, 1-based: each comma-separated item becomes one output file, e.g. 1-2,3- gives pages 1-2 and pages 3 to the end; !1 is the last page; * splits every page into its own file. Leave empty to split every page.
pdfco_split_pdf_by_textSplit a PDF into several PDFs at every page that contains a search text, regular expression or barcode.WriteSplit PDF by Text or Barcode
Split a PDF into several PDFs at every page that contains a search text, regular expression or barcode. Returns urls, an array of temporary links to the output PDFs, plus pageCount and credits; with async it returns jobId to poll with pdfco_check_job. Use pdfco_split_pdf_by_text for batches of scanned documents separated by a heading or barcode sheet. Use pdfco_split_pdf when you know the page numbers. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
search_stringstringrequired- Text that marks a split page. For a barcode use [[barcode:<types>]] or [[barcode:<types> <value>]], e.g. [[barcode:qrcode]] or [[barcode:qrcode,datamatrix /pdf.co/]]. Regular expressions need regex_search true.
urlstringrequired- Public URL of the source PDF. PDF.co downloads the file from this URL, so it must be reachable without a login: a direct link, a PDF.co temporary file URL from an earlier result, or a presigned upload URL from pdfco_get_presigned_upload_url. Each input file can be up to 100 MB. Prefix with cache: (cache:https://...) to let PDF.co reuse a file it already downloaded. Example: https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-split/split_by_text_and_barcode.pdf.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true case_sensitiveboolean- Set false for case-insensitive matching. Defaults to true.
exclude_key_pagesboolean- Set true to drop the pages where the search text was found from the output. Defaults to false.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
inlineboolean- For async calls, set true to include the output URLs in the completed pdfco_check_job response.
langstring- OCR language for scanned pages and images, as a Tesseract code; join two with + (eng+deu). Defaults to eng. See https://developer.pdf.co/api/language-support. Example: deu.
namestring- File name for the generated output file. Example: part.pdf.
regex_searchboolean- Set true to treat search_string as a regular expression. Defaults to false.
pdfco_url_to_pdfCapture a live web page as a PDF with a headless browser, running its JavaScript, with optional paper size, orientation, margins, header and footer.WriteWeb Page to PDF
Capture a live web page as a PDF with a headless browser, running its JavaScript, with optional paper size, orientation, margins, header and footer. Returns url (a temporary link to the output file, valid for expiration minutes), pageCount, credits and remainingCredits; with async it returns jobId and the reserved url to read once pdfco_check_job reports success. Use pdfco_url_to_pdf to save or archive a web page. Use pdfco_html_to_pdf when you have the HTML itself, and pdfco_document_to_pdf for a link to a Word or Excel file. Runs in the background by default; poll pdfco_check_job with the returned jobId.
Inputs
urlstringrequired- Address of the web page to capture. Example: https://example.com/report.
asyncboolean- Run the job in the background. Defaults to true: the call returns a jobId and the reserved output url right away; poll pdfco_check_job with the jobId until status is success, then read the url. Scalekit stops waiting after 10 seconds, so only set false for small files that finish within a few seconds.default
true do_not_wait_full_loadboolean- Set true to convert after minimal loading instead of waiting for the full page load, which is faster but may miss late content. Defaults to false.
expirationinteger- Minutes until the output URL expires and the file is deleted from PDF.co temporary storage. Defaults to 60; the maximum depends on your PDF.co plan. Example: 120.
footerstring- HTML printed at the bottom of every page, with the same classes as header. Example: <span style='font-size:10px'>Page <span class='pageNumber'></span> of <span class='totalPages'></span></span>.
headerstring- HTML printed at the top of every page. Classes date, title, url, pageNumber and totalPages are filled in, e.g. <span class='pageNumber'></span>. Leave room with margins.
marginsstring- Page margins overriding the page CSS, as "top right bottom left" or one value for all sides, in px, mm, cm or in. Example: 40px 20px 40px 20px.
media_typestring- CSS media type used for rendering: print (default), screen or none.one of
printscreennone namestring- File name for the generated output file. Example: page.pdf.
orientationstring- Page orientation. Defaults to Portrait.one of
PortraitLandscape paper_sizestring- Paper size: Letter, Legal, Tabloid, Ledger, A0 to A6, or a custom "width height" with px, mm, cm or in (e.g. 200mm 300mm). Defaults to A4.
print_backgroundboolean- Set false to leave out background colours and images. Defaults to true.
render_timeoutinteger- Maximum time to wait for the page to finish rendering, in milliseconds, up to 177000. Useful for pages with heavy JavaScript. Example: 15000.
No tools match.