473,395 Members | 1,583 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,395 software developers and data experts.

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 1984
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.com

"Gidi" <sh*****@hotmail.com.dontspam> wrote in message
news:8E**********************************@microsof t.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
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...
7
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...
0
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...
0
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...
2
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...
9
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...
2
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...
7
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...
11
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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,...
0
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...

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.