table's line can't be print normally using RVPrint

General TRichView support forum. Please post your questions here
Post Reply
david8604
Posts: 4
Joined: Tue Jun 07, 2011 3:39 pm

table's line can't be print normally using RVPrint

Post by david8604 »

When I try print a table in a RichViewEdit using RVPrint, I got a problem, that is, The table lines are not able to be printed normally, It looks like zoomed three times than normal size. Surprisingly, when I try to print again, it works, everything is okay. So I am a little bit insane for that. Because I cannot tell clients that if you want to print a shipping order, you should print it twice, throw the first one and get the second. Help me.
I will thank u inwards.
2011-06-07

here is my code:

RVPrint1.AssignSource(RichViewEdit1);
RVPrint1.FormatPages(rvdoALL);
//ТФЙПБЅѕд±ШРлРґіц,·сФт,І»µг»ч"ґтУЎФ¤АА"¶шЦ±ЅУµг»ч"ґтУЎ"К±
//ѕНОЮ·ЁµГµЅRVPrint1.PagesCountЦµ,ѕНОЮ·ЁПФКѕґтУЎ¶Ф»°їт

PrintDialog1.MinPage:=1;
PrintDialog1.MaxPage:=RVPrint1.PagesCount;
PrintDialog1.FromPage:=1;
PrintDialog1.ToPage:=RVPrint1.PagesCount;
//ґтУЎІї·Ц»тИ«ІїОДµµ

if PrintDialog1.Execute then
begin
case PrintDialog1.PrintRange of
prAllPages:
RVPrint1.Print('µчІ¦µҐґтУЎ',PrintDialog1.Copies,PrintDialog1.Collate);
prPageNums:
RVPrint1.PrintPages(PrintDialog1.FromPage ,PrintDialog1.ToPage,
'µчІ¦µҐґтУЎ',PrintDialog1.Copies,PrintDialog1.Collate);
end;
end;
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Can you create a simple project reproducing this problem and send it to me to richviewgmailcom?
david8604
Posts: 4
Joined: Tue Jun 07, 2011 3:39 pm

I want to make an additional remark for my problem

Post by david8604 »

Firstly, everything is okay whether the first or the second printing, when I use plain printer such as HP laserjet 1020. But when I use stylus printer such as EPSON1600KIIIH, the words size is normal while the table's lines are not able to be printed normally. Secondly, I found that at the first print the table, there is just a little part printed. And I test print using network shared printer that is you connect other printer host to print things.
thanks a lot for Sergey Tkachenko's reply.
And hopefully I will get your reply again.
2011-06-08 09:05
Splinter
Posts: 41
Joined: Mon Aug 29, 2005 6:08 pm

Post by Splinter »

Try this. In your code, add an additional call to 'RVPrint1.FormatPages(rvdoALL);' after the print dialog is executed, like this:
if PrintDialog1.Execute then
begin
RVPrint1.FormatPages(rvdoALL);
case PrintDialog1.PrintRange of
prAllPages:
RVPrint1.Print('µчІ¦µҐґтУЎ',PrintDialog1.Copies,PrintDialog1.Collate);
prPageNums:
RVPrint1.PrintPages(PrintDialog1.FromPage ,PrintDialog1.ToPage,
'µчІ¦µҐґтУЎ',PrintDialog1.Copies,PrintDialog1.Collate);
end;
Then the pages will be reformatted correctly if the printer is changed in the dialog.
david8604
Posts: 4
Joined: Tue Jun 07, 2011 3:39 pm

It works. Thank you very much, Splinter

Post by david8604 »

Thank you very much for your help, now it works, print everything is normal, really thank you very much once again.
Splinter wrote:Try this. In your code, add an additional call to 'RVPrint1.FormatPages(rvdoALL);' after the print dialog is executed, like this:
if PrintDialog1.Execute then
begin
RVPrint1.FormatPages(rvdoALL);
case PrintDialog1.PrintRange of
prAllPages:
RVPrint1.Print('µчІ¦µҐґтУЎ',PrintDialog1.Copies,PrintDialog1.Collate);
prPageNums:
RVPrint1.PrintPages(PrintDialog1.FromPage ,PrintDialog1.ToPage,
'µчІ¦µҐґтУЎ',PrintDialog1.Copies,PrintDialog1.Collate);
end;
Then the pages will be reformatted correctly if the printer is changed in the dialog.
Sergey Tkachenko
Site Admin
Posts: 17555
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

Yes, it is absolutely correct. If the user chooses another printer, or change paper format/orientation, or the printer dpi, etc., RVPrint must be reformatted by calling FormatPages.
david8604
Posts: 4
Joined: Tue Jun 07, 2011 3:39 pm

Post by david8604 »

Yeah, I just knew that. :oops: Thank you again. Hopefully that I would have opportunity to communicate with you in the future, especially about tech of richview.
Sergey Tkachenko wrote:Yes, it is absolutely correct. If the user chooses another printer, or change paper format/orientation, or the printer dpi, etc., RVPrint must be reformatted by calling FormatPages.
Post Reply