Viewing PDF is incomplete in Chrome Browser

Viewing PDF is incomplete in Chrome Browser

על ידי JC Dodo בתאריך
מספר תגובות: 5

Hi,

This is strange behavior of viewing PDF file from the Chrome browser as it shown below. 

This only happen in google chrome. The Moodle version is 3.4 and 3.8.4+. 

There were no error messages as well in web server logs or php logs when turning debug mode in config.php. 

Appreciate if anyone could shed some lights?

viewing pdf on browser

Thanks! -J

ממוצע דרוגים: -
בתגובה ל: JC Dodo

Re: Viewing PDF is incomplete in Chrome Browser

על ידי Michael Milette בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers תמונה של Translators
Did you try a different PDF? Maybe your PDF is defective.
בתגובה ל: Michael Milette

Re: Viewing PDF is incomplete in Chrome Browser

על ידי JC Dodo בתאריך
I tried to view all PDF and they are all fine. But with this particular PDF, I don't know. When I tried to download that PDF, I can open it in chrome browser. The only issue is when viewing that PDF from Moodle.

I cannot find any error logs from webserver and php. I am running options in here.

I would appreciate if anyone could share me some lights.
בתגובה ל: JC Dodo

Re: Viewing PDF is incomplete in Chrome Browser

על ידי Artur Welp בתאריך
I crossed on this problem this month.

This is a Chromium specific bug and is reported since the beginning of the year.
https://support.google.com/chrome/thread/66790726?hl=en
https://bugs.chromium.org/p/chromium/issues/detail?id=1123389&q=fast%20web%20view&can=2

The problem is due the Web Optimization options on the software exporting the PDF.
If you want to render it on Chrome, disable this option. This thread also covers the problem
https://moodle.org/mod/forum/discuss.php?d=408359#p1649501

I did't have the PDF source, so I followed this process:

Split the PDF on many PNGs with https://pdf2png.com/
Merge the PNGs with https://pdf2png.com/
If there were too many images. I used Imagemagic to merge all PNGs on a folder with this command:

 convert *.png merged.pdf