reportico-web / reportico

Reportico Open Source PHP report Designer
MIT License
166 stars 71 forks source link

farsi support in pdf #21

Open muhammad-naderi opened 6 years ago

muhammad-naderi commented 6 years ago

hi,

can you guid me through supporting farsi/persian language in pdf files? which config should I change? basically, where should i start ?

reportico-web commented 6 years ago

Hi there I think supporting farsi currently would involve configuring in new font... however there is a beta test version or reportico which uses the phaantomjs engine which renders pdfs from the HTML. This ught be you best option .. If your html output is showing farsi ok, then the PDF should be similar.

Ive given details of this release here .. http://www.reportico.org/swsite/site/forum/viewtopic.php?f=5&t=53067

But the idea is you use composer now to install it using the command

composer create-project reportico-web/reportico {WEB_FOLDER_TO INSTALL_TO} "dev-reportico-new-architecture" --prefer-dist

When you run the pdf output it will by default use this new method .. are you able to try that?

( i saw you also posted in the laravel page .. do you need this in the laravel plugin as support for this new engine is coming in the next couple of weeks )?

muhammad-naderi commented 6 years ago

Hi thanks for reply Yeah I need this in laravel actually, right now with both tspdf and fpdf I'm getting question marks instead of Farsi characters , I read somewhere that changing font would be the solution but as far as I tried changing fonts in the project config area and design area has no effect, maybe there is another config I'm missing? So as I understand, I need to wait for the laravel version ? Or is there a --prefer-dist mode for that as well?