Home General

Rich Text with Underlines does not preview correctly.

edited August 2001 in General
I am having a consistent problem that every time I preview a report with
rich text that has underlined text in it the lines show up going through the
words (similar to strikeout) when previewed. The document prints correctly
but the preview looks horrible.

Any ideas on this one?

Comments

  • edited August 2001

    -----------------------------------------------------
    Article: Why Your Preview Won't Match Your Output
    -----------------------------------------------------

    We have two choices when we create a preview - compose for the screen, or
    compose for the printer. Most programs such as MS Word compose to the screen
    when they create a preview. This makes for attractive previews but they tend
    to
    be inaccurate. And it means that they then compose again for the printer
    when you print the document. Most of the time things will print effectively
    similar to the preview, but we have seen many times when the printed output
    was different - a word wrapped to the next line, or some such problem. If
    you use a program meant for accurate page layout, such as PageMaker, you
    will notice that the Page Setup dialog asks you for which printer you wish
    to compose. When PageMaker displays a page, it may not look exactly how
    you think it should, but you do get a preview where the element placement
    is guaranteed to match the printed output's element placement.
    We have chosen to follow this second model.

    Note that when we say element placement, we are referring to X and Y
    placement and not height and width. While the X and Y placement of
    our previews will be accurate, the height and width of text elements
    may vary based on zoom percentage. This is a normal artifact of
    composing for the printer and not for the screen.

    Your preview can not match your printed output. It will
    differ in one of two ways:

    1- It can look good on the screen, but items on the page may not
    display in the same location they will when printed.
    or
    2- It can be less attractive, but items will display on the preview
    exactly where they will when printed.

    We give you the second because it is more accurate and more reliable.
    Not to mention more in keeping with professional page layout products.



    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    But what you are saying is not true. Your preview shows lines through the
    text like strikeout when they are supposed to be under the text (underline).
    That means the lines are printing in a different position then they are
    being previewed. I would rather have the first option where it may preview
    slightly different then it prints if it would get rid of the randomness of
    the lines in rich text. There must be a way to display rich text properly on
    the screen if you printing it out properly, underlining seems like such a
    simple task.

  • edited August 2001
    The Windows RichEd.dll is drawing the richtext in our screen preview. Try
    zooming to 100% or greater. You'll see that the underline renders
    correctly.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Sorry, newsgroup guidelines don't allow attachments. Don't worry, we're not
    going to cancel your registration:) I see in the image you posted that you
    still get a rich text rendering problem. Since our RichText relies on the
    Windows RichEd.dll, what you can do is to replace the rich text support with
    WPTools rich text engine. There is an example of replacing the InfoPower
    rich text engine in the InfoPower directory in your installed RBuilder
    directory. You can use the same approach with WPTools. WPTools has their
    own rtf rendering engine which doesn't rely on the windows dll.

    ----------------------------------------------
    Article: ReportBuilder's RichText Architecture
    ----------------------------------------------


    The RichText in ReportBuilder is a wrapper around Delphi's TRichEdit
    which
    in turn relies on Windows. There are two versions of Windows richedit -
    RichEd32.dll is the older one and RichEd20.dll is a newer one (RichEd32
    is being phased out). Delphi by default relies on RichEd32 - the older
    version. To use some of the more advanced features of Windows RichEdit,
    see the topic on InfoPower RichEdit Support below.

    In general Windows RichEdit supports the type of formatting that you can
    do using WordPad.



    InfoPower RichEdit Support
    ---------------------------
    InfoPower from Woll2Woll Software is a popular database add-on product
    for Delphi. InfoPower's TwwRichEdit components support the Windows
    RichEdit2 format. This format allows the rich text data to contain
    embedded bitmaps and OLE objects. For more information please see
    http:\\www.Woll2Woll.com.

    ReportBuilder includes a component that enables the TppRichText and
    TppDBRichText controls in ReportBuilder to use the formatting
    capabilities of InfoPower's TwwRichEdit when rendering RTF data. The
    ppWWRichEd.pas unit located in the ..\RBuilder\InfoPower directory
    defines a TwwDBRichEdit descendant and then registers the class with
    ReportBuilder. This enables the TppRichText and TppDBRichText controls
    in ReportBuilder to use the formatting capabilities of TwwDBRichEidt
    when rendering data.


    WPTools Support
    ----------------
    WPTools is a collection of components used to edit and print
    formatted text. With its own RTF engine, WPTools offers
    numerous features not supported by the standard Windows
    RichEd20.dll. This control lets you use tables, paragraph
    frames, headers and footers etc. Using the optional
    ReportBuilder support units for WPTools 2.x, you can print
    the enhanced WPTools features (justified text, tables, graphics
    ...) within your ReportBuilder reports.
    For more information please see http:\\www.wptools.de.



    --
    Tech Support mailto:support@digital-metaphors.com
    Digital Metaphors http://www.digital-metaphors.com


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    I think Infopower uses its own too or am I wrong on that? We've had
    instances where Delphi's RTF component will display the RTF code and not the
    text, where IP would display the text.

  • edited August 2001
    If you already have InfoPower installed, then give that a try. They do have
    their own engine, but it still relies on the dll, which is used when we
    render in the previewer. We just don't have the functionality built in to
    rearrange the preview to appear best, when it is composed for the printer
    canvas. It's on the todo list, but we haven't got around to it yet as there
    are more features higher up on the priority list right now.


    Cheers,

    Jim Bennett
    Digital Metaphors


  • edited August 2001
    Ok, dumb question for you. I added ppWWRichEd to my dclRB55.bpl and
    recompiled the design time package, but no component shows in my
    ReportBuilder Designer to use it. I didn't see any examples in my IP
    directory just a project with the WW file as the only file. So how do I use
    it?
  • edited August 2001
    The visual interface is the same. However, when the rich text is generated,
    RB uses the newly registered infopower engine instead.


    Cheers,

    Jim Bennett
    Digital Metaphors


This discussion has been closed.