mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 09:36:41 -04:00
print/foomatic-filters: Patch Ghostscript call to count PDF pages
Before this patch, the Ghostscript call for counting PDF pages used the obsolete "pdfdict". Patch to use "runpdfbegin" instead. For more information, see Arch Linux bug 62251. https://bugs.archlinux.org/task/62251 Reported by: Thomas Vaughan <thomas@vaughan.net> Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
7990e83700
commit
c9675e7943
2 changed files with 15 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
PORTNAME= foomatic-filters
|
||||
PORTVERSION= 4.0.17
|
||||
PORTREVISION= 11
|
||||
PORTREVISION= 12
|
||||
CATEGORIES= print
|
||||
MASTER_SITES= http://www.openprinting.org/download/foomatic/
|
||||
|
||||
|
|
14
print/foomatic-filters/files/patch-pdf.c
Normal file
14
print/foomatic-filters/files/patch-pdf.c
Normal file
|
@ -0,0 +1,14 @@
|
|||
--- pdf.c.orig 2012-07-02 14:50:46 UTC
|
||||
+++ pdf.c
|
||||
@@ -46,9 +46,8 @@ static int pdf_count_pages(const char *filename)
|
||||
int pagecount;
|
||||
|
||||
snprintf(gscommand, 4095, "%s -dNODISPLAY -q -c "
|
||||
- "'/pdffile (%s) (r) file def pdfdict begin pdffile pdfopen begin "
|
||||
- "(PageCount: ) print pdfpagecount == flush currentdict pdfclose "
|
||||
- "end end quit'",
|
||||
+ "'/pdffile (%s) (r) file runpdfbegin (PageCount: ) print "
|
||||
+ "pdfpagecount = quit'",
|
||||
gspath, filename);
|
||||
|
||||
FILE *pd = popen(gscommand, "r");
|
Loading…
Add table
Reference in a new issue