Install Aspose.PDF for PHP via Java
Contents
[
Hide
]
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
- Install Tomcat on any location such as \java\apache-tomcat-9.0.24.
- Copy JavaBridge.war to webapps folder of Tomcat such as \java\apache-tomcat-9.0.24\webapps.
- Copy aspose-pdf-xx.x.jar to lib folder such as \java\apache-tomcat-9.0.24\lib.
- Run \bin\startup.bat, JavaBridge.war will be deployed to \java\apache-tomcat-9.0.24\webapps\JavaBridge.
- Test http://localhost:8080/JavaBridge/test.php to ensure that PHP works fine.
- Copy aspose.pdf.php and example.php to \java\apache-tomcat-9.0.24\webapps\JavaBridge.
- 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.