run_command("gswin32c -v"); } catch (Exception $e) { $gs_status['error'] = true; $gs_status['message'] = $e->getMessage(); } if ( $gs_status['error'] ) { try { $cmd = new WP_Booklet2_Command("gswin64c","-v"); $gs_status = $cmd->run_command("gswin64c -v"); } catch (Exception $e) { $gs_status['error'] = true; $gs_status['message'] = $e->getMessage(); } } if ( $gs_status['error'] ) { try { $cmd = new WP_Booklet2_Command("gs","-v"); $gs_status = $cmd->run_command(); } catch (Exception $e) { $gs_status['error'] = true; $gs_status['message'] = $e->getMessage(); } } //Check Imagemagick status try { $cmd = new WP_Booklet2_Command("convert","-version"); $im_status = $cmd->run_command(); } catch (Exception $e) { $im_status['error'] = true; $im_status['message'] = $e->getMessage(); } //Check PDFInfo status $pdfinfo = new WP_Booklet2_PDFInfo($pdf->get_path()); $pdfinfo_version = $pdfinfo->get_version(); $pdfinfo_status = $pdfinfo_version == false ? 'No available version is found for your operating system' : $pdfinfo_version; //Is uploads folder writable by web server? $upload_dir = wp_upload_dir(); $upload_path = $upload_dir['path']; $writable = "No"; if ( is_writable($upload_path) ) { $writable = "Yes"; } //Is safe mode enabled? if ( ini_get("safe_mode") ) { $safe_mode = "Yes"; } else { $safe_mode = "No"; } //Do the actual test try { $actual_test = $pdf->is_convertible_to_image(); } catch (Exception $e) { $actual_test = false; } include realpath( WP_BOOKLET2_DIR . "themes/admin/default/settings-page.php" ); } }