473,320 Members | 2,104 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,320 software developers and data experts.

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 PrintPreviewDialog,
margins As New System.Drawing.Printing.Margins

Dim PgSettings As New PageSetupDialog

MyDoc.DocumentName = "Quotation"

MyDoc.OriginAtMargins = False

MyDoc.DefaultPageSettings.Landscape = False

prDialog.Document = MyDoc

prDialog.AllowSomePages = True

If IsNothing(PgSettings.PageSettings) Then

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

MyDoc.DefaultPageSettings.Margins.Bottom = 55 'allow for inkjets (100ths
of inch)

MyDoc.DefaultPageSettings.Margins.Left = 50

MyDoc.DefaultPageSettings.Margins.Right = 50

MyDoc.DefaultPageSettings.Margins.Top = 50

Else

prDialog.PrinterSettings = PgSettings.PrinterSettings

End If

prDialog.ShowDialog()

prDialog.PrinterSettings.DefaultPageSettings.Lands cape = False 'Don't allow
user to set landscape

AddHandler MyDoc.PrintPage, AddressOf Me.PagePrintFunction

If PrintPreview Then

prvDialog.Document = MyDoc

prvDialog.WindowState = FormWindowState.Maximized

prvDialog.ShowDialog()

Else

MyDoc.Print()

End If

'Tidy Up

MyDoc.Dispose()

prDialog.Dispose()

prvDialog.Dispose()
--
Siv
Martley, Near Worcester, UK.
Nov 21 '05 #1
0 1078

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

Similar topics

0
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...
4
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....
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...
0
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...
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...
0
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...
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...
3
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...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.