Moodle

PDF files no more displayed correctly

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Not a bug
  • Affects Version/s: 1.8
  • Fix Version/s: None
  • Component/s: Resource
  • Labels:
    None
  • Environment:
    Server: Moodle 1.8+ (2007021503) / Linux Ubuntu 7.04 / Apache 2.2.3 / PHP 5.2.1 / MySQL 5.0.38. -- Client: Internet Explorer and Firefox / Linux and Windows / Adobe Reader plugin for IE and FF.

Description

I just upgraded from Moodle 1.7.1 to Moodle 1.8+ and noticed something wrong when displaying PDF files.

Only in the case "Keep page navigation visible on the same page" is selected, the PDF file is displayed as an embedded object! It means the PDF Adobe Reader plugin is no more used! As a consequence:

  • the PDF byteserving ("fast web viewing / one page at a time") cannot work!
  • the PDF window size is fixed, and is no more "adjusted" to the size of the browser window;
  • ... and still more inconveniences.

As a work around, what can be done is:

  • do not select "Keep page navigation visible on the same page" (but then you lose this functionality of course);
  • adapting the .../type/file/resource.class.php file by removing "$embedded = true" when a PDF format has to be displayed.

What is making me really astonished is that it seems that this "bug" has been asked by somebody in ticket "MDL-9198 - Frameset used to display PDF" in order, if I well understand, to be compliant with XHTML rules.

This problem was not present in Moodle 1.7.1.

Issue Links

Activity

Hide
Eric Dodemont added a comment -

Some more info to clarify the problem.

Adobe Reader is a sofware to display PDF files. During the Adobe Reader installation, a "Web browser plugin" is installed on the computer as well. There is an Adobe Reader plugin for Internet Explorer and Firefox (under Windows or Linux).

When Adobe Reader is embedded as an object in the Web page, the plugin is no more used, but of course Adobe Reader is used to display the PDF file.

I just wanted to clarify the difference between "Adobe Reader" and "Adobe Reader plugin".

Remark: Adobe Reader was before called Adobe Acrobat Reader.

Show
Eric Dodemont added a comment - Some more info to clarify the problem. Adobe Reader is a sofware to display PDF files. During the Adobe Reader installation, a "Web browser plugin" is installed on the computer as well. There is an Adobe Reader plugin for Internet Explorer and Firefox (under Windows or Linux). When Adobe Reader is embedded as an object in the Web page, the plugin is no more used, but of course Adobe Reader is used to display the PDF file. I just wanted to clarify the difference between "Adobe Reader" and "Adobe Reader plugin". Remark: Adobe Reader was before called Adobe Acrobat Reader.
Hide
Eric Dodemont added a comment -

And here still more inconveniences:

  • there are two window scroll bars (Adore Reader + Browser) in place of one;
  • the resource summary is shown after the PDF document in place of before.

Embedding a PDF file is maybe something that can be done in some very specific cases, but not by default (knowing that the PDF format is very sophisticated and is widely used on the Internet).

Can you remove the default "$embedded = true" for PDF document in order to display again correctly the PDF files? And maybe add "Embed as an object" as one more parameter for the display of a resource? (but not set by default then)

Thanks!

Show
Eric Dodemont added a comment - And here still more inconveniences:
  • there are two window scroll bars (Adore Reader + Browser) in place of one;
  • the resource summary is shown after the PDF document in place of before.
Embedding a PDF file is maybe something that can be done in some very specific cases, but not by default (knowing that the PDF format is very sophisticated and is widely used on the Internet). Can you remove the default "$embedded = true" for PDF document in order to display again correctly the PDF files? And maybe add "Embed as an object" as one more parameter for the display of a resource? (but not set by default then) Thanks!
Hide
Daniele Cordella added a comment -

Ciao Eric.
I asked for the moodle modification forced by the meaning of "accessibility".
The "Requirement No 2" in http://www.pubbliaccesso.gov.it/normative/DM080705-A-en.htm is not an opinion. It is the reason of my MDL-9198 request.

Show
Daniele Cordella added a comment - Ciao Eric. I asked for the moodle modification forced by the meaning of "accessibility". The "Requirement No 2" in http://www.pubbliaccesso.gov.it/normative/DM080705-A-en.htm is not an opinion. It is the reason of my MDL-9198 request.
Hide
Eric Dodemont added a comment -

Ok, now I see what is the first reason of your demand: avoid the use of frames.

What I would maybe suggest then is to create a parameter to give the option to "not embed" the file.

