Skip to content

Commit 3f231fd

Browse files
author
Sam
committed
check embed parameters when output redirected to stdout
1 parent e60c06f commit 3f231fd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/pdf2htmlEX.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,13 @@ void check_param()
334334
}
335335
#endif
336336

337+
if (param.output_filename == "-" &&
338+
(!param.embed_css || !param.embed_font || !param.embed_image || !param.embed_javascript
339+
|| !param.embed_outline || !param.embed_external_font)) {
340+
cerr << "output redirected to STDOUT, but some html parts set to be not embededed." << endl;
341+
exit(EXIT_FAILURE);
342+
}
343+
337344
if((param.font_format == "ttf") && (param.external_hint_tool == ""))
338345
{
339346
cerr << "Warning: No hint tool is specified for truetype fonts, the result may be rendered poorly in some circumstances." << endl;

0 commit comments

Comments
 (0)