• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

Entering Text on Richedit

I have a SCANNED INVOICE COPY, all i want to do is making it computerized. i want to input information from the invoice using the computer, ON PRINTING, i will use the invoice paper and print my inputted text.the problem is that i want to align my inputed text to where it should belong in the invoice paper. how could i do that.

anybody here knows about a transparent TRichedit/TMemo so that i can put my SCANNED INVOICE AT THE BACK and just align the text accordingly.

and

anybody here knows how to align my text pixel by pixel (for any font size or type) in the richedit/memo. so that i can just put x and y values to allocate the text to where i want to place.

like:

procedure PutTheText(xAxis,yAxis,New_Text);

anybody can finish this procedure?

0
ryan_sabarre
Asked:
ryan_sabarre
1 Solution
 
ryan_sabarreAuthor Commented:
anybody can help me please
0
 
ryan_sabarreAuthor Commented:
by the way can you make the richedit/memo margins to 0 so that i can print freely without any margin
0
 
zebadaCommented:
To do pixel alignment I would not use a richedit, instead do something like this:

if ( printerDialog.Execute ) then try
  Printer.BeginDoc;
  ...
  In here simply :
  1. Set the font using:
     Printer.Canvas.Font.....
 
  2. Write to the Printer's Canvas using
     Printer.Canvas.TextOut(x,y,"your text here");
  ...
  Printer.EndDoc;
except on
  e:Exception do
  begin
    Printer.Abort;
    ShowMessage(e.Message);
  end;
end;

You can also print lines, graphics and images as well - simply by rendering them onto the printer's canvas.

Regards
Paul

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
TvigepCommented:
Indeed use the printers canvas, and to check what has to go where I would first use a regular canvas (like a forms canvas) so you can check what has to go where. If you load the scanned document as bitmap, you can then use Form.Canvas.TextOut to place your texts, and tweak it so that you have the pixel values exactly right.

But wouldn't it be easier to simply recreate the original invoice document, instead of using a scanned version? shouldn't be that difficult, I assume, unless it contains logo's you need.

HTH,
Stef
0
 
ryan_sabarreAuthor Commented:
sorry folks i already found a component that does that one. Its an ALrep component, which i can easily drag and drop text to where i want to put in the paper.
0
 
CleanupPingCommented:
ryan_sabarre:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
TvigepCommented:
My guess is this one can be closed.
" i already found a component that does that one" tells me he just left this question sitting without closing or accepting an answer.

0
 
kacorretiredCommented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area for this question:
       PAQ and refund points
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Some days and here is the Christmas Time. I wish good luck and good health for you all and for your loved ones

kacor
EE Cleanup Volunteer
0
 
moduloCommented:
PAQed, with points refunded (100)

modulo
Community Support Moderator
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now