Page 1 of 1

TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 11, 2017 2:41 pm
by Sergey Tkachenko
New versions of our components have been released: TRichView 17, RichViewActions 7, ScaleRichView 8.

New features since the last major update

Below you can find the features added since TRichView 16, RichViewActions 6, ScaleRichView 7.
Most of them were already included in intermediate releases.


All the main changes since version 16 are listed here:

Some of them:
  • Special colors for odd and even row bands, heading and last rows; the same for columns
  • Ability to store custom objects in RVF (DocObjects property)
  • Widow/orphan control (rvpaoWidowOrphanControl option of paragraphs)
  • New item type for displaying equations (mathematical formulas)
  • Special text items that are not deleted when they become empty (they have some width when empty), useful for implementing fields
  • More efficient image processing (even 10000 images in the same document will not cause problems any more)
  • Methods of TRVPrint for printing odd/even pages, and printing in reverse order
  • TRVPrint can draw page on any canvas (you specify page size and dpi); unlike TRVReportHelper, TRVPrint supports headers, footers, footnotes, endnotes, text boxes, margins
  • Previously, headers and footers were supported on printing and in RTF and DocX, now in RVF and HTML too (in HTML – saving headers/footers before and after the main content)
  • Option to use VCL theme colors in documents
  • hi-res mouse cursors
There are also countless small improvements related to editing and file saving/loading.


All the main changes since version 6.0 are listed here:

Some of them:
  • RichViewXML, RvHtmlImporter, RvHtmlViewImporter can be used in RichViewActions without conditional $defines; they are included in TRichView Setup*
  • Indy and CleverComponents downloaders can be used in RichViewActions without conditional $defines; they are included in TRichView Setup*
  • Spell checkers are integrated in RichViewActions (Addict3, ASpell, HunSpell, ExpressSpellChecker), no more conditional $defines are needed to use them, parsers are included in TRichView Setup*
  • equation editor dialog
  • TRVFontComboBox can display preview of fonts
  • new bookmark dialog
  • table properties dialog allows defining colors of odd/even, heading and last rows/columns
  • widow/orphan option in the paragraph dialog
  • new UI languages: Korean and Japanese
* TRichView Setup installs packages containing these components, if required third-party packages are installed.


The main changes from version 7.0 are listed here:

Some of them:
  • TSRVPrint can print odd/even pages, can print in reverse order
  • More efficient repainting in TSRVPageScroll, option to create high-quality page thumbnails
  • Option to use VCL theme colors in documents
  • hi-res mouse cursors
Report Workshop

The whole new set of components, Report Workshop, was released after releasing TRichView 16.

Previous versions: ... f=6&t=8814 (ReportWorkshop 1.6) ... f=6&t=8696 (TRichView 16.15, ScaleRichView 7.8)

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 11, 2017 2:52 pm
by Sergey Tkachenko
Changes since the last public release
Below I want to describe new features and changes added after the release of TRichView 16.15, the previous public update.

"Virtual printer"

TRVPrint (a non-visual component for printing TRichView and TRichViewEdit) has a new property: VirtualPrinter.
To use it, assign RVPrint.VirtualPrinter.Active = True. Set VirtualPrinter's PageWidth, PageHeight and PixelsPerInch properties.
Then, after calling AssignSource, (optionally)SetHeader/SetFooter, FormatPages, you can use DrawPage and DrawPageAt to draw pages on the specific canvas, and display a preview in TRVPrintPreview component.
Previously, this functionality was available only in TRVReportHelper, but:
  • report helpers do not support page margins, headers and footers, text boxes and sidenotes.
  • displaying pages created by report helpers in TRVPrintPreview requires writing additional code
  • report helpers read DPI from the specified canvas, while virtual printers have PixelsPerInch property.
OnDrawHyperlink and OnDrawCheckpoint are now available not only in TRVReportHelper component, but in TRVPrint as well.

Virtual printer is especially useful for PDF generation. See about the new demo projects below.

Printing odd/even pages, printing in reverse order

