Add Pages to PDF using PHP
Insert pages to PDF document programmatically using Aspose.PDF for PHP via Java Library
How to Add pages to PDF using PHP
In order to add page in PDF file, we’ll use Aspose.PDF for PHP via Java API which is a feature-rich, powerful and easy-to-use document manipulation tool in php-java. Install Tomcat 9.0 version on any location, add Aspose.PDF.war, for more details check the GitHub page.
Insert Page to PDF using PHP
To try the code in your environment, you need Aspose.PDF for PHP via Java.
-
Create a Document object with the input PDF file.
-
Call the PageCollection collection’s Insert method with specified index.
-
Save the output PDF using the Save method.