Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Styling & Editing PDF Invoice outside the admin menu


DeiNeMudda

Recommended Posts

Hello,

 

Im editing the PDF Invoice Modul for a easier view because I want to generate automatically Eventtickets.

 

Im working with the pdf_packingslip.php and now I have the problem that I want to change the X position of the Invoice Address box and the product title outside of the standard table

 

 

Questions: Why I cant change the X position in my pdf_packingslip.php but the Y position ?

 

//Draw Box for Invoice Address
if ( PDF_PCKSLP_SHOW_SENDTO == 'true' ) {
$text_color=explode(",",PDF_PCKSLP_SENDTO_LINE_COLOR );
$pdf->SetDrawColor( $text_color[0], $text_color[1], $text_color[2] );
$pdf->SetLineWidth(0);
$text_color=explode(",",PDF_PCKSLP_SENDTO_FILL_COLOR );
$pdf->SetFillColor( $text_color[0], $text_color[1], $text_color[2] );
$pdf->RoundedRect(0);

//Draw the invoice address text
$pdf->SetFont( PDF_PCKSLP_SENDTO_TEXT_FONT,
			   PDF_PCKSLP_SENDTO_TEXT_EFFECT,
			   PDF_PCKSLP_SENDTO_TEXT_HEIGHT);

$text_color=explode(",",PDF_PCKSLP_SENDTO_TEXT_COLOR );
$pdf->SetTextColor($text_color[0], $text_color[1], $text_color[2]);
$pdf->Text(11,77, ENTRY_SHIP_TO);
$pdf->SetX(100); // ### Cant change, why? ###
$pdf->SetY(50);
$pdf->Cell(9);
$pdf->MultiCell(70, 4.1, tep_address_format(1, $order->delivery, '', '', "\n"),0,'L', '1' );

}

 

and how I can extract the product title and set it to an other place?

 

 

Edit//Sorry for my bad english

post-298215-0-01898600-1317311643_thumb.jpg

Edited by DeiNeMudda
Link to comment
Share on other sites

  • 1 month later...

I had the same problems but not only do you have to change the x position, you have to change the first number in the parenthesis after text and or mutlicell. I found a formula for it months ago, but can't find it now. Trial and error is tedious but eventually you can get it positioned where you want it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...