Displaying PDF on form - uipath.studio.resources.host being added to src URL

In the old version of forms this worked fine inside of an edit grid, with the path to the file stored in the datatable:

<iframe src='/file://{{row.pathToFile}}'></iframe>

However, in the new version of forms the result is:

It looks like the webpage at **https://uipath.studio.resources.host//file:////xxxx.com/PDFFile.pdf** might be having issues, or it may have moved permanently to a new web address.

When I try to use <embed> instead of <iframe> the result is the same, it’s adding that https://uipath.studio.resources.host/ path onto the front of it and the file is not displayed.

If I use a local PDF it works fine, but with a UNC it won’t work. I’ve tried half a dozen different ways, nothing works.

So after two days of trying every combination I could think of, the ONLY thing that works is if the PDF file is in the same folder as the form file. (It can also be a subfolder of the folder the form file is in)

<iframe src='filename.pdf'></iframe>

or

<iframe src="Temp\filename.pdf"></iframe>

Where Temp is a subfolder of whatever folder the .uiform file is in.

Using full path (ie C:\somefolder\somefile.pdf) does not work. UNCs do not work. It doesn’t matter whether you include file:/// or whatever it still doesn’t work. Only files local to the form will actually display. So if the file you want to display is stored somewhere else, you’ll have to have your automation copy it to the form folder (or a temp folder under the form folder) and use just the filename.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.