1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 04:50:09 +00:00

Revert "+ quiet parameter"

This reverts commit defc1738be.
This commit is contained in:
Marc Sanfacon 2014-01-08 10:50:32 -05:00
parent defc1738be
commit 652b40971a
6 changed files with 42 additions and 56 deletions

View File

@ -158,7 +158,7 @@ endif()
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag("${CMAKE_CXX_FLAGS}" CXX0X_SUPPORT)
if(NOT CXX0X_SUPPORT)
message(FATAL_ERROR "Error: your compiler does not support C++0x, please update it.")
message(FATAL_ERROR "Error: you compiler does not support C++0x, please update it.")
endif()

View File

@ -168,7 +168,7 @@ string HTMLRenderer::dump_embedded_font (GfxFont * font, FontInfo & info)
}
catch(int)
{
cerr << "Something wrong when trying to dump font " << hex << fn_id << dec << endl;
cerr << "Someting wrong when trying to dump font " << hex << fn_id << dec << endl;
}
obj2.free();
@ -895,7 +895,7 @@ const FontInfo * HTMLRenderer::install_font(GfxFont * font)
install_embedded_font(font, new_font_info);
break;
case gfxFontLocResident:
cerr << "Warning: Base 14 fonts should not be specially handled now. Please report a bug!" << std::endl;
std::cerr << "Warning: Base 14 fonts should not be specially handled now. Please report a bug!" << std::endl;
/* fall through */
case gfxFontLocExternal:
install_external_font(font, new_font_info);

View File

@ -110,15 +110,11 @@ void HTMLRenderer::process(PDFDoc *doc)
for(int i = param.first_page; i <= param.last_page ; ++i)
{
if (param.max_size != -1 && tmp_files.get_total_size() > param.max_size * 1024) {
if (!param.quiet) {
cerr << "Stop processing, reach max size\n";
}
break;
}
if (!param.quiet) {
cerr << "Working: " << (i-param.first_page) << "/" << page_count << '\r' << flush;
}
if(param.split_pages)
{
@ -151,11 +147,9 @@ void HTMLRenderer::process(PDFDoc *doc)
f_curpage = nullptr;
}
}
if (!param.quiet) {
if (page_count >= 0)
if(page_count >= 0)
cerr << "Working: " << page_count << "/" << page_count;
cerr << endl;
}
////////////////////////
// Process Outline
@ -170,9 +164,7 @@ void HTMLRenderer::process(PDFDoc *doc)
bg_renderer = nullptr;
}
if (!param.quiet) {
cerr << endl;
}
}
void HTMLRenderer::setDefaultCTM(double *ctm)

View File

@ -72,7 +72,6 @@ struct Param
std::string data_dir;
std::string basetmp_dir;
int css_draw;
int quiet;
int debug;
std::string input_filename, output_filename;

View File

@ -45,9 +45,7 @@ void Preprocessor::process(PDFDoc * doc)
int page_count = (param.last_page - param.first_page + 1);
for(int i = param.first_page; i <= param.last_page ; ++i)
{
if (!param.quiet) {
cerr << "Preprocessing: " << (i-param.first_page) << "/" << page_count << '\r' << flush;
}
doc->displayPage(this, i, DEFAULT_DPI, DEFAULT_DPI,
0,
@ -56,11 +54,9 @@ void Preprocessor::process(PDFDoc * doc)
false, // printing
nullptr, nullptr, nullptr, nullptr);
}
if (!param.quiet) {
if(page_count >= 0)
cerr << "Preprocessing: " << page_count << "/" << page_count;
cerr << endl;
}
}
void Preprocessor::drawChar(GfxState *state, double x, double y,

View File

@ -214,7 +214,6 @@ void parse_options (int argc, char **argv)
.add("data-dir", &param.data_dir, param.data_dir, "specify data directory")
// TODO: css drawings are hidden on print, for annot links, need to fix it for other drawings
// .add("css-draw", &param.css_draw, 0, "[experimental and unsupported] CSS drawing")
.add("quiet", &param.quiet, 0, "do not output information")
.add("debug", &param.debug, 0, "print debugging information")
// meta