FlWriter User Guide
 
 
1. Introduction
 
FlWriter is a text processing program using FLTK as a GUI toolkit developed by Jean-Mark Lienher in 2002. This was ported to DOS and FLTK 1.3.0 in 2012 by Georg Potthast. Several enhancements were added in the process.
 
FlWriter uses XHTML as its internal format and stores the text files in this format. It features WYSIWYG . The editor window displays the text in the selected fonts. The document then can be converted for printing into a postscript file. If the extension package is installed, Ghostscript is called by FlWriter to generate a PCL print file or a PDF document.
 
 
2. Installation
 
To reduce the size of the download FlWriter is split into two packages. The basic package allows to print to printers supporting postscript. If you add the extension package you can also generate PDF files and PCL print files. Both archives contain a directory called FlWriter which could be extracted to the root of your disk.
 
The extension package contains the subdirectories fonts/gsfonts, gslib and contools plus the files gs386.exe and pdf2html.exe. The extension package will overwrite the existing fonts.dir file. The FlWriter fonts are in the fonts subdirectory, the extension package installs the fonts needed by Ghostscript into the GSFONTS subdirectory in there.
 
FlWriter will use the following environment variables: GS_LIB and GS_FONTPATH for Ghostscript and FLTK_SCHEME to select the special "grad1" scheme done by Dimitrij K.
If these environment variables are not set, FlWriter will set them automatically to the directory structure used in the ZIP archive.
 
Problems have been reported when EMM386 is loaded with the "noems" parameter. Ghostscript sometimes does not work then.
 
You can exit FlWriter from the file menu, by clicking on the cross in the upper right corner and by entering the ESC key which will immediately exit FlWriter any time.
 
 

3. FAQs
 
01 - Command line options, 02 - Long file names, 03 - Postscript files,
04 PDF and PCL files, 05 - Linewraps, 06 - Page breaks, 07 - Margins,
08 - Fonts, 09 - import HTML, 10 - import TEXT, 11 - images,
12 - Copy/Cut/Paste, 13 - Tooltips, 14 - Config file, 16 - TABS, 19 - Indent,
20 - RTF and Latex files, 21 - import PDF text, 22 - Enter special characters,
23 - MS DOCX and ODT, 24 - Arabic text, 25 - Plans for the next release
 
 
01) Command line options - as the default FlWriter will start up in fullscreen mode now. You can change this by adding the -w (for window) command line option. If you want to specify a file name you have to add that as a second parameter after -w in this case.
 
02) Long file names - FlWriter does not require long file name support.
 
03) Postscript print files - Postscript files generated will have the same filename as the edited file but the extension is "ps". The postscript file is a graphical snapshot of the displayed text. This allows for images, TABs and exact page breaks but also results in large postscript and PDF files.
   
04) PDF and PCL print files. By calling Ghostscript FlWriter can generate PDF files and print files in PCL format for HP printers or some other printer formats like Canon Bubblejet.  If your printer is not shown in the menu please consult the enclosed PRINTERS.HTM file that lists all the printers which are compatible with the printers in the menu.
 
Included is a version of Ghostscript compiled for DOS linked with DOS32a instead of DOS4GW to avoid a conflict with HTMLDOC.
 
If the document is more than a few pages, the memory available for calling Ghostscript while FlWriter is loaded is insufficient. You can then use the ps2pdf.bat file to do the conversion from the command line. To convert e.g. the file readme.ps enter:
"ps2pdf readme".
 
You can also start FlWriter with the f.bat file which calls HDPMI for DPMI support. This makes more memory available for Ghostscript.
 
There is an entry in the Tools menu which lets you call Ghostscript to display postscript or PDF files on the screen. This is a simple display that Ghostscript offers, you have to press enter to get to the next page and cannot go backwards. You can press CTRL-C followed by Enter to quit before reaching the end of the document. Ghostscript for DOS uses a low resolution for displaying the documents, the PS or PDF files will look better with e.g. an Acrobat Reader in Windows. This menu item is included to allow for a simple preview of the files.
 
05) FlWriter will make a linewrap only if there are blanks in the line. If you did not put a blank in the line FlWriter will wrap the lines when saving them.
 
 
06) Page breaks can be inserted using the button to the left of the image button. FlWriter will not automatically insert these page breaks.
 
07) Margins - FlWriter converts the entered margins to points. One inch has 72 points, one cm 28,35 points. Therefore FlWriter will not store full numbers if you select e.g. 1cm  margin since it has to convert this to points.
 
08) Fonts - currently you can use just three fonts at the same time: Serif, Sans-Serif and Monospace. If you  have installed the extension package you can select different fonts for these fonts in the preferences menu.  Add the new file and remove the old file in the selection box. This way you can use more than three fonts in one document.
 
