473,396 Members | 1,799 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Printing Document using print preview control...

Hi

I am working on report using print preview dialog control in
windows application. Report is displayed properly in control. With
paper size 850X1350 (Legal)(Lanscape mode=true) .

But when page goes to printer for printing. It consider it as A4 size.
and truncate printing document.

any body help me...

Aug 4 '06 #1
4 16287
Did you set the Document in the PrintPreviewDialog? The PrintDocument has
the PrinterSettings and PageSettings that are used by the
PrintPreviewControl.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Who is Mighty Abbott? A twin-turret scalawag.

"sachin" <sa************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi

I am working on report using print preview dialog control in
windows application. Report is displayed properly in control. With
paper size 850X1350 (Legal)(Lanscape mode=true) .

But when page goes to printer for printing. It consider it as A4 size.
and truncate printing document.

any body help me...

Aug 4 '06 #2
Hi kevin,
the code that i am using as follows
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Landscape=true;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Left=25;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Right
=50;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Top
=20;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Bottom=25;

Kevin Spencer wrote:
Did you set the Document in the PrintPreviewDialog? The PrintDocument has
the PrinterSettings and PageSettings that are used by the
PrintPreviewControl.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Who is Mighty Abbott? A twin-turret scalawag.

"sachin" <sa************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi

I am working on report using print preview dialog control in
windows application. Report is displayed properly in control. With
paper size 850X1350 (Legal)(Lanscape mode=true) .

But when page goes to printer for printing. It consider it as A4 size.
and truncate printing document.

any body help me...
Aug 4 '06 #3
hi kevin,

the same think I did for A4 size reports it works
fine...and gives good printouts ..

my problem is report is of size 850 X 1350 (Landscape) .. report is
showing in printpreview dialog control. But when i forwarded to printer
to print it truncats the printing text horizontaly...so any solution on
this..
sachin wrote:
Hi kevin,
the code that i am using as follows
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Landscape=true;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Left=25;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Right
=50;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Top
=20;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Bottom=25;

Kevin Spencer wrote:
Did you set the Document in the PrintPreviewDialog? The PrintDocument has
the PrinterSettings and PageSettings that are used by the
PrintPreviewControl.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Who is Mighty Abbott? A twin-turret scalawag.

"sachin" <sa************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Hi
>
I am working on report using print preview dialog control in
windows application. Report is displayed properly in control. With
paper size 850X1350 (Legal)(Lanscape mode=true) .
>
But when page goes to printer for printing. It consider it as A4 size.
and truncate printing document.
>
any body help me...
>
Aug 4 '06 #4
Hi sachin,

What I asked was, did you set the Document property of the
PrintPreviewDialog instance you're using to the PrintDocument that you
defined below? The PrintPreviewDialog class has a Document property that
determines where it gets its PageSettings and PrinterSettings from. If you
do not set it, it will use default PageSettings and PrinterSettings, rather
than the same PageSettings and PrinterSettings that you have configured for
your PrintDocument.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Who is Mighty Abbott? A twin-turret scalawag.

"sachin" <sa************@gmail.comwrote in message
news:11**********************@75g2000cwc.googlegro ups.com...
Hi kevin,
the code that i am using as follows
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Landscape=true;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Left=25;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Right
=50;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Top
=20;
printDocument.DefaultPageSettings.PrinterSettings. DefaultPageSettings.Margins.Bottom=25;

Kevin Spencer wrote:
>Did you set the Document in the PrintPreviewDialog? The PrintDocument has
the PrinterSettings and PageSettings that are used by the
PrintPreviewControl.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Who is Mighty Abbott? A twin-turret scalawag.

"sachin" <sa************@gmail.comwrote in message
news:11**********************@m73g2000cwd.googleg roups.com...
Hi

I am working on report using print preview dialog control in
windows application. Report is displayed properly in control. With
paper size 850X1350 (Legal)(Lanscape mode=true) .

But when page goes to printer for printing. It consider it as A4 size.
and truncate printing document.

any body help me...

Aug 4 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tinus | last post by:
Hello all, Because you have been so helpfull the last couple of times, I thought after testing and wasting more than 20 pages (and google-ling for 3 days :-( ). I would ask you again for your...
2
by: ACaunter | last post by:
Hi all, i was wondering if there was a way to directly print a document to the user's printer, without having to download it first... I needed something like a button, and when the user clicks the...
4
by: Al Jones | last post by:
Well, hopefully that title get someones attention. In this old gwbasic program I've converted I *have* sucessuflly converted it to print to a file and the output is acceptable. From there I have...
1
by: hamil | last post by:
I am trying to print a graphic file (tif) and also use the PrintPreview control, the PageSetup control, and the Print dialog control. The code attached is a concatination of two examples taken out...
6
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if...
2
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I...
8
by: Neo Geshel | last post by:
Greetings. BACKGROUND: My sites are pure XHTML 1.1 with CSS 2.1 for markup. My pages are delivered as application/xhtml+xml for all non-MS web clients, and as text/xml for all MS web...
2
by: Brad Pears | last post by:
I have a vb.net 2005 application and am using the print preview screen. This screen has a printer icon on it that the user can use to print the document currently being viewed. It uses the default...
2
by: deepakfordotnet | last post by:
Hi, First of all let me confess that I could not get the solution to the same problem from an earlier post Printing :by Mr.Richard MSL (dated September 24th 2006) working. (Replied by Mr.Walter...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.