Print Preview Margins
-
- Posts: 86
- Joined: Mon Jun 08, 2009 11:25 pm
Print Preview Margins
I am using the TSRVPreview (version 3). I cannot get the margins to display. I have tried setting the MarginsPen.Style to psDot at design time and at run time, and neither of the settings work.
Are there other settings that need to be set when moving from TRVPrintPreview to TSRVPreview?
Thanks,
Are there other settings that need to be set when moving from TRVPrintPreview to TSRVPreview?
Thanks,
I think that margins for your printer very small or are equal 0. What value return in PrnRect?
Unit: SRVPreview.pas
Procedure:
procedure TSRVPreview. DrawContents (Canvas:TCanvas; const R: TRect);
Line:
with SRVPrint. SRVPrtInfo do
PrnRect: = Bounds (Round (MarginPixelsX * ScaleX),
Round (MarginPixelsY * ScaleY),
Round (PageResolutionX * ScaleX),
Round (PageResolutionY * ScaleY));
Unit: SRVPreview.pas
Procedure:
procedure TSRVPreview. DrawContents (Canvas:TCanvas; const R: TRect);
Line:
with SRVPrint. SRVPrtInfo do
PrnRect: = Bounds (Round (MarginPixelsX * ScaleX),
Round (MarginPixelsY * ScaleY),
Round (PageResolutionX * ScaleX),
Round (PageResolutionY * ScaleY));
-
- Posts: 86
- Joined: Mon Jun 08, 2009 11:25 pm
Sorry for the delay, got busy elsewhere.
I think there is some confusion. I am trying to use the existing TSRVPreview control to display a page and show the margin positions (lines) on the page. I have set the style on the control to show margin lines in the drawing (psDot of Style in MarginsPen). The page is displayed correctly with the appropriate margin space on all sides of the page. However, I do not get any lines indicating the position of the margins on the page.
Any other ideas?
Thanks,
I think there is some confusion. I am trying to use the existing TSRVPreview control to display a page and show the margin positions (lines) on the page. I have set the style on the control to show margin lines in the drawing (psDot of Style in MarginsPen). The page is displayed correctly with the appropriate margin space on all sides of the page. However, I do not get any lines indicating the position of the margins on the page.
Any other ideas?
Thanks,
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
-
- Posts: 86
- Joined: Mon Jun 08, 2009 11:25 pm
I have updated to the latest software and I now get a rectangle (dotted) displayed for the margins. However, the margins are set for A4 paper and not letter. I am using the TSRVPrint and TSRVPreview components.
If I set the PageFormat attribute to srvfmLetter, the change is made. However, when I set SRVPreview->PageNo, the processing changes the PageFormat back to srvfmCustom and I do not get the correct margins displayed (dotted rectangle).
How should I be going about this to display Letter size margins in the SRVPreview component?
If I set the PageFormat attribute to srvfmLetter, the change is made. However, when I set SRVPreview->PageNo, the processing changes the PageFormat back to srvfmCustom and I do not get the correct margins displayed (dotted rectangle).
How should I be going about this to display Letter size margins in the SRVPreview component?
-
- Posts: 86
- Joined: Mon Jun 08, 2009 11:25 pm
I have tried what you suggest. I changed PrintMode to srvpStretchToFit. I now get a proportionally correct rectangle for the paper type.
However, the rectangle is not sized properly, it is too small. The displayed rectangle is inside the text area of the page. It looks like the margins are 10% larger than they should be.
I will send an e-mail to Sergey with a screen shot of what I am seeing.
However, the rectangle is not sized properly, it is too small. The displayed rectangle is inside the text area of the page. It looks like the margins are 10% larger than they should be.
I will send an e-mail to Sergey with a screen shot of what I am seeing.
-
- Site Admin
- Posts: 17522
- Joined: Sat Aug 27, 2005 10:28 am
- Contact: