summaryrefslogtreecommitdiff
path: root/glib
diff options
context:
space:
mode:
authorKristian Høgsberg <krh@redhat.com>2005-05-18 17:39:59 +0000
committerKristian Høgsberg <krh@redhat.com>2005-05-18 17:39:59 +0000
commitafc05387c94a76ff0ed69b3f5d9a69ddd1448e83 (patch)
tree253f7b71db1a2da88f205f08f8ec9e6103049d70 /glib
parent420134a194af9161282ccfe329d17adef8d325f2 (diff)
2005-05-18 Kristian Høgsberg <krh@redhat.com>poppler-0.3.2
* 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.
Diffstat (limited to 'glib')
-rw-r--r--glib/poppler-document.cc15
-rw-r--r--glib/poppler-document.h1
2 files changed, 11 insertions, 5 deletions
diff --git a/glib/poppler-document.cc b/glib/poppler-document.cc
index c973299b..73f523e5 100644
--- a/glib/poppler-document.cc
+++ b/glib/poppler-document.cc
@@ -576,14 +576,16 @@ poppler_index_iter_free (PopplerIndexIter *iter)
* 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 @@ poppler_ps_file_new (PopplerDocument *document, const char *filename, int n_page
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;
}
diff --git a/glib/poppler-document.h b/glib/poppler-document.h
index f7e3652f..ff4ce5e4 100644
--- a/glib/poppler-document.h
+++ b/glib/poppler-document.h
@@ -104,6 +104,7 @@ gboolean poppler_index_iter_next (PopplerIndexIter *iter);
/* 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);