} //free resources ImageDestroy($output); } else { header('Content-Type: image/jpeg'); echo file_get_contents($cachefilename); } } // rendering pdf files to the browser if ($format == "pdf") { if ($configManager->getConfig('allowcache')) { setCacheHeaders(); } if ($configManager->getConfig('splitmode') == "true") { if (!file_exists($pdfSplitPath)) { $pdfsplit = new splitpdf(); if ($pdfsplit->splitPDF($pdfdoc, $subfolder) == "[OK]") { header('Content-type: application/pdf'); echo file_get_contents($pdfSplitPath); } } else { header('Content-type: application/pdf'); echo file_get_contents($pdfSplitPath); } } else { header('Content-type: application/pdf'); echo file_get_contents($pdfFilePath); } } // writing files to output if (file_exists($swfFilePath)) {
echo file_get_contents($pngFilePath); } } } else { if (strlen($messages) == 0 || $messages == "[OK]") { $messages = "[Incorrect file specified, please check your path]"; } } } // rendering pdf files to the browser if ($format == "pdf") { if ($configManager->getConfig('allowcache')) { setCacheHeaders(); } if ($configManager->getConfig('splitmode') == "true") { $pdfsplit = new splitpdf(); if ($pdfsplit->splitPDF($pdfdoc) == "[OK]") { header('Content-type: application/pdf'); echo file_get_contents($pdfSplitPath); } } else { header('Content-type: application/pdf'); echo file_get_contents($pdfFilePath); } } // writing files to output if (file_exists($swfFilePath)) { if ($format == "swf") { if ($configManager->getConfig('allowcache')) { setCacheHeaders(); }