Last active
May 11, 2021 11:38
-
-
Save aspose-com-gists/de60ad22bd9f3f16a6011e6e5ec2d01e to your computer and use it in GitHub Desktop.
Convert Excel to PDF in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once("Java.inc"); | |
require_once("lib/aspose.cells.php"); | |
use aspose\cells; | |
use aspose\cells\Workbook; | |
use aspose\cells\PdfSaveOptions; | |
use aspose\cells\PdfCompliance; | |
// load document to be converted | |
$wkbk = new Workbook("Book2.xlsx"); | |
// create PDF options | |
pdfOptions = new PdfSaveOptions(); | |
// set PDF compliance | |
pdfOptions->setCompliance(PdfCompliance::PDF_A_1_B); | |
// save in PDF format | |
$wkbk->save("output.pdf", pdfOptions); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require_once("Java.inc"); | |
require_once("lib/aspose.cells.php"); | |
use aspose\cells; | |
use aspose\cells\Workbook; | |
// load document to be converted | |
$wkbk = new Workbook("Book2.xlsx"); | |
// save in PDF format | |
$wkbk->save("output.pdf", SaveFormat::PDF); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment