Avatar of mlcktmguy
mlcktmguy
Flag for United States of America asked on

Generate a PDF and attach it to an email

A client of mine is using VFP 7.  They had a request from one of their clients to send an email with the invoice attached in PDF format.

This will have to be accomplished form with the existing FoxPro app.  For another purpose we already have logic in the Foxpro app to generate an email from within Foxpro(VFP) and attach a file or files to the email.  The real question here is how to do it with a PDF.

We have played with CutePDF and successfully created a PDF from FoxPro.  With the free version of CutePDF the process is cumbersome and not acceptable.  Each time a PDF is being created you have to name it and tell the system where to put it.  For this process to work in production it has to flow without prompting.  We purchased the $50 version of CutePDF and that didn't have the functionality that we were looking for.  A call to tech support had them suggesting that we buy the $500 version of CutePDF.  At that point we stopped.  Time to investigate alternatives or at least verify with non-CutePDF employees that the $500 version will accomplish what we want it to.

Ideally the application would know where (which directory) to put the generated PDF and would fabricate a name of the file based on the client name, date etc..  Once the PDF was generated the app would create an email, attach the PDF file it just created and then move to the next invoice to do the same thing.

Has anyone worked with the pricey version of CutePDF to know whether it will accomplish our goals.

Even if it will, are their alternatives to creating PDF's from VFP that allow the app to direct the generated PDF to a specific directory with a specific file name?
FoxPro

Avatar of undefined
Last Comment
mlcktmguy

8/22/2022 - Mon
suvmitra

There is no point purchasing Cute PDF or other third-party softwares ... Your program can only able to send the request to the printer driver ... then if the COM not supports further to give you options like saving it with name and path ... you can not use it.

Instead try http://fox.wikis.com/wc.dll?Wiki~Print2PDF ... old and good solution.
Pavel Celba

Print2PDF looks as a good option.

Another alternative is to switch the invoice creation into VFP 9. Its extensible Report engine allows to create PDFs and send them via eMail on the fly. You will need the extension, of course - FoxyPreviewer is free (http://foxypreviewer.codeplex.com/), XFRX is a paidproduct (http://www.eqeus.com/).
ASKER CERTIFIED SOLUTION
Olaf Doschke

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
SOLUTION
jrbbldr

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
mlcktmguy

ASKER
Exactly what I needed
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes