Skip to content

Commit

Permalink
Update SmartCardSigner.java
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxy authored Aug 9, 2020
1 parent c80ec79 commit f0a2059
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/java/rs/paxy/SmartCardSigner.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,12 @@ public static void main(String[] args) throws Exception {
if (args.length < 1)
return;
File input = new File(args[0]);
String path = input.getParent();
if (!input.exists()) throw new Exception(
"Invalid path to input file: "+args[0]);
String path = input.getAbsoluteFile().getParent();
String name = input.getName();
if (!name.contains(".pdf")) throw new Exception(
"PaxyPDFSigner supports only PDF input files.");
String signedFile = path + "/" + name.replace(".pdf", "-signed.pdf");

new SmartCardSigner(input.getAbsolutePath(), signedFile, null);
Expand Down

0 comments on commit f0a2059

Please sign in to comment.