Email:   
Home
In This Issue
EasyPrint
Click here for the RSS feed's XML code. This is not a browser URL.
How to generate Doc files for Palm devices from Notes (continued)

  • The PDB header has date fields based on seconds from January 1, 1904. These are used in the HotSync process. I've written GetSecs() to handles this properly using a known seed value.

  • Be aware that there's a problem opening our file in binary mode. We need to write out the binary data in the headers. Unfortunately, in this mode Notes writes out all strings in Unicode; that's two bytes per character rather than one. So, we need to write text data in output mode. The solution is to create our file in three parts, closing and re-opening each time as you can see in Table B.

Mode Action
Output Write PDB Title. 32 bytes, 0 terminated.
Binary Write PDB header, record list and Doc header.
Output Write Doc records.

Doc format example
With the above problems sorted out and structures for the various headers created, we're ready to go. As an example we've created a small database that creates a PDB file from a Rich Text field using GetFormattedText and attaches it to the document. There is a design limit of 32K per PDB as that is the limit for a singlestring with the given code.

A final word about formatting
Once you've gotten past the basics of creating a Doc file, you can go on to the niceties of formatting. You may find yourself experimenting with the format to get the result to look right on the Palm organizer's small screen -- especially where it may wrap text followed by your carriage return. Also worth noting is that RichText bullets do not convert, so replace them with the Chr(95) block instead. Happily most of the Doc viewers support HTML-like tags of some degree of complexity in the pre-converted text. This will help with formatting and navigation. As with browsers, the support varies and you can end up tied to a particular viewer if you make heavy use of particular features. Figure A shows a simple example of tags from the Notes database.

FIGURE A

Here's a poem with a simple tag in the Notes database. Click picture for a larger image.

Figure B shows how that Notes field translates onto the Palm device..

FIGURE B

Here's the converted poem as seen on a Palm device using TealDoc.

Product availability and resources
Aportis Doc is available from http://www.aportis.com.

TealDoc is available from http://www.tealpoint.com.

QED is available from http://www.visionary2000.com/qed.

You can download the sample database from ftp://ftp.palmpower.com/palmpower/outgoing/issues/pp0599-palmdoc.zip. It is not normally our practice at PalmPower to provide download samples. However, at the request of the author, we have posted this file. If you have problems using this file, please contact the author directly or post a message on the PowerBoards. The editorial staff at PalmPower is not able to provide technical support.

Mark Lawson is a consultant with Electric Memo Ltd. He can be reached at markl@electricmemo.com.




[ Prev ]

ZATZ Home  ·  News  ·  Back Issues  ·  Credits/Trademarks ·  Link To Us
-- Advertisement --

EASY DEDICATED AND VIRTUAL DEDICATED SERVERS FOR AS LOW AS $67.99 PER MONTH
Customize and configure your own dedicated server. Simply choose one of our popular plans or select your own Linux or Windows server and plan options.

NO LONG WAITS. Server provisioned within hours.

Tap here now and be up and running with your own server tonight.

-- Advertisement --

CLEARSYNC - THE BETTER SHARING CALENDAR
ClearSync is wherever you are.
Access your account from:
  • Your PC, Mac, or Linux machine
  • Your Palm OS handheld
  • Any online browser

ClearSync works even without Internet access.
ClearSync tracks and saves your changes on your computer, so you're not stranded like with most online calendars.

Tap here to get your life in sync FREE for 30 days!

Copyright © 1998-2008, ZATZ Publishing. All rights reserved worldwide.
Editor's Login