|
|
|
|
|
|
|
|
|
|
How to generate Doc files for handheld 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 handheld device..
FIGURE B
Here's the converted poem as seen on a Palm device using TealDoc.
Mark Lawson is a consultant with Electric Memo Ltd. He can be reached at markl@electricmemo.com.
[ Prev ]
|
|
|
|
|
|
-- Advertisement --
AUTOMATE LOTUS NOTES USER ID MANAGEMENT
ID Manager 4.5 from HELP Software provides a new level of automaton for managing Lotus Notes IDs. ID Manager lets Lotus Notes administrators get out of the business of creating and managing user IDs. Use our ROI calculator to see how quickly ID Manager will pay for itself.
Learn more about HELP Software products |
-- Advertisement --
Now for the first time, real-time dashboards within Notes!
No more tedious report iteration and endless data exporting! The New IntelliPRINT Dashboard Reporting now empowers you to easily create analyzable widgets and real-time dashboard reports. Your business managers can then quickly customize, extend, and analyze these dashboards to their heart's content!
All from within your Lotus Notes data, all in real-time!
Download your Free Trial today! |
|
|
|
|
|
|
|
|