All Blog Posts  |  Next Post  |  Previous Post

TMS FNC Core update: Printing and Design-time Editors


Wednesday, July 28, 2021

Included in the version 2.6 release of the TMS FNC Core package is a print library that is capable of creating files and send them to the printer. And two design-time editors to make it easier to customize the TTMSFNCGraphicsFill and TTMSFNCGraphicsStroke in your FNC products.

TMS FNC Printing

The print library supports creating documents, adding pages and page content such as HTML formatted text, plain text, drawing primitives and images, with practically the same code on all different frameworks.

This has been implemented on three different levels.

The lowest level of implementation for the print library is the use of TMSFNCPrinter, this is done in a similar way as TPrinter is used on VCL, Lazarus, FMX Windows and MacOS. With TMSFNCPrinter there is now support for FMX Android and iOS and for TMS WEB Core.

The difference with TPrinter is that the drawing should be defined in the OnDrawContent procedure. 

  …, FMX.TMSFNCPrinters, FMX.TMSFNCGraphicsTypes;

procedure Click(Sender:TObject);

  TMSFNCPrinter.OnDrawContent :=

    TMSFNCPrinter.Graphics.Font.Color := gcBlue;
    TMSFNCPrinter.Graphics.Font.Size := 40;
    TMSFNCPrinter.Graphics.DrawText(0, 20, TMSFNCPrinter.PageWidth, 100, 'Hello', False, gtaCenter, gtaCenter);

    TMSFNCPrinter.Graphics.Fill.Color := gcRed;
    TMSFNCPrinter.Graphics.DrawEllipse(100,200, TMSFNCPrinter.PageWidth - 100, 300);

    TMSFNCPrinter.Graphics.DrawBitmap(50,400,TMSFNCPrinter.PageWidth - 50, TMSFNCPrinter.PageHeight - 50, Image1.Bitmap, True, True);



TMS Software Delphi  Components

On top of the TMSFNCPrinter, there is the TMSFNCGraphicsPrintIO component, which gives the ability to further define the layout of the document with a header, footer and page number and to add certain FNC components.

TMS Software Delphi  Components

The TTMSFNCRichEditorPrintIO and TTMSFNCGridPrintIO are added In the TMS FNC UI PackThese components have some additional properties to make the export of the TTMSFNCRichEditor or TTMSFNCGrid even more customizable.

Design-time Editors

Working with FNC controls should be fast and simple. And for that reason we're adding two new design-time editors in TMS FNC Core.

These help with setting the properties for the TTMSFNCGraphicsFill and TTMSFNCGraphicsStroke.

TMS Software Delphi  Components

Gjalt Vanhouwaert


This blog post has received 1 comment.

1. Sunday, July 24, 2022 at 10:49:30 AM

We are very much interested in this package, because we want to print from both Android and iOS phone, we have downloaded this trial version, it works in android, but not in iOS, after compiling in ios64(delphi 11) and deploy to iPad, the app runs, but when you tap the ''''TMSFNCPrinters'' button. nothing shows up, even the ''TMSFNCPrinters'' button itself became disabled.
we use delphi 11, the lastest ios 15,5, with lasted xcode 13.4.1, deploy to the newest iPad with latest ios 15.4.1
Please check it, we need this function as soon as the test is ok.

Kevin Xu

Add a new comment

You will receive a confirmation mail with a link to validate your comment, please use a valid email address.
All fields are required.

All Blog Posts  |  Next Post  |  Previous Post