Issue with Opening PDF from URL in docViewer.OpenDocument() - Error Message Included

Hi Team,

I’m working with DocuNot MVC Core and using the DocuNot.NETStandard (25.10.0) version. I’m trying to open a PDF document hosted at a URL using the docViewer.OpenDocument() method, but I’m running into an error. Here’s the code I’m using:

var pathToFile = “https://www.antennahouse.com/hubfs/xsl-fo-sample/pdf/basic-link-1.pdf”;
docViewer.OpenDocument(pathToFile, config, documentOptions);

However, I’m getting the following error:
"Unable to open document. Error: {“success”:false,“message”:"Physical file does not exist or has no read access, https://www.rd.usda.gov/sites/default/files/pdf-sample_0.pdf"}"
image.png (3.7 KB)

Can anyone help me figure out what’s going wrong? I suspect it might have something to do with how URLs are handled in DocuNot.

Any suggestions on how I can resolve this? Is there something special I need to do when opening a document from a URL?

Thanks in advance for your help!

@Mohit_Tandel

Thank you for your detailed post and for sharing your code snippet.

We have tried to replicate the issue on our side using the same approach with a remote PDF URL, but unfortunately, we were not able to reproduce the error.

To help us investigate this more accurately, could you please share a small sample project that reproduces this behavior? A minimal MVC Core project with the same configuration where the issue occurs would be perfect.

Once we have the sample, we’ll be happy to analyze it and provide you with a precise solution.