From 1250b9e9491f71ec80f047b5a3c00c51b5307502 Mon Sep 17 00:00:00 2001 From: nicolaasuni Date: Sat, 25 Apr 2009 12:15:56 +0200 Subject: [PATCH] 4.6.005 + missing files --- examples/example_051.php | 108 +++++++++++++++++++++++++++++++++++++++ tcpdf.pem | 36 +++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 examples/example_051.php create mode 100644 tcpdf.pem diff --git a/examples/example_051.php b/examples/example_051.php new file mode 100644 index 0000000..8c6dee4 --- /dev/null +++ b/examples/example_051.php @@ -0,0 +1,108 @@ +AutoPageBreak; + $this->SetAutoPageBreak(false, 0); + $img_file = K_PATH_IMAGES.'image_demo.jpg'; + $this->Image($img_file, $x=0, $y=0, $w=210, $h=297, $type='', $link='', $align='', $resize=false, $dpi=300, $palign='', $ismask=false, $imgmask=false, $border=0); + $this->SetAutoPageBreak($auto_page_break); + } +} + +// create new PDF document +$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false); + +// set document information +$pdf->SetCreator(PDF_CREATOR); +$pdf->SetAuthor('Nicola Asuni'); +$pdf->SetTitle('TCPDF Example 051'); +$pdf->SetSubject('TCPDF Tutorial'); +$pdf->SetKeywords('TCPDF, PDF, example, test, guide'); + +// set header and footer fonts +$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); + +// set default monospaced font +$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); + +//set margins +$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); +$pdf->SetHeaderMargin(0); +$pdf->SetFooterMargin(0); + +// remove default footer +$pdf->setPrintFooter(false); + +//set auto page breaks +$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); + +//set image scale factor +$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); + +//set some language-dependent strings +$pdf->setLanguageArray($l); + +// --------------------------------------------------------- + +// set font +$pdf->SetFont('times', '', 48); + +// add a page +$pdf->AddPage(); + +// Pritn a text +$pdf->writeHTML('PAGE 1', $ln=true, $fill=false, $reseth=false, $cell=false, $align=''); + +// add a page +$pdf->AddPage(); + +// Pritn a text +$pdf->writeHTML('PAGE 2', $ln=true, $fill=false, $reseth=false, $cell=false, $align=''); + +// --------------------------------------------------------- + +//Close and output PDF document +$pdf->Output('example_051.pdf', 'I'); + +//============================================================+ +// END OF FILE +//============================================================+ +?> diff --git a/tcpdf.pem b/tcpdf.pem new file mode 100644 index 0000000..0727730 --- /dev/null +++ b/tcpdf.pem @@ -0,0 +1,36 @@ +-----BEGIN RSA PRIVATE KEY----- +MIICXQIBAAKBgQDCYF2R29GgR2rQ8sMpzopD3JKS5WRXntRV2pRq3tz3ae6nMjEb +7iay/9YtzXanyistJ9T4tLpzyBmh70AX9EDJz5P0reJc2jHwVYYYQR42SUTR+Myl +s1PQJ+Sw12D9/SflfS+9LBCOyFPNYpdl1evYPPQzzbinpg9deVVUhbl5pQIDAQAB +AoGBALWpXontSXNki74QxLmT4MEfqpVDco45UPWUPVXMR/Oru3HjhOY3o09zr3ZL +KnQSjFu9eFugfQmsn9gqRFqe2tSfvBw6p1ENK8yQyswlBf8P6FD3mPwCp1pUQAe2 +5bKXvPEJw+2uFkH08zygu7+n9UPlPOerA4v/xN222w1PTN1ZAkEA8VnT3pRY0J6A +isizyvkV4CWMrSNsukBnHeefS3AMsvno8Tfwa0oCMXxP89Ko6AmtbQAgDaTsfqra +e1PQ/BkFZwJBAM4soveqL3P1rusEbMNO3RgzEedVlQriL/SwFsaO6H1qPp+GQEB2 +XiHXdVMMQe71PDKDYhnsw8IiW/kDJKaqdRMCQQDEdn7FHLT/fUbdsmrIuuJXx7kv +5zpGks5dxYIiAmAUAOLiGMsYSvJmHe9nZwAfgmEt7YAqGyp4IdQfuCbST/vZAkBm +P7DazuYVxkRnfZxLCDOSKtG4PrNZ4G8UFLhW5MzcVfKUvsnirlFkyyv+cdfJI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