//Line 8 $p1_line8 = $lines_arr['total']['p1_6'] - 0; } $border = 0; $pdf = new fpdi(); //Import original Gov't supplied PDF. if ($show_background == TRUE) { $pagecount = $pdf->setSourceFile(Environment::getBasePath() . 'interface' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'us' . DIRECTORY_SEPARATOR . 'tax' . DIRECTORY_SEPARATOR . 'f940ez.pdf'); $tplidx = $pdf->ImportPage(1); } $pdf->setMargins(0, 0, 0, 0); $pdf->SetAutoPageBreak(FALSE); $pdf->SetFont('freeserif', '', 10); $pdf->AddPage(); if (isset($tplidx)) { $pdf->useTemplate($tplidx, 0, 0); } $pdf->setXY(40, 39); $pdf->Cell(75, 6, $current_company->getName(), $border, 0, 'L'); $pdf->setXY(157, 39); $pdf->Cell(10, 6, $filter_data['year'], $border, 0, 'R'); $pdf->setXY(122, 47); $pdf->Cell(45, 6, $current_company->getBusinessNumber(), $border, 0, 'R'); $pdf->setXY(40, 56); $pdf->Cell(75, 6, $current_company->getAddress1() . ' ' . $current_company->getAddress2(), $border, 0, 'L'); $pdf->setXY(122, 56); $pdf->Cell(45, 6, $current_company->getCity() . ', ' . $current_company->getProvince() . ' ' . $current_company->getPostalCode(), $border, 0, 'R'); if (isset($lines_arr)) { //Line A $pdf->setXY(173, 69); $pdf->Cell(25, 6, Misc::getBeforeDecimal(Misc::MoneyFormat('0.00', FALSE)), $border, 0, 'R');
//Get company information $clf = TTnew('CompanyListFactory'); $company_obj = $clf->getById($current_company->getId())->getCurrent(); $border = 0; $pdf = new fpdi(); $pdf->setMargins(5, 5, 5, 5); $pdf->SetAutoPageBreak(FALSE); $pdf->SetFont('freeserif', '', 10); if ($show_background == TRUE) { //Import original Gov't supplied PDF. $pagecount = $pdf->setSourceFile(Environment::getBasePath() . 'interface' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'us' . DIRECTORY_SEPARATOR . 'tax' . DIRECTORY_SEPARATOR . 'w3.pdf'); $tplidx_summary = $pdf->ImportPage(1); } $pdf->AddPage(); if (isset($tplidx_summary)) { $pdf->useTemplate($tplidx_summary, 0, 0); } //Form year if ($show_background == TRUE) { $pdf->SetFont('freeserif', '', 18); $pdf->setFillColor(255, 255, 255); $pdf->setXY(135, 154); $pdf->Cell(20, 7, $filter_data['year'], $border, 1, 'C', 1); $pdf->SetFont('freeserif', '', 10); $pdf->setXY(59, 203.3); $pdf->Cell(9, 4, $filter_data['year'], $border, 1, 'C', 1); $pdf->SetFont('freeserif', '', 10); } if (isset($rows)) { $i = 0; $last_row = count($rows) - 1;
<?php error_reporting(E_ALL); define('FPDF_FONTPATH', 'font/'); require 'fpdi.php'; $pdf = new fpdi(); $pagecount = $pdf->setSourceFile("pdfdoc.pdf"); $tplidx = $pdf->ImportPage(1); $pdf->addPage(); $pdf->useTemplate($tplidx, 10, 10, 90); $pdf->Output("newpdf.pdf", "F"); $pdf->closeParsers();
include "inc_files/inc_checkcookie.php"; if ($_GET[proj_id] == NULL) { header("Location: index2.php"); } if ($user_usertype_current < 2) { header("Location: index2.php"); } // Use FDPI to get the template define('FPDF_FONTPATH', 'fpdf/font/'); require 'fpdf/fpdi.php'; $pdf = new fpdi(); $pagecount = $pdf->setSourceFile("pdf/template.pdf"); $tplidx = $pdf->ImportPage(1); $pdf->addPage(); $pdf->useTemplate($tplidx, 0, 0, 210, 297); $format_font = "century"; $format_font_2 = "Century.php"; $pdf->AddFont($format_font, '', $format_font_2); $format_bg_r = "220"; $format_bg_g = "220"; $format_bg_b = "220"; $format_ln_r = "220"; $format_ln_g = "220"; $format_ln_b = "220"; $current_date = TimeFormat(time()); $proj_id = CleanUp($_GET[proj_id]); // Begin creating the page //Page Title $sql_proj = "SELECT * FROM intranet_projects WHERE proj_id = {$proj_id} LIMIT 1"; $result_proj = mysql_query($sql_proj, $conn) or die(mysql_error());
} else { header("Location: ../index2.php"); } include_once "inc_files/inc_checkcookie.php"; include_once "secure/prefs.php"; // Use FDPI to get the template define('FPDF_FONTPATH', 'fpdf/font/'); require 'fpdf/fpdi.php'; $pdf = new fpdi(); $format_font = "century"; $format_font_2 = "Century.php"; $pdf->AddFont($format_font, '', $format_font_2); $pagecount = $pdf->setSourceFile("pdf/template.pdf"); $tplidx = $pdf->ImportPage(1); $pdf->addPage(); $pdf->useTemplate($tplidx); // Functions function StyleBody($input) { global $pdf; global $format_font; $pdf->SetFont($format_font, '', $input); $pdf->SetTextColor(0, 0, 0); } function Notes($input) { global $pdf; global $x_current; global $y_current; $pdf->SetX($x_current); //$print_string = DeCode($input);
Debug::Text('DID NOT Find user in Tax Deduction ID: ' . $tax_deduction_arr['id'], __FILE__, __LINE__, __METHOD__, 10); } } } $lines_arr['4'] = Misc::sumMultipleColumns($raw_row, $column_ps_entry_name_map['4']); $lines_arr['6'] = Misc::sumMultipleColumns($raw_row, $column_ps_entry_name_map['6']); $lines_arr['7'] = Misc::sumMultipleColumns($raw_row, $column_ps_entry_name_map['7']); //print_r($lines_arr); $pdf->setMargins(0, 0, 0, 0); $pdf->SetAutoPageBreak(FALSE); $pdf->SetFont('freeserif', '', 10); $pages = array(1, 2, 4, 5); foreach ($pages as $page) { $pdf->AddPage(); if (isset($tplidx[$page])) { $pdf->useTemplate($tplidx[$page], 0, 0); } if ($show_background == TRUE) { $pdf->SetFont('freeserif', 'B', 24); $pdf->setFillColor(255, 255, 255); if ($page == 1) { $pdf->setXY(Misc::AdjustXY(152, $adjust_x), Misc::AdjustXY(28, $adjust_y)); } elseif (in_array($page, array(2, 4, 5))) { $pdf->setXY(Misc::AdjustXY(151, $adjust_x), Misc::AdjustXY(28, $adjust_y)); } $pdf->Cell(10, 7, date('y', $filter_data['transaction_end_date']), $border, 0, 'C', 1); $pdf->SetFont('freeserif', '', 10); } //Company Info $pdf->setXY(25, 30); $pdf->Cell(65, 5, $current_company->getName(), $border, 0, 'L');