Way to read/write Pocket Word files?

L

Lcubed

Does anyone know of any way to programmatically read to and write from
Pocket Word files?

My app needs to save data to a Pocket Word file (on WM5) and retrieve
it later. Using Pocket Excel instead of Word would also work. I need
to use a common file format that will store text and graphics and one
that can be used by a common PC app for later viewing if the user
uploads it via ActiveSync.

Being able to write to a PC2003 Word file might work as well.

If you could point me towards file format documentation or any Pocket
Word read/write functionality that might exist in VS2008 or if there
is a way to contact Microsoft directly and ask them, Any and all
suggestions greatly appreciated.
 
C

Chris Tacke, eMVP

Neither Pocket Word nor Pocket Excel have automation support or a documented
file format. A few years ago I did a lot of work on Pocket Excel and got a
library to the point of being able to read and do some writing, but I
abandoned it due to the fact it was just a side project, I think has limited
viability as a product and I just don't need the support load of yet another
project. Reverse engineering the format and getting to a point I could read
a workspace and worksheet took me several weeks. I would suspect PWord to
be a similar problem.


--

Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
 
P

Paul G. Tobey [eMVP]

How about HTML? That's pretty well-documented, although I don't think
there's any encoding support in .NET CF (or is there?). Pretty darn
portable, too.

Paul T.
 
L

Lcubed

Thanks Chris, although I was hoping for better news, there just
doesn't seem to be any Pocket Word specifications out there.

If it helps anyone else, I did find this tidbit on Pocket Word 2003
"transformation from WinWord to Pocket Word can be done
by saving the WinWord file in RTF format, then changing the new file's
"\rtf" tag to "\pwd2". Note, however, that the RTF put out by
WinWord's RTF filter may not be 100% supported by Pocket Word, so this
method may not produce a file that Pocket Word can handle." It does
work with the text, though I haven't yet been able to make the
graphics work that way. Also, ActiveSync does not automatically
translate this format to a Word Doc if it's being uploaded from a WM
PPC. darn. So it appears that this is a dead end as well.

Thanks Paul, that's a good suggestion, but my app is already using
HTML and it works great. Even though there is no .NET support for it
(that I know about), it was easy enough to create our own library. The
reports can then be printed with Field Software's PocketHTMLprint or
Printboy. I highly recommend HTML.

Unfortunately HTML doesn't encode the graphics so each "File" is
comprised of an HTML file and several graphics files which is
undesirable for our application. So now I'm tasked with finding a
means to encode the text and graphics together in a common file format
that can be printed from the PPC and uploaded to Windows PC via
ActiveSync to be used however the user likes from there.

Several weeks time to reverse engineer? Or does Microsoft make
available or sell their file format documentation by any chance?
 
P

Paul G. Tobey [eMVP]

You can embed the graphics in the HTML.

http://www.elf.org/essay/inline-image.html (see Data URL)

This might not render nicely on your particular desktop browser, but it
seems like it should *work* as a transport for the data, including the
graphics.

No, Pocket Word is not going to work for you. Undocumented, completely.
You might find some other third-party Word-like application that would work
(PDF?), I guess.

Paul T.

Thanks Chris, although I was hoping for better news, there just
doesn't seem to be any Pocket Word specifications out there.

If it helps anyone else, I did find this tidbit on Pocket Word 2003
"transformation from WinWord to Pocket Word can be done
by saving the WinWord file in RTF format, then changing the new file's
"\rtf" tag to "\pwd2". Note, however, that the RTF put out by
WinWord's RTF filter may not be 100% supported by Pocket Word, so this
method may not produce a file that Pocket Word can handle." It does
work with the text, though I haven't yet been able to make the
graphics work that way. Also, ActiveSync does not automatically
translate this format to a Word Doc if it's being uploaded from a WM
PPC. darn. So it appears that this is a dead end as well.

Thanks Paul, that's a good suggestion, but my app is already using
HTML and it works great. Even though there is no .NET support for it
(that I know about), it was easy enough to create our own library. The
reports can then be printed with Field Software's PocketHTMLprint or
Printboy. I highly recommend HTML.

