class Creport extends Cezpdf { function Creport($p, $o) { $this->__construct($p, $o, 'none'); } } $pdf = new Creport('a4', 'portrait'); $pdf->ezSetMargins(20, 20, 20, 20); $mainFont = 'Times-Roman'; // select a font $pdf->selectFont($mainFont); $size = 12; $height = $pdf->getFontHeight($size); // modified to use the local file if it can $pdf->openHere('Fit'); $pdf->ezText("PNG grayscaled with alpha channel"); $pdf->ezImage('images/test_grayscaled_alpha.png', 0, 0, 'none', 'right'); if (isset($_GET['d']) && $_GET['d']) { $pdfcode = $pdf->ezOutput(1); $pdfcode = str_replace("\n", "\n<br>", htmlspecialchars($pdfcode)); echo '<html><body>'; echo trim($pdfcode); echo '</body></html>'; } else { //$pdf->ezStream(array('compress'=>0)); //die; //$pdf->options['compression']=0; $doc = $pdf->ezOutput(); $recipients = array('*****@*****.**'); /* boundary */