show / hide menu

ConvertToPDF

The ConvertToPDF function is part of the Mail Operations suite, designed to convert the current form into a PDF file. This function can be customized to specify the file control to upload the PDF, the desired file name, and an optional delay before the conversion.

Syntax

ConvertToPDF(File upload control (optional), File name (optional), Conversion Delay (optional))

Parameters

  • File upload control: (string, optional) The name of the file control where the generated PDF will be uploaded.
  • File name: (string, optional) The desired file name for the saved PDF.
  • Conversion Delay: (string, optional) A delay (in seconds) before generating the PDF. The value can range from 0 to 60 seconds.

Description

The ConvertToPDF function converts the current form into a PDF file. This function is flexible and allows for optional parameters to tailor the PDF creation process to specific needs.

Parameters Detailed Description

  1. File upload control
    • Type: string
    • Required: No
    • Description: The name of the file control where the generated PDF will be populated. This allows for the PDF to be directly uploaded to a specified file control upon creation.
  2. File name
    • Type: string
    • Required: No
    • Description: The desired name for the saved PDF file. If not specified, the file may be saved with a default or auto-generated name.
  3. Conversion Delay
    • Type: string
    • Required: No
    • Description: Specifies a delay (between 0 to 60 seconds) for generating the PDF file. This delay can be useful to ensure all elements of the form are fully rendered before the PDF conversion begins.

Usage Examples

Example with Optional Values

ConvertToPDF(FileUpload1, Test1, 10)

This example converts the current form into a PDF, uploads it to the FileUpload1 control with the file name “Test1”, and includes a 10-second delay before starting the conversion.

Figure1: Rule

Figure2: Preview

Example without Optional Values

ConvertToPDF()

Figure3: Rule

Figure4: Preview

In this example, the ConvertToPDF function is called without any optional parameters, converting the current form into a PDF file using default settings.                                                                                    

Figure5: Pdf

Function Summary

The ConvertToPDF function is a powerful tool for converting forms into PDF files within the Mail Operations suite. It supports optional parameters for specifying a file control, file name, and conversion delay, providing flexibility and control over the PDF creation process. This function is particularly useful for applications requiring the preservation and distribution of form data in a standardized, portable document format.