Perspective PDF viewer

Hi everyone,

I have a problem with my PDF viewer (in perspective), when i’m using the path into the PDF viewer of vision is working but on perspective, the coponent tell me : “Failled to load PDF file”.

Is this component really different from the vision component ?

Totally different. Vision clients run locally, and therefore need paths that can be interpreted locally, with the benefit that local files are accessible. Perspective clients run in a browser, and browsers block local file access (at least, from the same window as a network resource). So resource paths in Perspective generally need to point at gateway paths relative to the gateway URL, or to other safe URLs. It isn’t just the PDF viewer, either.

3 Likes

Out of interest, where (what directory) would I put files on the gateway so that they’re accessible from a path that extends the gateway URL?

The lazy way:
<ignition install directory>/webserver/webapps/ - they’ll be automatically served up from the root directory.

The proper way - use the Webdev module, and its ‘mounted folders’ feature.

1 Like

Thanks Paul!

@PGriffith We are looking at doing a project where the customer needs reports, but we are also looking to future and want to use Perspective because he wants mobile and remote clients. Two questions:

  1. I thought the WebDev Module was not supported by IA Support, but I no longer see that note when I price it. Is it now supported by IA Support, at least as far as integrating with Perspective as above?
  2. Do you have a timeline for the release of the Perspective Report Viewer Component?

WebDev has always been “supported”, in the sense that “if you encounter a bug, we will work with you to try and work around it, or let development know about it” - the heavy caveat was there because, unlike Vision or even Reporting, it’s just not feasible to train every support rep in the intricacies of web requests and the scripting required to use the webdev module. I don’t know the exact details of what’s changed, but I would still basically expect that to be true - don’t call into support with an expectation that you’ll get a rep who can tell you when to use POST vs PATCH, necessarily; but if you have a legitimate problem, they’ll escalate until they hit someone who does.

As for the native report viewer - no, no timeline. It’s on the primary feature backlog, but lower on the list than things like improved charting - so “soon”, but not that soon.

Ok. That’s a decent answer.

BTW, I understood not supporting WebDev as you mention. It sounds like a pretty powerful tool, but one that requires advanced training in things not normally encountered with Ignition, so not having all your support staff trained to help with it totally makes sense.

2 Likes

Hi,

Is it possible without Webdev Module ?
I would like to show a pdf stored on my local server in C:\Users\Admin\Documents\reports.

No. Web browsers do not allow you pages fetched over the internet to fetch local file resources, for security reasons.

Can PDF Viewer read files on a NTFS windows file server ?

For a browser, file servers are local file resources. Ergo, no. (Repeating statements above.) You will need the gateway to fetch from the NTFS file server via WebDev and deliver the PDF. That way, the PDF is coming from the same “source” as the Perspective page that wishes to display it.

If you absolutely cannot do this, stick with Vision.

Thanks.
So we have to buy Webdev Module to use PDF Viewer. :frowning_face:

Or use your own webserver returning appropriate CORS headers (or hosted on the same domain as the Ignition gateway).

Web is web. The restrictions on local file resources are a consequence of the browser environment, not a decision made by Inductive Automation/Ignition/Perspective.

3 Likes