Moodle 2 recognizes .pdf file, but does not display

Moodle 2 recognizes .pdf file, but does not display

by Deleted user -
Number of replies: 22

When I create a File resource and upload a .pdf file, Moodle 2 recognizes the file type because it shows a .pdf icon next to the file name.  However, when you select the file, it displays the description but displays a blank window.  This is just a small, standard black and white .pdf.  Any ideas?

Average of ratings: -
In reply to Deleted user

Re: Moodle 2 recognizes .pdf file, but does not display

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Have you tried in a different browser and/or on a different PC before we go any further. I've known the PDF reader software and plugin to go weird before now. Might be worth downloading the latest from Adobe.

Failing that, can you work out what the URL of the PDF is that moodle is displaying. Some people seem to be having file picker problems where an incorrect URL is generated - I wonder if it could be that.
In reply to Howard Miller

Re: Moodle 2 recognizes .pdf file, but does not display

by Deleted user -

I think it is sort of fixed.  My updated Firefox 3.6.13 did not have a .pdf reader app listed under Tools-Options-Applications.  Once that was fixed, it will pull up the .pdf if the resource uses "in pop-up" as the display choice -- but "automatic" as a display option does not work like Moodle 1.9.x.

In reply to Deleted user

Re: Moodle 2 recognizes .pdf file, but does not display

by Kim Scannell -
I stumbled upon this issue, too -- the Automatic setting not working for PDFs in Moodle 2.

I discovered that it is not an issue with the resource display settings, but rather with the theme; in my case it was the Brick theme that did not display PDFs correctly. I changed to another theme and it works fine.
In reply to Kim Scannell

Re: Moodle 2 recognizes .pdf file, but does not display

by Jim Cook -

I have the same problem.  I am using the darkb theme for moodle 2.0.  I am only using PDF files is a couple of places so far.  The problem occurs when I try to open a PDF from a Main Menu resource.  The PFD flashes on for a second and then disappears.  Interesting to note that from a Topics Box on the Front Page PDF files work as expected.  Have not tried a PDF from within a course yet.  If you tell a PFD to open in a new window I would think that the theme would not have anything to do with the issue.  I would lean toward a bug.  How do we have someone look into this? 

Jim

In reply to Jim Cook

Re: Moodle 2 recognizes .pdf file, but does not display

by Glenys Hanson -

Hi Jim,

I would contact the author of the theme.

Cheers,

Glenys

In reply to Jim Cook

Re: Moodle 2 recognizes .pdf file, but does not display

by Bill Steele -

I am using the Aardvark theme and it does not display a pdf in a course using the Automatic setting. IE9 indicates that the file is being uploaded but it only uploads a fraction of the file before it stops

In reply to Bill Steele

Re: Moodle 2 recognizes .pdf file, but does not display

by Sali Kaceli -

Bill we have the same problem as you state. We are using the Aardvark theme (not the very latest version but the one before the May release) and are finding that pdf files set to Automatic do not open.

Mary, any suggestions on this one as to what controls this setting in the previous version of Aardvark? I have made a lot of little changes to the theme colors and would prefer not updating and reapplying every little change I have made to the new version of your theme? By the way, excellent theme.

 

In reply to Deleted user

Re: Moodle 2 recognizes .pdf file, but does not display

by Sue Holtz -

I am having the same problem, but here are some interesting facts:

Using Moodle 2.0.3 (Build: 20110505) Adobe X (upgraded today)

Using Current Firefox

I have four Categories and six sub-categories under each

If I try to upload a pdf to a course in a Category I can see the pdf when I click on the Resource

When I move that course to a Sub-Category, I can no longer see that pdf

We are using a custom theme

In reply to Sue Holtz

Re: Moodle 2 recognizes .pdf file, but does not display

by Mary Evans -

Hi Susan,

This problem only seems to be in themes which do not specify #page-header and #page-footer using instead #header and #footer like Moodle 1.9 themes did.

Moodle 2.x.x uses JavaScript to embed objects like PDF files, URLs, etc and uses page-header and page-footer in the algorythm which determines where they shuld be in a page. Because these two variable names do not exist the value returned is zero (0).

All core theme's now have page-header and page-footer.

Your theme is a custom theme by New School Learning and as most of the themes in Moodle Core are by New School Learning they too did not use page-header and page-footer, you will have this problem too.

But I suggest you contact NSL Support for assistance with your custom theme!

Mary

 

In reply to Mary Evans

Re: Moodle 2 recognizes .pdf file, but does not display

by Doug Moody -

I think Mary has it right on this one. But it is surprising to me, because I am right now in the process of adding PDf files to my course.

