1. Paweł Kasperek
  2. PowerBuilder
  3. Wednesday, 9 October 2024 12:27 PM UTC

Hi,

Last time I started using WebView2 control to show/preview PDF documents. It works perfectly, but I could check/show the digital signature of PDF document. The Edge browser has an additional extension to verification and show digital signature:

 

Is possible to enable this feature in embedded WebView2 web-browser control in PowerBuilder?

Regards,

Paweł

Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Thursday, 10 October 2024 03:09 AM UTC
  2. PowerBuilder
  3. # 1

Hi Paweł,

The "#edge-digsig-enabled-pdf" flag only applies to Edge browser but not WebView2 runtime. Since currently there is no introduction in Microsoft WebView2 documentation about it, we don’t know what’s the corresponding name of this flag in WebView2, so there is no solution at this moment.


Please try using the PDFSecureMode policy to enable digital signature validation for PDF files for WebView2 runtime to see if it solves the problem.
https://learn.microsoft.com/en-us/deployedge/microsoft-edge-policies#pdfsecuremode


If you know the exact name of this flag and how to modify it for WebView2, you can set browser flags via setting the registry keys. You can try the following way:
For example, the steps below can solve the “Chrome 124 Breaks TLS Handshake” issue:
https://www.reddit.com/r/sysadmin/comments/1carvpd/chrome_124_breaks_tls_handshake/

1. Open an Administrative Command Prompt or Windows PowerShell Admin console.
2. Execute the following command:
reg add HKCU\SOFTWARE\Policies\Microsoft\Edge\WebView2\AdditionalBrowserArguments /v * /d "--disable-features=PostQuantumKyber"

Please refer to the articles below for more details.
https://learn.microsoft.com/en-us/microsoft-edge/webview2/concepts/webview-features-flags?tabs=dotnetcsharp
https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/webview2-idl?view=webview2-1.0.2592.51#createcorewebview2environmentwithoptions

Regards,
Kai

Comment
  1. Kai Zhao @Appeon
  2. Friday, 11 October 2024 00:56 AM UTC
Glad to hear that.

For the pdf toolbar issue, We will record it as a new enhancement/requirement request and will transfer it to our product team for consideration.

Please try to solve the issue by appending the URL when navigating to pdf like below.
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
  1. Helpful 1
  1. Paweł Kasperek
  2. Monday, 14 October 2024 13:11 PM UTC
Hi Kai Zhao,



Thank you for your answer. I've got few questions:

1. Where I can get more information about Uri arguments that I can use during open PDF file in WebView2 browser ?

2. How I can set or get information that PowerBuilder WebBrowser use WebView2 system control ?

3. WebView2 control has more options (please see documentation of use it in .NET: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core?view=webview2-dotnet-1.0.2792.45). The WebView2 control has property CoreWebView. Is possible to access this object from PowerScript (maybe via hidden property)?

4.In .NET I can better manipulate of PDF toolbar, see: https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2pdftoolbaritems?view=webview2-dotnet-1.0.2792.45 . Maybe in PB is the same proble as in point 3?



Regards,

Paweł
  1. Helpful
  1. Kai Zhao @Appeon
  2. Tuesday, 15 October 2024 06:25 AM UTC
1. Please refer to Browser Support for Parameters chapter in https://pdfobject.com/guide/browser-support

2. Please try PB WebBrowserSet/WebBrowserGet function.

3. Currently PB does not support this. We will record it as a new enhancement/requirement request and will transfer it to our product team for consideration.

4. Currently PB does not support this. We will record it as a new enhancement/requirement request and will transfer it to our product team for consideration.
  1. Helpful 1
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.