How is your experience with the OutSystems Community?
pdf-tools-utils
Service icon

PDF Tools Utils

Stable version 1.0.4 (Compatible with OutSystems 11)
Uploaded
 on 10 Nov (11 days ago)
 by 
4.7
 (7 ratings)
pdf-tools-utils

PDF Tools Utils

Compatible with:
Created on OutSystems 11

Version 1.0.4

Stable
Current
See documentation
Uploaded on 10 Nov (11 days ago) by 
Compatible with:
Version 11
Database:
All
Release notes:

PDFSharp for O11: release notes

PDFSharp grows from 15 to 31 actions on PDFsharp 6.2.4. Existing actions keep their names, parameters and keys, so apps need only a dependency refresh.

New actions

Area

Actions

Text and stamps

ExtractTextFromPDF, AddTextWatermark, AddTextStamp, AddPageNumbers, AddHeaderFooter

Pages

ExtractPages, InsertPDFAt, RemovePages

Forms and metadata

FlattenForm, SetPDFMetadata

Security

DecryptPDF

Images and size

ImagesToPDF, RenderPageToImage, CompressPDF

Bookmarks

GetBookmarks, AddBookmarks

Changed

  • Form fields: radio buttons and list boxes no longer crash; nested fields are found; locked fields can be refilled. Options must match exactly.
  • ReorderPDFPages: pages can be repeated or left out.
  • RotatePDF: an empty page list rotates all pages.
  • PDFDownloadURL: adds https:// when missing and raises a clear error instead of returning an empty file.
  • Page lists: a page that doesn't exist now raises an error instead of being skipped.
  • ExtractImagesFromPDF: the output may show as Images instead of Images2; check it after the refresh.

Upgrade

  1. Publish PDF Tools.oap in Service Center (Factory → Solutions) or LifeTime.
  2. In each consuming module, refresh PDFSharp in Manage Dependencies and republish.
  3. Raise the Server Request Timeout (default 10 s) for downloads and large files, then test.
Application Objects:
PDF Tools Utils has 0 AOs.

Version 1.0.3

