
Copyright (c) j.h.husgafvel 1998-1999
Portions Copyright 1995, The PAL Group.

This is the third public version of LxDocRead and will be known as
version 1.0. I finally added enough functionality to make this a real
version ;)

This program is designed for reading Palm .prc *compressed* files. It
will (probably) not work with non-compressed files.  It will
(definitely) not work with other file types.

It will also work with some .pdb files. These files seem to identical
to .prc files. If you want to open those .pdb files from "Open Dialog"
rename them to .prc first.


NEW

-Fixed a couple of minor bugs.
-Added proportional font support (*.hfn-fonts)
-Added vertical reading support (*.vfn-fonts)
-Added adjustable left/right margin for horizontal mode
-Internal changes to speed things a little; proportional font support
 demanded these


INSTALLATION

Install the program (docread.exe) in any location you like (preferably
in some directory on your path). Copy the config file (docread.cfg) to
that same directory. You may want to change some settings in the
config file.

If you want to rename this program go ahead, just remember to rename
the config file too!

If you are upgrading from version 0.2 it might be wise to remove .env
and .dpg files first. (This version should be able to detect old
versions of these files but...)


USAGE

Run this program from dos-box:
docread [<filename.prc>]

If filename is left out LxDocRead will try to load a previous text. If
there is none, it will open a dialog to choose a file.

You can also execute it from filer if you have associated .prc with
this program (filer.ini/Buddy).

Keys that work:

F1               : Help & About, displays key helps and information
UP PGUP B b LEFT : previous page
HOME             : beginning of story         
END              : end of story (still slow)  
ESC Q q          : Quit                   
ZOOM Z z         : change character size  
O o              : Open a new file
M m[0-9]         : Specify bookmark 0-9 to point to this line
                   (press m followed by a number)
[0-9]            : Goto to bookmark 0-9
G g              : Goto line, line asked in a dialog
J j              : Justify text
S s              : Search for some text, cannot handle new-lines etc.
I i              : Show some information, useful if you have Show Status Off
X x              : Change orientation (horizontal <-> vertical)
Others           : next page              

CONFIG FILE

Currently the following entries have been defined:
(None of these are mandatory)
Comment lines in config file begin with an ; -character

Under Section "Main":
OpenLast      -- Specifies whether to open the previously read file with
                 no arguments, or ask for a new file
                 Values: 1 = yes, 0 = no
EnvFile       -- Path and name of the environment file, this file saves
                 last file name and position. TIP: You can copy docread.exe
                 and docread.cfg to a different name and make them use
                 different environment files. That way you can read one
                 book and browse other documents without losing your
                 place in the book!
                 Values: path and filename as string
TmpPath       -- Path to a temporary location (.dpg files go there).
                 If this is unset will use TEMP, TMP, or c:\tmp.
                 Values: path as string

Unser Section "Reader":
Zoom          -- Initial zoom mode, that is 80, 64, or 40 characters per line
                 Values: 0 = 80 chars, 1 = 64 chars, 2 = 40 chars
Orientation   -- Initial orientation
                 Values: 0 = horizontal, 1 = vertical
ShowStatus    -- Specifies whether to show a status line on top or not
                 Values: 1 = yes, 0 = no
Justify       -- Justify text initially (doesn't work with vertical text)
                 Values: 1 = yes, 0 = no
AskQuit       -- Confirm quitting
                 Values: 1 = yes, 0 = no
LeftMargin    -- Left margin for horizontal mode
                 Values: some positive value
RightMargin   -- Right margin for horizontal mode
                 Values: some positive value

HFontName0    -- Horizontal font (.hfn) for zoom 0
                 Values: fontname with path or empty for LARGE_FONT
HFontName1    -- Horizontal font (.hfn) for zoom 1
                 Values: fontname with path or empty for MEDIUM_FONT
HFontName2    -- Horizontal font (.hfn) for zoom 2
                 Values: fontname with path or empty for SMALL_FONT
VFontName0    -- Vertical font (.vfn) for zoom 0
                 Values: fontname with path (no working default!)
VFontName1    -- Vertical font (.vfn) for zoom 1
                 Values: fontname with path (no working default!)
VFontName2    -- Vertical font (.vfn) for zoom 2
                 Values: fontname with path (no working default!)

HLineSeparation0 -- Line separation for horizontal zoom 0
                    Values: any integer number 
                    (-1 works pretty well for .hfn fonts)
HLineSeparation1 -- Line separation for horizontal zoom 1
                    Values: any integer number 
                    (-1 works pretty well for .hfn fonts)
HLineSeparation2 -- Line separation for horizontal zoom 2
                    Values: any integer number 
                    (-1 works pretty well for .hfn fonts)
VLineSeparation0 -- Line separation for vertical zoom 0
                    Values: any integer number
                    (2-5 works pretty well for .vfn fonts)
VLineSeparation1 -- Line separation for vertical zoom 1
                    Values: any integer number
                    (2-5 works pretty well for .vfn fonts)
VLineSeparation2 -- Line separation for vertical zoom 2
                    Values: any integer number
                    (2-5 works pretty well for .vfn fonts)

FILES

Program files:
docread.exe

Config files:
docread.cfg

Temporary (created) files:
c:\_dat\docread.env                   -- previous file and place in that
<TEMPORARY LOCATION>\<prc-file>.dpg   -- paging information to speed things
                                         a little


FONTS

I won't deliver any font files with this program because I'm not
entirely sure if that's allowed. You can get horizontal (*.hfn) fonts
from PAL-library distribution and vertical (*.vfn) fonts from
"Vertical Reader; VR" distribution.

If you specify an invalid font for HFontName[0-2] or left those out
entirely, the program will use internal mono-spaced fonts. For vertical
reading this doesn't work, however. If the program cannot find any valid
vertical fonts, it will exit with a fatal error.

Changing orientation and/or zoom is an expensive operation; the
application must repaginate the whole text (up to the point where you
are). For large texts this takes quite a while -- almost a minute for
a 900k .prc file. So, if you are reading large texts, try to avoid
this.  

LXDocRead will remember paging information for the last
orientation/zoom only.


BUGS

Nothing major I hope.

There are some bugish features, though:
-Opening a file with saved place calculates the line incorrectly,
 it shows one line prior to the saved one.
-Changing orientation to vertical with no working fonts exits.
-May display extended characters incorrectly.
-Doesn't work with too short texts (less than a page).

                                                         
DISCLAIMER ETC.
                 
Send suggestions etc.:
hysky@tuug.org
Please use a clear subject like so I won't miss it!:
Subject: LXDOCREAD: I'd like it make coffee...


Disclaimer:

THIS PROGRAM IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND.  IN
NO EVENT WILL THE AUTHOR HAVE RESPONSIBILITY FOR IMPROPER OPERATION OF
LXDocRead OR INTERFERENCE OF LXDocRead WITH ANY PROGRAM, NOR BE LIABLE
FOR DAMAGES OF ANY SORT RELATED TO THE USE OF THIS PROGRAM.  Make
backup copies of your important files and use this program at your own
risk.


j.h.husgafvel
hysky@tuug.org
http://www.tuug.org/~hysky
