<!-- Copyright (c) 2021 ActivePDF, Inc. --> <!-- ActivePDF Meridian 2010 --> <!-- Example generated 03/05/21 --> <!-- Example uses the .NET DLL which requires --> <!-- Coldfusion 8 or above --> <CFSCRIPT> // Get current path strPath = ExpandPath(".") & "\"; // Instantiate Object oMER = CreateObject(".NET", "APMeridian.Server", "C:\Program Files\activePDF\Meridian API\bin\APMeridian.dll"); // Specify the IP address and Port to use to reach the Meridian Server oMER.StartRemoteClient("192.168.1.100", 54545); // Must use either SetUniuqeInput or SetProcessAndThread // Call SetUniqueInput with the full path to the input // it is best to use a unique filename to avoid potential // name collisions, if the filename is unique set the second // parameter to true oMER.SetUniqueInput(strPath & "Word.doc", true); // Here we are using SetUniqueInput, as the print job is // from Microsoft Word, Word will add 'Microsoft Word - ' // to the print job so we need to let meridian know using // UniqueInputPrefix oMER.Set_UniqueInputPrefix("Microsoft Word - "); // Path and filename of the created PDF oMER.Set_OutputDirectory(strPath); oMER.Set_NewDocumentName("Word.pdf"); // Set the ModelPrinter to the remote Meridian printer // This printer must be added locally to the remote system oMER.Set_ModelPrinter("\\192.168.1.100\Meridian"); // Prepare to start the printing process intStartPrinting = oMER.StartPrinting(); if(intStartPrinting != 0) { Error("StartPrinting", intStartPrinting); } // Automate Word to print a document to Meridian // NOTE: You must add the 'Microsoft.Office.Interop.Word' reference // End the printing process oMER.StopPrinting(); // Wait(seconds) for job to complete intWait = oMER.Wait(30); if(intWait != 0) { Error("Wait", intWait); } // Release Object oMER = 0; // Process Complete WriteOutput("Done!"); // Error Handling Function Error(method, outputCode) { WriteOutput("Error in " & method & ": " & outputCode); } </CFSCRIPT>