mirror of
https://github.com/pdf2htmlEX/pdf2htmlEX.git
synced 2024-12-22 04:50:09 +00:00
new param use-cropbox
This commit is contained in:
parent
c886e22292
commit
59a571ac8a
@ -54,9 +54,12 @@ If multiple values are specified, the minimum one will be used.
|
||||
|
||||
If none is specified, pages will be rendered as 72DPI.
|
||||
.TP
|
||||
.B --hpdi <dpi>, --vpdi <dpi> (Default: 144)
|
||||
.B --hdpi <dpi>, --vdpi <dpi> (Default: 144)
|
||||
Specify the horizontal and vertical DPI for images
|
||||
.TP
|
||||
.B --use-cropbox <0|1> (Default: 0)
|
||||
Use CropBox instead of MediaBox for output.
|
||||
.TP
|
||||
.B --process-nontext <0|1> (Default: 1)
|
||||
Whether to process non-text objects (as images)
|
||||
.TP
|
||||
|
@ -33,7 +33,9 @@ static GBool annot_cb(Annot *, void *) {
|
||||
void SplashBackgroundRenderer::render_page(PDFDoc * doc, int pageno, const string & filename)
|
||||
{
|
||||
doc->displayPage(this, pageno, param->h_dpi, param->v_dpi,
|
||||
0, true, false, false,
|
||||
0,
|
||||
(param->use_cropbox == 0),
|
||||
false, false,
|
||||
nullptr, nullptr, &annot_cb, nullptr);
|
||||
|
||||
getBitmap()->writeImgFile(splashFormatPng,
|
||||
|
@ -105,7 +105,9 @@ void HTMLRenderer::process(PDFDoc *doc)
|
||||
|
||||
doc->displayPage(this, i,
|
||||
text_zoom_factor() * DEFAULT_DPI, text_zoom_factor() * DEFAULT_DPI,
|
||||
0, true, false, false,
|
||||
0,
|
||||
(param->use_cropbox == 0),
|
||||
false, false,
|
||||
nullptr, nullptr, nullptr, nullptr);
|
||||
|
||||
if(param->split_pages)
|
||||
|
@ -28,6 +28,7 @@ struct Param
|
||||
double zoom;
|
||||
double fit_width, fit_height;
|
||||
double h_dpi, v_dpi;
|
||||
int use_cropbox;
|
||||
|
||||
int process_nontext;
|
||||
int single_html;
|
||||
|
@ -67,6 +67,7 @@ void parse_options (int argc, char **argv)
|
||||
.add("fit-height", ¶m.fit_height, 0, "fit height", nullptr, true)
|
||||
.add("hdpi", ¶m.h_dpi, 144.0, "horizontal DPI for non-text")
|
||||
.add("vdpi", ¶m.v_dpi, 144.0, "vertical DPI for non-text")
|
||||
.add("use-cropbox", ¶m.use_cropbox, 0, "use CropBox instead of MediaBox")
|
||||
|
||||
.add("process-nontext", ¶m.process_nontext, 1, "process nontext objects")
|
||||
.add("single-html", ¶m.single_html, 1, "combine everything into one single HTML file")
|
||||
|
Loading…
Reference in New Issue
Block a user