mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 13:00:08 +00:00
calculate zoom factors in the constructoer
This commit is contained in:
parent
e604ba7565
commit
57bd310d7b
@ -47,29 +47,6 @@ HTMLRenderer::HTMLRenderer(const Param * param)
|
||||
setErrorCallback(&dummy, nullptr);
|
||||
}
|
||||
|
||||
ffw_init(param->debug);
|
||||
cur_mapping = new int32_t [0x10000];
|
||||
cur_mapping2 = new char* [0x100];
|
||||
width_list = new int [0x10000];
|
||||
}
|
||||
|
||||
HTMLRenderer::~HTMLRenderer()
|
||||
{
|
||||
ffw_finalize();
|
||||
clean_tmp_files();
|
||||
delete [] cur_mapping;
|
||||
delete [] cur_mapping2;
|
||||
delete [] width_list;
|
||||
}
|
||||
|
||||
void HTMLRenderer::process(PDFDoc *doc)
|
||||
{
|
||||
cur_doc = doc;
|
||||
xref = doc->getXRef();
|
||||
|
||||
cerr << "Preprocessing: ";
|
||||
preprocessor.process(doc);
|
||||
|
||||
/*
|
||||
* determine scale factors
|
||||
*/
|
||||
@ -106,6 +83,30 @@ void HTMLRenderer::process(PDFDoc *doc)
|
||||
text_scale_factor2 = zoom / text_scale_factor1;
|
||||
}
|
||||
|
||||
ffw_init(param->debug);
|
||||
cur_mapping = new int32_t [0x10000];
|
||||
cur_mapping2 = new char* [0x100];
|
||||
width_list = new int [0x10000];
|
||||
}
|
||||
|
||||
HTMLRenderer::~HTMLRenderer()
|
||||
{
|
||||
ffw_finalize();
|
||||
clean_tmp_files();
|
||||
delete [] cur_mapping;
|
||||
delete [] cur_mapping2;
|
||||
delete [] width_list;
|
||||
}
|
||||
|
||||
void HTMLRenderer::process(PDFDoc *doc)
|
||||
{
|
||||
cur_doc = doc;
|
||||
xref = doc->getXRef();
|
||||
|
||||
cerr << "Preprocessing: ";
|
||||
preprocessor.process(doc);
|
||||
|
||||
|
||||
|
||||
cerr << "Working: ";
|
||||
BackgroundRenderer * bg_renderer = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user