Is there a way to take screen shots / screen captures in Perspective as we did in Vision with system.print functions? I’m thinking of using the system.perspective.download function to print out a byte array of an image/png to a file. It looks like system.file and system.print do not function with Perspective, however.
Any ideas here? And would you have to grab the session as the Vision equivalent of a parent window’s parent?
This would currently require a custom module - capturing screenshots from web browsers is a surprisingly complicated problem. Your best bet in the short term might be to try to train users to use built-in browser tools - new versions of Firefox, for instance, have a very powerful built in screenshotting tool.
What’s the use case of these screenshots, out of curiosity?
I hadn’t noticed this… nice tip!
Really? That’s super interesting that the problem is more complicated than it seems!
The screenshots are to be used for a “Support Ticket” type functionality, where if an operator or someone sees something wrong with something (e.g. a value is wrong, or something is mislabeled or misspelled), finds a weird bug, or has a feature request, they can submit some details and it automatically snaps an image of the current screen.
So it works on Vision for sure, but our client is pushing to move things to Perspective now and I advised of some loss of functionality, this potentially being one.
If we were to do a custom module, what packages would likely be needed?
Internally, we use
html2canvas to generate the view thumbnails used in the designer.
Cool, thanks! I’m going to play around with this and a few other things to see the feasibility of taking screenshots in Perspective. Looks like a few python packages could potentially do this as well, but I have to verify that.
Wow, I hadn’t noticed that Firefox option either. Nice.
I have a customer that would like to screenshot their charts from a timeseries chart. They asked about taking screenshots within a perspective app. An image export method on the time series chart would satisfy their wants.
There are some security considerations to make with screenshots (for the browser vendors that is). In the old days, you could have an iframe. If you take a screenshot of that, it could potentially show data from a logged in user on a different site.
Today, you have the shadow dom which is encapsulated. This can also be used to log in somewhere else and show private data. Though AFAIK, it’s less automatic than iframe login.
So just saving the actual rendering will be a security issue. Taking the already accessible DOM, and rendering it somewhere (on the server or on a canvas) is not an issue.
There are however newer APIs that enable screen sharing, even of apps outside the browser. But those require explicit permission from the user. https://developer.mozilla.org/en-US/docs/Web/API/Screen_Capture_API/Using_Screen_Capture
With the new workstation is it now possible to add screenshot of current page in perspective?
Not presently, although it looks like it might be possible to expose a JxBrowser method. I’d suggest an ideas.inductiveautomation.com post, so we can gauge community interest in the feature.
Has this gotten any traction? I would like to be able to screen shot a portion of a perspective view. This would be running in workstation in kiosk mode.
OP here. I'm also still interested in this feature, but it looks like it hasn't moved anywhere. I would still like this for easier end-user use of a "Support Portal" type tool. For now, we're just having the user take a snippet and then upload the file. It works, but auto-screenshots would be much nicer with just one simple click.
HI I converted several projects from vision to Perspective and I`m really need a Button script to print current screenshot to default printer.
No Idea how to make it. Any news about this topic?
Same answer as before; you can't at the moment (and probably won't be able to in the near future either), unless someone writes a module to do it
You could probably use autohotkey or something similar to create a script for this. Obviously outside the scope of the Ignition forums though
Sorry, no deep knolege about it. Do you know someone who could help me?
m not able to call it to de Ignition project, right? I should make it outside of Ignition and use it outside of Ignition, isnit?
Sorry, but I`m not so skilled in this kind of thing.
There's no way to actually call this to run though from Perspective
I would think you could use system.util.execute - Ignition User Manual 8.1 - Ignition Documentation to run the ahk script. But I could be wrong as I've never tried.
You could, but it would run on the gateway, not the client