Example code is for an older version of Server, newer code is available.
<!-- Copyright (c) 2021 ActivePDF, Inc. -->
<!-- ActivePDF Server 2009 -->
<!-- Example generated 03/02/21 -->
<!-- Example uses the .NET DLL which requires -->
<!-- Coldfusion 8 or above -->
<CFSCRIPT>
// Get current path
strPath = ExpandPath(".") & "\";
// Instantiate Object
oSVR = CreateObject(".NET", "APServer.Server", "C:\Program Files\activePDF\Server\bin\APServer.dll");
// Enable extra logging in the activepdflogs folder
oSVR.Set_DebugMode(true);
// Convert PCL file into PDF
intPCLToPDF = oSVR.PCLToPDF(strPath & "PCL.pcl", strPath & "Debug.pdf");
if(intPCLToPDF != 0) {
Error("PCLToPDF", intPCLToPDF);
}
// Release Object
oSVR = 0;
// Process Complete
WriteOutput("Done!");
// Error Handling
Function Error(method, outputCode) {
WriteOutput("Error in " & method & ": " & outputCode);
}
</CFSCRIPT>