-
Bug
-
Resolution: Fixed
-
Major
-
4.4, 4.5
When testing on a higher version of Ghostscript (10.03.1), we discovered that the assignment preview and grading in Moodle is broken and renders a white blank screen instead of the expected document.
Diving a bit deeper, we discovered that ghostscript by default, processes the file with default PDF compatibility set to 1.7, which the free parser shipped with FPDI does not support.
The error message generated is as follows:
Exception - This PDF document probably uses a compression technique which is not supported by the free parser shipped with FPDI. (See https://www.setasign.com/fpdi-pdf-parser for more details) Debug: |
Error code: generalexceptionmessage
|
* line 257 of /mod/assign/feedback/editpdf/fpdi/PdfParser/CrossReference/CrossReference.php: setasign\Fpdi\PdfParser\CrossReference\CrossReferenceException thrown |
* line 209 of /mod/assign/feedback/editpdf/fpdi/PdfParser/CrossReference/CrossReference.php: call to setasign\Fpdi\PdfParser\CrossReference\CrossReference->initReaderInstance() |
* line 67 of /mod/assign/feedback/editpdf/fpdi/PdfParser/CrossReference/CrossReference.php: call to setasign\Fpdi\PdfParser\CrossReference\CrossReference->readXref() |
* line 157 of /mod/assign/feedback/editpdf/fpdi/PdfParser/PdfParser.php: call to setasign\Fpdi\PdfParser\CrossReference\CrossReference->__construct() |
* line 205 of /mod/assign/feedback/editpdf/fpdi/PdfParser/PdfParser.php |
We also discovered that if we were to force the ghostscript compatibility to something like 1.4, it would create a file compatible for the other library to read (e.g. using the flag -dCompatibilityLevel=1.4)
Whilst this flag can be used for now, it is not a long term solution.
- has a non-specific relationship to
-
MDL-84730 Ghostscript 100% cpu while displaying a pdf in Moodle 4.5.2
-
- Open
-