Skip to content

Commit

Permalink
moved python companion function location to private folder
Browse files Browse the repository at this point in the history
  • Loading branch information
AldoCorbelliniUNIPR committed Oct 28, 2024
1 parent a6e1913 commit c21a585
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions toolbox/utilities/pdfprotect.m
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@
end


% FileExists=(inputfile);
% [pathstrcf,name,ext]=fileparts(FileWithFullPath);
%
% if isempty(pathstrcf)
% error('FSDA:publishFS:WrongFile','SourceNotFound');
% end


% default parameters values
watermark = '(C)DSconMATLAB';
Expand Down Expand Up @@ -171,10 +178,11 @@
elseif ispc
% get the path to python
pythonpath = fullfile(getenv('USERPROFILE'), 'miniconda3');
pythoncode = which('pdf_encryption_wm_creation.py');
% [pythoncode1]=fileparts(pythoncode);
pythoncode = which('pdfprotect.m');
[pythoncode1]=fileparts(pythoncode);
pythoncode2=[pythoncode1 filesep 'private' filesep 'pdf_encryption_wm_creation.py'];
% compose the string
str=[ pythonpath '\python ' pythoncode sp inputfile sp ...
str=[ pythonpath '\python ' pythoncode2 sp inputfile sp ...
watermark sp outputfile sp print_flag sp edit_flag sp password_text];
else
% linux: TODO!
Expand Down

0 comments on commit c21a585

Please sign in to comment.