当前位置: 首页>>代码示例>>PHP>>正文


PHP PDF::SetMargins方法代码示例

本文整理汇总了PHP中PDF::SetMargins方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::SetMargins方法的具体用法?PHP PDF::SetMargins怎么用?PHP PDF::SetMargins使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PDF的用法示例。


在下文中一共展示了PDF::SetMargins方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testpdf

 function testpdf()
 {
     $this->load->library('fpdf');
     $this->fpdf->FPDF('P', 'cm', 'A4');
     $this->fpdf->AddPage();
     //$this->fpdf->SetFont('Arial','',10);
     $this->fpdf->setFont('Arial', 'B', 9);
     $teks = "Ini hasil Laporan PDF menggunakan Library FPDF di CodeIgniter";
     $this->fpdf->Cell(3, 0.5, $teks, 1, '0', 'L', true);
     //	$this->fpdf->setFont('Arial','B',7);
     $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     $this->fpdf->Line(15.6, 2.1, 5, 2.1);
     $this->fpdf->Text(8, 1.9, 'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     //$this->fpdf->Ln();
     $this->fpdf->Output();
     $this->load->library('pdf');
     $pdf = new PDF();
     $pdf->SetMargins(1, 1);
     $pdf->AddPage();
     $pdf->SetFont('Arial', 'B', 14);
     $pdf->Cell(0, 0.5, 'Hellol Ci', 0, 1, 'C');
     $pdf->Output();
     /*
     	$this->load->library('fpdf');
     	$this->fpdf->FPDF('P','cm','A4');
     	$this->fpdf->Ln();
     	$this->fpdf->setFont('Arial','B',9);
     	$this->fpdf->Text(7.5,1,"DAFTAR PENJUALAN BULAN ");
     	$this->fpdf->setFont('Arial','B',9);
     	$this->fpdf->Text(8.3,1.5,'KOMUNITAS MUSISI INDONESIA');
     	$this->fpdf->setFont('Arial','B',7);
     	$this->fpdf->Text(8,1.9,'Jl.Zambrud I No.35 Sumur Batu - Jakarta Pusat');
     	 
     	$this->fpdf->Line(15.6,2.1,5,2.1);             
     	$this->fpdf->ln(1.6);
     	$this->fpdf->ln(0.3);
     	$this->fpdf->Output(); 
     */
 }
开发者ID:rasyid46,项目名称:ci_crud,代码行数:39,代码来源:chart.php

示例2: import

 /**
  * Internal function to return the cover for publishing a research
  * @param $sectionEditorSubmission SectionEditorSubmission
  * @return string path to cover created
  */
 function &_generateCover($sectionEditorSubmission)
 {
     $journal =& Request::getJournal();
     import('classes.lib.tcpdf.pdf');
     import('classes.lib.tcpdf.tcpdf');
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER));
     $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     // No header and footer for this document
     $pdf->SetPrintHeader(false);
     $pdf->SetPrintFooter(false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor($journal->getJournalTitle());
     // set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, 20, PDF_MARGIN_RIGHT);
     // set auto page breaks
     $pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
     // set image scale factor
     $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
     // Right now this cover page is only in english, but the english translation keys are ready
     $pdf->AddPage();
     $pdf->SetFont('dejavusans', 'B', 14);
     $pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C');
     // Locale::translate('editor.finalReport')
     $pdf->ln();
     $pdf->ln();
     $pdf->MultiCell(0, 6, 'for', 0, 'C');
     // Locale::translate('editor.finalReport.for')
     $pdf->ln();
     $pdf->ln();
     $pdf->MultiCell(0, 6, 'Research Project', 0, 'C');
     // Locale::translate('editor.finalReport.researchProject')
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $abstract = $sectionEditorSubmission->getAbstractByLocale('en_US');
     // Right now, considering only the english language
     $pdf->SetFont('dejavusans', 'B', 16);
     $pdf->MultiCell(0, 6, $abstract->getScientificTitle(), 0, 'C');
     $pdf->ln();
     $authors = $sectionEditorSubmission->getAuthors();
     $coInvestigatorsString = (string) '';
     $pInvestigatorsString = (string) '';
     foreach ($authors as $author) {
         if (!$author->getPrimaryContact()) {
             if ($coInvestigatorsString == '') {
                 $coInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')';
             } else {
                 $coInvestigatorsString = $coInvestigatorsString . ', ' . $author->getFullName() . ' (' . $author->getAffiliation() . ')';
             }
         } else {
             $pInvestigatorsString = $author->getFullName() . ' (' . $author->getAffiliation() . ')';
         }
     }
     $pdf->SetFont('dejavusans', '', 16);
     $pdf->MultiCell(0, 6, 'Principal Investigator: ' . $pInvestigatorsString, 0, 'C');
     // Locale::translate('user.role.primaryInvestigator')
     if ($coInvestigatorsString != '') {
         $pdf->MultiCell(0, 6, 'Co-Investigator(s): ' . $coInvestigatorsString, 0, 'C');
         // Locale::translate('user.role.coinvestigator')
     }
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $pdf->ln();
     $pdf->SetFont('dejavusans', 'B', 16);
     $pdf->MultiCell(0, 6, $sectionEditorSubmission->getProposalId(), 0, 'C');
     $pdf->ln();
     $pdf->ln();
     $decision = $sectionEditorSubmission->getLastSectionDecision();
     $pdf->MultiCell(0, 0, date("F Y", strtotime($decision->getDateDecided())), 0, 'L', 0, 1, '', 250, true);
     $pdf->Image("public/site/images/mainlogo.png", 'C', 230, 40, '', '', false, 'C', false, 300, 'R', false, false, 0, false, false, false);
     $pdf->AddPage();
     $pdf->SetFont('dejavusans', 'B', 14);
     $pdf->MultiCell(0, 6, 'Final Technical Report', 0, 'C');
     // Locale::translate('editor.finalReport')
     $pdf->ln();
     $pdf->ln();
     $pdf->SetFont('dejavusans', 'B', 12);
     $pdf->MultiCell(0, 6, 'Disclaimer', 0, 'C');
     // Locale::translate('editor.finalReport.disclaimer')
     $pdf->ln();
     $pdf->ln();
     $pdf->SetFont('dejavusans', '', 11);
     $pdf->writeHTMLCell(0, 6, '', '', $journal->getSetting('reportDisclaimer'), 0, 0, false, true, 'J');
     $filePath = Config::getVar('files', 'files_dir') . '/articles/' . $sectionEditorSubmission->getArticleId() . '/public/';
     if (!FileManager::fileExists($filePath, 'dir')) {
         FileManager::mkdirtree($filePath);
     }
     $pdf->Output($filePath . 'tempCover.pdf', 'F');
     return $filePath;
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:97,代码来源:SectionEditorAction.inc.php

示例3: Footer

        $this->Cell(190, 5, utf8_decode("NÚMEROS DE AUTORIZACIÓN CERCANOS A CADUCAR"), 0, 1, 'C', 0);
        $this->SetFont('Arial', 'B', 10);
        $this->Cell(90, 5, utf8_decode($fecha), 0, 0, 'R', 0);
        $this->Cell(40, 5, utf8_decode($_GET['fin']), 0, 1, 'C', 0);
        $this->Ln(5);
    }
    function Footer()
    {
        $this->SetY(-15);
        $this->SetFont('Arial', 'I', 8);
        $this->Cell(0, 10, 'Pag. ' . $this->PageNo() . '/{nb}', 0, 0, 'C');
    }
}
$pdf = new PDF('P', 'mm', 'a4');
$pdf->AddPage();
$pdf->SetMargins(0, 0, 0, 0);
$pdf->AliasNbPages();
$pdf->AddFont('Amble-Regular', '', 'Amble-Regular.php');
$pdf->SetFont('Amble-Regular', '', 10);
$pdf->SetFont('Arial', 'B', 9);
$pdf->SetX(5);
$pdf->SetFont('Amble-Regular', '', 9);
$total = 0;
$sub = 0;
$repetido = 0;
$contador = 0;
$consulta = pg_query("select id_cliente,identificacion,nombres_cli,telefono,direccion_cli from clientes");
while ($row = pg_fetch_row($consulta)) {
    $repetido = 0;
    $total = 0;
    $sql1 = pg_query("select id_factura_venta,num_factura,num_autorizacion,fecha_autorizacion,fecha_caducidad FROM factura_venta where id_cliente='{$row['0']}' and estado='Activo' and fecha_caducidad between '{$fecha}' and '{$_GET['fin']}'");
开发者ID:Oskrin,项目名称:neltex_formulario,代码行数:31,代码来源:reporte_autorizacion_caducidad.php

示例4: basket

 public function basket()
 {
     $this->start = $this->input->get('start');
     $this->end = $this->input->get('end');
     $this->view = "";
     if (isset($_GET['view']) && $_GET['view'] != "") {
         $this->view = pnp::clean($_GET['view']);
     }
     $this->data->getTimeRange($this->start, $this->end, $this->view);
     $basket = $this->session->get("basket");
     if (is_array($basket) && sizeof($basket) > 0) {
         foreach ($basket as $item) {
             # explode host::service::source
             $slices = explode("::", $item);
             if (sizeof($slices) == 2) {
                 $this->data->buildDataStruct($slices[0], $slices[1], $this->view);
             }
             if (sizeof($slices) == 3) {
                 $this->data->buildDataStruct($slices[0], $slices[1], $this->view, $slices[2]);
             }
         }
     }
     //echo Kohana::debug($this->data->STRUCT);
     /*
      * PDF Output
      */
     $pdf = new PDF();
     $pdf->AliasNbPages();
     $pdf->SetAutoPageBreak('off');
     $pdf->SetMargins(17.5, 30, 10);
     $pdf->AddPage();
     if ($this->use_bg) {
         $pdf->setSourceFile($this->config->conf['background_pdf']);
         $tplIdx = $pdf->importPage(1, '/MediaBox');
         $pdf->useTemplate($tplIdx);
     }
     $pdf->SetCreator('Created with PNP');
     $pdf->SetFont('Arial', '', 10);
     // Title
     foreach ($this->data->STRUCT as $data) {
         if ($pdf->GetY() > 200) {
             $pdf->AddPage();
             if ($this->use_bg) {
                 $pdf->useTemplate($tplIdx);
             }
         }
         if ($data['LEVEL'] == 0) {
             $pdf->SetFont('Arial', '', 12);
             $pdf->CELL(120, 10, $data['MACRO']['DISP_HOSTNAME'] . " -- " . $data['MACRO']['DISP_SERVICEDESC'], 0, 1);
             $pdf->SetFont('Arial', '', 10);
             $pdf->CELL(120, 5, $data['TIMERANGE']['title'] . " (" . $data['TIMERANGE']['f_start'] . " - " . $data['TIMERANGE']['f_end'] . ")", 0, 1);
             $pdf->SetFont('Arial', '', 8);
             $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1);
         } else {
             $pdf->SetFont('Arial', '', 8);
             $pdf->CELL(120, 5, "Datasource " . $data["ds_name"], 0, 1);
         }
         $image = $this->rrdtool->doImage($data['RRD_CALL'], $out = 'PDF');
         $img = $this->rrdtool->saveImage($image);
         $Y = $pdf->GetY();
         $cell_height = $img['height'] * 0.23;
         $cell_width = $img['width'] * 0.23;
         $pdf->Image($img['file'], 17.5, $Y, $cell_width, $cell_height, 'PNG');
         $pdf->CELL(120, $cell_height, '', 0, 1);
         unlink($img['file']);
     }
     $pdf->Output("pnp4nagios.pdf", "I");
 }
