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. Generating a PDF Document

Create from Script

Include the code below in any area where server-side scripting is allowed in order to generate & attach a PDF file.

var pdfHelper = new x_yala_pdf.PDFGenerator();
var resultData = pdfHelper.generateFromHTMLWithSourceAndAttach(pdfTemplate, fileName, sourceRecord, attachRecord);
  • pdfTemplate: GlideRecord of the HTML to PDF Merge Template to use

  • fileName: File name of the resulting attachment

  • sourceRecord: Source GlideRecord from which to derive any dynamic data in the PDF

  • attachRecord: Target GlideRecord where the PDF file should be attached

PreviousCreate from Flow ActionNextThe Generate PDF Wizard

Last updated 11 months ago