Stable
See documentation
Uploaded on 10 Nov (11 days ago) by 
Compatible with:
Version 11
Database:
All
Release notes:
# PDF Tools Utils
Server-side PDF processing for **OutSystems Developer Cloud (ODC)** apps. It's provided by the `PDF_Tools` external library (C#, .NET 10) and built on:
- **PDFsharp** (MIT): pages, drawing, encryption and forms.- **PdfPig** (Apache-2.0): text extraction.- **PDFtoImage/PDFium** (MIT): rendering pages as images.
## General notes
- **Page numbers start at 1.** A page list looks like `1,3,5`. The newer actions also accept ranges, such as `1,4-6`. Where noted, an empty list means all pages.- **Positions and sizes are in points** (1/72 inch), measured from the top-left corner. An A4 page is 595 × 842 points.- **Colours** are hex codes, such as `#FF0000`.- **Optional inputs:** ODC passes `0`, `""` or `False` for an empty optional input. The library treats `0` as "use the default", and each default is listed below.- **Limits:**  - Inputs and outputs together can't exceed **5.5 MB** per call.  - A call can't run longer than **95 s**.  - A screen calling a server action times out after 10 s by default, so raise that timeout for large files.- **Errors:** an invalid input, such as a page out of range or a wrong password, raises an exception with a readable message.
## Actions
| # | Action | Purpose ||---|---|---|| 1 | RotatePDF | Rotate pages || 2 | EncryptPDFWithPassword | Password-protect || 3 | MergePDFs | Combine PDFs || 4 | SplitPDF | One PDF per page || 5 | RemovePageFromPDF | Remove one page || 6 | AppendPageToPDF | Append another PDF || 7 | GetNumberOfPagesFromPDF | Count pages || 8 | FormFields_Get | Read form fields || 9 | FormFields_SetValues | Fill form fields || 10 | PDFDownloadURL | Download from a URL || 11 | AddImageToPDFs | Add an image or signature || 12 | PDFInspector | Read PDF information || 13 | ReorderPDFPages | Reorder pages || 14 | ExtractImagesFromPDF | Extract images || 15 | RestrictPDFPermissions | Restrict print, copy and edit || 16 | ExtractTextFromPDF | Extract text **(new)** || 17 | AddTextWatermark | Text watermark **(new)** || 18 | AddTextStamp | Text at a position **(new)** || 19 | AddPageNumbers | Page numbers **(new)** || 20 | AddHeaderFooter | Header and footer **(new)** || 21 | DecryptPDF | Remove the password **(new)** || 22 | ExtractPages | Keep some pages **(new)** || 23 | InsertPDFAt | Insert at a position **(new)** || 24 | RemovePages | Remove several pages **(new)** || 25 | FlattenForm | Make fields permanent **(new)** || 26 | SetPDFMetadata | Set title, author and more **(new)** || 27 | ImagesToPDF | Images to PDF **(new)** || 28 | CompressPDF | Reduce size **(new)** || 29 | RenderPageToImage | Page to PNG **(new)** || 30 | GetBookmarks | Read bookmarks **(new)** || 31 | AddBookmarks | Add bookmarks **(new)** |
In the tables below, **bold** marks the output and *opt* marks an optional input.
## Page operations
### 1. RotatePDFRotates pages clockwise.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageNumberList | Text | Pages to rotate. Empty = all || RotationAngle | Integer | 90, 180 or 270 || **ResultPDF** | Binary | Rotated PDF |
### 3. MergePDFsCombines PDFs, in list order.
| Parameter | Type | Description ||---|---|---|| PDFBinaries | List of Binary | PDFs to merge || **ResultPDF** | Binary | Merged PDF |
### 4. SplitPDF
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **Pages** | List of Binary | One PDF per page |
### 5. RemovePageFromPDF
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageNumber | Integer | Page to remove || **ResultPDF** | Binary | PDF without that page |
### 6. AppendPageToPDFAdds all pages of a second PDF at the end.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Main PDF || Page | Binary | PDF to append. It can have several pages || **ResultPDF** | Binary | Combined PDF |
### 7. GetNumberOfPagesFromPDF
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **NumberOfPages** | Integer | Page count |
### 13. ReorderPDFPagesReturns the pages in the listed order. A page can be repeated or left out.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageOrderList | Text | For example `3,1,2`. `1,1,2` repeats page 1 || **ResultPDF** | Binary | Reordered PDF |
### 22. ExtractPages (new)Keeps only the listed pages, in their original order.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageNumberList | Text | For example `3-7` or `1,4-6,9` || **ResultPDF** | Binary | PDF with those pages |
### 23. InsertPDFAt (new)Inserts all pages of a second PDF before the given page.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Main PDF || InsertPDF | Binary | PDF to insert || Position | Integer | Pages go before this page. `1` = start; page count + 1 = end || **ResultPDF** | Binary | Combined PDF |
Example: in a 5-page PDF, Position `3` puts the inserted pages after page 2.
### 24. RemovePages (new)Removes the listed pages. At least one page must remain.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageNumberList | Text | For example `2,5-7` || **ResultPDF** | Binary | PDF without those pages |
## Text, watermarks and page numbers
In the actions below, `{page}` and `{total}` in a text are replaced by the page number and the page count. Text is drawn upright on rotated pages too.
### 16. ExtractTextFromPDF (new)Returns the text of each page. Scanned pages without a text layer return empty text, because the action doesn't run OCR.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageNumberList | Text | *opt*. Empty = all pages || **Pages** | List of PageText | `Page` (Integer), `Text` (Text) |
### 17. AddTextWatermark (new)Writes text such as CONFIDENTIAL across the middle of the page.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || Text | Text | Watermark text || PageNumberList | Text | *opt*. Empty = all || FontSize | Decimal | *opt*. Default 60 || Color | Text | *opt*. Default `#808080` || Angle | Integer | *opt*. Counter-clockwise. Default 45; 360 = horizontal || Opacity | Integer | *opt*. 1–100. Default 30 || **ResultPDF** | Binary | Watermarked PDF |
### 18. AddTextStamp (new)Writes text at a position, such as an approval stamp.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || Text | Text | The text || XPosition | Decimal | Points from the left edge || YPosition | Decimal | Points from the top edge || PageNumberList | Text | *opt*. Empty = all || FontSize | Decimal | *opt*. Default 12 || Color | Text | *opt*. Default black || IsBold | Boolean | *opt*. Default False || Opacity | Integer | *opt*. 1–100. Default 100 || **ResultPDF** | Binary | Stamped PDF |
### 19. AddPageNumbers (new)Numbers every page.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || Format | Text | *opt*. Default `Page {page} of {total}` || Position | Text | *opt*. `BottomCenter` (default), `BottomLeft`, `BottomRight`, `TopCenter`, `TopLeft`, `TopRight` || FontSize | Decimal | *opt*. Default 10 || StartNumber | Integer | *opt*. First page number. Default 1 || Margin | Decimal | *opt*. Points from the edge. Default 30 || **ResultPDF** | Binary | Numbered PDF |
### 20. AddHeaderFooter (new)Writes a centred header and footer.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || HeaderText | Text | *opt*. Empty = no header || FooterText | Text | *opt*. Empty = no footer || PageNumberList | Text | *opt*. Empty = all || FontSize | Decimal | *opt*. Default 10 || Margin | Decimal | *opt*. Points from the top and bottom edges. Default 30 || **ResultPDF** | Binary | Resulting PDF |
## Images and rendering
### 11. AddImageToPDFsAdds an image, such as a logo or signature, to pages.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || ImageBinary | Binary | PNG or JPEG || PageNumberList | Text | Empty = all || XPosition, YPosition | Decimal | Points from the left and top edges || ImageWidth, ImageHeight | Decimal | Size in points || Opacity | Integer | 0–100 || **ResultPDF** | Binary | PDF with the image |
### 14. ExtractImagesFromPDFReturns the embedded images: JPEG as JPEG, others as PNG. Images that can't be converted are skipped.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **Images** | List of ExtractedImage | `Image` (Binary), `Page` (Integer) |
### 27. ImagesToPDF (new)Creates one page per image, in list order.
| Parameter | Type | Description ||---|---|---|| Images | List of Binary | PNG or JPEG || PageSize | Text | *opt*. `Fit` (default, page = image size), `A4` or `Letter`. On A4 and Letter, the image is scaled, centred and turned landscape when it's wide || Margin | Decimal | *opt*. For A4 and Letter. Default 36 || **ResultPDF** | Binary | New PDF |
### 29. RenderPageToImage (new)Renders a page as a PNG image for previews.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || PageNumber | Integer | Page to render || DPI | Integer | *opt*. 10–300. Default 96 || Password | Text | *opt*. For protected PDFs || **Image** | Binary | PNG, at most 5 MB |
## Security
### 2. EncryptPDFWithPasswordRequires a password to open the PDF and blocks printing, copying and editing.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || Password | Text | Password to open the PDF || **ResultPDF** | Binary | Protected PDF |
### 15. RestrictPDFPermissionsSets whether readers may print, copy and edit.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || UserPassword | Text | Password to open the PDF. Empty = no password || OwnerPassword | Text | Lifts the restrictions. Empty = random || AllowPrinting, AllowCopying, AllowEditing | Boolean | What readers may do || **ResultPDF** | Binary | Restricted PDF |
### 21. DecryptPDF (new)Removes the password and the restrictions. A PDF that isn't encrypted is returned unchanged.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Encrypted PDF || Password | Text | The **owner** password || **ResultPDF** | Binary | Unprotected PDF |
> The password that only opens the PDF isn't enough. PDFs made with EncryptPDFWithPassword have a random owner password, so they can't be decrypted. To decrypt a PDF later, protect it with RestrictPDFPermissions and an owner password you keep.
## Forms
**FormField** structure:- `Name`: the field name, such as `Customer.Name`.- `Value`: the field value. For checkboxes, `Yes`/`Off`.- `Type`: the field type.  - `TXT`: text  - `CHK`: checkbox  - `RAD`: radio button  - `CBX`: combo box  - `LBX`: list box  - `GEN`: other
### 8. FormFields_Get
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **Fields** | List of FormField | The fields |
### 9. FormFields_SetValuesFills text, checkbox, radio, combo box and list box fields.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || FieldList | List of FormField | Fields matched by name. Unknown names are skipped || IsOutputReadOnly | Boolean | *opt*. True locks all fields || **ResultPDF** | Binary | Filled PDF |
### 25. FlattenForm (new)Turns the fields into page content, so the values can't be changed. Checkboxes and radio buttons keep their look.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **ResultPDF** | Binary | Flattened PDF |
Tip: call FormFields_SetValues and then FlattenForm to send a filled form that can't be edited.
## Information and metadata
### 12. PDFInspectorIf the PDF needs a password to open, only `IsEncrypted` and `FileSizeInBytes` are filled.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **InspectorInfo** | InspectorInfo | See below |
**InspectorInfo** fields:- `Title`, `Author`, `Subject`, `Keywords`, `Creator`, `Producer`- `PDFVersion` (Text)- `PageCount` (Integer)- `IsEncrypted` (Boolean)- `FileSizeInBytes` (Long Integer)
### 26. SetPDFMetadata (new)Sets the document properties. An empty input keeps the current value, and a single space clears it.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || Title, Author, Subject, Keywords, Creator | Text | *opt*. New values || **ResultPDF** | Binary | Updated PDF |
### 28. CompressPDF (new)Compresses uncompressed content and drops unused objects, without losing quality. Images aren't resampled, so scans shrink little.
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **ResultPDF** | Binary | Smaller PDF, or the original if it can't be made smaller |
## Bookmarks
**Bookmark** structure:- `Title` (Text)- `Page` (Integer): 0 when the bookmark points to no page.- `Level` (Integer): 1 is top level, and 2 nests under the level-1 bookmark before it.
### 30. GetBookmarks (new)
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || **Bookmarks** | List of Bookmark | In reading order. Empty if there are none |
### 31. AddBookmarks (new)
| Parameter | Type | Description ||---|---|---|| PDFBinary | Binary | Input PDF || Bookmarks | List of Bookmark | In order || ReplaceExisting | Boolean | *opt*. True removes the existing bookmarks first || **ResultPDF** | Binary | PDF with bookmarks |
## Other
### 10. PDFDownloadURLDownloads a file over http or https. https is assumed when the URL has no scheme. The content isn't checked.
| Parameter | Type | Description ||---|---|---|| URL | Text | For example `example.com/doc.pdf` || **PDFBinary** | Binary | The downloaded file |
## Demo
The **PDF Tools Utils** app shows each action on the **PDFSharp** screen.
Application Objects:
PDF Tools Utils has 0 AOs.

Version 1.0.2

Stable
See documentation
Uploaded on 26 November 2025 by 
Compatible with:
Version 11
Database:
All
Release notes:

Form Field Writing Improved

  • Fixed “The field is read-only” errors

  • Added support for unsetting PDF /Ff flags

  • Stronger handling for:

    • Text fields

    • Checkboxes

    • Radio buttons

    • Combo boxes

Application Objects:
PDF Tools Utils has 0 AOs.