Web browser to display PDF or HTML file

Hi All,

I have a HTML help file that I created and would like to make it possible to open this in one of my webvisu screens on a web panel running the main visualization. I was trying to use the web browser element on a screen in the webvisu and point the URL to the HTML file but it never opens that file / is not able to connect. I am not sure if it is a security issue or there is some other configuration that needs to be done to open this file? I stored the file and all related content in the PlcLogic/visu directory as mentioned here: https://content.helpme-codesys.com/en/CODESYS%20Visualization/\_visu_elem_webbrowser.html under the URL section. I point to localhost:8080 and the file name .html. Originally I had set the Show variable to static true but then I added a button to be able to press on the screen, in each case I see an error on the screen that it might be a security issue. Just in case it was an issue with the HTML file, I tried pointing it to an image file but this didnt work either.

Does anyone have any tips on how to do this?

in the url try to use relative access instead of absolute.
instead of “localhost:8080/my.html” use “my.html”

That worked like a charm! I didnt try that originally because the documentation example used the localhost link but now its working. Thanks!

Hi there!

Perhaps there’s some steps that you forgot to mention for being too obvious on how to set them up, but I did exactly what you did and I’m still not able to visualize my file.

I did the following steps:
Added a External File object to my ‘Application’. Browsed and selected the file I want to show. Changed the name of the original file to i.e. MyFile.
In the “File Handling option” I chose Embed into project (Is this correct?) I want eventually to pull this doc in webvisu without the need of having it in the PC.
And finally in the “Online handling” I did as said here in this topic. And write the target path as: ‘PlcLogic/visu’
(I also tried just ‘visu’ and also ‘/visu’).

And then, added the web browser object to my visualization. And in the URL I putted “MyFile.pdf”
as declared as solution in this query and still nothing. Did I miss something? Or did something wrong?

Thanks in advance