IRun* RTF Converter

version 1.01



This software converts RTF documents conforming to the RTF1.5 Specifications to XML or HTML. IRun supplies two options for HTML converison, you can choose to include inline CSS elements to create better results, or you can exclude them to support older browsers.

The “irun.dll” component allows you to integrate IRun to your applications. With this component you can write batch conversion code, you can convert documents within server extensions and you can add conversion feature to your applications.

We can help you convert huge amounts of documents to internet within a short time, by developing custom software for your needs. Please contact us if you have huge amounts of documents that are waiting to take place in the internet. The project may involve indexing, table of contents generation, custom page styles and navigation and other custom needs.

IRun source code is also available upon request. Please contact us if you need the source code.


IRun can handle most of the RTF features. Here is the list of features that are supported in the current release of IRun:


IRun can generate GIF images for WMF or EMF type of images or can leave the original image depending on your selections. You can change the generated image size by determining the DPI setting for the conversion process.

Since RTF and markup languages are not 100% compatible some features of the RTF specifications are excluded from IRun. Some features though, can be added in the later versions. Here is the list of features that are not included in IRun

IRun.DLL Calling Syntax:



In order to call IRun from an application include “irun.dll” and “sbdll.dll” in your DLL calling path. Call EXRTF2WEB function with the following parameters.

int EXRTF2WEB (         char *   source,  // source file name
                                    char *   destination,  // destination file name
                                    int        options,  // an OR’ed list of options
                                    char *   title,   // HTML title
                                    char *   bgcolor,  // HTML bgcolor
                                    int        dpi)   // WMF-GIF conversion DPI (dots Per inch)

for the options use the following enumaration.

typedef enum
{

EXO_RESULTS=

0x0001,

EXO_INLINECSS=

0x0002,

EXO_WMF2GIF=

0x0004,

EXO_XML=

0x0008,

EXO_HTML=

0x0010

} exOptions ;

If bgcolor and title are NULL the values are extracted from the source document. The DPI value should be greater than 30. bgcolor is the string representation of background color as in the HTML.
The function returns 0 if everything is OK. If there are any errors the function returns negative values.

return

meaning

-1

Invalid parameter (s) (source or destination)

-2

Invalid parameter (dpi)

-3

Cannot read source file.

-4

Cannot write to destination file


Here is a “C” example:
/* proc definition */
typedef int __stdcall (* EXRTF2WEB)
                           (char* source,
                            char* dest,
                            int options,
                            char* title,
                            char* bgcolor,
                            int dpi);

void
Convert( void )
{
   HINSTANCE    inst;
   EXRTF2WEB   proc;
   int   ret;
   inst=LoadLibrary((LPCTSTR)"irun.dll");    
   if(inst)
   {
       proc=(EXRTF2WEB)GetProcAddress(inst,(LPCTSTR)"EXRTF2WEB");
       if(proc)
           ret=(*proc)(“test.rtf”,”test.html” ,0x0f,NULL,NULL,96);    
       FreeLibrary(inst);
   }
}

IRun.exe is a tiny program to that uses "irun.dll".

Compatibility:


Windows95,98,NT,2000. Currently only "ansi" RTF files are supported.


Please report bugs to gungors@superonline.com , you may attach the source file for which you encounter problems.

Gungor Senyurt
Pilot Software Ltd.
http://www.pilotltd.com


* IRun: (Ayran) is a cold Turkish beverage. Visit www.turkey.org for more information about Turkey and Turkish cousine.
© Copyright Pilot Software Ltd. All rights reserved