ComponentToPdf

ComponentToPdf action is a system action used in application development processes to convert a specific element to PDF. This action also converts dynamic content, graphics or data in a specific element to PDF format.

To add the ComponentToPDF system action, select the element to add the action to. Click +Add Action under the Properties panel. (A)

Click on Device, then click on ComponentToPDF and add the ComponentToPDF action.

The added ComponentToPDF action comes with the parameters: Component to Save as PDF, Quality, and Filename.

Component to Save as PDF:

This parameter allows you to select the element to be converted to PDF. The elements on the screen will be listed under this parameter with the related element name.

Quality:

This parameter specifies the quality level to be used during the PDF conversion process.

There are options such as Low, Normal, Medium, High, and Extreme in the quality levels drop-down menu.

  • Low:

Applies low-quality compression.

This may result in smaller file sizes but may reduce visual quality.

  • Normal:

Applies standard quality compression.

Provides balance, reasonable file size, and acceptable visual quality.

It is the preferred overall quality option in most cases.

  • Medium:

Applies medium quality and compression.

May offer a slightly better visual quality than normal, but the file size may be slightly larger.

  • High:

Applies high-quality compression.

Provides better visual quality, but the file size usually increases.

Particularly suitable for high-resolution images or when print quality is required.

  • Extreme:

Applies the highest quality compression.

Aims to maximize visual quality, but the file size will usually be larger.

Especially suitable for special cases that require print quality and high resolution.

Filename:

This parameter allows you to define, either statically or dynamically, the file name where the generated PDF file will be saved.It is usually expressed as a text string.For example, it can take a value like report.pdf.

This parameter can be user or application-specific or dynamically generated.

Within the created action, Symbol Picker (B) is used to select the parameter input method for the action.

You can perform various operations on the Context menu (C) for the actions you create.

You can easily copy the action with the Copy option. This way, you gain speed where action repetition is required.

You can add a confirmation message for the action to run using the Add Confirmation option.

Also, with the Add Condition feature, you can specify certain conditions under which the added action should execute.

You can easily delete the action created with the Remove option.

Example Usage of Component To PDF Action

In an example scenario, let's look at the flow that will allow the content of the elements in the Row element to be saved as PDF when a button is clicked.

To do this, add a Button to the screen containing the element to be converted to PDF with the button selected.

When the Button is selected, add the action by clicking Onclick → Device → ComponenttoPDF.

The added action comes with the parameters Component to Save as Pdf, Quality, and Filename.

Select the Row element to be converted to PDF from the drop-down menu in the Component to save as a PDF parameter.

To determine the image quality of the texts in the Row element, select Extreme using the Quality parameter. In the Filename parameter, name the file name Privacy_policy.pdf.

Preview the application via the RUN button.

Click on the relevant button on the screen.

The texts in the Row element will be created and downloaded as PDFs.

Last updated