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


PHP pdf_getPDFFontSize函数代码示例

本文整理汇总了PHP中pdf_getPDFFontSize函数的典型用法代码示例。如果您正苦于以下问题:PHP pdf_getPDFFontSize函数的具体用法?PHP pdf_getPDFFontSize怎么用?PHP pdf_getPDFFontSize使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: _pagehead

    /**
     *      Show header of document
     *      @param      pdf             Object PDF
     *      @param      object          Object commercial proposal
     *      @param      showaddress     0=no, 1=yes
     *      @param      outputlangs     Object lang for output
     */
	function _pagehead(&$pdf, $object, $showadress=1, $outputlangs)
	{
		global $conf,$langs;
		$default_font_size = pdf_getPDFFontSize($outputlangs);

		pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);

		//Affiche le filigrane brouillon - Print Draft Watermark
		if($object->statut==0 && ! empty($conf->global->PROPALE_DRAFT_WATERMARK))
		{
            pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->PROPALE_DRAFT_WATERMARK);
		}

		$posy=42;

		$pdf->SetXY($this->marge_gauche+2,$posy);

		// Sender name
		$pdf->SetTextColor(0,0,00);
		$pdf->SetFont('','B', $default_font_size);
		$pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');

		// Sender properties
		$carac_emetteur='';
	 	// Add internal contact of proposal if defined
		$arrayidcontact=$object->getIdContact('internal','SALESREPFOLL');
	 	if (sizeof($arrayidcontact) > 0)
	 	{
	 		$object->fetch_user($arrayidcontact[0]);
	 		$carac_emetteur .= ($carac_emetteur ? "\n" : '' ).$outputlangs->transnoentities("Name").": ".$outputlangs->convToOutputCharset($object->user->getFullName($outputlangs))."\n";
	 	}

	 	$carac_emetteur .= pdf_build_address($outputlangs,$this->emetteur);

		$pdf->SetFont('','', $default_font_size - 1);
		$pdf->SetXY($this->marge_gauche+2,$posy+4);
		$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');


		$pdf->rect(10, 40, 80, 40);

		$pdf->SetXY(10,5);
		$pdf->SetFont('','B', $default_font_size + 6);
		$pdf->SetTextColor(0,0,200);
		$pdf->MultiCell(200, 20, $outputlangs->transnoentities("CommercialProposal"), '' , 'C');

		// Cadre client destinataire
		$pdf->rect(100, 40, 100, 40);

		$pdf->SetTextColor(200,0,0);
		$pdf->SetFont('','B', $default_font_size + 2);

		$pdf->rect(10, 90, 100, 10);
		$pdf->rect(110, 90, 90, 10);

		$pdf->SetXY(10,90);
		$pdf->MultiCell(110, 10, $outputlangs->transnoentities("Ref")." : ".$outputlangs->convToOutputCharset($object->ref), 0, 'L');
		$pdf->SetXY(110,90);
		$pdf->MultiCell(100, 10, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs,true), 0, 'L');

		$posy=15;
		$pdf->SetFont('','', $default_font_size);

		$posy+=5;
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');

		if ($object->ref_client)
		{
			$posy+=5;
			$pdf->SetXY(100,$posy);
			$pdf->SetTextColor(0,0,60);
			$pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefCustomer")." : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
		}

		$posy+=5;
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$pdf->MultiCell(100, 3, $outputlangs->transnoentities("DateEndPropal")." : " . dol_print_date($object->fin_validite,"day",false,$outputlangs,true), '', 'R');

		if ($object->client->code_client)
		{
			$posy+=5;
			$pdf->SetXY(100,$posy);
			$pdf->SetTextColor(0,0,60);
			$pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode")." : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
		}

		$posy=39;

		$pdf->SetTextColor(0,0,0);

//.........这里部分代码省略.........
开发者ID:remyyounes,项目名称:dolibarr,代码行数:101,代码来源:pdf_propale_jaune.modules.php

示例2: _pagehead

	/**
	 *   	Show header of document
	 *   	@param      pdf     		Object PDF
	 *   	@param      object			Object commercial proposal
	 *      @param      showaddress     0=no, 1=yes
	 *      @param      outputlangs    	Object lang for output
	 */
	function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
	{
		global $conf,$langs,$mysoc;
		$default_font_size = pdf_getPDFFontSize($outputlangs);
		$langs->load("orders");

		pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);

		//Affiche le filigrane brouillon - Print Draft Watermark
		if($object->statut==0 && (! empty($conf->global->SHIPPING_DRAFT_WATERMARK)) )
		{
            pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->SHIPPING_DRAFT_WATERMARK);
		}

		//Prepare la suite
		$pdf->SetTextColor(0,0,60);
		$pdf->SetFont('','B', $default_font_size + 3);

		$posy=$this->marge_haute;

		$pdf->SetXY($this->marge_gauche,$posy);

		// Logo
		$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
		if ($this->emetteur->logo)
		{
			if (is_readable($logo))
			{
				$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);
			}
			else
			{
				$pdf->SetTextColor(200,0,0);
				$pdf->SetFont('','B', $default_font_size - 2);
				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
			}
		}
		else
		{
			$text=$this->emetteur->name;
			$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
		}

		// Show barcode
		if ($conf->barcode->enabled)
		{
			$posx=105;
		}
		else
		{
			$posx=$this->marge_gauche+3;
		}
		//$pdf->Rect($this->marge_gauche, $this->marge_haute, $this->page_largeur-$this->marge_gauche-$this->marge_droite, 30);
		if ($conf->barcode->enabled)
		{
			// TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref
			//$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3);
			//$pdf->Image($logo,10, 5, 0, 24);
		}

		$pdf->SetDrawColor(128,128,128);
		if ($conf->barcode->enabled)
		{
			// TODO Build code bar with function writeBarCode of barcode module for sending ref $object->ref
			//$pdf->SetXY($this->marge_gauche+3, $this->marge_haute+3);
			//$pdf->Image($logo,10, 5, 0, 24);
		}


		$posx=100;
		$posy=$this->marge_haute;

		$pdf->SetFont('','B', $default_font_size + 3);
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$title=$outputlangs->transnoentities("SendingSheet");
		$pdf->MultiCell(100, 4, $title, '' , 'R');
        $posy+=1;

		$pdf->SetFont('','', $default_font_size + 2);

		$posy+=5;
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefSending") ." : ".$object->ref, '', 'R');

		//Date Expedition
		$posy+=5;
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->date_delivery,"%d %b %Y",false,$outputlangs,true), '', 'R');

//.........这里部分代码省略.........
开发者ID:remyyounes,项目名称:dolibarr,代码行数:101,代码来源:pdf_expedition_rouget.modules.php

