Hi Josef
Cacef,
First of all, thank you for sharing this great tool.
I am trying to automate a process of signing some dozen PDFs that are
created every month with a Powershell script, but am having two problems and
was hoping you could help me.
log4j:WARN No appenders could be found for logger (net.sf.jsignpdf.SignerLogic).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
Do you have any idea why? Do you have any suggestion to make it really quiet?
$arg1b = '--contact "Me" -d c:\temp -cl CERTIFIED_NO_CHANGES_ALLOWED --quiet -fs 5.0 -kst WINDOWS-MY -ka CPE -l London -r "Certify digital sign" -llx 385 -lly 780 -urx 583 -ury 820 -V'
$FiletoSign = "c:\temp\0560008167.pdf c:\temp\0563003516.pdf"
$rc = (Start-Process -FilePath "C:\Program Files (x86)\JSignPdf\JSignPdfC.exe" -ArgumentList "$FiletoSign $arg1b" -NoNewWindow -Wait).ExitCode
Write-Host " The process ended with Return code:" $rc
This returns “” (null) – the variable $rc is not set.
Nevertheless, if I use the line:
(Start-Process -FilePath "cmd.exe" -ArgumentList "/c echo foo" -Wait -Passthru).ExitCode
it returns 0 as echo is a recognized command, while the next line:
(Start-Process -FilePath "cmd.exe" -ArgumentList "/c ech foo" -Wait -Passthru).ExitCode
returns 1 because ech is not recognized.
Once again, can you help me, please?
Thanks in advance.
Américo Nascimento
&"C:\Program Files (x86)\JSignPdf\JSignPdfC.exe" $if [...]
if ($?){ "Success!" }else{ "Something went wrong."}