New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Turkish Character Problem #440

Closed
gunaysirbudak opened this Issue Jan 20, 2019 · 1 comment

Comments

Projects
None yet
3 participants
@gunaysirbudak
Copy link

gunaysirbudak commented Jan 20, 2019

Hi,
I'm converting pdf from php file with html code from sql.
We use "ş ğ ı" character the question mark (?) appears for the characters.

If I write these characters with php echo before printing the data in sql, these characters appear.

html2pdf export code
`ob_start();
echo 'Ş Ğ Ü Ö Ç İ


ş ğ ü ö ç ı';
echo $proposal_template_detail->header;

                    echo $proposal_template_detail->entry_text;

                    echo $proposal_template_detail->note;

                    echo $proposal_template_detail->footer;

                    $content = ob_get_clean();
                    
                    $html2pdf = new Html2Pdf('P', 'A4', 'en', true, 'UTF-8', array(0, 0, 0, 0));
                    
                    $html2pdf->pdf->SetDisplayMode('fullpage');
                    $html2pdf->pdf->SetFont('dejavusans');
                    
                    $html2pdf->writeHTML($content);
                    ob_end_clean();               
                    
                    $html2pdf->output('test.pdf', 'D');`

example sql html code:

Merhaba {PERSON_FULLNAME},

Talebinize istinaden teklifimiz aşağıdadır.

Ş Ğ Ü Ö Ç İ
ş ğ ü ö ç ı

Ş

-->Ş
@LittleBigFox

This comment has been minimized.

Copy link
Contributor

LittleBigFox commented Jan 21, 2019

Hi!

Try to use unicode font, like
$pdf->SetFont('freesans');
Many language aren't supported by all fonts...

Regards,
LBF

@spipu spipu closed this Feb 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment