Two tips:
- An orientation of -900 is up and down.
- You can print barcodes by installing a free barcode font like Code39 on the window machine with php installed and then selecting it as a font.
printer_create_font
(PECL printer SVN)
printer_create_font — Crea un nuovo font
Descrizione
$tipo
, int $altezza
, int $larghezza
, int $spessore
, bool $corsivo
, bool $sottolineato
, bool $barrato
, int $orientamento
)
La funzione crea un nuovo font e restituisce il relativo handle. Il font è
utilizzato per scrivere testi. Per un esempio vedere
printer_select_font(). Il parametro tipo
è una stringa indicante il tipo di font. Altezza
indica l'altezza del font e larghezza ne indica la
larghezza. Il parametro spessore indica lo spessore del font
(il valore normale è 400), e può essere una delle seguente costanti predefinite:
-
PRINTER_FW_THIN: imposta un font sottile (100). -
PRINTER_FW_ULTRALIGHT: imposta un font molto leggero (200). -
PRINTER_FW_LIGHT: imposta un font leggero (300). -
PRINTER_FW_NORMAL: imposta un font normale (400). -
PRINTER_FW_MEDIUM: imposta un font medio (500). -
PRINTER_FW_BOLD: imposta il font a grassetto (700). -
PRINTER_FW_ULTRABOLD: imposta il font ad un grassetto maggiore (800). -
PRINTER_FW_HEAVY: imposta un font grosso (900).
Il parametro corsivo può essere TRUE o FALSE,
ed indica se il font debba essere corsivo.
Il parametro sottolineato può essere TRUE o FALSE,
e indica se il font debba essere sottolineato.
Il parametro barrato può essere TRUE o FALSE,
e indica se il font debba essere barrato.
Il parametro orientamento specifica la rotazione.
Per un esempio vedere printer_select_font().
Note that the orientation value is a 3-digit number where, for instance, an orientation of 90° requires a value of 900.
