28 [
varargout[1:nargout]] = system(sprintf(
" '%s' %s ", xpdf_path, cmd));
65 if check_xpdf_path(path_)
70 bin =
" pdftops.exe ";
74 if check_store_xpdf_path(bin)
80 path_ =
" C:\Program Files\xpdf\pdftops.exe ";
82 path_ =
" /usr/local/bin/pdftops ";
84 if check_store_xpdf_path(path_)
89 if strncmp(computer,
" MAC ",3)
93 uiwait(warndlg(
" Pdftops not found. Please locate the program, or install xpdf-tools from http://users.phg-online.de/tk/MOSXS/. "))
95 base = uigetdir(
" / ",
" Pdftops not found. Please locate the program. ");
100 base = [base filesep];
101 bin_dir = [, [
" bin " filesep], [
" lib " filesep]];
102 for a = 1:numel(bin_dir)
103 path_ = [base bin_dir[a] bin];
104 if exist(path_,
" file ") == 2
108 if check_store_xpdf_path(path_)
112 error(
" pdftops executable not found. ");
117 good = check_xpdf_path(path_);
123 warning(
" Path to pdftops executable could not be saved. Enter it manually in pdftops.txt. ");
131 [good message] = system(sprintf(
" '%s' -h ", path_));
134 good = ~isempty(strfind(message,
" PostScript "));
function path_ = pdftops>xpdf_path()
function string = user_string(string_name, string)
function good = pdftops>check_store_xpdf_path(path_)
function varargout = pdftops(cmd)
PDFTOPS Calls a local pdftops executable with the input command.
function good = pdftops>check_xpdf_path(path_)
A variable number of output arguments.