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

Home Posts Topics Members FAQ

PrintPreview is very slow and finally Preview-Sheets are empty,...

Hi,

i use the code from this code sample on MSDN:
for printing a 5 and sometimes 70 page text-only
data: http://msdn.microsoft.com/en-us/library/ms404294.aspx

The point is, that this is terribly slow and the preview is
unbelievable slow, especially when you have a 70 page
data you want to print. I use a PDF generator to print the
data, at first for testing. Not the printig is slow, but the
generation of the preview sheets and the generation of the
sheets if you directly wnat to send the data to the printer.
I get the dialog box where it tells you that it is preparing the
pages and then you can go shopping, go jogging, swimming,
etc, and if you are back, it is approx. 50% finished. I found
out that the longer your string is you want to print, the longer
it takes to prepare every single page either for printing or
for creating the preview pages. If i have 5 pages it goes fast,
since the string from where it is created is not that long and
if i have string that covers 70+ pages it needs a lifetime to
print them and/or prepare the previews. Is there any way to
improve this. The example seems to be really a "simple"
example, just to show how it can be done. One point is,
that the preview does not show anything on the pages if they
are over 40+ pages long, but if i hit the print button, i get
all data output on the target printer, but the preview does
not show anything. Why?

Two Questions:

1. How can i improve the printing and
preview performance. Even i got a very fast system
it needs really up to 3 minutes to generate the previews
or send the "generated" stuff to the printer.

2. Why does the preview sheets dont show any data?
(on all sheet, but the sheets count is right) and why do i
get all i want out to my printer, though i cant see anything
on my previews?

This is a very unclear situation for me, since i am not
really experinced on .NET printing technologies. I used
to use 3rd-party components until today,...

OS is Windows XP SP3, .NET is 2.0 up2date.

Any help is really appreciated,...

Regards

Kerem

--
-----------------------
Beste Grüsse / Best regards / Votre bien devoue
Kerem Gümrükcü
Microsoft Live Space: http://kerem-g.spaces.live.com/
Latest Open-Source Projects: http://entwicklung.junetz.de
-----------------------
"This reply is provided as is, without warranty express or implied."
Sep 3 '08 #1
0 1448

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

Similar topics

5
2149
by: Mr. B | last post by:
This is driving me NUTZ!!! I've been screwing around on this for a week now. And I have tried to find examples similar to what I have (nada). Got lots of streaming a TXT file... bah! I am really stuck here (probably the ol' Not seeing the tree cause of the forest thingy). But I just can not get this to work. The following is my Test example code. Just needs a Button1 on a blank Form. Add in PrintDocument1, PrintPreviewDialog1,...
0
1153
by: sachin | last post by:
When we view any document in print preview dialog, where does it save the document? such that when me move to next/previous page where it reads the information from . If a heavy document like RTF file having images and large number of pages is viewed in PrintPreview, does it affects the system speed? What happens at application level please guid regard
1
4350
by: Sachin | last post by:
I have a customized Print Preview dialog made of a Print Preview control. When I increase to zoom property, the document inside it gets enlarged and two scroll bars appear. But when I scroll down with Vertical scroll bar, it doesn't go till the bottom and bounce back upword. Thus unless I resize(enlarge) the Dialog it self it doesn't show the bottom of the document. What is the reason for such behavior? Please guide -- sachin
0
842
by: jr | last post by:
Hi, When i use a printPreview it's not the same as the real printout I have a differents in e.Graphics.VisibleClipBounds.Width in the printout the value is 778.67 and in the preview 1398101. Why is the preview 1795 times bigger Jan
2
1354
by: Nandini | last post by:
Hello Everybody, Can anyone please tell me how to get the printpreview in ASP.NET, just like as in yahoo calendar, I want to show a preview for the particular page. so please help me regarding this. Regards, Nandini.
11
2353
by: Adam Right | last post by:
Hi, I am using .Net Framework 2.0 final, and i use .Net printing library to print a document. I use printPreview dialog to print the document but after preview was shown, when i press the "print" button, i cannot print the document although there is some words on the preview. So, is there a bug in the preview? Thanks...
9
3804
by: Adam Right | last post by:
Hi, I am using .Net Framework 2.0 final, and i use .Net printing library to print a document. I use printPreview dialog to print the document but after preview was shown, when i press the "print" button, i cannot print the document although there is some words on the preview. So, is there a bug in the preview? Thanks...
0
998
by: james | last post by:
While trying to help another programmer on MSDN's Visual Basic 2005 Express Edition forum, he (and I ) ran into a strange problem with the PrintPreview Control in VB2005. If you load a document ( text file in this case) that has more than 12 pages ( I tried with a 50 page document too), instead of being able to see all 12+ pages in the Preview Window, all you see are Blank Pages!! But, preview a document with less than that, it will show...
0
1221
by: Lars | last post by:
I am using Microsoft .NET (2.0) PrintPreviewDialog and all works well when the Windows default printer is set to a local printer or a network printer on a Windows server, but if I set it to a Samba network printer, it slows down to a crawl. With a Windows server network printer, it takes about 10 seconds to render 100 pages. With a Samba network printer, it takes over 5 minutes! I can see that the preview control is generating
6
1469
by: Stuart Nathan | last post by:
Can someone tell me how to remove a previously loaded PrintDocument in a PrintPreview control, so that I can display a nedw one?
0
8003
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
8498
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
8478
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
8152
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
6817
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...
0
3962
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...
1
2474
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
1
1598
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1331
bsmnconsultancy
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.