cancel
Showing results for 
Search instead for 
Did you mean: 

Hiw to open PDF file Adobe reader using PowerBuilder Windows application ?

Former Member
0 Kudos

I saved the datwindow in pdf format using saveas() method and I want to open it in Adobe reader once it is saved successfully..in web application i used download() method to open it in PDF reader but I don't know how to do in Windows applications... I'm using powerbuilder 12.5..

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

hi Arunkumar V im trying to open a pdf saveas() from powerbuilder web but i cannot do it, because SaveAs() use temp session folder into server but i need to save pdf into client pc

how can i do that or how can i use download()

thank you

Former Member
0 Kudos

Hi Alexis;

  Are you using the old WebForms application target?

Regards ... Chris

Former Member
0 Kudos

im using power builder 11.5

Former Member
0 Kudos

Hi Alexis;

  We know your using PB. The question is "What type of Application Target are you using"?

Regards ... Chris

Former Member
0 Kudos

Hi Arunkumar;

  As an alternative to using the local Adobe Reader tool that you or your clients have installed ( as suggested by Arnd), you can also PB's INET object class to have PB open the PDF file via your local web browser. Have a look at the "PostURL" method.  

  Another way is to use OLE to embed the IE web browser right into your PB application. Then you can display the PDF via the embedded browser like it was integrated right into your PB application.

Food for thought.

Regards ... Chris

arnd_schmidt
Active Contributor
0 Kudos

Declare a (global or local) external function:


FUNCTION long ShellExecute( ulong hWnd, string Operation, string lpFile, string  lpParameters, string lpDirectory, int nShowCmd ) LIBRARY "shell32.dll" ALIAS FOR "ShellExecuteW"

To open a file with the default application, use:


string ls_filename, ls_null

SetNull(ls_null)

ls_filename = "C:\Full\Path\To\File.pdf"

ShellExecute( 0 , "open", ls_filename, ls_Null, ls_Null, 1)

more about ShellExecute can be found here:

ShellExecute function (Windows)

hth

Arnd

Former Member
0 Kudos

Beat me to the punch. Perfect solution, assumes you have already associated PDF's to .pdfs

Former Member
0 Kudos

If you want to open the PDF document with PB applications, create custom visual cotrol by insert the Adobe Acrobat reader and use the OLE object to perform the oration what you need

arnd_schmidt
Active Contributor
0 Kudos

Checked

I am using Windows 10 Edge Browser to view PDF.