示例3: _pagehead

 /**
  *  Show top header of page.
  *
  *  @param	PDF			$pdf     		Object PDF
  *  @param  Object		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
 {
     global $conf, $langs;
     $outputlangs->load("main");
     $outputlangs->load("bills");
     $outputlangs->load("propal");
     $outputlangs->load("companies");
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
     // Show Draft Watermark
     if ($object->statut == 0 && !empty($conf->global->FACTURE_DRAFT_WATERMARK)) {
         pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FACTURE_DRAFT_WATERMARK);
     }
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $w = 110;
     $posy = $this->marge_haute;
     $posx = $this->page_largeur - $this->marge_droite - $w;
     $pdf->SetXY($this->marge_gauche, $posy);
     // Logo
     $logo = $conf->mycompany->dir_output . '/logos/' . $this->emetteur->logo;
     if ($this->emetteur->logo) {
         if (is_readable($logo)) {
             $height = pdf_getHeightForLogo($logo);
             $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
             // width=0 (auto)
         } else {
             $pdf->SetTextColor(200, 0, 0);
             $pdf->SetFont('', 'B', $default_font_size - 2);
             $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
             $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
         }
     } else {
         $text = $this->emetteur->name;
         $pdf->MultiCell($w, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
     }
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $title = $outputlangs->transnoentities("Invoice");
     if ($object->type == 1) {
         $title = $outputlangs->transnoentities("InvoiceReplacement");
     }
     if ($object->type == 2) {
         $title = $outputlangs->transnoentities("InvoiceAvoir");
     }
     if ($object->type == 3) {
         $title = $outputlangs->transnoentities("InvoiceDeposit");
     }
     if ($object->type == 4) {
         $title = $outputlangs->transnoentities("InvoiceProFormat");
     }
     $pdf->MultiCell($w, 3, $title, '', 'R');
     $pdf->SetFont('', 'B', $default_font_size);
     $posy += 5;
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->MultiCell($w, 4, $outputlangs->transnoentities("Ref") . " : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
     $posy += 1;
     $pdf->SetFont('', '', $default_font_size - 2);
     if ($object->ref_client) {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell($w, 3, $outputlangs->transnoentities("RefCustomer") . " : " . $outputlangs->convToOutputCharset($object->ref_client), '', 'R');
     }
     $objectidnext = $object->getIdReplacingInvoice('validated');
     if ($object->type == 0 && $objectidnext) {
         $objectreplacing = new Facture($this->db);
         $objectreplacing->fetch($objectidnext);
         $posy += 3;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementByInvoice") . ' : ' . $outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R');
     }
     if ($object->type == 1) {
         $objectreplaced = new Facture($this->db);
         $objectreplaced->fetch($object->fk_facture_source);
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell($w, 3, $outputlangs->transnoentities("ReplacementInvoice") . ' : ' . $outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
     }
     if ($object->type == 2 && !empty($object->fk_facture_source)) {
         $objectreplaced = new Facture($this->db);
         $objectreplaced->fetch($object->fk_facture_source);
         $posy += 3;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell($w, 3, $outputlangs->transnoentities("CorrectionInvoice") . ' : ' . $outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
     }
//.........这里部分代码省略.........
开发者ID:NoisyBoy86,项目名称:Dolibarr_test,代码行数:101,代码来源:pdf_crabe.modules.php

示例4: _pagefoot

 /**
  *   	Show footer of page. Need this->emetteur object
  *
  *   	@param	PDF			&$pdf     			PDF
  * 		@param	Object		$object				Object to show
  *      @param	Translate	$outputlangs		Object lang for output
  *      @return	void
  */
 function _pagefoot(&$pdf, $object, $outputlangs)
 {
     global $conf;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     //return pdf_pagefoot($pdf,$outputlangs,'BANK_CHEQUERECEIPT_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object);
     $paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT';
     $marge_basse = $this->marge_basse;
     $marge_gauche = $this->marge_gauche;
     $page_hauteur = $this->page_hauteur;
     // Line of free text
     $line = !empty($conf->global->{$paramfreetext}) ? $outputlangs->convToOutputCharset($conf->global->{$paramfreetext}) : "";
     $pdf->SetFont('', '', $default_font_size - 3);
     $pdf->SetDrawColor(224, 224, 224);
     // On positionne le debut du bas de page selon nbre de lignes de ce bas de page
     $nbofline = dol_nboflines_bis($line, 0, $outputlangs->charset_output);
     //print 'e'.$line.'t'.dol_nboflines($line);exit;
     $posy = $marge_basse + $nbofline * 3;
     if ($line) {
         $pdf->SetXY($marge_gauche, -$posy);
         $pdf->MultiCell(20000, 3, $line, 0, 'L', 0);
         // Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
         $posy -= $nbofline * 3;
         // 6 of ligne + 3 of MultiCell
     }
     $pdf->SetY(-$posy);
     $pdf->line($marge_gauche, $page_hauteur - $posy, 200, $page_hauteur - $posy);
     $posy--;
     /*if ($line1)
     		{
     			$pdf->SetXY($marge_gauche,-$posy);
     			$pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
     		}
     
     		if ($line2)
     		{
     			$posy-=3;
     			$pdf->SetXY($marge_gauche,-$posy);
     			$pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
     		}*/
     // Show page nb only on iso languages (so default Helvetica font)
     if (pdf_getPDFFont($outputlangs) == 'Helvetica') {
         $pdf->SetXY(-20, -$posy);
         $pdf->MultiCell(11, 2, $pdf->PageNo() . '/' . $pdf->getAliasNbPages(), 0, 'R', 0);
     }
 }
开发者ID:nrjacker4,项目名称:crm-php,代码行数:53,代码来源:pdf_blochet.class.php

示例5: _pagehead

 /**
  *  Show top header of page.
  *
  *  @param	PDF			$pdf     		Object PDF
  *  @param  Object		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
 {
     global $conf, $langs;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     $outputlangs->load("main");
     $outputlangs->load("dict");
     $outputlangs->load("companies");
     $outputlangs->load("interventions");
     pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
     //Affiche le filigrane brouillon - Print Draft Watermark
     if ($object->statut == 0 && !empty($conf->global->FICHINTER_DRAFT_WATERMARK)) {
         pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->FICHINTER_DRAFT_WATERMARK);
     }
     //Prepare la suite
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $posx = $this->page_largeur - $this->marge_droite - 100;
     $posy = $this->marge_haute;
     $pdf->SetXY($this->marge_gauche, $posy);
     // Logo
     $logo = $conf->mycompany->dir_output . '/logos/' . $this->emetteur->logo;
     if ($this->emetteur->logo) {
         if (is_readable($logo)) {
             $height = pdf_getHeightForLogo($logo);
             $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
             // width=0 (auto)
         } else {
             $pdf->SetTextColor(200, 0, 0);
             $pdf->SetFont('', 'B', $default_font_size - 2);
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
         }
     } else {
         $text = $this->emetteur->name;
         $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
     }
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $title = $outputlangs->transnoentities("InterventionCard");
     $pdf->MultiCell(100, 4, $title, '', 'R');
     $pdf->SetFont('', 'B', $default_font_size + 2);
     $posy += 5;
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref") . " : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
     $posy += 1;
     $pdf->SetFont('', '', $default_font_size);
     $posy += 4;
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Date") . " : " . dol_print_date($object->datec, "day", false, $outputlangs, true), '', 'R');
     if ($object->client->code_client) {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode") . " : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
     }
     if ($showaddress) {
         // Sender properties
         $carac_emetteur = '';
         // Add internal contact of proposal if defined
         $arrayidcontact = $object->getIdContact('internal', 'INTERREPFOLL');
         if (count($arrayidcontact) > 0) {
             $object->fetch_user($arrayidcontact[0]);
             $carac_emetteur .= ($carac_emetteur ? "\n" : '') . $outputlangs->transnoentities("Name") . ": " . $outputlangs->convToOutputCharset($object->user->getFullName($outputlangs)) . "\n";
         }
         $carac_emetteur .= pdf_build_address($outputlangs, $this->emetteur, $object->client);
         // Show sender
         $posy = 42;
         $posx = $this->marge_gauche;
         if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
             $posx = $this->page_largeur - $this->marge_droite - 80;
         }
         $hautcadre = 40;
         // Show sender frame
         $pdf->SetTextColor(0, 0, 0);
         $pdf->SetFont('', '', $default_font_size - 2);
         $pdf->SetXY($posx, $posy - 5);
         $pdf->SetXY($posx, $posy);
         $pdf->SetFillColor(230, 230, 230);
         $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
         // Show sender name
         $pdf->SetXY($posx + 2, $posy + 3);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->SetFont('', 'B', $default_font_size);
         $pdf->MultiCell(80, 3, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
         $posy = $pdf->getY();
         // Show sender information
         $pdf->SetFont('', '', $default_font_size - 1);
         $pdf->SetXY($posx + 2, $posy);
//.........这里部分代码省略.........
开发者ID:ADDAdev,项目名称:Dolibarr,代码行数:101,代码来源:pdf_soleil.modules.php

示例6: _pagehead

	function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
	{
		global $conf,$langs,$mysoc;
		$langs->load("orders");
		$default_font_size = pdf_getPDFFontSize($outputlangs);

		pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);

		//Affiche le filigrane brouillon - Print Draft Watermark
		if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
		{
            pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK);
		}


		$posy=$this->marge_haute;
		$pdf->SetXY($this->marge_gauche,$posy);

		// Logo
		$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
		if ($this->emetteur->logo)
		{
			if (is_readable($logo))
			{
				$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);
			}
			else
			{
				$pdf->SetTextColor(200,0,0);
				$pdf->SetFont('','B', $default_font_size - 2);
				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
			}
		}
		else
		{
			$text=$this->emetteur->name;
			$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
		}

		$posy = 40;

		$pdf->SetXY($this->marge_gauche,$posy+3);

		// Sender name
		$pdf->SetTextColor(0,0,60);
		$pdf->SetFont('','B', $default_font_size);
		$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');

		// Sender properties
		$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);

		$pdf->SetFont('','', $default_font_size - 1);
		$pdf->SetXY($this->marge_gauche,$posy+7);
		$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');

		// Client destinataire
		$client = new Societe($this->db);
		$client->fetch($object->socid);
		$object->client = $client;

		// If CUSTOMER contact defined on invoice, we use it
		$usecontact=false;
		$arrayidcontact=$object->getIdContact('external','CUSTOMER');
		if (sizeof($arrayidcontact) > 0)
		{
			$usecontact=true;
			$result=$object->fetch_contact($arrayidcontact[0]);
		}

		// Recipient name
		if (! empty($usecontact))
		{
			// On peut utiliser le nom de la societe du contact
			if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
			else $socname = $object->client->nom;
			$carac_client_name=$outputlangs->convToOutputCharset($socname);
		}
		else
		{
			$carac_client_name=$outputlangs->convToOutputCharset($object->client->nom);
		}

		$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');

		// Show customer/recipient
		$pdf->SetTextColor(0,0,0);
		$pdf->SetFont('','B', $default_font_size);
		$pdf->SetXY(102,42);
		$pdf->MultiCell(96, 4, $carac_client_name, 0, 'L');
		$pdf->SetFont('','', $default_font_size - 1);
		$pdf->SetXY(102,$pdf->GetY());
		$pdf->MultiCell(96, 4, $carac_client, 0, 'L');

		$pdf->rect(100, 40, 100, 40);

		$pdf->SetTextColor(200,0,0);
		$pdf->SetFont('','B', $default_font_size + 2);
		$pdf->SetXY(11, 88);
		$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs), 0, 'L');
//.........这里部分代码省略.........
开发者ID:remyyounes,项目名称:dolibarr,代码行数:101,代码来源:pdf_edison.modules.php

示例7: _pagehead

 /**
  *  Show top header of page.
  *
  *  @param	PDF			&$pdf     		Object PDF
  *  @param  Object		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
 {
     global $langs, $conf, $mysoc;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $posx = $this->page_largeur - $this->marge_droite - 100;
     $posy = $this->marge_haute;
     $pdf->SetXY($this->marge_gauche, $posy);
     // Logo
     $logo = $conf->mycompany->dir_output . '/logos/' . $mysoc->logo;
     if ($mysoc->logo) {
         if (is_readable($logo)) {
             $height = pdf_getHeightForLogo($logo);
             $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
             // width=0 (auto)
         } else {
             $pdf->SetTextColor(200, 0, 0);
             $pdf->SetFont('', 'B', $default_font_size - 2);
             $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
             $pdf->MultiCell(100, 3, $langs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
         }
     } else {
         $pdf->MultiCell(100, 4, $this->emetteur->name, 0, 'L');
     }
     $pdf->SetFont('', 'B', $default_font_size + 2);
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DeliveryOrder") . " " . $outputlangs->convToOutputCharset($object->ref), '', 'R');
     $pdf->SetFont('', '', $default_font_size + 2);
     $posy += 5;
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     if ($object->date_valid) {
         $pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date") . " : " . dol_print_date($object->date_delivery ? $object->date_delivery : $date->valid, "%d %b %Y", false, $outputlangs, true), '', 'R');
     } else {
         $pdf->SetTextColor(255, 0, 0);
         $pdf->MultiCell(100, 4, $outputlangs->transnoentities("DeliveryNotValidated"), '', 'R');
         $pdf->SetTextColor(0, 0, 60);
     }
     if ($object->client->code_client) {
         $posy += 5;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode") . " : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
     }
     $pdf->SetTextColor(0, 0, 60);
     // Add origin linked objects
     // TODO extend to other objects
     $object->fetchObjectLinked('', '', $object->id, 'delivery');
     if (!empty($object->linkedObjects)) {
         $outputlangs->load('orders');
         foreach ($object->linkedObjects as $elementtype => $objects) {
             $object->fetchObjectLinked('', '', $objects[0]->id, $objects[0]->element);
             foreach ($object->linkedObjects as $elementtype => $objects) {
                 $num = count($objects);
                 for ($i = 0; $i < $num; $i++) {
                     $order = new Commande($this->db);
                     $result = $order->fetch($objects[$i]->id);
                     if ($result >= 0) {
                         $posy += 5;
                         $pdf->SetXY($posx, $posy);
                         $pdf->SetFont('', '', $default_font_size - 1);
                         $text = $order->ref;
                         if ($order->ref_client) {
                             $text .= ' (' . $order->ref_client . ')';
                         }
                         $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder") . " : " . $outputlangs->transnoentities($text), '', 'R');
                     }
                 }
             }
         }
     }
     if ($showaddress) {
         // Emetteur
         $posy = 42;
         $hautcadre = 40;
         $pdf->SetTextColor(0, 0, 0);
         $pdf->SetFont('', '', $default_font_size - 2);
         $pdf->SetXY($this->marge_gauche, $posy - 5);
         $pdf->MultiCell(66, 5, $outputlangs->transnoentities("BillFrom") . ":");
         $pdf->SetXY($this->marge_gauche, $posy);
         $pdf->SetFillColor(230, 230, 230);
         $pdf->MultiCell(82, $hautcadre, "", 0, 'R', 1);
         $pdf->SetXY($this->marge_gauche + 2, $posy + 3);
         // Nom emetteur
         $pdf->SetTextColor(0, 0, 60);
         $pdf->SetFont('', 'B', $default_font_size);
         $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
         // Sender properties
//.........这里部分代码省略.........
开发者ID:nrjacker4,项目名称:crm-php,代码行数:101,代码来源:pdf_typhon.modules.php

示例8: _pagehead

 /**
  *  Show top header of page.
  *
  *  @param	PDF			$pdf     		Object PDF
  *  @param  CommandeFournisseur		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
 {
     global $langs, $conf, $mysoc;
     $outputlangs->load("main");
     $outputlangs->load("bills");
     $outputlangs->load("orders");
     $outputlangs->load("companies");
     $outputlangs->load("sendings");
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     // Do not add the BACKGROUND as this is for suppliers
     //pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
     //Affiche le filigrane brouillon - Print Draft Watermark
     /*if($object->statut==0 && (! empty($conf->global->COMMANDE_DRAFT_WATERMARK)) )
     		{
                 pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK);
     		}*/
     //Print content
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $posx = $this->page_largeur - $this->marge_droite - 100;
     $posy = $this->marge_haute;
     $pdf->SetXY($this->marge_gauche, $posy);
     // Logo
     $logo = $conf->mycompany->dir_output . '/logos/' . $this->emetteur->logo;
     if ($this->emetteur->logo) {
         if (is_readable($logo)) {
             $height = pdf_getHeightForLogo($logo);
             $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
             // width=0 (auto)
         } else {
             $pdf->SetTextColor(200, 0, 0);
             $pdf->SetFont('', 'B', $default_font_size - 2);
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToModuleSetup"), 0, 'L');
         }
     } else {
         $text = $this->emetteur->name;
         $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
     }
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $pdf->SetXY($posx, $posy);
     $pdf->SetTextColor(0, 0, 60);
     $title = $outputlangs->transnoentities("SupplierOrder") . " " . $outputlangs->convToOutputCharset($object->ref);
     $pdf->MultiCell(100, 3, $title, '', 'R');
     $posy += 1;
     if ($object->ref_supplier) {
         $posy += 4;
         $pdf->SetFont('', 'B', $default_font_size);
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("RefSupplier") . " : " . $outputlangs->convToOutputCharset($object->ref_supplier), '', 'R');
         $posy += 1;
     }
     $pdf->SetFont('', '', $default_font_size - 1);
     if (!empty($conf->global->PDF_SHOW_PROJECT)) {
         $object->fetch_projet();
         if (!empty($object->project->ref)) {
             $posy += 4;
             $pdf->SetXY($posx, $posy);
             $langs->load("projects");
             $pdf->SetTextColor(0, 0, 60);
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Project") . " : " . (empty($object->project->ref) ? '' : $object->projet->ref), '', 'R');
         }
     }
     if (!empty($object->date_commande)) {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderDate") . " : " . dol_print_date($object->date_commande, "day", false, $outputlangs, true), '', 'R');
     } else {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(255, 0, 0);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("OrderToProcess"), '', 'R');
     }
     $pdf->SetTextColor(0, 0, 60);
     $usehourmin = 'day';
     if (empty($conf->global->SUPPLIER_ORDER_USE_HOUR_FOR_DELIVERY_DATE)) {
         $usehourmin = 'dayhour';
     }
     if (!empty($object->date_livraison)) {
         $posy += 4;
         $pdf->SetXY($posx - 90, $posy);
         $pdf->MultiCell(190, 3, $outputlangs->transnoentities("DateDeliveryPlanned") . " : " . dol_print_date($object->date_livraison, $usehourmin, false, $outputlangs, true), '', 'R');
     }
     if ($object->thirdparty->code_fournisseur) {
         $posy += 4;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("SupplierCode") . " : " . $outputlangs->transnoentities($object->thirdparty->code_fournisseur), '', 'R');
     }
