Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function createPDF(){
- $BaseFileName = $this->customerid."-".date("m-d-Y")."-".$this->invoiceid;
- /* create the xsl-fo file */
- $tmpDir = $_SERVER["DOCUMENT_ROOT"] . "/../tmp";
- $xmlDir = $_SERVER["DOCUMENT_ROOT"] . "/../invoicesXML";
- $xmlFile = $xmlDir . "/SnowPlowing-Invoice.xsl";
- echo "gonna try to make a pdf";
- /* Execute the fop command */
- $command = 'export JAVA_HOME=/usr/local && /usr/local/bin/fop -xml - -xsl '.$xmlFile.' -pdf '.$tmpDir.'/foo1.pdf '.$this->stringXML;
- //echo $command;
- $result = shell_exec($command);
- echo $result;
- //$cmd = 'set';
- //echo "<pre>".shell_exec($cmd)."</pre>";
- }
- //fop example:
- //fop -xml - -xsl foo.xsl -pdf -
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement