本文整理汇总了PHP中PDF::GetX方法的典型用法代码示例。如果您正苦于以下问题:PHP PDF::GetX方法的具体用法?PHP PDF::GetX怎么用?PHP PDF::GetX使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PDF
的用法示例。
在下文中一共展示了PDF::GetX方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
/**
* PDF image renderer
*
* @param PDF $pdf
*
* @return void
*/
function render($pdf)
{
global $lastpicbottom, $lastpicpage, $lastpicleft, $lastpicright;
// Check for a pagebreak first
if ($pdf->checkPageBreakPDF($this->height + 5)) {
$this->y = $pdf->GetY();
}
$curx = $pdf->GetX();
// If current position (left)set "."
if ($this->x == ".") {
$this->x = $pdf->GetX();
} else {
$this->x = $pdf->addMarginX($this->x);
$pdf->SetX($curx);
}
if ($this->y == ".") {
//-- first check for a collision with the last picture
if (isset($lastpicbottom)) {
if ($pdf->PageNo() == $lastpicpage && $lastpicbottom >= $pdf->GetY() && $this->x >= $lastpicleft && $this->x <= $lastpicright) {
$pdf->SetY($lastpicbottom + 5);
}
}
$this->y = $pdf->GetY();
} else {
$pdf->SetY($this->y);
}
if ($pdf->getRTL()) {
$pdf->Image($this->file, $pdf->getPageWidth() - $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align);
} else {
$pdf->Image($this->file, $this->x, $this->y, $this->width, $this->height, "", "", $this->line, false, 72, $this->align);
}
$lastpicpage = $pdf->PageNo();
$pdf->lastpicpage = $pdf->getPage();
$lastpicleft = $this->x;
$lastpicright = $this->x + $this->width;
$lastpicbottom = $this->y + $this->height;
// Setup for the next line
if ($this->line == "N") {
$pdf->SetY($lastpicbottom);
}
}
示例2: render
/**
* PDF line renderer
*
* @param PDF $pdf
*
* @return void
*/
function render($pdf)
{
if ($this->x1 == ".") {
$this->x1 = $pdf->GetX();
}
if ($this->y1 == ".") {
$this->y1 = $pdf->GetY();
}
if ($this->x2 == ".") {
$this->x2 = $pdf->getMaxLineWidth();
}
if ($this->y2 == ".") {
$this->y2 = $pdf->GetY();
}
if ($pdf->getRTL()) {
$pdf->Line($pdf->getPageWidth() - $this->x1, $this->y1, $pdf->getPageWidth() - $this->x2, $this->y2);
} else {
$pdf->Line($this->x1, $this->y1, $this->x2, $this->y2);
}
}
示例3: array
$width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
$height = 12;
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', '', 7);
$subtot = array();
foreach ($dtKary as $lstKary) {
$noe += 1;
$pdf->Cell(3 / 100 * $width, $height, $noe, 1, 0, 'C', 1);
$pdf->Cell(13 / 100 * $width, $height, $optNmKar[$lstKary], 1, 0, 'L', 1);
$pdf->Cell(7 / 100 * $width, $height, $optTipe[$optTipeId[$lstKary]], 1, 0, 'C', 1);
$pdf->Cell(10 / 100 * $width, $height, number_format($dtGaji[$lstKary], 0), 1, 0, 'R', 1);
$totGaji += $dtGaji[$lstKary];
foreach ($test as $barisTgl => $isiTgl) {
$pdf->Cell(1.5 / 100 * $width, $height, $dtAbsens[$lstKary][$isiTgl], 1, 0, 'C', 1);
$akhirX = $pdf->GetX();
}
foreach ($klmpkAbsn as $brsKet => $hslKet) {
$pdf->Cell(2 / 100 * $width, $height, $brt[$lstKary][$hslKet['kodeabsen']], 1, 0, 'C', 1);
$subtot[$lstKary]['total'] += $brt[$lstKary][$hslKet['kodeabsen']];
}
$pdf->Cell(5 / 100 * $width, $height, $subtot[$lstKary]['total'], 1, 1, 'R', 1);
}
$pdf->Output();
break;
case 'excel':
//echo "warning:".$strx;
//=================================================
$tab .= "Print Time:" . date('Y-m-d H:i:s') . "<br>By:" . $_SESSION['empl']['name'];
$dt = date("His");
$nop_ = "daftar_remise_" . $dt;
示例4:
}
if (!is_null($row['ta_Email']) && $row['ta_Email'] != '') {
$contatti .= $row['ta_Email'] . ' ';
}
$pdf->Cell(135, 6, ' ' . $contatti, 1, 1);
$pdf->Cell(40, 6, 'Tutor scolastico ', 1, 0, 'R', 1);
$pdf->Cell(135, 6, ' prof. ' . utf8_decode($row['TUT_Nome']) . ' ' . utf8_decode($row['TUT_Cognome']), 1, 1);
$pdf->Cell(40, 6, 'Contatti ', 1, 0, 'R', 1);
$pdf->Cell(135, 6, ' ' . $row['TUT_Cellulare'] . ' ' . $row['TUT_Email'], 1, 1);
/* $pdf->Cell(40,12,'Applicazione competenze ',1,0,'R',1);
$pdf->MultiCell(135,4,' '.utf8_decode($row['STA_Compito']),1,1);*/
$pdf->Ln(3);
$pdf->SetFont('abac', '', 11);
$pdf->Cell(0, 8, "Polizze assicurative", 0, 2);
$pdf->SetFont('abalc', '', 9);
$pdf->Rect($pdf->GetX() + 6, $pdf->GetY(), 169, 8);
$pdf->Cell(6);
$pdf->Cell(0, 4, "INAIL Codice PAT n. " . $rsmeucci['INAIL_Pat'] . " - Infortuni sul lavoro Polizza n. " . $rsmeucci['ASS_Infortuni'], 0, 2);
$pdf->Cell(0, 4, "Responsabilità civile Polizza n. " . $rsmeucci['ASS_RespCivile'] . " (Compagnia assicurativa " . $rsmeucci['ASS_Compagnia'] . ")");
$pdf->Ln(5);
$pdf->SetFont('abac', '', 11);
$pdf->Cell(0, 8, "Obiettivi e modalità del Tirocinio", 0, 2);
$pdf->SetFont('abalc', '', 9);
$pdf->Cell(6);
$pdf->MultiCell(169, 4, "Orientamento: Prendere coscienza delle abilità specifiche necessarie all'inserimento in un settore produttivo e delle possibilità di autorealizzazione in un ambiente diverso da quello familiare e scolastico.", 'TLR', 2);
$pdf->Cell(6);
$pdf->MultiCell(169, 4, "Socializzazione: Formare o potenziare le abilità comunicative e rafforzare determinate abilità cognitive, sociali e professionali; sviluppare le capacità di adattamento al fine di assumere atteggiamenti idonei rispetto all'ambiente operativo in cui gli alunni vengono inseriti.", 'LR', 2);
$pdf->Cell(6);
$pdf->MultiCell(169, 4, "Sviluppo di abilità: Acquisire la capacità di rendersi autonomo nello svolgere i compiti assegnati; Sviluppare precisione ed accuratezza nell'effettuare il lavoro assegnato.", 'LR', 2);
$pdf->Cell(6);
$pdf->MultiCell(169, 4, "Comportamento: Educazione al rispetto degli orari; sviluppare un corretto rapporto con gli altri dipendenti; capire l'importanza della cura delle attrezzature.", 'LR', 2);
示例5: PDF
}
//================================
$pdf = new PDF('L', 'pt', 'A4');
$width = $pdf->w - $pdf->lMargin - $pdf->rMargin;
$height = 10;
$pdf->AddPage();
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', '', 4.5);
if ($modPil != '2') {
$ang = 1;
$totalThn = count($dtThnBudget);
$totalThn = $totalThn + 1;
foreach ($dtThnBudget as $brsThnBudget) {
if ($ang == 1) {
$bmilY = $pdf->GetY();
$bmilX = $pdf->GetX();
$pdf->SetY($bmilY + 10);
$pdf->Cell(15, $height, $ang, 1, 0, 'C');
$modPil == '0' ? $pdf->Cell(50, $height, $brsThnBudget, 1, 0, 'L') : $pdf->Cell(50, $height, $brsThnBudget . "[" . $dtJmlhThnTnm[$thnBudget][$brsThnBudget] . "]", 1, 0, 'L');
} else {
if ($ang < $totalThn) {
$bmilY = $pdf->GetY();
$bmilX = $pdf->GetX();
$pdf->SetY($bmilY + 10);
$pdf->Cell(15, $height, $ang, 1, 0, 'C');
$modPil == '0' ? $pdf->Cell(50, $height, $brsThnBudget, 1, 0, 'L') : $pdf->Cell(50, $height, $brsThnBudget . "[" . $dtJmlhThnTnm[$thnBudget][$brsThnBudget] . "]", 1, 0, 'L');
}
}
$ang += 1;
for ($pdfAngk = 1; $pdfAngk <= $totalUnit + 1; $pdfAngk++) {
if ($pdfAngk != $totalUnit + 1) {
示例6:
$strv = "select namabarang from " . $dbname . ".log_5masterbarang where kodebarang='" . $bar->kodebarang . "'";
$resv = mysql_query($strv);
$barv = mysql_fetch_object($resv);
$namabarang = $barv->namabarang;
$pdf->Cell(8, 5, $no, 1, 0, 'L', 1);
$pdf->Cell(42, 5, $bar->nopo, 1, 0, 'L', 1);
$pdf->Cell(28, 5, $kodebarang, 1, 0, 'C', 1);
$pdf->Cell(80, 5, $namabarang, 1, 0, 'L', 1);
$pdf->Cell(15, 5, $satuan, 1, 0, 'L', 1);
$pdf->Cell(18, 5, number_format($jumlah, 2, '.', ','), 1, 1, 'R', 1);
}
//footer================================
// $dtpenerima=namakaryawan($dbname,$conn,$penerima);
// $dtpengetahui=namakaryawan($dbname,$conn,$pengetahui);
$dptinY = $pdf->GetY();
$dptinX = $pdf->GetX();
$pdf->SetY($dptinY + 25);
$pdf->SetX($dptinX);
$pdf->SetFillColor(255, 255, 255);
$pdf->SetFont('Arial', 'B', 8);
if (substr($expend, 0, 1) == 'S') {
$dert = $_SESSION['lang']['expeditor'];
$duer = $optSupplier[$expend];
} else {
$dert = $_SESSION['lang']['dibawa'];
$duer = $optKary[$expend];
}
$pdf->Cell(50, $height, $_SESSION['lang']['penerima'] . ",", 0, 0, 'C', 0);
$pdf->Cell(70, $height, $dert . ",", 0, 0, 'C', 0);
$pdf->Cell(65, $height, $_SESSION['lang']['pengirim'] . ",", 0, 1, 'C', 0);
$pdf->ln(25);
示例7: date
if ($nama_bagian != '') {
$pdf->AddPage();
}
$nama_bagian = $outbox->nama_bagian;
$pdf->ChapterTitle($nama_bagian);
}
if ($pdf->GetY() >= 175) {
$pdf->AddPage();
}
$i++;
$pdf->Cell(-6);
$pdf->Cell(6, $margin, $i, 0, 0);
$pdf->Cell(30, $margin, $outbox->no_surat, 0, 0);
$pdf->Cell(15, $margin, date("d-m-Y", strtotime($outbox->tgl_masuk)), 0, 0);
$pdf->Cell(15, $margin, date("d-m-Y", strtotime($outbox->tgl_surat)), 0, 0);
$current_x1 = $pdf->GetX();
$current_y1 = $pdf->GetY();
$pdf->Cell(90);
$current_x2 = $pdf->GetX();
$current_y2 = $pdf->GetY();
$pdf->Cell(50);
$current_x3 = $pdf->GetX();
$current_y3 = $pdf->GetY();
$pdf->Cell(35);
$pdf->Cell(30, $margin, $outbox->nama_jenis, 0, 0);
$pdf->Cell(0, $margin, $outbox->first_name, 0, 0);
$pdf->SetXY($current_x3, $current_y3);
$pdf->MultiCell(35, $margin, $outbox->ptt, 0, 'L');
$y3 = $pdf->getY();
$pdf->SetXY($current_x2, $current_y2);
$pdf->MultiCell(50, $margin, $outbox->tujuan, 0, 'L');
示例8: pdf
foreach($tab_liste_item as $item_id) // Pour chaque item...
{
$releve_PDF->VertCellFit($releve_PDF->cases_largeur, $releve_PDF->etiquette_hauteur, $tab_item[$item_id][0]['item_ref'], 1 /*border*/, 0 /*br*/, TRUE /*fill*/);
$releve_HTML_table_head .= '<th title="'.html($tab_item[$item_id][0]['item_nom']).'"><img alt="'.html($tab_item[$item_id][0]['item_ref']).'" src="./_img/php/etiquette.php?dossier='.$_SESSION['BASE'].'&nom='.urlencode($tab_item[$item_id][0]['item_ref']).'&size=8" /></th>';
}
}
else
{
foreach($tab_eleve as $tab) // Pour chaque élève...
{
extract($tab); // $eleve_id $eleve_nom $eleve_prenom $eleve_id_gepi
$releve_PDF->VertCellFit($releve_PDF->cases_largeur, $releve_PDF->etiquette_hauteur, $eleve_nom.' '.$eleve_prenom, 1 /*border*/, 0 /*br*/, TRUE /*fill*/);
$releve_HTML_table_head .= '<th><img alt="'.html($eleve_nom.' '.$eleve_prenom).'" src="./_img/php/etiquette.php?dossier='.$_SESSION['BASE'].'&nom='.urlencode($eleve_nom).'&prenom='.urlencode($eleve_prenom).'&size=8" /></th>';
}
}
$releve_PDF->SetX( $releve_PDF->GetX()+2 );
$releve_PDF->choisir_couleur_fond('gris_moyen');
$releve_PDF->Cell($releve_PDF->cases_largeur , $releve_PDF->etiquette_hauteur , '[ * ]' , 1 , 0 , 'C' , true , '');
$releve_PDF->Cell($releve_PDF->cases_largeur , $releve_PDF->etiquette_hauteur , '[ ** ]' , 1 , 1 , 'C' , true , '');
$checkbox_vide = ($affichage_checkbox) ? '<th class="nu"> </th>' : '' ;
$releve_HTML_table_head .= '<th class="nu"> </th><th>[ * ]</th><th>[ ** ]</th>'.$checkbox_vide.'</tr></thead>'."\r\n";
// lignes suivantes
$releve_HTML_table_body = '';
if($tableau_tri_objet=='eleve')
{
foreach($tab_eleve as $tab) // Pour chaque élève...
{
extract($tab); // $eleve_id $eleve_nom $eleve_prenom $eleve_id_gepi
$releve_PDF->choisir_couleur_fond('gris_clair');
$releve_PDF->CellFit($releve_PDF->intitule_largeur , $releve_PDF->cases_hauteur , pdf($eleve_nom.' '.$eleve_prenom) , 1 , 0 , 'L' , true , '');
$releve_HTML_table_body .= '<tr><td>'.html($eleve_nom.' '.$eleve_prenom).'</td>';
示例9:
$pdf->Cell(10, 5, ':', 0, 0, 'C');
$pdf->Cell(80, 5, $dOrder['nopp'], 0, 0, 'L');
$pdf->Cell(15, 5, 'Qty', 0, 0, 'L');
$pdf->Cell(10, 5, ':', 0, 0, 'C');
$pdf->Cell(10, 5, $dOrderJum['jumlah'], 0, 1, 'L');
$pdf->Cell(15, 5, '', 0, 0, 'L');
$pdf->Cell(10, 5, '', 0, 0, 'C');
$pdf->Cell(80, 5, '', 0, 0, 'L');
$pdf->Cell(15, 5, 'Approx Value', 0, 0, 'L');
$pdf->Cell(10, 5, ':', 0, 0, 'C');
$pdf->Cell(10, 5, $dOrder['matauang'] . '. ' . number_format($dOrder['nilaipermintaan'], 2), 0, 1, 'L');
$pdf->SetFont('Arial', '', 5);
$pdf->Cell(15, 5, '(Bank by price lowest quotation)', 0, 0, 'L');
$pdf->SetFont('Arial', '', 7);
$pdf->Ln();
$awalXjudulno = $pdf->GetX();
$awalYjudulatas = $pdf->GetY();
$pdf->Cell(10, 5, 'No', 1, 0, 'C');
$awalXjudulsup = $pdf->GetX();
$pdf->Cell(50, 5, 'Supplier & Place', 1, 0, 'C');
$awalXjudulbp = $pdf->GetX();
$pdf->Cell(35, 5, 'Basic Price', 1, 0, 'C');
$awalXjudulppn = $pdf->GetX();
$pdf->Cell(30, 5, 'PPN 10%', 1, 0, 'C');
$awalXjudulfp = $pdf->GetX();
$pdf->Cell(35, 5, 'Final Price', 1, 0, 'C');
$awalXjudulpy = $pdf->GetX();
$akhirXjudulpy = $pdf->GetX() + 35;
$pdf->Cell(35, 5, 'Payment', 1, 1, 'C');
$pdf->SetFont('Arial', '', 7);
$iData = "select * from " . $dbname . ".log_perintaanhargaht where nomor='" . $nodph . "' ";
示例10: substr
} else {
$sql .= "ORDER BY substr(billno,3,10)";
}
// echo "<pre>$sql</pre>";
$result = $mysqli->query($sql);
$data = array();
while ($row = $result->fetch_assoc()) {
$data[] = $row;
}
$result->close();
$first = true;
foreach ($data as $d) {
if (isset($_GET['printaddress']) && $_GET['printaddress'] == 'Y') {
$pdf->AddPage();
$pdf->SetFont('Arial', '', 10);
$x = $pdf->GetX() + 60;
$y = $pdf->GetY() + 85;
$pdf->SetXY($x, $y);
$w = $pdf->h - $pdf->bMargin - $pdf->y;
$pdf->RotatedCell(270, $w, 6, $d['party_name'], 0, 1, 'L');
$pdf->RotatedCell(270, $w, 6, $d['party_address'], 0, 1, 'L');
$pdf->RotatedCell(270, $w, 6, $d['party_city'], 0, 1, 'L');
} else {
$invoice = $d['sale_master_id'];
$partyName = $d['party_name'];
$partyCity = $d['party_city'];
$billno = $d['billno'];
$date = $d['sale_date_fmt'];
$billteNo = $d['billte_no'];
$transporter = $d['transporter_name'];
$address = $d['party_address'];
示例11: while
$business_id = $gd['business_id'];
//check if line is paid
$lp = mysql_query("select * from ebpls_transaction_payment_or_details a, ebpls_transaction_payment_or b where a.trans_id='{$owner_id}' and a.payment_id='{$business_id}' and a.ts between '{$date_from} 00:00:00' and '{$date_to} 23:59:59' and a.or_no = b.or_no");
//echo "select * from tempbusnature where owner_id='$owner_id' and business_id='$business_id' and recpaid='1'";
//$lp = mysql_query("select * from tempbusnature a, ebpls_buss_nature b, ebpls_transaction_payment_or_details c where owner_id='$owner_id' and business_id='$business_id' and recpaid='1' and a.bus_code=b.natureid and
//a.owner_id=c.trans_id and a.business_id=c.payment_id and c.ts between '$date_from 00:00:00' and '$date_to 23:59:59'");
while ($gp = mysql_fetch_assoc($lp)) {
//get details
$f = 0;
$pdf->SetX(5);
$pdf->Cell(50, 5, $gd[fulln], 1, 0, 'C');
$pdf->Cell(240, 5, $gd[business_name] . "/" . $gd[business_add], 1, 0, 'L');
//get or
$getor = mysql_query("select * from ebpls_transaction_payment_or_details a, ebpls_transaction_payment_or b where a.trans_id='{$owner_id}' and a.payment_id='{$business_id}' and a.or_no=b.or_no");
$getor = mysql_fetch_assoc($getor);
$RX = $pdf->GetX();
$pdf->Cell(40, 5, '', 1, 0, 'C');
//$pdf->Cell(40,5,$getor[or_no],1,0,'C');
//get paytax/fee
$gettax = mysql_Query("select * from tempassess a where a.owner_id='{$owner_id}' and a.business_id='{$business_id}'");
$dfv = 0;
while ($gett = mysql_fetch_assoc($gettax)) {
//while ($dfv < $v) {
$dfv++;
//display
$f++;
$disp = mysql_Query("select sum(amount) from ebpls_payment_details a, rpt_temp_abs b where a.owner_id='{$owner_id}' and a.business_id='{$business_id}' and a.tfoid='{$tfoid[$f]}' and a.tfoid = b.tfoid and or_no = '{$gp['payment_code']}' order by or_no asc");
//echo "select * from ebpls_payment_details a where a.owner_id='$owner_id' and a.business_id='$business_id' and a.tfoid='$tfoid[$f]' <br>";
//$disp = mysql_Query("select * from tempassess a where a.owner_id='$owner_id' and a.business_id='$business_id' and a.natureid='$gp[bus_code]' and a.tfoid='$tfoid[$f]'");
$cntm = mysql_num_rows($disp);
if ($tfoid[$f] != '') {
示例12: max
foreach($tab_repartition_quantitatif as $item_id => $tab_effectifs)
{
$somme += max(4,max($tab_effectifs));
}
$sacoche_pdf->tableau_devoir_repartition_nominative_initialiser($somme);
foreach($tab_item_id as $item_id=>$tab_infos_item)
{
// 1ère ligne : nouvelle page si besoin + référence du devoir et des codes si besoin
$sacoche_pdf->tableau_devoir_repartition_nominative_entete($groupe_nom,$date_fr,$description,$tab_init_quantitatif,$tab_repartition_quantitatif[$item_id]);
// ligne de répartition pour 1 item : référence item
$sacoche_pdf->tableau_saisie_reference_item($tab_infos_item[0],$tab_infos_item[1]);
// ligne de répartition pour 1 item : cases répartition nominative
foreach($tab_repartition_nominatif[$item_id] as $code=>$tab_eleves)
{
// Ecrire les noms ; plus court avec MultiCell() mais pb des retours à la ligne pour les noms trop longs
$memo_X = $sacoche_pdf->GetX();
$memo_Y = $sacoche_pdf->GetY();
foreach($tab_eleves as $key => $eleve_texte)
{
$sacoche_pdf->CellFit($sacoche_pdf->cases_largeur , $sacoche_pdf->lignes_hauteur , pdf($eleve_texte) , 0 , 2 , 'L' , false , '');
}
// Ajouter la bordure
$sacoche_pdf->SetXY($memo_X , $memo_Y);
$sacoche_pdf->Cell($sacoche_pdf->cases_largeur , $sacoche_pdf->cases_hauteur , '' , 1 , 0 , 'C' , false , '');
}
$sacoche_pdf->SetXY($sacoche_pdf->marge_gauche , $sacoche_pdf->GetY()+$sacoche_pdf->cases_hauteur);
}
$sacoche_pdf->Output($dossier_export.$fnom_export.'_repartition_nominative.pdf','F');
//
// c'est fini...
//
示例13:
$pdf->setX($x + 1);
$pdf->Celda(60, $lh2, utf8_decode('Desincorporación en el Mes por el Conceptos 60'), 0, 0, '', true);
// Faltantes de Bienes por Investigar
$pdf->setX($x + 200);
$pdf->Celda(50, $lh2, $data['desin_f'], 'B', 1, 'C', true);
$pdf->setY($yt + 55);
$pdf->setX($x + 1);
$pdf->Celda(60, $lh2, utf8_decode('Existencia Final'), 0, 0, '', true);
$pdf->setX($x + 200);
$pdf->Celda(50, $lh2, $data['existencia_final'], 'B', 1, 'C', true);
$pdf->setY($yt + 65);
$pdf->setX($x + 1);
$pdf->Celda(60, $lh2, utf8_decode('TOTALES IGUALES'), 0, 0, '', true);
$pdf->setX($x + 120);
$pdf->Celda(50, $lh2, $data['total'], 'B', 0, 'C', true);
$pdf->setX($x + 200);
$pdf->Celda(50, $lh2, $data['total2'], 'B', 1, 'C', true);
$pdf->setY($yt + 100);
$pdf->SetDrawColor(0, 0, 0);
$y = $pdf->GetY();
$pdf->SetY($y + 30);
$pdf->SetX($pdf->GetX() + 8);
$pdf->Cell(70, $lh, $pdf->capitalizar("{$header['responsable']}"), 0, 1, 'C', false);
$pdf->SetX($pdf->GetX() + 8);
$pdf->Cell(70, $lh, utf8_decode("Nombre y Apellido del {$header['cargo']}"), 'T', 0, 'C', false);
$pdf->SetX($pdf->GetX() + 19);
$pdf->Cell(70, $lh, 'Sello de la Unidad', 'T', 0, 'C', false);
$pdf->SetX($pdf->GetX() + 19);
$pdf->Cell(70, $lh, "Firma", 'T', 1, 'C', false);
$pdf->Ln(5);
$pdf->Output('bm4.pdf', 'D');
示例14: substr
} else {
$spek = "";
}
$nopp = substr($bar->nopp, 0, 3);
$sSat = "select satuan,namabarang from " . $dbname . ".log_5masterbarang where kodebarang='" . $bar->kodebarang . "'";
$qSat = mysql_query($sSat) or die(mysql_error());
$rSat = mysql_fetch_assoc($qSat);
$satuan = $rSat['satuan'];
$namabarang = $rSat['namabarang'];
$i++;
if ($no != 1) {
$pdf->SetY($akhirY);
}
$posisiY = $pdf->GetY();
$pdf->Cell(8, 4, $no, 0, 0, 'L', 0);
$pdf->SetX($pdf->GetX());
$pdf->Cell(15, 5, $bar->kodebarang, 0, 0, 'C', 0);
if ($spek == '' && $bar->catatan == '') {
$pdf->MultiCell(84, 5, $namabarang, 0, 'J', 0);
} else {
if ($spek != '' && $bar->catatan == '') {
$pdf->MultiCell(84, 5, $namabarang . "\n" . $spek, 0, 'J', 0);
} else {
if ($spek == '' && $bar->catatan != '') {
$pdf->MultiCell(84, 5, $namabarang . "\n" . $bar->catatan, 0, 'J', 0);
} else {
$pdf->MultiCell(84, 5, $namabarang . "\n" . $spek . "\n" . $bar->catatan, 0, 'J', 0);
}
}
}
$akhirY = $pdf->GetY();
示例15: foreach
foreach ($albero as $linea) {
// $pdf->Cell(0,6,$albero[0],0,0,'L');
// $righe = count($albero)-1;
//for( $y=0; $y<=$righe; $y++){
// $linea=$albero[$y];
$pdf->Ln(1);
// $str=utf8_decode($linea);
$str = iconv('UTF-8', 'windows-1252', $linea);
// $str=html_entity_decode($linea,"ENT_HTML5", "UTF-8");
$prev = strpos($str, '(');
$indent = substr($str, 0, $prev);
// [X]
$str = substr($str, $prev);
// [X]
$y1 = $pdf->GetY();
$x1 = $pdf->GetX() + $pdf->lMargin;
$y2 = $y1 + 4;
$x2 = $pdf->lMargin - 2;
while ($indent != "") {
// $y1=$y1+$vspacing;
$x1 = $pdf->GetX();
// $y2=$y1+6;
$x2 = $x1 + 1;
$ind = substr($indent, 0, 1);
$indent = substr($indent, 1);
switch ($ind) {
case "I":
$pdf->line($x1, $y1 + $vspacing, $x1, $y2 + $vspacing);
$pdf->SetXY($x2, $y1 + 1 + $vspacing);
break;
case "T":