//.........这里部分代码省略.........
开发者ID:Samara94,项目名称:dolibarr,代码行数:101,代码来源:pdf_muscadet.modules.php

示例9: _pagehead

	/**
	 *   	\brief      Show header of page
	 *      \param      pdf             Object PDF
	 *      \param      object          Object invoice
	 *      \param      showaddress     0=no, 1=yes
	 *      \param      outputlangs		Object lang for output
	 */
	function _pagehead(&$pdf, $object, $showaddress=1, $outputlangs)
	{
		global $conf,$langs;

		$outputlangs->load("main");
		$outputlangs->load("bills");
		$outputlangs->load("propal");
		$outputlangs->load("companies");

		$default_font_size = pdf_getPDFFontSize($outputlangs);

		pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);

        if($object->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
        {
		      pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->FACTURE_DRAFT_WATERMARK);
        }

		$pdf->SetTextColor(0,0,60);
		$pdf->SetFont('','B', $default_font_size + 3);

		$posy=$this->marge_haute;

		$pdf->SetXY($this->marge_gauche,$posy);

		// Logo
		$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
		if ($this->emetteur->logo)
		{
			if (is_readable($logo))
			{
				$pdf->Image($logo, $this->marge_gauche, $posy, 0, 24);	// width=0 (auto), max height=24
			}
			else
			{
				$pdf->SetTextColor(200,0,0);
				$pdf->SetFont('','B',$default_font_size - 2);
				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
				$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
			}
		}
		else
		{
			$text=$this->emetteur->name;
			$pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
		}

		$pdf->SetFont('','B', $default_font_size + 3);
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$title=$outputlangs->transnoentities("Invoice");
		if ($object->type == 1) $title=$outputlangs->transnoentities("InvoiceReplacement");
		if ($object->type == 2) $title=$outputlangs->transnoentities("InvoiceAvoir");
		if ($object->type == 3) $title=$outputlangs->transnoentities("InvoiceDeposit");
		if ($object->type == 4) $title=$outputlangs->transnoentities("InvoiceProFormat");
		$pdf->MultiCell(100, 4, $title, '' , 'R');

		$pdf->SetFont('','B', $default_font_size + 2);

		$posy+=6;
		$pdf->SetXY(100,$posy);
		$pdf->SetTextColor(0,0,60);
		$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Ref")." : " . $outputlangs->convToOutputCharset($object->ref), '', 'R');

		$posy+=2;
		$pdf->SetFont('','', $default_font_size - 1);

		$objectidnext=$object->getIdReplacingInvoice('validated');
		if ($object->type == 0 && $objectidnext)
		{
			$objectreplacing=new Facture($this->db);
			$objectreplacing->fetch($objectidnext);

			$posy+=4;
			$pdf->SetXY(100,$posy);
			$pdf->SetTextColor(0,0,60);
			$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementByInvoice").' : '.$outputlangs->convToOutputCharset($objectreplacing->ref), '', 'R');
		}
		if ($object->type == 1)
		{
			$objectreplaced=new Facture($this->db);
			$objectreplaced->fetch($object->fk_facture_source);

			$posy+=4;
			$pdf->SetXY(100,$posy);
			$pdf->SetTextColor(0,0,60);
			$pdf->MultiCell(100, 3, $outputlangs->transnoentities("ReplacementInvoice").' : '.$outputlangs->convToOutputCharset($objectreplaced->ref), '', 'R');
		}
		if ($object->type == 2)
		{
			$objectreplaced=new Facture($this->db);
			$objectreplaced->fetch($object->fk_facture_source);

//.........这里部分代码省略.........
开发者ID:remyyounes,项目名称:dolibarr,代码行数:101,代码来源:pdf_crabe.modules.php

示例10: write_file

 /**
  * \brief Fonction generant le document sur le disque
  * \param agf		Objet document a generer (ou id si ancienne methode)
  * outputlangs	Lang object for output language
  * file		Name of file to generate
  * \return int 1=ok, 0=ko
  */
 function write_file($loyer, $outputlangs, $file, $socid, $courrier)
 {
     global $user, $langs, $conf, $mysoc;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     if (!is_object($outputlangs)) {
         $outputlangs = $langs;
     }
     if (!is_object($loyer)) {
         $id = $loyer;
         $loyer = new Loyer($this->db);
         $ret = $loyer->fetch($id);
     }
     // dol_syslog ( "pdf_quittance::debug loyer=" . var_export ( $loyer, true ) );
     // Definition of $dir and $file
     $dir = $conf->immobilier->dir_output;
     $file = $dir . '/' . $file;
     if (!file_exists($dir)) {
         if (create_exdir($dir) < 0) {
             $this->error = $langs->trans("ErrorCanNotCreateDir", $dir);
             return 0;
         }
     }
     if (file_exists($dir)) {
         $pdf = pdf_getInstance($this->format, $this->unit, $this->orientation);
         if (class_exists('TCPDF')) {
             $pdf->setPrintHeader(false);
             $pdf->setPrintFooter(false);
         }
         $pdf->Open();
         $pagenb = 0;
         $pdf->SetTitle($outputlangs->convToOutputCharset($loyer->nom));
         $pdf->SetSubject($outputlangs->transnoentities("Quitance"));
         $pdf->SetCreator("Dolibarr " . DOL_VERSION . ' (Immobilier module)');
         $pdf->SetAuthor($outputlangs->convToOutputCharset($user->fullname));
         $pdf->SetKeyWords($outputlangs->convToOutputCharset($loyer->nom) . " " . $outputlangs->transnoentities("Document"));
         if ($conf->global->MAIN_DISABLE_PDF_COMPRESSION) {
             $pdf->SetCompression(false);
         }
         $pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite);
         // Left, Top, Right
         $pdf->SetAutoPageBreak(1, 0);
         // On recupere les infos societe
         $locataire = new Locataire($this->db);
         $result = $locataire->fetch($loyer->locataire_id);
         $proprio = new Adherent($this->db);
         $result = $proprio->fetch($loyer->proprietaire_id);
         $local = new Local($this->db);
         $result = $local->fetch($loyer->local_id);
         $paiement = new Paie($this->db);
         $result = $paiement->fetch_by_loyer($loyer->id);
         if (!empty($loyer->id)) {
             // New page
             $pdf->AddPage();
             $pagenb++;
             $this->_pagehead($pdf, $agf, 1, $outputlangs);
             $pdf->SetFont(pdf_getPDFFont($outputlangs), '', 9);
             $pdf->MultiCell(0, 3, '', 0, 'J');
             $pdf->SetTextColor(0, 0, 0);
             $posY = $this->marge_haute;
             $posX = $this->marge_gauche;
             // Bloc Owner
             $pdf->SetFont(pdf_getPDFFont($outputlangs), '', 15);
             $pdf->SetXY($posX, $posY + 3);
             $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset('Bailleur'), 1, 'C');
             $posY = $pdf->getY();
             $pdf->SetXY($posX, $posY);
             $pdf->SetFont(pdf_getPDFFont($outputlangs), '', 13);
             $this->str = $proprio->getFullName($outputlangs) . "\n";
             $this->str .= $proprio->address . "\n";
             $this->str .= $proprio->zip . ' ' . $proprio->town;
             $this->str .= ' - ' . $proprio->country . "\n\n";
             if ($proprio->phone) {
                 $this->str .= $outputlangs->transnoentities('Téléphone') . ' ' . $proprio->phone . "\n";
             }
             if ($proprio->fax) {
                 $this->str .= $outputlangs->transnoentities('Fax') . ' ' . $proprio->fax . "\n";
             }
             if ($proprio->email) {
                 $this->str .= $outputlangs->transnoentities('EMail') . ' ' . $proprio->email . "\n";
             }
             if ($proprio->url) {
                 $this->str .= $outputlangs->transnoentities('Url') . ' ' . $proprio->url . "\n";
             }
             $pdf->MultiCell(100, 20, $outputlangs->convToOutputCharset($this->str), 1, 'L');
             // Bloc Locataire
             $posX = $this->page_largeur - $this->marge_droite - 100;
             $posY = $pdf->getY() + 10;
             $pdf->SetFont(pdf_getPDFFont($outputlangs), '', 15);
             $pdf->SetXY($posX, $posY);
             $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset('Locataire Destinataire'), 1, 'C');
             $posY = $pdf->getY();
             $pdf->SetXY($posX, $posY);
             $pdf->SetFont(pdf_getPDFFont($outputlangs), '', 13);
//.........这里部分代码省略.........
开发者ID:abbenbouchta,项目名称:immobilier,代码行数:101,代码来源:pdf_quittance.modules.php

示例11: _pagehead

	function _pagehead(&$pdf, $object, $showadress=0, $outputlangs)
	{
		global $langs,$conf;
		$langs->load("main");
		$langs->load("bills");
		$langs->load("propal");
		$langs->load("companies");

		pdf_pagehead($pdf,$outputlangs,$this->page_hauteur);
		$default_font_size = pdf_getPDFFontSize($outputlangs);

		//Affiche le filigrane brouillon - Print Draft Watermark
		if($object->statut==0 && (! empty($conf->global->FACTURE_DRAFT_WATERMARK)) )
		{
            pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->FACTURE_DRAFT_WATERMARK);
		}

		$pdf->SetTextColor(0,0,60);
		$pdf->SetFont('','B',$default_font_size + 3);

		$pdf->SetXY($this->marges['g'],6);

		// Logo
		$logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo;
		if ($this->emetteur->logo)
		{
			if (is_readable($logo))
			{
				$taille=getimagesize($logo);
				$length=$taille[0]/2.835;
				$pdf->Image($logo, $this->marges['g'], $this->marges['h'], 0, 24);
			}
			else
			{
				$pdf->SetTextColor(200,0,0);
				$pdf->SetFont('','B', $default_font_size - 2);
				$pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound",$logo), 0, 'L');
				$pdf->MultiCell(80, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
			}
		}
		else
		{
			$text=$this->emetteur->name;
			$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
		}


		/*
		 * Emetteur
		 */
		$posy=$this->marges['h']+24;
		$pdf->SetTextColor(0,0,0);
		$pdf->SetFont('','', $default_font_size - 2);
		$pdf->SetXY($this->marges['g'],$posy-5);


		$pdf->SetXY($this->marges['g'],$posy);
		$pdf->SetFillColor(255,255,255);
		$pdf->MultiCell(82, 34, "", 0, 'R', 1);


		$pdf->SetXY($this->marges['g'],$posy+4);

		// Sender name
		$pdf->SetTextColor(0,0,60);
		$pdf->SetFont('','B', $default_font_size);
		$pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');

		// Sender properties
		$carac_emetteur = pdf_build_address($outputlangs,$this->emetteur);

		$pdf->SetFont('','', $default_font_size - 1);
		$pdf->SetXY($this->marge_gauche,$posy+9);
		$pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');


		// Client destinataire
		$posy=45;
		$pdf->SetTextColor(0,0,0);
		$pdf->SetFont('','', $default_font_size - 2);
		$pdf->SetXY($this->marges['g']+100,$posy-5);
		$pdf->SetFont('','B',$default_font_size);

		// If BILLING contact defined on invoice, we use it
		$usecontact=false;
		$arrayidcontact=$object->getIdContact('external','BILLING');
		if (sizeof($arrayidcontact) > 0)
		{
			$usecontact=true;
			$result=$object->fetch_contact($arrayidcontact[0]);
		}

		// Recipient name
		if (! empty($usecontact))
		{
			// On peut utiliser le nom de la societe du contact
			if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) $socname = $object->contact->socname;
			else $socname = $object->client->nom;
			$carac_client_name=$outputlangs->convToOutputCharset($socname);
		}
//.........这里部分代码省略.........
开发者ID:remyyounes,项目名称:dolibarr,代码行数:101,代码来源:pdf_oursin.modules.php

示例12: _pagehead

 /**
  *  Show top header of page.
  *
  *  @param	PDF			&$pdf     		Object PDF
  *  @param  Object		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
 {
     global $langs, $conf, $mysoc;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     $outputlangs->load("companies");
     pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 3);
     $posx = $this->page_largeur - $this->marge_droite - 100;
     $posy = $this->marge_haute;
     $pdf->SetXY($this->marge_gauche, $posy);
     if ($conf->global->MAIN_INFO_SOCIETE_NOM) {
         $pdf->SetTextColor(0, 0, 200);
         $pdf->SetFont('', 'B', $default_font_size + 2);
         $pdf->MultiCell(76, 4, $outputlangs->convToOutputCharset(MAIN_INFO_SOCIETE_NOM), 0, 'L');
     }
     // Sender properties
     $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur);
     $pdf->SetFont('', '', $default_font_size - 1);
     $pdf->SetXY($this->marge_gauche, $posy + 4);
     $pdf->MultiCell(80, 3, $carac_emetteur, 0, 'L');
     /*
      * Adresse Client
      */
     // If SHIPPING contact defined on invoice, we use it
     $usecontact = false;
     $arrayidcontact = $object->commande->getIdContact('external', 'SHIPPING');
     if (count($arrayidcontact) > 0) {
         $usecontact = true;
         $result = $object->fetch_contact($arrayidcontact[0]);
     }
     // Recipient name
     if (!empty($usecontact)) {
         // On peut utiliser le nom de la societe du contact
         if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) {
             $socname = $object->contact->socname;
         } else {
             $socname = $object->client->nom;
         }
         $carac_client_name = $outputlangs->convToOutputCharset($socname);
     } else {
         $carac_client_name = $outputlangs->convToOutputCharset($object->client->nom);
     }
     $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->client, $object->contact, $usecontact, 'target');
     $pdf->SetTextColor(0, 0, 0);
     $pdf->SetFont('', 'B', $default_font_size + 1);
     $pdf->SetXY(102, 42);
     $pdf->MultiCell(96, 5, $carac_client_name, 0, 'L');
     $pdf->SetFont('', 'B', $default_font_size);
     $pdf->SetXY(102, 47);
     $pdf->MultiCell(96, 5, $carac_client, 0, 'L');
     $pdf->Rect(100, 40, 100, 40);
     $pdf->SetTextColor(0, 0, 60);
     $pdf->SetFont('', 'B', $default_font_size + 1);
     $pdf->SetXY($posx, 86);
     $pdf->MultiCell(100, 2, $outputlangs->transnoentities("Date") . " : " . dol_print_date($object->date_delivery ? $object->date_delivery : $date->valid, "day", false, $outputlangs, true), 0, 'R');
     $pdf->SetXY($posx, 92);
     $pdf->MultiCell(100, 2, $outputlangs->transnoentities("DeliveryOrder") . " " . $outputlangs->convToOutputCharset($object->ref), 0, 'R');
     if ($object->client->code_client) {
         $posy += 7;
         $pdf->SetXY($posx, $posy);
         $pdf->SetTextColor(0, 0, 60);
         $pdf->MultiCell(100, 3, $outputlangs->transnoentities("CustomerCode") . " : " . $outputlangs->transnoentities($object->client->code_client), '', 'R');
     }
     $pdf->SetFont('', 'B', $default_font_size - 1);
     // Add origin linked objects
     // TODO extend to other objects
     $object->fetchObjectLinked('', '', $object->id, 'delivery');
     if (!empty($object->linkedObjects)) {
         $outputlangs->load('orders');
         foreach ($object->linkedObjects as $elementtype => $objects) {
             $object->fetchObjectLinked('', '', $objects[0]->id, $objects[0]->element);
             foreach ($object->linkedObjects as $elementtype => $objects) {
                 $num = count($objects);
                 for ($i = 0; $i < $num; $i++) {
                     $order = new Commande($this->db);
                     $result = $order->fetch($objects[$i]->id);
                     if ($result >= 0) {
                         $posy += 5;
                         $pdf->SetXY($posx, $posy);
                         $pdf->SetFont('', '', $default_font_size - 1);
                         $text = $order->ref;
                         if ($order->ref_client) {
                             $text .= ' (' . $order->ref_client . ')';
                         }
                         $pdf->MultiCell(100, 4, $outputlangs->transnoentities("RefOrder") . " : " . $outputlangs->transnoentities($text), '', 'R');
                     }
                 }
             }
         }
     }
