1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

disable annotation

This commit is contained in:
Lu Wang 2012-09-07 08:13:45 +08:00
parent 82dd71c803
commit e4ea4a975b
3 changed files with 11 additions and 6 deletions

2
TODO
View File

@ -1,7 +1,5 @@
disable annotation disable annotation
valgrind
detect duplicate base fonts when embedding detect duplicate base fonts when embedding
take care of spaces (simulate by <span>) take care of spaces (simulate by <span>)

View File

@ -21,7 +21,8 @@ public:
GBool allowAntialiasA = gTrue) GBool allowAntialiasA = gTrue)
: SplashOutputDev(colorModeA, : SplashOutputDev(colorModeA,
bitmapRowPadA, reverseVideoA, paperColorA, bitmapTopDownA, bitmapRowPadA, reverseVideoA, paperColorA, bitmapTopDownA,
allowAntialiasA) { } allowAntialiasA)
{ }
virtual ~BackgroundRenderer() { } virtual ~BackgroundRenderer() { }
virtual void drawChar(GfxState *state, double x, double y, virtual void drawChar(GfxState *state, double x, double y,

View File

@ -19,6 +19,7 @@
using std::fixed; using std::fixed;
using std::flush; using std::flush;
using std::function;
using boost::filesystem::remove; using boost::filesystem::remove;
using boost::filesystem::filesystem_error; using boost::filesystem::filesystem_error;
@ -50,6 +51,10 @@ HTMLRenderer::~HTMLRenderer()
delete [] cur_mapping2; delete [] cur_mapping2;
} }
static GBool annot_cb(Annot *, void *) {
return false;
};
void HTMLRenderer::process(PDFDoc *doc) void HTMLRenderer::process(PDFDoc *doc)
{ {
xref = doc->getXRef(); xref = doc->getXRef();
@ -78,13 +83,14 @@ void HTMLRenderer::process(PDFDoc *doc)
} }
pre_process(); pre_process();
for(int i = param->first_page; i <= param->last_page ; ++i) for(int i = param->first_page; i <= param->last_page ; ++i)
{ {
if(param->process_nontext) if(param->process_nontext)
{ {
doc->displayPage(bg_renderer, i, param->h_dpi, param->v_dpi, doc->displayPage(bg_renderer, i, param->h_dpi, param->v_dpi,
0, true, false, false, 0, true, false, false,
nullptr, nullptr, nullptr, nullptr); nullptr, nullptr, &annot_cb, nullptr);
string fn = (format("p%|1$x|.png")%i).str(); string fn = (format("p%|1$x|.png")%i).str();
bg_renderer->getBitmap()->writeImgFile(splashFormatPng, (char*)((param->single_html ? tmp_dir : dest_dir) / fn) .c_str(), param->h_dpi, param->v_dpi); bg_renderer->getBitmap()->writeImgFile(splashFormatPng, (char*)((param->single_html ? tmp_dir : dest_dir) / fn) .c_str(), param->h_dpi, param->v_dpi);