X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=blobdiff_plain;ds=sidebyside;f=pdf%2Fxpdf%2Fpdftotext.cc;h=a67f92439990d1249b35d0dff79a5cde54709bdd;hb=884f739665dc56e66f51e104350f2affd33f2dd8;hp=150954fc983210c2a7a1aed5c778eaeab2736819;hpb=64676031423465996e83c4a685290f0c3d97a249;p=evince.git diff --git a/pdf/xpdf/pdftotext.cc b/pdf/xpdf/pdftotext.cc index 150954fc..a67f9243 100644 --- a/pdf/xpdf/pdftotext.cc +++ b/pdf/xpdf/pdftotext.cc @@ -2,7 +2,7 @@ // // pdftotext.cc // -// Copyright 1997-2002 Glyph & Cog, LLC +// Copyright 1997-2003 Glyph & Cog, LLC // //======================================================================== @@ -35,6 +35,7 @@ static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt); static int firstPage = 1; static int lastPage = 0; +static GBool physLayout = gFalse; static GBool rawOrder = gFalse; static GBool htmlMeta = gFalse; static char textEncName[128] = ""; @@ -51,6 +52,8 @@ static ArgDesc argDesc[] = { "first page to convert"}, {"-l", argInt, &lastPage, 0, "last page to convert"}, + {"-layout", argFlag, &physLayout, 0, + "maintain original physical layout"}, {"-raw", argFlag, &rawOrder, 0, "keep strings in content stream order"}, {"-htmlmeta", argFlag, &htmlMeta, 0, @@ -222,7 +225,8 @@ int main(int argc, char *argv[]) { } // write text file - textOut = new TextOutputDev(textFileName->getCString(), rawOrder, htmlMeta); + textOut = new TextOutputDev(textFileName->getCString(), + physLayout, rawOrder, htmlMeta); if (textOut->isOk()) { doc->displayPages(textOut, firstPage, lastPage, 72, 0, gFalse); } else {