function export_order($id) { global $FANNIE_OP_DB, $FANNIE_ROOT; $dbc = FannieDB::get($FANNIE_OP_DB); $order = new PurchaseOrderModel($dbc); $order->orderID($id); $order->load(); $items = new PurchaseOrderItemsModel($dbc); $items->orderID($id); $vendor = new VendorsModel($dbc); $vendor->vendorID($order->vendorID()); $vendor->load(); $contact = new VendorContactModel($dbc); $contact->vendorID($order->vendorID()); $contact->load(); if (!class_exists('FPDF')) { include_once $FANNIE_ROOT . 'src/fpdf/fpdf.php'; } $pdf = new FPDF('P', 'mm', 'Letter'); $pdf->AddPage(); $pdf->SetFont('Arial', '', '12'); $pdf->Cell(100, 5, 'Vendor: ' . $vendor->vendorName(), 0, 0); $pdf->Cell(100, 5, 'Date: ' . date('Y-m-d'), 0, 0); $pdf->Ln(); $pdf->Cell(100, 5, 'Phone: ' . $contact->phone(), 0, 0); $pdf->Cell(100, 5, 'Fax: ' . $contact->fax(), 0, 0); $pdf->Ln(); $pdf->Cell(100, 5, 'Email: ' . $contact->email(), 0, 0); $pdf->Cell(100, 5, 'Website: ' . $contact->website(), 0, 0); $pdf->Ln(); $pdf->MultiCell(0, 5, "Ordering Info:\n" . $contact->notes(), 'B'); $pdf->Ln(); $cur_page = 0; $pdf->SetFontSize(10); foreach ($items->find() as $obj) { if ($cur_page != $pdf->PageNo()) { $cur_page = $pdf->PageNo(); $pdf->Cell(25, 5, 'SKU', 0, 0); $pdf->Cell(20, 5, 'Order Qty', 0, 0); $pdf->Cell(30, 5, 'Brand', 0, 0); $pdf->Cell(65, 5, 'Description', 0, 0); $pdf->Cell(20, 5, 'Case Size', 0, 0); $pdf->Cell(20, 5, 'Est. Cost', 0, 0); $pdf->Ln(); } $pdf->Cell(25, 5, $obj->sku(), 0, 0); $pdf->Cell(20, 5, $obj->quantity(), 0, 0, 'C'); $pdf->Cell(30, 5, $obj->brand(), 0, 0); $pdf->Cell(65, 5, $obj->description(), 0, 0); $pdf->Cell(20, 5, $obj->caseSize(), 0, 0, 'C'); $pdf->Cell(20, 5, sprintf('%.2f', $obj->caseSize() * $obj->unitCost() * $obj->quantity()), 0, 0); $pdf->Ln(); } $pdf->Output('order_export.pdf', 'D'); }
public function generarFolleto() { $concursos = $this->concursoMapper->findConcurso("pinchosOurense"); $establecimientos = $this->establecimientoMapper->findAllValidados(); $pinchos = $this->pincho->all(); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 30); $pdf->SetTextColor(85, 53, 20); $pos_y = 10; $pdf->Cell(0, 24, $concursos->getNombre(), 0, 0, "L"); $pdf->Ln(); $pdf->SetFont('Arial', '', 16); $pdf->SetTextColor(0, 0, 0); $pdf->MultiCell(0, 6, $concursos->getDescripcionConcurso(), 0, "L"); $pdf->SetTextColor(85, 53, 20); $pdf->SetFont('Arial', 'B', 13); $pdf->Cell(0, 24, "Establecimientos participantes", 0, 0, "L"); foreach ($establecimientos as $establecimiento) { $pdf->Ln(); $pdf->SetFont('Arial', 'B', 13); $pdf->SetTextColor(85, 53, 20); $pdf->SetFillColor(182, 145, 107); $pdf->Cell(0, 10, utf8_decode($establecimiento->getNombre()), 1, 0, "C", "false"); $pdf->Ln(); $pdf->SetFont('Arial', 'I', 13); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(0, 10, utf8_decode($establecimiento->getDescripcion()), 0, 0, "L"); $pdf->Ln(); $pdf->Cell(0, 10, utf8_decode($establecimiento->getLocalizacion()), 0, 0, "L"); $pdf->Ln(); $pdf->Cell(0, 10, utf8_decode("Pincho:"), 0, 0, "L"); foreach ($pinchos as $pincho) { if ($pincho->getEstablecimiento() == $establecimiento->getId()) { $pdf->Ln(); $pdf->Cell(5); $pdf->Cell(0, 10, utf8_decode($pincho->getNombre()), 0, 0, "L"); $pdf->Ln(); $pdf->Cell(5); $pdf->Cell(0, 10, utf8_decode($pincho->getDescripcion()), 0, 0, "L"); $pdf->Ln(); $pdf->Cell(5); if ($pincho->isCeliaco()) { $pdf->Cell(0, 10, utf8_decode("Apto para celiaco"), 0, 0, "L"); } else { $pdf->Cell(0, 10, utf8_decode("No apto para celiaco"), 0, 0, "L"); } } } $pdf->Ln(5); } $pdf->Output("folleto.pdf", "D"); }
public function exportpdf() { if ($this->data['users']->role != "admin") { exit; } $header = array('Full Name', 'User Name', 'E-mail', 'Gender', 'Address', 'Phone No', 'Mobile No', 'Profession'); $data = array(); $student = User::where('role', 'parent')->get(); foreach ($student as $value) { $data[] = array($value->fullName, $value->username, $value->email, $value->gender, $value->address, $value->phoneNo, $value->mobileNo, $value->parentProfession); } $pdf = new FPDF(); $pdf->SetFont('Arial', '', 10); $pdf->AddPage(); foreach ($header as $col) { $pdf->Cell(40, 7, $col, 1); } $pdf->Ln(); foreach ($data as $row) { foreach ($row as $col) { $pdf->Cell(40, 6, $col, 1); } $pdf->Ln(); } $pdf->Output(); exit; }
public function short_global_risk_pdf_report($project_id, $offset = 0, $limit = 100, $order_by = 'project_name', $order_by_2 = 'occurred', $order_by_3 = 'expected_cost', $direction = 'ASC', $direction_2 = 'DESC') { $confirm_member = $this->User_model->confirm_member(); if (!$confirm_member['success']) { $_SESSION['last_uri'] = $this->uri->uri_string(); $_SESSION['login_message'] = $confirm_member['message']; redirect('login'); } $permission = $this->Project_model->initialize($project_id, $_SESSION['user_id']); if ($permission === false) { redirect('dashboard'); return; } $user_id = $_SESSION['user_id']; $this->load->model('Risk_model'); $filter_field = $this->input->post('filter_field'); $filter_value = $this->input->post('filter_value'); $this->load->helper('security'); xss_clean($filter_field); xss_clean($filter_value); $risks = $this->Risk_model->get_all_by_user($user_id, $limit, $offset, $order_by, $order_by_2, $order_by_3, $direction, $direction_2, $filter_field, $filter_value); $project_data = $this->Project_model->get(); $page_data = array('project_data' => $project_data); $this->load->library('fpdf'); $pdf = new FPDF(); $pdf->AddPage('L'); $pdf->SetFont('Arial', 'BU', 16); $pdf->Cell(10, 5, 'Global Risk Report'); $pdf->Ln(8); $pdf->SetFont('Arial', 'B', 12); // $pdf->Write(15, "Project Name:"); // $pdf->Write(15, " " . $project_data['project_name']); $pdf->Write(15, " " . date('Y-m-d')); //set table header and body fonts $thfont = array('family' => 'Arial', 'style' => 'B', 'size' => 11); $tbfont = array('family' => 'Arial', 'style' => '', 'size' => 11); $pdf->Ln(17); $twidth = array(25, 42, 22, 22, 52, 23, 48, 22, 22); $theader = array('Project Name', 'Risk Event', 'Date of Concern', 'Occurred', 'Cause', 'Probability', 'Impact', 'Overall Impact', 'Expected Cost'); $tdata = array(); $count = sizeof($risks); foreach (array_slice($risks, 0, $count - 1) as $item) { array_push($tdata, array($item['project_name'], $item['event'], $item['date_of_concern'], $item['occurred'], $item['cause'], $item['probability'], $item['impact'], $item['overall_impact'], '$' . (string) intval($item['expected_cost']))); } $pdf->create_table($theader, $tdata, $twidth, 'L', 'L', $thfont, $tbfont); return $pdf->Output(); }
function generatePDFReport($report, $results) { $types = self::get_report_column_types($report->getId()); eval('$managerInstance = ' . $report->getObjectType() . "::instance();"); $externalCols = $managerInstance->getExternalColumns(); $filename = str_replace(' ', '_', $report->getName()) . date('_YmdHis'); $pageLayout = $_POST['pdfPageLayout']; $fontSize = $_POST['pdfFontSize']; include_once LIBRARY_PATH . '/pdf/fpdf.php'; $pdf = new FPDF($pageLayout); $pdf->setTitle($report->getName()); $pdf->AddPage(); $pdf->SetFont('Arial', '', $fontSize); $pdf->Cell(80); $report_title = iconv(mb_internal_encoding(), "ISO-8859-1", html_entity_decode($report->getName(), ENT_COMPAT)); $pdf->Cell(30, 10, $report_title); $pdf->Ln(20); $colSizes = array(); $maxValue = array(); $fixed_col_sizes = array(); foreach ($results['rows'] as $row) { $i = 0; foreach ($row as $k => $value) { if (!isset($maxValue[$i])) { $maxValue[$i] = ''; } if (strlen(strip_tags($value)) > strlen($maxValue[$i])) { $maxValue[$i] = strip_tags($value); } $i++; } } $k = 0; foreach ($maxValue as $str) { $col_title_len = $pdf->GetStringWidth($results['columns'][$k]); $colMaxTextSize = max($pdf->GetStringWidth($str), $col_title_len); $db_col = $results['columns'][$k]; $colType = array_var($types, array_var($results['db_columns'], $db_col, ''), ''); if ($colType == DATA_TYPE_DATETIME && !($report->getObjectType() == 'ProjectEvents' && $results['db_columns'][$db_col] == 'start')) { $colMaxTextSize = $colMaxTextSize / 2; if ($colMaxTextSize < $col_title_len) { $colMaxTextSize = $col_title_len; } } $fixed_col_sizes[$k] = $colMaxTextSize; $k++; } $fixed_col_sizes = self::fix_column_widths($pageLayout == 'P' ? 172 : 260, $fixed_col_sizes); $max_char_len = array(); $i = 0; foreach ($results['columns'] as $col) { $colMaxTextSize = $fixed_col_sizes[$i]; $colFontSize = $colMaxTextSize + 5; $colSizes[$i] = $colFontSize; $col_name = iconv(mb_internal_encoding(), "ISO-8859-1", html_entity_decode($col, ENT_COMPAT)); $pdf->Cell($colFontSize, 7, $col_name); $max_char_len[$i] = self::get_max_length_from_pdfsize($pdf, $colFontSize); $i++; } $lastColX = $pdf->GetX(); $pdf->Ln(); $pdf->Line($pdf->GetX(), $pdf->GetY(), $lastColX, $pdf->GetY()); foreach ($results['rows'] as $row) { $i = 0; $more_lines = array(); $col_offsets = array(); foreach ($row as $k => $value) { if ($k == 'link') { $value = strip_tags($value); $cell = $value; } else { $cell = $this->format_value_to_print($k, $value, $types[$k], $report->getObjectType()); } $cell = iconv(mb_internal_encoding(), "ISO-8859-1", html_entity_decode($cell, ENT_COMPAT)); $splitted = self::split_column_value($cell, $max_char_len[$i]); $cell = $splitted[0]; if (count($splitted) > 1) { array_shift($splitted); $ml = 0; foreach ($splitted as $sp_val) { if (!isset($more_lines[$ml]) || !is_array($more_lines[$ml])) { $more_lines[$ml] = array(); } $more_lines[$ml][$i] = $sp_val; $ml++; } $col_offsets[$i] = $pdf->x; } $pdf->Cell($colSizes[$i], 7, $cell); $i++; } foreach ($more_lines as $ml_values) { $pdf->Ln(); foreach ($ml_values as $col_idx => $col_val) { $pdf->SetX($col_offsets[$col_idx]); $pdf->Cell($colSizes[$col_idx], 7, $col_val); } } $pdf->Ln(); $pdf->SetDrawColor(220, 220, 220); $pdf->Line($pdf->GetX(), $pdf->GetY(), $lastColX, $pdf->GetY()); $pdf->SetDrawColor(0, 0, 0); } $filename = ROOT . "/tmp/" . gen_id() . ".pdf"; $pdf->Output($filename, "F"); download_file($filename, "application/pdf", $report->getName(), true); unlink($filename); die; }
public function create_matrix() { $matrix = array(); $position = ''; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(12, 10, ' ', 1, 0, 'C'); $pdf->Cell(12, 10, 'A', 1, 0, 'C'); $pdf->Cell(12, 10, 'B', 1, 0, 'C'); $pdf->Cell(12, 10, 'C', 1, 0, 'C'); $pdf->Cell(12, 10, 'D', 1, 0, 'C'); $pdf->Cell(12, 10, 'E', 1, 0, 'C'); $pdf->Cell(12, 10, 'F', 1, 0, 'C'); $pdf->Cell(12, 10, 'G', 1, 0, 'C'); $pdf->Cell(12, 10, 'H', 1, 0, 'C'); $pdf->Ln(10); for ($i = 1; $i <= $this->rows; $i++) { $letra = 'A'; $pdf->Cell(12, 10, $i, 1, 0, 'C'); for ($j = 0; $j < $this->cols; $j++) { $matrix[$i][$j] = rand($this->min, $this->max); $pdf->Cell(12, 10, $matrix[$i][$j], 1, 0, 'C'); $position .= $letra . $i . '-' . $matrix[$i][$j] . ';'; ++$letra; } $pdf->Ln(10); } $pdf->Output('accessMatrix.pdf', 'D'); return $position; }
function EWD_UFAQ_Export_To_PDF() { require_once EWD_UFAQ_CD_PLUGIN_PATH . '/FPDF/fpdf.php'; if ($Category != "EWD_UFAQ_ALL_CATEGORIES") { $category_array = array('taxonomy' => 'ufaq-category', 'field' => 'slug', 'terms' => $Category->slug); } $params = array('posts_per_page' => -1, 'post_type' => 'ufaq'); $faqs = get_posts($params); $PDFPasses = array("FirstPageRun", "SecondPageRun", "Final"); foreach ($PDFPasses as $PDFRun) { $pdf = new FPDF(); $pdf->AddPage(); if ($PDFRun == "SecondPageRun" or $PDFRun == "Final") { $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(20, 10, "Page #"); $pdf->Cell(20, 10, "Article Title"); $pdf->Ln(); $pdf->SetFont('Arial', '', 12); foreach ($ToC as $entry) { $pdf->Cell(20, 5, " " . $entry['page']); $pdf->MultiCell(0, 5, $entry['title']); $pdf->Ln(); } unset($ToC); } foreach ($faqs as $faq) { $PostTitle = strip_tags(html_entity_decode($faq->post_title)); $PostText = strip_tags(html_entity_decode($faq->post_content)); $PostText = str_replace("[", "[", $PostText); $PostText = str_replace("]", "]", $PostText); $pdf->AddPage(); $Entry['page'] = $pdf->page; $Entry['title'] = $PostTitle; $pdf->SetFont('Arial', 'B', 15); $pdf->MultiCell(0, 10, $PostTitle); $pdf->Ln(); $pdf->SetFont('Arial', '', 12); $pdf->MultiCell(0, 10, $PostText); $ToC[] = $Entry; unset($Entry); } if ($PDFRun == "FirstPageRun" or $PDFRun == "SecondPageRun") { $pdf->Close(); } if ($PDFRun == "Final") { $pdf->Output('Ultimate-FAQ-Manual.pdf', 'D'); } } }
public function generarPDF($codigos, $estab) { $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pos_y = 10; $pdf->Cell(0, 12, "Codigos para los pinchos de " . $estab, 0, 0, "C"); foreach ($codigos as $codigo) { $pdf->Ln(); $pdf->Cell(0, 10, $codigo->getId(), 0, 0, "C"); } $pdf->Output("codigos.pdf", "D"); }
public function execute() { $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont("helvetica", "B", 16); $pdf->Cell(0, 10, "Hello world!", 0, 1); $pdf->Ln(); $pdf->SetFont("helvetica", "", 12); $pdf->SetFillColor(192, 192, 192); $pdf->Cell(40, 10, "Back", 1, 0, "C", 1); $pdf->Link(10, 30, 40, 10, "/demos"); $pdf->Output(); $this->output->disable(); }
/** * Sets up a new PDF object with the necessary settings * * @return FPDF A new PDF object */ protected function initialize_pdf() { global $CFG; require_once $CFG->libdir . '/fpdf/fpdf.php'; $newpdf = new FPDF('L', 'in', 'letter'); $newpdf->setMargins(self::marginx, self::marginy); $newpdf->SetFont('Arial', '', 9); $newpdf->AddPage(); $newpdf->SetFont('Arial', '', 16); $newpdf->MultiCell(0, 0.2, $this->report->title, 0, 'C'); $newpdf->Ln(0.2); $newpdf->SetFont('Arial', '', 8); $newpdf->SetFillColor(225, 225, 225); return $newpdf; }
/** * Recibe un array con los datos del pedido otro con las lineas de dicho pedido y un booleano que le * indica si el pdf es para mostrar o para enviar por correo y se encarga de rellenar el pdf con los datos recibidos * @param type $pedido * @param type $lineas * @param type $enviar */ public function PedidoPdf($pedido, $lineas, $enviar = false) { $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 14); $pdf->Cell(40, 7, "Pedido: " . $pedido['idpedido'], 0); $pdf->Cell(70, 7, "Estado: " . $pedido['estado_ped'], 0); $pdf->Cell(70, 7, "Fecha: " . $pedido['fecha_pedido'], 0); $pdf->Ln(); $pdf->Ln(); $pdf->Ln(); $pdf->Cell(70, 7, "Nombre del producto", 1); $pdf->Cell(26, 7, "Cantidad", 1); $pdf->Cell(40, 7, "Precio", 1); $pdf->Cell(40, 7, "Precio Final *", 1); $pdf->Ln(); foreach ($lineas as $linea) { $pdf->Cell(70, 7, $linea['nombrepro'], 1); $pdf->Cell(26, 7, $linea['cantidad'], 1); $pdf->Cell(40, 7, $linea['preciopro'] . iconv('UTF-8', 'windows-1252', '€'), 1); $pdf->Cell(40, 7, $linea['precio_ped'] . iconv('UTF-8', 'windows-1252', '€'), 1); $pdf->Ln(); } $pdf->Ln(); $pdf->Ln(); $pdf->Cell(100, 7, "Total del pedido: " . $pedido['total_ped'] . iconv('UTF-8', 'windows-1252', '€'), 1); $pdf->Ln(); $pdf->Ln(); $pdf->Ln(); $pdf->Cell(100, 7, "* Impuestos y descuento aplicados ", 0); if ($enviar == false) { $pdf->Output(); } else { $pdf->Output('F', 'asset/pedidocorreo/pedido.pdf', true); } }
function Header() { parent::SetFont($this->getFont(), '', 18); $this->SetTextColor(255, 255, 255); $this->SetFillColor($this->colorBackg[0], $this->colorBackg[1], $this->colorBackg[2]); //Título $tam = $this->w - 3; $pX = ($this->w - $tam) / 2; $this->SetX($pX); parent::Cell($tam, 15, $this->getTitle(), 0, 0, 'R', true); if ($this->getLogoHeader() != "") { parent::Image($this->getLogoHeader(), $pX, 11, 40); } //Salto de línea parent::Ln(20); parent::SetFont($this->getFont(), '', 10); }
$database_username = getenv('OPENSHIFT_MYSQL_DB_USERNAME'); $database_password = getenv('OPENSHIFT_MYSQL_DB_PASSWORD'); $database_name = getenv('OPENSHIFT_APP_NAME'); $connect = mysql_connect($database_host, $database_username, $database_password); $db = mysql_select_db('iptubetha'); $verifica = mysql_query("SELECT * FROM loginuser WHERE cpf = '{$login}' AND senha = '{$senha}'"); $row = mysql_fetch_array($verifica); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 13); $pdf->Cell(80, 20, 'Prefeitura de XXXXXXXXXXXXXXX', 1, Alignment . LEFT, 'C'); $pdf->SetFont('Arial', '', 9); $pdf->Cell(50, 10, 'N Documento: XXXXX.XXXXX', 1, 0, 'C'); $pdf->Cell(45, 10, 'Impresso em: ' . date('d/m/Y') . '', 1, 0, 'C'); $pdf->Cell(15, 10, 'Pagina 1', 1, 0, 'C'); $pdf->Ln(10); $pdf->Cell(80, 10, ''); $pdf->Cell(70, 10, 'Debito em Conta Prefeitura de XXXXXXXXXX', 1, 0, 'C'); $pdf->Cell(40, 10, 'Debito em Conta', 1, 0, 'C'); $pdf->Ln(10); $pdf->Cell(190, 10, 'Local de Pagamento: Em qualquer Agencia Bancaria ou Casas Lotericas.', 1, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', '', 8); $pdf->Cell(140, 5, 'Nome Do Contribuinte', L, 0, 'L'); $pdf->Cell(49, 5, 'CNPJ/CPF', L, 0, 'L'); $pdf->Cell(1, 10, '', R, 0, 'L'); $pdf->Ln(5); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(140, 10, $row['nome'], L, 0, 'L'); $pdf->Cell(49, 10, $row['cpf'], L, 0, 'L'); $pdf->Cell(1, 10, '', R, 0, 'L');
<?php require '../pdf/fpdf.php'; require '../conexion.php'; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 10); $pdf->Cell(4, 10, '', 0); $pdf->Image('../logo/logo.png', 10, 9.5, 12, 12, 'png'); $pdf->Cell(10, 8, '', 0); $pdf->Cell(150, 10, 'Merino Entreprise S.L.', 0); $pdf->SetFont('Arial', '', 9); $pdf->Cell(50, 10, 'Fecha: ' . date('d-m-Y') . '', 0); $pdf->Ln(18); $pdf->SetFont('Arial', 'B', 11); $pdf->Cell(70, 8, '', 0); $pdf->Cell(100, 8, 'USUARIOS DE BAR MERI', 0); $pdf->Ln(13); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(30, 8, 'USUARIO', 1, 0, "C"); $pdf->Cell(30, 8, 'NOMBRE', 1, 0, "C"); $pdf->Cell(30, 8, 'APELLIDOS', 1, 0, "C"); $pdf->Cell(45, 8, 'EMAIL', 1, 0, "C"); $pdf->Cell(25, 8, 'TIPO', 1, 0, "C"); $pdf->Cell(30, 8, 'FECHA NACIMIENTO', 1, 0, "C"); $pdf->Ln(8); $pdf->SetFont('Arial', '', 8); //CONSULTA $result = $connection->query("SELECT * FROM usuarios;"); $totalli = 0; $total = 0;
<?php // advancedII/pdf/teste.php require_once 'meupdf.php'; $pdf = new FPDF('P', 'cm', 'A4'); $pdf->SetAuthor('GerenciaNet'); $pdf->SetTitle('Meu Primeiro Documento PDF'); $pdf->SetMargins(2, 2, 1); $pdf->AliasNbPage('{nb}'); $pdf->AddPage(); // tentar adicionar um footer, adicionar a página, e tentar adicionar um header na nova página $produtos = array(array('nome' => 'Lixa de unha reutilizável', 'marca' => 'Treco', 'preco' => 10.5), array('nome' => 'Escova de Dentes Multiuso', 'marca' => 'OralBJ', 'preco' => 12), array('nome' => 'Refrigerante de Cachaça', 'marca' => 'Companhia das Índias Antigas', 'preco' => 4.5)); $pdf->SetFont('Arial', 'B', 12); $pdf->Cell(8, 1, 'Nome do Produto', 1, 0, 'C'); $pdf->Cell(5, 1, 'Marca', 1, 0, 'C'); $pdf->Cell(5, 1, 'Preço', 1, 0, 'C'); $pdf->Ln(1); $pdf->SetFont('Arial', '', 11); foreach ($produtos as $produto) { $pdf->Cell(8, 1, $produto['nome'], 1, 0, 'C'); $pdf->Cell(5, 1, $produto['marca'], 1, 0, 'C'); $pdf->Cell(5, 1, $produto['preco'], 1, 0, 'C'); $pdf->Ln(1); } $pdf->Output('first.pdf', 'I');
public function RelacaoMedicamento($arrValues, $type) { $pdf = new FPDF("P", "pt", "A4"); $pdf->AddPage(); $pdf->SetFont('arial', 'B', 13); $pdf->Cell(0, 5, utf8_decode("Relacionamento de medicamento x idosos"), 0, 1, 'C'); $pdf->Cell(0, 5, "", "B", 1, 'C'); $pdf->Ln(10); $pdf->SetFont('arial', 'B', 11); $Product = new Produto(); $row = $Product->getProdutoById($arrValues['medicamento']); $pdf->Cell(300, 20, "Medicamento - " . $row['NMPRODUTO'], 1, 0, "L"); $pdf->Cell(100, 20, utf8_decode('Sim/Não'), 1, 0, "L"); $pdf->SetFont('arial', '', 10); $pdf->Ln(); $Cliente = new Clientes(); foreach ($arrValues['relacoes'] as $value) { $row = $Cliente->getIdodosById($value); $pdf->Cell(300, 20, utf8_decode($row['NMCLIENTE']), 1, 0, "L"); $pdf->Cell(100, 20, 'Sim', 1, 0, "L"); $pdf->Ln(); } $pdf->Output(self::getNameRel(), $type); }
site()->visit('home', $lang); site()->kirby->localize(); // Page URI sent via POST $p = page(get('uri')); // Initialize the PDF $pdf = new FPDF('P', 'in', 'Letter'); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 12); // Build the content $pdf->Cell(0, 0.3, site()->title(), 0, 2); // Site title $pdf->Cell(0, 0.3, $p->txn_id()->value, 0, 2); // Invoice # $pdf->Cell(0, 0.3, date('F j, Y H:i', $p->txn_date()->value), 0, 2); // Date of order $pdf->Ln(0.3); // Line break $pdf->Cell(0, 0.3, l::get('bill-to') . ': ' . $p->payer_id()->value . ' ' . $p->payer_email()->value, 0, 2); // Payer id and email $pdf->Ln(0.3); // Line break // List products $products = explode('<br />', $p->products()->kirbytext()); foreach ($products as $product) { $pdf->Cell(0, 0.3, trim(trim($product, '<p>'), '</p>'), 0, 2); } $pdf->Ln(0.3); // Line break // Order price summary $pdf->Cell(0, 0.5, l::get('subtotal') . ': ' . formatPrice($p->subtotal()->value) . ' ' . l::get('shipping') . ': ' . formatPrice($p->shipping()->value) . ' ' . l::get('tax') . ': ' . formatPrice($p->tax()->value), 0, 2); $pdf->Cell(0, 0.5, l::get('tax') . ': ' . formatPrice($p->subtotal()->value + $p->shipping()->value + $p->tax()->value), 0, 2);
<?php session_start(); if ($_SESSION['access'] == 1) { require '../includes/fpdf.php'; $pdf = new FPDF(); $pdf->SetAuthor('ISP'); $pdf->SetTitle('Memoloi Projet'); $pdf->SetFont('Helvetica', 'B', 20); $pdf->SetTextColor(50, 60, 100); foreach ($_SESSION['images'] as $j) { $pdf->AddPage(); $pdf->Image("{$j}", 0, 0, 210, 297, 'JPG'); $pdf->Ln(2.0); } $pdf->Output(); unset($_SESSION['images']); } else { header('Location: index.php?login=error'); } ?>
} ///**********ECRITURE DU COURRIER /* initialisation/configuration de la classe*/ $courrier = new FPDF(); //font declaration des polices ! $courrier->AddFont('SourceSansPro-Regular', '', 'SourceSansPro-Regular.php'); $courrier->AddFont('SourceSansPro-Semibold', '', 'SourceSansPro-Semibold.php'); $courrier->AddFont('SourceSansPro-LightItalic', '', 'SourceSansPro-LightItalic.php'); $courrier->SetFont('SourceSansPro-Regular', '', 12); $courrier->open(); $courrier->SetAutoPageBreak(1, 15); $courrier->AddPage(); /* Création bloc emetteur */ $courrier->SetFont('SourceSansPro-Regular', '', 12); $courrier->Image($logo, 5, 10, 45, 27); $courrier->Ln(20); $courrier->SetXY(55, 15); $courrier->Cell(0, 5, $emetteur['nom'], 0, 2, 'L', false); //largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond; $courrier->SetX(55); $courrier->MultiCell(0, 5, $emetteur['adr'], 0, 'L', false); //largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond; $courrier->SetX(55); $courrier->MultiCell(0, 5, $emetteur['cp'] . " " . $ville, 0, 'L', false); //largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond; $courrier->Ln(20); /* Création bloc destinataire */ $courrier->SetFont('SourceSansPro-Regular', '', 12); $courrier->SetX(120); $courrier->Cell(0, 5, $destinataire['nom'], 0, 1, 'L', false); //largeur,hauteur,,texte,bodure,suite,alignement,couleur de fond;
//aqui la consulta o lo que sea... $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', '10'); //titulos de las tabals..... /* $pdf->Cell(60,20,'Ultim Control',C); $pdf->Cell(20,20,'Vaca/Codi'); $pdf->Cell(50,10,'Datacontrol'); $pdf->Cell(25,5,'LLET'); */ //resultados de la consulta a la BD //while($row = mysql_fetch_array($result)) { for ($i = 1; $i <= 10; $i++) { $pdf->Cell(20, 20, 'a', 1, 0); $pdf->Cell(50, 20, 'b', 1, 0); $pdf->Ln(20); $pdf->Cell(25, 5, 'c', 1, 0); $i = $i + 1; /*$pdf->Cell(60,20,'PDF+PHP Test',); rectangle with 60 mm of width & 20 mm of height, we wrote ‘PDF+PHP Test’ and the first 0 means we do not want a border. The 1 next to it means that once it’s done the cell, it will go to the beginning of the next line, if 0 is provided, then it will be to the right of it, if 2 is provided then it will go below. The C is just the alignment which is center of the text inside the box, possible values are left (L), center (C), right (R).*/ $pdf->Ln(5); } $pdf->Output(); /*Now let’s see that code line by line… require('fpdf.php'); This line includes our FPDF class that we need to create the PDF file. $pdf=new FPDF(); This line creates a new instance of the FPDF class which will be binded to $pdf
$cliente_direccion = $venta->cli_direccion; $cliente_ruc = $venta->cli_ruc; $e_fecha = $venta->_util->obtiene_fecha($venta->ven_fecha); $fecha = explode("/", $e_fecha); //si fecha esta en formato dia-mes-año $dia = $fecha[0]; $mes = $venta->_util->ver_nombre_mes($fecha[1]); $mes_numero = substr($fecha[3], 2); $anio = substr($fecha[2], 3); $pdf->Cell(1.2, 0.8, '', 0, 0, 'L'); //fecha $pdf->Cell(1.2, 0.8, $dia, 0, 0, 'L'); $pdf->Cell(1.2, 0.8, $mes_numero, 0, 0, 'L'); $pdf->Cell(1.2, 0.8, $anio, 0, 0, 'L'); $pdf->Cell(1.2, 0.8, '', 0, 0, 'L'); $pdf->Ln(0.8); $pdf->Cell(9, 0.1, '', 0, 0, 'L'); $pdf->Ln(0.1); $pdf->Cell(1.7, 0.7, '', 0, 0, 'L'); $pdf->Cell(7.3, 0.7, $cliente_nombre, 0, 0, 'L'); $pdf->Ln(0.7); $pdf->Cell(9, 0.1, '', 0, 0, 'L'); $pdf->Ln(0.1); $pdf->Cell(9, 0.7, '', 0, 0, 'L'); $pdf->Ln(0.7); $j = '0'; $rsd = $venta->detalle_ventas_listar($_REQUEST['venta']); while ($campod = mysql_fetch_array($rsd)) { $producto = $campod['pro_descripcion']; $cantidad = $campod['ven_totalcantidad']; $precio = $campod['ven_preciototal'];
function savePDFReport() { $report_data = $this->get_calls_table_data(); $report_body = "<pre>" . print_r($report_data, true) . "</pre>"; require dirname(__FILE__) . '/../../libs/fpdf17/fpdf.php'; $report_path = "../assets/tmp_reports/"; $reportname = "calls_" . $this->get_gsm_number() . "_" . $this->period . ".pdf"; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(40, 10, 'Calls Reprot!'); //$pdf->WriteHTML("<H2>gggg<H2>"); //$pdf->Write(5, $report_body); $pdf->Ln(); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(40, 10, 'Caller Number'); $pdf->Cell(40, 10, 'Call Start'); $pdf->Cell(40, 10, 'Call End'); $pdf->Cell(20, 10, 'Duration'); $pdf->Cell(20, 10, 'Status'); $pdf->Ln(); $pdf->SetFont('Arial', '', 10); foreach ($report_data as $cd) { if ($cd['call_end'] > 0) { $d = "Successfully transferred"; } else { $d = "Busy"; } $pdf->Cell(40, 5, $cd['callerid']); $pdf->Cell(40, 5, $cd['call_start']); $pdf->Cell(40, 5, $cd['call_end']); $pdf->Cell(20, 5, $cd['total_duration']); $pdf->Cell(20, 5, $cd['status']); $pdf->Ln(); } $pdf->Output($report_path . $reportname, 'F'); return $reportname; }
if (file_exists($mypasswdtxtdir)) { $mypasswd = file_get_contents($mypasswdtxtdir); preg_match('/mysql password = (.*)/', $mypasswd, $mypasswd); $mypasswd = trim($mypasswd[1]); } else { $mypasswd = ""; } if ($_REQUEST['action'] == "getpdf") { mysql_connect("localhost", "root", $mypasswd); mysql_select_db("cdcol"); include 'fpdf/fpdf.php'; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Helvetica', '', 14); $pdf->Write(5, 'CD Collection'); $pdf->Ln(); $pdf->SetFontSize(10); $pdf->Write(5, '© 2002/2003 Kai Seidler, oswald@apachefriends.org, GPL'); $pdf->Ln(); $pdf->Ln(5); $pdf->SetFont('Helvetica', 'B', 10); $pdf->Cell(40, 7, $TEXT['cds-attrib1'], 1); $pdf->Cell(100, 7, $TEXT['cds-attrib2'], 1); $pdf->Cell(20, 7, $TEXT['cds-attrib3'], 1); $pdf->Ln(); $pdf->SetFont('Helvetica', '', 10); $result = mysql_query("SELECT titel,interpret,jahr FROM cds ORDER BY interpret"); while ($row = mysql_fetch_array($result)) { $pdf->Cell(40, 7, $row['interpret'], 1); $pdf->Cell(100, 7, $row['titel'], 1); $pdf->Cell(20, 7, $row['jahr'], 1);
//header('Content-disposition: attachment; filename='.$solicitud.'.pdf'); //header('Content-type: application/pdf'); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', 'B', 10); $url = base_url(); $INC_DIR = $url . "img/"; $pdf->Image($INC_DIR . 'logo.png', 10, 6, 40); //$pdf->Image('img/logo.png',10,6,40); $pdf->SetFont('Arial', 'B', 15); $pdf->Cell(80); $pdf->Cell(30, 8, "Gracias por preferirnos", 0, 0, 'C'); $pdf->SetY(35); $pdf->SetFont('Arial', 'B', 10); $pdf->Cell(189, 8, utf8_decode('De acuerdo a su solicitud, a continuación le presentamos su propuesta.'), 0, 1, 'L'); $pdf->Ln(3); $pdf->Cell(189, 8, utf8_decode('Propuesto asegurado: ' . $nombre), 1, 1, 'L'); $pdf->Cell(189, 8, utf8_decode('Teléfono: ' . $telefono), 1, 1, 'L'); $pdf->Cell(189, 8, utf8_decode('Celular: ' . $celular), 1, 1, 'L'); $pdf->Cell(189, 8, utf8_decode('Correo Electrónico: ' . $email), 1, 1, 'L'); $pdf->Cell(189, 8, utf8_decode('Cédula: ' . $cedula), 1, 1, 'L'); $pdf->Ln(3); $pdf->Cell(189, 8, utf8_decode("Compañía de seguros: " . $company . ""), 1, 1, 'L'); $pdf->Ln(5); $pdf->SetTextColor(255, 0, 0); $pdf->Cell(59, 5, utf8_decode("Cotización No.: " . $solicitud . ""), 1, 0, 'C'); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(65, 5, utf8_decode('Ramo: AUTO'), 1, 0, 'C'); $pdf->Cell(65, 5, utf8_decode("Fecha: " . $fecha_solicitud . ""), 1, 1, 'C'); $pdf->Ln(5); $pdf->SetTextColor(0, 102, 204);
$idFolio = $_GET['id1']; $query = $db->prepare("SELECT folios.NroFolio, folios.PersonaReferente, folios.UnidadAcademica, unidad_academica.NombreUnidadAcademica, folios.Organizacion, \n\t organizacion.NombreOrganizacion, folios.TipoFolio,DATE(folios.FechaEntrada) as FechaEntrada, folios.FechaCreacion, folios.UbicacionFisica, \n\t\tubicacion_archivofisico.DescripcionUbicacionFisica ,folios.Prioridad ,prioridad.DescripcionPrioridad, folios.DescripcionAsunto \n \tFROM folios INNER JOIN ubicacion_archivofisico ON folios.UbicacionFisica = ubicacion_archivofisico.Id_UbicacionArchivoFisico \n \tINNER JOIN prioridad ON folios.Prioridad = prioridad.Id_Prioridad \n \tLEFT JOIN unidad_academica ON folios.UnidadAcademica = unidad_academica.Id_UnidadAcademica \n \tLEFT JOIN organizacion ON folios.Organizacion = organizacion.Id_Organizacion \n \tWHERE NroFolio = :NroFolio"); $query->bindParam(":NroFolio", $idFolio); $query->execute(); $result = $query->fetch(); $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 18); $pdf->Image($maindir . 'assets/img/lucen-aspicio.png', 50, 30, 200, 200, 'PNG'); $pdf->Image($maindir . 'assets/img/logo_unah.png', 10, 5, 20, 35, 'PNG'); $pdf->Image($maindir . 'assets/img/logo-cienciasjuridicas.png', 170, 8, 35, 35, 'PNG'); $pdf->Cell(18, 10, '', 0); $pdf->Cell(120, 10, ' Reporte de Seguimientos del Folio', 0); $pdf->SetFont('Arial', '', 9); $pdf->Cell(50, 10, 'Hoy: ' . date('Y-m-d') . '', 0); $pdf->Ln(10); $pdf->Cell(115, 8, ' Folio: ' . $idFolio, 0); $pdf->Ln(5); if ($result['TipoFolio'] == 0) { $tipo = "Folio de entrada"; } elseif ($result['TipoFolio'] == 1) { $tipo = "Folio de salida"; } $pdf->Cell(120, 8, ' Tipo de Folio: ' . $tipo, 0); $pdf->Ln(5); $pdf->Cell(125, 8, ' Descripcion: ' . $result['DescripcionPrioridad'], 0); $pdf->Ln(5); $pdf->Cell(130, 8, ' Fecha de Entrada: ' . $result['FechaEntrada'], 0); $pdf->Ln(5); $pdf->Cell(135, 8, ' Asunto: ' . $result['DescripcionAsunto'], 0); $pdf->Ln(10);
public function fee_month() { $date_from = $this->input->get("date_from"); $date_to = $this->input->get("date_to"); $event = $this->input->get("event"); require_once "../assets/fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AliasNbPages(); $pdf->AddPage('L', 'A4'); //title $pdf->SetFont('Arial', 'B', 16); $pdf->Cell(0, 10, 'Report Absensi Moderasi HM Sampoerna', 0, 0, 'C'); $pdf->Ln(10); $pdf->SetFont('Arial', '', 10); $pdf->Cell(0, 5, 'Periode Tanggal : ' . $date_from . ' s/d ' . $date_to, 0, 0, 'C'); $pdf->Ln(5); $pdf->Cell(0, 5, 'Event : ' . $this->event_model->get_event_name($this->input->get("event")), 0, 0, 'L'); $pdf->Ln(10); //header $pdf->SetFont('Arial', 'B', 8); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(10, 14, 'No', 1, 0, 'C'); $pdf->Cell(40, 14, 'Moderator', 1, 0, 'C'); $from = date_create(format_ymd($date_from)); $to = date_create(format_ymd($date_to)); $j = 0; while ($from <= $to) { $pdf->SetXY(60 + $j, 35); $pdf->Cell(6, 7, date_format($from, "d"), 1, 0, 'C'); $pdf->SetXY(60 + $j, 42); $pdf->Cell(6, 7, date_format($from, "m"), 1, 0, 'C'); date_add($from, date_interval_create_from_date_string('1 days')); $j += 6; } $pdf->SetXY($j + 60, 35); $pdf->Cell(0, 14, 'Jumlah', 1, 0, 'C'); $pdf->Ln(14); //rows $pdf->SetFont('Arial', '', 8); $pdf->SetDrawColor(0, 0, 0); $pdf->SetTextColor(0, 0, 0); $result = $this->user_event_model->get_user_month()->result(); $total = 0; $i = 1; $j = 0; foreach ($result as $r) { $pdf->Cell(10, 7, $i++, 1, 0, 'C'); $pdf->Cell(40, 7, $r->user, 1, 0, 'L'); $from = date_create(format_ymd($date_from)); $to = date_create(format_ymd($date_to)); $j = 0; $jum = 0; while ($from <= $to) { $jumlah = $this->absent_model->check_exist_month($r->user_kode, $event, date_format($from, 'Y-m-d')); $pdf->Cell(6, 7, number_format($jumlah), 1, 0, 'C'); $jum += $jumlah; date_add($from, date_interval_create_from_date_string('1 days')); $j++; } $pdf->Cell(0, 7, number_format($jum), 1, 0, 'C'); $total += $jum; $pdf->Ln(7); } $pdf->SetFillColor(240, 240, 240); $pdf->SetFont('Arial', 'B', 8); $pdf->Cell(50 + 6 * $j, 7, 'Total : ', 1, 0, 'R', true); $pdf->Cell(0, 7, number_format($total), 1, 0, 'C', true); $pdf->SetFont('Arial', '', 10); $this->_footer($pdf); $pdf->Output("Fee Moderasi HM Sampoerna", "I"); }
} else { $female = "False"; } if (!isset($twins)) { $twins = "True"; } else { $twins = "False"; } require "fpdf/fpdf.php"; $pdf = new FPDF(); $pdf->AddPage(); $pdf->SetFont("Arial", "B", 16); $pdf->Cell(0, 10, "Nitave Hospital", 1, 0, "L"); $pdf->Cell(-100, 10, "Indoor Case Paper", 1, 0, "C"); $pdf->SetFont("Arial", "", 10); $pdf->Ln(); $pdf->Cell(0, 10, "Bill no : {$bno}", 1, 0, "L"); $pdf->Cell(-100, 10, "Case No : {$no}", 1, 0, "C"); $pdf->Ln(); $pdf->Cell(0, 10, "Name : {$name}", 1, 0, "L"); $pdf->Cell(-100, 10, "Age : {$age}", 1, 0, "C"); $pdf->Ln(); $pdf->Cell(0, 10, "Address : {$address}", 1, 0, "L"); //$pdf->Cell(-100,10,"Present Complaints : {$complents}",1,0,"C"); $pdf->Ln(); $pdf->Cell(0, 10, "Date of Admission : {$admitdate}", 1, 0, "L"); $pdf->Cell(-100, 10, "Date of discharge : {$dischargedate}", 1, 0, "C"); $pdf->Ln(); $pdf->Cell(0, 10, "Diagnosis : {$diagnosis}", 1, 0, "L"); $pdf->Ln(); $pdf->Cell(0, 10, "Treatment : {$treatement}", 1, 0, "L");
function createpdf($id_gr) { require '../fpdf/fpdf.php'; //permite criar uma font a partir das font do windows //require('../fpdf/makefont/makefont.php'); //MakeFont('../fpdf/arial.ttf','iso-8859-1', true); if (strpos($id_gr, '-') !== false) { $grepdb = grepGetByGrNumber($id_gr); } else { $grepdb = grepGetById($id_gr); } //$grepdb = grepGetById($id_gr); $pdf = new FPDF('P', 'mm', 'A4'); $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('arial', '', 12); $pdf->Cell(0, 10, $pdf->Image('../images/eleclerc.jpg', 6, 10, 50), 0, 0, 'L'); //$pdf->Cell(0,10,utf8_decode('Guia de Reparação nº19') ,0 ,0 ,'R'); if ($grepdb['gr_number'] == "") { $pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['id']), 0, 0, 'R'); } else { $pdf->Cell(0, 10, utf8_decode('Guia de Reparação nº' . $grepdb['gr_number']), 0, 0, 'R'); } $pdf->Ln(15); $pdf->Cell(155, 10, utf8_decode($_SESSION['morada_leclerc_pdf']), 0, 0, 'L'); $pdf->Cell(2, 10, utf8_decode('Data: ' . invertedatasemhora($grepdb['date_in'])), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode($_SESSION['cod_postal_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode('Tel: ' . $_SESSION['telefone_leclerc_pdf'] . ' Fax: ' . $_SESSION['fax_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode($_SESSION['mail_leclerc_pdf']), 0, 0, 'L'); $pdf->Ln(6); $pdf->Cell(0, 10, utf8_decode('NIF: ' . $_SESSION['nif_leclerc_pdf']), 0, 0, 'L'); //cliente $pdf->Ln(15); $pdf->SetFont('arial', '', 20); $pdf->Cell(0, 10, utf8_decode('Cliente'), 0, 0, 'L'); $pdf->Ln(2); $pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('arial', '', 12); $pdf->Cell(0, 10, utf8_decode('Nome: ' . $grepdb['cl_name']), 0, 0, 'L'); $pdf->Ln(10); $pdf->Cell(0, 10, utf8_decode('Morada: ' . $grepdb['cl_morada']), 0, 0, 'L'); $pdf->Ln(10); //o multicell permite ser só uma linha ou caso acaba a linha cria logo uma por baixo $pdf->Cell(80, 10, utf8_decode('Localidade: ' . $grepdb['cl_localidade'])); $pdf->Cell(2, 10, utf8_decode('Cod. Postal: ' . codpostalToForm($grepdb['cl_codpostal']))); $pdf->Ln(10); $pdf->Cell(0, 10, utf8_decode('Contacto: ' . $grepdb['cl_telefone']), 0, 0, 'L'); $pdf->Ln(15); $pdf->SetFont('arial', '', 20); //artigo $pdf->Cell(0, 10, utf8_decode('Artigo'), 0, 0, 'L'); $pdf->Ln(2); $pdf->Cell(0, 10, utf8_decode('_______________________________________________'), 0, 0, 'L'); $pdf->Ln(10); $pdf->SetFont('arial', '', 12); $pdf->Cell(80, 10, utf8_decode('Marca: ' . $grepdb['art_marca'])); $pdf->Cell(2, 10, utf8_decode('Tipo: ' . $grepdb['art_type'])); $pdf->ln(10); $pdf->Cell(80, 10, utf8_decode('Modelo: ' . $grepdb['art_modelo'])); $pdf->Cell(2, 10, utf8_decode('EAN: ' . $grepdb['art_ean'])); $pdf->ln(10); $pdf->MultiCell(0, 10, utf8_decode('Nº Série: ' . $grepdb['art_numserie'])); $pdf->MultiCell(0, 10, utf8_decode('Anomalia: ' . $grepdb['art_anomalia'])); $pdf->MultiCell(0, 10, utf8_decode('Acessórios: ' . $grepdb['art_acessor'])); $pdf->MultiCell(0, 10, utf8_decode('Estética: ' . $grepdb['art_estetic'])); //$image_photo = $pdf->Image('../images/euro.jpg',$pdf->GetX(), $pdf->GetY(), 'R'); $pdf->Cell(80, 10, utf8_decode('Talão: ' . $grepdb['art_numtalao'])); $pdf->Cell(2, 10, utf8_decode('Valor: ' . $grepdb['art_valor'])); $pdf->Ln(10); if ($grepdb['art_garantie'] == 1) { $pdf->Cell(80, 10, utf8_decode('Garantia: Sim')); $pdf->Cell(2, 10, utf8_decode('Data: ' . $grepdb['art_dategar'])); } else { $pdf->Cell(0, 10, utf8_decode('Garantia: Não'), 0, 0, 'L'); } $pdf->Ln(10); if ($grepdb['art_orcamento'] == 1) { $pdf->Cell(0, 10, utf8_decode('Orçamento: Sim'), 0, 0, 'L'); } else { $pdf->Cell(0, 10, utf8_decode('Orçamento: Não'), 0, 0, 'L'); } $pdf->Ln(20); $pdf->Cell(20, 10, utf8_decode(' ')); $pdf->Cell(80, 10, utf8_decode('Assinatura Cliente:')); $pdf->Cell(2, 10, utf8_decode('Assinatura Funcionário:')); $pdf->Ln(20); $pdf->Cell(20, 10, utf8_decode(' ')); $pdf->Cell(80, 10, utf8_decode('________________')); $pdf->Cell(2, 10, utf8_decode('____________________')); return $pdf; }
} else { $dni = $campo['carcou_dni']; } $fecha_recepcion = $cargo->util->obtienefecha($campo['carcou_fecharecepcion']); $observaciones = $campo['carcou_observaciones']; $hora = $campo['carcou_hora']; $fragil = $campo['fra_descripcion']; $embalaje = $campo['emb_descripcion']; if ($cant_vestandar > 0) { $valor = $cant_vestandar . ' ESTANDAR'; } else { $valor = $cant_vsimple . ' SIMPLE'; } $pdf->Cell(15.6, 1, '', 0, 0, 'C'); $pdf->Cell(4, 1, $codigo, 0, 0, 'C'); $pdf->Ln(1); $pdf->Cell(19.6, 0.5, '', 0, 0, 'C'); $pdf->Ln(0.5); $pdf->Cell(4.9, 0.7, $fecha, 0, 0, 'C'); $pdf->Cell(4.9, 0.7, $origen, 0, 0, 'C'); $pdf->Cell(4.9, 0.7, $destino, 0, 0, 'C'); $pdf->Cell(4.9, 0.7, $area, 0, 0, 'C'); $pdf->Ln(0.7); $pdf->Cell(9.800000000000001, 1.4, $remite, 0, 0, 'C'); //$pdf->Ln(1.4); $pdf->Cell(9.800000000000001, 0.7, $consignado, 0, 2, 'C'); $pdf->Cell(9.800000000000001, 0.7, $direccionconsignado . ' - ' . $distritodestino, 0, 0, 'C'); $pdf->Ln(0.7); //$pdf->Cell(9.8,1.4,$consignado,1,0,'C'); //$pdf->Ln(1.4); $pdf->Cell(1.6, 0.5, '', 0, 0, 'C');
// // Posición: a 1,5 cm del final // $this->SetY(-20); // // Arial italic 8 // $this->SetFont('Arial','',6); // //calculo las palabras que tiene el texto } } // Creación del objeto de la clase heredada //$pdf = new PDF(); $pdf = new FPDF('L', 'mm', 'A4'); //print_r($pdf->datosPresupuesto);die; $pdf->AliasNbPages(); $pdf->AddPage(); $pdf->SetFont('Arial', '', 9); $pdf->SetDrawColor(0, 0, 0); $pdf->Ln(); $pdf->Ln(); // Fondo $pdf->Image("../images/fondo.gif", 0, 30, 297, 180); // Logo $pdf->Image("../qualidad/doc-" . $_SESSION['base'] . "/logo-certificado.jpg", 10, 12, 60, 30); // 2/1 proporcional // Salto de línea $pdf->Ln(25); $altura = 10; $fill = false; $espacioBlancoIzda = 70; $pdf->SetFillColor(255, 255, 255); $pdf->SetDrawColor(200, 200, 200); $pdf->SetLineWidth(0.1); $pdf->SetFont('Arial', 'B', 18);