mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
parent
defc1738be
commit
652b40971a
@ -158,7 +158,7 @@ endif()
|
|||||||
include(CheckCXXCompilerFlag)
|
include(CheckCXXCompilerFlag)
|
||||||
check_cxx_compiler_flag("${CMAKE_CXX_FLAGS}" CXX0X_SUPPORT)
|
check_cxx_compiler_flag("${CMAKE_CXX_FLAGS}" CXX0X_SUPPORT)
|
||||||
if(NOT 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()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ string HTMLRenderer::dump_embedded_font (GfxFont * font, FontInfo & info)
|
|||||||
}
|
}
|
||||||
catch(int)
|
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();
|
obj2.free();
|
||||||
@ -895,7 +895,7 @@ const FontInfo * HTMLRenderer::install_font(GfxFont * font)
|
|||||||
install_embedded_font(font, new_font_info);
|
install_embedded_font(font, new_font_info);
|
||||||
break;
|
break;
|
||||||
case gfxFontLocResident:
|
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 */
|
/* fall through */
|
||||||
case gfxFontLocExternal:
|
case gfxFontLocExternal:
|
||||||
install_external_font(font, new_font_info);
|
install_external_font(font, new_font_info);
|
||||||
|
@ -110,15 +110,11 @@ void HTMLRenderer::process(PDFDoc *doc)
|
|||||||
for(int i = param.first_page; i <= param.last_page ; ++i)
|
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.max_size != -1 && tmp_files.get_total_size() > param.max_size * 1024) {
|
||||||
if (!param.quiet) {
|
|
||||||
cerr << "Stop processing, reach max size\n";
|
cerr << "Stop processing, reach max size\n";
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!param.quiet) {
|
|
||||||
cerr << "Working: " << (i-param.first_page) << "/" << page_count << '\r' << flush;
|
cerr << "Working: " << (i-param.first_page) << "/" << page_count << '\r' << flush;
|
||||||
}
|
|
||||||
|
|
||||||
if(param.split_pages)
|
if(param.split_pages)
|
||||||
{
|
{
|
||||||
@ -151,11 +147,9 @@ void HTMLRenderer::process(PDFDoc *doc)
|
|||||||
f_curpage = nullptr;
|
f_curpage = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!param.quiet) {
|
|
||||||
if(page_count >= 0)
|
if(page_count >= 0)
|
||||||
cerr << "Working: " << page_count << "/" << page_count;
|
cerr << "Working: " << page_count << "/" << page_count;
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////
|
////////////////////////
|
||||||
// Process Outline
|
// Process Outline
|
||||||
@ -170,10 +164,8 @@ void HTMLRenderer::process(PDFDoc *doc)
|
|||||||
bg_renderer = nullptr;
|
bg_renderer = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!param.quiet) {
|
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void HTMLRenderer::setDefaultCTM(double *ctm)
|
void HTMLRenderer::setDefaultCTM(double *ctm)
|
||||||
{
|
{
|
||||||
|
@ -72,7 +72,6 @@ struct Param
|
|||||||
std::string data_dir;
|
std::string data_dir;
|
||||||
std::string basetmp_dir;
|
std::string basetmp_dir;
|
||||||
int css_draw;
|
int css_draw;
|
||||||
int quiet;
|
|
||||||
int debug;
|
int debug;
|
||||||
|
|
||||||
std::string input_filename, output_filename;
|
std::string input_filename, output_filename;
|
||||||
|
@ -45,9 +45,7 @@ void Preprocessor::process(PDFDoc * doc)
|
|||||||
int page_count = (param.last_page - param.first_page + 1);
|
int page_count = (param.last_page - param.first_page + 1);
|
||||||
for(int i = param.first_page; i <= param.last_page ; ++i)
|
for(int i = param.first_page; i <= param.last_page ; ++i)
|
||||||
{
|
{
|
||||||
if (!param.quiet) {
|
|
||||||
cerr << "Preprocessing: " << (i-param.first_page) << "/" << page_count << '\r' << flush;
|
cerr << "Preprocessing: " << (i-param.first_page) << "/" << page_count << '\r' << flush;
|
||||||
}
|
|
||||||
|
|
||||||
doc->displayPage(this, i, DEFAULT_DPI, DEFAULT_DPI,
|
doc->displayPage(this, i, DEFAULT_DPI, DEFAULT_DPI,
|
||||||
0,
|
0,
|
||||||
@ -56,12 +54,10 @@ void Preprocessor::process(PDFDoc * doc)
|
|||||||
false, // printing
|
false, // printing
|
||||||
nullptr, nullptr, nullptr, nullptr);
|
nullptr, nullptr, nullptr, nullptr);
|
||||||
}
|
}
|
||||||
if (!param.quiet) {
|
|
||||||
if(page_count >= 0)
|
if(page_count >= 0)
|
||||||
cerr << "Preprocessing: " << page_count << "/" << page_count;
|
cerr << "Preprocessing: " << page_count << "/" << page_count;
|
||||||
cerr << endl;
|
cerr << endl;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void Preprocessor::drawChar(GfxState *state, double x, double y,
|
void Preprocessor::drawChar(GfxState *state, double x, double y,
|
||||||
double dx, double dy,
|
double dx, double dy,
|
||||||
|
@ -214,7 +214,6 @@ void parse_options (int argc, char **argv)
|
|||||||
.add("data-dir", ¶m.data_dir, param.data_dir, "specify data directory")
|
.add("data-dir", ¶m.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
|
// TODO: css drawings are hidden on print, for annot links, need to fix it for other drawings
|
||||||
// .add("css-draw", ¶m.css_draw, 0, "[experimental and unsupported] CSS drawing")
|
// .add("css-draw", ¶m.css_draw, 0, "[experimental and unsupported] CSS drawing")
|
||||||
.add("quiet", ¶m.quiet, 0, "do not output information")
|
|
||||||
.add("debug", ¶m.debug, 0, "print debugging information")
|
.add("debug", ¶m.debug, 0, "print debugging information")
|
||||||
|
|
||||||
// meta
|
// meta
|
||||||
|
Loading…
Reference in New Issue
Block a user