By embedding the PDF file, you lose all the functionalities of the "browser plugin of Adobe Reader" because it is no more used! (see what I wrote above)

Please note that there are many other "browser plugins", for example Microsoft Word plugin for Internet Explorer to view DOC files in the browser: in that case, it is still in a frame. Only PDF files have this "special" treatment for now!

Some weeks ago, there is a bug about PDF byteserving (MDL-8802) which has been corrected. But now with version 1.8, if the plugin is no more used, the byteserving cannot work!

Hopefully, in version 1.8, the default parameters when adding a new resource are "Same window" and "Keep page navigation visible on the same page" not set. In that case the browser plugin is used and PDF files displayed correctly.

Show
Eric Dodemont added a comment - Ok, now I see what is the first reason of your demand: avoid the use of frames. What I would maybe suggest then is to create a parameter to give the option to "not embed" the file. By embedding the PDF file, you lose all the functionalities of the "browser plugin of Adobe Reader" because it is no more used! (see what I wrote above) Please note that there are many other "browser plugins", for example Microsoft Word plugin for Internet Explorer to view DOC files in the browser: in that case, it is still in a frame. Only PDF files have this "special" treatment for now! Some weeks ago, there is a bug about PDF byteserving (MDL-8802) which has been corrected. But now with version 1.8, if the plugin is no more used, the byteserving cannot work! Hopefully, in version 1.8, the default parameters when adding a new resource are "Same window" and "Keep page navigation visible on the same page" not set. In that case the browser plugin is used and PDF files displayed correctly.
Hide
Daniele Cordella added a comment -

Ciao Eric.

> What I would maybe suggest then is to create a parameter to give the option to "not embed" the file.
Why not. It may be a good point but I have no place in this decision.

> Please note that there are many other "browser plugins", for example Microsoft Word plugin for Internet Explorer to view DOC files in the browser: in that case, it is still in a frame.
They are not considered accessible, I can not deny you to use them but into an accessible Moodle they may not be planned.
Finally I hope they will be ambedded to avoid frameset at all.

> But now with version 1.8, if the plugin is no more used, the byteserving cannot work!
I do use the PDF plug-in and it works fine for me. I don't understand what you say. I do use the PDF plug-in from http://www.schubert-it.com/pluginpdf/.

Show
Daniele Cordella added a comment - Ciao Eric. > What I would maybe suggest then is to create a parameter to give the option to "not embed" the file. Why not. It may be a good point but I have no place in this decision. > Please note that there are many other "browser plugins", for example Microsoft Word plugin for Internet Explorer to view DOC files in the browser: in that case, it is still in a frame. They are not considered accessible, I can not deny you to use them but into an accessible Moodle they may not be planned. Finally I hope they will be ambedded to avoid frameset at all. > But now with version 1.8, if the plugin is no more used, the byteserving cannot work! I do use the PDF plug-in and it works fine for me. I don't understand what you say. I do use the PDF plug-in from http://www.schubert-it.com/pluginpdf/.
Hide
Eric Dodemont added a comment -

PDF byteserving (also called "fast web viewing" or "one page at a time") allows viewing PDF files "page by page" without the need to download the entire file.

For example, you will see the first page of the document after some second when the rest of the document is still downloading.

For that, the PDF file has to be optimized and a "browser plugin" has to be installed and used (Adobe Reader installs it automatically for Internet Explorer and Firefox).

Not sure that the PDF viewer you are using can do that.

PDF byteserving does not work if Adobe Reader is embedded as an object in the HTML page (in fact the browser plugin is no more used in such case). This is only one inconvenience of embedding the PDF document.

Show
Eric Dodemont added a comment - PDF byteserving (also called "fast web viewing" or "one page at a time") allows viewing PDF files "page by page" without the need to download the entire file. For example, you will see the first page of the document after some second when the rest of the document is still downloading. For that, the PDF file has to be optimized and a "browser plugin" has to be installed and used (Adobe Reader installs it automatically for Internet Explorer and Firefox). Not sure that the PDF viewer you are using can do that. PDF byteserving does not work if Adobe Reader is embedded as an object in the HTML page (in fact the browser plugin is no more used in such case). This is only one inconvenience of embedding the PDF document.
Hide
Nicolas Connault added a comment -

After I explain this, Eric, I think you will agree that this is not a "bug".

If you tick the "Keep navigation visible", you are expecting to see the Moodle navigation and breadcrumbs above your PDF document. If you do not use framesets (which we cannot use for XHTML reasons), then the only other option is to embed it.

