cRptName = "temp.frx" cFileName = "U:\_ss\Temp.pdf" m.cMyPrinter = 'Amyuni PDF Converter' * This was provided by Jose of Amyuni on about Feb. 28, 2003. * Several things had to be done here for this * to be called and work. We added the above parameters. DECLARE LONG PDFDriverInit IN cdintf210.DLL STRING DECLARE LONG DriverInit IN cdintf210.DLL STRING DECLARE DriverEnd IN cdintf210.DLL LONG DECLARE LONG SetDefaultPrinter IN cdintf210.DLL LONG DECLARE LONG EnablePrinter IN cdintf210.DLL LONG, STRING, STRING DECLARE LONG SetDefaultFileName IN cdintf210.DLL LONG, STRING DECLARE LONG SetFileNameOptions IN cdintf210.DLL LONG, LONG DECLARE LONG SetDefaultConfig IN cdintf210.DLL LONG DECLARE LONG SetWatermark IN CDIntf210.DLL LONG, STRING, STRING, LONG, LONG, LONG, LONG, LONG, LONG DECLARE LONG SetBookmark IN CDIntf210.DLL LONG, LONG, STRING #DEFINE NoPrompte 1 #DEFINE UseFileName 2 #DEFINE Concatenate 4 #DEFINE BroadcastMessages 32 * #DEFINE EnableWatermarks 64 #DEFINE EnableWatermarks 0 * Here is the definition of the watermark parameters #DEFINE Wfontname "Arial" #DEFINE Wfontsize 70 #DEFINE Worientation 450 #DEFINE Wcolour 255 #DEFINE Whorzpos 200 #DEFINE Wvertpoz -200 #DEFINE Wforeground .T. PDF = PDFDriverInit(m.cMyPrinter) && for the standard version * Following is a special code -license from AmyUni and it is required * just like that. EnablePrinter (PDF,"MyCompanyName","- my secret id from amyuni goes here - ") SetDefaultFileName ( PDF, cFileName )&& set output file name SetFileNameOptions( PDF, NoPrompte+ UseFileName+ BroadcastMessages + EnableWatermarks) SET PRINTER TO NAME (m.cMyPrinter) REPORT FORM (cRptName) TO PRINTER NOCONSOLE && Error Happens Here SetFileNameOptions ( PDF, 0 ) && reset options * Free the object -for the developer versions: remove * the PDF or HTML printer, otherwise only clears some memory DriverEnd( PDF )