473,468 Members | 1,358 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Finding the Printable area

Hi,

Our app likes to print data-rich output that fills the page width of the
printer. Unfortunately, we've found that the printable area of each printer
is a little different, making it a bit of a guess to set the left/right
print margins which seem additive to the printable area start. I don't
believe that .Net directly supports providing the printable area but I seem
to remember someone, > 1 year ago, posting some C code to find the printable
area. Any ideas? Or did I miss something in .Net?

Thanks, Steve
Nov 20 '05 #1
1 2475
Hi,

In the printdocument printpage event take a look at
e.pagesettings.bounds and e.pagesettings.margins.

Ken
-------------------
"Steve Podradchik" <St*************@hotmail.com> wrote in message
news:u2**************@TK2MSFTNGP09.phx.gbl...
Hi,

Our app likes to print data-rich output that fills the page width of the
printer. Unfortunately, we've found that the printable area of each printer is a little different, making it a bit of a guess to set the left/right
print margins which seem additive to the printable area start. I don't
believe that .Net directly supports providing the printable area but I seem to remember someone, > 1 year ago, posting some C code to find the printable area. Any ideas? Or did I miss something in .Net?

Thanks, Steve

Nov 20 '05 #2

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

Similar topics

3
by: Pascal | last post by:
Hello, What's the best way to delete or replace no-printable characters in a string. i.e.: "\x08toto\x00titi" -> "tototiti" or " toto titi"
2
by: Daniel Alexandre | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi there, I'm using the following method in my program to check whether a message received is printable or not and to strip the non-printable...
5
by: Robert Manea | last post by:
Hello everyone, I wrote, simply as an exercise, a small piece of code to find 'strings' (defined as an amount of at least 3 ASCII characters followed by a non ASCII character) in binary files. ...
5
by: moondaddy | last post by:
I'm going to use an aspx page to display an invoice that customers can print from. Sometimes when I go to a site and navigate to a page I want to print, they will have a button that says something...
1
by: Steve Podradchik | last post by:
Hi, Our app likes to print data-rich output that fills the page width of the printer. Unfortunately, we've found that the printable area of each printer is a little different, making it a bit...
2
by: Lighting_dragon | last post by:
Hi. I try to get the printable area of the printer (Margins). I have used Defaultpagesettings.Printersettings.Margins.Top, .Left, .... But it didn't give the true values. Posted Via...
1
by: Troy | last post by:
I'm using a print document object in a preview control and/or to send to a printer. The printer seems to have a 'non-printable' area thats 1/8" from the top/bottom and 1/4" left/right. Is there a...
7
by: active | last post by:
I want to remove all non-printable characters - including nulls. I could extend the following by adding as many printable characters as I can think of. But I wonder if there isn't something...
4
by: Abhay | last post by:
private void pd_PrintPage(object sender, PrintPageEventArgs e) { RectangleF objR = new RectangleF(); PrintDocument pd = (PrintDocument)sender; float fT, fB, fL, fR; //GET THE BEST POSSIBLE...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.