new: new parameters in TRVPrint.Print and PrintPages methods, allowing to print all/odd/even pages, and to print pages in reverse order.
You can use these new parameters to implement duplex printing, printing on the both sides of paper sheets (print odd pages, then flip the paper stack and print even pages in a reverse order)

Metafile printing options

NoMetafiles property is now available not only in TRVReportHelper component, but in TRVPrint as well.
It is useful when drawing on Canvas that does not handle metafiles well (for example, some PDF libraries may have problems with metafiles), so they are drawn as bitmaps.
In TRichView 17, a new property is added to TRVPrint and TRVReportHelper: MetafilePixelsPerInch. This pixel density (DPI) is used for bitmaps created to draw metafiles. By default it is 0 (using the screen DPI, like before). When using this option for PDF generation, larger values produce higher quality pictures, but makes the resulting file larger.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 11, 2017 3:56 pm
by Sergey Tkachenko
Using VCL theme colors

RichViewActions always use VCL themes in user interface, if themes are enabled (VCL themes are available in Delphi XE2 and newer).
However, in the document itself, themes were not used.
Since this update, the editors can use colors of VCL themes. To enable, assign:
- TRichView.UseVCLThemes = True, if you use TRichView
- TRVReportHelper.ColorMode = rvcmVCLThemeColor, for drawing TRichView on external canvas
- TRVPrint.ColorMode = rvcmVCLThemeColor, for printing TRichView
- TSRichViewEdit.ViewProperty.UseVCLThemes = True, if you use ScaleRichView.

RichViewActions automatically use VCL themes in previews and color pickers, if they are enabled for the target editor.

VCLThemeColors.png (104.05 KiB) Viewed 44381 times
In this example, VCL themes are enabled in the editor, but disabled on printing
VCL themes in editors are disabled by default, because they can lead to unreadable text, if text uses a system color while background uses a fixed color, or vice versa.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 11, 2017 4:15 pm
by Sergey Tkachenko
Japanese UI

A new localization is added for RichViewActions, ScaleRichView and Report Workshop: Japanese
Japanese.png (29.71 KiB) Viewed 44378 times

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 11, 2017 4:28 pm
by Sergey Tkachenko
Hi-res Cursors

All custom cursors used in the components now have not only 32x32, but also 48x48 and 64x64 versions.
Larger cursors are used by Windows on screens having higher pixel density (larger Screen.PixelsPerInch values). Previously, Windows scaled 32x32 cursors.
Cursors.png (1.17 KiB) Viewed 44378 times
The zoom-in cursor in 200% dpi

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 11, 2017 4:43 pm
by Sergey Tkachenko
Headers and footers

In TRichView 17, work with headers and footers is unified. New TRichView.SetHeader/SetFooter methods replace TRichView.RTFReadProperties.SetHeader/SetFooter, and affect not only RTF and DocX (as before), but also RVF and HTML.

In ScaleRichView, all headers and footers can be edited in a single component (TSRichViewEdit), no special code is needed to assign them. And ScaleRichView always was able to store headers/footers to RTF, DocX and RVF. But exporting them in HTML is a new feature.

To include headers in HTML, add rvsoHeaderFooter in the Options parameter of SaveHTML/SaveHTMLEx method. Header will be saved before the main content, footer will be saved after it.
If DocParameters.TitlePage = True, first page header and footer are used. Otherwise, normal header and footer are used.

A new class is implemented, TRVReportHelperWithHeaderFooter. It contains TRVReportHelper components representing documents with all possible headers and footers, linked to their RVStyles.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sun Nov 12, 2017 7:52 am
by Sergey Tkachenko
New demo projects were added in <TRichView dir>\ThirdParty\Export:
LLPDFLib\Demos\RV2PDF - using LLPDFLib (free open source component) to convert RTF and RVF files to PDF
SynPDF\Demos\RV2PDF - using Synpose PDF Engine (free open source class) to convert RTF and RVF files to PDF
eDocEngine\Demos\TRichView - using Gnostice eDocEngine (commercial component) to convert RTF and RVF files to PDF and other formats.

