Hello ,
After some testing i found :
Working :
PRINTER oPrn TO "PDFCreator"//FROM USER // PREVIEW
PAGE
oPrn:Say( 10, 1, "ok" )
ENDPAGE
ENDPRINTER
Not working (printing to windows default) :
PRINTER oPrn TO "PDFCreator"//FROM USER // PREVIEW
[b]oPrn:SetPage(9) //A4 !!!!!!!!!!!!!!!!!!!!!!!!!!!![/b]
PAGE
oPrn:Say( 10, 1, "ok" )
ENDPAGE
ENDPRINTER
In printer.prg : // Defines for the oPrn:SetPage(nPage) method (The printer MUST support it)
But also oPrn:Setcopies() gives the same result , probably all the methods which rebuild the printobject
METHOD Rebuild() CLASS TPrinter
# ifdef FRANKDEMONT
local cModel := ::cModel
# endif
.......
......
/* following modifications after fw1308 are commented out subject to further review 2014-02-15
// eg. SetLandScape(), etc. stopped working with this modification
if ::hDC == 0
::hDC = GetPrintDefault( GetActiveWindow() )
::lStarted = .F.
::lModified = .T.
endif
*/
// Following 5 lines upto "endif" are restored from FW1308 2014-02-15
if ::hDC != 0
DeleteDC( ::hDC )
# ifdef FRANKDEMONT
::hDC = PrinterDcFromName( , cModel, )
# else
::hDC := GetPrintDefault( GetActiveWindow() )
# endif
//::hDC := GetPrintDefault( GetActiveWindow() ) // <== ???????????????????????????????????????????????????????
::lStarted := .F.
::lModified := .T.
endif
if ::hDC != 0
if ! ::lMeta
::hDcOut = ::hDC
endif
endif
return nil
Frank