PDA

View Full Version : header lines missing by printing


Unregistered
October 10, 2002, 18:29:03
I have a problem when I want to print pages automatically: there are always just two lines of the header printed and sometimes even the main text is partly printed over the header.

When I print the page manually, the whole page with all headerlines is printed.

I use Delphi 5 with Textcontrol 9 Sp 5.

The problem occurs depending on the printer, that is used. With Lexmark Optra E 312 for example all header lines are printed, but with HP Laserjet 6L for example the printing just has two header lines.

Befor the printing is started I use a modal Form, in which the user can select what he wants to print, TextControl itself lies in another form in the background.

Trying to solve the problem, I found this funny thing:
after I filled TextControl with the text and the header I want to print, I can see in the background, that there are just two lines of the header shown, but when I add a "Showmessage" before printing the Text, the Textcontrol-Form comes up to the front aswell and switches, so that now all header lines are shown and the printing is fine with all printers.
With the Lexmark the TextControl does not even has to be visible, there is a Form lying in front of the Form, in which Textcontrol lies, that fills the whole screen and the printing is fine.

Does anyone have a clue, how I can print headers without the Textcontrol being shown and using different printers?


This message was originally posted by iris in the old TX Text Control Support Forum.

Unregistered
October 11, 2002, 21:26:20
Yes. If you are working from a non-visible form with TX, then you'll have to call HeaderFooterActivate for each of the Headers/Footers in the document. TX takes care of this for you if the form is visible. If it is not visible, you'll need to specify this so that it gets all of the h/f's. Also you'll need to get the total number of pages after the hfActivate, for that may change.


This message was originally posted by Vann Joe in the old TX Text Control Support Forum.

Unregistered
October 14, 2002, 08:22:50
The problem is: headers and footers are activated, otherwise it would not print alright with another printer.


This message was originally posted by iris in the old TX Text Control Support Forum.

Unregistered
October 15, 2002, 22:01:04
The same thing happens to me. When trying to "batch print", it seems that allowing for a pause or just user-interaction corrects problems with my headers and footers. I generate the form on the Control that is not visible, but then ask the user to hit "OK" to generate that particular set of documents. If the user interaction form comes up, the documents print properly. If I don't utilize the interaction form, I can't count on the results.


This message was originally posted by John Spear in the old TX Text Control Support Forum.