Jump to content

darkgr33n

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by darkgr33n

  1. More research seems to suggest what I need is not going to happen  :( On the adobe site, I found reference to server-side merging of FDF and PDF files, but bascially Acrobat is not licensed for server side merging, so no way can I do it. This can happen on the user's client, provided they have Acrobat; but if they have Acrobat you don't need any programming, it "just happens" There is a reader extension available, but apparently in the region of $90k ... er, that's not going to happen!
  2. I have read through the link, and unless I'm missing something  :-[, it seems to refer more to actually constructing a PDF from scratch, as opposed to just filling in an already designed interactive form with the FDF data file I now have (thanks to Tom!). I've done some more research, and it would appear something like PDFTK may help, but if possible I'd like to keep the merging process within PHP, in order to minimise server changes (our Host may not allow it ?) Thanks
  3. Thanks again Tom, much appreciated  ;D I'll read through and see how I go.
  4. Thanks to Toms invaluable help, I've almost got this working perfectly! My form can create an FDF file, and email it out to the user as an attachment, which when he opens contains the PDF and his data.  ;D The only thing I feel that would be necessary now, would be to be able to actually somehow merge the FDF and PDF on the server, and email out the PDF. I think many people would feel uneasy opening an FDF file - most users would not know what one is - and obviously PDF everyone has heard of, and would expect. Is this possible  ??? Thanks P
  5. I agree absolutely. I've used DBs previously (although was SQLSERVER7 + ColdFusion / ACCESS + ASP), but this is a relatively new position (taking over from external web services) and unfortunately there is no DB in place yet. This is something I will definately get on to early next year we really should be using one as standard. Anyway, I've played with the code a little, and have created an FDF file !!!  :o  ;D I haven't yet emailed it to myself to see how it works, but when I double click it, i assume it looks for the relevant PDF on the server, and populates it on the fly ? Thanks so much for your help - I feel like I'm winning, which is always a good feeling to take into the weekend!! P
  6. Thanks again Tom. I'll have another go at getting it working, but I'm not actually using a DB at all. It's basically a webform that people fill in, to get an application form emailed to them. I had that bit working, but now we want to take the info from the html form, and fill in the relevant bits on the PDF, so they just have to sign it and pop it in the post. MySQL DB will be coming next year! Cheers again, and I'll let you know how I get on ... P
  7. Hi Tom Thanks, I appreciate your quick reply. I'm encouraged that you haven't said it's not possible, and I've not come across [b]exec [/b] before, so thanks for that too. Unfortunately, I'm not 100% sure how to proceed  :-\  ...  typical noob  ::) ... or how your code fits with mine. My current PDF code, which takes post vars, always opens in a browser window ... and i'm not really sure about fdf etc. Here's a version of what I have that works when opening to a new browser window - it does have some uncommented code, but I've never been sure how to use it. The PDF itself is already designed, and waiting to accept my data. Page one: [b]PDFTEST.FORM.PHP[/b] <html> <head><title></title></head> <body> <form name="contact" method="post" action="pdftest.pdf.php"> <input type="text" name="first_name" value="" tabindex="1"> <input type="text" name="surname" value=""  tabindex="2"> <input type="hidden" name="url" value="http://localhost/savings/esaver.application.pdf"> <input type="submit" name="submit" value="send application" tabindex="3"> </form> </body> </html> Page two: [b]PDFTEST.PDF.PHP[/b] $url = $_POST['url']; $values=$HTTP_POST_VARS; $fdfdata = "%FDF-1.2\n%âãÏÓ\n"; $fdfdata .= "1 0 obj \n<< /FDF "; $fdfdata .= "<< /Fields [\n"; //loop that adds the field names and values foreach($values as $key=>$val) { $fdfdata.="<< /V ($val)/T ($key) >> "; } $fdfdata .= "]\n"; $fdfdata .= "/F ($url) >>"; $fdfdata .= ">>\nendobj\ntrailer\n<<\n/Root 1 0 R\n>>\n"; $fdfdata .= "%%EOF"; //uncomment if you actually want to write a FDF file //touch ($form.".fdf"); //$FD = fopen ($form.".fdf", "w"); //fwrite($FD,$fdfdata); //fclose ($FD); /*** Now we display the FDF data which causes Acrobat to start  ***/ header ("Content-Type: application/vnd.fdf"); print $fdfdata; //use this instead of print if you are writing to a file rather than just the browser //header("Location: ".$form.".fdf"); ?> Thanks again for looking! Paul
  8. Hi All New to the forums, and pretty new to PHP actually, and I'm hoping someone may have experience of what I'm attempting to do, or at least know it can be done! I currently have an HTML form which collects user input, and then opens an interactive PDF, filled in with the data, which the user can print. I need to change the process slightly, and this is what I cannot get my head around Rather than OPEN in a new window all populated with the data, I need the user to not see the PDF at all, rather they need to receive the PDF (stored on the server) filled with the data via email. I can email an attachment ok, but can't see how the form data can be sent to a file on the server, and without the user seeing it, the PDF is filled with the form data, and then emailed to the user. I've done a search on the forum, and can find no mention. I've done various searches online, but my knowledge makes it hard to follow some of the solutions ... and one solution I did understand would cost £1500. Could anyone help out please ? Thanks in advance for any help. Paul
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.