The fonts are in the fonts directory. Currently the Monospace font is set to Courier, the Serif font to Times New and the Sans-Serif font to DejaVu. The DejaVu font, i.e. Sans-Serif, allows to select far more characters when using the virtual keyboard than the other fonts. If you select this font the virtual keyboard will display these and allow you to select them.
 
FlWriter will use the fonts.dir file to see what fonts are in the fonts directory. So if you add fonts, you have to enter these in the fonts.dir file so FlWriter will see these. You may look at the fonts.dir file in Linux to see how your font has to be entered. You may also use the "mkfontscale" and "mkfontdir" utilities when running Linux which will generate a new fonts.dir file for all fonts in the directory.
 
Since the helvetica font is not included, the fonts.ali file will map this font to the DejaVu font instead. You can restore the defaults by copying the xd640.def file in the xd640cfg/etc directory over the xd640.cfg file which FlWriter is using.
 
09) Insert HTML files menu option - this will work with HTML files generated with FlWriter. A web page downloaded from the web will usually  be too complex for FlWriter.
 
10) Import text files. There is a new function for that that also converts codepage 850 and 437 extended characters to html entites. It will work with DOS text files only and not with text files including UNICODE characters.
 
11) Images - PNG, JPG and GIF images can be inserted into the text. Select the desired size when opening the image file. The images cannot be resized later. Delete the image and insert it again if you want to change the size.
 
You can only put one line of text next to an image.
 
The file conversions do not support images in the text. You print the images into a postscript file though.
 
12) Copy/cut and paste - you can use the mouse to mark text or use Shift-Cursor on the keyboard. Shift-Home, Shift-End do not work. After marking text you can also change its font.
 
13) Tooltips - please move the mouse slowly over the icons to read the tooltip help texts.
 
 
14) FlWriter writes its configuration file XD640.CFG, which stores the margins and fonts, into the xd640cfg/etc directory. If FlWriter does not start up this file may be corrupted. Copy the XD640.DEF file to XD640.CFG to restore.
 
15) Saving - save your file freqently when working with FlWriter since it does not have an "undo" function.  Or you may have done something which works differently than you expected.
 
16) TABs - are supported in the new version now. The default TAB settings, which is one inch per TAB, can be changed from the menu by entering each TAB position relative from the left margin in cm. Existing TABs will then move to the new positions defined.
 
17) Disk buffer - depending on the number of files in the flwriter directory the open file dialog will take quite some time to load. Generating a PS or PDF file will also take time. Using a disk buffering utiliy can help here. Long file name support will also slow down disk access a lot.
 
18) Missing cursor - sometimes the editor window will loose focus and there is no visible cursor anymore. Pressing the cursor key will not help here, you have to click into the editor window to make FlWriter show the cursor again.
 
19) Indentation - you indent the text using the second rightmost button and remove the identation step-by-step using the button to the left of that. Bullets and numbered lists can be used only if the text has been indented before.
 
20) FlWriter lets you output RTF files and can import them as well by calling the UNRTF utility. To save disk space this utility  has been converted into a library and linked with FlWriter. It is also used to export the FlWriter files to Latex and plain text. FlWriter will not export images into the RTF files. The Latex conversion currently does not produce good results but they will be processed by Latex programs. Select all these functions from the File menu.
 
21) There is also an option now that lets you import the plain text of a PDF document into FlWriter. This option calls the PDF2HTML utility which is included in the extension package. The resulting file will need quite some editing by hand to get into shape.
This utility will also not allow to import images included in the PDF file into FlWriter. Since PDF files made with FlWriter represent the text as a graphic, these can also not be imported again.
 
22) To enable you to enter almost all characters that are available within the currently selected font FlWriter features a Virtual keyboard which you can select from the Tools menu. Use the drop-down list on the right side to select different parts of the available character set.
 
Most characters are included in the DejaVu Sans-Serif font. This way you can select bullets and symbols form the included fonts.
 
23) File formats Microsoft DOC, Openoffice ODT. Version 1.2 can import these formats now. The file unzip32.exe needs to be called for these conversions. You can only convert documents containing text. Complex documents with embedded images can cause FlWriter to crash.
 
There are two test files included. Since FlWriter supports only 7 font sizes some fonts do get the same size in FlWriter although the original document used more sizes.
 
FlWriter can only convert "docx" files, not the previous "doc" files. The included test file has been renamed from docx to doc to allow for short file mode.
 
24) Due to several requests right to left orientation for Arabic text is supported now. This can be selected from the tools menu. Please also select the right text orientation using the toolbar icon. Selecting the right to left orientation from the menu again will turn this off.
 
Using the virtual keyboard and when the DejaVu font is selected as Sans-Serif,  which is the default now, you can enter Arabic characters. However, these characters are not connected as the Arabic script would require.
 
25) Some users have mentioned the following points should be changed:
the current time should be displayed in the status bar, allow to select the printer tray when generating a postscript file, save the last directory opened for the open file dialog. I have to leave this for the next release.
 
17th of May 2012 - Georg Potthast