1. Raquel Rodriguez
  2. PowerBuilder
  3. Thursday, 11 August 2022 10:21 AM UTC

Hello,

 

How I can open a PDF document with a Web Browser  Control? I tried, but  I onlu opem a white square, when I open a Response Window with Web Browser.

 

Kind Regards and thank you in advanced

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 August 2022 16:45 PM UTC
  2. PowerBuilder
  3. # 1

As Chris mentioned, use the embedded Web Browser control instead: https://docs.appeon.com/pb2019r3/pbug/ch04s05.html

Here is code sample that might be useful: https://community.appeon.com/index.php/codeexchange/powerbuilder/273-web-browser-demo-from-elevate-2020

Comment
  1. Raquel Rodriguez
  2. Friday, 12 August 2022 08:21 AM UTC
Hello,

Sorry my level in Powerbuilder is basic, is there some example, to learn how doing. I need something in my installation?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 August 2022 11:51 AM UTC
  2. PowerBuilder
  3. # 2

Hi Raquel;

   Thanks for the further information.

   Since your logic is referring to an OLE control, that means that you are not using the "built-in" Web Browser control. Instead, your attempting to use an "external" 3rd party control. My guess is that your using the IE Web Browser Control (which is now obsoleted by Microsoft).

   My suggestion would be to replace the external OLE control with PB's built in one.

Regards ... Chris 

Comment
  1. Raquel Rodriguez
  2. Friday, 12 August 2022 08:20 AM UTC
Hello again,



Sorry my level in Powerbuilder is basic, is there some example, to learn how doing. I need something in my installation? Thank you so much
  1. Helpful
  1. John Fauss
  2. Friday, 12 August 2022 13:29 PM UTC
Can you please be a little more specific as to what you need help with, Raquel? For example, adding an instance of the new web browser control to a window? Setting the URL to display a specific PDF file in a drive/folder? Producing an executable version of your application? Packaging your application with the necessary runtime DLL's and related support files? You've asked a very generic, open-ended question, so you need to help us better understand what your specific needs are. If you are new to PowerBuilder, then I suggest you take some time and work through the free PowerBuilder Fundamentals course at Appeon-U, which you may access from the "Resources" menu item at the top of this web page/site.
  1. Helpful 1
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 11 August 2022 10:34 AM UTC
  2. PowerBuilder
  3. # 3

Hi Raquel;

   It would be more helpful if you provided us with...

  1. PB version & build 
  2. O/S version 
  3. Sample code that your using 

Regards ... Chris 

 

 

Comment
  1. Raquel Rodriguez
  2. Thursday, 11 August 2022 11:28 AM UTC
Hello Chris,



I used Powerbuilder 2019 R3. It`s a migration from Powerbuilder 12.5. The old code is something like this:



-This is in the principal windoiw



lw_viewPDF.uo_webBrowser.ole_1.object.navigate(ls_parametros)



- then call de the response



OpenSheetWithParm (lw_viewPDF, "W", this/*w_ipm_frame*/, 3, Original!)



--And in the response some think like that in the timer event



if long(uo_webBrowser.ole_1.object.ReadyState) = 4 then

//cargó



hpb_progreso.position = hpb_progreso.maxPosition



//Parar el evento timer

Timer(0)



end if



Kind Regards











  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.