If you don't want to embed it, simply don't tick the "Keep navigation visible" checkbox! As simple as a pimple

Show
Nicolas Connault added a comment - After I explain this, Eric, I think you will agree that this is not a "bug". If you tick the "Keep navigation visible", you are expecting to see the Moodle navigation and breadcrumbs above your PDF document. If you do not use framesets (which we cannot use for XHTML reasons), then the only other option is to embed it. If you don't want to embed it, simply don't tick the "Keep navigation visible" checkbox! As simple as a pimple
Hide
Eric Dodemont added a comment -

Yes it is not a bug as it has been implemented on purpose. But then as it makes the access to the document ten times worse, would be better to not implement it... Anyway, I prefer to remove "$embedded = true" because I want the navigation visible.

Thanks for the answer.

Show
Eric Dodemont added a comment - Yes it is not a bug as it has been implemented on purpose. But then as it makes the access to the document ten times worse, would be better to not implement it... Anyway, I prefer to remove "$embedded = true" because I want the navigation visible. Thanks for the answer.
Hide
Nicolas Connault added a comment -

Eric, we had to make this change for xhtml accessibility. Of course actual user accessibility is even more important. For this reason, we strongly discourage the use of PDF documents, which are one of the least accessible media currently on the Internet.

Keeping the frameset is not an option. If you are aware of other ways to display a pdf file in an accessible way, while still retaining the page navigation, please contribute your knowledge, I would really love to learn that method. But I've done a fair bit of research on this, and I couldn't find any other way that the embedding option.

Now, if you do have suggestions for improving accessibility/usability of the embedded document, please share them too.

Thanks

Show
Nicolas Connault added a comment - Eric, we had to make this change for xhtml accessibility. Of course actual user accessibility is even more important. For this reason, we strongly discourage the use of PDF documents, which are one of the least accessible media currently on the Internet. Keeping the frameset is not an option. If you are aware of other ways to display a pdf file in an accessible way, while still retaining the page navigation, please contribute your knowledge, I would really love to learn that method. But I've done a fair bit of research on this, and I couldn't find any other way that the embedding option. Now, if you do have suggestions for improving accessibility/usability of the embedded document, please share them too. Thanks
Hide
Eric Dodemont added a comment -

Me, on the opposite, I always strongly recommend the use of PDF in place of all sort of exotic formats. It always makes me upset when I see a DOC or PPT put online... PDF is a very sophisticated format made to publish documents online with a lot of features (texts and images compression, image down sampling, font embedding, media inclusion, byteserving, and the most important: fix display, etc.)

HTML (by default) or PDF (for more sophisticated publishing) should always be used.

But ok, this is another debate which is no suposed to be held here...

Show
Eric Dodemont added a comment - Me, on the opposite, I always strongly recommend the use of PDF in place of all sort of exotic formats. It always makes me upset when I see a DOC or PPT put online... PDF is a very sophisticated format made to publish documents online with a lot of features (texts and images compression, image down sampling, font embedding, media inclusion, byteserving, and the most important: fix display, etc.) HTML (by default) or PDF (for more sophisticated publishing) should always be used. But ok, this is another debate which is no suposed to be held here...
Hide
Eric Dodemont added a comment -

Since Moodle version 1.9.6, the PDF files are again displayed properly in the web browser windows (the Adobe PDF reader plugin is again enabled).

Adobe PDF reader plugin (installed automatically when Adobe Reader is installed):

a) Windows OS:

  • Firefox & Opera & Chrome: C:\Program Files\Mozilla Firefox\plugins\nppdf32.dll
  • Internet Explorer: C:\Program Files\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.dll

b) Linux OS:

  • Firefox & Opera & Chrome: /usr/lib/mozilla/plugins/nppdf.so
Show
Eric Dodemont added a comment - Since Moodle version 1.9.6, the PDF files are again displayed properly in the web browser windows (the Adobe PDF reader plugin is again enabled). Adobe PDF reader plugin (installed automatically when Adobe Reader is installed): a) Windows OS:
  • Firefox & Opera & Chrome: C:\Program Files\Mozilla Firefox\plugins\nppdf32.dll
  • Internet Explorer: C:\Program Files\Common Files\Adobe\Acrobat\ActiveX\AcroPDF.dll
b) Linux OS:
  • Firefox & Opera & Chrome: /usr/lib/mozilla/plugins/nppdf.so

People

Vote (0)
Watch (3)

Dates

  • Created:
    Updated:
    Resolved: