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

Merge pull request #17 from stephengaito/poppler-0.84.0

Poppler 0.84.0
Updated to poppler-0.84.0
Poppler 0.84.0 removed the ModRegion tracking.
We now use the bitmap's width and height (ie the whole bitmap).
This might increase the processing time as well as the output image sizes.
This commit is contained in:
stephengaito 2020-05-30 13:24:27 +01:00 committed by GitHub
commit 169a1744ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View File

@ -12,8 +12,8 @@
#export POPPLER_VERSION=poppler-0.86.1 #export POPPLER_VERSION=poppler-0.86.1
#export POPPLER_VERSION=poppler-0.86.0 #export POPPLER_VERSION=poppler-0.86.0
#export POPPLER_VERSION=poppler-0.85.0 #export POPPLER_VERSION=poppler-0.85.0
#export POPPLER_VERSION=poppler-0.84.0 export POPPLER_VERSION=poppler-0.84.0
export POPPLER_VERSION=poppler-0.83.0 #export POPPLER_VERSION=poppler-0.83.0
#export POPPLER_VERSION=poppler-0.82.0 #export POPPLER_VERSION=poppler-0.82.0
#export POPPLER_VERSION=poppler-0.81.0 #export POPPLER_VERSION=poppler-0.81.0

View File

@ -59,7 +59,6 @@ SplashBackgroundRenderer::SplashBackgroundRenderer(const string & imgFormat, HTM
void SplashBackgroundRenderer::startPage(int pageNum, GfxState *state, XRef *xrefA) void SplashBackgroundRenderer::startPage(int pageNum, GfxState *state, XRef *xrefA)
{ {
SplashOutputDev::startPage(pageNum, state, xrefA); SplashOutputDev::startPage(pageNum, state, xrefA);
clearModRegion();
} }
void SplashBackgroundRenderer::drawChar(GfxState *state, double x, double y, void SplashBackgroundRenderer::drawChar(GfxState *state, double x, double y,
@ -127,7 +126,15 @@ void SplashBackgroundRenderer::embed_image(int pageno)
{ {
// xmin->xmax is top->bottom // xmin->xmax is top->bottom
int xmin, xmax, ymin, ymax; int xmin, xmax, ymin, ymax;
getModRegion(&xmin, &ymin, &xmax, &ymax); // poppler-0.84.0 hack to recover from the removal of *ModRegion tracking
//
auto * bitmap = getBitmap();
xmin = 0;
xmax = bitmap->getWidth();
ymin = 0;
ymax = bitmap->getHeight();
//
// end of hack
// dump the background image only when it is not empty // dump the background image only when it is not empty
if((xmin <= xmax) && (ymin <= ymax)) if((xmin <= xmax) && (ymin <= ymax))