Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Api

The PDFoundry API

You can access the API with ui.PDFoundry.

Hierarchy

  • Api

Index

Other Accessors

Utility Accessors

Open Methods

Other Methods

PDFData Methods

Utility Methods

Debug Object literals

Other Accessors

Static activeTheme

Static availableThemes

  • get availableThemes(): {}

Utility Accessors

Static Utilities

  • get Utilities(): { canOpenPDF: canOpenPDF; deletePDFData: deletePDFData; getAbsoluteURL: getAbsoluteURL; getPDFData: getPDFData; getRoutePrefix: getRoutePrefix; getUserIdsExceptMe: getUserIdsExceptMe; isEntityPDF: isEntityPDF; setPDFData: setPDFData; validateAbsoluteURL: validateAbsoluteURL }
  • A reference to the unclassified utility functions.

    category

    Utility

    Returns { canOpenPDF: canOpenPDF; deletePDFData: deletePDFData; getAbsoluteURL: getAbsoluteURL; getPDFData: getPDFData; getRoutePrefix: getRoutePrefix; getUserIdsExceptMe: getUserIdsExceptMe; isEntityPDF: isEntityPDF; setPDFData: setPDFData; validateAbsoluteURL: validateAbsoluteURL }

    • canOpenPDF: canOpenPDF
    • deletePDFData: deletePDFData
    • getAbsoluteURL: getAbsoluteURL
    • getPDFData: getPDFData
    • getRoutePrefix: getRoutePrefix
    • getUserIdsExceptMe: getUserIdsExceptMe
    • isEntityPDF: isEntityPDF
    • setPDFData: setPDFData
    • validateAbsoluteURL: validateAbsoluteURL

Open Methods

Static openPDF

Static openPDFByCode

Static openPDFByName

Static openURL

  • openURL(url: string, page?: number, cache?: boolean): Promise<BaseViewer>
  • Open a URL as a static PDF. For form fillable PDFs you muse use Api.openPDF

    Parameters

    • url: string

      The URL to open (must be absolute).

    • Default value page: number = 1

      Which page to open to. Must be >= 1.

    • Default value cache: boolean = true

      If URL based caching should be used.

    Returns Promise<BaseViewer>

Other Methods

Static getTheme

Static registerTheme

  • registerTheme(id: string, name: string, filePath: string): void
  • Register a theme for use with PDFoundry. You must register a theme before ready. Do so in setup.

    Parameters

    • id: string

      The unique id of the theme. Providing an already existing id will over-write the existing theme.

    • name: string

      The user-facing display name of the theme.

    • filePath: string

      The relative path of the theme css file

    Returns void

PDFData Methods

Static findPDFData

  • Finds a PDF entity created by the user and constructs a PDFData object of the resulting PDF's data.

    Parameters

    • comparer: PDFValidator

      A comparison function that will be used.

    • Default value allowInvisible: boolean = true

      See allowVisible on findPDFEntity

    Returns PDFData | undefined

Static findPDFDataByCode

  • findPDFDataByCode(code: string, allowInvisible?: boolean): PDFData | undefined

Static findPDFDataByName

  • findPDFDataByName(name: string, caseInsensitive?: boolean, allowInvisible?: boolean): PDFData | undefined
  • Helper method. Alias for Api.findPDFData with a comparer that searches by PDF Name.

    Parameters

    • name: string

      Which name to search for a PDF with.

    • Default value caseInsensitive: boolean = true

      If a case insensitive search should be done.

    • Default value allowInvisible: boolean = true

      See allowVisible on findPDFEntity

    Returns PDFData | undefined

Static findPDFEntity

  • findPDFEntity(comparer: PDFValidator, allowInvisible?: boolean): JournalEntry | undefined
  • Find a PDF containing journal entry from the journals directory using a specified comparer.

    Parameters

    • comparer: PDFValidator

      The function to compare PDF data with.

    • Default value allowInvisible: boolean = true

      If true, PDFs hidden from the active user will be returned.

    Returns JournalEntry | undefined

Utility Methods

Static showHelp

Debug Object literals

Static DEBUG

DEBUG: object

Enable additional debug information for the specified category.

EVENTS

EVENTS: boolean = false

When set to true, enables the logging event names and arguments to console.

Generated using TypeDoc