diff options
author | Kristian Høgsberg <krh@redhat.com> | 2006-01-23 18:52:48 +0000 |
---|---|---|
committer | Kristian Høgsberg <krh@redhat.com> | 2006-01-23 18:52:48 +0000 |
commit | 052bf4b80c8a0dc45f6222617bfd8ae1b9c40410 (patch) | |
tree | c86856220b8e2aacaea88c19526506361d4b2d54 | |
parent | fb2054a5031d60aac3ccc9a36b3ed88a32188e33 (diff) |
2006-01-23 Kristian Høgsberg <krh@redhat.com>
* configure.ac:
* poppler/GlobalParams.cc:
* poppler/poppler-config.h.in:
* utils/pdftohtml.cc:
* utils/pdftops.cc: Respect command line paper size settings (#5641).
Drop the built-in paper sizes.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | poppler/GlobalParams.cc | 23 | ||||
-rw-r--r-- | poppler/poppler-config.h.in | 5 | ||||
-rw-r--r-- | utils/pdftohtml.cc | 4 | ||||
-rw-r--r-- | utils/pdftops.cc | 4 |
6 files changed, 15 insertions, 31 deletions
@@ -1,5 +1,14 @@ 2006-01-23 Kristian Høgsberg <krh@redhat.com> + * configure.ac: + * poppler/GlobalParams.cc: + * poppler/poppler-config.h.in: + * utils/pdftohtml.cc: + * utils/pdftops.cc: Respect command line paper size settings (#5641). + Drop the built-in paper sizes. + +2006-01-23 Kristian Høgsberg <krh@redhat.com> + * glib/test-poppler-glib.c (print_document_info, print_index): Move variable declarations to top (#5692). diff --git a/configure.ac b/configure.ac index 401244b3..d784a921 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,6 @@ AC_PROG_INSTALL AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defines if gettimeofday is available on your system])) dnl Enable these unconditionally. -AC_DEFINE([A4_PAPER], [1], [Default to A4 paper.]) AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.]) AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.]) AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.]) diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc index 11697fc8..49c05907 100644 --- a/poppler/GlobalParams.cc +++ b/poppler/GlobalParams.cc @@ -23,9 +23,6 @@ #ifdef WIN32 # include <shlobj.h> #endif -#if HAVE_PAPER_H -#include <paper.h> -#endif #include <fontconfig/fontconfig.h> #include "goo/gmem.h" #include "goo/GooString.h" @@ -324,24 +321,8 @@ GlobalParams::GlobalParams(char *cfgFileName) { cMapDirs = new GooHash(gTrue); toUnicodeDirs = new GooList(); displayFonts = new GooHash(); -#if HAVE_PAPER_H - char *paperName; - const struct paper *paperType; - paperinit(); - if ((paperName = systempapername())) { - paperType = paperinfo(paperName); - psPaperWidth = (int)paperpswidth(paperType); - psPaperHeight = (int)paperpsheight(paperType); - } else { - error(-1, "No paper information available - using defaults"); - psPaperWidth = defPaperWidth; - psPaperHeight = defPaperHeight; - } - paperdone(); -#else - psPaperWidth = defPaperWidth; - psPaperHeight = defPaperHeight; -#endif + psPaperWidth = -1; + psPaperHeight = -1; psImageableLLX = psImageableLLY = 0; psImageableURX = psPaperWidth; psImageableURY = psPaperHeight; diff --git a/poppler/poppler-config.h.in b/poppler/poppler-config.h.in index f93e5c01..bd0dd5cd 100644 --- a/poppler/poppler-config.h.in +++ b/poppler/poppler-config.h.in @@ -14,11 +14,6 @@ // around #undef look odd, but it's to silence warnings about // redefining those symbols. -/* Use A4 paper size instead of Letter for PostScript output. */ -#ifndef A4_PAPER -#undef A4_PAPER -#endif - /* Enable multithreading support. */ #ifndef MULTITHREADING #undef MULTITHREADED diff --git a/utils/pdftohtml.cc b/utils/pdftohtml.cc index caaf8c36..42040fde 100644 --- a/utils/pdftohtml.cc +++ b/utils/pdftohtml.cc @@ -316,12 +316,10 @@ int main(int argc, char *argv[]) { psFileName = new GooString(htmlFileName->getCString()); psFileName->append(".ps"); - globalParams->setPSPaperWidth(w); - globalParams->setPSPaperHeight(h); // XXX // globalParams->setPSNoText(gTrue); psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(), - doc->getCatalog(), firstPage, lastPage, psModePS); + doc->getCatalog(), firstPage, lastPage, psModePS, w, h); doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0, gTrue, gFalse, gFalse); delete psOut; diff --git a/utils/pdftops.cc b/utils/pdftops.cc index 3ff207b9..ac5745e8 100644 --- a/utils/pdftops.cc +++ b/utils/pdftops.cc @@ -307,7 +307,9 @@ int main(int argc, char *argv[]) { // write PostScript file psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(), - doc->getCatalog(), firstPage, lastPage, mode); + doc->getCatalog(), firstPage, lastPage, mode, + globalParams->getPSPaperWidth(), + globalParams->getPSPaperHeight()); if (psOut->isOk()) { doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0, globalParams->getPSCrop(), gFalse, gFalse); |