Server 2009

PCLToPDF

Example code is for an older version of Server, newer code is available.
<?php
// Copyright (c) 2020 ActivePDF, Inc.
// ActivePDF Server 2009
// Example generated 04/10/20 
?>

<?php
// Get current path
$strPath = dirname(__FILE__) . "\\";

// Instantiate Object
$oSVR = new COM("APServer.Object");

// PCL to PDF conversion
// Convert PCL file into PDF
$intPCLToPDF = $oSVR->PCLToPDF($strPath . "PCL.pcl", $strPath . "PCL.pdf");
if ($intPCLToPDF != 0) {
  Error("PCLToPDF", $intPCLToPDF);
}

// Release Object
$oSVR = null;

// Process Complete
echo "Done!";

// Error Handling
function Error($method, $outputCode) {
  echo "Error in " . $method . ": " . $outputCode;
}
?>

Copyright © 2020 ActivePDF, Inc