[ Index ]

PHP Cross Reference of osCMax 2.0.4

title

Body

[close]

/admin/includes/modules/batch_print/templates/ -> Letterhead.php (source)

   1  <?php
   2  
   3  // set paper type and size

   4  if ($pageloop == "0") {
   5  $pdf = new Cezpdf(A4,portrait);
   6  } else {
   7  
   8  define('LEFT_MARGIN','30');
   9  // The small indents in the Sold to: Ship to: Text blocks

  10  define('TEXT_BLOCK_INDENT', '5');
  11  define('SHIP_TO_COLUMN_START','300');
  12  // This changes the 'Total', 'Sub-Total', 'Tax', and 'Shipping Method' text block

  13  // position, for example if you choose to make the text a bigger font size you need to 

  14  // tweak this value in order to prevent the text from clashing together

  15  define('PRODUCT_TOTAL_TITLE_COLUMN_START','400');
  16  define('RIGHT_MARGIN','30');
  17  
  18  
  19  define('LINE_LENGTH', '552');
  20  // If you have attributes for certain products, you can have the text wrap

  21  // or just be written completely on one line, with the text wrap disabled

  22  // it makes the tables smaller appear much better, of course that is only my opinion

  23  // so I made this variable if anyone would like it to wrap.

  24  define('PRODUCT_ATTRIBUTES_TEXT_WRAP', false);
  25  // This sets the space size between sections

  26  define('SECTION_DIVIDER', '15');
  27  // Product table Settings

  28  define('TABLE_HEADER_FONT_SIZE', '9');
  29  define('TABLE_HEADER_BKGD_COLOR', DARK_GREY);
  30  define('PRODUCT_TABLE_HEADER_WIDTH', '540');
  31  // This is more like cell padding, it moves the text the number

  32  // of points specified to make the rectangle appear padded

  33  define('PRODUCT_TABLE_BOTTOM_MARGIN', '2');
  34  // Tiny indent right before the product name, again more like

  35  // the cell padding effect

  36  define('PRODUCT_TABLE_LEFT_MARGIN', '2');
  37  // Height of the product listing rectangles

  38  define('PRODUCT_TABLE_ROW_HEIGHT', '11');
  39  // The column sizes are where the product listing columns start on the

  40  // PDF page, if you make the TABLE HEADER FONT SIZE any larger you will

  41  // need to tweak these values to prevent text from clashing together

  42  define('PRODUCTS_COLUMN_SIZE', '165');
  43  define('PRODUCT_LISTING_BKGD_COLOR',GREY);
  44  define('MODEL_COLUMN_SIZE', '37');
  45  define('PRICING_COLUMN_SIZES', '67');
  46  
  47  
  48  $currencies = new currencies();
  49  
  50  $pdf->selectFont(BATCH_PDF_DIR . 'Helvetica.afm');
  51  $pdf->setFontFamily(BATCH_PDF_DIR . 'Helvetica.afm');
  52  //watermark

  53  $pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'watermark.jpg',30,110,550,550); 
  54  // company name and details pulled from the my store address and phone number

  55  // in admin configuration mystore 

  56  //$pdf->addJpegFromFile('./invoicelogo.jpg',23,150,567,567); 

  57  //$pdf->addText(132,489,70,"YOUR WATERMARK",-45);

  58  $y = $pdf->ezText(STORE_NAME_ADDRESS,COMPANY_HEADER_FONT_SIZE);
  59  $y -= 10; 
  60  
  61  // logo image  set to right of the above .. change first number to move sideways    

  62  $pdf->addJpegFromFile(BATCH_PRINT_INC . 'templates/' . 'invoicelogo.jpg',480,730,85,85); 
  63  
  64  // line between header and rest of page

  65  $pdf->setLineStyle(1);
  66  $pdf->line(LEFT_MARGIN,$y,LINE_LENGTH,$y);
  67  $pdf->ezSetY($y);
  68  $dup_y = $y;
  69  
  70  
  71  $pos -= SECTION_DIVIDER;
  72  
  73  }
  74  ?>


Generated: Fri Jan 1 13:43:16 2010 Cross-referenced by PHPXref 0.7