0

I am working on a project in which I am displaying a PDF form which the user has to fill out. After filling out the form, I would like to send out the PDF as an email on button click. At first, I am directly loading the PDF from html directory. Currently I am able to fill the pdf form with many different ways, but I don't know how to send the filled pdf as an email. THank you.

Code :

<!DOCTYPE html>
<html>
<meta charset="utf-8">
    <head>
        <title>PDF edit</title>
    </head>
    <body>
        <style>
    </style>

<?php

echo "<iframe src=\"editable.pdf\" width=\"100%\" style=\"height:300%\"></iframe>";

?>
<p>
    <button type="button">Send!</button> 
</p>

</body>
</html>

Sample editable file for reference : https://www.dropbox.com/s/8qemo1a773mochp/editable.pdf?dl=0

We are Borg
  • 5,117
  • 17
  • 102
  • 225
  • save temp pdf file on server and send pdf file as attachment https://stackoverflow.com/questions/4586557/php-send-email-with-attachment – FAEWZX Feb 13 '19 at 05:38
  • @FAEWZX : how can i save the edited file on server? – We are Borg Feb 13 '19 at 05:43
  • make form for data -> generate html -> convert html to pdf -> send pdf – FAEWZX Feb 13 '19 at 05:47
  • @FAEWZX Sorry, I don't understand. The pdf is filled out. I don't have a seperate form, it's the pdf I want to send out directly. Also there are different PDF's I will be loading, not the same always. Thank you. :-) – We are Borg Feb 13 '19 at 05:59
  • @FAEWZX : Can you tell me how I can save the PDF which is filled out on the server with a button click? Thanks. :-) – We are Borg Feb 13 '19 at 09:04
  • No, if you can then you have found a security hole in the browser, because the pdf is on the client side. – FAEWZX Feb 13 '19 at 10:14
  • @FAEWZX : Yes, but after the button press, I want to upload that pdf which is opened in the browser directly. – We are Borg Feb 13 '19 at 10:21
  • You're going to need to rethink your solution. You can't count on the PDF in the iframe to behave the same way across browsers. – joelgeraci Feb 13 '19 at 21:51

0 Answers0