In PDF.js, using viewer.js and viewer.html, I can specify a PDF by assigning the filename in defaultURL.value, but the PDF must exist in the same folder as viewer.js. I want to specify the pdf file location in a parameter.
I tried setting the docBaseURL, but it wants an absolute path and will not accept http://localhost/. No matter what I put there, it looks to the baseURI of the PDF named.
I have looked and set breakpoints at all references in viewer.js for opening the document or specifying the file location, but none specify the relative links, only the variable "file". I searched the github project, but found no issues as to how to set relative links, only if the absolute URL is http://something.
I am trying to modify viewer.html for my own use. I don't want to call it from an iFrame or use a querystring. I want to set the defaultURL, then change the code so it will look for the file in the path or relative path that I specify.