Link to home
Start Free TrialLog in
Avatar of ryan_sabarre
ryan_sabarre

asked on

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?

Avatar of ryan_sabarre
ryan_sabarre

ASKER

anybody can help me please
by the way can you make the richedit/memo margins to 0 so that i can print freely without any margin
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

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

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
ASKER CERTIFIED SOLUTION
Avatar of modulo
modulo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial