Solved

Does MM_LOMETRIC Mapper mode work properly on every printer?

Posted on 2000-04-04
2
583 Views
Last Modified: 2012-05-04
I've created font (CreateFontIndirect)
with font mapper mode set to MM_LOMETRIC
(lf.Height member of LOGFONT structure set to 50), then printed some text.
But it's not the same on every printer,
on Cannon BJC-250(under Windows 95) it's 5 milimeters and that's OK, but on HP 690(under Windows 98) it's only 3 mm high and on some laser printers(under Windows NT) it's even smaller.
Whos fault is it?:
- printer(does DPI matter?)
- system(does font mapper work diferent under diferent systems)
- compiler(I'm using Delphi 2)
Thanks, Ziolko  
 
0
Comment
Question by:ziolko
  • 2
2 Comments
 
LVL 17

Accepted Solution

by:
inthe earned 110 total points
ID: 2685342
Hi
it is the printer drivers fault,
if you tried it on the same 2-3 printers on different systems it will be one size but try it on different printers on same system and will be differnt size..this can also be common with even printing a simple richedit etc.apart from upgrading latest printer drivers etc ther isnt much you can do.
0
 
LVL 17

Expert Comment

by:inthe
ID: 2685404
ps you can try calling this before printing to set the pixelsper inch.:

procedure SetPixelsPer;
  var
      finch,f : longint;
      mmv: integer;
      pixv : integer;
  begin
      case GetMapMode(printer.canvas.handle) of
        MM_HIMETRIC, MM_ISOTROPIC, MM_ANISOTROPIC: FInch := 2540;         MM_HIENGLISH: FInch := 1000;
        MM_LOMETRIC: FInch := 254;
        MM_LOENGLISH: FInch := 100;
        MM_TEXT:
          begin
          mmv := GetDeviceCaps(printer.canvas.handle,VERTSIZE);           pixv := GetDeviceCaps(printer.canvas.handle,VERTRES);           FInch := round(pixv / (mmv/25.4));
          end;
        MM_TWIPS: FInch := 1440;
      else ShowMessageBox('Unknown printer resolution.  Unable to
verify font size.');
        end;
Printer.Canvas.Font.PixelsPerInch := Finch;
  end;


or:

SetMapMode( printer.canvas.handle, MM_ANISOTROPIC );
SetWindowExtEx(printer.canvas.handle,GetDeviceCaps(canvas.handle, LOGPIXELSX),GetDeviceCaps(canvas.handle, LOGPIXELSY),Nil);
SetViewportExtEx(printer.canvas.handle,GetDeviceCaps(printer.canvas.handle, LOGPIXELSX),GetDeviceCaps(printer.canvas.handle, LOGPIXELSY),Nil);
 
This artificially reduces the printer resolution to the screen resolution
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Convert Jpg /PNG To GIF 5 120
Delphi application Soap connection 5 96
Downloading email attachments 2 67
RESTRequest Parameter 4 14
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now