Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From a84c16fdc606f22b993f870b1cea56dd060a35e6 Mon Sep 17 00:00:00 2001 |
| 2 | From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com> |
| 3 | Date: Thu, 22 Oct 2015 16:55:30 +0200 |
| 4 | Subject: [PATCH 2/2] epdf_poppler_postscript.cpp: fix build for poppler API |
| 5 | change |
| 6 | MIME-Version: 1.0 |
| 7 | Content-Type: text/plain; charset=UTF-8 |
| 8 | Content-Transfer-Encoding: 8bit |
| 9 | |
| 10 | Poppler API was changed in [1]. The patch not only shows the change but also |
| 11 | inspires how to fix. |
| 12 | |
| 13 | [1] http://cgit.freedesktop.org/poppler/poppler/commit/?id=9caf7525409d699c16896653528486451123b485 |
| 14 | |
| 15 | Upstream-Status: Pending |
| 16 | |
| 17 | Signed-off-by: Andreas MΓΌller <schnitzeltony@googlemail.com> |
| 18 | --- |
| 19 | src/lib/poppler/epdf_poppler_postscript.cpp | 7 +++++-- |
| 20 | 1 file changed, 5 insertions(+), 2 deletions(-) |
| 21 | |
| 22 | diff --git a/src/lib/poppler/epdf_poppler_postscript.cpp b/src/lib/poppler/epdf_poppler_postscript.cpp |
| 23 | index 0c2836b..656193b 100644 |
| 24 | --- a/src/lib/poppler/epdf_poppler_postscript.cpp |
| 25 | +++ b/src/lib/poppler/epdf_poppler_postscript.cpp |
| 26 | @@ -82,11 +82,14 @@ epdf_postscript_print (const Epdf_Postscript *postscript) |
| 27 | |
| 28 | // FIXME: fix postscript title |
| 29 | #ifdef HAVE_POPPLER_0_20 |
| 30 | + std::vector<int> pages; |
| 31 | + for (int i = postscript->first_page; i <= postscript->last_page; ++i) { |
| 32 | + pages.push_back(i); |
| 33 | + } |
| 34 | PSOutputDev ps_dev(postscript->filename, |
| 35 | postscript->pdfdoc, |
| 36 | (char *)"PS title", |
| 37 | - postscript->first_page, |
| 38 | - postscript->last_page, |
| 39 | + pages, |
| 40 | psModePS, |
| 41 | (int)postscript->width, |
| 42 | (int)postscript->height, |
| 43 | -- |
| 44 | 2.1.0 |
| 45 | |