<?php // Copyright (c) 2021 ActivePDF, Inc. // ActivePDF Server 2013 // Example generated 04/17/21 ?> <?php // Get current path $strPath = dirname(__FILE__) . "\\"; // Instantiate Object $oSVR = new COM("APServer.Object"); // XPS to PDF conversion // Convert XPS file into PDF $results = $oSVR->ConvertXPSToPDF($strPath . "XPS.xps", $strPath . "XPS.pdf"); if ($results->ServerStatus != 0) { Error("ConvertXPSToPDF", $results, $results->ServerStatus); } // Release Object $oSVR = null; // Process Complete echo "Done!"; // Error Handling function Error($method, $oResults, $errorStatus) { echo "Error with " . $method . ": <br/>" . $errorStatus . "<br/>" . $oResults->details; exit(1); } ?>