Search PalmPower's 487 Palm-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.
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. Roll over 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.


« Previous  ·  1  ·  2
Other articles you might like
Home > Solutions > Publishing & ePublishing (5 articles)
   How I turned my novel into an ebook
   Easier methods of ebook authoring
   Learn the steps for creating an ebook easily
Get Weekly Email Updates
Subscribe to our regular weekly email newsletter. It's packed with tips, reviews, deep analysis, and the latest news.
 
Other PalmPower Articles
Palm gets up to date with new Tungsten family of handhelds
Create handwritten email with riteMail
Presenter-to-Go puts PowerPoint presentations on your Palm OS handheld
Looking for the cutting edge
Gain remote access to databases and PLCs
PalmSource Open House showcases what's new in the Palm community
Analysis: handheld market share
More from the ZATZ journals
Computing Unplugged: The iPad defenders have spoken
David Gewirtz Online: CNN commentary and analysis
DominoPower: Application development, William Shatner, and the origin of the universe
OutlookPower: More about disappearing text
-- Advertisement --

Sent Items Organizer
When you need to file your sent email into their proper folders based on keywords or who it's to. It's also perfect for shared mailboxes.

It also adds a "Send And File" toolbar button while you're composing (similar to the way Lotus Notes used to work) for quick and easy filing.

Find out more!

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