Pkafkas
asked on
Can I trigger an email from a .pdf file while it is opened from the web.
Hello,
I have created a fillable .pdf form using PDF Converter professional. I have created a button that has a javascript link to trigger email. That was added with instructions from: PDF Pro Office ,How to create a button to email form out .pdf (custhelp.com) (http://nuance.custhelp.com/ci/fattach/get/487752/1396959515/redirect/1/filename/PDF%20Pro%20Office%20,How%20to%20create%20a%20button%20to%20email%20form%20out%20.pdf)
The email link works well if I open the.pdf file with Adobe Reader; but, if I have that same file opened from a web page link (hosted on an web server) a new tabe coems up and I can type in new information on that page; but, if I click the link for 'Email' nothing happens.
I suspect this email button functionality is not available from the web. Can anyone verify this? That one must same the file and then trigger the .pdf file from Adobe Reader first or some other .pdf reading program?
I have created a fillable .pdf form using PDF Converter professional. I have created a button that has a javascript link to trigger email. That was added with instructions from: PDF Pro Office ,How to create a button to email form out .pdf (custhelp.com) (http://nuance.custhelp.com/ci/fattach/get/487752/1396959515/redirect/1/filename/PDF%20Pro%20Office%20,How%20to%20create%20a%20button%20to%20email%20form%20out%20.pdf)
The email link works well if I open the.pdf file with Adobe Reader; but, if I have that same file opened from a web page link (hosted on an web server) a new tabe coems up and I can type in new information on that page; but, if I click the link for 'Email' nothing happens.
I suspect this email button functionality is not available from the web. Can anyone verify this? That one must same the file and then trigger the .pdf file from Adobe Reader first or some other .pdf reading program?
ASKER
My goal is to make changes to the .pdf file, from the web page tab that it is displayed in.
Then email those changes or save the changes to that .pdf file in an email, by clicking that button on the file. If I were to open the .pdf file in the tab and then save that same file to the desktops screen and then open up that file in Adobe reader (instead of using the web browser) the email button works for the 'running changes'.
But not while the same file is being changes from the web browser. If I will need a form instead of a .pdf file to keep the changes and to email them directly from the web browser or need to save the file to the desktop, that is fine. I just need to have an explanation to my superiors.
I think that the .pdf files are not designed to be used as om-line forms where they have a web based submit button to send information through email. Any thoughts?
Then email those changes or save the changes to that .pdf file in an email, by clicking that button on the file. If I were to open the .pdf file in the tab and then save that same file to the desktops screen and then open up that file in Adobe reader (instead of using the web browser) the email button works for the 'running changes'.
But not while the same file is being changes from the web browser. If I will need a form instead of a .pdf file to keep the changes and to email them directly from the web browser or need to save the file to the desktop, that is fine. I just need to have an explanation to my superiors.
I think that the .pdf files are not designed to be used as om-line forms where they have a web based submit button to send information through email. Any thoughts?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What you can do
Create an online form, save data in DB, then generate a PDF from the data
You can access the data from a backend or send it by email.
So you can do that using PHP.
If you don't have a backen and need one, I'm using this one (easy to use, secured and well coded)
https://codecanyon.net/item/advanced-security-php-registerlogin-system/5282621
I'm using HTML2PDF to generate PDF and PHP Mailer to send the PDF and the data is saved into MySQL.
Ref https://github.com/spipu/html2pdf
Ref https://github.com/PHPMailer/PHPMailer
Using 'S' to output to anything you want (this won't save a copy just generate the PDF file)
Output https://github.com/spipu/html2pdf/blob/master/doc/output.md
To send generated PDF by email
The best way to achieved this is to have the PHP display data, PDF generation and Mail function into a single PHP file.
You can set a cron job to send it based on a schedule or trigger this by the click of a button.
Note PDF is very limited for CSS so use the minimal CSS as you can and don't use external CSS or JS, make sure your code is valid.
Good luck
Create an online form, save data in DB, then generate a PDF from the data
You can access the data from a backend or send it by email.
So you can do that using PHP.
If you don't have a backen and need one, I'm using this one (easy to use, secured and well coded)
https://codecanyon.net/item/advanced-security-php-registerlogin-system/5282621
I'm using HTML2PDF to generate PDF and PHP Mailer to send the PDF and the data is saved into MySQL.
Ref https://github.com/spipu/html2pdf
Ref https://github.com/PHPMailer/PHPMailer
Using 'S' to output to anything you want (this won't save a copy just generate the PDF file)
Output https://github.com/spipu/html2pdf/blob/master/doc/output.md
To send generated PDF by email
$attachdata = $pdf->Output($pdffilename.'.pdf','S');
The best way to achieved this is to have the PHP display data, PDF generation and Mail function into a single PHP file.
You can set a cron job to send it based on a schedule or trigger this by the click of a button.
Note PDF is very limited for CSS so use the minimal CSS as you can and don't use external CSS or JS, make sure your code is valid.
Good luck
If you want to save the PDF and send it attached by email you will need some server side code let say PHP & PHPMailer.
I don't know this software, you may try to contact them directly to get support.
It's look like the sofware use some cUrl code so there must be some instruction for the web...