Convert everythign to millimeters

This commit is contained in:
dave 2010-06-09 05:21:40 +00:00
parent f1082a1c40
commit 76e8f8c3e2

View File

@ -96,175 +96,137 @@ LRP 180 99765 5967 4 1 3/4 x 1/2 80 */
/* FIXME: put these in a databse */
/* All dimensions are in millimeters */
$report_stock = array();
$report_stock['fullpage'] = array('name' => 'Letter 8.5 x 11 (3/4" margin)',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 7,
'x_spacing' => 0,
'cols' => 1,
'label_height' => 9.5,
'y_spacing' => 0,
'rows' => 1,
'page_format' => 'LETTER',
'page_orientation' => 'P',
'label_width' => 177.8,
'label_height' => 241.3,
'x_spacing' => 0,
'y_spacing' => 0,
'cols' => 1,
'rows' => 1,
);
$report_stock['fullpage_landscape'] = array('name' => 'Letter 8.5 x 11 Landscape (3/4" margin)',
'page_width' => 11,
'page_height' => 8.5,
'label_width' => 9.5,
'x_spacing' => 0,
'cols' => 1,
'label_height' => 7,
'y_spacing' => 0,
'rows' => 1,
'page_format' => 'LETTER',
'page_orientation' => 'L',
'label_width' => 241.3,
'label_height' => 177.8,
'x_spacing' => 0,
'y_spacing' => 0,
'cols' => 1,
'rows' => 1,
);
$report_stock['fullpage_full'] = array('name' => 'Letter 8.5 x 11 (no margin)',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 8.5,
'x_spacing' => 0,
'cols' => 1,
'label_height' => 11,
'y_spacing' => 0,
'rows' => 1,
'page_format' => 'LETTER',
'page_orientation' => 'P',
'label_width' => 215.9,
'label_height' => 279.4,
'x_spacing' => 0,
'y_spacing' => 0,
'cols' => 1,
'rows' => 1,
);
$report_stock['fullpage_landscape_full'] = array('name' => 'Letter 8.5 x 11 Landscape (no margin)',
'page_width' => 11,
'page_height' => 8.5,
'label_width' => 11,
'x_spacing' => 0,
'cols' => 1,
'label_height' => 8.5,
'y_spacing' => 0,
'rows' => 1,
'page_format' => 'LETTER',
'page_orientation' => 'L',
'label_width' => 279.4,
'label_height' => 215.9,
'x_spacing' => 0,
'y_spacing' => 0,
'cols' => 1,
'rows' => 1,
);
$report_stock['5161'] = array('name' => 'Avery 5161/5261/5961/8161, G&T 99189 (1"x4")',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 4,
'x_spacing' => 0.15,
'cols' => 2,
'label_height' => 1,
'y_spacing' => 0.00,
'y_padding' => 0.05,
'rows' => 10,
'page_format' => 'LETTER',
'page_orientation' => 'P',
'label_width' => 101.6,
'label_height' => 25.4,
'x_spacing' => 3.81,
'y_spacing' => 0.00,
'cols' => 2,
'rows' => 10,
);
$report_stock['5162'] = array('name' => 'Avery 5162/5262/5962/8162/8462, G&T 99190 (1 1/3"x4")',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 3.99,
'x_spacing' => 0.187,
'cols' => 2,
'label_height' => 1.326,
'y_spacing' => 0.00,
'y_padding' => 0.30,
'rows' => 7,
'page_format' => 'LETTER',
'page_orientation' => 'P',
'label_width' => 101.35,
'label_height' => 33.6804,
'x_spacing' => 4.7498,
'y_spacing' => 0.00,
'cols' => 2,
'rows' => 7,
);
$report_stock['5163'] = array('name' => 'Avery 5163/5263/5963/8163/8463, G&T 99181 (2"x4")',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 4,
'x_spacing' => 0.1719,
'cols' => 2,
'label_height' => 2,
'y_spacing' => 0.00,
'rows' => 5,
'page_format' => 'LETTER',
'page_orientation' => 'P',
);
/* This is combined with 5161
$report_stock['5961'] = array('name' => 'Avery 5961, G&T 99189 (1"x4")',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 4,
'x_spacing' => 0.08,
'label_width' => 101.6,
'label_height' => 50.8,
'x_spacing' => 4.3663,
'y_spacing' => 0.00,
'cols' => 2,
'label_height' => 1,
'y_spacing' => 0.08,
'rows' => 10,
'rows' => 5,
);
*/
$report_stock['5164'] = array('name' => 'Avery 5164/5264/5964/8164, G&T 99763 (4"x3 1/3")',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 4,
'x_spacing' => 3/16,
'cols' => 2,
'label_height' => 3 + 1/3,
'y_spacing' => 0,
'rows' => 3,
'page_format' => 'LETTER', /* tcpdf format */
'page_orientation' => 'P', /* tcpdf orientation */
'label_width' => 101.6,
'label_height' => 84.6667,
'x_spacing' => 4.7625,
'y_spacing' => 0,
'cols' => 2,
'rows' => 3,
);
$report_stock['nametag'] = array('name' => 'Cards 4"x3"',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 4,
'x_spacing' => 0,
'cols' => 2,
'label_height' => 3,
'y_spacing' => 0,
'rows' => 3,
'page_format' => 'LETTER',
'page_orientation' => 'P',
'label_width' => 101.6,
'label_height' => 76.2,
'x_spacing' => 0,
'y_spacing' => 0,
'cols' => 2,
'rows' => 3,
);
$report_stock['letter_4up'] = array('name' => 'Fullpage, 4up',
'page_width' => 8.5,
'page_height' => 11,
'label_width' => 4,
'x_spacing' => 0.25,
'cols' => 2,
'label_height' => 5,
'y_spacing' => 0.25,
'rows' => 2,
'page_format' => 'LETTER',
'page_orientation' => 'P',
'label_width' => 101.6,
'label_height' => 127.0,
'x_spacing' => 0.25,
'y_spacing' => 0.25,
'cols' => 2,
'rows' => 2,
);
$report_stock['ledger'] = array('name' => 'Ledger/Tabloid 11 x 17',
'page_width' => 11,
'page_height' => 17,
'label_width' => 11,
'x_spacing' => 0,
'cols' => 1,
'label_height' => 17,
'y_spacing' => 0,
'rows' => 1,
'page_format' => 'LETTER',
'page_format' => 'TABLOID',
'page_orientation' => 'P',
'label_width' => 279.4,
'label_height' => 431.8,
'x_spacing' => 0,
'y_spacing' => 0,
'cols' => 1,
'rows' => 1,
);
$report_stock['ledger_landscape'] = array('name' => 'Ledger/Tabloid 11 x 17 Landscape',
'page_width' => 17,
'page_height' => 11,
'label_width' => 17,
'page_format' => 'TABLOID',
'page_orientation' => 'L',
'label_width' => 431.8,
'label_height' => 279.4,
'x_spacing' => 0,
'cols' => 1,
'label_height' => 11,
'y_spacing' => 0,
'cols' => 1,
'rows' => 1,
'page_format' => 'LETTER',
'page_orientation' => 'P',
);
@ -571,8 +533,8 @@ foreach($report_stock as $n=>$v) {
$rep=new pdf($report['name'], $label_stock['page_format'], $label_stock['page_orientation']);
$rep->setup_for_labels($show_box, $show_fair, $show_logo,
$label_stock['label_width'] * 25.4, $label_stock['label_height'] * 25.4,
$label_stock['x_spacing'] * 25.4, $label_stock['y_spacing'] * 25.4,
$label_stock['label_width'], $label_stock['label_height'],
$label_stock['x_spacing'], $label_stock['y_spacing'],
$label_stock['rows'], $label_stock['cols']);
$gen_mode = 'tcpdf_label';
break;
@ -586,8 +548,8 @@ foreach($report_stock as $n=>$v) {
$rep=new pdf($report['name'], $label_stock['page_format'], $label_stock['page_orientation']);
$rep->setup_for_tables($show_box, $show_fair, $show_logo,
$label_stock['label_width'] * 25.4, $label_stock['label_height'] * 25.4,
$label_stock['x_spacing'] * 25.4, $label_stock['y_spacing'] * 25.4,
$label_stock['label_width'], $label_stock['label_height'],
$label_stock['x_spacing'], $label_stock['y_spacing'],
$label_stock['rows'], $label_stock['cols']);
$gen_mode = 'table';
break;