URL for pdf.js getDocument

时间:2015-07-31 19:45:49

标签: javascript pdf pdf.js

I'm using pdf.js on an ASPX page on my website. The PDF file I'm trying to display is contained with the site, not on another server or another domain.

If I specify the PDF as any of the following, it opens correctly:

var url = 'MySample.pdf';
var url = '/MySample.pdf';
var url = '/Resources/MySample.pdf';

But if I use the following, it fails with a number of warning messages and then an error message:

var url = '/Resources/Products/MySample.pdf';

The error message is:

Uncaught (in promise): InvalidPDFException

Why can it not find my PDF file properly when it's down several folder levels from the site root folder?

Thanks for your help!

0 个答案:

没有答案