Can someone track this down and tell us fellow Moodlers which themes in 2.x DO work? I don't want to assume the theme I have is working when in fact it is not (lots of work for nothing)

Also, if anyone contacts NSL and they propose a fix, would you kindly report back here what the fix is? That would be most appreciated. Thanks.

In reply to Doug Moody

Re: Moodle 2 recognizes .pdf file, but does not display

by Mary Evans -

Hi,

I seem to have missed this post since my last reply. All theme in Moodle 2.0.4 and Moodle 2.1.x are all fixed. So you should not have any issues. If your Moodle version is 2.0.3 there may be some themes which need fixing. The easiest solution is to upgrade.

HTH

Mary

In reply to Mary Evans

Re: Moodle 2 recognizes .pdf file, but does not display

by David Kimball -

Mary, I am using 2.0.7 with the Magazine theme and this PDF dissappearing act is happing to me also.

In reply to Mary Evans

Re: Moodle 2 recognizes .pdf file, but does not display

by Sue Holtz -

We made the change to div id="page-header" and "page-footer" a while ago. But in the meantime, we set our pdfs to display in a pop-up. Using that option, instead of Automatic or Embed, the pdfs are shown. After we made the change to our *-mod.php files, the pdfs show in courses in the main categories, but not in the sub-categories.

So, we are back to using the Pop-Up option.

In reply to Sue Holtz

Re: Moodle 2 recognizes .pdf file, but does not display

by Sue Holtz -

Any suggestions on fixing this? My instructors come back next week, and I would like to have a solution for them, if possible.

In reply to Sue Holtz

Re: Moodle 2 recognizes .pdf file, but does not display

by Mary Evans -

Hi Susan,

I'm working on this now and sending you a replay from NSL support. It looks like this is a BUG at sub-category, but could just be your version of Moodle. Any chance you could upgrade? Moodle has come on leaps and bounds since Moodle 2.0.3.

Thanks

Mary

In reply to Mary Evans

Re: Moodle 2 recognizes .pdf file, but does not display

by Sue Holtz -

Mary, We upgraded to 2.1 a couple of weeks ago and are still having this same issue, only at the sub-category level. Yes, it has improved, just the occasional glitch.

In reply to Mary Evans

Re: Moodle 2 recognizes .pdf file, but does not display

by Sue Holtz -

Mary, It MAY be a Firefox issue, as I can use Automatic for a pdf when I use Chrome.

In reply to Sue Holtz

Re: Moodle 2 recognizes .pdf file, but does not display

by Dag Klimas -
Picture of Particularly helpful Moodlers Picture of Testers

If you have updatet your Acrobat-Reader it is possible, that Firefox did not use the "new" plugin. This is an old problem. And this is the reason why I told in my Moodle-Trainings: use the Download-Funktion. So the Student can say open (not as plugin) oder save. And then, there in less support needed smile

At my thinking: this is not a Moodle-Problem.

Greetings from Berlin Dag

In reply to Deleted user

Re: Moodle 2 recognizes .pdf file, but does not display

by Diego Maté Cuñado -

Hi everybody:

This post is about to solve the problem between darkb theme and emmbed pdf's.

The problem is about the moodle 1.9.+ legacy of darkb theme, because darkb do not specify #page-header and #page-footer in core.css and moodle needs booth of them to calculate dimmension (moodle uses JavaScript ) of embed objects  like PDF files, URLs, ...

So, you are very close to fix the problem, to do it 100% you have to change the name of the tag in moodle/lib/javascript-static.js on line 326 & 327, where the file ask for 'headerheight' & 'footerheight'.

I mean, replace:

- page-header to headerinner

- page-footer to headerinner

And know pdf will be embed at all.

Regards from Spain!

P.D.: We'd developed a new moodlebar for moodle 2.0, you can see a demo video and download it from:

http://www.thalentia.com/thalentia-soluciones-de-formacion/thalentia-moodlebar.php

Attachment pdf_thalentia.jpg
In reply to Diego Maté Cuñado

Re: Moodle 2 recognizes .pdf file, but does not display

by John Holmes -

Diego, Your Moodle bar is very slick. I would highly recommend others that are reading this post to take a look.

We have not yet upgraded to Moodle 2, we're still on 1.9

Any chance this might work with 1.9?  If you think there is a chance I'll give it a go, but if you know it won't work, I won't bother.

In reply to Diego Maté Cuñado

Re: Moodle 2 recognizes .pdf file, but does not display

by balu nadella -

hi  ,

iam using boxxie theme in moodle . .  iam facing problem while displaying pdf . . 

and is there any chance to upload videos in moodle . .  if there please tell me the procedure . . 

Thanks In advance . .