Page 1 of 1

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

Posted: Tue Jun 07, 2011 4:03 pm
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;

Posted: Tue Jun 07, 2011 6:10 pm
by Sergey Tkachenko
Can you create a simple project reproducing this problem and send it to me to richviewgmailcom?

I want to make an additional remark for my problem

Posted: Wed Jun 08, 2011 1:13 am
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

Posted: Wed Jun 08, 2011 11:02 pm
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.

It works. Thank you very much, Splinter

Posted: Thu Jun 09, 2011 1:26 am
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.

Posted: Thu Jun 09, 2011 6:16 pm
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.

Posted: Fri Jun 10, 2011 1:18 am
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.