Ejemplo n.º 1
0
         //var_dump($user_ps_entries);
     }
     unset($pay_period_ids, $ps_entries);
 }
 //Calc Part 1, Line 3 here.
 if (isset($lines_arr)) {
     $lines_arr['total'] = Misc::ArrayAssocSum($lines_arr, NULL, 6);
     Debug::Arr($lines_arr, 'Lines Array: ', __FILE__, __LINE__, __METHOD__, 10);
     //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');
<?php

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";
Ejemplo n.º 3
0
<?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();
$count_down = 1;
$x = $label_e;
$y = $label_f;
// Set up the page
define('FPDF_FONTPATH', 'fpdf/font/');
require 'fpdf/fpdi.php';
$pdf = new fpdi();
// Determine if there's to be an uploaded template
$label_file = "library/background.pdf";
if (file_exists($label_file)) {
    $import_template = "1";
} else {
    $import_template = NULL;
}
if ($import_template == "1") {
    $pdf->setSourceFile("library/background.pdf");
    $tplidx = $pdf->ImportPage(1);
}
// Now add the first page
$pdf->addPage();
if ($import_template == "1") {
    $pdf->useTemplate($tplidx, 0, 0, 210, 297);
}
$pdf->AddFont('century', '', 'Century.php');
$pdf->AddFont('franklingothicbook', '', 'franklingothicbook.php');
$pdf->AddFont('gillsans', '', 'gillsans.php');
$pdf->SetMargins(0, 0);
$pdf->SetAutoPageBreak("no");
// Create the sheet header
$pdf->SetFont("arial", '', $label_j);
$label_print_date = $label_title . ", created " . date("jS M y", time());