From 215b377b884d04dc791cb3bb417d75713aedf5d7 Mon Sep 17 00:00:00 2001 From: Lu Wang Date: Sun, 5 Aug 2012 23:54:15 +0800 Subject: [PATCH] working --- README.md | 1 + src/HTMLRenderer.cc | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d58fae1..970e436 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ pdf2htmlEX is optimized for recent versions of moderm web browsers such as Mozil Features ---------------------------- +* Text Selection * Font embedding * Proper styling * Optimization for Web diff --git a/src/HTMLRenderer.cc b/src/HTMLRenderer.cc index 0e4aa18..c22667f 100644 --- a/src/HTMLRenderer.cc +++ b/src/HTMLRenderer.cc @@ -396,9 +396,9 @@ void HTMLRenderer::endString(GfxState *state) { // TODO: optimize text matrix search/install html_fout << boost::format("
getY() << "px;" + << "bottom:" << cur_string->getY() + cur_state->getFont()->getDescent() * cur_state->getFontSize() << "px;" << "left:" << cur_string->getX() << "px;" - << "top:" << (pageHeight - cur_string->getY() - cur_state->getFont()->getAscent() * cur_state->getFontSize()) << "px;" +// << "top:" << (pageHeight - cur_string->getY() - cur_state->getFont()->getAscent() * cur_state->getFontSize()) << "px;" ; // letter & word spacing @@ -413,7 +413,7 @@ void HTMLRenderer::endString(GfxState *state) { html_fout << "\""; double x,y; cur_state->transform(cur_state->getCurX(), cur_state->getCurY(), &x, &y); - html_fout << boost::format(" data-x=\"%1%\" data-y=\"%2%")%x%y; + html_fout << boost::format(" data-x=\"%1%\" data-y=\"%2%\" hs=\"%3%")%x%y%(cur_state->getHorizScaling()); } html_fout << "\">";