Opening a PDF from URL Loads Page Twice

Forum for the PDF-XChange Editor - Free and Licensed Versions

Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Paul - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange

greenfrog
User
Posts: 2
Joined: Wed Oct 29, 2025 2:26 pm

Opening a PDF from URL Loads Page Twice

Post by greenfrog »

I'm developing a website that needs to run on Internet Explorer 11 (Edge in IE mode, specifically) and that lets users open PDFs through links. IE does not have a PDF viewer built-in so it opens whatever the user has installed as their PDF viewer, which is PDF-XChange Editor for many of our users.

The problem I'm running into is that our attachment links have query parameters and need to run through some validation before serving the file. When a user clicks on a PDF link, it triggers our page load twice: once without query parameters (which won't work) and once with query parameters (which works). I only need the code to trigger once with the params.

- Example Correct URL with param: http://app/SimpleFileReturn.aspx?ID=12345
- Example Invalid URL no param: http://app/SimpleFileReturn.aspx

After some poking around I found that this is because IE causes PDF-XChange Editor to use it's "Open from URL" option, which tries to both connect to the site - this is when the url without params is triggered - and opens the url with the params.

Connecting to site pop-up:
Connecting to Site Pop-Up.png
Opening document pop-up:
Opening document from Pop-Up.png

What is the "connect to site..." part for? Does anyone know why it removes the URL params like it does?

Is there anyway to avoid the initial "connect to the site" part? I checked the settings but I didn't see an option for that.

I found another post (viewtopic.php?t=33027) that sounds similar to the issue I am running into, except the poster's issue was resolved in a previous update and the issue I'm getting is still occuring on the latest version.

PDF-XChange Editor Specs:
- Version: 10.7.5, build 403

PC Specs:
- Windows OS version: Microsoft Windows 11 Pro 10.0.26100 Build 26100
- Not running on a virtual PC
You do not have the required permissions to view the files attached to this post.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12082
Joined: Wed Jan 03, 2018 6:52 pm

Re: Opening a PDF from URL Loads Page Twice

Post by Daniel - PDF-XChange »

Hello, greenfrog

Thank you for the inquiry, I will need to defer to the dev team on the specifics of these items (and i have asked them to take a look when they get a chance here).

In the meantime, my first question would be despite this seeming "double load" - does the document still open as expected in the end, or do you periodically see an error resulting in it failing?
I am trying to determine if this is an urgent issue that needs fixing or if your inquiry is at the core, purely academic.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com
greenfrog
User
Posts: 2
Joined: Wed Oct 29, 2025 2:26 pm

Re: Opening a PDF from URL Loads Page Twice

Post by greenfrog »

Thanks for your quick response Dan.

I should have mentioned it in my original post, but yes, the document does open as expected in the end so it's not a complete work stoppage issue. The correct file opens and I haven't noticed any issues when saving/interacting with the opened doc.

However, we have error logging that checks when parameters aren't in the URL, since otherwise our code won't work. That means our error logs are filling up really quick. Every time someone opens a PDF attachment the error through PDF-XChange Editor it gets logged.

We could turn that specific logging off, but then we might miss if something bad actually happens and users can't access attachments anymore.

So basically, it's pretty annoying, but not a critical issue.
User avatar
Daniel - PDF-XChange
Site Admin
Posts: 12082
Joined: Wed Jan 03, 2018 6:52 pm

Re: Opening a PDF from URL Loads Page Twice

Post by Daniel - PDF-XChange »

Hello, greenfrog

Thank you for clarifying, to me that still sounds slightly more urgent than a simple "visual glitch" would have been, so I have informed the dev team of a moderate priority. We will get back to you as soon as we can.

Kind regards,
Dan McIntyre - Support Technician
PDF-XChange Co. LTD

+++++++++++++++++++++++++++++++++++
Our Web site domain and email address has changed as of 26/10/2023.
https://www.pdf-xchange.com
Support@pdf-xchange.com