<?php // Copyright (c) 2021 ActivePDF, Inc. // ActivePDF Server 2013 // Example generated 01/24/21 ?> <?php // Get current path $strPath = dirname(__FILE__) . "\\"; // Instantiate Object $oSVR = new COM("APServer.Object"); // The below font options only work with conversions that // go through the printer or postscript file conversions // Whether to embed all fonts other than base14 fonts $oSVR->EmbedAllFonts = true; // Whether to embed Base14 fonts $oSVR->EmbedBase14Fonts = false; // Whether embedded fonts should be a subset $oSVR->SubsetFonts = true; // If TrueType fonts should be substituting for the version in the // x:\windows\fonts folder $oSVR->SubstituteTTFonts = false; // Convert the PostScript file into PDF $results = $oSVR->ConvertPSToPDF($strPath . "PS.ps", $strPath . "metadata.pdf"); if ($results->ServerStatus != 0) { Error("ConvertPSToPDF", $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); } ?>