1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-03 08:38:39 +00:00
This commit is contained in:
Lu Wang 2012-09-18 02:37:30 +08:00
parent 2d80cdc575
commit af65485eb3
2 changed files with 16 additions and 6 deletions

View File

@ -304,11 +304,12 @@ void HTMLRenderer::processLink(AnnotLink * al)
x2 = default_ctm[0] * x2 + default_ctm[2] * y2 + default_ctm[4];
y2 = default_ctm[1] * x2 + default_ctm[3] * y2 + default_ctm[5];
// TODO, in html, border width is included
html_fout << "<div style=\"position:absolute;"
<< "left:" << x1 << "px;"
<< "bottom:" << y1 << "px;"
<< "width:" << (x2-x1) << "px;"
<< "height:" << (y2-y1) << "px;";
<< "left:" << _round(x1) << "px;"
<< "bottom:" << _round(y1) << "px;"
<< "width:" << _round(x2-x1) << "px;"
<< "height:" << _round(y2-y1) << "px;";
auto * border = al->getBorder();
if(border)

View File

@ -172,9 +172,11 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
info.use_tounicode = (is_truetype_suffix(suffix) || (param->tounicode > 0));
const char * used_map = nullptr;
if(!get_metric_only)
{
const char * used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
used_map = font_preprocessor.get_code_map(hash_ref(font->getID()));
/*
* Step 1
@ -383,6 +385,13 @@ void HTMLRenderer::embed_font(const string & filepath, GfxFont * font, FontInfo
ffw_set_ascent(ascent);
ffw_set_descent(descent);
if(!get_metric_only)
{
if(font_8bit)
{
}
}
}
{
@ -439,7 +448,7 @@ void HTMLRenderer::drawString(GfxState * state, GooString * s)
while (len > 0) {
auto n = font->getNextChar(p, len, &code, &u, &uLen, &dx1, &dy1, &ox, &oy);
if(!(_equal(ox, 0) && _equal(oy, 0)))
{
cerr << "TODO: non-zero origins" << endl;