Emailing PDF's

Emailing PDF's

Postby Randal » Wed Aug 06, 2008 1:40 am

All,

I need to email pdfs to numerous receipients from one report (billing statements for example). I've read several of you are using image2pdf with rpreview. Can someone share some examples of using image2pdf with rpreview?

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Re: Emailing PDF's

Postby Richard Chidiak » Wed Aug 06, 2008 8:40 am

Randal

What is your email address so i can send you a copy of my rpreview.prg using image2pdf

Richard
http://www.cbati.com

Uestudio
Fwh 13.05 Harbour 3.2 MSVC 2013
User avatar
Richard Chidiak
 
Posts: 946
Joined: Thu Oct 06, 2005 7:05 pm
Location: France

Postby gkuhnert » Wed Aug 06, 2008 8:57 am

Randal,

here an example for the buttons, if "IsAppThemed()" returns .t.:

first you have to add an image to your imagelist in rpreview.prg:

After
Code: Select all  Expand view  RUN
oImageList:AddMasked( TBitmap():Define( "one_page2",, oWnd ), nRGB( 192, 192, 192 ) )

you insert:
Code: Select all  Expand view  RUN
oImageList:AddMasked( TBitmap():Define( "your_icon",, oWnd ), nRGB( 192, 192, 192 ) )


and where the buttons are defined, after this:
Code: Select all  Expand view  RUN
DEFINE TBBUTTON OF oBar ;
   ACTION  oWnd:End() ;
   TOOLTIP Strtran(TXT_EXIT,"&","") ;
   MESSAGE TXT_EXIT_PREVIEW



you add like this:
Code: Select all  Expand view  RUN
DEFINE TBSEPARATOR OF oBar

DEFINE TBBUTTON OF oBar ;
   ACTION  (MakePDF( oDevice:aMeta , "yourpdffile.pdf" ), ShellExecute(,"open","yourpdffile.pdf"));
   TOOLTIP "PDF" ;
   MESSAGE "PDF"


Where ShellExecute opens the pdf-file. You can change this to actions whatever you want (e.g. sending the pdf via e-mail to the recepient)
Best Regards,

Gilbert Kuhnert
CTO Software GmbH
http://www.ctosoftware.de
User avatar
gkuhnert
 
Posts: 274
Joined: Fri Apr 04, 2008 1:25 pm
Location: Aachen - Germany // Kerkrade - Netherlands

Re: Emailing PDF's

Postby Randal » Wed Aug 06, 2008 1:29 pm

Richard,

Thanks! You can email me at scebee@yahoo.com.

Randal


Richard Chidiak wrote:Randal

What is your email address so i can send you a copy of my rpreview.prg using image2pdf

Richard
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Also

Postby TimStone » Wed Aug 06, 2008 3:50 pm

I am also using it and my clients are getting good results. I tied it into rpreview so I can literally email anything in a PDF that can be viewed.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Also

Postby Randal » Wed Aug 06, 2008 7:54 pm

TimStone wrote:I am also using it and my clients are getting good results. I tied it into rpreview so I can literally email anything in a PDF that can be viewed.


Tim,

I haven't recv the sample yet so forgive me if my question is premature. Is there a way to handle multiple pages going to one recipient? For example, when our users print billing statements there will be hundreds of statements for hundreds of customers (and consequently, hundreds of pages in the report). Most of the statements will only be one page but others may be two or more pages. I assume an .emf file is created for each page? If so, do you have a way to parse out which page or pages should be included in which pdf (to ultimately be emailed to the customer)?

On another note, are you using an smtp class for emailing? If so, do you keep a record of what emails have been sent and their attachments?

Thanks,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

PDF

Postby TimStone » Thu Aug 07, 2008 4:20 pm

Randall,

It looks like you are giving me some work to do. Those are good ideas. I didn't think about using email with statements but I will add that to a TO DO list.

Yes I do use SMTP and right now I can easily do multiple pages into a PDF document. However, I don't designate multiple recipients from one document.

I do have the ability to send follow up letters by email but I don't use a PDF for that.

The PDF library would allow you to create a document with all the pages of a statement, but I would not run that through rpreview. Instead I would run that through my statement program. I would have the computer generate PDF's for each account with all of the statement pages. I would then directly email the PDF's to the email address in the account record. Since I allow clients to set the accounts into batches, with a user defined flagging code, I could have a batch for those who do have email addresses on file.

Of course, I'm not sure this is going to have good results. AR might increase as people don't pay their bill, claiming they were not received.

TIm
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: PDF

Postby Randal » Thu Aug 07, 2008 8:03 pm

Tim,

Thanks for your reply.

<<It looks like you are giving me some work to do. Those are good ideas. I didn't think about using email with statements but I will add that to a TO DO list.>>

Sorry, don't mean to give you more work to do. <g>

<<The PDF library would allow you to create a document with all the pages of a statement, but I would not run that through rpreview.>>

What PDF library are you referring to? How would that work?

<<Instead I would run that through my statement program. I would have the computer generate PDF's for each account with all of the statement pages. I would then directly email the PDF's to the email address in the account record. Since I allow clients to set the accounts into batches, with a user defined flagging code, I could have a batch for those who do have email addresses on file.>>

I'd be interested to know how you get the statement pages formatted into a PDF file.

<<Of course, I'm not sure this is going to have good results. AR might increase as people don't pay their bill, claiming they were not received.>>

Yes, this is a concern which is why I need a way to keep a record of emails sent - which is no big deal. Even so, people could still claim they never received the email/statement. However, more and more of our customers are asking for this capability.

I haven't been using the print or report classes in FWH so forgive my ignorance. Is there a way to generate emf files without showing the preview?

Thanks again,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm

Statements

Postby TimStone » Fri Aug 08, 2008 4:14 pm

I'm referring to Image2PDF which many of us use.

I've made a note of this thread but it will be a few days before I look at the implementation. I know it can be done. I'll add the capability to my own program then report back on the process.
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2945
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Statements

Postby Randal » Sun Aug 10, 2008 9:27 pm

Tim,

<<I'm referring to Image2PDF which many of us use.>>

Sorry, I haven't reviewed this product in depth, I thought it just converted an image to PDF.

<<I've made a note of this thread but it will be a few days before I look at the implementation. I know it can be done. I'll add the capability to my own program then report back on the process.>>

Thanks, I appreciate all your help and input.

Best Regards,
Randal
Randal
 
Posts: 260
Joined: Mon Oct 24, 2005 8:04 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 47 guests