So i just need to provide my customer with a filled out copy of the original gov issued pdf form. doesn’t matter what ouput its in just so long as when they print it out it looks like the gov issue form of acceptable quality. If we can get it to look and print just like the original, the gov office will have no reason to deny acceptance. So whatever format its in, present to browser or saved as makes no difference as long as it does that.
Well, you are going to love this! I found a simple way to save an image of a webpage running live.
Really cool small, very small code… It basically would let you to use the version with support files and
fill them in and display them and then, it can make a PDF of the “image” of the currently live page.
Should work as you want it. It would be basically the same as the governments version but with data in it.
And, it would be a PDF file so the client can keep a copy for their records.
My friend who has the full Acrobat software could not get it to create an accurate HTML version. It just doesn’t do that I guess. No wonder I found so many sites online that do the conversion for you…
1 - Are you going to need other forms used, too? Or just this one and only form?
2 - Is your version with all of the support files looking 100% match of the gov version?
#2 answer, if yes, zip it up and send it to me. If it won’t let you post the file on this post, you can in a private post to me. I will alter it to work with the new ideas and get it to create a PDF version of it with the correct full page display.
I have plans tonight, so running low on time, but, I think we can finish this up soon…
there are other forms, most are interchangeable between services. But would like to learn the entire process incase I need to add forms for other gov serivice in other states later.
As to my versions, tried the publisher to html but got shot down cause dompdf doesn’t recognize the form field names inside the text boxes. Photoshop will allow me to create a layer of text field names where i need them but won’t save the file in an html format. Working with an html editor and the preview shows me an html file like i want it in it’s preview but when I save and use it for the code from the server all I get is the field data with no background image. So I don’t know what’s going on, think it my be the fact that it is a trial version and not publishing correctly until you purchase.
What you have found sound like a good thing…
Well, I have two versions that should work. Just running out of time today. Plans later and a paying job coming up shortly…
So, this new idea should work. We will still use HTML, but, a version with the backup files or support files.
then, the same replace code and query and the new code will take an image of it. That image will become
the input to the PDF code instead of the HTML. Should work. Just a lot of logic to sort out first. I just got the code that let’s me create the image from a live page. Once I pick the best HTML data to start with, I will fill in some of the fields and test it offline. And, then send it to you so you can test on your live data.
But, not sure if I can get it finished testing before I leave later today. I am in VT and it is nearly 3 PM already and have to leave about 6 PM. We will see! If not, I can finish up the testing late night when I get back or in the morning. I want to finish this process up as much as you do! Ha!
Sound like a plan, I’ve been working on this with you this long and just glad I’m getting the help. So do you how you need to and we can hook back up tomorrow morning… i the mean time I will continue with things on my end and see if I can make things work with what we have too.
click the link and enter the refcode “QKEX49MKDE” to see what I’ve got so far
Well, that is “okay”, but, it looks a bit faked. I feel we can solve this with the new idea. Just need some time to test it all… More after I test it…
By the way, the image code appears to be able to render a
Should be able to test it in the morning… I will test the parts of it before I leave!
Sounds good, go make your money and enjoy your evening…
Well, got busy today. Will try to get back to this tonight for you.
I found a fairly simple way to render a DIV into an image. Very interesting tech! Never knew it was possible.
So, I placed one of our tested into a DIV, so it shows the results on the page. Now I will use this image trick
to create an image from it and then a PDF form the image. Not very hard from what I am reading about it.
Will send you a test script for it later tonight…
Cool…I’ve basically tried everything to the image in the background in a full page but it always comes back to small or off center with borders…
I might have a solution. Testing it now as I did not get to it until just now…
Sounds good, got a light day today, so I’ll have time to test what you got and get back quickly. Is this still using the dompdf library or another method? Also want to make sure we are dealing with the most recent form so we are not having to correct something later. I will send you that file in a private message
I have a question for you. How are you indicating check boxes in your database.
SO, as an example, the first thing asked for is type of registration needed.
There are four entries there. Let’s say the user needs the second one checked. (Title-Only)
How are you saving that inside your database? I am trying to sort out how to mark them where needed.
Four this area, there are four possible options. Do you have one field for this with 1-2-3-4 in it or do you have four separate fields, one for each check-box? I need to know this to be able to program that part…
Well, I did some tests and got it working. i had to manually alter the form’s HTML to fit the original one.
It was tedious and took all afternoon… Then, I just created a few of the data fields, six of them, for now.
I used the list you posted awhile ago. I was able to create a form filled in with the data. I added just a small
bit of CSS to put the data in place where it should be. Here is the code I used:
// Set up the PDF library
$dompdf = new Dompdf;
I left in the part where we entered the ref-code, but, it does nothing at the moment. (I did not have access to your database, so I removed that part code and just used the hard-coded six fields instead. But, it works! I am sending the form file which is a bit big for a post in a private message. It should let admin's attach files here, but, for some reason it does not. Depending on where you put this code and the form, you might have to alter the get-file-contents to point at it. All it does is use the new form I created and put in the six fields. You would need to alter the form (making a backup of course) and enter all of your other fields you have in the database. They are placed inside
Also, the results is just HTML. The next step is to convert the output to an image using that new library and then save it to a PDF. More on that tomorrow…
I did get a copy of the form from your link and I will start putting the code together on my end in the morning. Then I’ll await your next message to complete it and begin testing… thanks and it looks I’ll owe you a few bottles…LOL