[poppler] poppler/glib: poppler-document.cc, 1.13, 1.14 poppler-document.h, 1.9, 1.10

Kristian Hogsberg krh at freedesktop.org
Wed May 18 10:40:01 PDT 2005


Update of /cvs/poppler/poppler/glib
In directory gabe:/tmp/cvs-serv15878/glib

Modified Files:
	poppler-document.cc poppler-document.h 
Log Message:
2005-05-18  Kristian Høgsberg  <krh at redhat.com>

        * configure.ac: Require cairo 0.5.0, bump release to 0.3.2.

        * NEWS: Sum up latest changes.

        * glib/poppler-document.cc (poppler_ps_file_new): Take a page
        range here instead of just number of pages.



Index: poppler-document.cc
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-document.cc,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- poppler-document.cc	4 May 2005 06:32:38 -0000	1.13
+++ poppler-document.cc	18 May 2005 17:39:59 -0000	1.14
@@ -576,14 +576,16 @@
  * poppler_ps_file_new:
  * @document: a #PopplerDocument
  * @filename: the path of the output filename
- * @n_pages: the total number of pages that will be rendered
+ * @first_page: the first page to print
+ * @n_pages: the number of pages to print
  * 
  * Create a new postscript file to render to
  * 
  * Return value: a PopplerPSFile 
  **/
 PopplerPSFile *
-poppler_ps_file_new (PopplerDocument *document, const char *filename, int n_pages)
+poppler_ps_file_new (PopplerDocument *document, const char *filename,
+		     int first_page, int n_pages)
 {
 	PopplerPSFile *ps_file;
 
@@ -593,9 +595,12 @@
 
 	ps_file = g_new0 (PopplerPSFile, 1);
 	ps_file->document = (PopplerDocument *) g_object_ref (document);
-	ps_file->out = new PSOutputDev ((char *)filename, document->doc->getXRef(),
-					document->doc->getCatalog(), 1,
-					n_pages, psModePS);
+	ps_file->out = new PSOutputDev ((char *)filename,
+					document->doc->getXRef(),
+					document->doc->getCatalog(),
+					first_page + 1,
+					first_page + n_pages - 1,
+					psModePS);
 
 	return ps_file;
 }

Index: poppler-document.h
===================================================================
RCS file: /cvs/poppler/poppler/glib/poppler-document.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- poppler-document.h	4 May 2005 06:32:38 -0000	1.9
+++ poppler-document.h	18 May 2005 17:39:59 -0000	1.10
@@ -104,6 +104,7 @@
 /* Export to ps */
 PopplerPSFile *poppler_ps_file_new   (PopplerDocument *document,
 				      const char      *filename,
+				      int              first_pages,
 				      int              n_pages);
 void           poppler_ps_file_free  (PopplerPSFile   *ps_file);
 



More information about the poppler mailing list