PHP via COM Interop

Prerequisites

Hello World! Example

<?php
echo "<h2>Calling Aspose.PDF for .NET from PHP using COM Interoperatibility</h2>";
echo "<h3>PDF to Excel Conversion</h3>";

//set license
$lic = new COM("Aspose.Pdf.License");
$lic->SetLicense("C:/temp/Aspose.Total.lic");

//Load Pdf Document
$input="C:/temp/HelloWorld.pdf";
$helper = new COM("Aspose.Pdf.ComHelper");

$pdf = $helper->OpenFile($input);

// Save the PDF document  to desired file format by passing  SaveFormat enum value for the format in this case we pass 9 for excel.

$output = "C:/temp/test_php.xls";
$pdf->Save_4($output,9);
?>