[Lazarus] LazReport Images and Unicode
jesusrmx at yahoo.com.mx
Wed Jan 16 19:12:08 CET 2013
--- El lun 14-ene-13, Giuliano Colla <giuliano.colla at fastwebnet.it> escribió:
> 2) Report printout shows the Image, but skips Chinese
That's correct, TPostscriptCanvas do not support all unicode, Latin and Cyrillic should be fine though.
> 3) Pdf export shows the image, but replaces Chinese
> characters with question marks. I understand that PowerPdf
> doesn't support Unicode, but changing the font encoding from
> Unicode to Big5 doesn't help.
That's correct, PowerPdf is limited to Latin scripts.
> 4) Html export shows the Chinese characters, but doesn't
> show the image.
Yes, it doesn't export images. I think an option can be added to html exporter so it can export images too.
> 5) Text export shows the Chinese characters, but obviously
> doesn't show the image.
> Is there a way to get a printout which properly reproduces
> the Report preview?
> Can someone point me in the right direction?
There are at least two solutions, according to bug report http://bugs.freepascal.org/view.php?id=15161 using Qt interface should work. The other solution is exporting pages as images with Image Exporter, that I can confirm it does ok, see LazReport/source/addons/imgexport/lr_extexp.lpk
There is another possibility, for the future, time ago petr kristan made a CairoCanvas object that can be used instead of TPostscriptPrinterCanvas. After I fixed some things I made it work again but showing Chinese text and images was unsuccessful. It currently uses plain cairo to show text, I will try to improve it.
Jesus Reyes A.
More information about the Lazarus