| |
| Publicado el 14,mayo 2015 - 19:18 |
Hi Guys,
I want to create an pdf invoice that can be emailed to a customer. This is the scene -
Purchase the items - working Create the address page to send the items - working Press the button to go to paypal - working paypal success page - working
Report page created as Invoice - appears to be working
I can show the report with filedisplay(InvoiceXXX). I need to save the pdf so that I can email it as an attachment.
The email section is working very well - Just need the pdf attachment.
I know I am missing something simple.
TIA
Mike Allison |
| |
| |
| | | |
|
| | |
| |
| Publicado el 14,mayo 2015 - 19:21 |
Guys,
Just to add - this is a PHP site linked to Mysql.
Regards,
Mike Allison |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,mayo 2015 - 01:07 |
Hi Mike,
I do this quite a lot in my WD app.
The keys printing the report directly to a pdf and storing it, then sending it as an attachment to your email.
Here is how I print to PDF.
// directory when I'm saving PDF
gsReportPrintPath is string
// name of file
sfilename = "Booking Invoice"+Booking.BookingID.pdf"
// Now Print iParameterPDF("", "", iMaximumQuality) iDestination(iPDF,gsReportPrintPath"\"+sfilename) iInitReportQuery(ReportQuery) iPrintReport(ReportName) |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,mayo 2015 - 13:00 |
Hi Steve,
Thanks for the reply.
// Now Print iParameterPDF("", "", iMaximumQuality) iDestination(iPDF,gsReportPrintPath"\"+sfilename) iInitReportQuery(ReportQuery) iPrintReport(ReportName)
iDestination , iPrintReport
functions are not allowed in PHP format of web sites.
I can do it in Windev BUT Webdev appears to be different.
Struggling !!!!
Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,mayo 2015 - 15:41 |
Hi Mike,
Have you considered just having webdev use php to create a record in the a data file with print instruction and then writing a service in Windev that polls the table and prints and sends the email? That might be a work around. Assuming you are able to install a service on the webhost anyway...
Good luck!
Steve |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,mayo 2015 - 16:13 |
Hi Steve,
I am not using Windev at all on this project.
I am trying to see if I can create a page as XXX.AWP and call it.
Thanks for your thoughts. I wonder if any body else can shed some extra light on matters.
Regards,
Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,mayo 2015 - 19:03 |
Hi,
I have used php in the past . The print to pdf isnot availeble If you can make it work then I am verry interested in how you did it.
I should be possible I guess with calling some php scrupt that dus the pdf creation for you .
regards
Allard |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,mayo 2015 - 02:58 |
Hi Allard,
I have got it to work after a fashion - but it looks quite good for me. It is quite simple really!!
At the moment, I have put a button on the form saying "Print Invoice" - code below. It brings up a "web page" that is the same size as an A4 document.
WL INITIALIZATION of ButtonXXX (PHP Server) ws_customer_key = 1 page_search..Title="INVOICE"+ws_customer_key
this changes the page title so it gives the invoice no as the title of the invoice when it is saved on the local PC
---------------------------------------------------------------- JS (of ButtonXXX) (browser)
//Prints the current page window.print();
window.close();
This opens the user print select on the local PC. They can either print OR save to PDF. It then closes the page when printed or cancelled by user.
------------------------------------------------------------------ WL Click (of ButtonXXX) (PHP Server)
page_search..Title="Better LED Lighting - Search"
This puts the title back to its correct page title.
I hope that this is of use to you.
Kindest Regards, Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,mayo 2015 - 15:09 |
Hi Mike
Just by curiosity, why exactly are you wasting your time with all the limitations of the PHP mode? Institutional customer?
Best regards |
| |
| |
| | | |
|
| | |
| |
| Publicado el 16,mayo 2015 - 15:23 |
Hi Fabrice,
This is a customer who has several shopping carts.
I am restricted by the exiting hosting that he has and the other infrastructure issues.
PHP is the existing environment - so I have to go with it.
I hope that webdev 20 has the new "whistles and bells" to make life a little easier. I have to say thay the webdev / php offering is quite good, just would like it a bit better.
Mike |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,mayo 2015 - 02:23 |
Hi Mike, Thanks great,
I agree with you mike. PHP is what small customers tend to use. If would be great if PC soft would add the ability to make charts in php.
And responsive site seems to be what people want these days as well. I must say I experimented a bit with the zoning features. Iam redoing a site and the zoning is great. You can easily make a site that uses the whole window on big screens and make it scrink to small screens ( half responsive) I then add a "Mobile version for the phone.
The ability to lock sections of a screen is great as well !!.
Then the table is limited but now I use the looper and that works great. and Now the ability to create pdf invoices. Just makes my day.
Thanks Mike!!
Regards, Allard |
| |
| |
| | | |
|
| | |