Why won't Edge open a PDF on the first page when specified in the URL?

Calum Ridyard 0 Reputation points
2024-07-19T11:45:20.0233333+00:00

I am trying to open PDFs on specific pages using the "#page=<pagenumber>" parameter of the URL. This works seemlessly in Chrome, Firefox and Adobe Acrobat Pro, but I have one small issue in Edge: this command is seemingly ignored if I specify "#page=1". Specifying other pages is no issue and the requested page is honoured, but when page 1 is specified, Edge instead opens the PDF on the last viewed page. I know that this setting can be turned off by the user (https://techcommunity.microsoft.com/t5/discussions/remember-pdf-position-disable-option/m-p/2988362), at which point Edge does seem to behave as the other browsers/PDF viewers, however I'm a developer and I want to be able to guarantee the correct page is opened whatever settings my users have in place. It seems a bit odd to me that specifying "#page=1" is treated as if there is no parameter included at all. If I didn't care what page the document was opened on, I wouldn't specify it in the URL.

For reference, we first spotted this issue on Windows 10, but it continues since upgrading to Windows 11. I am currently using Microsoft Edge for Business version 126.0.2592.102 to test this, but the issue was first reported to my team in May 2024. I can reproduce the issue by manually editing the URL in Edge, so I've ruled out any issue with how our program issues the command to Edge itself.

Microsoft Edge
Microsoft Edge
A Microsoft cross-platform web browser that provides privacy, learning, and accessibility tools.
2,236 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. ShiJieLi-MSFT 8,731 Reputation points Microsoft Vendor
    2024-07-22T03:52:01.9366667+00:00

    Hi @Calum Ridyard,

    Unfortunately, this is mostly out of user preferences, and the behavior cannot be changed via code.

    If your users are limited within an organization or somewhere you can manage their devices, I suggest you disable a group policy called RestorePdfView, which will forcibly disable the Open PDFs to last viewed location when you reopen files setting for all users.

    If you can't manage your users, I suggest you send feedback (Alt+Shift+I) to report this problem to Edge Dev Team. Normally, if you turn on the "restore last viewed location" setting, every #page=<pagenumber> parameter will be ignored, but in this case only #page=1 is ignored, so it looks like an unexpected behavior to me. So it's better to report this problem to the Team.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Best Regards,

    Shijie Li

    0 comments No comments