Search DominoPower's 10,675 Lotus-related article archive 
Home
EasyPrint
News details Click here for the RSS feed's XML code. This is not a browser URL.
Articles-only Click here for the RSS feed's XML code. This is not a browser URL.
Twitter Feed Click here for the Twitter feed.
HANDHELD CONNECTIONS
How to generate Doc files for handheld devices from Notes
By Mark Lawson

If you've ever used a Palm Computing device, you're probably familiar with Doc files. Files saved in this format can be easily downloaded and viewed on your Palm device using one of many popular Doc viewer applications. Users of Windows CE devices can also view Doc files using the DOCview application.

This article shows you how to easily create uncompressed Doc e-text databases using just LotusScript. For many users this well-supported format, derived from the original program by Rick Bram, is their first choice for storing reference information, articles and even whole books on the Palm device. Once installed, Doc databases can be read by a variety of programs such as AportisDoc or TealDoc and can include formatting, bookmarks and even pictures depending on the chosen reader. Now there is even an editor called QED. A word of warning however, Palm devices have small amount of memory (1-4Mb) and little 160x160 screens; you may have to be inventive.

Doc database structure
A Doc database is actually a format-within-a-format, wrapped up inside a standard Palm device PDBPDB database. To keep this article short we've omitted a detailed account of the PDBPDB and Doc header fields but we've included a more detailed description in the accompanying example. After the PDB header and the offset list (easy in this case as the records are all defined lengths) the first record in the database is the Doc header. This simply holds the version; 1 for uncompressed in our case, and the number of 4096-byte records which then follow in successive records.

A simplified view of the Doc-PDB format as shown in Table A. An interesting feature to note is the 2-byte padding. Although not actually part of the format, the 2-byte pad is necessary for the file to install properly.

Pdb Section Bytes
Pdb Title 32
Pdb Header 48
Record Offset 1 8
Record Offset 2 8
Record Offset N 8
Padding 2
Record 1 Doc Header 16
Record 2 Doc Data 1 4096
Record N Doc Data N-1 4096

LotusScript and Palm device idiosyncrasies
There are a couple of hurdles to overcome before writing the file:

  • The DragonBall processor in any Palm unit expects data to be presented in a byte-swapped (MSB) format, so on Intel PC's you need to do a reversal (e.g. B2-EB-77-F4 is reversed to become F4-77-EB-B2). I've written Back4() and Back2() to handle this for 4 and 2 byte values using the simple Hex$() and CLng() functions rather than binary math. If you own a Mac, you'll have to change the code for Back4() and Back2() in the script library since the Mac's processors (also Motorola devices like in the Palm device) don't need the reversal.


1  ·  2  ·  Next »
Other articles you might like
Home > Mobile Technology > Palm OS (11 articles)
   Synchronizing Notes with Palm handhelds with Pylon 5.2
   Integrate Notes with Palm's new Tungsten T
   Top 10 support questions answered for Pylon products
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Recent DominoPower Articles
What to look for in a Domino-based document management solution
Understanding Domino.doc end-of-life options
When the debugger won't debug hidden code that isn't hidden
What to do if the LotusScript debugger won't single-step over code
Top 10 ways to launch and build a Lotus consulting practice (with a little help from the Beatles)
Troubleshooting an OpenSuse Notes install
Incident report: denial of service attack against ConnectedPhotographer.com
Latest Lotus Headlines
SnTT - Enabling ALL the bells and whistles!
Tivoli Data protection causes Domino to crash
Fun when running DB2 CLP scripts
Introducing Flippr, the easy way to admin Quickr
DXL and fake security
Using search forms in IBM Workplace Collaborative Learning 2.7
Schmidt, Freed, and Gering on the OVF Toolkit
>> Read all the news
More from the ZATZ journals
Computing Unplugged: Eight steps to successful and reliable home backups
David Gewirtz Online: CNN commentary and analysis
OutlookPower: Can Outlook run when it's not running (and other mysteries)?
-- Advertisement --

Learn Notes and Domino 8 at your place and pace!
Learn Notes and Domino in your office and/or home! TLCC's highly acclaimed distance learning courses for users, developers, and admins will enhance your career and your resume.

The many included activities and demos will make you a pro! Expert instructor help is a click away.

Click here to try a FREE demo course!!

-- Advertisement --

Want The Top Lotus Experts By Your Side Without Paying Hefty Consulting Fees? Look No Further.
Like having a team of consultants by your side -- ones who have all the answers and never make mistakes -- THE VIEW gives you immediate access to field-tested instruction, guidance, and best practices from the brightest Lotus professionals around.

Join your peers who realize their Lotus technology is too important to let people from blogs and forums tell them how they should implement it, run it, and use it. THE VIEW is where only the world's top Lotus experts provide validated support to you on a weekly basis to ensure you work more efficiently, get more out of your Lotus technology, and stay clear of costly mistakes.

Check out the new instruction, tips, and best practices added to THE VIEW this week.

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
Copyright © 1998-2009, ZATZ Publishing. All rights reserved worldwide.
Editor's Login