OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS 2.3.4 PDF not displaying

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

OJS 2.3.4 PDF not displaying

Postby djbduncan » Mon Feb 21, 2011 9:23 am

Hi

We recently upgraded to OJS 2.3.4 and in the process we can no longer view embedded PDFs. Here's an example:

http://dandelionjournal.org/index.php/d ... view/35/64

I checked the board and saw that this was an issue for earlier version, involving a misnamed variable in /templates/article/article.tpl, but that doesn't seem to be the case here, as noPluginText seems to be correctly named in 2.3.4.

Could anybody suggest what else might be preventing the articles from displaying. (The do download correctly if you follow the "Download This PDF File" link)

Thanks
Dennis
djbduncan
 
Posts: 8
Joined: Mon Feb 21, 2011 9:18 am

Re: OJS 2.3.4 PDF not displaying

Postby alejo » Fri Feb 25, 2011 11:16 am

Hello, Dennis

I'm having the same problem as you, but I think you managed to solve it, because your article "In praise of speed is showing correctly. What did you do.

Greetings,
Alejo
alejo
 
Posts: 11
Joined: Thu Apr 23, 2009 9:35 am
Location: Caracas, Venezuela

Re: OJS 2.3.4 PDF not displaying

Postby djbduncan » Fri Feb 25, 2011 1:15 pm

Hi Alejo

I commented out the two lines of code relating to the doc type in /templates/articles/header.tpl:

Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!--
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-->
<html xmlns="http://www.w3.org/1999/xhtml">


Unfortunately, it looks as if this only fixed the issue for Firefox. The articles still aren't displaying in Internet Explorer.

Dennis
djbduncan
 
Posts: 8
Joined: Mon Feb 21, 2011 9:18 am

Re: OJS 2.3.4 PDF not displaying

Postby alejo » Sat Feb 26, 2011 8:58 am

Thanks, Dennis, for your quick response

It worked fine for me in Firefox after commenting those two lines, and I can see pdfs normally on IE 7 -with a limitation-, Safari and Google Chrome.

The limitation for IE 7 is fullscreen not working properly: the pdf document remains the same size on a black background, and the link "Fullscreen off" doesn't show up. Any ideas?

Thanks again,
Alejo
alejo
 
Posts: 11
Joined: Thu Apr 23, 2009 9:35 am
Location: Caracas, Venezuela

Re: OJS 2.3.4 PDF not displaying

Postby djbduncan » Sat Feb 26, 2011 2:13 pm

Hi Alejo

It seems to be working OK in Firefox, Chrome & Safari. But NOT IE8!!!

I'm not quite sure what is going on in IE8, as the warning message ("The PDF file you selected should load here...") briefly appears then disappears.

Also the problem goes away if you remove the <div id="container">, <div id="body"> and <div id="main"> tags, although that's not much use!

UPDATE: The problem is to do with the WIDTH attributes which have been defined for these tags. It seems that IE8 won't display an embedded PDF if it comes across any attempt to define the width of the embedded object. Comment these out in the CSS and it works OK. (Although that's not much use, as you lose all your page formatting, reader tools, etc., etc.)

Dennis
djbduncan
 
Posts: 8
Joined: Mon Feb 21, 2011 9:18 am

Re: OJS 2.3.4 PDF not displaying

Postby jmacgreg » Thu Mar 03, 2011 9:56 am

Hi Dennis,

Apologies for the late reply. While it looks like you have upgraded to OJS 2.3.4, it also looks like you are using the old way of displaying PDFs. PDF display changed quite a bit in OJS 2.3.3, and the old templates won't be exactly compatible with the new display method. How did you upgrade, and how did you manage to keep your old article view template?

Alejo, can you provide a link to your journal so I can take a look? Please also let us know which version of OJS you are running, if you had made any modifications, and whether it is an upgrade.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OJS 2.3.4 PDF not displaying

Postby tdodson » Thu Mar 03, 2011 5:34 pm

I'm having this same problem with embedded PDFs in my installation: http://pdrjournal.org.

It seems to work in Safari, Chrome, IE, and Firefox for the PC. The only browser it fails to render in for me (providing the stock message) is Firefox on a Mac OS.

I tried solutions I'd seen elsewhere: the commenting out fix mentioned previously didn't resolve it.

I read this post: viewtopic.php?f=9&t=6780 which seemed to suggest that file size might be a factor, so I tried a tiny PDF file and had the same issue, so it's not that.

So, does anyone know what's so special about Firefox on a Mac OS? Our readers are an artsy crowd, so I suspect we're going to have quite a few Macs and Firefox is a popular browser; any plans to fix this in a later patch?

In the meantime, I did the following workaround. Since we're only doing PDFs for the stories and poems, I attached an "HTML" version which I edited to appear as "Download PDF" in the TOC. This file is not the HTML version, but a simple page with a bit of javascript that takes the reader directly to the file download, circumventing the page with the embedded PDF. Here's the code (the link is to a short story):

