Sign Up
Loading...

Process PDF files

Inspect a PDF, combine documents, copy selected pages into a separate file, or read existing text. Find PDF information, Merge PDFs, Select PDF pages and Extract PDF text under File Manager when adding a command to a server workflow.

Use a file containing its contents. Choose an uploaded file, an earlier command's file, or Get File with Include bytes enabled; select it with the usual variable control. A path alone is not enough. See Managing Files.

PDF information

Choose File. The result includes page_count, input size and a list containing each page's number, width, height and rotation.

Merge PDFs

Choose Files, an ordered list of 1 to 8 PDFs. Pages are copied in file order: the first document's pages come first, followed by the next document. The combined document may contain up to 50 pages.

Save the result with Return as. You receive a new PDF; no source document is overwritten.

Select PDF pages

Choose File and Pages. Page numbers start at 1. The list 1, 3, 2 produces a new PDF with page 1 first, then page 3, then page 2. Repeating a number repeats that page: 3, 1, 3 produces three pages in that order. Choose at least one valid page and no more than 50.

Use this command to split a document by running it once for each group of pages you need. The original stays unchanged. New files are not automatically saved to storage or shared publicly.

Extract PDF text

Choose File and optionally Pages. Leave Pages empty to read all supported pages. The result includes:

  • pages: each selected page number and its text.

  • text: the selected text together, in your chosen order.

  • page_count and extracted_page_count.

  • has_text: whether any selected page contained text.

This reads existing selectable text. A scanned image does not become text; there is no OCR. An empty text result can be correct for a scanned or blank page. Text order follows the document's stored content and may differ from its visual reading order.

Limits and unsupported PDFs

Inputs together may total 4 MiB, with up to 50 pages. A new PDF file may be up to 512 KiB; extracted text is limited to 1 MiB. Large or complex documents may also reach processing limits.

Encrypted PDFs, scripts, actions, forms, attachments and external references are refused. Some compressed PDFs are not supported in this first version. If a document is rejected, try a simpler PDF export with those features removed; changing its filename does not make it supported.

Test with small samples before using your own documents. Busy capacity, unsupported content and processing limits produce errors. These commands can be used in ordinary server tests, inactive event tests, background functions and supported endpoint suites. See File processing limits and errors, Testing and Test suites.

Related Topics

Process images

Read image details, make smaller copies, crop, rotate or change the format. Add these commands from File Manager in an endpoint, server function or event. They also work when a published function is called in the background and in supported endpoint test suites. Choose your image. Use a file contain...

Cache

Cache values let an endpoint, server function or event reuse temporary data. For example, save a product summary for five minutes instead of requesting it from another service every time. A cache is temporary. Keep permanent records in your database and make sure the workflow can obtain the original...

Security

Twidget provides several built-in functions to enhance the security of your applications. Below is an overview of each security command, including its description, inputs, and outputs. For checksums, shared-secret signatures, webhook verification and safe text comparison, see [Cryptography commands]...

Cryptography commands

Create checksums, protect text with encryption, sign and verify messages, and compare private text in endpoints, server functions and events. Find these commands under Security when adding a command. They use the familiar variable selector and Return as field. Keep shared signing keys in [Globals & ...

Managing Files

Twidget offers a set of commands to manipulate files in your file store. Below are the descriptions and usage of each command to help you understand how to utilize them effectively. For CSV, ZIP archives and temporary download links, see [Advanced file commands](/docs/commands/advanced-files). Get F...