case 'ITA': $created = 'Creato il '; $sender = 'Mittente: '; $recipient = 'Destinatario: '; $date = 'Data: '; $title = 'Titolo: '; $page = 'Pagina'; break; default: $created = 'Created on '; $sender = 'Sender: '; $recipient = 'Recipient: '; $date = 'Date: '; $title = 'Title: '; $page = 'Page'; break; } $pdf = new myPDF(); $pdf->SetFooterData($config['site_url'], $page); $pdf->Open(); $pdf->SetAuthor($game->player['user_name']); $pdf->SetTitle($config['site_url']); $pdf->SetAutoPageBreak(true, 15.0); $pdf->AddPage(); $pdf->SetFont('Arial', 'I', 8); $pdf->MultiCell(0, 7, $created . date('d.m.y H:i', time()) . '', 0, 'R'); $pdf->SetFont('Arial', 'B', 16); $pdf->MultiCell(0, 7, '' . $pdf->MultiCell(0, 7, $sender . $sendername['user_name']), $pdf->MultiCell(0, 7, $recipient . $game->player['user_name']), $pdf->MultiCell(0, 7, $date . $time), $pdf->MultiCell(0, 7, $title . $subject)); $pdf->Ln(); $pdf->MultiCell(0, 7, $text, 1); $pdf->Output();
$pdf->SetSubject(''); $pdf->SetKeywords(''); // set default header data $pdf->SetHeaderData('header.jpg', PDF_HEADER_LOGO_WIDTH, '' . '', '', array(255, 255, 255), array(255, 255, 255)); $pdf->setFooterData(array(23, 54, 93), array(255, 255, 255)); // set header and footer fonts $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN)); $pdf->setFooterFont(array($fontname, '', PDF_FONT_SIZE_DATA)); // set default monospaced font $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED); // set margins $pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT); $pdf->SetHeaderMargin(1); $pdf->SetFooterMargin(PDF_MARGIN_FOOTER); // set auto page breaks $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM); // set image scale factor $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO); // --------------------------------------------------------- // set default font subsetting mode $pdf->setFontSubsetting(true); // Set font // dejavusans is a UTF-8 Unicode font, if you only need to // print standard ASCII chars, you can use core fonts like // helvetica or times to reduce file size. $pdf->SetFont('times', '', 11, '', true); // Add a page // This method has several options, check the source code documentation for more information. $pdf->AddPage(); // set text shadow effect //$pdf->setTextShadow(array('enabled'=>true, 'depth_w'=>0.2, 'depth_h'=>0.2, 'color'=>array(196,196,196), 'opacity'=>1, 'blend_mode'=>'Normal'));
case 'ITA': $created = 'Creato il '; $sender = 'Mittente: '; $recipient = 'Destinatario: '; $date = 'Data: '; $title = 'Titolo: '; $page = 'Pagina'; break; default: $created = 'Created on '; $sender = 'Sender: '; $recipient = 'Recipient: '; $date = 'Date: '; $title = 'Title: '; $page = 'Page'; break; } $pdf = new myPDF(); $pdf->SetFooterData($config['site_url'], $page); $pdf->Open(); $pdf->SetAuthor($game->player['user_name']); $pdf->SetTitle($config['site_url']); $pdf->SetAutoPageBreak(on, 15.0); $pdf->AddPage(); $pdf->SetFont('Arial', 'I', 8); $pdf->MultiCell(0, 7, $created . date('d.m.y H:i', time()) . '', 0, R); $pdf->SetFont('Arial', 'B', 16); $pdf->MultiCell(0, 7, '' . $pdf->MultiCell(0, 7, $sender . $sendername['user_name']), $pdf->MultiCell(0, 7, $recipient . $game->player['user_name']), $pdf->MultiCell(0, 7, $date . $time), $pdf->MultiCell(0, 7, $title . $subject)); $pdf->Ln(); $pdf->MultiCell(0, 7, $text, 1); $pdf->Output('' . $game->player['user_name'] . '_' . $id . '_Message.pdf', D);