Ok, small problem here and I've been scouring the web trying to find a solution. I've found references to doing this but no real meat & potatoes answers. Anyways I have a form I created in Adobe LiveCycle, with this form I can submit and record data to a MySQL database, this works great. However the problem I am having is when it comes time to view a record I need to populate the form with the information to view/print or whatever. How do you do this? For arguments sake the reason I want to go with PDF forms over HTML is that I have quite a few forms I need to recreate and some of them are very large, it would save me a lot of time if I was able to use a pdf form over hand writing a bunch of HTML forms and then creating the view scripts in PHP/HTML and making sure they will print correctly. Hope this makes sense.
I am unfamiliar with ColdFusion, I do know my current host hostgator.com doesn't support it but I'd be willing to change to another one if this would solve my problem, looks like hostek.com has reasonable rates.
This doesn't quite make sense to me. You would normally use PHP to construct a page which displays all the information, with the information itself being returned from the database. So, there is only one page but its data changes when the page is requested.
You could use PHP to create or modify a PDF and then forward this to the browser. The browser will normally either offer to download the pdf (and save it) or open it in an in-browser pdf-viewer.
There are a number of PHP-PDF libraries that enable you to create or modify pdfs.
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
This doesn't quite make sense to me. You would normally use PHP to construct a page which displays all the information, with the information itself being returned from the database. So, there is only one page but its data changes when the page is requested.
You could use PHP to create or modify a PDF and then forward this to the browser. The browser will normally either offer to download the pdf (and save it) or open it in an in-browser pdf-viewer.
There are a number of PHP-PDF libraries that enable you to create or modify pdfs.
The reason I want to stick to using PDF forms is just the shear amount and size of the forms I have to recreate, I could go through and recreate all of these in HTML if I have too, I would just rather not. Instead of coding out the form then making the processing scripts for viewing and posting and such I figured if possible, I could redo the forms in LiveCycle, which is pretty much just drag and drop, then save the information to the database from that form and then somehow pull the database information back out and put it in the form using php or possibly some other language. If it's not possible I will have to go this route I guess, not fun but I may have to do it.
I don't know about LiveCycle but it's an Adobe product and it seems then can create PDF forms that are viewable in a browser, according to this.
A terrible hack would be to save a pdf as an image, set it as the background to a div, and use absolutely positioned form-elements to sit above it
__________________
"I'm here to save your life. But if I'm going to do that, I'll need total uninanonynymity." Me Myself & Irene.
Validate your HTML and CSS
Last edited by AndrewGSW; 01-19-2013 at 07:49 PM..
If you use pdf's alot Coldfusion is an Adobe product and has some great interactivity in creating pdfs
Code:
<cfparam name="URL.access" default="0">
<cfquery name="get_admin" datasource="#request.dsn#">
SELECT * FROM admin WHERE uuid = '#URL.access#' LIMIT 1
</cfquery>
<cfpdfform source="YOUR-URL\www\purchase_contract.pdf" action="populate" destination="#session.document_root#\#URL.access#.pdf" overwrite="yes">
<cfpdfformparam name="admin" value="#get_admin.first_name# #get_admin.last_name#">
<cfpdfformparam name="admin_email" value="#get_admin.email#">
</cfpdfform>
<!--- This flattens the file and shows it with no editable fields. Dont use this if you want them to be able to change.--->
<cfpdf action="write" destination="#session.document_root#\#URL.access#" source="#session.document_root#\#URL.access#.pdf" flatten="yes" overwrite="yes">
<cfheader name="Content-Disposition" value="inline; filename=#session.document_root#\#URL.access#">
<cfcontent file="#session.document_root#\#URL.access#" type="application/pdf" >
__________________
If you can't stand behind your troops, feel free to stand in front of them
I have looked at that felgall but I couldn't find any way to populate a pdf form. Do you know if they have a way to do that? I have some clients that are strictly php.
__________________
If you can't stand behind your troops, feel free to stand in front of them
$pdf = new FPDM('template.pdf'); $pdf->Load($fields, false); // second parameter: false if field values are in ISO-8859-1, true if UTF-8 $pdf->Merge(); $pdf->Output(); ?>
__________________
If you can't stand behind your troops, feel free to stand in front of them