function pdf_using_mpdf_config_validate in PDF using mPDF 7
Same name and namespace in other branches
- 7.2 pdf_using_mpdf.admin.inc \pdf_using_mpdf_config_validate()
Configuration form Validation check.
File
- ./
pdf_using_mpdf.admin.inc, line 182 - Contains the administrative functions of the PDF conversion module.
Code
function pdf_using_mpdf_config_validate($form, $form_state) {
// Checking mPDF library existence.
if (pdf_using_mpdf_library_exist() == TRUE) {
if (isset($form_state['values']['remove_pwd'])) {
if ($form_state['values']['remove_pwd'] == '1') {
variable_set('pdf_using_mpdf_pdf_password', NULL);
}
}
if (!(is_numeric($form_state['values']['pdf_using_mpdf_pdf_font_size']) && $form_state['values']['pdf_using_mpdf_pdf_font_size'] > 1)) {
form_set_error('font_size', t('Font size should be numeric and greater than 1.'));
}
}
}