trichview.com

trichview.support




Re: Printing Page numbers


Return to index


Author

Message

Stef Mientki

Posted: 11/16/2003 13:43:30


did you try it with some other pdf printer, like pdf995 (free and you're

not getting those "ugly" bottom lines ;-)

Stef Mientki


Martyn wrote:


> I changed my code to your code on the offchance (well, you never know ;-))

> but it has the same effect, as the attached PDF shows (created using a print

> to PDF utility). Interestingly though, the string shows up correctly on all

> pages in Print Preview.

>

> Martyn

>

> "Sergey Tkachenko" <[email protected]> wrote in message

> news:[email protected]...

>

>>Your code seems to be correct, and it should draw page numbers on all

>

> pages.

>

>>Please look at the demo

>>Demos\CBuilder\Assorted\Printing\Printing\

>>

>>It uses the code:

>>

>>void __fastcall TForm1::RVPrint1PagePrepaint(TRVPrint *Sender, int PageNo,

>>    TCanvas *Canvas, bool Preview, TRect &PageRect, TRect &PrintAreaRect)

>>{

>>

>>  AnsiString s = Format ("-- Page %d of %d --", ARRAYOFCONST((PageNo,

>>Sender->PagesCount)));

>>  Canvas->Brush->Style = bsClear;

>>  Canvas->Font->Assign(RVStyle1->TextStyles->Items[0]);

>>  int w = Canvas->TextWidth(s);

>>  int h = Canvas->TextHeight(s);

>>  TextOut(Canvas->Handle, (PrintAreaRect.Right+PrintAreaRect.Left-w) / 2,

>>          PrintAreaRect.Top - h - 10, s.c_str(), s.Length());

>>}

>>

>>And it is printed on all pages

>>

>>

>

>

>





Powered by ABC Amber Outlook Express Converter