|
-
March 30th, 1999, 03:39 AM
#1
Urgent Printing Help!!
Hello, Everyone.
I am currently working on a report printing module.
I have a long string to print in a user defined area by setting margins.
Everything looks Okay on preview which wraps the string when its length
go over the right margin. But when I print that string to a hardcopy, it does
what the preview does EXCEPT MORE CHARACTERS ARE PRINTED ON A LINE. I mean
it isn't WYSIWYG.
Somehow my printer outputs more characters on single line than what the
preview shows. I did look almost everywhere on Internet and bookstores for
some tips on print and preview , or should I say WYSIWYG printing. But
no one seems to have a problem that I have...
Did I miss something? I hope someone can help me on this.
Thank you in advance. 
Walter An.
-
March 30th, 1999, 07:08 AM
#2
Re: Urgent Printing Help!!
And that's just one reason not to use Doc-View.
Fonts are not scaled...
Patrick Frants
-
March 30th, 1999, 09:55 PM
#3
Re: Urgent Printing Help!!
Thank you for your reply, Pat.
Does that mean we have to implement our own preivew module
to be WYSIWYG?
Doesn't MFC support or emulate WYSIWYG by using its Doc-View class?
I don't quite understand what you mean by "Fonts are not scaled".
Can u explain a little more?
Here are what I have done.
I have created a font using "CreateFontIndrect" to be used in
preview and print.
I have used "GetTextExtentExPoint" function to retreive the
number characters that can be printed in a given width of area.
But in preview mode and print mode, this number returns two
different numbers which as you expected from my question, print
mode returns larger number ALTHOUGH THE GIVEN WIDTH IS SAME.
My mappping is MM_TEXT.
Any suggestion will be greatly appreciated?
Thank you again.
Walter An
-
March 31st, 1999, 03:48 AM
#4
Re: Urgent Printing Help!!
Doc-View scales points etc ok.
But when you create a 9pt font for example, it is 9 pt regardless of the
zooming factor of the print preview. And the 100% zoom is not the same as on
paper and as a result it looks differently. The trick is to be able to scale
fonts properly. So if you zoom in to 200% the font size needs to be 18pt instead
of 9pt. Doc-View does not do this for you.
Hope this clears things up.
Patrick
-
April 1st, 1999, 12:28 AM
#5
May be a suggestion
I don't know how you're implemeting it, but as a suggestion, it can be because of the difference between the screendc and printer dc attributes. So operate on printer dc attributes, irrespective of whether it is a print or a preview call,use (CWinapp I guess)GetPrinterDC function and use its attributes for the PreviewDC. Otherwise you may get the same problems with different printer drivers if not with the present one, because of different font scaling from driver to driver
-
April 13th, 1999, 03:13 PM
#6
Re: Urgent Printing Help!!
I'm having the same problem. If you find a way around, please let me know.
-
May 18th, 2000, 09:05 AM
#7
Re: Problem is with MM_TEXT
The problem is with MM_TEXT. It works off of pixels and depends on the resolution. A 300 DPI printer most closely mimics the output of the print preview. If you look at your printer resolution, try changing the resolution and printing it. You should see a major difference.
You want to use MM_LOENGLISH which corresponds to .01 inches regardless of the printer resolution. The problem with MM_LOENGLISH is it reverses the Y-AXIS and results in backwards calculations.
Look at the Scribble Tutorial under the Specify the Mapping Mode section.
Another possibility is that you are using something prior to Visual C++ 6.0 and are falling victim to a bug with print preview not honoring font width settings. See knowledge base article: Q173249
-
May 18th, 2000, 10:03 AM
#8
Re: Problem is with MM_TEXT
I would concur with this response. MM_LOENGLISH requires a bit more overhead to work with, but it pays big dividends in the long wrong. Screen and printer outputs not only match up well, but printer manufacturer to different printer manufacturer match up very well also.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|