1. Sylvain .
  2. PowerBuilder
  3. Tuesday, 28 November 2023 21:44 PM UTC

Does your Web Browser control have the ability to turn off the execution of any JavaScript, Macro or 'Active content' within the PDF to avoid virus that are part the PDF to execute .

Thank for your time.

Sylvain

Sylvain . Accepted Answer Pending Moderation
  1. Wednesday, 29 November 2023 14:29 PM UTC
  2. PowerBuilder
  3. # 1

Thank you for your responses,

Those switches:

 

    '//.../xx.pdf#view=Fit&pagemode=none&statusbar=0&messages=0&toolbar=0&navpanes=0'

 

Is this the full list or there is more, if more, where can I find a list of those switches.


Thank you for your time.

Sylvain

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 29 November 2023 16:16 PM UTC
Refer to documentation of the PDF reader software you will be using.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 29 November 2023 03:49 AM UTC
  2. PowerBuilder
  3. # 2

Hi Sylvain;

  In the past, I have used ImageMagicK free open source software to convert any PDF file format to just straight images.   ImageMagicK download can be found here: https://imagemagick.org/script/download.php

  You can then download the PDF file to your PB App's machine. Then use ImageMagicK's "Convert" command as follows (for example) ...

convert test.pdf test.jpg

https://imagemagick.org/script/convert.php

   The convert command will then drop all macros, jscipt, hyperlinks, viruses, etc in the translation of the PDF into a image file. The image file can then be displayed in a standard PB Control (even a DataWindow) with a 100% guarantee that all "active content" has been removed. Thus, completely safe!

Food for thought!  HTH

Regards ... Chris

Comment
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 29 November 2023 00:52 AM UTC
  2. PowerBuilder
  3. # 3

Hi Sylvain,

The WebBrowser control displays PDF using the built-in third-party PDFReader plugin, so the behavior of PDFReader is beyond our control.

You can try append the URL when navigating to pdf like below to customize the pdf view.
Wb_1.navigate(ls_url + '#view=Fit&pagemode=none&statusbar=0&messages=0&toolbar=0&navpanes=0')

You can also refer to article below.
https://community.appeon.com/index.php/qna/q-a/webbrowser-pb-2022-pdf-pagemode

Regards,
Kai

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 28 November 2023 22:17 PM UTC
  2. PowerBuilder
  3. # 4

Hi Sylvain;

  Not directly but there are many events that you can add PowerScript code to the WebBrowser Control to have your App take control of the download, execution, redirection, etc activities and if inappropriate, your PB App's code can prevent them from occurring.

For example: https://docs.appeon.com/pb2019r2/powerscript_reference/ch09s84.html

HTH

Regards ..> Chris

Comment
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.