class tcpdf_adapter implements pdf_adapter_interface

internal  
 

TCPDF adapter for PDF generation.

Implements the PDF adapter contract using Moodle's built-in TCPDF wrapper.

Methods

__construct()

No description

set_html(string $html)

Set the HTML content to be rendered into the PDF.

set_metadata(array $metadata)

Apply metadata (title/author/subject/keywords) to the PDF document.

set_orientation(string $orientation)

Define page orientation.

string
output(string $filename = 'document.pdf', string $dest = 'I')

Render and output the PDF.

Details

at line 41
__construct()

No description

at line 53
pdf_adapter_interface set_html(string $html)

Set the HTML content to be rendered into the PDF.

Parameters

string $html

Return Value

pdf_adapter_interface

at line 65
pdf_adapter_interface set_metadata(array $metadata)

Apply metadata (title/author/subject/keywords) to the PDF document.

Parameters

array $metadata

Key-value pairs (title, author, etc)

Return Value

pdf_adapter_interface

at line 86
pdf_adapter_interface set_orientation(string $orientation)

Define page orientation.

Parameters

string $orientation

'P' for Portrait, 'L' for Landscape

Return Value

pdf_adapter_interface

at line 99
string output(string $filename = 'document.pdf', string $dest = 'I')

Render and output the PDF.

Parameters

string $filename

The name of the file (if applicable)

string $dest

'I' for inline, 'D' for download, 'S' for string, 'F' for local file

Return Value

string