Skip to content

Commit

Permalink
Merge pull request LibrePDF#57 from albfernandez/allow_standard_input
Browse files Browse the repository at this point in the history
Allow to read from stdin.
  • Loading branch information
asturio authored Nov 24, 2017
2 parents de5637c + ed44987 commit 32aef70
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,13 @@ public RandomAccessFileOrArray(String filename, boolean forceRead, boolean plain
}
}
else {
InputStream is = BaseFont.getResourceStream(filename);
InputStream is = null;
if ("-".equals(filename)) {
is = System.in;
}
else {
is = BaseFont.getResourceStream(filename);
}
if (is == null)
throw new IOException(MessageLocalization.getComposedMessage("1.not.found.as.file.or.resource", filename));
try {
Expand Down

0 comments on commit 32aef70

Please sign in to comment.