function &create_default_pipeline($encoding, $filename) { $pipeline =& new Pipeline(); if (isset($GLOBALS['g_config'])) { $pipeline->configure($GLOBALS['g_config']); } else { $pipeline->configure(array()); } // if (extension_loaded('curl')) { // require_once(HTML2PS_DIR.'fetcher.url.curl.class.php'); // $pipeline->fetchers[] = new FetcherUrlCurl(); // } else { require_once HTML2PS_DIR . 'fetcher.url.class.php'; $pipeline->fetchers[] = new FetcherURL(); // }; $pipeline->data_filters[] = new DataFilterDoctype(); $pipeline->data_filters[] = new DataFilterUTF8($encoding); $pipeline->data_filters[] = new DataFilterHTML2XHTML(); $pipeline->parser = new ParserXHTML(); $pipeline->pre_tree_filters = array(); $pipeline->layout_engine = new LayoutEngineDefault(); $pipeline->post_tree_filters = array(); $pipeline->output_driver = new OutputDriverFPDF(); $pipeline->output_filters = array(); $pipeline->destination = new DestinationDownload($filename, ContentType::pdf()); return $pipeline; }
function create_default_pipeline($encoding, $filename) { $pipeline = new Pipeline(); $pipeline->fetchers[] = new FetcherURL(); $pipeline->data_filters[] = new DataFilterUTF8($encoding); $pipeline->data_filters[] = new DataFilterHTML2XHTML(); $pipeline->parser = new ParserXHTML(); $pipeline->pre_tree_filters = array(); $pipeline->layout_engine = new LayoutEngineDefault(); $pipeline->post_tree_filters = array(); $pipeline->output_driver = new OutputDriverFPDF(); $pipeline->output_filters = array(); $pipeline->destination = new DestinationDownload($filename, ContentType::pdf()); return $pipeline; }
function content_type() { return ContentType::pdf(); }
public static function filesAndItsContentTypes() { return array(array(ContentType::gif(), '1x1.gif'), array(ContentType::ott(), 'document1.ott'), array(ContentType::ots(), 'spreadsheet1.ots'), array(ContentType::xls(), 'spreadsheet1.xls'), array(ContentType::ods(), 'spreadsheet1.ods'), array(ContentType::doc(), 'document1.doc'), array(ContentType::odt(), 'document1.odt'), array(ContentType::pdf(), 'sample.pdf'), array(ContentType::url(), 'xiag.url'), array(ContentType::ogv(), 'test.ogv'), array(ContentType::webm(), 'test.webm'), array(ContentType::mkv(), 'test.mkv'), array(ContentType::mp3(), 'm1.mp3'), array(ContentType::mp3(), 'm2.mp3'), array(ContentType::mp3(), 'm2_5.mp3'), array(ContentType::mp3('audio/x-wav'), 'sample.MP3'), array(ContentType::tiff(), '1x1.tiff')); }