import of rtf-files

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

import of rtf-files

Postby IDEAL Software Support » Tue Nov 23, 2004 3:32 pm

Hi,
With the function
'WriteRTFFile(VLEFTMARGIN, VTOPMARGIN, VRIGHTMARGIN, VFREE, nameRTF)'
it is possible to import rtf-Files. In general it works, but there
are some formatting problems:
- the head of the letter is not rendered
- additional pagebreaks are inserted
- title is not underlined
- address comes with doubled linefeed

Is there also a possibility to import html-files?
Thanks in advance for your help.
Kind regards
Daniela
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 3:33 pm

This is the first time we hear of such problems with our RTF import engine. In the demo shipped with VPE you can see that a heavily formatted RTF document (indeed an old version of our VPE manual) is rendered perfectly into a VPE document - much better than most other products do.

I think all of your problems - except that a "title is not underlined" - are related to different page margins of the original document, compared to the settings of the VPE document. In addition there might be blanks used for formatting text instead of tabs. Solution: adjust the settings of the page margins in the VPE document to the same values of the original RTF document and replace groups of blanks with tabs. It is also possible that you used Drawing Objects - this is special, positioned RTF text - in your document, which is not supported by VPE.

Regarding the non-underlined title: please send a sample RTF file directly to our support e-mail address (please don't forget the keyword "VPE" in the subject, so our spam filter will let it through). We will analyze it.

Please attach the following information to your e-mail:
1) With what word processor was the RTF file generated?
2) The page dimensions and the settings for the page margins of the VPE document.

To answer your question: VPE has no direct built-in support for importing HTML files.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 3:33 pm

Daniela,

we analysed the RTF file you had sent us and found out the following:

> - the head of the letter is not rendered
Please see our RTF specifications: Headers and Footers are not supported. Since the header is only on the first page of the document: convert it to normal text.

> - additional pagebreaks are inserted

There are "sections" defined. VPE interprets sections as New Page commands. Solution: remove the sections.

One note to all users of VPE:
VPE renders text printer independently (did you ever notice that Word and other word processors reformat the whole document if you change the printer?), therefore it can happen that page breaks are computed on different positions in a document than the word processor did (for a specific printer).

This is no problem when using VPE: In order to keep paragraphs together on a single page, see \widctlpar \keep and \keepn in the VPE manual. In Word these features are in the paragraph properties dialog as (translated from the german Word version into english) "Paragraph Control", "Keep lines together" and "Keep Paragraphs together". VPE handles these options very well, so your document will be formatted fine even for differently rendered page breaks.

> - title is not underlined

In the header of your RTF document there is no underlining used. Instead it is a paragraph option for bordering the paragraph. This is a very special RTF feature and not supported by VPE. Solution: turn the bordering off and use underlining.

> - address comes with doubled linefeed

This is related to the way VPE handles the RTF \line instruction: your RTF document uses the \line instruction, which is always interpreted by VPE as a \par command, which is usually no problem. But in your case each and every line has a Space Before = 36pt setting (\sb), and therefore each line has a huge gap. Solution: separate the lines as paragraphs and turn off the Space Before setting for each successive line - except for the first line.

I will send you the overworked RTF document in a private e-mail which fixes the problems.

After all, I can say that the creator of the document used a lot of very special RTF features. Please note, that VPE's RTF engine is not a replacement for Word. The RTF engine is intended to assemble documents with rich text formatting, like mixed fonts and font attributes, paragraph attributes (left / right indent, space between / before / after, widctlpar keep, keepn, etc.). Whilst these supported features allow to import even complex formatted documents - like our VPE manual - it does not allow to import "blindly" any kind of document that can be created using Word.
As explained on our website, features like headers and footers, tables, embedded images, table of contents, shaded or bordered paragraphs and multi-column text are not supported. However, you can assemble any kind of complex document (including headers and footers, tables, embedded images, table of contents, shaded or bordered paragraphs and multi-column text) using VPE, by placing units of RTF blocks in any position on any page. This is the way things should be handled.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 33 guests