All these demos are unified. They all use the new TRVReportHelperWithHeaderFooter class and the same parent form previewing the output.
Unlike the previous demo projects using these libraries, the new demos use TRVPrint.VirtualPrinter instead of TRVReportHelper to render document (TRVReportHelperWithHeaderFooter object is used to store documents, TRVPrint component is used to render them). The new demos read all page properties (page size, margins, header and footer positions) from RTF/RVF.
The new demos support all 6 types of headers/footers, footnotes, endnotes, text boxes (the latter for RVF) .
The new demos support hyperlinks, both to URLs and internal (to bookmarks).

Note 1.
SynPDF demo requires the newest version of SynPDF (available in "daily builds"), see SynPDF\readme.txt
Note 2.
eDocEngine demo requires the updated gtRichViewIntf.pas. It will be included in future eDocEngine versions, but now you can download it from this post and replace all copies of it in eDocEngine folder:
(14.55 KiB) Downloaded 1430 times
Additionally, to enable new features, add in

Code: Select all

 {$DEFINE RichView_17UP}

{$IFDEF RichView_17UP}
  {$DEFINE RichView12Up}
  {$DEFINE RichView16Up}
  {$DEFINE RichView17Up}
MakePDF.png (41.17 KiB) Viewed 44365 times
LLPDFLib demo. Other Export demos look exactly the same.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sun Nov 12, 2017 8:39 am
by Sergey Tkachenko
Smooth page thumbnails in ScaleRichView

TSRVPageScroll has a new property: SmoothThumbnails. If you assign True, page thumbnails look much better.
standard-thumbnails.png (58.84 KiB) Viewed 44357 times
Standard page thumbnails
smooth-thumbnails.png (75.33 KiB) Viewed 44357 times
Smooth page thumbnails

Together with delayed update in the page scrolling (implemented in ScaleRichView 8 as well), TSRVPageScroll must not delay editing. However, it should be tested more. So smooth thumbnails are disabled by defaults, to prevent performance problems on slow computers.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Tue Nov 14, 2017 8:30 am
by Sergey Tkachenko
New version of TRichView Setup supports Clever Internet Suite (CIS) components version 9. But older versions of CIS are supported as well: the Setup installs the proper package depending on the installed version of CIS. If you upgraded CIS to version 9, I highly recommend to remove files of the old version, including *.dcp and *.bpl files of the old packages, to prevent false detection of the old version.

TRichView 17.1, ScaleRichView 8.1

Posted: Tue Nov 21, 2017 8:56 am
by Sergey Tkachenko
We've released a minor update.
TRichView 17.1, RichViewActions 7.0.2, ScaleRichView 8.1

This update is concentrated on the caret in editors.
Since this version, the caret has thickness defined in the system ("Ease of access" of the Settings app / Control Panel).
This change is especially noticeable in ScaleRichView (before this update, its default caret width was 2px, while the default system caret width is 1px).

A set of global variables controlling caret in TRichViewEdit is extended:
One of new options is a possibility to set the caret width equal to the next character/item width.

This update also includes a bug fix: TrvActionFillColor (applying background colors to the selected text, paragraphs, cells, or table) was broken.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Sat Nov 25, 2017 12:19 pm
by Sergey Tkachenko
Minor update: TRichView 17.1.1.

Fixes in RichViewXML, some tweaks.

Re: TRichView 17, RichViewActions 7, ScaleRichView 8

Posted: Mon Nov 27, 2017 1:04 pm
by Sergey Tkachenko
Minor update: the Setup v17.1.2 still contains TRichView v17.1.1, but ScaleRichView was updated to v8.1.1.
ScaleRichView v8.1 had a bug with displaying the caret in header, footers, notes and text boxes.

TRichView 17.2

Posted: Mon Dec 04, 2017 2:57 pm
by Sergey Tkachenko
One more minor update: TRichView 17.2.

It adds OnDrawBackground event to table. This even allows custom drawing of backgrounds of tables and cells.

A new demo is added in <TRichView Dir>\TRichView\Demos\Assorted\CustomDraw\Callouts\
This demos uses table.OnDrawBackground to draw speech balloons.
balloons.png (73.91 KiB) Viewed 43595 times