DECLARE INTEGER PDFDriverInit IN "CDIntf.DLL" STRING @szPrinter >DECLARE INTEGER GetLastErrorMsg IN "CDIntf.DLL" STRING @cMessage, LONG @nLength > >cMessage = SPACE(254) >nLength = 254 > >IF PDFDriverInit("PDF Writer") = 0 && Change this name as needed > nOutput = GetLastError() > GetLastErrorMsg(@cMessage, @nLength) > MESSAGEBOX("The PDF Writer print queue could not be created." + CHR(13) + ; > "and returned the following error message:" + CHR(13) + CHR(13) + ; > ALLTRIM(cMessage) + CHR(13) + CHR(13) + ; > ALLTRIM(STR(nOutput)), ; > 48 + 4096, ; > "JFAST Message") >ENDIF>
DECLARE INTEGER OpenPrinter IN winspool.drv; > STRING pPrinterName, ; > INTEGER @phPrinter, ; > STRING pDefault > >DECLARE INTEGER DeletePrinter IN winspool.drv; > INTEGER phPrinter > Not sure I understand what are you saying. Mark >pPrinterName = "PDF Writer" >phPrinter = 0 >pDefault = REPL(CHR(0),8) + CHR(12) + CHR(0) + CHR(15) + CHR(0) > >IF OpenPrinter(pPrinterName, @phPrinter, pDefault) != 0 > DeletePrinter(phPrinter) >ENDIF>