TPrintPreview problem with custom paper size

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

TPrintPreview problem with custom paper size

Postby monichen » May 7th, 2007, 11:33 am

Hello
Iam facing a problem with TPP
Using PrintPreview v4.60 & TPaperPreview v1.03,
OS - Windows 2000, Delphi 5.0
I have a custom paper size defined- width = 283.97mm & length = 186.94mm
If the paper size is 'letter' or A4 everything looks OK
But in the application if I dynamically change the the paper size to above custom size, output is distorted, fonts are diminished .
I have attached the output file, a ppv file for your reference
I will ll be so happy if somebody can help me.

Thank you!
Attachments
PrintPreview.ppv
ppv file that displays wrong output
(1.93 KiB) Downloaded 164 times
monichen
Member
Member
 
Posts: 2
Joined: April 19th, 2007, 11:17 am
Location: Bangalore, India

Postby Kambiz » May 7th, 2007, 1:43 pm

Sorry, but the attached file doesn't help.
Could you please post a sample code?
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby monichen » June 22nd, 2007, 5:46 am

Sorry for the late reply. Now I have a different question.
Can you please tell me how can I get default printer's paper size(a custom size) and pass it to the PrintPreview component.
Even if I hard code form name as in the following code, it re-calculates paper size with different height and width values
(I can see it in the SetPaperSize event)
Code: Select all
PrintPrevForm.PrintPreview.UsePrinterOptions := True
PrintPrevForm.PrintPreview.formName := 'CUST_SIZE';
PrintPrevForm.PrintPreview.PaperType := pCustom;
PrintPrevForm.PrintPreview.SetPrinterOptions;
Please help me
monichen
Member
Member
 
Posts: 2
Joined: April 19th, 2007, 11:17 am
Location: Bangalore, India

Postby Kambiz » June 22nd, 2007, 12:31 pm

You can call GetPrinterOptions to retrieve settings of the printer including its current form name and paper size of the selected custom paper.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 1 guest

cron