Pdf.js opens PDF always on same page as the last PDF

I’d like to ask whether OJS saves any page number information with the session ID on server side, because we run into some interesting behaviour when PDF.js is involved.

Imagine the following situation:

  1. User opens article PDF file and scrolls to page 3.
  2. User clicks the back button or any link on the site to navigate to another article PDF.
  3. expected behaviour: The other article is opened on page 1.
    actual behaviour:The other article is opened on page 3.
  4. From this point, new PDFs are always opened with the page number on which the previous PDF view was left, even if the user scrolls.
  5. If the new PDF doesn’t have enough pages, it is opend on the first page, but the PDF file opened after that is still opened with the page number on which the previous PDF view was left.

I understand this could mainly be an issue with pdf.js and not OJS itself, but since the page number seems to be kept for the whole session, I thought it might be saved with the session info. I’m not seeing an additional pdf.js cookie, though.

Hi @ojsbsb,

OJS doesn’t do anything like that; I’d suggest checking with the PDF.js folks.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

As another datapoint, the International Journal of Telerehabilitation currently uses the PDF.js plugin as shipped with OJS 2.4.8, and I couldn’t replicate the problem there (at least in Firefox).

Thanks, @ctgraham, I see that this journal is using 2.4.8, while ours is on 2.4.7.1. I’ll keep this in mind when we update and then check again.

we just tested the issue again with 2.4.7.1 and 2.4.8. and it does not appear anymore.

Hi @ojsbsb,

Great, thanks for following up!

Regards,
Alec Smecher
Public Knowledge Project Team