Table of contents
Package: com\tecnick\tcexam\shared
Extends: Tcpdf
File: tce_pdf_report.php line 34
Tags
- class: TcePdfReport tc-lib-pdf subclass that renders TCExam report PDFs from HTML. Provides an automatic page header/footer (via defaultPageContent) and a vertical content cursor so successive HTML blocks flow down the page.
Methods
__construct()
File: tce_pdf_report.php line 74
public __construct() : mixed
Tags
- throws: Exception if the default PDF font cannot be loaded.
addReportPage()
File: tce_pdf_report.php line 197
public addReportPage() : void
defaultPageContent()
File: tce_pdf_report.php line 326
public defaultPageContent([int $pid = -1 ]) : string
Invoked automatically by addPage() when enableDefaultPageContent() is on.
Parameters
- $pid : int = -1: Page index.
Return values
string —
Raw PDF content stream prepended to the page.
enablePageDecoration()
File: tce_pdf_report.php line 230
public enablePageDecoration(bool $on) : void
Parameters
- $on : bool: True to draw the header/footer on subsequent pages.
outputReport()
File: tce_pdf_report.php line 311
public outputReport([string $filename = 'tcexam_report.pdf' ]) : void
Parameters
- $filename : string = ’tcexam_report.pdf’: Suggested download file name.
printQuestionStats()
File: tce_pdf_report.php line 485
public printQuestionStats(array<string|int, mixed> $stats[, int $display_mode = 2 ]) : void
Parameters
- $stats : array<string|int, mixed>: Data to print.
- $display_mode : int = 2: 2 = module; 3 = + subject; 4 = + question; 5 = + answer.
printSVGStatsGraph()
File: tce_pdf_report.php line 1063
public printSVGStatsGraph(string $svgdata) : void
Parameters
- $svgdata : string: SVG graph data (legacy F_getSVGGraphCode input).
printTestResultStat()
File: tce_pdf_report.php line 594
public printTestResultStat(array<string|int, mixed> $data[, bool $pubmode = false ][, int $stats = 2 ]) : void
Parameters
- $data : array<string|int, mixed>: Test statistics.
- $pubmode : bool = false: If true, filter for the public interface (hide user column).
- $stats : int = 2: 2 = full stats; 1 = user stats; 0 = disabled.
printTestUserInfo()
File: tce_pdf_report.php line 746
public printTestUserInfo(array<string|int, mixed> $data[, bool $onlytext = false ]) : void
Parameters
- $data : array<string|int, mixed>: Testuser data.
- $onlytext : bool = false: If true, print only free-text questions.
printUserTestDetails()
File: tce_pdf_report.php line 863
public printUserTestDetails(array<string|int, mixed> $data[, bool $onlytext = false ]) : void
Parameters
- $data : array<string|int, mixed>: Testuser data.
- $onlytext : bool = false: If true, print only free-text questions.
setReportHeader()
File: tce_pdf_report.php line 176
public setReportHeader(string $title[, string $string = '' ][, string $logo = '' ][, float $logowidth = 0.0 ]) : void
Parameters
- $title : string: Header title (left, bold).
- $string : string = ‘’: Header descriptive text.
- $logo : string = ‘’: Logo file name (under K_PATH_IMAGES), or empty.
- $logowidth : float = 0.0: Logo width in mm.
setTCExamBackLink()
File: tce_pdf_report.php line 189
public setTCExamBackLink(string $link) : void
Parameters
- $link : string: URL link.
writeReportHTML()
File: tce_pdf_report.php line 252
public writeReportHTML(string $html) : void
The tc-lib-pdf HTML engine handles wrapping and internal page breaks.
Parameters
- $html : string: HTML content to render.