ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder
ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 RichEdit import/export
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jrpcguru

USA
120 Posts

Posted - Nov 14 2019 :  18:36:41  Show Profile  Reply
I am trying to use the demo: ImageEn\Demos\Other\RichEdit using D10.3 and ImageEn 8.7.5.
Nothing happens when I try to import from a .Doc or .Docx file. Nothing happens when I try to export to .Docx or .PDF. I think I have updated the ie.inc in the Delphi10.3Rio folder.

What am I missing to make this work? The help file says: "Import and export to PDF and Microsoft Word, if available (ImportFromWord/ExportToWord and CanImportExport methods)"

What will make it available?

J.R.

xequte

4927 Posts

Posted - Nov 15 2019 :  04:26:37  Show Profile  Reply
Hi JR

You need to have Microsoft Word installed to use the feature.

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

jrpcguru

USA
120 Posts

Posted - Nov 15 2019 :  13:23:00  Show Profile  Reply
I have Office 2003 installed. What version is required?
Also, the help file says that images can be embedded into the text. I find no sample,no method, no hint of how to do that either. With other editors like Word and email, I just paste an image in. No luck there. I tried an image from the Windows Snipping Tool and one from ImageEn. Your stated features are very tantalizing but currently frustrating.

J.R.
Go to Top of Page

xequte

4927 Posts

Posted - Nov 15 2019 :  13:44:58  Show Profile  Reply
Hi JR

Office 2003 did not support docx or PDF. You need at least Office 2007.

We don't enable some of the advanced features because TIETextLayer does not take advantage of them and they make it significantly larger. Please open ie.inc and search for rich edit to find the relevant one.

You'll then either need to recompile the ImageEn packages, or add the ImageEn source folder to your library path.




Nigel
Xequte Software
www.imageen.com
Go to Top of Page

jrpcguru

USA
120 Posts

Posted - Jan 09 2020 :  17:30:00  Show Profile  Reply
I've added the following folders to the library path:
C:\ProgramData\ImageEn\Delphi10.3Rio\ie.inc
C:\ProgramData\ImageEn\Source\Delphi10.3Rio\ie.inc

Both copies of ie.inc now look like this:
// Allow Rich Text (RTF) formatted text layers in TImageEnView
{$define IESupportRichText}

// Support for insertion of images and other objects in TIERichEdit (48KB)
{$define RichEditObjectSupport}

// Support for Find and Replace dialogs in TIERichEdit (8KB)
{$define RichEditFindAndReplace}

// Support for popup toolbar for TIERichEdit and TIETextLayer (trims about 5KB)
{$define RichEditPopUpToolbar}

Apparently my IE.INC is correct because I do get the popup toolbar.

I haven't tried recompiling ImageEn since your instructions say having the modified IE.INC in the proper library path will work. I hope that is true since I doubt I will want to recompile ImageEn after every new version is installed.

After compiling the demo, I copy it to my other system that has Word 2007 and the Editor.CanImportExport reports that importing won't work.

Related question:
The Help file says this:
Enhanced Find and Replace (Requires RichEditFindAndReplace to be defined in ie.inc)

What is enhanced? Do I still use TFindDialog? I briefly hoped you had provided a hotkey for Find & Replace, but I don't find that. I also don't find a replacement for TFindDialog, so I'm stymied. I would love to have an enhanced Find that allowed both down and up searching. And even better would be one that allowed me to adjust the font size since all standard dialogs are way too tiny these days.


J.R.
Go to Top of Page

jrpcguru

USA
120 Posts

Posted - Jan 10 2020 :  23:12:45  Show Profile  Reply
Further question.
In the demo program you can programmatically change the auto toolbar like this:

Editor.AutoToolbar.Position := iepBelow;
Editor.AutoToolbar.Position := iepAbove;

But when I tried doing this, I noticed the font dialog and color dialog do not work properly when the toolbar is at the bottom. They drop down and disappear if the program is maximized, rather than bouncing up like a drop down should. Oddly, the text alignment drop down does bounce up correctly.



J.R.
Go to Top of Page

xequte

4927 Posts

Posted - Jan 12 2020 :  21:17:22  Show Profile  Reply
Hi JR

I have updated the code so that the dialogs are centered when the toolbar is near the bottom.

If CanImportExport is False then the app cannot create the OLE Object "Word.Application". You should research that on an Office developers site.

If you define "RichEditFindAndReplace" then the following members are available:

    property CanFindNext: Boolean;
    function FindNext(): Boolean;
    function FindDialog(const SearchStr: string): TFindDialog;
    function FindText(const SearchStr: string; StartPos, Length: Integer; Options: TIESearchTypes): Integer;
    function ReplaceDialog(const SearchStr, ReplaceStr: string): TReplaceDialog;
    property OnTextNotFound: TIEFindErrorEvent;
    property OnCloseFindDialog: TIEFindCloseEvent;


Review the iexRichEdit source for more detail.

Add some error text, e.g. "xyz" to ie.inc and see if Delphi errors out to ensure that ie.inc is being read.



Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To: