Home & Login
 
 
Main Menu
Home
Freeware Applications
Just for Fun
La Armónica
PureBasic
FAQ
Contact me
About...
Donate
Support this personal site. Even 1€ is fine! Click on the icon below to donate.

 
 
Txt2Palm: convert text and pdf files to Palmdoc or ztxt

  After unsuccessfully searching the net for the perfect tool to transform electronic books into a format readable by my Palm, I decided to create my own. I found in the internet some freeware libraries from Kryloff technologies that allowed converting different formats to txt files. They had problems with some pdf files, but they worked very well with most of the files I used. They have an explanation in their site about how to use these libraries (which they call filters). I chose Visual Basic because it is an easy language which I am comfortable with. Besides, it creates small executables, provided you have the VB runtime (which most users have).



This is how the application looks like

Image Image Image

I decided to make the application freeware, so you can freely use and distribute the application without paying me anything. Anyway, if you like the product and you would like to support further development, you can donate any amount through PayPal. I have to pay for the site... Please, use the PayPal  link on the left menu for your donations.

  To format the txt document, you will need to have the VBScripting engine version 5 of higher, since the txt2palm makes use of the regexp object inluded in the VBScript engine. If you have Internet Explorer 5 or higher or you have Windows Millenium or XP you do not need to worry about it. If not, you may need to download the engine from Microsoft.

  Besides, since it is written in VB6 it needs the runtime engine. If you do not have it, you will have to download it from Microsoft:

  To install the application, just unzip it to any folder and double click on the exe.

The application is almost self-explanatory for normal use:
  1. Convert the file using the first tab. (Select source file, destination and click on "Convert to txt")
  2. Format the file using the second tab and checking and unchecking the desired formatting options. I recommend to check the last option ("open txt after formatting") so you can see how the text looks like after the formatting and make any additional manual modifications.
  3. Once the text file looks as you like, you can convert it to AportisDoc, zTXT mode 1 or zTXT mode 2 checking the appropriate option, in the third tab, writing a title and clicking on "Convert to pdb".

  zTXT files are significantly smaller than AportisDoc files, but they can only be read on a Palm using Weasel Reader and PalmFiction, as far as I know. Compression mode 1 allows random access to the records. This means that, once the document is in the Palm, the records of the document can be decompressed as needed. Compression Mode 2 on the contrary, requires the document to be completely decompressed before reading it.

If you want to modify any of the default regular expressions used in each formatting step, click on the Advanced... button next to it and make the appropriate modifications. You can test the patterns using the "Test Search" button. The changes to the patterns will only be valid until you close the application. You can modify directly the ini file if you want to make the modifications permanent.

  There are two very common reasons to modify the default pattern:
1. You want to remove specific headers and footers from the document. Since on a Palm pages does not make sense, you do not want to see these in the middle of your reading.
2. You want to modify the default indentation of paragraphs.

  To perform the first one, just click on "Advanced..." of the corresponding step ("Remove headers and footers") and paste the header and footer in the pattern where it says so, taking care of not removing any of the special symbols.

  To perform the second one, just click on "Advanced..." of the corresponding step ("Separate paragraphs and indent") and modify the number of spaces before the "$2" in the replace pattern.

  To create bookmarks, you can specify the string (mark) that will we used to set the position of the bookmark. By default, it is "<BMK>", but you can change it through the options menu. The default regular expressions for the chapter separation will also add this mark in front of the title of each chapter. So a bookmark will be added at the beginning of each chapter. The name of the bookmark is created with the first 15 characters of the line where the bookmark is placed.

  To uninstall the application just remove it from your hard disk ;-)

If you are worried about trash in your registry, I admit that the tool creates a few entries in ...\Software\VB and VBA Program Settings\txt2palm to store the last files selected as source and destination, but I would not worry about that...

There is a MSDN section that lists the expressions that you can use in your search pattern:

In your replace pattern you can also use \n and \r with the same meaning as above. n$ makes reference to the n subpattern marked between brackets in the search pattern. You can find more information about this in the MSDN section that explains the replace function.

Have fun and happy formatting!!

 Download txt2palm16

 
 
 
 
  Go to top of page  Home & Login | Freeware Applications | Just for Fun | La Armónica | PureBasic | FAQ | Contact me | About... |