Printing problem - wrong size for the spaces between chrs

Please discuss general Delphi programming topics here.

Printing problem - wrong size for the spaces between chrs

Postby katran » July 18th, 2013, 12:06 pm

Hi,

i am very happy to join this comunity and to participate to discussions about programming.

My first post it is about a problem I have with printing.
I need to print a long string formated with an OCR font. It has aprox. 40 characters length and the font is called OCRBB12.
This string will be printed on a document for a bank and it will be scanned, so it has to be printed perfectly.

I noticed that when is printed with Quickreports, the string is 1.5mm longer than when is printed with Microsoft Word. Microsoft Word is doing the corect print.
I thought first that is just an Quickreport bug, but then I tried with FastReports and got identical wrong results.
I also tried printed directly from Delphi using Printer.Canvas, but had the same problem : string is 1.5mm longer than normal.
So the problem seems to be inside of Delphi or it is an Windows settings problem.

I compared the corect string with the string printed wrong and I had the feeling that in the areas where there are "0" characters the spacing is affected (spaces between characters are biger compared with what I printed from Microsoft Word).
If there are other characters different than "0", the spacing looks corect. I am not 100% sure, but this is my feeling.

I got 1.5mm diference when I used 600dpi setting for the printer. If I set 300 dpi, I get another difference, but still the printing is not corect.
I also tested with Arial, and still got differences between Delphi and Microsoft Word.
I spend a lot of time in fixing this, but I failed to find a solution.
Maybe someone had already this problem and was lucky to find the solution.
Any help will be really apreciated.
Thank you in advance !
katran
Member
Member
 
Posts: 2
Joined: July 18th, 2013, 11:57 am

Re: Printing problem - wrong size for the spaces between chr

Postby katran » July 24th, 2013, 1:00 pm

I had found a solution to handle this problem.

I finnaly used a function called : extTextOut to print the string and to handle the spaces between characters.

Here is the place where I found help&solution and commented more about the way I solved the problem:
http://forum.quickreport.co.uk/default. ... &#post2558
katran
Member
Member
 
Posts: 2
Joined: July 18th, 2013, 11:57 am

Re: Printing problem - wrong size for the spaces between chr

Postby Kambiz » August 11th, 2013, 11:36 am

Hi,

Thank you for sharing the knowledge.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2429
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 4 guests

cron