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

Home Posts Topics Members FAQ

Why is there a differnce between Print Preview and Print to printe

Hello,

I've created a Document which i want to print using the PrintDocument class.
In the document i draw some strings, and lines. When I PrintPreviewing my
document (using the PrintPreview class) everything is ok, excatly as i draw
it. but when i'm sending it to the printer, some of the strings and lines are
setping out of the page's border. Why is that? doesn't print preview suppose
to preview the exact printing? is it fixable?

Thanks,
Gidi
Dec 11 '05 #1
2 2006
Gidi,

Well, ultimately, no, it won't. Ideally, yes, it would be, but in the
end, you are "printing" on two different mediums, with different
resolutions, different capabilities. This is why there is probably a bit of
overhead.

Are you checking the bounds of the page in the print preview? You
should scale appropriately and then print the preview that way.

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

"Gidi" <sh*****@hotmai l.com.dontspam> wrote in message
news:8E******** *************** ***********@mic rosoft.com...
Hello,

I've created a Document which i want to print using the PrintDocument
class.
In the document i draw some strings, and lines. When I PrintPreviewing my
document (using the PrintPreview class) everything is ok, excatly as i
draw
it. but when i'm sending it to the printer, some of the strings and lines
are
setping out of the page's border. Why is that? doesn't print preview
suppose
to preview the exact printing? is it fixable?

Thanks,
Gidi

Dec 11 '05 #2
As Nicholas pointed out, every target device that you print to has
slightly different qualities. This means that if you print the same
thing to multiple printers, or to print preview and then to some
printers, it's quite possible that the output will vary slightly.

The only away around this that I've ever heard of came from the guys at
Business Objects (aka Crystal) who revealed to me why their Crystal.NET
product (and, I assume, their other versions) does such weird and
annoying things with the printer's DEVMODE structure: it grabs all of
the attributes from the printer you indicate when you're designing the
report, and then attempts to set exactly those attributes (exactly that
DEVMODE contents) on the final output printer. Of course, if the
printer on which you designed the form and the final output printer are
different models (or, God forbid, different brands), the result can be
bizarre behaviour indeed.

I asked them why they did weird crap like that, when it causes us
nothing but grief, and they claimed that it was because they wanted to
guarantee that the designed report would be identical to the final
output. In effect, they wanted to get around the effect that you saw.
Unfortunately, their solution introduces all sorts of limitations,
including practically requiring you to design your report on the same
brand and model of printer as you're going to use in production
(assuming that all of your production printers are the same, or that
you even know what the production printer will be).

In other words, it appears that the alternative to slight differences
between what you see and what you get can be even worse than the
problem itself.

Dec 12 '05 #3

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

Similar topics

16
11441
by: Neo Geshel | last post by:
I'm helping on a web site, and it's got our knickers in a knot. We're using the same basic CSS files (with mods) and same headers as from our other sites, but the "print preview" won't work correctly on this site. The site is here: http://askdrray.kabis.net (temporary location) The site is being worked on, and only the front page works right now. Expect constant changes. Ignore everything “below the fold”, as the links there...
7
14382
by: Pat | last post by:
I would like to send the Print Preview of a MS Access form to a Snapshot file. The form contains an OLE graph. BACKGROUND A snapshot of a report is possible. If I could I would use a report to display the graph but it is not possible to send query parameters to an OLE graph on a report (or programatically change any properties of an OLE Graph). However with a Form you do have the ability to change the RowSource of
0
2251
by: Malcolm Cook | last post by:
I've discovered: Using "File > Print Preview" in a form's datasheet view with a server Filter crashes access after previewing... ....that is, unless ServerFilterByForm has been turned off after applying the filter. See the steps to recreate bug below for details.
0
2029
by: John | last post by:
I have a class that creates an AxWebBrowser object in the background, loads some arbitrary html content, then shows the user a print preview. The only problem is, this print preview is a tiny little window on the top left hand corner of the screen. Thinking that this may have something to do with the Print Preview dialog not being able to detect from it's caller's size so that it can set its own size equal to that of the caller, I...
2
14138
by: Dean Slindee | last post by:
Anybody written code in VB.NET to: 1) show a print preview window of reports already written and stored in an Access 2002 database; or 2) execute the print of a report stored in an Access 2002 database? Thanks, Dean Slindee
9
4081
by: igotyourdotnet | last post by:
I need to create a print preview page BUT my page I need to print has a grid and in the grid I have 2 or 3 columns that have links I want to hide the columns with the links on my print preview page so they don't print. Is that possible to do and if so can someone point me somewhere or show my a code snippet on how to do this?
2
22134
by: Brad Pears | last post by:
I have some sample code that uses the print dialog, print preview and a print direct options. If I select print preview and then click the printer icon from that, the document prints. If I select the print directly option, it also prints right away to the defauilt printer. However, if I use the printer dialog control to print and I click 'OK' to actually print the document - nothing happens. The job does not even go into the print...
7
3426
by: Fareast Adam | last post by:
I try to hide the print preview button that inside <div id="button"> when previewing the page. But the the problem happened the button is always hidden after i closing the preview page. Anyone have an idea how to overcome this? Here is the code; <html> <head> <script language="javascript"> function printpreview() { var OLECMDID = 7; /* OLECMDID values: * 6 - print
11
7344
by: Gord | last post by:
When I open a certain report, it runs some code that generates the records that will be displayed in that report. This works fine. When I go to print preview the report it appears that the code is run again? This is causing certain error problems. 1 Why does the code run for a print preview when the report already exists? 2 What command do I use in code to find out if a report (or any other object for that matter) is already...
0
9719
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
9599
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
10624
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
10111
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
6877
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();...
0
5546
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...
0
5684
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4330
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
2
3853
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.