DjVu Small

Reference manual

Console utilities help

DjVu Small - is a package for the batch encoding/decoding in/from DjVu (OS Windows).

The package is made out of the Document Express Enterprise with DjVu v5.0 program taken from http://www.lizardtech.com/ and is functionally equivalent to it (in some terms it is even more user-convenient than the latter).

The package is made of the small size on purpose (less than 2 MB) - to facilitate its distribution via the Internet. (The original program - Document Express Enterprise with DjVu v5.0 - takes 178 MB).

DjVu Small is proposed to be used as the main program to work with the DjVu format (OS Windows).


Features:

1. Works as under Win98, as under Win2000/XP.

2. Encodes in DjVu as the single files, as the groups of the graphical files.

3. Decodes single- and multypage DjVu-files (in batch mode) into the common graphical files.


Usage:

1. Launch the DjVu Small.exe file.

2. Looking through the program window upside down fill in all the necessary input fields.

3. In case of necessity change the program options: press the Options button and choose other parameters in the opened options window (at the regular program usage it won't probably ever be needed).

4. Press Convert button - the process of encoding (decoding) will start.


Details:

The file DjVu Small.exe is simply a GUI controlling the patched LizardTech console utilities. "Patched" - e.g. serial-independent. These console utilities were taken out ot the Document Express Enterprise with DjVu v5.0 program available at http://www.lizardtech.com/ and than were patched by an unknown cracker.

The package contains 2 such console utilities:

- documenttodjvum.exe (patched) - a console utility for the batch encoding of the black-and-white, grey and color common graphical files in bmp, jpeg, jpg, gif, tiff, tif, pnm, ppm, pgm, pbm formats. It is a modified version of documenttodjvu.exe (with a real-time output).

- djvudecode.exe - a console utility for the batch decoding of any DjVu-files: single- and multypage; containing the black-and-white, grey and color images (in the decoding process the files of the corresponding bitrate are created automatically).

DjVu Small has 2 work modes ņorresponding to these console utilities:

- Encode to DjVu    (controls the documenttodjvum.exe utility)

- Decode DjVu    (controls the djvudecode.exe utility)

In any work mode a user visually forms the encoding/decoding parameters, then DjVu Small passes them as a command line to a corresponding console utility. At this time the user can see the reflection of this command line in the log window - in a full or short mode - according to the user's choice.


Encoding profiles:

The encoding profiles are the specially groupped sets of the encoding options created by LizardTech. The encoding profiles are located in the "profiles\documenttodjvu.conf" file. They can be edited manually - for example, you can create the inherited profiles from the existing ones with the goal to change some parameter (but you should know the profile language syntax). Some user profiles were already made this way - see the description of the "user B/W (*** dpi)" profiles below.

DjVu Small reads in at startup the names of all the available profiles from the documenttodjvu.conf file and fills them into the list located under the Select encoding profile: title.

For the effective encoding in DjVu of the BLACK-AND-WHITE graphical files it is recommended to use the encoding profile "User BW".

The profile "User BW" was inherited from the "Very Aggressive 300" profile and yield practically the lowest size of the resulting DjVu-file.


Options:

Pressing the Options button opens the program options window. This windows has 4 tabs:

- General - the options of the DjVu Small GUI itself.

- Encode to DjVu    (the command line utility documenttodjvum.exe options)

- Encode to DjVu (2)    (the additional command line utility documenttodjvum.exe options)

- Decode DjVu    (the command line utility djvudecode.exe options)

The meaning and the values of the command line options of all 3 console utilities are described in a specially made excerpt from the help package of the Document Express Enterprise with DjVu v5.0 program:

Console utilities help    (this link is also available on the top of the page)

In this help package the options are groupped according to the 3 console utilities.

General options:

Let's see the meaning and the values of some unobvoius general program options (the tab #1 in the options window):

Create decoded output folder - Usuallu in the process of decoding of a multypage DjVu-file a set of the single-page common graphical files is created. The program then puts these files into the output folder. If you switch this parameter on (this is the default value) then the program will create a subfolder (with a user-defined name) in the output folder and all the decoded files will bt put there.

This option is especially useful when you choose a not empty output folder or the Desktop - in these cases the resulting files are not mixed together with all neighbor files - they are like "packed" in a handy form (e.g. separate subfolder).

Log command line - Here the user can choose a command line log window output mode. Exactly to say DjVu Small forms a command line and passes it to the input of a corresponding console utility and this command line is simply echoed in the log window - just for the user's reference.

The command line can be output either in the full or short mode - when only the options' window options are echoed.

Enable Sep - switches on the compatibility mode with the DjVu Imager and DjVu Sep programs. When this option is on, the button Sep settings gets enabled. Pressing this button opens the same-named window Sep settings where you can set the detailed compatibility settings (for any of these 2 programs).


Window Sep settings:

The selector DjVu Imager - switches on the compatibility mode with DjVu Imager. By default the filename filter set to ScanKromsator v5.92 is active. While inputting it automatically omits files like: pic.XXXX.*, XXXX.sep.*.

Non-SK Filenames - switches on the mode of the arbitrary filename filter. The set filenames will be skipped while opening files (because they are intended for DjVu Imager).

Filename addon - A textual addon for the names of all the skipped files.

Prefix/Suffix - The mode of the textual addon.

The selector DjVu Sep - switches on the compatibility mode with DjVu Sep. By default the filename filter set to ScanKromsator v5.92 is active. While inputting it automatically omits files like: pic.XXXX.*, XXXX.sep.*, and such XXXX.* files, where a picture pic.XXXX.* is cut out.

Non-SK Filenames - switches on the mode of the arbitrary filename filter. The set filenames will be skipped while opening files (because they are intended for DjVu Sep).

Filename addon - A textual addon for the names of all the skipped files.

Prefix/Suffix/None - The mode of the textual addon. The None value implies that the sellection is going to be based on the conterpart file in a pair. That is why 2 None files are not allowed.


Notes:

1. By default in the list of the profiles is chosen the Default profile.

WARNING: It is not the first profile in the list - as it might seem at first glance - scroll the profiles' list upward and you will see all the other profiles. The Default profile is the last original LizardTech profile in the list. Beneath it are located the user profiles (here "user B/W (*** dpi)").

2. The input filelist (under the title Input file(s)::) and the program icon support the Drag'n'drop feature: you can drag there with the mouse one or more graphical files to be encoded; or one DjVu-file to be decoded (when dropping to the program's icon the program will launch and the dropped content will get to the list).

At this time the program mode is switched automatically (if you drop the graphical files or a folder with them then the Encode to DjVu mode is switched on, if you drop a DjVu-file - then the Decode DjVu mode is switched on.

3. The simultaneous decoding of 2 or more DjVu-files is not supported (it does not make much sense).

4. Adding/deleting the files in/from the loaded filelist, changing the order of the files in the filelist is not supported either - it is also not so much needed feature.

5. All the manually changed program parameters are automatically memorized.

6. By default the output folder is the Desktop. This is made for the convenience of the low-qualified users (who are used to work mainly only with the desktop).

The Desktop path is determined automatically by the program depending on the operating system. If you move the program from one OS to another, this path will change accordingly automatically (only if it was not already changed by the user).

7. The program does not yield warnings when it writes over the existent files (folders) - this is made on purpose because such warnings usually are not useful but the bother the users.

8. The full DjVu Small GUI sourcecodes are freely available to everybody (see the address below the page). The DjVu Small GUI is distributed under the GPL License.

9. The program has the russian localization but it is possible to do any other one: just create a localization file looking at the "russian.txt" file and put it into the "languages" folder.

10. The program does not contain the phototodjvu.exe console utility (from Document Express Enterprise with DjVu v5.0) because all its functionality is fully substituted with the combination of documenttodjvum.exe (option Encode to DjVu) and the Photo profile:

phototodjvu.exe = documenttodjvum.exe + Photo profile

11. The console utility documenttodjvum.exe was created by patching the cured documenttodjvu.exe. The goal is to give documenttodjvu.exe the ability to output verbal messages in the log-window in the real-time. That gives the possibility to display the page-by-page indication while DjVu-encoding.

12. The console utility djvudecode.exe is called for every page of a multypage DjVu-file. That gives the possibility to display the page-by-page indication while DjVu-decoding. It also allows for decoding multypage DjVu-files causing decoding errors on some their pages.

13. The verbose messages in the log-window are displayed in Russian when the Russian interface is set.

14. The encoding/decoding options on the tabs Encode to DjVu, Encode to DjVu (2), Decode DjVu controlling the command line parameters have the tooltips describing the corresponding command-line parameter.

15. The program supports Drag'n'drop for the shortcut to the DjVu Small.exe file. Make a shortcut to DjVu Small.exe on Desktop - and you can drop on it graphical files, folderds with them, Djvu-files. The program would launch, all the dropped objects would get into the list of the loaded objects and the corresponding DjVu-conversion mode would be set (either encoding, or decoding).


Known program disadvantages:

1. When you create a new folder in the Choose folder window the Choose folderņ is closed automatically and you have to manually reopen it to see the newly created file. Possible cause: the treeview node extraction by command possibly does not work properly under Win98.

2. The program is designed mainly to be used in the russian-language interface mode. In the english-language interface mode the spaces between the control titles and the control windows look lenghty - because that the English language is more "compact" than the Russian language.

3. There is no convenient possibility to edit the encoding profiles - it can be done only manually - if you manually edit the documenttodjvu.conf file. But doing so you must know and understand the profiles language syntax.

4. There are some small irregularities in the console utilities help navigation system (some rare hyperlinks do not work).


Authors:

mas,
Arcand,
monday2000.

Patch documenttodjvu.exe to documenttodjvum.exe (for the real-time verbal output):

Idea: kontiky.
Realisation: Griefin.

GUI creation:

monday2000.


03.11.2006.
Updated: 24.03.2010.

monday2000@yandex.ru

(Write me in English if you want to get the full DjVu Small GUI sourcecode or just want to tell me something).