1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
3 ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
4 ;;; Copyright © 2014, 2015, 2016 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
6 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
7 ;;; Coypright © 2016 ng0 <ng0@we.make.ritual.n0.is>
8 ;;; Coypright © 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Coypright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Coypright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
11 ;;; Coypright © 2016 Julien Lepiller <julien@lepiller.eu>
12 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2017 Leo Famulari <leo@famulari.name>
14 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
15 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
16 ;;; Copyright © 2017 Tobias Geerinckx-Rice <me@tobias.gr>
18 ;;; This file is part of GNU Guix.
20 ;;; GNU Guix is free software; you can redistribute it and/or modify it
21 ;;; under the terms of the GNU General Public License as published by
22 ;;; the Free Software Foundation; either version 3 of the License, or (at
23 ;;; your option) any later version.
25 ;;; GNU Guix is distributed in the hope that it will be useful, but
26 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
27 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 ;;; GNU General Public License for more details.
30 ;;; You should have received a copy of the GNU General Public License
31 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
33 (define-module (gnu packages pdf)
34 #:use-module ((guix licenses) #:prefix license:)
35 #:use-module (guix packages)
36 #:use-module (guix download)
37 #:use-module (guix utils)
38 #:use-module (guix build-system gnu)
39 #:use-module (guix build-system cmake)
40 #:use-module (guix build-system python)
41 #:use-module (guix build-system trivial)
42 #:use-module (gnu packages)
43 #:use-module (gnu packages autotools)
44 #:use-module (gnu packages backup)
45 #:use-module (gnu packages base)
46 #:use-module (gnu packages bash)
47 #:use-module (gnu packages compression)
48 #:use-module (gnu packages curl)
49 #:use-module (gnu packages databases)
50 #:use-module (gnu packages djvu)
51 #:use-module (gnu packages fontutils)
52 #:use-module (gnu packages game-development)
53 #:use-module (gnu packages gettext)
54 #:use-module (gnu packages ghostscript)
55 #:use-module (gnu packages gl)
56 #:use-module (gnu packages glib)
57 #:use-module (gnu packages gnome)
58 #:use-module (gnu packages gnupg)
59 #:use-module (gnu packages gtk)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages imagemagick)
62 #:use-module (gnu packages javascript)
63 #:use-module (gnu packages lesstif)
64 #:use-module (gnu packages linux)
65 #:use-module (gnu packages lua)
66 #:use-module (gnu packages pcre)
67 #:use-module (gnu packages perl)
68 #:use-module (gnu packages photo)
69 #:use-module (gnu packages pkg-config)
70 #:use-module (gnu packages python)
71 #:use-module (gnu packages qt)
72 #:use-module (gnu packages sdl)
73 #:use-module (gnu packages tls)
74 #:use-module (gnu packages xdisorg)
75 #:use-module (gnu packages xorg)
76 #:use-module (srfi srfi-1))
78 (define-public poppler
84 (uri (string-append "https://poppler.freedesktop.org/poppler-"
88 "0hcnghliyr8pr887qza18qfgaclw5jr889g1cjcglkni9jr2dmm3"))))
89 (build-system gnu-build-system)
92 (inputs `(("fontconfig" ,fontconfig)
93 ("freetype" ,freetype)
98 ("openjpeg-1" ,openjpeg-1) ; prefers openjpeg-1
101 ;; To build poppler-glib (as needed by Evince), we need Cairo and
102 ;; GLib. But of course, that Cairo must not depend on Poppler.
103 ("cairo" ,(package (inherit cairo)
104 (inputs (alist-delete "poppler"
105 (package-inputs cairo)))))
108 `(("pkg-config" ,pkg-config)
109 ("glib" ,glib "bin") ; glib-mkenums, etc.
110 ("gobject-introspection" ,gobject-introspection)))
112 `(#:tests? #f ; no test data provided with the tarball
114 '("--enable-xpdf-headers" ; to install header files
117 ;; Saves 8 MiB of .a files.
120 (modify-phases %standard-phases
121 (add-before 'configure 'setenv
124 (string-append (assoc-ref %build-inputs "openjpeg-1")
125 "/include/openjpeg-1.5"
126 ":" (or (getenv "CPATH") "")))
128 (synopsis "PDF rendering library")
130 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
131 (license license:gpl2+)
132 (home-page "https://poppler.freedesktop.org/")))
134 (define-public poppler-qt4
135 (package (inherit poppler)
137 (inputs `(("qt-4" ,qt-4)
138 ,@(package-inputs poppler)))
139 (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
141 (define-public poppler-qt5
142 (package (inherit poppler)
144 (inputs `(("qtbase" ,qtbase)
145 ,@(package-inputs poppler)))
147 (substitute-keyword-arguments (package-arguments poppler)
148 ((#:configure-flags flags)
149 `(cons "CXXFLAGS=-std=gnu++11" ,flags))))
150 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
152 (define-public python-poppler-qt4
154 (name "python-poppler-qt4")
159 (uri (string-append "https://pypi.python.org/packages/source/p"
160 "/python-poppler-qt4/python-poppler-qt4-"
164 "0x63niylkk4q3h3ay8zrk3m1xiik0x3hlr4gvj7kswx48qi1vb99"))))
165 (build-system python-build-system)
168 (modify-phases %standard-phases
170 'unpack 'patch-poppler-include-paths
172 (substitute* (find-files "." "poppler-.*\\.sip")
173 (("qt4/poppler-.*\\.h" header)
174 (string-append "poppler/" header)))
177 `(("pkg-config" ,pkg-config)))
179 `(("python-sip" ,python-sip)
180 ("python-pyqt-4" ,python-pyqt-4)
181 ("poppler-qt4" ,poppler-qt4)))
182 (home-page "https://pypi.python.org/pypi/python-poppler-qt4")
183 (synopsis "Python bindings for Poppler-Qt4")
185 "This package provides Python bindings for the Qt4 interface of the
186 Poppler PDF rendering library.")
187 (license license:lgpl2.1+)))
189 (define-public python-poppler-qt5
191 (name "python-poppler-qt5")
196 (uri (pypi-uri "python-poppler-qt5" version))
199 "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"))))
200 (build-system python-build-system)
202 `(;; There are no tests. The check phase just causes a rebuild.
205 (modify-phases %standard-phases
207 (lambda* (#:key inputs #:allow-other-keys)
208 (substitute* "setup.py"
209 ;; This check always fails, so disable it.
210 (("if not check_qtxml\\(\\)")
212 ;; Enable C++11, which is needed because of Qt5.
213 (("\\*\\*ext_args" line)
214 (string-append "extra_compile_args=['-std=gnu++11'], " line)))
215 ;; We need to pass an extra flag here. This cannot be in
216 ;; configure-flags because it should not be passed for the
217 ;; installation phase.
218 ((@@ (guix build python-build-system) call-setuppy)
219 "build_ext" (list (string-append "--pyqt-sip-dir="
220 (assoc-ref inputs "python-pyqt")
221 "/share/sip")) #t))))))
223 `(("pkg-config" ,pkg-config)))
225 `(("python-sip" ,python-sip)
226 ("python-pyqt" ,python-pyqt)
227 ("poppler-qt5" ,poppler-qt5)
229 (home-page "https://pypi.python.org/pypi/python-poppler-qt5")
230 (synopsis "Python bindings for Poppler-Qt5")
232 "This package provides Python bindings for the Qt5 interface of the
233 Poppler PDF rendering library.")
234 (license license:lgpl2.1+)))
236 (define-public libharu
242 (uri (string-append "https://github.com/libharu/libharu/archive/"
244 (string-join (string-split version #\.) "_")
246 (file-name (string-append name "-" version ".tar.gz"))
249 "1lm4v539y9cb1lvbq387j57sy7yxda3yv8b1pk8m6zazbp66i7lg"))))
250 (build-system gnu-build-system)
253 (list (string-append "--with-zlib="
254 (assoc-ref %build-inputs "zlib"))
255 (string-append "--with-png="
256 (assoc-ref %build-inputs "libpng")))
258 (modify-phases %standard-phases
259 (add-after 'unpack 'autogen
260 (lambda _ (zero? (system* "autoreconf" "-vif")))))))
265 `(("autoconf" ,autoconf)
266 ("automake" ,automake)
267 ("libtool" ,libtool)))
268 (home-page "http://libharu.org/")
269 (synopsis "Library for generating PDF files")
271 "libHaru is a library for generating PDF files. libHaru does not support
272 reading and editing of existing PDF files.")
273 (license license:zlib)))
281 (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
284 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
285 (build-system gnu-build-system)
286 (inputs `(("freetype" ,freetype)
287 ("gs-fonts" ,gs-fonts)
289 ("libpaper" ,libpaper)
298 `(#:tests? #f ; there is no check target
299 #:parallel-build? #f ; build fails randomly on 8-way machines
301 (list (string-append "--with-freetype2-includes="
302 (assoc-ref %build-inputs "freetype")
303 "/include/freetype2"))
305 (modify-phases %standard-phases
307 (lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
308 (let* ((install (assoc-ref %standard-phases 'install))
309 (out (assoc-ref outputs "out"))
310 (xpdfrc (string-append out "/etc/xpdfrc"))
311 (gs-fonts (assoc-ref inputs "gs-fonts")))
314 (("/usr/local/share/ghostscript/fonts")
315 (string-append gs-fonts "/share/fonts/type1/ghostscript"))
316 (("#fontFile") "fontFile")))
318 (synopsis "Viewer for PDF files based on the Motif toolkit")
320 "Xpdf is a viewer for Portable Document Format (PDF) files.")
321 (license license:gpl3) ; or gpl2, but not gpl2+
322 (home-page "http://www.foolabs.com/xpdf/")))
324 (define-public zathura-cb
331 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
335 "0r4viisycj39kaz4281cmkr7n9w5q96dmlf7nf45n8zq8qy2npw3"))))
336 (native-inputs `(("pkg-config" ,pkg-config)))
337 (propagated-inputs `(("girara" ,girara)))
338 (inputs `(("libarchive" ,libarchive)
340 ("zathura" ,zathura)))
341 (build-system gnu-build-system)
343 `(#:make-flags (list (string-append "PREFIX=" %output)
344 (string-append "PLUGINDIR=" %output "/lib/zathura")
346 #:tests? #f ; Package does not contain tests.
348 (modify-phases %standard-phases (delete 'configure))))
349 (home-page "https://pwmt.org/projects/zathura-cb/")
350 (synopsis "Comic book support for zathura (libarchive backend)")
351 (description "The zathura-cb plugin adds comic book support to zathura
353 (license license:zlib)))
355 (define-public zathura-ps
362 (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
366 "1x4knqja8pw2a5cb3y2209nr3iddj1z8nwasy48v5nprj61fdxqj"))))
367 (native-inputs `(("pkg-config" ,pkg-config)))
368 (propagated-inputs `(("girara" ,girara)))
369 (inputs `(("libspectre" ,libspectre)
371 ("zathura" ,zathura)))
372 (build-system gnu-build-system)
374 `(#:make-flags (list (string-append "PREFIX=" %output)
375 (string-append "PLUGINDIR=" %output "/lib/zathura")
377 #:tests? #f ; Package does not contain tests.
379 (modify-phases %standard-phases (delete 'configure))))
380 (home-page "https://pwmt.org/projects/zathura-ps/")
381 (synopsis "PS support for zathura (libspectre backend)")
382 (description "The zathura-ps plugin adds PS support to zathura
384 (license license:zlib)))
386 (define-public zathura-djvu
388 (name "zathura-djvu")
393 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
397 "0py0ra44f65cg064xzds0qr6vnglj2a5bwhnbwa0dyh2nyizdzmf"))))
398 (native-inputs `(("pkg-config" ,pkg-config)))
399 (propagated-inputs `(("girara" ,girara)))
401 `(("djvulibre" ,djvulibre)
403 ("zathura" ,zathura)))
404 (build-system gnu-build-system)
406 `(#:make-flags (list (string-append "PREFIX=" %output)
407 (string-append "PLUGINDIR=" %output "/lib/zathura")
409 #:tests? #f ; Package does not contain tests.
411 (modify-phases %standard-phases (delete 'configure))))
412 (home-page "https://pwmt.org/projects/zathura-djvu/")
413 (synopsis "DjVu support for zathura (DjVuLibre backend)")
414 (description "The zathura-djvu plugin adds DjVu support to zathura
415 using the DjVuLibre library.")
416 (license license:zlib)))
418 (define-public zathura-pdf-mupdf
420 (name "zathura-pdf-mupdf")
425 (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
426 "/download/zathura-pdf-mupdf-" version ".tar.gz"))
429 "06zqn8z6a0hfsx3s1kzqvqzb73afgcl6z5r062sxv7kv570fvffr"))))
430 (native-inputs `(("pkg-config" ,pkg-config)))
431 (propagated-inputs `(("girara" ,girara)))
434 ("jbig2dec" ,jbig2dec)
437 ("openjpeg" ,openjpeg)
439 ("zathura" ,zathura)))
440 (build-system gnu-build-system)
442 `(#:make-flags (list (string-append "PREFIX=" %output)
443 (string-append "PLUGINDIR=" %output "/lib/zathura")
445 #:tests? #f ;No tests.
446 #:phases (modify-phases %standard-phases (delete 'configure))))
447 (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
448 (synopsis "PDF support for zathura (mupdf backend)")
449 (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
450 by using the @code{mupdf} rendering library.")
451 (license license:zlib)))
453 (define-public zathura-pdf-poppler
455 (name "zathura-pdf-poppler")
460 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
464 "1h43sgxpsbrsnn5z19661642plzhpv6b0y3f4kyzshv1rr6lwplq"))))
465 (native-inputs `(("pkg-config" ,pkg-config)))
466 (propagated-inputs `(("girara" ,girara)))
468 `(("poppler" ,poppler)
472 (build-system gnu-build-system)
474 `(#:make-flags (list (string-append "PREFIX=" %output)
475 (string-append "PLUGINDIR=" %output "/lib/zathura")
477 #:tests? #f ; Package does not include tests.
479 (modify-phases %standard-phases (delete 'configure))))
480 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
481 (synopsis "PDF support for zathura (poppler backend)")
482 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
483 by using the poppler rendering engine.")
484 (license license:zlib)))
486 (define-public zathura
493 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
497 "0dz5pky3vmf3s2cp2rv1c099gb1s49p9xlgm3ghyy4pzyxc8bgs6"))
498 (patches (search-patches
499 "zathura-plugindir-environment-variable.patch"))))
500 (native-inputs `(("pkg-config" ,pkg-config)
501 ("gettext" ,gettext-minimal)
502 ("glib:bin" ,glib "bin")))
503 (inputs `(("girara" ,girara)
507 (list (search-path-specification
508 (variable "ZATHURA_PLUGIN_PATH")
509 (files '("lib/zathura")))))
510 (build-system gnu-build-system)
513 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
515 #:tests? #f ; Tests fail: "Gtk cannot open display".
518 (modify-phases %standard-phases (delete 'configure))))
519 (home-page "https://pwmt.org/projects/zathura/")
520 (synopsis "Lightweight keyboard-driven PDF viewer")
521 (description "Zathura is a customizable document viewer. It provides a
522 minimalistic interface and an interface that mainly focuses on keyboard
524 (license license:zlib)))
526 (define-public podofo
532 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
533 "/podofo-" version ".tar.gz"))
536 "012kgfx5j5n6w4zkc1d290d2cwjk60jhzsjlr2x19g3yi75q2jc5"))))
537 (build-system cmake-build-system)
538 (inputs ; TODO: Add cppunit for tests
542 ("fontconfig" ,fontconfig)
544 ("libjpeg" ,libjpeg-8)
545 ("freetype" ,freetype)
548 `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON"
549 "-DPODOFO_BUILD_STATIC=ON")
551 (modify-phases %standard-phases
552 (add-before 'configure 'patch
553 (lambda* (#:key inputs #:allow-other-keys)
554 (let ((freetype (assoc-ref inputs "freetype")))
555 ;; Look for freetype include files in the correct place.
556 (substitute* "cmake/modules/FindFREETYPE.cmake"
557 (("/usr/local") freetype)))
559 (home-page "http://podofo.sourceforge.net")
560 (synopsis "Tools to work with the PDF file format")
562 "PoDoFo is a C++ library and set of command-line tools to work with the
563 PDF file format. It can parse PDF files and load them into memory, and makes
564 it easy to modify them and write the changes to disk. It is primarily useful
565 for applications that wish to do lower level manipulation of PDF, such as
566 extracting content or merging files.")
567 (license license:lgpl2.0+)))
576 (uri (string-append "https://mupdf.com/downloads/archive/"
577 name "-" version "-source.tar.xz"))
578 (patches (search-patches "mupdf-build-with-latest-openjpeg.patch"))
581 "0b9j0gqbc3jhmx87r6idcsh8lnb30840c3hyx6dk2gdjqqh3hysp"))
582 (modules '((guix build utils)))
583 (snippet '(delete-file-recursively "thirdparty"))))
584 (build-system gnu-build-system)
587 ("freeglut" ,freeglut)
588 ("freetype" ,freetype)
589 ("harfbuzz" ,harfbuzz)
590 ("jbig2dec" ,jbig2dec)
595 ("openjpeg" ,openjpeg)
599 `(("pkg-config" ,pkg-config)))
601 '(#:tests? #f ; no check target
602 #:make-flags (list "CC=gcc"
604 (string-append "prefix=" (assoc-ref %outputs "out")))
605 #:phases (modify-phases %standard-phases
606 (delete 'configure))))
607 (home-page "https://mupdf.com")
608 (synopsis "Lightweight PDF viewer and toolkit")
610 "MuPDF is a C library that implements a PDF and XPS parsing and
611 rendering engine. It is used primarily to render pages into bitmaps,
612 but also provides support for other operations such as searching and
613 listing the table of contents and hyperlinks.
615 The library ships with a rudimentary X11 viewer, and a set of command
616 line tools for batch rendering @command{pdfdraw}, rewriting files
617 @command{pdfclean}, and examining the file structure @command{pdfshow}.")
618 (license license:agpl3+)))
626 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
627 "/qpdf-" version ".tar.gz"))
630 "0csj2p2gkxrc0rk8ykymlsdgfas96vzf1dip3y1x7z1q9plwgzd9"))
631 (modules '((guix build utils)))
633 ;; Replace shebang with the bi-lingual shell/Perl trick to remove
634 ;; dependency on Perl.
635 '(substitute* "qpdf/fix-qdf"
636 (("#!/usr/bin/env perl")
638 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
639 & eval 'exec perl -wS \"$0\" $argv:q'
641 (build-system gnu-build-system)
643 `(#:disallowed-references (,perl)
645 (modify-phases %standard-phases
646 (add-before 'configure 'patch-paths
648 (substitute* "make/libtool.mk"
650 (string-append "SHELL=" (which "bash"))))
652 '("qtest/bin/qtest-driver")
653 (find-files "." "\\.test"))
654 (("/usr/bin/env") (which "env"))))))))
656 `(("pkg-config" ,pkg-config)
662 (synopsis "Command-line tools and library for transforming PDF files")
664 "QPDF is a command-line program that does structural, content-preserving
665 transformations on PDF files. It could have been called something like
666 pdf-to-pdf. It includes support for merging and splitting PDFs and to
667 manipulate the list of pages in a PDF file. It is not a PDF viewer or a
668 program capable of converting PDF into other formats.")
669 (license license:clarified-artistic)
670 (home-page "http://qpdf.sourceforge.net/")))
672 (define-public xournal
679 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
680 "/xournal-" version ".tar.gz"))
683 "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13"))))
684 (build-system gnu-build-system)
690 ("libgnomecanvas" ,libgnomecanvas)))
692 `(("pkg-config" ,pkg-config)))
693 (home-page "http://xournal.sourceforge.net/")
694 (synopsis "Notetaking using a stylus")
696 "Xournal is an application for notetaking, sketching, keeping a journal
698 (license license:gpl2+)))
700 (define-public python-reportlab
702 (name "python-reportlab")
706 (uri (pypi-uri "reportlab" version))
709 "0hy304pzsz9lblmk7mrbk2682bi911lxgvzx2kcfpmfzb5gg7sjv"))))
710 (build-system python-build-system)
712 '(;; FIXME: There is one test failure, but it does not cause the
713 ;; build to fail. No time to investigate right now.
714 #:test-target "tests"))
716 `(("python-pillow" ,python-pillow)))
717 (home-page "https://www.reportlab.com")
718 (synopsis "Python library for generating PDFs and graphics")
719 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
720 of rich PDF documents, and also creation of charts in a variety of bitmap and
722 (license license:bsd-3)))
724 (define-public python2-reportlab
725 (package-with-python2 python-reportlab))
727 (define-public impressive
734 "mirror://sourceforge/impressive/Impressive/"
735 version "/Impressive-" version ".tar.gz"))
738 "0b3rmy6acp2vmf5nill3aknxvr9a5aawk1vnphkah61anxp62gsr"))))
739 (build-system python-build-system)
741 ;; TODO: Add dependency on pdftk.
742 (inputs `(("python2-pygame" ,python2-pygame)
743 ("python2-pillow" ,python2-pillow)
749 #:phases (modify-phases %standard-phases
754 (lambda* (#:key inputs outputs #:allow-other-keys)
755 ;; There's no 'setup.py' so install things manually.
756 (let* ((out (assoc-ref outputs "out"))
757 (bin (string-append out "/bin"))
758 (man1 (string-append out "/share/man/man1"))
759 (sdl (assoc-ref inputs "sdl"))
760 (xpdf (assoc-ref inputs "xpdf")))
762 (copy-file "impressive.py"
763 (string-append bin "/impressive"))
764 (wrap-program (string-append bin "/impressive")
765 `("LIBRARY_PATH" ":" prefix ;for ctypes
766 (,(string-append sdl "/lib")))
767 `("PATH" ":" prefix ;for pdftoppm
768 (,(string-append xpdf "/bin"))))
769 (install-file "impressive.1" man1)
771 (home-page "http://impressive.sourceforge.net")
772 (synopsis "PDF presentation tool with visual effects")
774 "Impressive is a tool to display PDF files that provides visual effects
775 such as smooth alpha-blended slide transitions. It provides additional tools
776 such as zooming, highlighting an area of the screen, and a tool to navigate
778 (license license:gpl2)))
784 (home-page "https://www.kraxel.org/blog/linux/fbida/")
787 (uri (string-append "https://www.kraxel.org/releases/fbida/"
788 name "-" version ".tar.gz"))
791 "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk"))))
792 (build-system gnu-build-system)
795 (modify-phases %standard-phases
796 (add-after 'unpack 'patch-ldconfig
798 (substitute* "mk/Autoconf.mk"
799 (("/sbin/ldconfig -p") "echo lib")) #t))
802 #:make-flags (list "CC=gcc"
803 (string-append "prefix=" (assoc-ref %outputs "out")))))
804 (inputs `(("libjpeg" ,libjpeg)
810 ("imagemagick" ,imagemagick)
813 ("cairo-xcb" ,cairo-xcb)
814 ("freetype" ,freetype)
815 ("fontconfig" ,fontconfig)
818 ("libepoxy" ,libepoxy)
820 ("poppler" ,poppler)))
821 (native-inputs `(("pkg-config" ,pkg-config)))
822 (synopsis "Framebuffer and drm-based image viewer")
824 "fbida contains a few applications for viewing and editing images on
827 (license license:gpl2+)))
829 (define-public pdf2svg
836 "https://github.com/dawbarton/pdf2svg/archive/v"
838 (file-name (string-append name "-" version ".tar.gz"))
841 "12pa1pajirnlrkz2il3h4l30lc2prryk1qr132jk6z9y1c3qdcag"))))
842 (build-system gnu-build-system)
845 ("poppler" ,poppler)))
847 `(("pkg-config" ,pkg-config)))
848 (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/")
849 (synopsis "PDF to SVG converter")
850 (description "@command{pdf2svg} is a simple command-line PDF to SVG
851 converter using the Poppler and Cairo libraries.")
852 (license license:gpl2+)))
854 (define-public python-pypdf2
856 (name "python-pypdf2")
860 (uri (pypi-uri "PyPDF2" version))
863 "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
864 (build-system python-build-system)
867 (modify-phases %standard-phases
869 'unpack 'patch-test-suite
871 ;; The text-file needs to be opened in binary mode for Python 3,
872 ;; so patch in the "b"
873 (substitute* "Tests/tests.py"
874 (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line)
875 (string-append line "b")))
879 (zero? (system* "python" "-m" "unittest" "Tests.tests")))))))
880 (home-page "http://mstamy2.github.com/PyPDF2")
881 (synopsis "Pure Python PDF toolkit")
882 (description "PyPDF2 is a pure Python PDF library capable of:
885 @item extracting document information (title, author, …)
886 @item splitting documents page by page
887 @item merging documents page by page
889 @item merging multiple pages into a single page
890 @item encrypting and decrypting PDF files
893 By being pure Python, it should run on any Python platform without any
894 dependencies on external libraries. It can also work entirely on
895 @code{StringIO} objects rather than file streams, allowing for PDF
896 manipulation in memory. It is therefore a useful tool for websites that
897 manage or manipulate PDFs.")
898 (license license:bsd-3)))
900 (define-public python2-pypdf2
901 (package-with-python2 python-pypdf2))
903 (define-public python2-pypdf
905 (name "python2-pypdf")
909 (uri (pypi-uri "pyPdf" version))
912 "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
913 (build-system python-build-system)
915 `(#:tests? #f ; no tests
917 (home-page "http://pybrary.net/pyPdf/")
918 (synopsis "Pure Python PDF toolkit")
919 (description "PyPDF2 is a pure Python PDF toolkit.
921 Note: This module isn't maintained anymore. For new projects please use
922 python-pypdf2 instead.")
923 (license license:bsd-3)))
925 (define-public pdfposter
931 (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
934 "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
935 (build-system python-build-system)
937 `(#:tests? #f ; no test suite, only for visual control
940 ;; pdfposter 0.6.0 still uses the old pyPdf
941 `(("python2-pypdf" ,python2-pypdf)))
942 (home-page "https://pythonhosted.org/pdftools.pdfposter/")
943 (synopsis "Scale and tile PDF images/pages to print on multiple pages")
944 (description "@command{pdfposter} can be used to create a large poster by
945 building it from multple pages and/or printing it on large media. It expects
946 as input a PDF file, normally printing on a single page. The output is again
947 a PDF file, maybe containing multiple pages together building the poster. The
948 input page will be scaled to obtain the desired size.
950 This is much like @command{poster} does for Postscript files, but working with
951 PDF. Since sometimes @command{poster} does not like your files converted from
952 PDF. Indeed @command{pdfposter} was inspired by @command{poster}.")
953 (license license:gpl3+)))
955 (define-public pdfgrep
962 (uri (string-append "https://pdfgrep.org/download/"
963 name "-" version ".tar.gz"))
966 "07llkrkcfjwd3ybai9ad10ybhr0biffcplmy7lw4fb87nd2dfw03"))))
967 (build-system gnu-build-system)
969 `(("pkg-config" ,pkg-config)))
971 `(("libgcrypt" ,libgcrypt)
973 ("poppler" ,poppler)))
974 (home-page "https://pdfgrep.org")
975 (synopsis "Command-line utility to search text in PDF files")
977 "Pdfgrep searches in pdf files for strings matching a regular expression.
978 Support some GNU grep options as file name output, page number output,
979 optional case insensitivity, count occurrences, color highlights and search in
981 (license license:gpl2+)))