开发者ID:CoolCold,项目名称:pnp4nagios,代码行数:68,代码来源:pdf.php

示例5: from

 if ($monto != 0 and $iddepto != "-1") {
     /*
     $sql = "SELECT * from (SELECT experienciaentidad.id_entidad as 'id', 
         SUM(experienciaentidad.monto_contrato) as monto, empresas.nombre_proponente, empresas.nit, empresas.matricula, empresas.celular, empresas.mail,
     (SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id) as montog, 
     (SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.tipo = 1) as montoesp,
     (SELECT SUM(round(((to_days(`experienciaentidad`.`fecha_fin_contrato`) - to_days(`experienciaentidad`.`fecha_ini_contrato`)) / 30),2)) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id) as tiempomeses 
     FROM experienciaentidad INNER JOIN empresas ON experienciaentidad.id_entidad = empresas.id
     where empresas.estado = 4 and empresas.tipo <> 9 and empresas.tipo <> 19 group by experienciaentidad.id_entidad) as tb 
     INNER JOIN departamentosinteres on tb.id = departamentosinteres.id_empresas
     where departamentosinteres.id_departamentos = $iddepto and tb.monto >= $monto";
     */
     $sql = "SELECT * from (SELECT experienciaentidad.id_entidad as 'id', \r\n            SUM(experienciaentidad.monto_contrato) as monto, empresas.nombre_proponente, empresas.nit, empresas.matricula, empresas.celular, empresas.mail,\r\n(SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.fecha_ini_contrato >= '{$date10}') as montog, \r\n(SELECT SUM(experienciaentidad.monto_contrato) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.tipo = 1 and experienciaentidad.fecha_ini_contrato >= '{$date10}') as montoesp,\r\n(SELECT SUM(round(((to_days(`experienciaentidad`.`fecha_fin_contrato`) - to_days(`experienciaentidad`.`fecha_ini_contrato`)) / 30),2)) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id) as tiempomeses,\r\n(SELECT SUM(round(((to_days(`experienciaentidad`.`fecha_fin_contrato`) - to_days(`experienciaentidad`.`fecha_ini_contrato`)) / 30),2)) FROM experienciaentidad where experienciaentidad.id_entidad = empresas.id and experienciaentidad.tipo = 1) as tiempomesesp \r\n        FROM experienciaentidad INNER JOIN empresas ON experienciaentidad.id_entidad = empresas.id\r\n        where empresas.estado = 4 and empresas.tipo <> 9 and empresas.tipo <> 19 group by experienciaentidad.id_entidad) as tb \r\n        INNER JOIN departamentosinteres on tb.id = departamentosinteres.id_empresas\r\n        where departamentosinteres.id_departamentos = {$iddepto} and tb.montog >= ({$monto}*(SELECT dato1 from busquedaempresaparametros where parametro = 'monto_exp' and activo = 'SI' LIMIT 0,1)) and \r\ntb.montoesp >= ({$monto}*(SELECT dato2 from busquedaempresaparametros where parametro = 'monto_exp' and activo = 'SI' LIMIT 0,1)) order by tb.montog DESC";
 }
 $pdf = new PDF('P', 'mm', 'Letter');
 $pdf->SetMargins(15, 10, 5);
 $pdf->AddPage();
 $pdf->SetFont('helvetica', 'B', 14);
 $pdf->Ln(5);
 $pdf->Cell(195, 5, utf8_decode('REGISTRO DE BUSQUEDA DE EMPRESAS'), 0, FALSE, 'C');
 $pdf->Ln(4);
 $pdf->SetFont('helvetica', '', 10);
 $date = date('Y-m-d H:i:s');
 $pdf->Cell(195, 5, utf8_decode('USUARIO: ') . $user, 0, FALSE, 'C');
 $pdf->Ln(3);
 $pdf->Cell(195, 6, utf8_decode('CRITERIOS DE BUSQUEDA'), 0, FALSE, 'C');
 $pdf->Ln(3);
 $pdf->Cell(195, 7, utf8_decode('MONTO DEL PROYECTO: ') . $montodato, 0, FALSE, 'C');
 $pdf->Ln(3);
 $pdf->Cell(195, 8, utf8_decode('UBICACION DEL PROYECTO: ') . $departamento, 0, FALSE, 'C');
 $pdf->Ln(4);
