OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



PDFs display differently

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.

PDFs display differently

Postby geirrosset » Fri Oct 11, 2013 5:01 am

Hi

I have a question about pdf galley display.
On iPhone (I don't have any Android devices) some pdfs are displayed single page scrolling (with an option to open in iBooks), while others are displayed inline on the web page.

Single scrolling: http://ojs.novus.no/index.php/SID/article/view/421/402

Inline: http://ojs.novus.no/index.php/SID/article/view/270/256

Why would this be the case as both links look identical? On mobile devices the former method is preferred as the inline frame is impossible to scroll and also too small to read the content.

On my Mac, using Safari, the difference is that the first link downloads the pdf while the second one displays it inline. Is there something in OJS settings which triggers these different behaviours?

Best regards
Geir R
geirrosset
 
Posts: 38
Joined: Tue Aug 30, 2011 1:57 am

Re: PDFs display differently

Postby asmecher » Fri Oct 11, 2013 6:31 am

Hi Geir,

The difference likely has to do with MIME types; check the article_files table in your DB.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8307
Joined: Wed Aug 10, 2005 12:56 pm

Re: PDFs display differently

Postby geirrosset » Fri Oct 11, 2013 6:41 am

Here are the two rows from the DB. I can't see anything here which would explain the difference in behavior when clicking on the link.

579 1 NULL NULL 270 270-579-1-SM.pdf application/pdf 131943 SID2011-2-a1.pdf submission/original NULL 2012-05-03 16:05:03 2012-05-03 16:05:03 1 NULL

553 1 NULL NULL 258 258-553-1-SM.pdf application/pdf 82586 SID2012-1-a1.pdf submission/original NULL 2012-03-21 10:30:12 2012-03-21 10:30:12 1 NULL

Geir
geirrosset
 
Posts: 38
Joined: Tue Aug 30, 2011 1:57 am

Re: PDFs display differently

Postby asmecher » Fri Oct 11, 2013 8:43 am

Hi Geir,

Let's try tracking down the entries for the two URLs you gave above:
Code: Select all
SELECT * FROM article_files f JOIN article_galleys g ON (g.file_id=f.file_id) WHERE (f.article_id=421 AND g.galley_id=402) OR (f.article_id=270 AND g.galley_id=256);
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8307
Joined: Wed Aug 10, 2005 12:56 pm

Re: PDFs display differently

Postby geirrosset » Mon Oct 14, 2013 4:49 am

Running that query returns only one result:

579 1 NULL NULL 270 270-579-1-SM.pdf application/pdf 131943 SID2011-2-a1.pdf submission/original NULL 2012-05-03 16:05:03 2012-05-03 16:05:03 1 NULL 256 NULL no_NO 270 579 PDF 0 NULL 0 13

Regards
Geir
geirrosset
 
Posts: 38
Joined: Tue Aug 30, 2011 1:57 am

Re: PDFs display differently

Postby asmecher » Tue Oct 15, 2013 9:51 am

Hi Geir,

Hmm, that's strange -- that should have returned 2 rows. Can you try the following:
Code: Select all
SELECT * FROM article_galleys WHERE galley_id=402;
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8307
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 4 guests