Unofficial Content

Test panel (PdfToolsPanel)

Objective

PdfToolsPanel is a sample web panel, shipped alongside the component, that lets you interactively try out PDFTools functionalities without writing code: pick an action, fill in its parameters, run it, and view the result (operation status and, when applicable, the source document and the generated one). It is meant as a testing/demonstration tool during development, and is not part of the component's public API.

The panel is exposed as a web panel object (pdftoolspanel).

General structure

The panel is organized in two columns:

  • Left column — configuration: action selection, file paths, and parameters for the chosen action, together with the Execute button.

  • Right column — result: status of the last run and, below it, the source and destination documents shown inline.

The five sections of the panel are detailed below.

Actions

A combobox is used to pick the action to try out. Its options are the component's functionalities (see Available functionalities?):

The GetFields/GetField and SetFields/SetField options group, in a single view, the variant that operates on a single field (GetField / SetField) and the one that operates on the full collection (GetFields / SetFields).

When an action is selected, the panel shows:

  • A short descriptive text of the selected functionality.

  • A link to its detailed documentation.

While no action is selected ((None)), the rest of the sections (paths, parameters, status, viewers) remain unloaded.

File Paths

This section manages the paths of the files the action will consume and/or generate:

Field Description
Root Common parent path, editable by the user. Used as the base to resolve the Source and Target paths.
Source Name of the sample PDF file (or, depending on the action, of the corresponding source resource) to be processed. The already-resolved absolute path (Root + Source) is also shown, read-only.
Target Name of the output PDF file to be generated. The already-resolved absolute path (Root + Target) is also shown, read-only.

Changing Root updates the path resolution of every file field in the panel, without needing to rewrite each full path separately.

Not every action uses every field: for example, FromBase64 has no Source (the source is the Base64 text, not a file); PageCount, GetText, GetField/GetFields and ToBase64 have no Target (they do not generate a new PDF file); and ConcatFiles receives several source files through the Parameters section instead of a single Source field. The panel only shows the fields that the selected action actually uses.

Parameters

This section changes entirely depending on the action chosen in the Actions combobox: it shows only the parameters belonging to that functionality, with the same name and meaning described in its detail page. For example:

  • For AddSignature, the parameters are visually grouped into two collapsible subsections: Certificate (certificate path and password) and Signature Position (whether the signature is visible, page, and the LX/LY/UX/UY box coordinates).

  • For SetFields/SetField, a checkbox (PDFAllFields) determines whether a single field is operated on (Field Key / Field Value, invoking SetField) or the full collection, shown as an editable table with Key / Value / Options columns, invoking SetFields with the PDFToolsFormField structure. The same criterion applies to GetFields/GetField.

  • For ManagePermissions, the user password and the full permission catalog from PDFToolsPermission are shown as checkboxes.

  • For Html2PDF and AddHeaderFooter, the header/footer fields follow the PDFToolsHeaderFooter structure (LeftText/CenterText/RightText).

The Execute button sits at the end of this section and triggers the invocation of the selected functionality with the current path and parameter values.

If no action is selected ((None)), the section remains empty, showing a message stating that there are no parameters to display.

Status

As a banner in the right column, the panel shows the status of the last run, in one of four values:

Status When it is shown
Waiting for execution Initial state, before the selected action has been run.
Error The operation returned Error = true in its PDFToolsStatus. The ErrorMessage is shown.
Warning The operation returned Error = false but Warning = true. The WarningMessage is shown; the output file was still generated.
Success The operation returned Error = false and Warning = false.

This status directly reflects the Error/ErrorMessage/Warning/WarningMessage properties of PDFToolsStatus, the standard result returned by every functionality of the component.

Source and target document

On the right side of the panel, below the status, two PDF viewers are shown side by side:

  • Source: shows the file pointed to by the Source path, when the selected action consumes a PDF file as input.

  • Target: shows the file generated at the Target path, after a successful run (Success or Warning) of an action that produces an output PDF file.

Each viewer includes its own toolbar (file name, page navigation, and zoom). When the selected action does not consume a viewable source file (for example, FromBase64) or does not generate a target file (for example, PageCount or GetFields/GetField), the corresponding viewer stays empty, showing a message stating that there is no document to display.

When setting a password through ManagePermissions, the Target viewer will show a popup with a message stating that the file cannot be loaded; this is expected behavior, because the inline viewer does not support password-protected documents. For this functionality only, the resulting document must be opened outside the panel.

Last update: 2026 | © GeneXus. All rights reserved. GeneXus Powered by Globant