Path in the Gestor bibliotecas/pdf.php
When included (gestor_incluir_biblioteca('pdf')), it loads tFPDF (FPDF 1.84 with UTF-8 support) from gestor/bibliotecas/fpdf184/. After that, new tFPDF() is available to generate any PDF; the DejaVu fonts live in fpdf184/font/unifont/.
Its only function is pdf_voucher(), a leftover of a service sales system. No core module uses it.
pdf_voucher($params)
Generates an A4 PDF with the service image, the QR Code, title, customer name, document and phone, and the gestor/assets/images/logo-principal.png logo. It writes to a temporary file (sys_get_temp_dir()/pdf-<hash>) and returns the path; deleting the file is up to the caller.
Required: servicoImg, qrCodeImg, voucherTitulo, nome, documento, telefone. Optional: loteVariacao (shows voucherSubtitulo).
-
With a required one missing, it does nothing and returns
null. -
A missing
loteVariacaoraises an undefined-variable warning. -
The name is reduced to the first and last names, texts are cut at 37/28 bytes (accented characters may be split) and the labels are hard-coded in Portuguese.
For new PDFs, use tFPDF directly instead of this function.
Functions
Generated from gestor/bibliotecas/pdf.php · 1 functions
pdf_voucher
view source · line 49 ↗pdf_voucher(array|false $params = false): string|voidGera um PDF de voucher com informações do serviço e QR Code.
Parameters
$paramsarray|false- Parâmetros da função.
Returns