PDF Generator
HomeBlogDocsContact
  • Overview
    • Try It!
    • Introduction
    • Key Features
    • Industry Use Cases
      • PDF Generator for Human Resources
    • Videos
  • Technical Docs
    • Getting Started
    • Building a PDF Template
      • HTML to PDF Merge Templates
      • Printable Labels
        • Label Templates
        • Label Configuration
        • Adding New Avery Type Label Configuration
        • Printing Labels
      • Merge Keys
      • Data Sources
    • Generating a PDF Document
      • Create from Wizard
      • Create from Flow Action
      • Create from Script
    • The Generate PDF Wizard
      • PDF Wizard (Standard Forms)
      • PDF Wizard (Workspaces)
      • PDF Wizard (List View)
    • Adding QR / Barcodes to PDFs
      • How-to Create Barcode Labels
    • TinyMCE Configs
    • Logging
    • Troubleshooting
Powered by GitBook
On this page
  1. Technical Docs
  2. The Generate PDF Wizard

PDF Wizard (Workspaces)

PreviousPDF Wizard (Standard Forms)NextPDF Wizard (List View)

Last updated 1 day ago

In order to copy the Generate PDF UI Action for Workspace pages:

  1. Copy the wizard button

    1. Visit Yansa PDF Generator -> General Settings in the left nav.

    2. Right-click the form header and select Configure -> UI Actions.

    3. Select & open the UI Action titled 'Generate PDF (Sample).

    4. Update the Name and Table fields to match the table where you wish to place the button that will open the wizard. In the Workspace tab, ensure the Workspace Form Button & Format for Configurable Workspace checkboxes are selected. Following the instructions in the Workspace Client Script field, update code values to accommodate your needs (see below for details on available customizations). Insert and Stay to create a new copy of the UI Action.

  2. Visit the Workspace view for a record on the specified table. Click the button to open the Generate PDF wizard.

Customization Options

By default, the Generate PDF UI Action will have a Workspace Client Script similar to below:

var modalOptions = {};
modalOptions.source_table = 'sys_user';

g_modal.showFrame({
    url: 'x_yala_pdf_pdf_generator.do?' + jsonToParams(modalOptions),
    title: 'Generate PDF',
    size: 'xl',
    height: 500,
    callback: function() {
        location.reload();
    }
});

To customize the behavior of the wizard, you can set any option below on the modalOptions object.

Customize the Select Template step:

  • modalOptions.select_step_display: [boolean]: Show/hide the first 'Select template' step. Otherwise, template must be pre-set [default: true]

  • modalOptions.pdf_template: [sys_id of template]: Preset the selected template

  • modalOptions.pdf_template_read_only: [boolean]: Display the 'Select template' step, but enable/disable it as read-only [default: false]

  • modalOptions.pdf_template_display: [boolean]: Display the 'Select template' step, but show/hide the select box [default: true]

Customize the Merge Data step:

  • modalOptions.merge_step_display: [boolean]: Show/hide the second 'Merge data into PDF' step. Otherwise, data source/record must be pre-set [default: true]

  • modalOptions.source_table: [tableName]: Set the source table for merge data

  • modalOptions.source_table_include_extensions: [boolean]: Include extended tables from source table

  • modalOptions.source_record_table: [tableName]: Set the source table for merge data

  • modalOptions.source_record_id: [sys_id of record]: Set the source record for merge data

  • modalOptions.merge_read_only: [boolean]: Enable/disable the 'Merge data into PDF' step as read-only [default: false]

  • modalOptions.pdf_data_source: [sys_id of data source]: Set data source for merge data. (Note: Only applies to label printing)

Customize the Edit PDF step:

An optional 'Edit' step can be enabled wherein the content of the merged PDF document can be changed prior to the save/download step. This can be useful for situations where customization of the merged template is needed prior to finalization.

  • modalOptions.enable_edit: [boolean]: Enable editing the merged PDF document prior to save/download [default: false]

Customize the Save PDF step:

  • modalOptions.save_step_display: [boolean]: Show/hide the third 'Save PDF' step [default: true]

  • modalOptions.enable_download: [boolean]: Enable the 'Download' option [default: true]

  • modalOptions.enable_save_to_current_table: [tableName]: Enable the 'Attach to current' option. [default: false]

  • modalOptions.enable_save_to_current_id: [sys_id of record]: Enable the 'Attach to current' option. [default: false]

PDF Wizard