Unfortunately HTML doesn't encode the graphics so each "File" is
comprised of an HTML file and several graphics files which is
undesirable for our application. So now I'm tasked with finding a
means to encode the text and graphics together in a common file format
that can be printed from the PPC and uploaded to Windows PC via
ActiveSync to be used however the user likes from there.

Several weeks time to reverse engineer? Or does Microsoft make
available or sell their file format documentation by any chance?
 
L

Lcubed

I just tried an embedded HTML image, it looked very promising. The
HTML with the embedded graphic worked fine with Firefox, but the
graphic could not be viewed from IE or Office Word (which would be
that apps that most users would want to use). On the PPC side, the
graphic was not visible in PPC and the PocketHTMLprint that I am
currently using would not even open the file. Also, the image size is
limited to 1K. Otherwise that would be a very nice solution, I wish it
was more widely supported.

Using PDF is a great idea! Even though there is no CE or WM support
for it, PDF is well documented online, allowing me develop my own code
to write the files in PDF format, read from it and print the file bit
by bit. Also, I tested PDF files with ActiveSync and they do not get
changed or corrupted when they are uploaded/downloade. Not as
convenient as the ability to read/write from a Word doc & let the
print sdk handle it all, but definitely do-able. Thanks!
 
P

Paul G. Tobey [eMVP]

Yes, that's what the pages that I've looked at say.

I have a PDF viewer on my WM5 device that came with it. It works fine for
every PDF I've tried...

Paul T.

I just tried an embedded HTML image, it looked very promising. The
HTML with the embedded graphic worked fine with Firefox, but the
graphic could not be viewed from IE or Office Word (which would be
that apps that most users would want to use). On the PPC side, the
graphic was not visible in PPC and the PocketHTMLprint that I am
currently using would not even open the file. Also, the image size is
limited to 1K. Otherwise that would be a very nice solution, I wish it
was more widely supported.

Using PDF is a great idea! Even though there is no CE or WM support
for it, PDF is well documented online, allowing me develop my own code
to write the files in PDF format, read from it and print the file bit
by bit. Also, I tested PDF files with ActiveSync and they do not get
changed or corrupted when they are uploaded/downloade. Not as
convenient as the ability to read/write from a Word doc & let the
print sdk handle it all, but definitely do-able. Thanks!
 
P

pocketmax

Hi,

I had a very similar requirement - to embed an image (signature) in a
document, that could then be printed directly from the device.
I solved that by using a pure RTF formatted document and embedding the
image using "{\\pict\\dibitmap0\\...." format.

Documents were usually created on the desktop on "Write" and then the
image inserted on the device together with other text (for an
invoicing system) and sent to either the HP or Field Software print
engines for output.
Both managed to print B&W or greyscale images without problem.

Hope that points you in correct direction

Bruce


This was then visible on the device in Pocket Word

Yes, that's what the pages that I've looked at say.

I have a PDF viewer on my WM5 device that came with it.  It works fine for
every PDF I've tried...

Paul T.


I just tried an embedded HTML image, it looked very promising. The
HTML with the embedded graphic worked fine with Firefox, but the
graphic could not be viewed from IE or Office Word (which would be
that apps that most users would want to use). On the PPC side, the
graphic was not visible in PPC and the PocketHTMLprint that I am
currently using would not even open the file. Also, the image size is
limited to 1K. Otherwise that would be a very nice solution, I wish it
was more widely supported.

Using PDF is a great idea! Even though there is no CE or WM support
for it, PDF is well documented online, allowing me develop my own code
to write the files in PDF format, read from it and print the file bit
by bit. Also, I tested PDF files with ActiveSync and they do not get
changed or corrupted when they are uploaded/downloade. Not as
convenient as the ability to read/write from a Word doc & let the
print sdk handle it all, but definitely do-able. Thanks!

