From: Alexander S.K. <al...@be...> - 2015-07-23 13:01:30
|
Alain Aupeix пишет: > But it's static, and I thougth, trying to read hprinter.prg that there > was a way to create a file when creating the print job, and there where > a way to then print it. > > METHOD LoadScript( cScriptFile ) > METHOD SaveScript( cScriptFile ) > > Then it needs only the structure of the scriptfile to make it usable. > Exactly as source code ? Yes, I understand now. The second parameter of the :StardDoc() method is a name of script file to save. So, if you write ( in that PrnTest() function, for example ): oPrinter:StartDoc( ,"print.out" ) you will get a print.out file, which is the script you talk about. Following is a sample how to preview/print this script: Function Main( cScriptFile ) Local oPrinter oPrinter := HPrinter():New() oPrinter:LoadScript( cScriptFile ) oPrinter:Preview() Return Nil Regards, Alexander. |