frame

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In Register

Moving section on pdf to right

0

Hi, i want to move the header informartion to right.

I'm changing the code but it stays at the same place..? any idea?

Header Bar

$pdf->SetFont('helvetica', 'B', 15);
$pdf->SetFillColor(239);
$pdf->Cell(100, 8, "Factuur", 0, 1, 'L', '1');
$pdf->SetFont('helvetica', '', 10);
$pdf->Cell(100, 6, $this->lang->line('issued_date') . ': ' . $date, 0, 1, 'L', '1');
$pdf->Cell(100, 6, $this->lang->line('due_date') . ': ' . $due_date, 0, 1, 'L', '1');
$pdf->SetFillColor(239);
$pdf->SetFont('helvetica', '', 8);

$contact = '

' .$this->lang->line('message_invoice_contact_info') . " "; # $contact .= get_option('first_name') . " ". get_option('last_name') . " ". get_option('email') ." "; # $contact .= $this->lang->line('label_tel') . get_option('phone') . " "; # $contact .= '

';
$pdf->writeHTML($contact, true, false, false, false, '');
$pdf->Ln(5);

Comments

  • 0

    Hi,
    You should use the custom design option powered by mPDF to edit the layout. This is the easy way. If you like challenge, read the documentation of tcpdf here

    But in short, you can replace 'L', by 'R' where you have position variable. 'B' stands for 'bold', 'L'='align-left'..

  • 0

    ORIGINAL CODE

    Header Bar

    $pdf->SetFont('helvetica', 'B', 15);
    $pdf->SetFillColor(239);
    $pdf->Cell(0, 8, "Factuur", 0, 1, 'L', '1');
    $pdf->SetFont('helvetica', '', 10);
    $pdf->Cell(0, 6, $this->lang->line('issued_date') . ': ' . $date, 0, 1, 'L', '1');
    $pdf->Cell(0, 6, $this->lang->line('due_date') . ': ' . $due_date, 0, 1, 'L', '1');
    $pdf->SetFillColor(239);
    $pdf->SetFont('helvetica', '', 8);

    $contact = '

    ' .$this->lang->line('message_invoice_contact_info') . " "; # $contact .= get_option('first_name') . " ". get_option('last_name') . " ". get_option('email') ." "; # $contact .= $this->lang->line('label_tel') . get_option('phone') . " "; # $contact .= '

    ';
    $pdf->writeHTML($contact, true, false, false, false, '');
    $pdf->Ln(5);

Sign In or Register to comment.

m'Manager

| Let's Build Together a Great App !
If you are a happy user, send me a coffee.
2015 - 2107 © m'Manager.
Powered by VanillaForums, Designed by ThemeSteam

Recent Donations

  • Patricia from Sjopz.com - 10€
  • AskinSavascisi from wolftech.com - 3€
  • Get In Touch