Usina BRAdvPL Guide
Sign in
← All topics
CLASSUnder review

FwPrinterSetup

FWPrintSetup():New(nFlags, [cTitle])

Configures printing parameters in a dialog.

FwPrinterSetupAdvPL
01 · OVERVIEW

Overview

The page is named FwPrinterSetup but documents FWPrintSetup and uses that identifier in examples; no FwPrinterSetup constructor is invented. Flags and properties use different includes. Activate returns PD_OK or PD_CANCEL, and printing should proceed only for the former. This example prepares/frees configuration without dialog or document submission. Preview and paper output can differ with drivers and communication. (Sources: refs. 1–1.)

02 · SYNTAX

Syntax

FWPrintSetup():New(nFlags, [cTitle])

Parameters

nFlags
NumericRequired

Required flags from fwprintsetup.ch.

cTitle
CharacterOptional

Configuration title.

Methods

NewReceives fwprintsetup.ch flags.FWPrintSetup():New(nFlags,[cTitle])
ActivatePD_OK=1 or PD_CANCEL=2.o:Activate() --> nModalResult
GetPropertyProperties defined in fwprintsetupstr.ch.o:GetProperty(nItem) --> xValue
03 · PRACTICAL EXAMPLE

Commented example

#Include "Protheus.ch"
#Include "fwprintsetup.ch"
User Function Ed446()
    // Configuration without Activate or printing.
    Local oSetup := FWPrintSetup():New(PD_ISTOTVSPRINTER,"Review")
    FreeObj(oSetup)
Return Nil
Expected result

Configuration object freed; no printing started. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

BEST PRACTICES
  • Check LIB version, lifecycle and context before integration. These methods are a documented subset rather than the complete API.
  • Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Related content

REFERENCES
  1. TOTVS. FwPrinterSetup. TDN. Accessed on 2026-10-27.
Status
Under review
Page created on
Last reviewed on
Original language
Portuguese
Reviewed by
Usina.BR
0 approved comment(s)

Comments

There are no approved comments yet.

Sign in with Google or Microsoft to comment.

Powered by Usina Docs · Alpha