MDL-70038 assign: add suport for pdftoppm tool
pdftoppm (from poppler-utils package) is several orders of magnitude quicker than ghostscript extracting PNG images from PDF documents. We add support for this tool and use it whenever set up, or using gs as before if missing. Revisited code with peer review comments. In particular: 1. Make default path for pdftoppm empty string. 2. Fix a typo on the method description for get_gs_command_for_image. 3. Added more information why is useful pdftoppm into string pathtopdftoppm_help. 4. Check that path for pdftoppm is executable to prevent errors. Otherwise, use gs.
This commit is contained in:
@@ -38,6 +38,8 @@ if ($hassiteconfig) {
|
||||
new lang_string('pathtodot_help', 'admin'), ''));
|
||||
$temp->add(new admin_setting_configexecutable('pathtogs', new lang_string('pathtogs', 'admin'),
|
||||
new lang_string('pathtogs_help', 'admin'), '/usr/bin/gs'));
|
||||
$temp->add(new admin_setting_configexecutable('pathtopdftoppm', new lang_string('pathtopdftoppm', 'admin'),
|
||||
new lang_string('pathtopdftoppm_help', 'admin'), ''));
|
||||
$temp->add(new admin_setting_configexecutable('pathtopython', new lang_string('pathtopython', 'admin'),
|
||||
new lang_string('pathtopythondesc', 'admin'), ''));
|
||||
$ADMIN->add('server', $temp);
|
||||
|
||||
Reference in New Issue
Block a user