Output

Output PDF data

Namespace: Com\Tecnick\Pdf

abstract class Output extends MetaInfo

Extends: MetaInfo

Source: src/Output.php:117

Output PDF data

Methods

downloadPDF()

Trigger the browser Download dialog to download the PDF document.

public downloadPDF(string $rawpdf = ''): void

Parameters:

  • $rawpdf (string): Raw PDF data string from getOutPDFString().

Throws:

  • Throwable

Source: src/Output.php:6339

getMIMEAttachmentPDF()

Returns the PDF as base64 mime multi-part email attachment (RFC 2045).

public getMIMEAttachmentPDF(string $rawpdf = ''): string

Parameters:

  • $rawpdf (string): Raw PDF data string from getOutPDFString().

Returns: string: Email attachment as raw string.

Source: src/Output.php:6443

getOutPDFString()

Returns the RAW PDF string.

public getOutPDFString(): string

Returns: string: PDF document content.

Throws:

Source: src/Output.php:395

renderPDF()

Render the PDF in the browser or output the RAW data in the CLI.

public renderPDF(string $rawpdf = ''): void

Parameters:

  • $rawpdf (string): Raw PDF data string from getOutPDFString().

Throws:

  • Throwable

Source: src/Output.php:6300

savePDF()

Save the PDF document to a local file.

The file is written in the $path directory with the base name returned by getPDFFilename().

public savePDF(string $path = '', string $rawpdf = ''): void

Parameters:

  • $path (string): Path to the output directory.
  • $rawpdf (string): Raw PDF data string from getOutPDFString().

Throws:

  • Throwable

Source: src/Output.php:6422

Inherited members

From Base

From Cell

From CSS

From HTML

From JavaScript

From MetaInfo

From SVG

  • addSVG(): Add a new SVG image and return its object ID.
  • getSetSVG(): Get the PDF output string to print the specified SVG object.

From Text