monospace font for accountant report

0

Hi, I'm using HTML2PDF and I'm having trouble setting a default font to a pdf report and it's monospace:

function InitPDFSistem() {
        $P           = [];
        $P['CONT']   = ''; #Contenido
        $P['FNAME']  = 'Documento Contable'; #Contenido
        $P['VIEW']   = 'P'; #Forma de Vista P=Portrait, L=Landscape
        $P['PSIZE']  = 'LETTER'; #Tamaño de la pagina
        $P['LANG']   = 'en'; #Lenguaje
        $P['TITTLE'] = 'Documento sin Titulo'; #Titulo
        $P['AUTOR']  = 'Usuario de Sistema'; #Autor
        $P['F']      = 0;
        $P['out']    = true; #output param
        return $P;
    }

function GenPDF2List($P) {
        try {
            $html2pdf = new HTML2PDF($P['VIEW'], $P['PSIZE'], $P['LANG']);
            if ($P['F']==0) {
                $html2pdf->setDefaultFont("courier");
            }elseif($P['F']==1) {
                $html2pdf->setDefaultFont("dot_matrix2");
            }
            $html2pdf->pdf->SetAuthor($P['AUTOR']);
            $html2pdf->pdf->SetTitle($P['TITTLE']);
            $html2pdf->writeHTML($P['CONT']);
            $P['DOC'] = $html2pdf->Output($P['FNAME'], $P['out']);
            return $P;
        } catch (HTML2PDF_exception $e) {
            echo $e;
        }
    }

it's just not monospace the curier, how can I get it to be monospace.

    
asked by Francisco Núñez 01.02.2018 в 21:24
source

0 answers