Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Scripts to convert files to/from Palm's PDB format PDAs etc.
I often like to read and edit documents, articles, and papers on my Palm device (using the excellent QED), and then continue back at home on the Mac. This requires quick and easy inter-conversion from .txt to .pdb. In addition, for reading PDFs as text, the conversion must respect the column flow in multi-column PDF fliles (or else you end up reading across, rather than down, the columns in your text file).

This is how to create AppleScript droplets to convert text, PDF, and Word documents to .pdb and then back to text.
  1. Read and follow this excellent hint for converting text to pdb for Palm OS. Make sure during this you pay attention to:
    • Installing xCode tools first (to compile unix make/install files)
    • The tips about using sudo to avoid "permission denied" errors
    In fact, to use these droplets, you don't need to get the AppleScript on the above site to work (just compile xpdf and text2pdb), but it is very useful so I'd do it anyway.
  2. Use the following scripts to do your conversions...
[robg adds: I haven't tested these scripts, and any errors are probably a result of my bad work with cut-and-paste...]

The Scripts:
  • Convert PDB to text ... When saved as an application in Script Editor, this will convert any pdb files to txt, then delete the original pdb file. The folder path used is:
    /Users/tangawk/Desktop/pending_junk/boks
    So replace tangawk with your username, and Desktop/pending_junk/boks with whatever you want to use as your conversion ground. I basically leave my applet in the boks folder, and drop all files I'm working with in there, so I can drag and drop easily onto the applet. I am no AppleScript expert, but it works to a tee on multiple files as well.

    Practial Points:
    1. Remember, the script will delete the original pdb file -- it's easy to memo this out in the script if you don't want that behavior.
    2. Keep the folder window as the front active window in the Finder, or else the rename part of the script won't work (you will just get .pdb.txt rather than .txt as your file suffix, they will still get converted).
    3. I find that if you do want to continue editing the converted text file (from .pdb), Word or BBEdit preserve line spacing better than Apple's TextEdit.
So now follow the other scripts for other tasks. Again, replace my path:
Users/tangawk/Desktop/pending_junk/boks
with your own in each script, then keep all the saved applets there so you can drag and drop to convert at will!
  • Text to PDB
  • PDF to text
  • PDF to PDB -- this is a droplet version of the script linked in the hint at the start of this hint. Again, it's great for batch conversion of scientific papers for reading on your Palm on the train. Edit in QED, then drop the PDB back on the pdb-text applet above, and continue at home!
  • RTF/DOC/HTML to text via Word -- this was written to batch convert .rtf or .doc to .txt for subsequent conversion to .pdb or other things. Useful if your eBook comes as .rtf, and you want it as .pdb. Make sure your version of Word is set to open without the welcome screen, or the script will founder. At a pinch, the script will also work with simple .html files, as Word will recognise and convert these (ie strip HTML code from text).

    Change .rtf in the renaming part of the script to doc or html as appropriate (but as previously, conversion to text will still occur).
If there are any slick scripters out there who can tidy this code up, I'd love to hear from them, but they work great in their current mode. Hope they're useful to others!
    •    
  • Currently 1.30 / 5
  You rated: 3 / 5 (20 votes cast)
 
[55,540 views]  

Scripts to convert files to/from Palm's PDB format | 3 comments | Create New Account
Click here to return to the 'Scripts to convert files to/from Palm's PDB format' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Scripts to convert files to/from Palm's PDB format
Authored by: Dragon76 on Jun 27, '06 08:03:03AM
Ther's already an application called Palm Doc Convertor that works perfectly. And Adobe Reader for Palm OS is a must have if you use PDFs often.

[ Reply to This | # ]
Scripts to convert files to/from Palm's PDB format
Authored by: sd on Jun 27, '06 09:55:01AM
I would also like to mention "PAR", a great command line tool, able to manipulate data in PDB or PRC files.
I enjoyed it when I wanted to extract an MP3 unfortunately encapsulated in a PDB file after being transfered by IR.

[ Reply to This | # ]
Scripts to convert files to/from Palm's PDB format
Authored by: Tonmeister on Jun 27, '06 11:39:17PM
I use PorDiBle. It's free and open source.

---
G4 Dual 450, 2 GB, 400 GB, using Logic Express with Reason and live guitar, bass and vocals.

[ Reply to This | # ]