Cannot view the pdf on the browser

I have an institutional subscriber that is having some problem viewing a PDFs on their browser (in-line) when they are accessing from home (off-campus). Access is via their IP address, and they are using a proxy server. The are experiencing problems on Chrome and Safari from their Mac. Another user confirmed same issue in Windows, but did not specify browser. I am using the latest stable release.

Interestingly, they can download the PDF from home (off-campus), but cannot get the article to display in their browser.

They are getting this error. Anyone know what could be causing this issue?

PDF.js v1.0.907 (build: e9072ac)
Message: Unexpected server response (0) while retrieving PDF “http://www.domain.com/index.php/journal/article/viewFile/1112/4561

Any help will be greatly appreciated.

Thanks

Hi @newone,

If I provide you with my IP address, would you be willing to create a temporary subscribed user for me to test locally with?

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Hi Alec,

Sure, I can do that.

You can email the IP address to me.

Newone

A big thanks to Alec for identifying the issue.

This is what happened. In case, anyone else comes across a similar issue. The short answer is that this is an EzProxy issue. The issue resolves around the way EzProxy handles (or proxy) JavaScript. Given that the URL of the PDF in Open Journal Systems is encoded in JavaScript (as confirmed by Alec), and there are some incompatibility with JavaScript and EzProxy, it was producing the error detailed above.

We had finally resolved the issue, and all is working now.

Newone

1 Like

Hai… i have the same problem… with the pdf view… my OJS is 3.02. previously the pdf view is not in trouble. However somehow, today i got the problem… I got error message like this…
PDF.js v1.5.188 (build: 0e2d50f)
Message: Unexpected server response (204) while retrieving PDF “http://domain.ac.id/index.php/JSAI/article/download/15/11/”.
any helep please…

Hi @MUHAMMAD_DAILAMI,

Have you checked your PHP error log? Are you able to download that PDF via the PDF download link?

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for your response. Yes i can download the PDF but couldn’t view the pdf directly from the browser. I found some one already hacked my ojs. in each folder of my web there are a weird file call 17.php and inside the file is script. There is information inside the file that showed his identity, this guy Indonesian Freedom Security - Home | Facebook who hacked my ojs. I decide to delete all the OJS and reinstalled and redesigning. I think it was my fault put the submission file in the public html folder.

Hi @MUHAMMAD_DAILAMI,

Yes, it’s likely that your site was hacked because the files_dir was inside the web root. Glad to hear you’ve got it moved and cleaned up.

As for the PDF view issue, is your site public? Can you send me a URL?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher

I haven’t finished rewrite my web. but here the url ejournalfpikunipa.ac.id… There is no pdf file yet. Right know i am still figuring out why my Quicksubmit plugins it doesn’t work. After i filled the quicksubmit form and click save always give me a blank page… I just looking for in this forum.

Hi @MUHAMMAD_DAILAMI,

See e.g. this FAQ entry.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Could you help me please… i got the same eror like this pdf view… but i still can download the pdf file, but could not showing in browser. What should i do to repair this problem, please give me a quite details to fix it.

Hi @MUHAMMAD_DAILAMI,

At a glance, your journal appears to be presenting PDFs without trouble. What is a specific URL that you’re having trouble with?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, here the example of teh link…
http://ejournalfpikunipa.ac.id/index.php/JSAI/article/view/13/6

I don’t know, why today i can open the pdf view. 2-3 days ago, i can’t open
the pdf view, when i open the link above the web give me a download of the
pdf file but doesn’t give me a view of the pdf in the browser. i didn’t do
anything. but they work again rigt now… Is there anything wrong that
makes my web likely unstable for viewing the pdf in browser?

Hi @MUHAMMAD_DAILAMI,

I’m not sure of anything – perhaps if the network is slow or unreliable?

Regards,
Alec Smecher
Public Knowledge Project Team

hi, could you help me please… i got same error when showing pdf file but i still can download that pdf file, can you help me to fix that, i run my web using local server
thank

Hi @Kamal_Khairy,

There are several error messages described here. Which did you receive? Could you describe your environment in detail, e.g. which version of OJS you’re using?

Regards,
Alec Smecher
Public Knowledge Project Team

hi @asmecher, i make a web using localhost server, so i think i not using OJS, i use chrome ver 60.0.3112.113, xampp ver 3.2.1, PDF.js v1.8.557 (build: 4a74cc41), i was add plugin for pdf reader on my chrome
here the error message:
Message: Unexpected server response (204) while retrieving PDF “http://localhost/sib%20coy%20-%20Copy/admin/files/document_2.pdf”.

Hi @Kamal_Khairy,

This forum is for PKP software, i.e. OJS (Open Journal Systems), OMP (Open Monograph Press), OCS (Open Conference Systems), etc. I don’t think you’re using any of those. I’d suggest posting on StackOverflow or somewhere more general.

Regards,
Alec Smecher
Public Knowledge Project Team

Hello all. I have the same issue. I can not view the PDF but can download it. Also I am redirected to “https://www.liveadexchanger.com/script/preurl.php?r=1626479” when clicking on links on my ojs website. Please help me to get rid of it. I get the following error when accessing the PDF
PDF.js v1.5.188 (build: 0e2d50f)
Message: Unexpected server response (0) while retrieving PDF “http://jbkmc.bkmc.edu.pk/index.php/jbkmc/article/download/10/5/”.
Alec I have mentioned my domain please help me to solve. thanks

Hi @Niazwali,

Nothing inside OJS refers to liveadexchanger dot com. It’s possible that your site has been compromised and modified. I would suggest searching your code for liveadexchanger to see where this is coming from.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like