本文整理汇总了PHP中Cpdf类的典型用法代码示例。如果您正苦于以下问题:PHP Cpdf类的具体用法?PHP Cpdf怎么用?PHP Cpdf使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Cpdf类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: Cpdf
include 'includes/session.inc';
if (isset($_POST['PrintPDF'])) {
include 'includes/class.pdf.php';
/* A4_Landscape */
$Page_Width = 842;
$Page_Height = 595;
$Top_Margin = 20;
$Bottom_Margin = 20;
$Left_Margin = 25;
$Right_Margin = 22;
// Javier: now I use the native constructor
// $PageSize = array(0,0,$Page_Width,$Page_Height);
/* Standard PDF file creation header stuff */
// Javier: better to not use references
// $pdf = & new Cpdf($PageSize);
$pdf = new Cpdf('L', 'pt', 'A4');
$pdf->addInfo('Author', 'webERP ' . $Version);
$pdf->addInfo('Creator', 'webERP http://www.weberp.org');
$pdf->addInfo('Title', _('Inventory Planning Based On Lead Time Of Preferred Supplier') . ' ' . Date($_SESSION['DefaultDateFormat']));
// $PageNumber = 0;
$pdf->addInfo('Subject', _('Inventory Planning Based On Lead Time Of Preferred Supplier'));
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->setAutoPageBreak(0);
// Javier: needs check.
$pdf->setPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->AddPage();
// $this->SetLineWidth(1); Javier: It was ok for FPDF but now is too gross with TCPDF. TCPDF defaults to 0'57 pt (0'2 mm) which is ok.
$pdf->cMargin = 0;
开发者ID:strollClouds,项目名称:snkStudy,代码行数:31,代码来源:InventoryPlanningPrefSupplier.php
示例2: Cpdf
$PrintPDF = $_POST['PrintPDF'];
}
if (!isset($_POST['ToTransNo']) or trim($_POST['ToTransNo']) == '' or filter_number_format($_POST['ToTransNo']) < $FromTransNo) {
$_POST['ToTransNo'] = $FromTransNo;
}
$FirstTrans = $FromTransNo;
/* Need to start a new page only on subsequent transactions */
if (isset($PrintPDF) and $PrintPDF != '' and isset($FromTransNo) and isset($InvOrCredit) and $FromTransNo != '') {
include 'includes/class.pdf.php';
$Page_Width = 595;
$Page_Height = 842;
$Top_Margin = 30;
$Bottom_Margin = 30;
$Left_Margin = 40;
$Right_Margin = 30;
$pdf = new Cpdf('P', 'pt', 'A4');
$pdf->addInfo('Author', 'webERP ' . $Version);
$pdf->addInfo('Creator', 'webERP http://www.weberp.org');
if ($InvOrCredit == 'Invoice') {
$pdf->addInfo('Title', _('Sales Invoice') . ' ' . $FromTransNo . ' to ' . $_POST['ToTransNo']);
$pdf->addInfo('Subject', _('Invoices from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
} else {
$pdf->addInfo('Title', _('Sales Credit Note'));
$pdf->addInfo('Subject', _('Credit Notes from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
}
$pdf->setAutoPageBreak(0);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$pdf->cMargin = 0;
$FirstPage = true;
开发者ID:sjhelios,项目名称:trikemindo,代码行数:31,代码来源:PrintCustTransPortrait.php
示例3: Cpdf
//| Author: Michael Botsko |
//+----------------------------------------------------------------------+
//
// $Id: notepaper.php,v 1.1 2007-01-08 19:12:54 botskonet Exp $
//+----------------------------------------------------------------------+
//| ABSOLUTELY DO NOT CHANGE THE FOLLOWING LINES |
//+----------------------------------------------------------------------+
if (file_exists("class.pdf.php")) {
include "class.pdf.php";
} else {
print "I can't work without the PDF class.";
}
//+----------------------------------------------------------------------+
//| BEGIN THE GENERATOR
//+----------------------------------------------------------------------+
$pdf = new Cpdf(array(0, 0, 598, 842));
$pdf->selectFont('fonts/' . $_GET['my_font']);
//+----------------------------------------------------------------------+
//| SET DEFAULT MARGINS
//+----------------------------------------------------------------------+
$page_length = 792;
// Length of page
$page_width = 612;
// Length of page
$bottom_margin = 30;
$left_margin = 20;
$right_margin = 20;
$line_height = strip_tags($_GET['line_height']);
// line height
//+----------------------------------------------------------------------+
//| CREATE PUNCH HOLES AND ADJUST LEFT MARGIN
开发者ID:Bloodknight,项目名称:notepad-generator,代码行数:31,代码来源:notepaper.php
示例4: Cpdf
$Page_Height = 612;
// 72 * 8.5 inch
$Top_Margin = 50;
// Half inch = 72/2
$Bottom_Margin = 40;
// Half inch = 72/2
$Left_Margin = 30;
// Half inch = 72/2
$Right_Margin = 25;
// Half inch = 72/2
break;
default:
$DocumentOrientation = 'L';
break;
}
// Javier: I correct the call to the constructor to match TCPDF (and FPDF ;-)
// $PageSize = array(0,0,$Page_Width,$Page_Height);
// $pdf = new Cpdf($PageSize);
$pdf = new Cpdf($DocumentOrientation, 'pt', $DocumentPaper);
$pdf->addInfo('Creator', 'KwaMoja http://www.kwamoja.com');
$pdf->addInfo('Author', 'KwaMoja ' . $_SESSION['VersionNumber']);
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->SetPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->setAutoPageBreak(0);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$pdf->cMargin = 0;
/* END Brought from class.pdf.php constructor */
开发者ID:rrsc,项目名称:KwaMoja,代码行数:31,代码来源:PDFStarter.php
示例5: Cpdf
$Right_Margin = 25;
break;
case 'legal_landscape':
$DocumentPaper = 'LEGAL';
$DocumentOrientation = 'L';
$Page_Width = 1008;
$Page_Height = 612;
$Top_Margin = 50;
$Bottom_Margin = 40;
$Left_Margin = 30;
$Right_Margin = 25;
break;
}
// Javier: I correct the call to the constructor to match TCPDF (and FPDF ;-)
// $PageSize = array(0,0,$Page_Width,$Page_Height);
// $pdf = new Cpdf($PageSize);
$pdf = new Cpdf($DocumentOrientation, 'pt', $DocumentPaper);
$pdf->addInfo('Creator', 'WebERP http://www.web-erp.org');
$pdf->addInfo('Author', 'WebERP ' . $_SESSION['VersionNumber']);
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->SetAutoPageBreak(true, 0);
// Javier: needs check.
$pdf->SetPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->AddPage();
// $this->SetLineWidth(1); Javier: It was ok for FPDF but now is too gross with TCPDF. TCPDF defaults to 0'57 pt (0'2 mm) which is ok.
$pdf->cMargin = 0;
// Javier: needs check.
/* END Brought from class.pdf.php constructor */
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:PDFStarter.php
示例6: Cpdf
break;
case 'A6_Landscape':
$DocumentPaper = 'A6';
$DocumentOrientation = 'L';
$Page_Width = 417;
$Page_Height = 295;
$Top_Margin = 10;
$Bottom_Margin = 10;
$Left_Margin = 10;
$Right_Margin = 10;
break;
default:
$DocumentOrientation = 'L';
break;
}
// Javier: I correct the call to the constructor to match TCPDF (and FPDF ;-)
// $PageSize = array(0,0,$Page_Width,$Page_Height);
// $pdf = new Cpdf($PageSize);
$pdf = new Cpdf($DocumentOrientation, 'pt', $DocumentPaper);
$pdf->addInfo('Creator', 'webERP http://www.weberp.org');
$pdf->addInfo('Author', 'WebERP ' . $Version);
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->SetPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->setAutoPageBreak(0);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$pdf->cMargin = 0;
/* END Brought from class.pdf.php constructor */
开发者ID:fgaudenzi,项目名称:webERP-bootstrap,代码行数:31,代码来源:PDFStarter.php
示例7: Cpdf
$DocumentPaper = 'LEGAL';
$DocumentOrientation = 'L';
$Page_Width = 1008;
$Page_Height = 612;
$Top_Margin = 50;
$Bottom_Margin = 40;
$Left_Margin = 30;
$Right_Margin = 25;
break;
default:
$DocumentOrientation = 'L';
break;
}
// Javier: I correct the call to the constructor to match TCPDF (and FPDF ;-)
// $PageSize = array(0,0,$Page_Width,$Page_Height);
// $pdf = new Cpdf($PageSize);
$pdf = new Cpdf($DocumentOrientation, 'pt', $DocumentPaper);
$pdf->addInfo('Creator', 'KwaMoja http://www.kwamoja.org');
$pdf->addInfo('Author', 'KwaMoja ' . $Version);
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->SetAutoPageBreak(true, 0);
// Javier: needs check.
$pdf->SetPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->AddPage();
// $this->SetLineWidth(1); Javier: It was ok for FPDF but now is too gross with TCPDF. TCPDF defaults to 0'57 pt (0'2 mm) which is ok.
$pdf->cMargin = 0;
// Javier: needs check.
/* END Brought from class.pdf.php constructor */
开发者ID:BackupTheBerlios,项目名称:kwamoja,代码行数:31,代码来源:PDFStarter.php
示例8: array
$Left_Margin = 30;
$Right_Margin = 25;
break;
case 'legal':
$Page_Width = 612;
$Page_Height = 1008;
$Top_Margin = 50;
$Bottom_Margin = 40;
$Left_Margin = 30;
$Right_Margin = 25;
break;
case 'legal_landscape':
$Page_Width = 1008;
$Page_Height = 612;
$Top_Margin = 50;
$Bottom_Margin = 40;
$Left_Margin = 30;
$Right_Margin = 25;
break;
}
$PageSize = array(0, 0, $Page_Width, $Page_Height);
$pdf = new Cpdf($PageSize);
$pdf->addinfo('Author', 'webERP ' . $Version);
$pdf->addinfo('Creator', 'webERP http://www.weberp.org');
/*depending on the language this font is modified see includes/class.pdf.php
selectFont method interprets the text helvetica to be:
for Chinese - BIg5
for Japanese - SJIS
for Korean - UHC
*/
$pdf->selectFont('helvetica');
开发者ID:stateless,项目名称:weberp-cvs,代码行数:31,代码来源:PDFStarter.php
示例9: session_start
<?php
session_start();
//echo "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH";
include_once 'include/config.inc.php';
include_once 'include/util.inc.php';
//echo "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKDDDDDDD";
include_once 'pdfClass/class.pdf.php';
$util = new Util();
//echo "JJJJJJJJJJJJJJJJJJJJ";
//$util->securAdmin($_SESSION);
//echo "KKKKKKKKKKKKKK";
//exit;
//$pdf = new Cpdf(array(0,0,684,297));
$pdf = new Cpdf(array(0, 0, 684, 297));
$pdf->selectFont('pdfClass/fonts/Helvetica');
for ($i = 1; $i <= $_POST[total]; $i++) {
$login = $util->createPassword();
//$pass=$util->createPassword();
$sql = "insert into tbcard values('cardId','{$login}',NOW(),'{$balance}','1','none','')";
mysql_query($sql);
//$util->insertAccount($login,$pass,$_POST[balance]);
//echo "HHHH";
if ($i != 1) {
$pdf->newPage();
}
$pdf->addText(60, 235, 14, '<b>PREPAID CARD</b>');
$pdf->addText(60, 200, 12, '<b>Balance</b>: ' . number_format($_POST[balance], 2));
$pdf->addText(60, 160, 12, '<b>Code</b>: ' . $login);
//$pdf->addText(40,190,12,'<b>Password</b>: '.$pass);
}
开发者ID:jiyokaa,项目名称:centerprint,代码行数:31,代码来源:printPreview.php
示例10: Cpdf
/*Set specifically for the stationery being used -needs to be modified for clients own
packing slip 2 part stationery is recommended so storeman can note differences on and
a copy retained */
//Javier
// $Page_Width=807;
$Page_Width = 792;
$Page_Height = 612;
$Top_Margin = 34;
$Bottom_Margin = 20;
$Left_Margin = 15;
$Right_Margin = 10;
// Javier: now I use the native constructor
// Javier: better to not use references
// $PageSize = array(0,0,$Page_Width,$Page_Height);
// $pdf = & new Cpdf($PageSize);
$pdf = new Cpdf('L', 'pt', 'LETTER');
$pdf->addInfo('Creator', 'webERP http://www.web-erp.org');
$pdf->addInfo('Author', 'webERP ' . $Version);
$pdf->addInfo('Title', _('Customer Packing Slip'));
$pdf->addInfo('Subject', _('Packing slip for order') . ' ' . $_GET['TransNo']);
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->setAutoPageBreak(0);
// Javier: needs check.
$pdf->setPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->AddPage();
// $this->SetLineWidth(1); Javier: It was ok for FPDF but now is too gross with TCPDF. TCPDF defaults to 0'57 pt (0'2 mm) which is ok.
$pdf->cMargin = 0;
// Javier: needs check.
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:PrintCustOrder.php
示例11: Cpdf
$text .= "Unterwegs traf es eine Copy. Die Copy warnte das Blindtextchen, da, wo sie herkäme wäre sie zigmal umgeschrieben worden und alles, was von ihrem Ursprung noch übrig wäre, sei das Wort \"und\" und das Blindtextchen solle umkehren und wieder in sein eigenes, sicheres Land zurückkehren.\n\n";
$text .= "Doch alles Gutzureden konnte es nicht überzeugen und so dauerte es nicht lange, bis ihm ein paar heimtückische Werbetexter auflauerten, es mit Longe und Parole betrunken machten und es dann in ihre Agentur schleppten, wo sie es für ihre Projekte wieder und wieder mißbrauchten. Und wenn es nicht umgeschrieben wurde, dann benutzen Sie es immernoch.\n\n";
$text .= "Weit hinten, hinter den Wortbergen, fern der Länder Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohnen Sie in Buchstabhausen an der Küste des Semantik, eines großen Sprachozeans. Ein kleines Bächlein namens Duden fließt durch ihren Ort und versorgt sie mit den nötigen Regelialien. Es ist ein paradiesmatisches Land, in dem einem gebratene Satzteile in den Mund fliegen. Nicht einmal von der allmächtigen Interpunktion werden die Blindtexte beherrscht ? ein geradezu unorthographisches Leben.\n\n";
$text .= "Eines Tages aber beschloß eine kleine Zeile Blindtext, ihr Name war Lorem Ipsum, hinaus zu gehen in die weite Grammatik. Der große Oxmox riet ihr davon ab, da es dort wimmele von bösen Kommata, wilden Fragezeichen und hinterhältigen Semikoli, doch das Blindtextchen ließ sich nicht beirren. Es packte seine sieben Versalien, schob sich sein Initial in den Gürtel und machte sich auf den Weg.\n\n";
$text .= "Als es die ersten Hügel des Kursivgebirges erklommen hatte, warf es einen letzten Blick zurück auf die Skyline seiner Heimatstadt Buchstabhausen, die Headline von Alphabetdorf und die Subline seiner eigenen Straße, der Zeilengasse. Wehmütig lief ihm eine rethorische Frage über die Wange, dann setzte es seinen Weg fort.\n\n";
$text .= "Unterwegs traf es eine Copy. Die Copy warnte das Blindtextchen, da, wo sie herkäme wäre sie zigmal umgeschrieben worden und alles, was von ihrem Ursprung noch übrig wäre, sei das Wort \"und\" und das Blindtextchen solle umkehren und wieder in sein eigenes, sicheres Land zurückkehren.\n\n";
$text .= "Doch alles Gutzureden konnte es nicht überzeugen und so dauerte es nicht lange, bis ihm ein paar heimtückische Werbetexter auflauerten, es mit Longe und Parole betrunken machten und es dann in ihre Agentur schleppten, wo sie es für ihre Projekte wieder und wieder mißbrauchten. Und wenn es nicht umgeschrieben wurde, dann benutzen Sie es immernoch.\n\n";
$text .= "Weit hinten, hinter den Wortbergen, fern der Länder Vokalien und Konsonantien leben die Blindtexte. Abgeschieden wohnen Sie in Buchstabhausen an der Küste des Semantik, eines großen Sprachozeans. Ein kleines Bächlein namens Duden fließt durch ihren Ort und versorgt sie mit den nötigen Regelialien. Es ist ein paradiesmatisches Land, in dem einem gebratene Satzteile in den Mund fliegen. Nicht einmal von der allmächtigen Interpunktion werden die Blindtexte beherrscht ? ein geradezu unorthographisches Leben.\n\n";
$text .= "Eines Tages aber beschloß eine kleine Zeile Blindtext, ihr Name war Lorem Ipsum, hinaus zu gehen in die weite Grammatik. Der große Oxmox riet ihr davon ab, da es dort wimmele von bösen Kommata, wilden Fragezeichen und hinterhältigen Semikoli, doch das Blindtextchen ließ sich nicht beirren. Es packte seine sieben Versalien, schob sich sein Initial in den Gürtel und machte sich auf den Weg.\n\n";
$text .= "Als es die ersten Hügel des Kursivgebirges erklommen hatte, warf es einen letzten Blick zurück auf die Skyline seiner Heimatstadt Buchstabhausen, die Headline von Alphabetdorf und die Subline seiner eigenen Straße, der Zeilengasse. Wehmütig lief ihm eine rethorische Frage über die Wange, dann setzte es seinen Weg fort.\n\n";
$text .= "Unterwegs traf es eine Copy. Die Copy warnte das Blindtextchen, da, wo sie herkäme wäre sie zigmal umgeschrieben worden und alles, was von ihrem Ursprung noch übrig wäre, sei das Wort \"und\" und das Blindtextchen solle umkehren und wieder in sein eigenes, sicheres Land zurückkehren.\n\n";
$text .= "Doch alles Gutzureden konnte es nicht überzeugen und so dauerte es nicht lange, bis ihm ein paar heimtückische Werbetexter auflauerten, es mit Longe und Parole betrunken machten und es dann in ihre Agentur schleppten, wo sie es für ihre Projekte wieder und wieder mißbrauchten. Und wenn es nicht umgeschrieben wurde, dann benutzen Sie es immernoch.\n\n";
$pdf = 0;
if ($pdf == 1) {
include_once $pathvars["libraries"] . "xtra.pdf.php";
$pdf = new Cpdf(array(0, 0, 595.28, 841.89));
$pdf->selectFont('./fonts/Helvetica.afm');
$pdf->openHere("Fit");
#$pdf->setPreferences( "HideToolbar", true);
#$pdf->setPreferences( "HideMenubar", true);
#$pdf->setPreferences( "HideWindowUI", true);
#$pdf->setPreferences( "FitWindow", true);
#$pdf->setPreferences( "CenterWindow",true);
#$pdf->setPreferences( "NonFullScreenPageMode",True); // UseNone, UseOutlines, UseThumbs
$unten = 50;
$links = 20;
$oben = 820;
$pdf->addText($links, $oben, 11, 'links oben');
$pdf->addText($links, $unten, 11, 'links unten');
$pdf->addText(500, $oben, 11, 'rechts oben');
$pdf->addText(500, $unten, 11, 'rechts unten');
开发者ID:BackupTheBerlios,项目名称:ewebuki-svn,代码行数:31,代码来源:listendruck-testing.inc.php
示例12: Cpdf
include 'includes/SQL_CommonFunctions.inc';
if (isset($_POST['PrintPDF'])) {
include 'includes/class.pdf.php';
/* A4_Landscape */
$Page_Width = 842;
$Page_Height = 595;
$Top_Margin = 20;
$Bottom_Margin = 20;
$Left_Margin = 25;
$Right_Margin = 22;
// Javier: now I use the native constructor
// $PageSize = array(0,0,$Page_Width,$Page_Height);
/* Standard PDF file creation header stuff */
// Javier: better to not use references
// $pdf = & new Cpdf($PageSize);
$pdf = new Cpdf('L', 'pt', 'A4');
$pdf->addInfo('Creator', 'webERP http://www.weberp.org');
$pdf->addInfo('Author', 'webERP ' . $Version);
$pdf->addInfo('Title', _('Inventory Planning Report') . ' ' . Date($_SESSION['DefaultDateFormat']));
$pdf->addInfo('Subject', _('Inventory Planning'));
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs some check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->setAutoPageBreak(0);
// Javier: needs check.
$pdf->setPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->AddPage();
// $this->SetLineWidth(1); Javier: It was ok for FPDF but now is too gross with TCPDF. TCPDF defaults to 0'57 pt (0'2 mm) which is ok.
$pdf->cMargin = 0;
// Javier: needs check.
开发者ID:sjhelios,项目名称:trikemindo,代码行数:31,代码来源:InventoryPlanning.php
示例13: Cpdf
}
if (!isset($_POST['ToTransNo']) or trim($_POST['ToTransNo']) == '' or filter_number_format($_POST['ToTransNo']) < $FromTransNo) {
$_POST['ToTransNo'] = $FromTransNo;
}
$FirstTrans = $FromTransNo;
/* Need to start a new page only on subsequent transactions */
if (isset($PrintPDF) and isset($FromTransNo) and isset($InvOrCredit)) {
include 'includes/class.pdf.php';
/* This invoice is hard coded for A4 Landscape invoices or credit notes so can't use PDFStarter.inc */
$Page_Width = 842;
$Page_Height = 595;
$Top_Margin = 30;
$Bottom_Margin = 30;
$Left_Margin = 40;
$Right_Margin = 30;
$pdf = new Cpdf('L', 'pt', 'A4');
$pdf->addInfo('Creator', 'webERP http://www.weberp.org');
$pdf->addInfo('Author', 'webERP ' . $Version);
if ($InvOrCredit == 'Invoice') {
$pdf->addInfo('Title', _('Sales Invoice') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
$pdf->addInfo('Subject', _('Invoices from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
} else {
$pdf->addInfo('Title', _('Sales Credit Note'));
$pdf->addInfo('Subject', _('Credit Notes from') . ' ' . $FromTransNo . ' ' . _('to') . ' ' . $_POST['ToTransNo']);
}
$pdf->setAutoPageBreak(0);
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->AddPage();
$pdf->cMargin = 0;
/* END Brought from class.pdf.php constructor */
开发者ID:fgaudenzi,项目名称:webERP-bootstrap,代码行数:31,代码来源:PrintCustTrans.php
示例14: Cpdf
$_POST['Location'] = $Location;
/* so PDFInventoryValnPageHeader.inc works too */
include 'includes/session.inc';
include 'includes/class.pdf.php';
/* A4_Portrait */
$Page_Width = 595;
$Page_Height = 842;
$Top_Margin = 30;
$Bottom_Margin = 30;
$Left_Margin = 40;
$Right_Margin = 30;
// Javier: now I use the native constructor
// Javier: better to not use references
// $PageSize = array(0,0,$Page_Width,$Page_Height);
// $pdf = & new Cpdf($PageSize);
$pdf = new Cpdf('P', 'pt', 'A4');
// $PageNumber = 0;
/* Standard PDF file creation header stuff */
$pdf->addInfo('Creator', 'WebERP http://www.web-erp.org');
$pdf->addInfo('Author', 'WebERP ' . $Version);
// $FontSize=10;
$pdf->addInfo('Title', _('Inventory Valuation Report'));
$pdf->addInfo('Subject', _('Inventory Valuation'));
/* Javier: I have brought this piece from the pdf class constructor to get it closer to the admin/user,
I corrected it to match TCPDF, but it still needs check, after which,
I think it should be moved to each report to provide flexible Document Header and Margins in a per-report basis. */
$pdf->setAutoPageBreak(0);
// Javier: needs check.
$pdf->setPrintHeader(false);
// Javier: I added this must be called before Add Page
$pdf->AddPage();
开发者ID:sunilburli,项目名称:webERP-Medical,代码行数:31,代码来源:MailInventoryValuation.php
示例15: output
/**
* Returns the PDF as a string
*
* @param array $options Output options
* @return string
*/
function output($options = null)
{
// Add page text
$this->_add_page_text();
$debug = isset($options["compress"]) && $options["compress"] != 1;
return $this->_pdf->output($debug);
}
开发者ID:macconsultinggroup,项目名称:WordPress,代码行数:13,代码来源:cpdf_adapter.cls.php
示例16: getFont
private function getFont($family, $style)
{
$map = array("serif" => "Times", "sans-serif" => "Helvetica", "fantasy" => "Symbol", "cursive" => "Times", "monospace" => "Courier", "arial" => "Helvetica", "verdana" => "Helvetica");
$family = strtolower($family);
if (isset($map[$family])) {
$family = $map[$family];
}
$this->canvas->selectFont("{$family}.afm");
}
开发者ID:abdulghanni,项目名称:gsm,代码行数:9,代码来源:SurfaceCpdf.php
示例17: measureText
public function measureText($text)
{
if (self::DEBUG) {
echo __FUNCTION__ . "\n";
}
$style = $this->getStyle();
$this->getFont($style->fontFamily, $style->fontStyle);
return $this->canvas->getTextWidth($this->getStyle()->fontSize, $text);
}
开发者ID:AlexandreSGV,项目名称:siteentec,代码行数:9,代码来源:SurfaceCpdf.php
示例18: output
/**
* Returns the PDF as a string
*
* @return string
*/
function output($options = null)
{
// Add page text
$this->_add_page_text();
if (isset($options["compress"]) && $options["compress"] != 1) {
$debug = 1;
} else {
$debug = 0;
}
return $this->_pdf->output($debug);
}
开发者ID:SkMamtajuddin,项目名称:bamboo-invoice,代码行数:16,代码来源:cpdf_adapter.cls.php
示例19: array
function __construct($pageSize = array(0, 0, 612, 792), $isUnicode = false, $fontcache = '', $tmp = '')
{
$this->isUnicode = $isUnicode;
$this->fontcache = $fontcache;
$this->tmp = $tmp;
$this->newDocument($pageSize);
$this->compressionReady = function_exists('gzcompress');
if (in_array('Windows-1252', mb_list_encodings())) {
self::$targetEncoding = 'Windows-1252';
}
$this->setFontFamily('init');
}
开发者ID:EfncoPlugins,项目名称:web-portal-lite-client-portal-secure-file-sharing-private-messaging,代码行数:12,代码来源:class.pdf.php
示例20:
/**
* Calculates font height
*
* @param string $font
* @param float $size
* @return float
*/
static function get_font_height($font, $size)
{
return self::$_pdf->get_font_height($font, $size);
}
开发者ID:Meritxell01,项目名称:prova,代码行数:11,代码来源:font_metrics.cls.php
注:本文中的Cpdf类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论