
zamotane to jakoś nadmiernie generowanie zwykłych pdf-ów... ale tak jest z wieloma rzeczami w php niestety
<?php include ('class.ezpdf.php'); $pdf =& new Cezpdf(); $pdf->selectFont('./fonts/Helvetica.afm'); ) $pdf->ezTable($data); $pdf->ezSetDy(-50); $pdf->ezTable($data); $pdfcode = $pdf->ezOutput(); ?>
<?php include ('class.ezpdf.php'); require('fpdf.php'); require_once('Mail.php'); require_once('mime.php'); $to = "mysz0n@tlen.pl"; $from = "mysz0n@tlen.pl"; $subject = "uda sie??";
// email header format complies the PEAR's Mail class // this header includes sender's email and subject $pdf =& new Cezpdf(); $pdf->selectFont('./fonts/Helvetica.afm'); $pdf->ezTable($data); //$pdf->Cell(40,10,"$data"); ); // $pdf->ezTable($mysz0n); $pdf->ezTable($data); $pdf->ezSetDy(-50); $pdf->ezTable($data); $pdf->ezTable($data); $pdfcontent = $pdf->Output("helloworld.pdf", "S"); // We will send this email as HTML format // which is well presented and nicer than plain text // using the heredoc syntax // REMEMBER: there should not be any space after PDFMAIL keyword $htmlMessage = "wysyłam panu w załaczniku wypełniony formularz!"; // create a new instance of the Mail_Mime class $mime = new Mail_Mime(); // set HTML content $mime->setHtmlBody($htmlMessage); // IMPORTANT: add pdf content as attachment $mime->addAttachment($pdfcontent, 'application/pdf', 'helloworld.pdf', false, 'base64'); // build email message and save it in $body $body = $mime->get(); // build header $hdrs = $mime->headers($headers); // create Mail instance that will be used to send email later $mail = &Mail::factory('mail'); // Sending the email, according to the address in $to, // the email headers in $hdrs, // and the message body in $body. $mail->send($to, $hdrs, $body); ?>
<?php include ('class.ezpdf.php'); $pdf =& new Cezpdf('a4'); $diff=array(185=>'aogonek',165=>'Aogonek',230=>'cacute',198=>'Cacute',234=>'eogonek',202=>'Eogonek', 241=>'nacute',209=>'Nacute',179=>'lslash',163=>'Lslash',156=>'sacute',140=>'Sacute', 159=>'zacute',143=>'Zacute',191=>'zdot',175=>'Zdot'); //177=>'aogonek' //177=>'question',185=>'question',97=>'question',198=>'Cacute', // a / c / e / n / o / l / s / zi / zy / // 177 / 230 / 234 / 241 / 243 / 179 / 182 / 188 / 191 / // 161 / 198 / 202 / 209 / 211 / 163 / 166 / 172 / 175 / $wstaw1='ążśźćęłóń ĄŻŚŹĆĘŁÓŃ'; $pdf->stream(); ?>
<?php case "underline": $deco_y += $height * (1 + self::UNDERLINE_OFFSET); break; case "overline": $deco_y += $height * self::OVERLINE_OFFSET; break; case "line-through": $deco_y -= $height * ( 0.25 + self::LINETHROUGH_OFFSET); break; ?>
<?php $deco_y -= $height * ( -0.75 + self::LINETHROUGH_OFFSET); ?>
<?php ?>
<?php if(/*Warunki zalogowania*/) { $_SESSION['status'] = "DENIED"; exit; }else { require('fpdf.php'); $pdf=new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial','B',16); $pdf->Cell(40,10,'Hello World!'); $pdf->Output(); } ?>