tce_pdf.php

Configuration file for PDF documents (tc-lib-pdf).

Source: shared/config.default/tce_pdf.php

Configuration file for PDF documents (tc-lib-pdf).

Constants

K_DIGSIG_CERT_TYPE

The access permissions granted for this document.

Valid values shall be: 1 = No changes to the document shall be permitted; any change to the document shall invalidate the signature; 2 = Permitted changes shall be filling in forms, instantiating page templates, and signing; other changes shall invalidate the signature; 3 = Permitted changes shall be the same as for 2, as well as annotation creation, deletion, and modification; other changes shall invalidate the signature.

const K_DIGSIG_CERT_TYPE = '1'

Source: shared/config.default/tce_pdf.php:160

K_DIGSIG_CERTIFICATE

Signing certificate (string or filename prefixed with ‘file://’).

const K_DIGSIG_CERTIFICATE = 'file://../../shared/config/tcpdf.crt'

Source: shared/config.default/tce_pdf.php:136

K_DIGSIG_CONTACT

Information provided by the signer to enable a recipient to contact the signer to verify the signature; for example, a phone number or email address.

const K_DIGSIG_CONTACT = 'you@example.com'

Source: shared/config.default/tce_pdf.php:180

K_DIGSIG_ENABLE

If true digitally sign PDF documents.

const K_DIGSIG_ENABLE = \false

Source: shared/config.default/tce_pdf.php:131

K_DIGSIG_EXTRA_CERTS

Name of a file containing a bunch of extra certificates to include in the signature which can for example be used to help the recipient to verify the certificate that you used.

const K_DIGSIG_EXTRA_CERTS = ''

Source: shared/config.default/tce_pdf.php:151

K_DIGSIG_LOCATION

The CPU host name or physical location of the signing.

const K_DIGSIG_LOCATION = 'Office'

Source: shared/config.default/tce_pdf.php:170

K_DIGSIG_NAME

The name of the person or authority signing the document.

const K_DIGSIG_NAME = 'TCEXAM'

Source: shared/config.default/tce_pdf.php:165

K_DIGSIG_PASSWORD

Password for private key.

const K_DIGSIG_PASSWORD = 'tcpdfdemo'

Source: shared/config.default/tce_pdf.php:146

K_DIGSIG_PRIVATE_KEY

Private key (string or filename prefixed with ‘file://’).

const K_DIGSIG_PRIVATE_KEY = 'file://../../shared/config/tcpdf.crt'

Source: shared/config.default/tce_pdf.php:141

K_DIGSIG_REASON

The reason for the signing, such as ( I agree …).

const K_DIGSIG_REASON = 'Certification'

Source: shared/config.default/tce_pdf.php:175

K_PDF_ALLOWED_HOSTS

Serialized whitelist of remote host names the PDF engine may fetch over HTTP(S).

Remote URL loading is DISABLED by default (empty list) to prevent SSRF; add hosts (e.g. [‘cdn.example.com’]) only if your templates must load remote resources.

const K_PDF_ALLOWED_HOSTS = \serialize([])

Source: shared/config.default/tce_pdf.php:231

K_PDF_ALLOWED_PATHS

Serialized list of trusted local directory prefixes the PDF engine may read (images, fonts, cache, SVG temp files). Restricts file:// reads to these paths to prevent path traversal / arbitrary file disclosure.

const K_PDF_ALLOWED_PATHS = \serialize(\array_values(\array_filter([\realpath(\K_PATH_MAIN . 'images'), \realpath(\K_PATH_MAIN . 'cache'), \realpath(\K_PATH_MAIN . 'vendor/tecnickcom/tc-lib-pdf-font/target/fonts'), \defined('K_PATH_FONTS') ? \realpath(\K_PATH_FONTS) : \false, \realpath(\sys_get_temp_dir())])))

Source: shared/config.default/tce_pdf.php:215

K_PDF_COMPRESS

If true, compress the generated PDF stream.

const K_PDF_COMPRESS = \true

Source: shared/config.default/tce_pdf.php:199

K_PDF_MAX_REMOTE_SIZE

Maximum size, in bytes, accepted for a remote download (default 50 MiB).

const K_PDF_MAX_REMOTE_SIZE = 52428800

Source: shared/config.default/tce_pdf.php:236

K_PDF_MODE

PDF compliance mode. One of: ’’ (none), ‘pdfa1’, ‘pdfa2’, ‘pdfa3’, ‘pdfua1’, ‘pdfua2’.

const K_PDF_MODE = ''

Source: shared/config.default/tce_pdf.php:204

K_PDF_SUBSET_FONT

If true, subset embedded fonts (smaller files, slightly slower generation).

const K_PDF_SUBSET_FONT = \false

Source: shared/config.default/tce_pdf.php:194

K_PDF_UNICODE

If true, treat input text as Unicode (UTF-8). Disable only for legacy single-byte output.

const K_PDF_UNICODE = \true

Source: shared/config.default/tce_pdf.php:189

PDF_AUTHOR

Document author.

const PDF_AUTHOR = 'TCExam 12'

Source: shared/config.default/tce_pdf.php:63

PDF_FONT_NAME_DATA

Data font name.

See PDF_FONT_NAME_MAIN: DejaVu Sans is used so the test/answer content (which may be in any of the supported languages) renders with the correct glyphs.

const PDF_FONT_NAME_DATA = 'dejavusans'

Source: shared/config.default/tce_pdf.php:119

PDF_FONT_NAME_MAIN

Main font name.

DejaVu Sans is used by default because it carries a broad Unicode glyph set (Latin with diacritics, Cyrillic, Greek, …) so exported PDFs render the non-Latin languages TCExam supports. The 14 standard PDF fonts (e.g. helvetica) only cover Latin-1. For CJK content set a cid0* font here.

const PDF_FONT_NAME_MAIN = 'dejavusans'

Source: shared/config.default/tce_pdf.php:107

PDF_FONT_SIZE_DATA

Data font size.

const PDF_FONT_SIZE_DATA = 7

Source: shared/config.default/tce_pdf.php:124

PDF_FONT_SIZE_MAIN

Main font size.

const PDF_FONT_SIZE_MAIN = 9

Source: shared/config.default/tce_pdf.php:112

Image logo.

const PDF_HEADER_LOGO = 'logo_example.png'

Source: shared/config.default/tce_pdf.php:38

PDF_HEADER_LOGO_WIDTH

Header logo image width [mm].

const PDF_HEADER_LOGO_WIDTH = 20

Source: shared/config.default/tce_pdf.php:43

PDF_HEADER_STRING

Header description string.

const PDF_HEADER_STRING = "first row\nsecond row\nthird row"

Source: shared/config.default/tce_pdf.php:33

PDF_HEADER_TITLE

Header title.

const PDF_HEADER_TITLE = 'School name'

Source: shared/config.default/tce_pdf.php:28

PDF_MARGIN_BOTTOM

Bottom margin.

const PDF_MARGIN_BOTTOM = 30

Source: shared/config.default/tce_pdf.php:88

Footer margin.

const PDF_MARGIN_FOOTER = 10

Source: shared/config.default/tce_pdf.php:78

PDF_MARGIN_HEADER

Header margin.

const PDF_MARGIN_HEADER = 5

Source: shared/config.default/tce_pdf.php:73

PDF_MARGIN_LEFT

Left margin.

const PDF_MARGIN_LEFT = 15

Source: shared/config.default/tce_pdf.php:93

PDF_MARGIN_RIGHT

Right margin.

const PDF_MARGIN_RIGHT = 15

Source: shared/config.default/tce_pdf.php:98

PDF_MARGIN_TOP

Top margin.

const PDF_MARGIN_TOP = 27

Source: shared/config.default/tce_pdf.php:83

PDF_PAGE_FORMAT

Page format.

const PDF_PAGE_FORMAT = 'A4'

Source: shared/config.default/tce_pdf.php:53

PDF_PAGE_ORIENTATION

Page orientation (P=portrait, L=landscape).

const PDF_PAGE_ORIENTATION = 'P'

Source: shared/config.default/tce_pdf.php:58

PDF_TEXTANSWER_HEIGHT

Height of area for offline user answer.

const PDF_TEXTANSWER_HEIGHT = 40

Source: shared/config.default/tce_pdf.php:48

PDF_UNIT

Document unit of measure [pt=point, mm=millimeter, cm=centimeter, in=inch].

const PDF_UNIT = 'mm'

Source: shared/config.default/tce_pdf.php:68