Move setPSCenter from GlobalParams to PSOutputDev
diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index e3de7e3..1461910 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -572,7 +572,6 @@
   sysFonts = new SysFontList();
   psExpandSmaller = gFalse;
   psShrinkLarger = gTrue;
-  psCenter = gTrue;
   psLevel = psLevel2;
   textEncoding = new GooString("UTF-8");
 #if defined(_WIN32)
@@ -1373,15 +1372,6 @@
   return f;
 }
 
-GBool GlobalParams::getPSCenter() {
-  GBool f;
-
-  lockGlobalParams;
-  f = psCenter;
-  unlockGlobalParams;
-  return f;
-}
-
 PSLevel GlobalParams::getPSLevel() {
   PSLevel level;
 
@@ -1561,12 +1551,6 @@
   unlockGlobalParams;
 }
 
-void GlobalParams::setPSCenter(GBool center) {
-  lockGlobalParams;
-  psCenter = center;
-  unlockGlobalParams;
-}
-
 void GlobalParams::setPSLevel(PSLevel level) {
   lockGlobalParams;
   psLevel = level;
diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index 31e8cbf..78a70cd 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -133,7 +133,6 @@
 		              GooString *base14Name = NULL);
   GBool getPSExpandSmaller();
   GBool getPSShrinkLarger();
-  GBool getPSCenter();
   PSLevel getPSLevel();
   GooString *getTextEncodingName();
   EndOfLineKind getTextEOL();
@@ -159,7 +158,6 @@
   void addFontFile(GooString *fontName, GooString *path);
   void setPSExpandSmaller(GBool expand);
   void setPSShrinkLarger(GBool shrink);
-  void setPSCenter(GBool center);
   void setPSLevel(PSLevel level);
   void setTextEncoding(char *encodingName);
   GBool setTextEOL(char *s);
@@ -219,7 +217,6 @@
   SysFontList *sysFonts;	// system fonts
   GBool psExpandSmaller;	// expand smaller pages to fill paper
   GBool psShrinkLarger;		// shrink larger pages to fit paper
-  GBool psCenter;		// center pages on the paper
   PSLevel psLevel;		// PostScript level to generate
   GooString *textEncoding;	// encoding (unicodeMap) to use for text
 				//   output
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 5e4226f..b3fffe4 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1259,6 +1259,7 @@
   rasterMono = gFalse;
   rasterResolution = 300;
   uncompressPreloadedImages = gFalse;
+  psCenter = gTrue;
   rasterAntialias = gFalse;
   displayText = gTrue;
   ok = gTrue;
@@ -3834,7 +3835,7 @@
     if (tx0 >= 0 && ty0 >= 0) {
       tx += (rotate == 0 || rotate == 180) ? tx0 : ty0;
       ty += (rotate == 0 || rotate == 180) ? ty0 : -tx0;
-    } else if (globalParams->getPSCenter()) {
+    } else if (psCenter) {
       if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) {
 	tx += (imgWidth2 - xScale * (clipURX0 - clipLLX0)) / 2;
 	ty += (imgHeight2 - yScale * (clipURY0 - clipLLY0)) / 2;
diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h
index 8dd1c95..f081414 100644
--- a/poppler/PSOutputDev.h
+++ b/poppler/PSOutputDev.h
@@ -15,7 +15,7 @@
 //
 // Copyright (C) 2005 Martin Kretzschmar <martink@gnome.org>
 // Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
-// Copyright (C) 2006-2008, 2012, 2013, 2015 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2006-2008, 2012, 2013, 2015, 2017 Albert Astals Cid <aacid@kde.org>
 // Copyright (C) 2007 Brad Hards <bradh@kde.org>
 // Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
 // Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
@@ -309,6 +309,7 @@
     { overlayCbk = cbk; overlayCbkData = data; }
   void setDisplayText(GBool display) { displayText = display; }
 
+  void setPSCenter(GBool center) { psCenter = center; }
   void setRasterAntialias(GBool a) { rasterAntialias = a; }
   void setRasterResolution(double r) { rasterResolution = r; }
   void setRasterMono(GBool b) { rasterMono = b; }
@@ -527,6 +528,7 @@
   GBool t3NeedsRestore;		// set if a 'q' operator was issued
   GBool forceRasterize;		// forces the page to be rasterized into a image before printing
   GBool displayText;		// displayText
+  GBool psCenter;		// center pages on the paper
   GBool rasterAntialias;	// antialias on rasterize
   GBool uncompressPreloadedImages;
   double rasterResolution;	// PostScript rasterization resolution (dpi)
diff --git a/utils/pdftops.cc b/utils/pdftops.cc
index 2eeba19..b1339f2 100644
--- a/utils/pdftops.cc
+++ b/utils/pdftops.cc
@@ -16,7 +16,7 @@
 // under GPL version 2 or later
 //
 // Copyright (C) 2006 Kristian Høgsberg <krh@redhat.com>
-// Copyright (C) 2007-2008, 2010, 2015 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2007-2008, 2010, 2015, 2017 Albert Astals Cid <aacid@kde.org>
 // Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
 // Copyright (C) 2009 Sanjoy Mahajan <sanjoy@mit.edu>
 // Copyright (C) 2009, 2011, 2012, 2014-2016 William Bader <williambader@hotmail.com>
@@ -297,9 +297,6 @@
   if (noShrink) {
     globalParams->setPSShrinkLarger(gFalse);
   }
-  if (noCenter) {
-    globalParams->setPSCenter(gFalse);
-  }
   if (level1 || level1Sep || level2 || level2Sep || level3 || level3Sep) {
     globalParams->setPSLevel(level);
   }
@@ -393,6 +390,9 @@
 			  paperHeight,
                           noCrop,
 			  duplex);
+  if (noCenter) {
+    psOut->setPSCenter(gFalse);
+  }
 
   if (rasterAntialiasStr[0]) {
     if (!GlobalParams::parseYesNo2(rasterAntialiasStr, &rasterAntialias)) {