mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-07-04 17:18:40 +00:00
merging code
This commit is contained in:
parent
6579b54309
commit
3a5e776fa9
|
@ -11,7 +11,7 @@
|
|||
/* for Chrome & Safari */
|
||||
-webkit-text-stroke-width:0.13px;
|
||||
}
|
||||
.pw {
|
||||
.b {
|
||||
border: 1px solid black;
|
||||
margin: 13px auto;
|
||||
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());
|
||||
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
|
||||
{
|
||||
|
|
|
@ -174,11 +174,8 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state)
|
|||
|
||||
assert((!line_opened) && "Open line in startPage detected!");
|
||||
|
||||
// Add by Hongliang Tian
|
||||
// wrapper for page
|
||||
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 << "<div class=\"b\" style=\"width:" << pageWidth << "px;height:" << pageHeight << "px;\">"
|
||||
<< "<div id=\"p" << pageNum << "\" class=\"p\" style=\"width:" << pageWidth << "px;height:" << pageHeight << "px;";
|
||||
|
||||
html_fout << "background-image:url(";
|
||||
|
||||
|
@ -225,8 +222,7 @@ void HTMLRenderer::startPage(int pageNum, GfxState *state)
|
|||
void HTMLRenderer::endPage() {
|
||||
close_line();
|
||||
// close page
|
||||
// Modified by Hongliang Tian
|
||||
html_fout << "</div>" << endl << "</div>" << endl;
|
||||
html_fout << "</div>" << "</div>" << endl;
|
||||
}
|
||||
|
||||
void HTMLRenderer::process_single_html()
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
*
|
||||
* CSS classes
|
||||
*
|
||||
* b - page Box
|
||||
* p - Page
|
||||
* l - Line
|
||||
* _ - 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("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("clean-tmp", ¶m.clean_tmp, 1, "clean temporary files after processing")
|
||||
|
|
Loading…
Reference in New Issue
Block a user