pipwerks / PDFObject

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

PDFObject: Page option not working in Microsoft Edge #291

Closed Rushita-Ginoya closed 1 year ago

Rushita-Ginoya commented 1 year ago

After refreshing the page, the PDF document using PDFObject does not start from the first page, even though I have specified the option pdfOpenParams: { page: 1 }.

Expected Behavior: When the page is refreshed, the PDF document should start from the first page.

Steps to Reproduce:

Observed Behaviour: After refreshing the page, the PDF document continues to appear from the third page instead of starting from the first page.

Additional Information: I have tried using the pdfOpenParams option with { page: 1 } to ensure that the PDF starts from the first page. However, this does not seem to work in Microsoft Edge.

Potential Solution: I have already attempted the following steps to resolve the issue:

Despite these efforts, the problem persists. It would be greatly appreciated if the development team could investigate this issue and provide a solution or workaround for making the page option work correctly in Microsoft Edge.

Environment:

Microsoft Edge version:  114.0.1823.51
Operating System: Ubuntu, Windows
pipwerks commented 1 year ago

Thanks for the detailed submission. Unfortunately, this is not something PDFObject can control. This behavior will be dependent on the PDF viewer provided by the browser.

One potential workaround is to remove the embedded PDF and re-embed.

Good luck

theodore-s-beers commented 1 year ago

For what it's worth, I was able to reproduce this in Edge on macOS. I have a feeling that Microsoft would describe this as a feature: "the in-browser PDF viewer saves your spot!"

Also note that support for PDF Open Parameters is rather spotty—when it's supported at all.