Code: Select all
<html>
   <head>
   <title>Article Redirect</title>
   <script type="text/javascript" src="script.js"></script>
   </head>
<body>
   <p align="center">If your download doesn't start within a few
seconds, please click here:  <a href="http://pdrjournal.org/index.php/pdr/article/download/17/8">http://pdrjournal.org/index.php/pdr/article/download/17/8</a>.</p>

   <script type="text/javascript"><!--

      setTimeout('Redirect()',4000);

      function Redirect() {
        location.href = 'http://pdrjournal.org/index.php/pdr/article/download/17/8';
      }
// --></script>
</body>
</html>
   
tdodson
 
Posts: 2
Joined: Fri Feb 11, 2011 12:38 pm

Re: OJS 2.3.4 PDF not displaying

Postby djbduncan » Fri Mar 04, 2011 3:37 pm

Hi James

I was unable to find any solution which would get those embedded PDFs to display correctly across all browsers, so I went back the old way of showing PDFs by making a code change to /pages/article/articleHandler.inc.php and uploading the old /templates/article/PDFInterstitial.tpl from OJS 2.3.2.1.

I've crossposted on this I'm afraid, after originally posting the problem in the OCS forum by mistake, so there are a few more details here: http://pkp.sfu.ca/support/forum/viewtopic.php?f=3&t=7227#p27961

Best
Dennis
djbduncan
 
Posts: 8
Joined: Mon Feb 21, 2011 9:18 am

Re: OJS 2.3.4 PDF not displaying

Postby kreissaege » Wed Mar 16, 2011 7:47 am

Hi Dennis,
I have the same issue after switching to 2.3.4.
I've tried in Opera 11 , Firefox 3.6 and IE 7
If I disable JavaScript in Opera and Firefox, I get also the error
"The PDF file you selected should load here if your Web browser has a PDF reader plug-in installed ..."
On IE it doesn't work in anyway.
Maybe this information help? But I also need a solution.
Best regards
K. Bretschneider
kreissaege
 
Posts: 24
Joined: Thu Nov 05, 2009 4:14 am

Re: OJS 2.3.4 PDF not displaying

Postby jmacgreg » Fri Mar 18, 2011 11:15 am

Hi K. Bretschneider,

Could you provide us with a link to your install to test?

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OJS 2.3.4 PDF not displaying

Postby raickonen » Thu Mar 24, 2011 7:22 am

I have a similar issue with Firefox, I opened an issue nr. 6535.

Is there any solution for that, I'm using 2.3.3.3, applied all recommended patches.


link for a test:

http://seer.ufrgs.br/Movimento/article/view/18232/11099

Tks

Luciano
raickonen
 
Posts: 34
Joined: Tue Nov 16, 2010 10:39 am

Re: OJS 2.3.4 PDF not displaying

Postby jmacgreg » Sun Mar 27, 2011 7:19 pm

Hi Luciano,

Was your PDF file properly detected as a PDF when you uploaded it under Submission Editing -> Layout Editing? It's galley label should have originally been set to "PDF"; if it was set to something like "Untitled", then your system may be having problems determining the uploaded files' filetypes. See this FAQ entry for more information.

Cheers,
James
jmacgreg
 
Posts: 4190
Joined: Tue Feb 14, 2006 10:50 am

Re: OJS 2.3.4 PDF not displaying

Postby raickonen » Mon Mar 28, 2011 9:45 am

This article isn't new. It came from 2.2.2 version.

Luciano
raickonen
 
Posts: 34
Joined: Tue Nov 16, 2010 10:39 am

Re: OJS 2.3.4 PDF not displaying

Postby kreissaege » Wed Mar 30, 2011 1:48 am

jmacgreg wrote:Hi K. Bretschneider,

Could you provide us with a link to your install to test?

Cheers,
James


Hello James,
sorry I can't; this is a test instance within a private network; can we communicate by email about this?
My email is bretschneider(at)zpid.de
Cheers,
Katrin
kreissaege
 
Posts: 24
Joined: Thu Nov 05, 2009 4:14 am

Re: OJS 2.3.4 PDF not displaying

Postby jaik_70 » Thu Mar 31, 2011 6:08 am

Dear James

I have new instalation of OJS-2.3.4. In Crome browser PDF file shwing fine but in IE8 it's giving following :

The PDF file you selected should load here if your Web browser has a PDF reader plug-in installed (for example, a recent version of Adobe Acrobat Reader).

Alternatively, you can also download the PDF file directly to your computer, from where it can be opened using a PDF reader. To download the PDF, click the Download link below.

If you would like more information about how to print, save, and work with PDFs, Highwire Press provides a helpful Frequently Asked Questions about PDFs.



However, it's working fine if we use " Download this PDF file "

PS: ISP is Godaddy

-Jaik
jaik_70
 
Posts: 42
Joined: Tue Jun 02, 2009 5:49 am

Next

Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Yahoo [Bot] and 6 guests