开发者ID:sysdevbol,项目名称:entidad,代码行数:31,代码来源:reportebusquedaempresa.php

示例6: generate

 public static function generate($dbh, $appID, $method = 'I')
 {
     $data = self::get($dbh, $appID);
     //if (strlen($socialnumber) > 20) $socialnumber = $this->decrypt($socialnumber);
     $socialnumber = '';
     //Blank out social on forms per Maria 6/6/2013
     // initiate PDF
     $pdf = new PDF();
     $pdf->SetMargins(PDF_MARGIN_LEFT, 10, PDF_MARGIN_RIGHT);
     // add a page
     $pdf->AddPage();
     $pdf->SetFont("Helvetica", "", 11);
     $pdf->SetXY(33, 30);
     $pdf->Write(5, date('m/d/Y', strtotime($data['appDate'])));
     $pdf->SetXY(85, 30);
     $pdf->Write(5, $data['jobName']);
     $pdf->SetXY(30, 36);
     $pdf->Write(5, $data['lastname']);
     $pdf->SetXY(110, 36);
     $pdf->Write(5, $data['firstname']);
     $pdf->SetXY(170, 36);
     $pdf->Write(5, $data['middlename']);
     $pdf->SetXY(30, 62);
     $pdf->Write(5, $data['address']);
     $pdf->SetXY(105, 62);
     $pdf->Write(5, $data['city']);
     $pdf->SetXY(162, 62);
     $pdf->Write(5, $data['state']);
     $pdf->SetXY(187, 62);
     $pdf->Write(5, $data['zip']);
     $pdf->SetXY(70, 69);
     $pdf->Write(5, $data['years']);
     $pdf->SetXY(105, 69);
     $pdf->Write(5, $data['phone']);
     $pdf->SetXY(122, 76);
     $pdf->Write(5, $data['email']);
     $pdf->SetFont("Helvetica", "", 10);
     $highestx = 59 + $data['highestgrade'] * 5.4;
     if ($data['highestgrade'] > 8) {
         $highestx += 19;
     }
     if ($data['highestgrade'] > 12) {
         $highestx += 20;
     }
     $pdf->SetXY($highestx, 152);
     $pdf->Write(5, 'Highest');
     $pdf->SetXY(46, 175);
     $pdf->Write(5, $data['highschool']);
     $pdf->SetXY(46, 184);
     $pdf->Write(5, $data['highschoolloc']);
     $pdf->SetXY(101, 175);
     $pdf->Write(5, $data['highschoolyears']);
     $pdf->SetXY(129, 175);
     $pdf->Write(5, $data['coursesubject']);
     $pdf->SetXY(174.5, 175);
     $pdf->write(5, $data['coursesubjectgraduated'] == 'Yes' ? 'X' : '');
     $pdf->SetXY(174.5, 184);
     $pdf->write(5, $data['coursesubjectgraduated'] == 'GED' ? 'X' : '');
     $pdf->SetXY(46, 193);
     $pdf->Write(5, $data['collegeuniversity']);
     $pdf->SetXY(46, 202);
     $pdf->Write(5, $data['collegeuniversityloc']);
     $pdf->SetXY(101, 193);
     $pdf->Write(5, $data['collegeuniversityyearscompleted']);
     $pdf->SetXY(129, 193);
     $pdf->Write(5, $data['collegeuniversitycourse']);
     $pdf->SetXY(174.5, 191);
     $pdf->write(5, $data['collegegraduated'] == 'Yes' ? 'X' : '');
     $pdf->SetXY(184, 194);
     $pdf->Write(5, $data['collegegraduatedMonth']);
     $pdf->SetXY(196, 194);
     $pdf->Write(5, $data['collegegraduatedYear']);
     $pdf->SetXY(174.5, 202);
     $pdf->write(5, $data['collegegraduated'] == 'InP' ? 'X' : '');
     $pdf->SetXY(46, 210);
     $pdf->Write(5, $data['othercollege']);
     $pdf->SetXY(46, 222);
     $pdf->Write(5, $data['othercollegeloc']);
     $pdf->SetXY(101, 214);
     $pdf->Write(5, $data['othercollegeyears']);
     $pdf->SetXY(129, 210);
     $pdf->Write(5, $data['othercollegecourse']);
     $pdf->SetXY(174.5, 209);
     $pdf->write(5, $data['othercollegecompleted'] == 'Yes' ? 'X' : '');
     $pdf->SetXY(184, 213);
     $pdf->Write(5, $data['othercollegecompletedMonth']);
     $pdf->SetXY(194, 213);
     $pdf->Write(5, $data['othercollegecompletedYear']);
     $pdf->SetXY(174.5, 219);
     $pdf->write(5, $data['othercollegecompleted'] == 'Pro' ? 'X' : '');
     $pdf->SetXY(128, 260.5);
     $pdf->Write(5, $data['language']);
     $pdf->SetXY(163, 260.5);
     $pdf->write(5, $data['languagespeak'] ? 'X' : '');
     $pdf->SetXY(177, 260.5);
     $pdf->write(5, $data['languageread'] ? 'X' : '');
     $pdf->SetXY(190, 260.5);
     $pdf->write(5, $data['languagewrite'] ? 'X' : '');
     $pdf->AddPage();
     $y = 0;
//.........这里部分代码省略.........
开发者ID:nbunney,项目名称:fulferSite,代码行数:101,代码来源:class.application+copy.php

示例7: PDF

 	echo "<br><br>";
 */
 $name = $r1['studentbio_fname'] . " " . $r1['studentbio_lname'];
 // echo "name=$name";
 $school = $r2['school_names_desc'];
 $q5 = @mysql_query("select * from studentcontact where studentcontact_id = {$r1['studentbio_id']}");
 $r5 = @mysql_fetch_array($q5);
 $address1 = $r5['studentcontact_address1'];
 $address2 = $r5['studentcontact_address2'];
 $city = $r5['studentcontact_city'];
 $zip = $r5['studentcontact_zip'];
 $pdf = new PDF('L');
 $w = array(35, 35, 35, 35, 35, 35);
 $pdf->Open();
 $pdf->SetWidths($w);
 $pdf->SetMargins(50, 30);
 $pdf->AddPage();
 $pdf->SetFillColor(255, 255, 255);
 $pdf->SetXY(195, 35);
 $pdf->SetFont('Times', 'IB', 16);
 $pdf->Write(1, $school);
 $pdf->SetFont('Times', '', 14);
 $pdf->Ln();
 $pdf->SetXY(30, 50);
 $pdf->Write(1, $name);
 $pdf->Ln();
 $pdf->SetXY(30, 55);
 $pdf->Write(1, $address1);
 $pdf->Ln();
 if (!empty($address2)) {
     $pdf->SetXY(30, 60);
开发者ID:google-code-backups,项目名称:swifttide,代码行数:31,代码来源:generatereportcardnew.php

示例8: die

        //y position: rough estimate, width, height, filetype, link: click it!
        //$this->Image("D:\logo.jpg", (4.5/2)-1.5, 9.8, 3, 1, "JPG","www.verizon.com");
    }
}
/*define('DB_HOST1', 'localhost'); 
define('DB_NAME1', 'vbass'); 
define('DB_USER1','root'); 
define('DB_PASSWORD1',''); 
$con=mysql_connect(DB_HOST1,DB_USER1,DB_PASSWORD1) or die("Failed to connect to MySQL: " . mysql_error());

mysql_select_db('DB_NAME1',$con) or die("Failed to connect to MySQL: " . mysql_error());*/
//echo 'I am here'; exit;
if (isset($_GET['file_name'])) {
    $ename = $_GET['file_name'];
    $pdf = new PDF("P", "in", "Letter");
    $pdf->SetMargins(1.5, 1.5, 1.5);
    $pdf->AddPage();
    $pdf->SetFont('Times', '', 12);
    $pdf->Ln();
    $pdf->Ln();
    $sql = "select e.ent_ins_name,a.line1,a.line2,a.zip_code,a.state,a.country,b.period_st_dt,\nb.period_ed_dt,b.tnx_desc,b.txn_base_amt,b.txn_qty,b.tax_amt,b.txn_amt\n From ADDRESS_HISTORY_TR a, bill_gen_det b, ent_inst_tr e, version v where \nb.ent_inst_id = e.ent_inst_id\nand e.address_id = a.address_id\nand v.ent_vr_catg = 'BL'\nand v.ver_date = (select max(ver_date) from version where ent_vr_catg ='BL')\nand e.ent_vr_nr = v.ent_vr_nr\nand e.ent_ins_name = '" . $ename . "'";
    $result = mysql_query($sql);
    if (!$result) {
        printf("Error:sads %s\n", mysql_error($con));
        exit;
    }
    $i = 0;
    while ($rows = mysql_fetch_array($result)) {
        $AccName = 'Account Name';
        $accname = $rows[0];
        $addline1 = $rows[1];
开发者ID:v104510,项目名称:vboss_final,代码行数:31,代码来源:pdf_bl.php

示例9: automaticSummaryInPDF

 function automaticSummaryInPDF($submission)
 {
     $countryDao =& DAORegistry::getDAO('CountryDAO');
     $articleDrugInfoDao =& DAORegistry::getDAO('ArticleDrugInfoDAO');
     $extraFieldDAO =& DAORegistry::getDAO('ExtraFieldDAO');
     $journal =& Request::getJournal();
     $submitter =& $submission->getUser();
     $title = $journal->getJournalTitle();
     $articleTexts = $submission->getArticleTexts();
     $articleTextLocales = $journal->getSupportedLocaleNames();
     $secIds = $submission->getArticleSecIds();
     $details = $submission->getArticleDetails();
     $purposes = $submission->getArticlePurposes();
     $articlePrimaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_PRIMARY);
     $articleSecondaryOutcomes = $submission->getArticleOutcomesByType(ARTICLE_OUTCOME_SECONDARY);
     $coutryList = $countryDao->getCountries();
     $articleDrugs = $submission->getArticleDrugs();
     $pharmaClasses = $articleDrugInfoDao->getPharmaClasses();
     $drugStudyClasses = $articleDrugInfoDao->getClassKeysMap();
     $articleSites = $submission->getArticleSites();
     $expertisesList = $extraFieldDAO->getExtraFieldsList(EXTRA_FIELD_THERAPEUTIC_AREA, EXTRA_FIELD_ACTIVE);
     $fundingSources = $submission->getArticleFundingSources();
     $pSponsor = $submission->getArticlePrimarySponsor();
     $sSponsors = $submission->getArticleSecondarySponsors();
     $CROs = $submission->getArticleCROs();
     $contact = $submission->getArticleContact();
     Locale::requireComponents(array(LOCALE_COMPONENT_APPLICATION_COMMON, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_PKP_USER));
     import('classes.lib.tcpdf.pdf');
     import('classes.lib.tcpdf.tcpdf');
     $pdf = new PDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
     $pdf->SetCreator(PDF_CREATOR);
     $pdf->SetAuthor($submitter->getFullName());
     $pdf->SetTitle($title);
     $subject = $submission->getProposalId() . ' - ' . Locale::translate('submission.summary');
     $pdf->SetSubject($subject);
     $cell_width = 45;
     $cell_height = 6;
     // set default header data
     $pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE . ' 020', PDF_HEADER_STRING);
     // set header and footer fonts
     $pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
     $pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
     // set default monospaced font
     $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
     // set margins
     $pdf->SetMargins(PDF_MARGIN_LEFT, 58, PDF_MARGIN_RIGHT);
     $pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
     $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);
     $pdf->AddPage();
     // Title
     $pdf->SetFont('Times', 'B', 15);
     $w = $pdf->GetStringWidth($title) + 6;
     $pdf->SetX((210 - $w) / 2);
     $pdf->Cell($w, 9, $title, 0, 1, 'C');
     // sub-title
     $pdf->SetFont('Times', 'BI', 14);
     $w2 = $pdf->GetStringWidth($subject) + 6;
     $pdf->SetX((210 - $w2) / 2);
     $pdf->Cell($w2, 9, $subject, 0, 1, 'C');
     // Line break
     $pdf->Ln(10);
     // Main Info
     $pdf->SetFont('Times', '', 12);
     $pdf->MultiRow(50, Locale::translate("common.proposalId"), $submission->getProposalId(), 'L');
     $pdf->MultiRow(50, Locale::translate("article.title"), $submission->getScientificTitle(), 'L');
     $pdf->MultiRow(50, Locale::translate("submission.submitter"), $submitter->getFullName(), 'L');
     $pdf->MultiRow(50, Locale::translate("common.dateSubmitted"), $submission->getDateSubmitted(), 'L');
     // Line break
     $pdf->Ln(10);
     //CT Information
     $pdf->SetFont('Times', 'B', 14);
     $pdf->Cell(190, 9, 'I' . Locale::translate('common.queue.long.articleDetails', array('id' => '')), 0, 1, 'L');
     $pdf->Ln(5);
     $pdf->SetFont('Times', '', 12);
     $scientificTitle = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$scientificTitle) {
             $pdf->MultiRow(50, Locale::translate("proposal.scientificTitle"), $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $scientificTitle = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getScientificTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $publicTitle = null;
     foreach ($articleTexts as $atKey => $articleText) {
         if (!$publicTitle) {
             $pdf->MultiRow(50, Locale::translate("proposal.publicTitle"), $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
             $publicTitle = true;
         } else {
             $pdf->MultiRow(50, '', $articleText->getPublicTitle() . ' (' . $articleTextLocales[$atKey] . ')', 'L');
         }
     }
     $pdf->Ln(3);
     $firstSecId = null;
     foreach ($secIds as $secId) {
         if (!$firstSecId) {
//.........这里部分代码省略.........
开发者ID:elavaud,项目名称:hrp_ct,代码行数:101,代码来源:Action.inc.php

示例10: DateTime

        $subY = $this->y;
        $this->SetXY($subX, $subY + $subOffset);
        // restore font size
        $this->SetFontSize($subFontSizeold);
    }
}
// --------------------------- Get current date
$dt = new DateTime();
$dt = $dt->format('Y-M-d');
// --------------------------- Get current date
$pdf = new PDF();
$pdf->AliasNbPages();
// Column headings
$header = array('Account Title', 'Date', 'Income', 'Expense');
$pdf->SetFont('Arial', '', 9);
$pdf->SetMargins(5, 5, 5);
$pdf->AddPage();
$pdf->subWrite(4, 'E', '', 20);
$pdf->Write(4, 'xpense');
$pdf->Ln();
$pdf->Ln();
$pdf->SetX(10);
$pdf->subWrite(4, 'M', '', 20);
$pdf->Write(4, 'anager');
$pdf->SetX(5);
$pdf->Cell(0, 4, 'Income - Expense Report', 0, 1, 'C');
$pdf->Cell(0, 4, $ReportTitle, 0, 1, 'C');
$pdf->Cell(0, 4, "As Of: " . $dt, 0, 1, 'C');
$pdf->Cell(0, 4, '--------------------------------------------------------------------------------------------------------------------------------------------------------------------------', 0, 1, 'C');
$pdf->BasicTable($header, $decoded);
$pdf->Output();
开发者ID:JeffreyAReyes,项目名称:expensemanagerjquery,代码行数:31,代码来源:print_income_expense.php

示例11: catch

                    $rojos[2] = $verdes[0] + $rojos[0];
                }
            } catch (PDOException $e) {
                /*$mensaje='Error al tratar de obtener información de la orden.'.$e;
                  include $_SERVER['DOCUMENT_ROOT'].'/reportes/includes/error.html.php';
                  exit();*/
            }
            $i++;
        }
    }
}
/**************************************************************************************************/
/********************************************* Hoja 1 *********************************************/
/**************************************************************************************************/
$pdf->AddPage();
$pdf->SetMargins(40, 0, 30);
$pdf->SetLineWidth(0.1);
$pdf->Ln(3);
$pdf->SetFont('Arial', 'B', 14);
$pdf->MultiCell(0, 6, utf8_decode("REPORTE DE EVALUACIÓN DE LOS \n NIVELES DE ILUMINACIÓN \n NOM-025-STPS-2008"), 0, 'C');
$pdf->Ln(10);
$pdf->SetFont('Arial', 'B', 16);
$pdf->MultiCell(0, 7, utf8_decode("ESTUDIO DE RECONOCIMIENTO Y EVALUACIÓN"), 0, 'C');
$pdf->Ln(10);
$pdf->SetFont('Arial', 'B', 14);
$pdf->MultiCell(0, 7, utf8_decode("Practicado en la empresa"), 0, 'C');
$pdf->Ln(10);
$pdf->SetFont('Arial', 'B', 28);
$pdf->MultiCell(0, 10, utf8_decode($cliente['Razon_Social']), 0, 'C');
$pdf->Ln(10);
$pdf->SetFont('Arial', 'B', 24);
开发者ID:jmoreno0118,项目名称:Microv2,代码行数:31,代码来源:index.php

