473,699 Members | 2,813 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to Find Printer's Left Most Margin and Top Most Margin

Hi,

In VB 2005, I need to get the printer's left most and top most margin that a
selected printer can prit to on a piece of paper, so I can adjust the
PrintDocument classes to get as uniform as possible a printout no matter
which print driver is selected. How do I get (and then set) this information
in VB?

Thank you so much in advance,

Anne
Jul 6 '06 #1
2 1837
"Anne DeBlois" <an*********@co mmunity.nospams chrieb:
In VB 2005, I need to get the printer's left most and top most margin that
a selected printer can prit to on a piece of paper, so I can adjust the
PrintDocument classes to get as uniform as possible a printout no matter
which print driver is selected. How do I get (and then set) this
information in VB?
..NET 1.*, maybe there isn't a managed way in .NET 2.0 too:

Determining a printer's physical margins
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=getphysical printermargins& lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 6 '06 #2
Thanks, I'll check it out.

Anne

"Herfried K. Wagner [MVP]" <hi************ ***@gmx.ata écrit dans le
message de news: eg************* *@TK2MSFTNGP04. phx.gbl...
"Anne DeBlois" <an*********@co mmunity.nospams chrieb:
>In VB 2005, I need to get the printer's left most and top most margin
that a selected printer can prit to on a piece of paper, so I can adjust
the PrintDocument classes to get as uniform as possible a printout no
matter which print driver is selected. How do I get (and then set) this
information in VB?

.NET 1.*, maybe there isn't a managed way in .NET 2.0 too:

Determining a printer's physical margins
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=getphysical printermargins& lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Jul 6 '06 #3

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

Similar topics

1
4578
by: Paul White | last post by:
I've written a POS system for a client, but we're having problems with the customer receipt printing. The printer has a left margin gap of about 1 inch. I need to reduce that left margin width in order to prevent wrap-around. I have looked up the printer on the web and found a manual for it which describes the printer escape sequences to send to the printer to control the left margin, but I'm not sure how to go about it. The printer...
5
8687
by: thomas hygum | last post by:
How do I design the printers margins in css, so the user doesn't have to change the margins in print preview? So the site looks the same on the printer as on the screen.
1
1770
by: Alejandra Parra | last post by:
In my code, I print a dataSet ' get grid's PrintDocument object Dim pd As System.Drawing.Printing.PrintDocument pd = flexgrid.PrintParameters.PrintDocument() ' set up the page (landscape, 1.5" left margin) With pd.DefaultPageSettings ..Landscape = False ..Margins.Left = 50 Dim a As New Printing.PaperSize("Carta", 850, 1100)
0
1259
by: cnlai | last post by:
I used Panasonic printer KX P-1124 to preview 2 MS Access reports. In one preview, the left margin was adjusted (I supposed it was the unprintable region); the right margin remained what I set. In another preview, the left margin was adjusted as above; however the right margin was also adjusted (the unprintable right margin was set to 0). Is there any reason why ? Thanks
2
3000
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 Usenet.com Premium Usenet Newsgroup Services ---------------------------------------------------------- ** SPEED ** RETENTION ** COMPLETION ** ANONYMITY ** ----------------------------------------------------------
3
4014
by: Alejandra Parra | last post by:
In my code, I print a dataSet ' get grid's PrintDocument object Dim pd As System.Drawing.Printing.PrintDocument pd = flexgrid.PrintParameters.PrintDocument() ' set up the page (landscape, 1.5" left margin) With pd.DefaultPageSettings ..Landscape = False ..Margins.Left = 50 Dim a As New Printing.PaperSize("Carta", 850, 1100)
3
15026
by: Michael | last post by:
Hi, I'm trying to print barcodes to the Dymo LabelWriter printer. Put everytime I send a job to the label printer it just outputs an empty label. If I change the default printer back to the standard printer(HP LaserJet), it prints fine. Has anyone worked with Label printers like this. Here is the code I'm using: Private Sub cmdPrint_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdPrint.Click try Dim BarCode...
7
20713
by: Mark | last post by:
Hi, I am creating application in VB 2005. and when I print report it adds extra 0.45 cm margin on left and top, and the reason for this is physical margins of printer. Is it possible to change printer's physical margins using VB coding? Cheers -- Osmotion Blue
2
2070
by: everly | last post by:
Hi, I'm helping my friends band and making their MySpace. I messed something up and I can't figure out what it is. Everything is all out of whack on the bottom half of the page. The comments shouldn't be on the left hand side. Help please! Thanks. ____________________________________________________- <style type="text/css"> { Background Properties } table, tr, td { background-color:transparent; border:none; border-width:0;} body {...
0
8687
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9174
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
7751
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5875
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4376
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.