summaryrefslogtreecommitdiff
path: root/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc')
-rw-r--r--Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
index 0496c6442ff..aa74fb68612 100644
--- a/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
+++ b/Build/source/libs/xpdf/xpdf-src/xpdf/pdftotext.cc
@@ -50,6 +50,10 @@ static char textEncName[128] = "";
static char textEOL[16] = "";
static GBool noPageBreaks = gFalse;
static GBool insertBOM = gFalse;
+static double marginLeft = 0;
+static double marginRight = 0;
+static double marginTop = 0;
+static double marginBottom = 0;
static char ownerPassword[33] = "\001";
static char userPassword[33] = "\001";
static GBool quiet = gFalse;
@@ -88,6 +92,14 @@ static ArgDesc argDesc[] = {
"don't insert page breaks between pages"},
{"-bom", argFlag, &insertBOM, 0,
"insert a Unicode BOM at the start of the text file"},
+ {"-marginl", argFP, &marginLeft, 0,
+ "left page margin"},
+ {"-marginr", argFP, &marginRight, 0,
+ "right page margin"},
+ {"-margint", argFP, &marginTop, 0,
+ "top page margin"},
+ {"-marginb", argFP, &marginBottom, 0,
+ "bottom page margin"},
{"-opw", argString, ownerPassword, sizeof(ownerPassword),
"owner password (for encrypted files)"},
{"-upw", argString, userPassword, sizeof(userPassword),
@@ -247,6 +259,10 @@ int main(int argc, char *argv[]) {
textOutControl.clipText = clipText;
textOutControl.discardDiagonalText = discardDiag;
textOutControl.insertBOM = insertBOM;
+ textOutControl.marginLeft = marginLeft;
+ textOutControl.marginRight = marginRight;
+ textOutControl.marginTop = marginTop;
+ textOutControl.marginBottom = marginBottom;
textOut = new TextOutputDev(textFileName->getCString(), &textOutControl,
gFalse);
if (textOut->isOk()) {