Usina BRAdvPL Guide
Sign in
← All topics
PRACTICAL GUIDEUnder review

TMSPrinter and graphical printing

Evaluates migration from legacy printing to FWMsPrinter.

TMSPrinter and graphical printingAdvPL
01 · OVERVIEW

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.)

03 · PRACTICAL EXAMPLE

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 Nil
Expected result

Creates 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.

BEST PRACTICES
  • 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.

Related content

REFERENCES
  1. TOTVS. Utilização da Tmsprinter. Descontinuação e alternativa. Accessed on 2026-10-28.
  2. TOTVS. FWMsPrinter. Construtor e ajuste de legado. Accessed on 2026-10-28.
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