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

Home Posts Topics Members FAQ

Printing from Print Preview on HP DeskJet Problems

Siv
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 stumped.

In the code I just do the following:

Dim prDialog As New PrintDialog, prvDialog As New PrintPreviewDia log,
margins As New System.Drawing. Printing.Margin s

Dim PgSettings As New PageSetupDialog

MyDoc.DocumentN ame = "Quotation"

MyDoc.OriginAtM argins = False

MyDoc.DefaultPa geSettings.Land scape = False

prDialog.Docume nt = MyDoc

prDialog.AllowS omePages = True

If IsNothing(PgSet tings.PageSetti ngs) Then

'User doesn't look to have changed the settings so set defaults

MyDoc.DefaultPa geSettings.Marg ins.Bottom = 55 'allow for inkjets (100ths
of inch)

MyDoc.DefaultPa geSettings.Marg ins.Left = 50

MyDoc.DefaultPa geSettings.Marg ins.Right = 50

MyDoc.DefaultPa geSettings.Marg ins.Top = 50

Else

prDialog.Printe rSettings = PgSettings.Prin terSettings

End If

prDialog.ShowDi alog()

prDialog.Printe rSettings.Defau ltPageSettings. Landscape = False 'Don't allow
user to set landscape

AddHandler MyDoc.PrintPage , AddressOf Me.PagePrintFun ction

If PrintPreview Then

prvDialog.Docum ent = MyDoc

prvDialog.Windo wState = FormWindowState .Maximized

prvDialog.ShowD ialog()

Else

MyDoc.Print()

End If

'Tidy Up

MyDoc.Dispose()

prDialog.Dispos e()

prvDialog.Dispo se()
--
Siv
Martley, Near Worcester, UK.
Nov 21 '05 #1
0 1096

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

Similar topics

0
1233
by: Phil Galey | last post by:
I have a VB.NET application running on Windows 2000 Pro. I have a DeskJet 5550 printer, with the Windows default setup specifying to print in grayscale. From a 3rd-Party DLL called QuickPDF, I specified monochrome and print the document. It ignores the monochrome flag and prints in color, so I figured QuickPDF needs to go back to the drawing board. But then I tried transferring the document into a MemoryStream and printing it using...
4
6467
by: Suzanka | last post by:
Hello, I have an application written in C# on visual studio .NET. It is a web aplication. The application consists of many different forms, that users occassionaly want to print out for filing. When they log to application (through web browser) and choose the print option, on the right margin few cm get cut off (so some fields do not print out). Is there any function that ensure that when user pritns he gets the
4
1895
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 printPreview and (what is it) PrinDocument working. All of the references I've found (to include several books) show that method of printing ... my question - is it not possible to print the document 'on the fly' to allow proper paging, page...
0
1377
by: Phil Galey | last post by:
I'm printing to a DeskJet 5550 printer. From WordPerfect, if I have a color document and I specify grayscale in the printer properties dialog, it prints in grayscale as expected. However, from a VB.NET application, I don't seem to be able to get it to print in black and white / grayscale. It always prints in color. I have a 3rd party DLL called QuickPDF which works with PDF documents. It enables you to specify monochrome or color as...
1
5704
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 of a Microsoft book, "Visual Basic,Net Step by Step" in Chapter 18. All but the bottom two subroutines will open a text file, and then allow me to use the above controls, example 1. The bottom two subroutines will print a graphic file, example...
0
1467
by: Andy | last post by:
Hi, I'm trying to print in my Win forms application. The goal is to have a pre-printed form loaded into one of the printers in invoicing, and the user can tell the application to print the serial number, which print some text that will 'fill in' some of the empty form fields. The problem is that on one of the older laser jets prints things in the wrong spots. Oddly, the 4th line prints on the forms pre-defined blank spaces fine, but...
8
5887
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 clients (Internet Explorer). My flash content was originally brought in via the “flash satay” method, but I have since used some server-side magic do deliver one <objecttag
2
9962
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 printer settings to print. I wanted the print preview to appear the same for all users (i.e. a default page size of 8.5x14 (legal) and portrait mode). Many users have different printers as their default (plotters etc..) and I found that various...
3
1384
by: auctionmama | last post by:
Hi - My mom recently took the plunge away from AOL and starting using Internet Explorer. I uninstalled AOL and all of its componets, including Incredimail. She has IE 7, Windows XP (with auto updates ON, so I assume SP2), and an HP Deskjet 5150 printer. The problem is now when we try to save or print anything off the internet, we get the HTML source code instead of the text or graphic on the page. Text documents created with notepad print...
0
8427
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8332
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,...
0
8851
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
8746
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 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...
1
8525
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,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
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 projectplanning, coding, testing, and deploymentwithout 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...
0
5649
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();...
1
2750
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

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.