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

Home Posts Topics Members FAQ

printing problem with PrintPreviewDia log


i have a problem with the PrintPreviewDia log, if i want to
print out my document with the button in the preview
dialog, the output on the printer is empty, but on the
preview I can see it. If there is not more than one page
it seems to work. Printing out without preview works

Could anybody please help me!?
Nov 15 '05 #1
1 1959

What is the code that you are using in the event handler for the
PrintPage event? It could be that you have special code that is not setting
itself correctly for each new page being printed. My guess is that you have
initialization code in the constructor which really should be called when
the first page of the document is printed.

Hope this helps.
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"georg" <an*******@disc ussions.microso ft.com> wrote in message
news:01******** *************** *****@phx.gbl.. .

i have a problem with the PrintPreviewDia log, if i want to
print out my document with the button in the preview
dialog, the output on the printer is empty, but on the
preview I can see it. If there is not more than one page
it seems to work. Printing out without preview works

Could anybody please help me!?

Nov 15 '05 #2

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

Similar topics

by: Pkant | last post by:
I want to Print a txt file with this code : class Printing { PrintDocument prndoc = new PrintDocument(); PrintPreviewDialog ppd = new PrintPreviewDialog();
by: Randy | last post by:
Hello all, I'm trying to print using PrintPreviewDialog. What's happening is that the PrintPreviewDialog shows the correct information to be printed, but when I click the print icon, it prints a blank page. If I comment out the printPreviewDialog1.ShowDialog(); and just do a printDocument1.Print(); instead, it prints all the pages like a champ. Anyone know what I'm doing wrong? Thanks
by: pplppp | last post by:
I have a segment of very simple code, which basically initializes a PrintPreviewDialog, a PrintDialog and a PrintDocument. Then I implement the PrintPage event Handler for the PrintDocument. What I do is just draw a string using the graphics object in the eventargs. But my problem is, when I open the PrintPreviewDialog, how come it takes like 2 secs to draw the print preview.. even when it only contains a string. did I do anything wrong? ...
by: mphanke | last post by:
Hi, I'm desperately trying to print a string on top of an image, but for whatever reason the images allways stays on top of my canvas! Is there some trick how to implement things? I call ev.graphics.drawimage(img, rect); ev.graphics.drawstring("mystring", ..., rect, ...);
by: James Proctor | last post by:
Hi there Ive got a class which i use for alot of data storage in my program and id like to add a print routine to this class so that i can print out a formatted version of all the data. I just cant seem to work out how to create a document in the class and then link the preview and print dialogs to it. Does anyone have any tips or know of tutorials which show how to do this with out placing controls on a form. Hope someone can help out ...
by: randy1200 | last post by:
I'm using Visual Studio 2005 and C#. I need to print a WinForm used for data entry as a graphic. In other words, I need to print the exact WinForm the user sees on the screen. I searched through the newsgroups, and found the code below. This seems reasonable, except for the fact that the author does not provide his SetSeq_Library. This is needed to load the Bitmap variable _ActiveFormImage. Any suggestions on how to capture a WinForm...
by: sachin | last post by:
Hi I am working on report using print preview dialog control in windows application. Report is displayed properly in control. With paper size 850X1350 (Legal)(Lanscape mode=true) . But when page goes to printer for printing. It consider it as A4 size. and truncate printing document. any body help me...
by: Davy | last post by:
Hi, i'm writing a .Net application for printing barcodes to my climbing club. For simplicity reasons, i've embedded my barcode font as a ressource file. When loading my font as a private font i am able to use it in labels, textboxes, etc... but not in printing controls, like printpreviewdialog Could you please help me ?
by: giddy | last post by:
hi , After reading a fw articles , i made this printEngine class that derives from PrintDocument. The print engine takes any class that exposes the IPrintableDocument interface. This interface defines a method that supplies a PrintablePage to the exposing class which should fill the page with classes that expose IPrintableSection. Its not very complicated but it does have a few flaws. Like although it _can_ handle pagination , it...
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: 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: 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...
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...
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();...
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: 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: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.