pipwerks / PDFObject

A lightweight JavaScript utility for dynamically embedding PDFs in HTML documents.
http://pdfobject.com/
Other
2.39k stars 986 forks source link

PDFJS_URL parameters fix #267

Closed SoftCreatR closed 2 years ago

SoftCreatR commented 2 years ago

If PDFJS_URL contains a question mark already, building fullURL (including the pdf file as parameter) may fail.

pipwerks commented 2 years ago

Thanks, I will test it out

SoftCreatR commented 2 years ago

I'm using this for ages now. The problem is, that the PDF.js viewer is loaded using a dynamic URL, which isn't working without this tiny fix.

pipwerks commented 2 years ago

Fixed in 2.2.8, available for testing in a new branch https://github.com/pipwerks/PDFObject/tree/2.2.8

I have tested locally and via BrowserStack, I will merge w Master after I test a little more.

I did not use this PR as the code was changed as part of a broader refactor, but I did use a modified version of your code. Thanks for the submission!