1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-07-05 09:38:40 +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
valgrind
detect duplicate base fonts when embedding
take care of spaces (simulate by <span>)

View File

@ -18,10 +18,11 @@ public:
BackgroundRenderer(SplashColorMode colorModeA, int bitmapRowPadA,
GBool reverseVideoA, SplashColorPtr paperColorA,
GBool bitmapTopDownA = gTrue,
GBool allowAntialiasA = gTrue)
GBool allowAntialiasA = gTrue)
: SplashOutputDev(colorModeA,
bitmapRowPadA, reverseVideoA, paperColorA, bitmapTopDownA,
allowAntialiasA) { }
bitmapRowPadA, reverseVideoA, paperColorA, bitmapTopDownA,
allowAntialiasA)
{ }
virtual ~BackgroundRenderer() { }
virtual void drawChar(GfxState *state, double x, double y,

View File

@ -19,6 +19,7 @@
using std::fixed;
using std::flush;
using std::function;
using boost::filesystem::remove;
using boost::filesystem::filesystem_error;
@ -50,6 +51,10 @@ HTMLRenderer::~HTMLRenderer()
delete [] cur_mapping2;
}
static GBool annot_cb(Annot *, void *) {
return false;
};
void HTMLRenderer::process(PDFDoc *doc)
{
xref = doc->getXRef();
@ -78,13 +83,14 @@ void HTMLRenderer::process(PDFDoc *doc)
}
pre_process();
for(int i = param->first_page; i <= param->last_page ; ++i)
{
if(param->process_nontext)
{
doc->displayPage(bg_renderer, i, param->h_dpi, param->v_dpi,
0, true, false, false,
nullptr, nullptr, nullptr, nullptr);
nullptr, nullptr, &annot_cb, nullptr);
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);