- Code: Select all Expand view RUN
METHOD End() CLASS TPrinter
if ::hDC != 0
if ! ::lMeta
if ::lStarted
EndDoc(::hDC)
endif
else
Aeval(::aMeta,{|val| ferase(val) })
::aMeta := {}
::hDCOut := 0
endif
if ::nOrient != nil
if ::nOrient == DMORIENT_PORTRAIT
::SetPortrait()
else
::SetLandscape()
endif
endif
// PrinterEnd() -> 01/03/2018 (OASYS) Tirei essa linha para que ele mantenha a impressora selecionada no GetPrintDC() sem precisar mudar a impressora Default do Windows.
DeleteDC( ::hDC )
::hDC := 0
endif
if ::oFont != nil
::oFont:End()
endif
oPrinter := nil
return nil