You can embed the graphics in the HTML.
This might not render nicely on your particular desktop browser, but it
seems like it should *work* as a transport for the data, including the
graphics.
No, Pocket Word is not going to work for you. Undocumented, completely.
You might find some other third-party Word-like application that would
work
(PDF?), I guess.
"Lcubed" <[email protected]> wrote in message
Thanks Chris, although I was hoping for better news, there just
doesn't seem to be any Pocket Word specifications out there.
If it helps anyone else, I did find this tidbit on Pocket Word 2003
"transformation from WinWord to Pocket Word can be done
by saving the WinWord file in RTF format, then changing the new file's
"\rtf" tag to "\pwd2". Note, however, that the RTF put out by
WinWord's RTF filter may not be 100% supported by Pocket Word, so this
method may not produce a file that Pocket Word can handle." It does
work with the text, though I haven't yet been able to make the
graphics work that way. Also, ActiveSync does not automatically
translate this format to a Word Doc if it's being uploaded from a WM
PPC. darn. So it appears that this is a dead end as well.
Thanks Paul, that's a good suggestion, but my app is already using
HTML and it works great. Even though there is no .NET support for it
(that I know about), it was easy enough to create our own library. The
reports can then be printed with Field Software's PocketHTMLprint or
Printboy. I highly recommend HTML.
Unfortunately HTML doesn't encode the graphics so each "File" is
comprised of an HTML file and several graphics files which is
undesirable for our application. So now I'm tasked with finding a
means to encode the text and graphics together in a common file format
that can be printed from the PPC and uploaded to Windows PC via
ActiveSync to be used however the user likes from there.
Several weeks time to reverse engineer? Or does Microsoft make
available or sell their file format documentation by any chance?
On Nov 4, 2:22 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no
instrument no spam DOT com> wrote:
How about HTML? That's pretty well-documented, although I don't think
there's any encoding support in .NET CF (or is there?). Pretty darn
portable, too.
Paul T.
"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in
message
Neither Pocket Word nor Pocket Excel have automation support or a
documented file format. A few years ago I did a lot of work on Pocket
Excel and got a library to the point of being able to read and do some
writing, but I abandoned it due to the fact it was just a side
project,
I
think has limited viability as a product and I just don't need the
support
load of yet another project. Reverse engineering the format and
getting
to a point I could read a workspace and worksheet took me several
weeks.
I would suspect PWord to be a similar problem.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
Does anyone know of any way to programmatically read to and write
from
Pocket Word files?
My app needs to save data to a Pocket Word file (on WM5) and retrieve
it later. Using Pocket Excel instead of Word would also work. I need
to use a common file format that will store text and graphics and one
that can be used by a common PC app for later viewing if the user
uploads it via ActiveSync.
Being able to write to a PC2003 Word file might work as well.
If you could point me towards file format documentation or any Pocket
Word read/write functionality that might exist in VS2008 or if there
is a way to contact Microsoft directly and ask them, Any and all
suggestions greatly appreciated.
 
L

Lcubed

Thanks Bruce for the insight. Great minds must indeed think alike. I
was just comparing the specs for RTF to PDF and thinking RTF was
looking better. My app has to print color from the PPC as well, but
I've discovered field software now has an app that supports RTF. I'm
checking out their demo now. If it will all work together, then RTF
does look much better.
Did you compare RTF and PDF as well? If so, any words of wisdom?

Lcubed

Hi,

I had a very similar requirement - to embed an image (signature) in a
document, that could then be printed directly from the device.
I solved that by using a pure RTF formatted document and embedding the
image using "{\\pict\\dibitmap0\\...." format.

Documents were usually created on the desktop on "Write" and then the
image inserted on the device together with other text (for an
invoicing system) and sent to either the HP or Field Software print
engines for output.
Both managed to print B&W or greyscale images without problem.

Hope that points you in correct direction

Bruce

This was then visible on the device in Pocket Word

