Source language: Translate to:

RTF files have varying linespacing in NB

General questions about NeoBook

Moderator: Neosoft Support

Re: RTF files have varying linespacing in NB

Postby Enigman » Tue Oct 21, 2014 11:18 am

FEEDBACK:

Okay, I have been using the RTF editor built into NeoBook to convert all my formerly WordPad created RTF files. If I set all the paragraphs for a linespacing of "at least 0.20in" then I get nice consistent displays of the RTF file. However, there is something that happens when I save the file that is a little troubling. All my files have a title line that is "Georgia font size 16 and set to blue". Most files have images at the top, right under the title. When I set the paragraphs for linespacing and then save the file in the NB editor, the titles are turned black and the image is often blanked out. If I open the file again and make the titles blue again and reload the image, it seems to stay after a save. This might be because the file was originally a WordPad RTF file, but I don't know. This is an issue for dave, I guess.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: RTF files have varying linespacing in NB

Postby Neosoft Support » Thu Oct 23, 2014 10:13 am

I suspect that it's something left over from WordPad. One of the main problems with RTF is that you can get a build up of formatting codes when a file is edited in multiple word processors. This often causes rendering problems as each program tries to interpret the formatting while preserving and ignoring codes it doesn't understand.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RTF files have varying linespacing in NB

Postby Enigman » Thu Oct 23, 2014 10:41 am

Neosoft Support wrote:I suspect that it's something left over from WordPad. One of the main problems with RTF is that you can get a build up of formatting codes when a file is edited in multiple word processors. This often causes rendering problems as each program tries to interpret the formatting while preserving and ignoring codes it doesn't understand.

That's kinda what I thought.

Can I make a suggestion/request? Expand the types of images that can be imported to an RTF file in the NB editor to include PNG in addition to BMP. I don't mean to honor transparency. You could substitute white into a transparent background. It would be a good addition just so that when users are developing complex RTF files with lots of images, they don't have to store everything as BMP files which are huge compared to PNG files. PNG files are much smaller and use a non destructive compression so they are ideal for doing image development.

For example, when I started converting my RTF files from WordPad to the NB editor, one particular image got dropped from the RTF display in the NB Editor, so in order to put it back in, I had to open the original PNG file and save it as a BMP file for use in the NB editor. The original PNG was 18Kb and the BMP file was 516kb. That's a 2,866% increase in storage space. Thats a big deal when you might have hundreds of image files in a project. Also, the PNG file is used for the program and the BMP copy can only be used for the editor, so I have to store both formats with the project, making the situation worse.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: RTF files have varying linespacing in NB

Postby Wrangler » Thu Oct 23, 2014 10:47 am

Have you taken a look at the Editors Toolbox plugin? Haven't looked at it for a long time, but I seem to recall it provides rtf on stereoids.
Last edited by Wrangler on Thu Oct 23, 2014 10:52 am, edited 1 time in total.
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: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: RTF files have varying linespacing in NB

Postby Enigman » Thu Oct 23, 2014 10:49 am

Wrangler wrote:Have you taken a look at the Editors Toolbox plugin? Haven't looked at it for a long time, but I seem to recall it provides rtf on stereoids.

I'll check that out.

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: RTF files have varying linespacing in NB

Postby Wrangler » Thu Oct 23, 2014 10:52 am

I also just discovered that when you take a screen snapshot with windows 7' Snipping Tool, the capture will paste right into the NB rtf editor. No saving file or anything. It just embeds it on the spot.
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: 1507
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA

Re: RTF files have varying linespacing in NB

Postby Neosoft Support » Sat Oct 25, 2014 11:34 am

Have you considered using HTML instead of RTF? NeoBook's compiler can compiler most types of HTML content (including images) into the exe. Just add a WebBrowser object containing the HTML file to your pub.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RTF files have varying linespacing in NB

Postby Enigman » Sat Oct 25, 2014 11:56 am

Neosoft Support wrote:Have you considered using HTML instead of RTF? NeoBook's compiler can compiler most types of HTML content (including images) into the exe. Just add a WebBrowser object containing the HTML file to your pub.

You'll find the answer to this farther up in the thread where I talk about Pandora's box. I know HTML can be compiled in, but then it has to be extracted to be used along with all the images. Not doing any on-the-fly extractions for security reasons. Read up higher for my explanations. Also, the RTFs are just perfect for what I want in the program. If the user wants more robust help, they can use the link to all the same help files on the website.

By the way, that brings up another question. Is it possible to programmatically access the RTF file content in the EXE by putting the files into one or more variable(s)? In other words, can I programmatically search the RTF embedded content and extract a filename for matches?

That would be Ka-narly. 8)

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: RTF files have varying linespacing in NB

Postby Neosoft Support » Mon Oct 27, 2014 10:17 am

I know HTML can be compiled in, but then it has to be extracted to be used along with all the images. Not doing any on-the-fly extractions for security reasons.


Compiled HTML content isn't extracted anywhere, it's loaded directly from the exe into memory.

By the way, that brings up another question. Is it possible to programmatically access the RTF file content in the EXE by putting the files into one or more variable(s)? In other words, can I programmatically search the RTF embedded content and extract a filename for matches?


If you add the RTF files to your pub's embedded files list, then you can load them individually into variables using the FileToVar action. You can have the same file in the embedded list and also displayed in an Article object. The compiler will only include one copy in the exe.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RTF files have varying linespacing in NB

Postby Enigman » Mon Oct 27, 2014 10:59 am

Compiled HTML content isn't extracted anywhere, it's loaded directly from the exe into memory.

Is that a new change? In the past I always had to use external directories. What about the images used? Do they compile in as well? Do I have to use the embedded files list to bring everything (HTML and images) in?

If you add the RTF files to your pub's embedded files list, then you can load them individually into variables using the FileToVar action.

Cool. But that doesn't work without being on the list?

Thanks.
User avatar
Enigman
 
Posts: 314
Joined: Tue Apr 12, 2005 3:57 pm
Location: Foothill Ranch, CA

Re: RTF files have varying linespacing in NB

Postby dec » Mon Oct 27, 2014 11:23 am

Hello,

I am not sure if the HTML can work from embedded files. If so, maybe you can use the Data URI scheme to embed images into your HTML file.
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: RTF files have varying linespacing in NB

Postby dpayer » Mon Oct 27, 2014 12:21 pm

dec wrote:Hello,

I am not sure if the HTML can work from embedded files. If so, maybe you can use the Data URI scheme to embed images into your HTML file.



Neobook can load an MHT file from an embedded file in NB.

Here is a small example:

A pub file with a MHT embedded in it
An exe file with a MHT embedded in it
a direct link to the MHT file used for embedded example

David P.
David Payer
Des Moines, Iowa
USA
User avatar
dpayer
 
Posts: 1384
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: RTF files have varying linespacing in NB

Postby dec » Mon Oct 27, 2014 1:13 pm

Hello,

dpayer wrote:
dec wrote:Hello,

I am not sure if the HTML can work from embedded files. If so, maybe you can use the Data URI scheme to embed images into your HTML file.



Neobook can load an MHT file from an embedded file in NB.

Here is a small example:

A pub file with a MHT embedded in it
An exe file with a MHT embedded in it
a direct link to the MHT file used for embedded example

David P.


To be honest I have not knowledge about MHT files, but, after testing the sample publication and executable maybe can be a solution here. :wink:
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

Re: RTF files have varying linespacing in NB

Postby Neosoft Support » Tue Oct 28, 2014 12:44 pm

Is that a new change? In the past I always had to use external directories. What about the images used? Do they compile in as well? Do I have to use the embedded files list to bring everything (HTML and images) in?


It's been a feature for quite a while. The html file is parsed by the compiler and all required Images, style sheets, etc. are included in the exe. Try displaying a local HTML document in a WebBrowser object and then selecting File List from the Book menu. You should see the html, images, etc. in the list. (The html content must be local. The compiler will not download content over the Internet.)

But that doesn't work without being on the list?


The file must be in the embedded files list.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5605
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: RTF files have varying linespacing in NB

Postby dec » Tue Oct 28, 2014 5:02 pm

Hello,

Neosoft Support wrote:
Is that a new change? In the past I always had to use external directories. What about the images used? Do they compile in as well? Do I have to use the embedded files list to bring everything (HTML and images) in?


It's been a feature for quite a while. The html file is parsed by the compiler and all required Images, style sheets, etc. are included in the exe. Try displaying a local HTML document in a WebBrowser object and then selecting File List from the Book menu. You should see the html, images, etc. in the list. (The html content must be local. The compiler will not download content over the Internet.)

But that doesn't work without being on the list?


The file must be in the embedded files list.


I just test it and works like a charm. Certainly NeoBook don't stop to surprise gratefully with amazing "hidden" features. ;)
.
Enhance your NeoBook applications!
.
58 plugins, 1131 actions and 233 samples
.
NeoPlugins website: www.neoplugins.com
.
User avatar
dec
 
Posts: 1663
Joined: Wed Nov 16, 2005 12:48 am
Location: Spain

PreviousNext

Return to General NeoBook Discussions

Who is online

Users browsing this forum: No registered users and 1 guest