Feed PDF to PDF viewer with script

Hi, I am trying to read a pdf from a local webserver but sometimes the webserver fails to serve the pdf I have requested. Currently I use PDF viewer in a way i just put url to the props.source property. But in case webserver does not serve the file it just keeps loading. I would like to implement some kind of a read timeout.

I know that system.net.httpGet() has readTimeout parameter and I was thinking I could use it. Question is - can I read a pdf with system.net.httpGet() and feed it to the PDF viewer?

Thank you

No, Perspective’s PDF viewer ‘fetches’ from the ‘frontend’ (wherever the session is running), and all scripting or expressions in Perspective are running on the ‘backend’ (wherever the gateway is running).

In this case, the ‘fetch’ is actually handled entirely outside of our code (by react-pdf), and there’s no way to control how that data is fetched.

can you think of a way how could I handle the timeout scenario?