mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-10-05 19:41:40 +00:00
merging code
This commit is contained in:
parent
6579b54309
commit
3a5e776fa9
@ -11,7 +11,7 @@
|
|||||||
/* for Chrome & Safari */
|
/* for Chrome & Safari */
|
||||||
-webkit-text-stroke-width:0.13px;
|
-webkit-text-stroke-width:0.13px;
|
||||||
}
|
}
|
||||||
.pw {
|
.b {
|
||||||
border: 1px solid black;
|
border: 1px solid black;
|
||||||
margin: 13px auto;
|
margin: 13px auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -21,7 +21,7 @@ void HTMLRenderer::export_remote_font(const FontInfo & info, const string & suff
|
|||||||
auto fn = str_fmt("f%llx%s", info.id, suffix.c_str());
|
auto fn = str_fmt("f%llx%s", info.id, suffix.c_str());
|
||||||
if(param->single_html)
|
if(param->single_html)
|
||||||
{
|
{
|
||||||
allcss_fout << "'data:font/opentype;base64," << base64stream(ifstream(tmp_dir + "/" + (char*)fn, ifstream::binary)) << "'";
|
allcss_fout << "'data:font/" << fontfileformat << ";base64," << base64stream(ifstream(tmp_dir + "/" + (char*)fn, ifstream::binary)) << "'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -174,11 +174,8 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state)
|
|||||||
|
|
||||||
assert((!line_opened) && "Open line in startPage detected!");
|
assert((!line_opened) && "Open line in startPage detected!");
|
||||||
|
|
||||||
// Add by Hongliang Tian
|
html_fout << "<div class=\"b\" style=\"width:" << pageWidth << "px;height:" << pageHeight << "px;\">"
|
||||||
// wrapper for page
|
<< "<div id=\"p" << pageNum << "\" class=\"p\" style=\"width:" << pageWidth << "px;height:" << pageHeight << "px;";
|
||||||
html_fout << "<div class=\"pw\" style=\"width:" << pageWidth << "px;height:" << pageHeight << "px;\">" << endl;
|
|
||||||
|
|
||||||
html_fout << "<div id=\"p" << pageNum << "\" class=\"p\" style=\"width:" << pageWidth << "px;height:" << pageHeight << "px;";
|
|
||||||
|
|
||||||
html_fout << "background-image:url(";
|
html_fout << "background-image:url(";
|
||||||
|
|
||||||
@ -225,8 +222,7 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state)
|
|||||||
void HTMLRenderer::endPage() {
|
void HTMLRenderer::endPage() {
|
||||||
close_line();
|
close_line();
|
||||||
// close page
|
// close page
|
||||||
// Modified by Hongliang Tian
|
html_fout << "</div>" << "</div>" << endl;
|
||||||
html_fout << "</div>" << endl << "</div>" << endl;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void HTMLRenderer::process_single_html()
|
void HTMLRenderer::process_single_html()
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
*
|
*
|
||||||
* CSS classes
|
* CSS classes
|
||||||
*
|
*
|
||||||
|
* b - page Box
|
||||||
* p - Page
|
* p - Page
|
||||||
* l - Line
|
* l - Line
|
||||||
* _ - white space
|
* _ - white space
|
||||||
|
@ -76,7 +76,7 @@ void parse_options (int argc, char **argv)
|
|||||||
.add("space-as-offset", ¶m.space_as_offset, 0, "treat space characters as offsets")
|
.add("space-as-offset", ¶m.space_as_offset, 0, "treat space characters as offsets")
|
||||||
|
|
||||||
.add("font-suffix", ¶m.font_suffix, ".ttf", "suffix for extracted font files")
|
.add("font-suffix", ¶m.font_suffix, ".ttf", "suffix for extracted font files")
|
||||||
.add("font-format", ¶m.font_format, "truetype", "format for extracted font files")
|
.add("font-format", ¶m.font_format, "opentype", "format for extracted font files")
|
||||||
|
|
||||||
.add("debug", ¶m.debug, 0, "output debug information")
|
.add("debug", ¶m.debug, 0, "output debug information")
|
||||||
.add("clean-tmp", ¶m.clean_tmp, 1, "clean temporary files after processing")
|
.add("clean-tmp", ¶m.clean_tmp, 1, "clean temporary files after processing")
|
||||||
|
Loading…
Reference in New Issue
Block a user