catalyst / moodle-tool_pdfpages

A Moodle plugin for converting web pages to PDFs using various headless browser drivers
3 stars 2 forks source link

Enhancement: add a PDF content validator #27

Open tomdickman opened 3 years ago

tomdickman commented 3 years ago

Currently it is easy enough to utilise a converter to produce a PDF of a Moodle page, however, there is no easy way to quality control conversions, if we are converting a lot of pages, to check that the PDF contains expected content.

It would be good if we could add a new validation class and/or functions to allow us to check the content of a conversion PDF for expected content, 'sniffing' the PDF content using regex or some other means as a quality check to make sure some exception wasn't thrown by the Moodle page, or some other error didn't occur which prevented conversion from being conducted as expected.