Cannot view the pdf on the browser

Hello Sir,
Thanks for your reply. The problem of redirecting has been solved. My browser was infected.
The Main problem is that my journal do not show the pdf and throw the following error.
PDF.js v1.5.188 (build: 0e2d50f)
Message: Unexpected server response (0) while retrieving PDF “http://mydomain/index.php/journal_abbreviation/article/download/10/5/1”.

Some days before it was ok. The pdf viewer was working, there were two articles on my journal I deleted those two from the archive tab under submissions in the editor dashboard and uploaded ten new articles but none of them is showing the pdf now. Please help me to fix this issue. I will be very thankful to you.

Hi @Niazwali,

Have you tried the other suggestions on this thread? Which, and what was the result?

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks Sir,
After a long struggle and investigating the OJS code bit by bit, I found nothing wrong inside. The problem was that the internet download manager plugin has the option to catch files from the browsers before it render in the browser. I turned the IDM off and my journal display the PDF now.

Closed.

Dear @asmecher

I’m having a similar issue. I just registered my journal (http://sumateraresearch.org/ojs/index.php/jipi/issue/view/2) to online indexing. But they said they couldn’t open the pdf (but they can download it). Do you have any suggestion to solve this?

Hi @mctosima,

I checked one of the links and it looks fine. Is there a particular article that’s not working?

Regards,
Alec Smecher
Public Knowledge Project Team

Did you use VPN or Proxy ?
If I access those links using regular network, I can open the pdf or download it.
But if people access those link from Proxy (lets say Opera Browser + VPN), they can’t open the PDF (but still can download it)

@mctosima

I clicked the PDF of the first article from the link you provided. I can see it on the browser. There is a dark Red/Orange bar at the top, but I cannot view whatever is under the contents below. See the screen capture.

One thing that I have noticed is that when the MIME TYPE for a PDF is not properly identified during the upload process, the PDF does not display on the browser even though you can download it. You can correct it right on the database. To correct it, open up your OJS database in PHPMyAdmin. Look for the table article_files. Once you access the table, look for the column called file_type for the offending PDF. You can change whatever is there to this: application/pdf. I found that when this is updated, there is no issue with displaying the article for people that access your website.

The other thing I have noticed is that when I upload an MP3 on OJS. The MIME type is correctly identified, but instead of the label showing MP3, it shows untitled. I usually fix this by editing the submission directly on OJS and putting MP3 in the label field.

But the problem I was having at that time had to do with the way EzProxy was parsing IP address. I got that fixed by getting a stanza from ezProxy. If you are having issues with institutional subscribers and IP address, I can send you my stanza.

Screen1

1 Like

Thank You, the problem still mysterious. It even not showed up for some people.

I had the same problem, after one week of investigation, due your reply, i deactivate and reactivate the Google Scholar Plugin. Everything work fine now.
So, special thank’s to @asmecher & @Niazwali