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

use correct metric when use cropbox; fixes 110

This commit is contained in:
Lu Wang 2013-03-28 14:59:24 +08:00
parent 88c18d56d6
commit c24e10064c
4 changed files with 11 additions and 2 deletions

View File

@ -73,6 +73,10 @@ public:
// Does this device need non-text content?
virtual GBool needNonText() { return (param->process_nontext) ? gTrue: gFalse; }
// Does this device need to clip pages to the crop box even when the
// box is the crop box?
virtual GBool needClipToCropBox() { return gTrue; }
virtual void setDefaultCTM(double *ctm);
// Start a page.

View File

@ -122,7 +122,8 @@ void HTMLRenderer::process(PDFDoc *doc)
text_zoom_factor() * DEFAULT_DPI, text_zoom_factor() * DEFAULT_DPI,
0,
(!(param->use_cropbox)),
false, false,
true, // crop
false, // printing
nullptr, nullptr, nullptr, nullptr);
if(param->split_pages)

View File

@ -48,7 +48,10 @@ void Preprocessor::process(PDFDoc * doc)
cerr << "Preprocessing: " << (i-param->first_page) << "/" << page_count << '\r' << flush;
doc->displayPage(this, i, DEFAULT_DPI, DEFAULT_DPI,
0, true, false, false,
0,
(!(param->use_cropbox)),
true, // crop
false, // printing
nullptr, nullptr, nullptr, nullptr);
}
if(page_count >= 0)

View File

@ -34,6 +34,7 @@ public:
virtual GBool useDrawChar() { return gTrue; }
virtual GBool interpretType3Chars() { return gFalse; }
virtual GBool needNonText() { return gFalse; }
virtual GBool needClipToCropBox() { return gTrue; }
virtual void drawChar(GfxState *state, double x, double y,
double dx, double dy,