horstoeko / zugferdvisualizer

Visualizer for ZUGFeRD/XRechnung/Factur-X
https://github.com/horstoeko/zugferdvisualizer
MIT License
15 stars 3 forks source link

How to add pdfFontData #1

Closed chris-sx closed 4 months ago

chris-sx commented 4 months ago

Hi, I want to use tt fonts in a template.

I found: $visualizer = new ZugferdVisualizer($document); $visualizer->setDefaultTemplate(); $visualizer->setTemplate($template); $visualizer->addPdfFontDirectory('/fonts/ttfonts'); $visualizer->setPdfFontDefault("DejaVuSans");

But how do I have to define "pdfFontData", which is used in function instanciatePdfEngine

Thanks

horstoeko commented 4 months ago

Hi @chris-sx,

thank you for contributing this question. Since this library is largely based on mPDF, please search there first to see if you can find what you are looking for. In my opinion, a good starting point would be this address. Otherwise, I can have another look myself to see if I can implement a good example...

Best regards

chris-sx commented 4 months ago

Hi

thanks, but how do I mix the array like in mpdf with the parameter “$document”, mPdf does not have an additional parameter

$visualizer = new ZugferdVisualizer($document);

Viele Grüße

Christian

horstoeko commented 4 months ago

Hi @chris-sx,

I have published a new release 1.0.8 that allows you to work with your own (user-defined) fonts. I have also adapted the documentation and the examples.

I would be delighted if you could send me feedback and a "thank you" if you like.

Kind regards