Source language: Translate to:

hpwUtility question

Questions about NeoBook PlugIns

Moderator: Neosoft Support

hpwUtility question

Postby Wrangler » Thu Nov 16, 2006 1:40 pm

Hi Hans,

When using hpwRTFToBitmap on an rtf created with neobook editor, I get "File Header not valid". The rtf I used contains text and images in tables. Is there something else I need to do to get this to work?

Thanks.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby HPW » Fri Nov 17, 2006 12:10 am

hpwBitmapToRtf does only create the raw image data-stream.

Code from the sample pub:
hpwBitmapToRtf "[CONVFILE]" "[RTFVAR]"

Setvar "[TESTVAR]" "{\rtf1[RTFVAR]}"


The Setvar puts minimal RTF info around the raw data to make it work.

So you need to be carefull in constructing the valid RTF stream.
At least you can make a valid complete sample with the editor and take a look at the RTF source to see what is needed around/between image data and other RTF content.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany

Postby Wrangler » Fri Nov 17, 2006 9:00 am

Actually, I was trying to use RTFToBitmap, not BitmapToRtf. What I'm trying to do is convert an existing rtf made in neobook editor to an image, so it can be attached to an email. The rtf is 8.5x11 inches, so taking a snapshot doesn't work because the rtf is larger that my screen (1280x1024), and the task bar shows at the bottom of the snapshot.

Setvar "[TESTVAR]" "{\rtf1[RTFVAR]}"


I'll play with this and see if I can get it to work. You and Gaev helped me with the generation of the rtf a few years ago, but I couldn't find the post. You mentioned then the above setvar.

I also looked at commandline utilities to do this, but they don't handle the tables properly. Same with converting the rtf to html. Works nice, but doesn't recognize the tables. And rtf code is so intimidating, it's hard to tell what's needed and what's not.

Thanks for your response.
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
Wrangler
 
Posts: 1505
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Postby HPW » Fri Nov 17, 2006 10:28 am

Then you must parse for the bitmap content in the RTF:

{\pict\dibitmap0 ....... }
The data represented by the ...... is the bitmap-stream.
Hans-Peter
User avatar
HPW
 
Posts: 2510
Joined: Fri Apr 01, 2005 11:24 pm
Location: Germany


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 1 guest