1<?php 2 3require_once(dirname(__FILE__).'/../config.inc.php'); 4require_once(HTML2PS_DIR.'pipeline.factory.class.php'); 5parse_config_file(HTML2PS_DIR.'html2ps.config'); 6 7global $g_config; 8$g_config = array( 9 'cssmedia' => 'screen', 10 'renderimages' => true, 11 'renderforms' => false, 12 'renderlinks' => true, 13 'mode' => 'html', 14 'debugbox' => false, 15 'draw_page_border' => false 16 ); 17 18$media = Media::predefined('A4'); 19$media->set_landscape(false); 20$media->set_margins(array('left' => 0, 21 'right' => 0, 22 'top' => 0, 23 'bottom' => 0)); 24$media->set_pixels(1024); 25 26global $g_px_scale; 27$g_px_scale = mm2pt($media->width() - $media->margins['left'] - $media->margins['right']) / $media->pixels; 28 29global $g_pt_scale; 30$g_pt_scale = $g_px_scale * 1.43; 31 32$pipeline = PipelineFactory::create_default_pipeline("",""); 33$pipeline->configure($g_config); 34$pipeline->process('http://localhost:81/testing/ww.html', $media); 35 36?>