Example code is for an older version of Server, newer code is available.
<?php
// Copyright (c) 2021 ActivePDF, Inc.
// ActivePDF Server 2009
// Example generated 03/06/21
?>
<?php
// Get current path
$strPath = dirname(__FILE__) . "\\";
// Instantiate Object
$oSVR = new COM("APServer.Object");
// XPS to PDF conversion
// Convert XPS file into PDF
$intXPSToPDF = $oSVR->XPSToPDF($strPath . "XPS.xps", $strPath . "XPS.pdf");
if ($intXPSToPDF != 0) {
Error("XPSToPDF", $intXPSToPDF);
}
// Release Object
$oSVR = null;
// Process Complete
echo "Done!";
// Error Handling
function Error($method, $outputCode) {
echo "Error in " . $method . ": " . $outputCode;
}
?>