format single words in the Header-String

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

format single words in the Header-String

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

Hi

I'd like to know what possibilities there are to format parts of the
Header-String.

It's a pity one can't do it as follows:
DefineHeader(x,y,x2,y2, 'name,[U] address, [UO, B]title');

Is there no other way than to use the OnPageBreakEvent and insert
manually on each head of page an RTF-Object?

Thanks for advice!
Daniela
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

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

The DefineHeader() method is only intended to be used for very simple headers. VPE's layout features are so powerful that there is no real need for any enhancement of the DefineHeader() method.

If your document is not file based (i.e. SwapFileName is not set, and VpeOpenDocFile() is not used), the easiest way to insert headers and footers (or anything else, for example "#Page of #Total Pages") is as follows:

After you have done creating your document, execute the following code:

// iterate over all pages of the document,
// from the first to the last
for page = 1 to Doc.PageCount
Doc.CurrentPage = page
<insert any objects like text, lines, etc.>
next page

It is really simple, isn't it?

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 4:02 pm

you are right that is very simple.
But as well it is simple to scan a line and replace a string within a
set with for example a underline or bold like i wanted in my last
posting, but looks like to do that i need a "more powerful version"
of VPE and i have to change to rtf output. I thought in former times
that i bought a good product. In the moment i am not so convinced of
that.

In any case happy easter. Walter
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Tue Nov 23, 2004 4:03 pm

Rendering text with different font attributes really requires much more complex code.

But well, yes, if you require more power, it is exactly like you say:

>>
i need a "more powerful version" of VPE
<<

It was a design decision to draw a clear dividing line between the Standard Edition and the Professional Edition, and to implement a powerful RTF parser and interpreter into the VPE Professional Edition. It is not only capable of switching font attributes like bold, underline, italic and the text color within a running text, but also the font size and font type as well as the line spacing, the paragraph spacing and indentation. Furthermore it is capable to keep lines and paragraphs together in case of automatic text break over multiple pages.

The Standard Edition is already very powerful and allows to create complex documents. With the Standard Edition it is possible to switch the font attributes for each single text object.

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: Baidu [Spider], Google [Bot] and 11 guests

cron