Yes, that's what the pages that I've looked at say.
I have a PDF viewer on my WM5 device that came with it.  It works fine for
every PDF I've tried...
"Lcubed" <[email protected]> wrote in message
I just tried an embedded HTML image, it looked very promising. The
HTML with the embedded graphic worked fine with Firefox, but the
graphic could not be viewed from IE or Office Word (which would be
that apps that most users would want to use). On the PPC side, the
graphic was not visible in PPC and the PocketHTMLprint that I am
currently using would not even open the file. Also, the image size is
limited to 1K. Otherwise that would be a very nice solution, I wish it
was more widely supported.
Using PDF is a great idea! Even though there is no CE or WM support
for it, PDF is well documented online, allowing me develop my own code
to write the files in PDF format, read from it and print the file bit
by bit. Also, I tested PDF files with ActiveSync and they do not get
changed or corrupted when they are uploaded/downloade. Not as
convenient as the ability to read/write from a Word doc & let the
print sdk handle it all, but definitely do-able. Thanks!
On Nov 4, 3:20 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no
instrument no spam DOT com> wrote:
You can embed the graphics in the HTML.
http://www.elf.org/essay/inline-image.html(seeData URL)
This might not render nicely on your particular desktop browser, but it
seems like it should *work* as a transport for the data, including the
graphics.
No, Pocket Word is not going to work for you. Undocumented, completely.
You might find some other third-party Word-like application that would
work
(PDF?), I guess.
Paul T.
Thanks Chris, although I was hoping for better news, there just
doesn't seem to be any Pocket Word specifications out there.
If it helps anyone else, I did find this tidbit on Pocket Word 2003
"transformation from WinWord to Pocket Word can be done
by saving the WinWord file in RTF format, then changing the new file's
"\rtf" tag to "\pwd2". Note, however, that the RTF put out by
WinWord's RTF filter may not be 100% supported by Pocket Word, so this
method may not produce a file that Pocket Word can handle." It does
work with the text, though I haven't yet been able to make the
graphics work that way. Also, ActiveSync does not automatically
translate this format to a Word Doc if it's being uploaded from a WM
PPC. darn. So it appears that this is a dead end as well.
Thanks Paul, that's a good suggestion, but my app is already using
HTML and it works great. Even though there is no .NET support for it
(that I know about), it was easy enough to create our own library. The
reports can then be printed with Field Software's PocketHTMLprint or
Printboy. I highly recommend HTML.
Unfortunately HTML doesn't encode the graphics so each "File" is
comprised of an HTML file and several graphics files which is
undesirable for our application. So now I'm tasked with finding a
means to encode the text and graphics together in a common file format
that can be printed from the PPC and uploaded to Windows PC via
ActiveSync to be used however the user likes from there.
Several weeks time to reverse engineer? Or does Microsoft make
available or sell their file format documentation by any chance?
On Nov 4, 2:22 pm, "Paul G. Tobey [eMVP]" <p space tobey no spam AT no
instrument no spam DOT com> wrote:
How about HTML? That's pretty well-documented, although I don't think
there's any encoding support in .NET CF (or is there?). Pretty darn
portable, too.
Paul T.
"Chris Tacke, eMVP" <ctacke.at.opennetcf.dot.com> wrote in
message
Neither Pocket Word nor Pocket Excel have automation support or a
documented file format. A few years ago I did a lot of work on Pocket
Excel and got a library to the point of being able to read and dosome
writing, but I abandoned it due to the fact it was just a side
project,
I
think has limited viability as a product and I just don't need the
support
load of yet another project. Reverse engineering the format and
getting
to a point I could read a workspace and worksheet took me several
weeks.
I would suspect PWord to be a similar problem.
--
Chris Tacke, Embedded MVP
OpenNETCF Consulting
Giving back to the embedded community
http://community.OpenNETCF.com
Does anyone know of any way to programmatically read to and write
from
Pocket Word files?
My app needs to save data to a Pocket Word file (on WM5) and retrieve
it later. Using Pocket Excel instead of Word would also work. I need
to use a common file format that will store text and graphics and one
that can be used by a common PC app for later viewing if the user
uploads it via ActiveSync.
Being able to write to a PC2003 Word file might work as well.
If you could point me towards file format documentation or any Pocket
Word read/write functionality that might exist in VS2008 or if there
is a way to contact Microsoft directly and ask them, Any and all
suggestions greatly appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top