AddPage(); $_PDF->DisableTags( $_print_settings['PDF_disable_tags'] ); $_PDF->SetTitle( $_print_settings['PDF_title'] ); $_PDF->SetSubject( '' ); $_PDF->SetKeywords( $_print_settings['PDF_keywords'] ); $_PDF->SetAuthor( '' ); unset($content); $_PDF_page = ob_get_contents(); ob_end_clean(); $SPECIAL_ENTITIES_TABLES['symbol_decode'] = array( 'ƒ', '?', '?', 'G', '?', '?', '?', '?', 'T', '?', '?', '?', '?', '?', '?', '?', '?', '?', 'S', '?', '?', 'F', '?', '?', 'O', 'a', 'ß', '?', 'd', 'e', '?', '?', '?', '?', '?', '?', 'µ', '?', '?', '?', 'p', '?', '?', 's', 't', '?', 'f', '?', '?', '?', '?', '?', '?', '•', '…', '\'', '?', '?', '/', 'P', 'I', 'R', '™', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', '?', 'Ø', '?', '?', '?', '?', '?', '?', '-', '*', 'v', '?', '8', '?', '?', '?', 'n', '?', '?', '?', '~', '?', '˜', '?', '=', '=', '=', '?', '?', '?', '?', '?', '?', '?', '?', '·', '?', '?', '?', '?', '<', '>', '?', '?', '?', '?', '?' ); $SPECIAL_ENTITIES_TABLES['specialchars_decode'] = array( '"', '&', '<', '>', 'Œ', 'œ', 'Š', 'š', 'Ÿ', 'ˆ', '˜', ' ', ' ', '?', '?', '?', '?', '?', '–', '—', '‘', '’', '‚', '“', '”', '„', '†', '‡', '‰', '‹', '›', '€' ); $_PDF_page = str_replace($SPECIAL_ENTITIES_TABLES['latin1_encode'], $SPECIAL_ENTITIES_TABLES['latin1_decode'], $_PDF_page); $_PDF_page = str_replace($SPECIAL_ENTITIES_TABLES['symbol_encode'], $SPECIAL_ENTITIES_TABLES['symbol_decode'], $_PDF_page); $_PDF_page = str_replace($SPECIAL_ENTITIES_TABLES['specialchars_encode'], $SPECIAL_ENTITIES_TABLES['specialchars_decode'], $_PDF_page); $_PDF_page = trim(makeCharsetConversion($_PDF_page, PHPWCMS_CHARSET, 'iso-8859-15', 0)); $include_urlparts = parse_url(PHPWCMS_URL); $_PDF_page = preg_replace_callback('/(href|src|action)=[\'|"]{0,1}(.*?)[\'|"]{0,1}( .*?){0,1}>/i', 'make_absoluteURL', $_PDF_page); $include_urlparts['falsepart'] = $include_urlparts['host'].'/'.trim($phpwcms["root"].$phpwcms["root"], ' /').'/'; $include_urlparts['corrected'] = $include_urlparts['host'].'/'.trim($phpwcms["root"], ' /').'/'; $_PDF_page = str_replace($include_urlparts['falsepart'], $include_urlparts['corrected'], $_PDF_page); //$_PDF->ReadMetaTags( $_PDF_page ); $_PDF->ReadCSS( $_PDF_page ); $_PDF->SetFontSize( $_print_settings['PDF_font_size'] ); $_PDF->WriteHTML( $_PDF_page ); // Output -> use file save and redirect $_PDF->Output( PHPWCMS_CONTENT.'tmp/'.$_print_settings['PDF_filename'], 'F'); headerRedirect(PHPWCMS_URL . CONTENT_PATH . 'tmp/'.$_print_settings['PDF_filename']); exit(); ?>