Rich Edit Component.

Posted on 2006-04-02
Last Modified: 2010-04-05
I need to write an application that has document creating/editing capabilites.
My client wants to be able to create documents that are basically like MS Word documents.
They need to be able to format fonts, insert images, highlight text spell check etc.
The completed document needs to be stored in a database.
Could anyone help me get started with this?
I dont want to re-invent the wheel, so commercial components that can handle this would be an option?
Is it better to use MS Word and embed it somehow?
Is it better to store documents out of the database?

Any help greatly appreciated.
Question by:RickJ
    LVL 8

    Author Comment

    I probably didnt make it clear that this is going to be integrated with an existing application, so just using MS Word itself is not an option. :)
    It needs to be available from within the existing application.
    LVL 11

    Expert Comment

    You could try rxRichEdit it's free and powerfull
    LVL 11

    Expert Comment

    You can also use WORD Automation.... using the Word Server components on the Servers components pallete.
    Automation info can be found here:
    LVL 11

    Accepted Solution

    Check out rxLib (contains the powerfull rxRichEdit) here:
    LVL 8

    Author Comment

    Thanks calinutz. I will have a look at the links.
    LVL 11

    Assisted Solution

    Regarding the part of the question about wher to store the documents, my own preference is always to store them outside of the database, I'm sure some people would disagree with this, in the end it really comes down to what suits your system best. Bear in mind that documents can be large and therefor can take up large amounts of data space, storing them within the database can lead to backup problems.

    The system I use is to have a directory on a server, the path to that directory is stored in a table. Now if you are talking 1000's of documents you dont really want them in a single directory, this can sloww things up when directory scanning etc. Create a subfolder under the files directory called say "1000". Set a limit on the number of documents per directory and when this limit has been reached then create a new subdirectory called "1001", update the path in the database and start saving documents to the new folder.

    You will have to allow for duplicate filenames. So in your database have 2 fields in the document record, one with the original filename that you use for display purposes and another which is the actual stored filename.

    Write a subroutine that checks for the existence of the file you are saving in the storage directory, if it already exists then add an extra digit, so Notes.doc becomes Notes1.doc then recheck for ecistence until it cant be found then save the file as that name.

    Hope this helps

    LVL 9

    Assisted Solution

    Maybe it's interesting for you to have a look at the TRichview components site.

    List of Features of the compo (from the site):

     rich text and paragraph formatting (custom fonts, colors, alignments, indents...)
     images in documents (bitmaps, metafiles, icons, jpegs, and more)
     Delphi/C++Builder controls in documents (unique feature)
     tables (HTML-style tables with formatted contents in every cell)
     bullets & numbering
     styles of text and paragraphs
     multi-language support (multiple character sets, Unicode, bi-directional text)
     hypertext and related features (hyperlinks, checkpoints, tags)
     import and export, databases (import from RTF, export to RTF and HTML, and more)
     special editing features (undo and text protection)
     printing with preview
     spell-checking (including live spelling with third-party spell checkers)

    Import and Export
    RichView exports RTF, HTML, text files, Unicode text files.
    RichView imports RTF, text files, Unicode text files.
    RichView saves and loads* its contents in a native format (RVF - RichView Format) and XML (with RichViewXML).
    RichView can use text import and export converters from Microsoft® Office.

    The author is Sergey Tkachenko and he always answer question if you need help. A registered user's forum is also available. Free compo and demo are available on the site.

    LVL 8

    Author Comment

    Thanks pcsentinel and bernani for the comments.
    I think I will take your advice pcsentinel and store outside of the DB. I also have had some nasty experience with DB "bloat" from storing images in particular. Thanks for the storage tips.
    Still not decided on wich component to use...

    rxRichEdit is as calinutz says "free and powerful" is just as good, maybe it has a bit more polish than rxRichEdit. But costs a bit....

    I will evaluate both a bit more and then decide.
    Thanks for your help.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    25 Experts available now in Live!

    Get 1:1 Help Now