Click to See Complete Forum and Search --> : [Resolved] Printing to a formatted doument.


Kudose
03-13-2005, 05:18 AM
This isnt really a PHP question, but I dont know where to look. What I am wanting to do is to print specified input onto a formatted sheet, kinda like the Tax software people do.

How do they do that? Do they just slice up an image and put words in the fields?

TIA.

vaaaska
03-13-2005, 07:49 AM
$variables...$etc...

Kudose
03-13-2005, 02:15 PM
...?

Mordecai
03-13-2005, 02:55 PM
I'm not sure what the question is. Perhaps you just want to generate a PDF or something?

Kudose
03-13-2005, 03:22 PM
Kinda.

Basically, I have a document. I'm gonna scan it in. What I want to do is have a user enter information and when they print this document, I want the text to be put on the document.

Kina like TurboTax. They have you enter in a bunch of info, then you go to print, it print the tax document with the info you entered on it.

Hope that makes it a little clearer.

TIA.

davidjam
03-14-2005, 01:25 PM
I guess my first question for you is: is this a pre-printed laser form with blank fields that you want to run through your laser printer and have the data printed in the right places?

Unfortunately, my day job is working at a business form manufacturer -- I mean real paper forms. On the plus side it has given me the opportunity to learn web dev in the past few years TBTG.

Kudose
03-14-2005, 01:27 PM
No, it is not a pre-printed form, although, that method would work too.

I am trying to get an auto dealer to get rid of alot of papers, and put them on the web. So whenever he needs a form, he can just fill out the customers info, then print off the form.

Mordecai
03-14-2005, 09:30 PM
Get the coordinates of where the text should be (in pixels), load the picture into a gd (http://www.boutell.com/gd) image (imagecreatefromjpeg() or such) and use imagestring() or imagettftext() to write the text to the image, then print it back out.

That's if you want it to look really nice, of course. But if the forms are huge, it'll take a while (and a lot of memory) to work with them.

Kudose
03-14-2005, 11:38 PM
That's what I'm talking about! I should have known that. Thank you!

:)


What point do I use to start the text? There are underscored fields on the document, I am wanting to know what part to get the x,y cords at. The middle, the top of the underscore, etc...?

Thanks thus far everyone. :)