views:

58

answers:

1

Hi i am using tcpdf in my application and i have two question about that.I am able to get pdf output of a html page when i click specified button. My first question is:How can i download that html's pdf output when i click that button?($pdf->lastPage() didn'work). My second question is:How can i set character encoding for Trkish?(I am using dejavusans but some turkish characters appears as question mark)

Thank for advance...

+2  A: 

for the output you should take a look at the examples: http://www.tecnick.com/public/code/cp_dpage.php?aiocp_dp=tcpdf_examples

I would not recommend to set the character encoding to turkish. I recommend using utf8 instead. (dejavusans is not an encoding it as a font)

<?php
$pdf = new TCPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// create your PDF
$pdf->Output(); // This will Output the PDF to the Browser if a Plugin is installed or download the PDF file if not
jigfox