示例12: PDF

        //faire name
        $this->Cell(0, 0, $faireName, 0);
        //faire dates
        $this->SetFont('Helvetica', 'B', 12);
        $this->SetXY(15, 36);
        $this->Cell(0, 0, $dates, 0);
        //faire logo
        $this->Image($badge, 153, 11, 45, 0, 'jpg');
        //set font size for PDF answers
        $this->SetFont('Helvetica', '', 10);
        $this->SetXY(15, 52);
    }
}
// initiate FPDI
$pdf = new PDF();
$pdf->SetMargins(15, 15, 15);
$form_id = 36;
$form = GFAPI::get_form($form_id);
$fieldData = array();
//put fieldData in a usable array
foreach ($form['fields'] as $field) {
    $fieldData[$field['id']] = $field;
}
$entries = GFAPI::get_entries($form_id);
foreach ($entries as $entry) {
    output_data($pdf, $entry, $form, $fieldData);
}
ob_clean();
$pdf->Output('GSP.pdf', 'D');
//output download
//$pdf->Output('doc.pdf', 'I');        //output in browser
开发者ID:hansstam,项目名称:makerfaire,代码行数:31,代码来源:GSP.php

示例13: PDF

    </tr>';
$tbl .= '<tr> 
    <td colspan="5" style="italic" border="0">
    <br><br><br>
    <br><br>
    <br><br><br>.
    <br>
    <br>
    </td>
    </tr>';
