From: Alain A. <ala...@wa...> - 2015-07-23 13:15:32
|
Le 23/07/2015 14:00, Alexander S.Kresin a écrit : > 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 In my previous test, I saw that :preview() is like preview in linux, and that the two preview functions come, first hwguy one, and then linux one. Commenting the hwgui one, the linux done the trick. But I haven't yet test if the linux preview will work with scriptfiles. A+ -- ------------------------------------------------------------------------ Alain Aupeix http://jujuland.pagesperso-orange.fr/ http://pissobi-lacassagne.pagesperso-orange.fr/ ------------------------------------------------------------------------ U.buntu 12.04 | G.ramps 3.4.9-1 | H.arbour 3.2.0dev (2015-07-20 15:02) | HbIDE (Rev.316) | Five.Linux (r143) | Hw.Gui (2468) ------------------------------------------------------------------------ |