Install Aspose.PDF for PHP via Java

Contents
[ ]

Aspose.PDF for PHP via Java is composed of two separate components: the script wrapper (aspose.pdf.php) and Aspose.PDF for Java. These components interact through the PHP/Java Bridge, with each requiring its own environment and execution process.

Installation

  1. Install Tomcat on any location such as \java\apache-tomcat-9.0.24.
  2. Copy JavaBridge.war to webapps folder of Tomcat such as \java\apache-tomcat-9.0.24\webapps.
  3. Copy aspose-pdf-xx.x.jar to lib folder such as \java\apache-tomcat-9.0.24\lib.
  4. Run \bin\startup.bat, JavaBridge.war will be deployed to \java\apache-tomcat-9.0.24\webapps\JavaBridge.
  5. Test http://localhost:8080/JavaBridge/test.php to ensure that PHP works fine.
  6. Copy aspose.pdf.php and example.php to \java\apache-tomcat-9.0.24\webapps\JavaBridge.
  7. Open http://localhost:8080/JavaBridge/example.php or create your own PHP file as follows. You will find the Jar and PHP library in vendor/aspose/pdf folder.