$tbl .= '</table>';
$tbl2 = $tbl;
$ct = $tbl . $tbl2;
$p = new PDF();
// PAGE // Data
$p->SetMargins(10, 10, 10, 10);
$p->AddPage();
$p->setStyle('normal');
$p->SetFont('helvetica', '', '8');
$p->htmltable($ct);
$filename = "report.pdf";
// ubah namafile sesuai dengan keinginanr
$p->output($filename, 'F');
if (file_exists($filename)) {
    ?>
	<div id="pdf" data-options="fit:true">
		It appears you don't have Adobe Reader or PDF support in this web browser. 
		<a href="report.pdf">Click here to download the PDF</a>
	</div>
	<script type="text/javascript">
		$("#pdf").panel({fit:true});
开发者ID:WisnuDiStefano,项目名称:sinar,代码行数:31,代码来源:laporan.php

示例14: CONCAT

        <td align=\'left\'>' . $value_urusan->kd_urusan . '</td>
        <td align=\'left\' colspan=26>' . $value_urusan->nm_urusan . '</td>
    </tr>';
    $query_bidang = DB::query("SELECT\n            a.tahun,\n            bidang.kd_bidang,\n            bidang.nm_bidang\n            FROM\n            tabel_dpa AS a\n            INNER JOIN bidang ON bidang.kd_urusan = a.kd_urusan AND bidang.kd_bidang = a.kd_bidang\n            WHERE\n                    CONCAT(a.kd_unit,kd_sub_unit) = {$req->skpd} AND\n                    a.tahun = {$req->tahun} AND \n                    a.kd_urusan = {$value_urusan->kd_urusan} AND\n                    a.kd_program > 14\n            GROUP BY a.kd_urusan,a.kd_bidang");
    $result_bidang = $query_bidang->fetchAll();
    foreach ($result_bidang as $value_bidang) {
        $htmlTemplate .= '<tr>
            <td align=\'center\'></td>
            <td align=\'left\'>' . $value_urusan->kd_urusan . '.' . $value_bidang->kd_bidang . '</td>
            <td align=\'left\' colspan=26>' . $value_bidang->nm_bidang . '</td>
        </tr>';
    }
}
/**
 * 
 */
require_once 'library/lib/fpdf.inc.php';
require_once 'library/lib/pdftable.inc.php';
require_once 'library/lib/pdf.inc.php';
require_once 'library/lib/color.inc.php';
require_once 'library/lib/htmlparser.inc.php';
$p = new PDF();
$p->SetMargins(20, 10, 10);
$p->AddPage();
$p->setStyle('small');
$p->text(0, 'Formulir Evaluasi Hasil Renja SKPD', 0, 'C');
$p->text(0, 'SKPD ' . Suggest::getSatker($req->skpd), 0, 'C');
$p->text(0, 'Periode Kegiatan  Tahun ' . $req->tahun, 0, 'C');
$p->SetFont('helvetica', '', '5');
$p->htmltable($htmlTemplate);
$p->output(NAMA_LAPORAN, 'F');
开发者ID:WisnuDiStefano,项目名称:v4,代码行数:31,代码来源:pdf.php

示例15: PDF

<?php

if (empty($_SESSION)) {
    session_start();
}
ini_set('error_reporting', E_ALL);
require_once "../modelos/Consulta.reportes.php";
require_once "PDF.php";
if (isset($idCertificado)) {
    $pdf = new PDF('P', 'mm', 'letter');
    $pdf->AddFont('gothic', '', 'gothic.php');
    $pdf->AddFont('gothicb', 'B', 'gothicb.php');
    $pdf->AliasNbPages();
    $pdf->AddPage();
    $pdf->SetFont('gothic', '', 13);
    $pdf->SetMargins(30, 30, 25);
    $pdf->SetAutoPageBreak(true, 0);
    $consulta = new Consulta();
    //$id = $_GET["idCertificado"];
    $id = $idCertificado;
    $datos = $consulta->getDatosCertificadoCartera($id);
    $fecha_certificado_f = explode('-', $datos[2]);
    $fecha_certificado_f2 = explode('-', $datos[3]);
    $nroCertificado = $datos[6];
    $pdf->SetY(37);
    $pdf->Ln(6);
    $pdf->SetFont('gothicb', 'B', 22);
    $pdf->Ln(5);
    $titulo = "CERTIFICACIÓN";
    $pdf->Cell(0, 0, utf8_decode($titulo), 0, 0, 'C');
    $pdf->SetY(55);
开发者ID:victorsanjines667,项目名称:registroEstudiantes,代码行数:31,代码来源:certificadoCartera.php


注:本文中的PDF::SetMargins方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。