I use the PageSetUpDialog to set the margins on my HP Laser Jet 4 printer. I
set both margins to 1 with a paper size of 8.5 x 11 (Letter). When printing,
print starts as it should on the left margin but the right margin is 1/2 inch
off, i.e., 1/2 inch from the right side of the paper instead of 1 inch). Has
anyone else had this problem and if so, is there a reason it does this?
In code, the graphics in the PrintPage event has the correct marginbound
setting of 1 inch and the graphic size is correct as well.
--
Dennis in Houston 2 1870
"Dennis" <De****@discuss ions.microsoft. com> schrieb: I use the PageSetUpDialog to set the margins on my HP Laser Jet 4 printer. I set both margins to 1 with a paper size of 8.5 x 11 (Letter). When printing, print starts as it should on the left margin but the right margin is 1/2 inch off, i.e., 1/2 inch from the right side of the paper instead of 1 inch). Has anyone else had this problem and if so, is there a reason it does this?
I am curious what the code below returns for your printer:
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/>
I tried you code and got the following error:
An unhandled exception of type 'System.Invalid OperationExcept ion' occurred
in system.drawing. dll
Additional information: The object is currently in use elsewhere.
on the line in "GetPhysicalMar gins" on the line:
With m
.Left = CInt(ox * 100 / Graphics.DpiX) 'ERROR on thie LINE
Any idea what is wrong?
--
Dennis in Houston
"Herfried K. Wagner [MVP]" wrote: "Dennis" <De****@discuss ions.microsoft. com> schrieb:I use the PageSetUpDialog to set the margins on my HP Laser Jet 4 printer. I set both margins to 1 with a paper size of 8.5 x 11 (Letter). When printing, print starts as it should on the left margin but the right margin is 1/2 inch off, i.e., 1/2 inch from the right side of the paper instead of 1 inch). Has anyone else had this problem and if so, is there a reason it does this?
I am curious what the code below returns for your printer:
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/>
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Luis Serrano |
last post by:
Hi all,
I'm trying to generate labels to print in several different formats,
all of them with their own height,width and page margins. We've got
this done in MS Access 2000, using a designed report that fits with
each label type, and reads a table dinamically generated. But the
problem is page margins. Does Access store page margins and
information of that kind within de report? Is there any kind of
association between printer...
|
by: Matthew Belk |
last post by:
I am trying to print some 2x6 labels on a SATO CL408e thermal label printer. The 2x6 labels are arranged in "landscape" mode with 2 labels per "sheet." When I attempt to print "x" copies of a 1 page label document, I get "x" formfeeds and "x" wasted labels.
Is there any way to manipulate the .NET printing engine to do a over-under 2-up landscape printing? I'm thinking no, but maybe there's a way. The printer has the ability to sense the...
|
by: Ned |
last post by:
I'm having difficulty printing on a 4"x3" labels . I set the left margin to
0 but it always prints starting from the middle of the label on the X-axis
(no matter what the margin settings are.) I should note that I was able to
view the label fine in the PrintPreviewDialog.
I checked similar posting but it didn't work for me. I have the following
code prior of calling the Print():
PaperSize CustomSize = new PaperSize("CustomSize", 400,...
|
by: greg7224 |
last post by:
I am currently working on a C# project that uses the Janus schedule
controls, and am having trouble getting it to print correctly in Day
view. The problem is that it will not print out the owners of the
appointments unless I set the ShowAllDayArea parameter to true. When I
do this, a large and unsightly grey box is drawn above the actual
schedule in day view, wasting space and making things look generally
ugly.
I am using the built in...
|
by: Siv |
last post by:
Hi,
I am working on a VB.NET application that uses the Print Preview. When I
call up the print preview and print from my laser printer the whole page
comes out no problem. When I do the same using my DeskJet 940c it only
prints the top left quarter of the document.
Has anyone seen this and know what I am missing, is there some command you
send to the printer to say, do the whole page not just the top left
quarter??
It's got me...
| |
by: scrawnyguns |
last post by:
There's probably something easy I'm missing here.
When I run a print operation in my program (Microsoft VB.Net Form) I
have some code that sets the print margins so that it leaves a nice
gap, however, these gaps do not work. No matter what I set the margins
to, the printer (HP Color Laserjet) always prints the same (top left
corner with about a 5mm gap).
Please Help.
|
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
|
by: jigsmshah |
last post by:
I need to print a text file .When i print it ,it is not printed exactly form 0,0 coordiante of the page. I mean the top most left corner.It is leaving some margin from top and from left.The code is an example from MSDN.
I am using c# 2.0 and VS 2005.I have just chaged the X coordinate for the DrawString function.i am using it as 0 and the Y coordinate is calculated.
This is just a test application, as i have to take the printing logic futher...
|
by: thirunavukarasukm |
last post by:
Hai....
To print Html page using PrintDialog and Print Document
i am created one windows appication..
the windows application have many pages
in my booking page i have two buttons one btnprint,btnclose
|
by: Mango |
last post by:
I'm trying to print some text in a very specific position on a page, so
that it will show through the window of an envelope when folded.
This is easy to do, as long as the browser's print margins are set to 0,
or I subtract the width of the margins from the position of the text.
My question is: is there a technique for detecting browser print
margins? It'd be nice not to have to warn users to set them to
something specific.
|
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...
| |
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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...
|
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...
| |
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |