I'm trying to create a PDF file with dompdf, with Unicode characters, and with encryption. And if without [calling set]encryption I am succeeding to get the PDF ok, - when I call setEncryption, the letters disappear.
When the style tag in loaded HTML is added (with body { font-family: DejaVu Sans, sans-serif }), then when setEncryption is not called, the Cyrillic letters show up, but when I call setEncryption, it all just disappears, the English letters, too.
So I thought Cpdf is probably setting its own fonts, or should set, so I tried before setEncryption to call some setting fonts functions. I didn't find anywhere the examples of usage, so I don't know what the sequence of commands should be.
I tried the following:$dompdf->get_canvas()->get_cpdf(); $cpdf->setFontFamily('DejaVuSans.ufm', array( 'b' => 'DejaVuSans-Bold.ufm', 'i' => 'DejaVuSans-Oblique.ufm', 'bi' => 'DejaVuSans-BoldOblique.ufm', 'ib' => 'DejaVuSans-BoldOblique.ufm'));$cpdf->selectFont('DejaVuSans.ufm');$cpdf->setEncryption('', '', array( 'print' ));then I tried to even change the Cpdf file (in dompdf/lib folder), to include the DejaVu Sans font when it's calling its init on fonts. Then I called the following:$dompdf->get_canvas()->get_cpdf(); $cpdf->selectFont('DejaVuSans.ufm');$cpdf->setEncryption('', '', array( 'print' ));didn't help. Maybe you could suggest something?
Thank you!!
P.S. Is there any documentation on this kind of things?