Page 1 of 1

How to Open PDF File after Creation in TD 51

PostPosted: Wed Apr 15, 2009 2:30 am
by Sunil
Hello.

Can anyone suggestion to open PDF file after pdf file creation using 'SalReportPrintToFile'.

Sunil

Re: How to Open PDF File after Creation in TD 51

PostPosted: Wed Apr 15, 2009 2:33 am
by Didiman
You can use either the Adobe Acrobat ActiveX component, i think there are some examples here, or the Quickbrowser contro shipping with TD 5.1, this one will display PDF's via the PDF Plugin for the Internet Exploder.

Re: How to Open PDF File after Creation in TD 51

PostPosted: Wed Apr 15, 2009 3:30 am
by Sunil
Thanks Didiman.

My issue is to open pdf automatically after finished PDF file generation, at this time i am creating pdf file , double click on file then pdf opens via acrobat.

Sunil

Re: How to Open PDF File after Creation in TD 51

PostPosted: Wed Apr 15, 2009 9:05 pm
by firstbase107
Hi Sunil,

I suggest the use of Window's "ShellExecute"-function, as it opens the file with whatever program you assigned on your system for "*.pdf".
You'll find the function in Window's shell32.dll.
For further documentation take a look at http://msdn.microsoft.com/en-us/library/bb762153(VS.85).aspx
(or google "shellexecute")

Cheers from Vienna,
Alex

Re: How to Open PDF File after Creation in TD 51

PostPosted: Sat Aug 01, 2009 4:23 am
by Enator
Hi

I can make a PDF:
Call SalReportPrintToFile(hWndForm, App.GetAppPath( ) || sReport,'TEST.PDF', sBinds,sInputs, 1,

I can open it:

Call ShellExecuteA( hWndForm, "open", 'TEST.PDF', STRING_Null, STRING_Null, 1 )

I can send an email

!!CB!! 129
Call ShellExecuteA( hWndForm, "open", 'mailto:' || sEmail, STRING_Null, STRING_Null, 1 )

But my qustion is how can I send an attachment 'TEST.PDF' with this email?

Re: How to Open PDF File after Creation in TD 51

PostPosted: Sat Aug 01, 2009 6:40 pm
by Uwe van der Horst
Enator wrote:But my qustion is how can I send an attachment 'TEST.PDF' with this email?
Hi Enator,

as far as I know there is no way to use mailto with attachments for security reasons. We use cutepdf from Acro Software for sending mails. For a very low price you can get a personalized developer license and you are independent from Outlook. We are only setting some registry keys at runtime and it works.

http://www.cutepdf.com/Solutions/pdfwriter2.asp

Regards,

Uwe

Re: How to Open PDF File after Creation in TD 51

PostPosted: Sat Aug 01, 2009 10:26 pm
by Enator
Thanks Uwe ;)

Re: How to Open PDF File after Creation in TD 51

PostPosted: Sun Aug 02, 2009 12:03 am
by Enator
Ok I fixed it in another way just use it if you need:

Re: How to Open PDF File after Creation in TD 51

PostPosted: Wed Mar 13, 2013 7:32 pm
by kclench
Hi,
I am looking for an example of how to use the Adobe Acrobat ActiveX component to display a .pdf file. I know we can use shellexecuteA (), as shown in the thread.
and, which approach is better?
thank you.
Karen

Re: How to Open PDF File after Creation in TD 51

PostPosted: Mon Apr 15, 2013 10:45 pm
by Rachana
How do I stop adobe from opening pdf document I create thru Adobe PDF printer. I just want to create document and not have adobe open after I do.

Please help.

Thanks,