Documentation
transformToPDF
usage
String path = Sushee_Shell->transformToPDF( string template [, boolean output_bool ] );
paramètres
template: path to XSL template
output_bool : whether the PDF file must be sent to the browser for download by the user (this implies specific HTTP headers in order to force the download).
retourne
Returns a sushee path to a temporary PDF file. This sushee path is not a complete path, it's intended for use in xSushee commands (e.g. FILEORDIRECTORY). If you wish to have a complete system path in order to manipulate the path directly from PHP, use the File->getCompletePath() function.
If you wish to use this file in a Media do not forget to copy this file in another sushee directory (/media, /file, etc), because PDF files are deleted on a monthly basis.
exemples
include_once('../sushee/common.php');
$shell = new Sushee_Shell();
$shell->addCommand(
'<GET name="document">
<MEDIA ID="'.encode_to_xml($_GET['ID'])."/>
</GET>'
);
$shell->execute();
$shell->transformToPDF('document-pdf.xsl');