SHARE
TWEET

endersending

a guest Jan 14th, 2020 133 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  public function createPDF(){
  2.         $BaseFileName = $this->customerid."-".date("m-d-Y")."-".$this->invoiceid;
  3.         /* create the xsl-fo file */
  4.         $tmpDir =  $_SERVER["DOCUMENT_ROOT"] . "/../tmp";
  5.         $xmlDir = $_SERVER["DOCUMENT_ROOT"] . "/../invoicesXML";
  6.         $xmlFile = $xmlDir . "/SnowPlowing-Invoice.xsl";
  7.  
  8.       echo "gonna try to make a pdf";
  9.         /* Execute the fop command */
  10.         $command = 'export JAVA_HOME=/usr/local  && /usr/local/bin/fop -xml - -xsl '.$xmlFile.' -pdf '.$tmpDir.'/foo1.pdf '.$this->stringXML;
  11.         //echo $command;
  12.         $result = shell_exec($command);
  13.         echo $result;
  14.         //$cmd = 'set';
  15. //echo "<pre>".shell_exec($cmd)."</pre>";
  16.             }
  17.  
  18.  
  19. //fop example:
  20. //fop -xml - -xsl foo.xsl -pdf -
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top