Cannot view the pdf on the browser

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

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?