Page 1 of 1

TRichView 21.7 - image scaling mode, barcodes in ReportWorkshop

Posted: Tue Sep 26, 2023 12:15 pm
by Sergey Tkachenko
We've released TRichView v21.7, ScaleRichView 12.1.1, ReportWorkshop 5.4.

Trial versions are available here: https://www.trichview.com/download/

Main changes in this update:
  • ability to turn smooth image scaling on/off
  • barcode extension for ReportWorkshop
Previous version:
https://www.trichview.com/forums/viewtopic.php?t=12058

Image scaling mode

Posted: Tue Sep 26, 2023 12:19 pm
by Sergey Tkachenko
Image scaling mode

A new property is added to image object: rvepSmoothScaling.
Non-zero value: smooth image scaling (default)
0: simple image scaling

By default, TRichView uses an advanced scaling algorithm to scale images. For most images, it produces good results.
However, sometimes smooth scaling is undesirable, for example, for barcodes or pixel art.
The new property allows to turn smooth scaling on/off.

This image shows the same image resized using different options:

smooth-vs-pixelated.png
smooth-vs-pixelated.png (72.54 KiB) Viewed 34519 times

In RichViewActions, users can define this option in the dialog of image properties:

smooth-scaling-option.png
smooth-scaling-option.png (8.92 KiB) Viewed 34519 times

Barcodes and QR codes in ReportWorkshop

Posted: Tue Sep 26, 2023 12:22 pm
by Sergey Tkachenko
Barcodes in ReportWorkshop

A new add-on is included: <TRichView Dir>\ThirdParty\Barcode\Zint\Source\RVReportZintBarcode.pas.

It uses Zint Barcode Generator for Delphi to display values as barcodes.

Zint Barcode Generator for Delphi is a free open source library (Apache-2.0 license).
This is a complete port: everything is in Pascal code, external DLLs are not used.
Both Delphi and Lazarus are supported (but I am not sure about minimum required version of Delphi)

This add-on implements two new field types: barcode and qrcode. They are almost identical, except for the default types of barcodes: EAN for barcode, QR code for qrcode.

In a format string, you can specify colors, size, border and margins, font (for barcodes that may include text).

Examples:

Displaying URL as QR code:

Code: Select all

{="https://www.trichview.com" qrcode}
Displaying content of VALUE field as QR code, error correction level = H (maximum), dark red color

Code: Select all

{VALUE qrcode "ecc=H color=darkred"}
Displaying content of VALUE field as UPC barcode, 300x50 pixels, without text:

Code: Select all

{VALUE  barcode "type=upca width=300 height=50 showtext=no"}
Help about this extension:
https://www.trichview.com/help-report/i ... delphi.htm
Supported types of barcodes:
https://www.trichview.com/help-report/i ... rcodes.htm

RW-QRCode-Design.png
RW-QRCode-Design.png (28.75 KiB) Viewed 34517 times
RW-QRCode-Result.png
RW-QRCode-Result.png (26.08 KiB) Viewed 34517 times

OnReadField improvement

Posted: Tue Sep 26, 2023 2:31 pm
by Sergey Tkachenko
OnReadField event (for custom reading fields from RTF and DocX files) is improved.
In this update, you can get text from a field result (if it exists in RTF/DocX), and use current text attributes from RTF/DocX for inserting label objects in place of fields.

TRichView 21.7.1

Posted: Sat Sep 30, 2023 1:12 pm
by Sergey Tkachenko
TRichView is updated to v21.7.1

Some fixes, mainly related to Lazarus.