//.........这里部分代码省略.........
开发者ID:nrjacker4,项目名称:crm-php,代码行数:101,代码来源:pdf_sirocco.modules.php

示例13: _pagehead

 /**
  *  Show top header of page.
  *
  *  @param	PDF			&$pdf     		Object PDF
  *  @param  Object		$object     	Object to show
  *  @param  int	    	$showaddress    0=no, 1=yes
  *  @param  Translate	$outputlangs	Object lang for output
  *  @param	object		$hookmanager	Hookmanager object
  *  @return	void
  */
 function _pagehead(&$pdf, $object, $showaddress, $outputlangs, $hookmanager)
 {
     global $conf, $langs, $mysoc;
     $langs->load("orders");
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     pdf_pagehead($pdf, $outputlangs, $this->page_hauteur);
     //Affiche le filigrane brouillon - Print Draft Watermark
     if ($object->statut == 0 && !empty($conf->global->COMMANDE_DRAFT_WATERMARK)) {
         pdf_watermark($pdf, $outputlangs, $this->page_hauteur, $this->page_largeur, 'mm', $conf->global->COMMANDE_DRAFT_WATERMARK);
     }
     $posy = $this->marge_haute;
     $pdf->SetXY($this->marge_gauche, $posy);
     // Logo
     $logo = $conf->mycompany->dir_output . '/logos/' . $this->emetteur->logo;
     if ($this->emetteur->logo) {
         if (is_readable($logo)) {
             $height = pdf_getHeightForLogo($logo);
             $pdf->Image($logo, $this->marge_gauche, $posy, 0, $height);
             // width=0 (auto)
         } else {
             $pdf->SetTextColor(200, 0, 0);
             $pdf->SetFont('', 'B', $default_font_size - 2);
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorLogoFileNotFound", $logo), 0, 'L');
             $pdf->MultiCell(100, 3, $outputlangs->transnoentities("ErrorGoToGlobalSetup"), 0, 'L');
         }
     } else {
         $text = $this->emetteur->name;
         $pdf->MultiCell(100, 4, $outputlangs->convToOutputCharset($text), 0, 'L');
     }
     if ($showaddress) {
         $posy = 40;
         $posx = $this->marge_gauche;
         if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
             $posx = $this->page_largeur - $this->marge_droite - 80;
         }
         $hautcadre = 40;
         $pdf->SetXY($posx, $posy + 3);
         // Sender name
         $pdf->SetTextColor(0, 0, 60);
         $pdf->SetFont('', 'B', $default_font_size);
         $pdf->MultiCell(80, 4, $outputlangs->convToOutputCharset($this->emetteur->name), 0, 'L');
         // Sender properties
         $carac_emetteur = pdf_build_address($outputlangs, $this->emetteur);
         $pdf->SetFont('', '', $default_font_size - 1);
         $pdf->SetXY($posx, $posy + 7);
         $pdf->MultiCell(80, 4, $carac_emetteur, 0, 'L');
         // Client destinataire
         $client = new Societe($this->db);
         $client->fetch($object->socid);
         $object->client = $client;
         // If CUSTOMER contact defined on invoice, we use it
         $usecontact = false;
         $arrayidcontact = $object->getIdContact('external', 'CUSTOMER');
         if (count($arrayidcontact) > 0) {
             $usecontact = true;
             $result = $object->fetch_contact($arrayidcontact[0]);
         }
         // Recipient name
         if (!empty($usecontact)) {
             // On peut utiliser le nom de la societe du contact
             if ($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) {
                 $socname = $object->contact->socname;
             } else {
                 $socname = $object->client->nom;
             }
             $carac_client_name = $outputlangs->convToOutputCharset($socname);
         } else {
             $carac_client_name = $outputlangs->convToOutputCharset($object->client->nom);
         }
         $carac_client = pdf_build_address($outputlangs, $this->emetteur, $object->client, $object->contact, $usecontact, 'target');
         // Show recipient
         $posy = 42;
         $posx = $this->page_largeur - $this->marge_droite - 100;
         if (!empty($conf->global->MAIN_INVERT_SENDER_RECIPIENT)) {
             $posx = $this->marge_gauche;
         }
         // Show recipient frame
         $pdf->SetTextColor(0, 0, 0);
         $pdf->SetFont('', '', $default_font_size - 2);
         $pdf->SetXY($posx + 2, $posy - 5);
         $pdf->MultiCell(80, 5, $outputlangs->transnoentities("BillTo") . ":", 0, 'L');
         $pdf->Rect($posx, $posy, 100, $hautcadre);
         // Show recipient name
         $pdf->SetXY($posx + 2, $posy + 3);
         $pdf->SetFont('', 'B', $default_font_size);
         $pdf->MultiCell(96, 4, $carac_client_name, 0, 'L');
         // Show recipient information
         $pdf->SetFont('', '', $default_font_size - 1);
         $pdf->SetXY($posx + 2, $posy + 4 + dol_nboflines_bis($carac_client_name, 50) * 4);
         $pdf->MultiCell(86, 4, $carac_client, 0, 'L');
//.........这里部分代码省略.........
开发者ID:nrjacker4,项目名称:crm-php,代码行数:101,代码来源:pdf_edison.modules.php

示例14: _signature_area

 /**
  *	Show area for the customer to sign
  *
  *	@param	PDF			$pdf            Object PDF
  *	@param  Facture		$object         Object invoice
  *	@param	int			$posy			Position depart
  *	@param	Translate	$outputlangs	Objet langs
  *	@return int							Position pour suite
  */
 function _signature_area(&$pdf, $object, $posy, $outputlangs)
 {
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     $tab_top = $posy + 4;
     $tab_hl = 4;
     $pdf->SetFont('', '', $default_font_size - 1);
     $posx = 120;
     $largcol = $this->page_largeur - $this->marge_droite - $posx;
     $useborder = 0;
     $index = 0;
     // Total HT
     $pdf->SetFillColor(255, 255, 255);
     $pdf->SetXY($posx, $tab_top + 0);
     $pdf->SetFont('', '', $default_font_size - 2);
     $pdf->MultiCell($largcol, $tab_hl, $outputlangs->transnoentities("ProposalCustomerSignature"), 0, 'L', 1);
     $pdf->SetXY($posx, $tab_top + $tab_hl);
     $pdf->MultiCell($largcol, $tab_hl * 6, '', 1, 'R');
     return $tab_hl * 7;
 }
开发者ID:Albertopf,项目名称:prueba,代码行数:28,代码来源:pdf_azur.modules.php

示例15: _pagefoot

 /**
  *   	Show footer of page. Need this->emetteur object
  *
  *   	@param	PDF			$pdf     			PDF
  * 		@param	Object		$object				Object to show
  *      @param	Translate	$outputlangs		Object lang for output
  *      @param	int			$hidefreetext		1=Hide free text
  *      @return	void
  */
 function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
 {
     global $conf;
     $default_font_size = pdf_getPDFFontSize($outputlangs);
     //$showdetails=0;
     return pdf_pagefoot($pdf, $outputlangs, 'BANK_CHEQUERECEIPT_FREE_TEXT', $this->emetteur, $this->marge_basse, $this->marge_gauche, $this->page_hauteur, $object, $showdetails, $hidefreetext);
     $paramfreetext = 'BANK_CHEQUERECEIPT_FREE_TEXT';
     $marge_basse = $this->marge_basse;
     $marge_gauche = $this->marge_gauche;
     $page_hauteur = $this->page_hauteur;
     // Line of free text
     $line = !empty($conf->global->{$paramfreetext}) ? $outputlangs->convToOutputCharset($conf->global->{$paramfreetext}) : "";
     $pdf->SetFont('', '', $default_font_size - 3);
     $pdf->SetDrawColor(224, 224, 224);
     // The start of the bottom of this page footer is positioned according to # of lines
     $freetextheight = 0;
     if ($line) {
         //$line="eee<br>\nfd<strong>sf</strong>sdf<br>\nghfghg<br>";
         if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
             $width = 20000;
             $align = 'L';
             // By default, ask a manual break: We use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
             if (!empty($conf->global->MAIN_USE_AUTOWRAP_ON_FREETEXT)) {
                 $width = 200;
                 $align = 'C';
             }
             $freetextheight = $pdf->getStringHeight($width, $line);
         } else {
             $freetextheight = pdfGetHeightForHtmlContent($pdf, dol_htmlentitiesbr($line, 1, 'UTF-8', 0));
             // New method (works for HTML content)
             //print '<br>'.$freetextheight;exit;
         }
     }
     $marginwithfooter = $marge_basse + $freetextheight;
     $posy = $marginwithfooter + 0;
     if ($line) {
         $pdf->SetXY($dims['lm'], -$posy);
         if (empty($conf->global->PDF_ALLOW_HTML_FOR_FREE_TEXT)) {
             $pdf->MultiCell(0, 3, $line, 0, $align, 0);
         } else {
             $pdf->writeHTMLCell($pdf->page_largeur - $pdf->margin_left - $pdf->margin_right, $freetextheight, $dims['lm'], $dims['hk'] - $marginwithfooter, dol_htmlentitiesbr($line, 1, 'UTF-8', 0));
         }
         $posy -= $freetextheight;
     }
     // On positionne le debut du bas de page selon nbre de lignes de ce bas de page
     /*
     		$nbofline=dol_nboflines_bis($line,0,$outputlangs->charset_output);
     		//print 'e'.$line.'t'.dol_nboflines($line);exit;
     		$posy=$marge_basse + ($nbofline*3);
     
     		if ($line)	// Free text
     		{
     			$pdf->SetXY($marge_gauche,-$posy);
     			$pdf->MultiCell(20000, 3, $line, 0, 'L', 0);	// Use a large value 20000, to not have automatic wrap. This make user understand, he need to add CR on its text.
     			$posy-=($nbofline*3);	// 6 of ligne + 3 of MultiCell
     		}*/
     $pdf->SetY(-$posy);
     $pdf->line($marge_gauche, $page_hauteur - $posy, 200, $page_hauteur - $posy);
     $posy--;
     /*if ($line1)
     		{
     			$pdf->SetXY($marge_gauche,-$posy);
     			$pdf->MultiCell(200, 2, $line1, 0, 'C', 0);
     		}
     
     		if ($line2)
     		{
     			$posy-=3;
     			$pdf->SetXY($marge_gauche,-$posy);
     			$pdf->MultiCell(200, 2, $line2, 0, 'C', 0);
     		}*/
     // Show page nb only on iso languages (so default Helvetica font)
     if (pdf_getPDFFont($outputlangs) == 'Helvetica') {
         $pdf->SetXY(-20, -$posy);
         $pdf->MultiCell(11, 2, $pdf->PageNo() . '/' . $pdf->getAliasNbPages(), 0, 'R', 0);
     }
 }
开发者ID:Samara94,项目名称:dolibarr,代码行数:86,代码来源:pdf_blochet.class.php


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