TMSPrinter and graphical printing
Evaluates migration from legacy printing to FWMsPrinter.
Overview
TOTVS support states TMSPrinter is discontinued and unsupported from 12.1.25, recommending FWMsPrinter. It is not presented as a current choice. FWMsPrinter documentation distinguishes spool/PDF, client/server output and legacy coordinate adjustment. lAdjustToLegacy can distort Box/FillRect: migration requires checking dimensions, fonts and pagination, not just changing constructors. The block prepares a PDF constructor without invoking it. Documentation also requires an operating-system graphical interface for PDF generation. (Sources: refs. 1–2.)
Commented example
#Include "Protheus.ch"
#Include "RPTDEF.CH"
#Include "FWPrintSetup.ch"
User Function Ed691()
// Uninvoked block: opens no printer and creates no file.
Local bCreate := {|| FWMsPrinter():New("ED691",IMP_PDF,.F.,,.T.)}
ConOut(ValType(bCreate))
Return NilCreates block B. IMP_PDF selects PDF; .F. disables legacy adjustment and .T. defers setup in the documented subset. Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.
- Check LIB/TotvsPrinter versions, fonts, permissions and output directory. Compare spool and PDF with the same test data.
- Under review: editorial example neither compiled nor run in Protheus. Check includes, release, RDD and context before testing.

Comments
There are no approved comments yet.
Sign in with Google or Microsoft to comment.