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 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Coypright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Coypright © 2016 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>
17 ;;; This file is part of GNU Guix.
19 ;;; GNU Guix is free software; you can redistribute it and/or modify it
20 ;;; under the terms of the GNU General Public License as published by
21 ;;; the Free Software Foundation; either version 3 of the License, or (at
22 ;;; your option) any later version.
24 ;;; GNU Guix is distributed in the hope that it will be useful, but
25 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
26 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
27 ;;; GNU General Public License for more details.
29 ;;; You should have received a copy of the GNU General Public License
30 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
32 (define-module (gnu packages pdf)
33 #:use-module ((guix licenses) #:prefix license:)
34 #:use-module (guix packages)
35 #:use-module (guix download)
36 #:use-module (guix utils)
37 #:use-module (guix build-system gnu)
38 #:use-module (guix build-system cmake)
39 #:use-module (guix build-system python)
40 #:use-module (guix build-system trivial)
41 #:use-module (gnu packages)
42 #:use-module (gnu packages autotools)
43 #:use-module (gnu packages base)
44 #:use-module (gnu packages bash)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages fontutils)
47 #:use-module (gnu packages game-development)
48 #:use-module (gnu packages ghostscript)
49 #:use-module (gnu packages gnupg)
50 #:use-module (gnu packages databases)
51 #:use-module (gnu packages djvu)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages backup)
54 #:use-module (gnu packages lesstif)
55 #:use-module (gnu packages linux)
56 #:use-module (gnu packages xdisorg)
57 #:use-module (gnu packages imagemagick)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages photo)
60 #:use-module (gnu packages image)
61 #:use-module (gnu packages pkg-config)
62 #:use-module (gnu packages qt)
63 #:use-module (gnu packages xorg)
64 #:use-module (gnu packages gnome)
65 #:use-module (gnu packages glib)
66 #:use-module (gnu packages gtk)
67 #:use-module (gnu packages lua)
68 #:use-module (gnu packages curl)
69 #:use-module (gnu packages pcre)
70 #:use-module (gnu packages perl)
71 #:use-module (gnu packages python)
72 #:use-module (gnu packages sdl)
73 #:use-module (gnu packages tls)
74 #:use-module (srfi srfi-1))
76 (define-public poppler
82 (uri (string-append "https://poppler.freedesktop.org/poppler-"
86 "0hcnghliyr8pr887qza18qfgaclw5jr889g1cjcglkni9jr2dmm3"))))
87 (build-system gnu-build-system)
90 (inputs `(("fontconfig" ,fontconfig)
91 ("freetype" ,freetype)
96 ("openjpeg-1" ,openjpeg-1) ; prefers openjpeg-1
99 ;; To build poppler-glib (as needed by Evince), we need Cairo and
100 ;; GLib. But of course, that Cairo must not depend on Poppler.
101 ("cairo" ,(package (inherit cairo)
102 (inputs (alist-delete "poppler"
103 (package-inputs cairo)))))
106 `(("pkg-config" ,pkg-config)
107 ("glib" ,glib "bin") ; glib-mkenums, etc.
108 ("gobject-introspection" ,gobject-introspection)))
110 `(#:tests? #f ; no test data provided with the tarball
112 '("--enable-xpdf-headers" ; to install header files
115 ;; Saves 8 MiB of .a files.
118 (modify-phases %standard-phases
119 (add-before 'configure 'setenv
122 (string-append (assoc-ref %build-inputs "openjpeg-1")
123 "/include/openjpeg-1.5"
124 ":" (or (getenv "CPATH") "")))
126 (synopsis "PDF rendering library")
128 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
129 (license license:gpl2+)
130 (home-page "https://poppler.freedesktop.org/")))
132 (define-public poppler-qt4
133 (package (inherit poppler)
135 (inputs `(("qt-4" ,qt-4)
136 ,@(package-inputs poppler)))
137 (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
139 (define-public poppler-qt5
140 (package (inherit poppler)
142 (inputs `(("qtbase" ,qtbase)
143 ,@(package-inputs poppler)))
145 (substitute-keyword-arguments (package-arguments poppler)
146 ((#:configure-flags flags)
147 `(cons "CXXFLAGS=-std=gnu++11" ,flags))))
148 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
150 (define-public python-poppler-qt4
152 (name "python-poppler-qt4")
157 (uri (string-append "https://pypi.python.org/packages/source/p"
158 "/python-poppler-qt4/python-poppler-qt4-"
162 "0x63niylkk4q3h3ay8zrk3m1xiik0x3hlr4gvj7kswx48qi1vb99"))))
163 (build-system python-build-system)
166 (modify-phases %standard-phases
168 'unpack 'patch-poppler-include-paths
170 (substitute* (find-files "." "poppler-.*\\.sip")
171 (("qt4/poppler-.*\\.h" header)
172 (string-append "poppler/" header)))
175 `(("pkg-config" ,pkg-config)))
177 `(("python-sip" ,python-sip)
178 ("python-pyqt-4" ,python-pyqt-4)
179 ("poppler-qt4" ,poppler-qt4)))
180 (home-page "https://pypi.python.org/pypi/python-poppler-qt4")
181 (synopsis "Python bindings for Poppler-Qt4")
183 "This package provides Python bindings for the Qt4 interface of the
184 Poppler PDF rendering library.")
185 (license license:lgpl2.1+)))
187 (define-public python-poppler-qt5
189 (name "python-poppler-qt5")
194 (uri (pypi-uri "python-poppler-qt5" version))
197 "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"))))
198 (build-system python-build-system)
200 `(;; There are no tests. The check phase just causes a rebuild.
203 (modify-phases %standard-phases
205 (lambda* (#:key inputs #:allow-other-keys)
206 (substitute* "setup.py"
207 ;; This check always fails, so disable it.
208 (("if not check_qtxml\\(\\)")
210 ;; Enable C++11, which is needed because of Qt5.
211 (("\\*\\*ext_args" line)
212 (string-append "extra_compile_args=['-std=gnu++11'], " line)))
213 ;; We need to pass an extra flag here. This cannot be in
214 ;; configure-flags because it should not be passed for the
215 ;; installation phase.
216 ((@@ (guix build python-build-system) call-setuppy)
217 "build_ext" (list (string-append "--pyqt-sip-dir="
218 (assoc-ref inputs "python-pyqt")
219 "/share/sip")) #t))))))
221 `(("pkg-config" ,pkg-config)))
223 `(("python-sip" ,python-sip)
224 ("python-pyqt" ,python-pyqt)
225 ("poppler-qt5" ,poppler-qt5)
227 (home-page "https://pypi.python.org/pypi/python-poppler-qt5")
228 (synopsis "Python bindings for Poppler-Qt5")
230 "This package provides Python bindings for the Qt5 interface of the
231 Poppler PDF rendering library.")
232 (license license:lgpl2.1+)))
234 (define-public libharu
240 (uri (string-append "https://github.com/libharu/libharu/archive/"
242 (string-join (string-split version #\.) "_")
244 (file-name (string-append name "-" version ".tar.gz"))
247 "1lm4v539y9cb1lvbq387j57sy7yxda3yv8b1pk8m6zazbp66i7lg"))))
248 (build-system gnu-build-system)
251 (list (string-append "--with-zlib="
252 (assoc-ref %build-inputs "zlib"))
253 (string-append "--with-png="
254 (assoc-ref %build-inputs "libpng")))
256 (modify-phases %standard-phases
257 (add-after 'unpack 'autogen
258 (lambda _ (zero? (system* "autoreconf" "-vif")))))))
263 `(("autoconf" ,autoconf)
264 ("automake" ,automake)
265 ("libtool" ,libtool)))
266 (home-page "http://libharu.org/")
267 (synopsis "Library for generating PDF files")
269 "libHaru is a library for generating PDF files. libHaru does not support
270 reading and editing of existing PDF files.")
271 (license license:zlib)))
279 (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
282 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
283 (build-system gnu-build-system)
284 (inputs `(("freetype" ,freetype)
285 ("gs-fonts" ,gs-fonts)
287 ("libpaper" ,libpaper)
296 `(#:tests? #f ; there is no check target
297 #:parallel-build? #f ; build fails randomly on 8-way machines
299 (list (string-append "--with-freetype2-includes="
300 (assoc-ref %build-inputs "freetype")
301 "/include/freetype2"))
303 (modify-phases %standard-phases
305 (lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
306 (let* ((install (assoc-ref %standard-phases 'install))
307 (out (assoc-ref outputs "out"))
308 (xpdfrc (string-append out "/etc/xpdfrc"))
309 (gs-fonts (assoc-ref inputs "gs-fonts")))
312 (("/usr/local/share/ghostscript/fonts")
313 (string-append gs-fonts "/share/fonts/type1/ghostscript"))
314 (("#fontFile") "fontFile")))
316 (synopsis "Viewer for PDF files based on the Motif toolkit")
318 "Xpdf is a viewer for Portable Document Format (PDF) files.")
319 (license license:gpl3) ; or gpl2, but not gpl2+
320 (home-page "http://www.foolabs.com/xpdf/")))
322 (define-public zathura-cb
329 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
333 "1fim4mpm8l2g3msj1vg70ks3c9lrwllv3yh4jv8l9f8k3r19b3l8"))))
334 (native-inputs `(("pkg-config" ,pkg-config)))
335 (propagated-inputs `(("girara" ,girara)))
336 (inputs `(("libarchive" ,libarchive)
338 ("zathura" ,zathura)))
339 (build-system gnu-build-system)
341 `(#:make-flags (list (string-append "PREFIX=" %output)
342 (string-append "PLUGINDIR=" %output "/lib/zathura")
344 #:tests? #f ; Package does not contain tests.
346 (modify-phases %standard-phases (delete 'configure))))
347 (home-page "https://pwmt.org/projects/zathura-cb/")
348 (synopsis "Comic book support for zathura (libarchive backend)")
349 (description "The zathura-cb plugin adds comic book support to zathura
351 (license license:zlib)))
353 (define-public zathura-ps
360 (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
364 "1nxbl0glnzpan78fhdfzhkcd0cikcvrkzf9m56mb0pvnwzlwg7zv"))))
365 (native-inputs `(("pkg-config" ,pkg-config)))
366 (propagated-inputs `(("girara" ,girara)))
367 (inputs `(("libspectre" ,libspectre)
369 ("zathura" ,zathura)))
370 (build-system gnu-build-system)
372 `(#:make-flags (list (string-append "PREFIX=" %output)
373 (string-append "PLUGINDIR=" %output "/lib/zathura")
375 #:tests? #f ; Package does not contain tests.
377 (modify-phases %standard-phases (delete 'configure))))
378 (home-page "https://pwmt.org/projects/zathura-ps/")
379 (synopsis "PS support for zathura (libspectre backend)")
380 (description "The zathura-ps plugin adds PS support to zathura
382 (license license:zlib)))
384 (define-public zathura-djvu
386 (name "zathura-djvu")
391 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
395 "0py0ra44f65cg064xzds0qr6vnglj2a5bwhnbwa0dyh2nyizdzmf"))))
396 (native-inputs `(("pkg-config" ,pkg-config)))
397 (propagated-inputs `(("girara" ,girara)))
399 `(("djvulibre" ,djvulibre)
401 ("zathura" ,zathura)))
402 (build-system gnu-build-system)
404 `(#:make-flags (list (string-append "PREFIX=" %output)
405 (string-append "PLUGINDIR=" %output "/lib/zathura")
407 #:tests? #f ; Package does not contain tests.
409 (modify-phases %standard-phases (delete 'configure))))
410 (home-page "https://pwmt.org/projects/zathura-djvu/")
411 (synopsis "DjVu support for zathura (DjVuLibre backend)")
412 (description "The zathura-djvu plugin adds DjVu support to zathura
413 using the DjVuLibre library.")
414 (license license:zlib)))
416 (define-public zathura-pdf-poppler
418 (name "zathura-pdf-poppler")
423 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
427 "1h43sgxpsbrsnn5z19661642plzhpv6b0y3f4kyzshv1rr6lwplq"))))
428 (native-inputs `(("pkg-config" ,pkg-config)))
429 (propagated-inputs `(("girara" ,girara)))
431 `(("poppler" ,poppler)
435 (build-system gnu-build-system)
437 `(#:make-flags (list (string-append "PREFIX=" %output)
438 (string-append "PLUGINDIR=" %output "/lib/zathura")
440 #:tests? #f ; Package does not include tests.
442 (modify-phases %standard-phases (delete 'configure))))
443 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
444 (synopsis "PDF support for zathura (poppler backend)")
445 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
446 by using the poppler rendering engine.")
447 (license license:zlib)))
449 (define-public zathura
456 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
460 "1w0g74dq4z2vl3f99s2gkaqrb5pskgzig10qhbxj4gq9yj4zzbr2"))
461 (patches (search-patches
462 "zathura-plugindir-environment-variable.patch"))))
463 (native-inputs `(("pkg-config" ,pkg-config)
464 ("gettext" ,gettext-minimal)))
465 (inputs `(("girara" ,girara)
469 (list (search-path-specification
470 (variable "ZATHURA_PLUGIN_PATH")
471 (files '("lib/zathura")))))
472 (build-system gnu-build-system)
475 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
477 #:tests? #f ; Tests fail: "Gtk cannot open display".
480 (modify-phases %standard-phases (delete 'configure))))
481 (home-page "https://pwmt.org/projects/zathura/")
482 (synopsis "Lightweight keyboard-driven PDF viewer")
483 (description "Zathura is a customizable document viewer. It provides a
484 minimalistic interface and an interface that mainly focuses on keyboard
486 (license license:zlib)))
488 (define-public podofo
494 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
495 "/podofo-" version ".tar.gz"))
498 "012kgfx5j5n6w4zkc1d290d2cwjk60jhzsjlr2x19g3yi75q2jc5"))))
499 (build-system cmake-build-system)
500 (inputs ; TODO: Add cppunit for tests
504 ("fontconfig" ,fontconfig)
506 ("libjpeg" ,libjpeg-8)
507 ("freetype" ,freetype)
510 `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON"
511 "-DPODOFO_BUILD_STATIC=ON")
513 (modify-phases %standard-phases
514 (add-before 'configure 'patch
515 (lambda* (#:key inputs #:allow-other-keys)
516 (let ((freetype (assoc-ref inputs "freetype")))
517 ;; Look for freetype include files in the correct place.
518 (substitute* "cmake/modules/FindFREETYPE.cmake"
519 (("/usr/local") freetype)))
521 (home-page "http://podofo.sourceforge.net")
522 (synopsis "Tools to work with the PDF file format")
524 "PoDoFo is a C++ library and set of command-line tools to work with the
525 PDF file format. It can parse PDF files and load them into memory, and makes
526 it easy to modify them and write the changes to disk. It is primarily useful
527 for applications that wish to do lower level manipulation of PDF, such as
528 extracting content or merging files.")
529 (license license:lgpl2.0+)))
538 (uri (string-append "http://mupdf.com/downloads/archive/"
539 name "-" version "-source.tar.gz"))
542 "02phamcchgsmvjnb3ir7r5sssvx9fcrscn297z73b82n1jl79510"))
543 (patches (search-patches "mupdf-build-with-openjpeg-2.1.patch"))
544 (modules '((guix build utils)))
546 ;; Delete all the bundled libraries except for mujs, which is
547 ;; developed by the same team as mupdf and has no releases.
548 ;; TODO Package mujs and don't use the bundled copy.
549 '(for-each delete-file-recursively
551 "thirdparty/freetype"
553 "thirdparty/harfbuzz"
554 "thirdparty/jbig2dec"
556 "thirdparty/openjpeg"
557 "thirdparty/zlib")))))
558 (build-system gnu-build-system)
561 ("freetype" ,freetype)
562 ("harfbuzz" ,harfbuzz)
563 ("jbig2dec" ,jbig2dec)
567 ("openjpeg" ,openjpeg)
571 `(("pkg-config" ,pkg-config)))
573 '(#:tests? #f ; no check target
574 #:make-flags (list "CC=gcc"
576 (string-append "prefix=" (assoc-ref %outputs "out")))
577 #:phases (modify-phases %standard-phases
578 (delete 'configure))))
579 (home-page "http://mupdf.com")
580 (synopsis "Lightweight PDF viewer and toolkit")
582 "MuPDF is a C library that implements a PDF and XPS parsing and
583 rendering engine. It is used primarily to render pages into bitmaps,
584 but also provides support for other operations such as searching and
585 listing the table of contents and hyperlinks.
587 The library ships with a rudimentary X11 viewer, and a set of command
588 line tools for batch rendering (pdfdraw), rewriting files (pdfclean),
589 and examining the file structure (pdfshow).")
590 (license license:agpl3+)))
598 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
599 "/qpdf-" version ".tar.gz"))
602 "0csj2p2gkxrc0rk8ykymlsdgfas96vzf1dip3y1x7z1q9plwgzd9"))
603 (modules '((guix build utils)))
605 ;; Replace shebang with the bi-lingual shell/Perl trick to remove
606 ;; dependency on Perl.
607 '(substitute* "qpdf/fix-qdf"
608 (("#!/usr/bin/env perl")
610 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
611 & eval 'exec perl -wS \"$0\" $argv:q'
613 (build-system gnu-build-system)
615 `(#:disallowed-references (,perl)
617 (modify-phases %standard-phases
618 (add-before 'configure 'patch-paths
620 (substitute* "make/libtool.mk"
622 (string-append "SHELL=" (which "bash"))))
624 '("qtest/bin/qtest-driver")
625 (find-files "." "\\.test"))
626 (("/usr/bin/env") (which "env"))))))))
628 `(("pkg-config" ,pkg-config)
634 (synopsis "Command-line tools and library for transforming PDF files")
636 "QPDF is a command-line program that does structural, content-preserving
637 transformations on PDF files. It could have been called something like
638 pdf-to-pdf. It includes support for merging and splitting PDFs and to
639 manipulate the list of pages in a PDF file. It is not a PDF viewer or a
640 program capable of converting PDF into other formats.")
641 (license license:clarified-artistic)
642 (home-page "http://qpdf.sourceforge.net/")))
644 (define-public xournal
651 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
652 "/xournal-" version ".tar.gz"))
655 "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13"))))
656 (build-system gnu-build-system)
662 ("libgnomecanvas" ,libgnomecanvas)))
664 `(("pkg-config" ,pkg-config)))
665 (home-page "http://xournal.sourceforge.net/")
666 (synopsis "Notetaking using a stylus")
668 "Xournal is an application for notetaking, sketching, keeping a journal
670 (license license:gpl2+)))
672 (define-public python-reportlab
674 (name "python-reportlab")
678 (uri (pypi-uri "reportlab" version))
681 "0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"))))
682 (build-system python-build-system)
684 '(;; FIXME: There is one test failure, but it does not cause the
685 ;; build to fail. No time to investigate right now.
686 #:test-target "tests"))
688 `(("python-pillow" ,python-pillow)))
689 (home-page "http://www.reportlab.com")
690 (synopsis "Python library for generating PDFs and graphics")
691 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
692 of rich PDF documents, and also creation of charts in a variety of bitmap and
694 (license license:bsd-3)))
696 (define-public python2-reportlab
697 (package-with-python2 python-reportlab))
699 (define-public impressive
706 "mirror://sourceforge/impressive/Impressive/"
707 version "/Impressive-" version ".tar.gz"))
710 "0b3rmy6acp2vmf5nill3aknxvr9a5aawk1vnphkah61anxp62gsr"))))
711 (build-system python-build-system)
713 ;; TODO: Add dependency on pdftk.
714 (inputs `(("python-pygame" ,python-pygame)
715 ("python2-pillow" ,python2-pillow)
721 #:phases (modify-phases %standard-phases
726 (lambda* (#:key inputs outputs #:allow-other-keys)
727 ;; There's no 'setup.py' so install things manually.
728 (let* ((out (assoc-ref outputs "out"))
729 (bin (string-append out "/bin"))
730 (man1 (string-append out "/share/man/man1"))
731 (sdl (assoc-ref inputs "sdl"))
732 (xpdf (assoc-ref inputs "xpdf")))
734 (copy-file "impressive.py"
735 (string-append bin "/impressive"))
736 (wrap-program (string-append bin "/impressive")
737 `("LIBRARY_PATH" ":" prefix ;for ctypes
738 (,(string-append sdl "/lib")))
739 `("PATH" ":" prefix ;for pdftoppm
740 (,(string-append xpdf "/bin"))))
741 (install-file "impressive.1" man1)
743 (home-page "http://impressive.sourceforge.net")
744 (synopsis "PDF presentation tool with visual effects")
746 "Impressive is a tool to display PDF files that provides visual effects
747 such as smooth alpha-blended slide transitions. It provides additional tools
748 such as zooming, highlighting an area of the screen, and a tool to navigate
750 (license license:gpl2)))
756 (home-page "https://www.kraxel.org/blog/linux/fbida/")
759 (uri (string-append "https://www.kraxel.org/releases/fbida/"
760 name "-" version ".tar.gz"))
763 "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk"))))
764 (build-system gnu-build-system)
767 (modify-phases %standard-phases
768 (add-after 'unpack 'patch-ldconfig
770 (substitute* "mk/Autoconf.mk"
771 (("/sbin/ldconfig -p") "echo lib")) #t))
774 #:make-flags (list "CC=gcc"
775 (string-append "prefix=" (assoc-ref %outputs "out")))))
776 (inputs `(("libjpeg" ,libjpeg)
782 ("imagemagick" ,imagemagick)
785 ("cairo-xcb" ,cairo-xcb)
786 ("freetype" ,freetype)
787 ("fontconfig" ,fontconfig)
790 ("libepoxy" ,libepoxy)
792 ("poppler" ,poppler)))
793 (native-inputs `(("pkg-config" ,pkg-config)))
794 (synopsis "Framebuffer and drm-based image viewer")
796 "fbida contains a few applications for viewing and editing images on
799 (license license:gpl2+)))
801 (define-public pdf2svg
808 "https://github.com/dawbarton/pdf2svg/archive/v"
810 (file-name (string-append name "-" version ".tar.gz"))
813 "12pa1pajirnlrkz2il3h4l30lc2prryk1qr132jk6z9y1c3qdcag"))))
814 (build-system gnu-build-system)
817 ("poppler" ,poppler)))
819 `(("pkg-config" ,pkg-config)))
820 (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/")
821 (synopsis "PDF to SVG converter")
822 (description "@command{pdf2svg} is a simple command-line PDF to SVG
823 converter using the Poppler and Cairo libraries.")
824 (license license:gpl2+)))
826 (define-public python-pypdf2
828 (name "python-pypdf2")
832 (uri (pypi-uri "PyPDF2" version))
835 "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
836 (build-system python-build-system)
839 (modify-phases %standard-phases
841 'unpack 'patch-test-suite
843 ;; The text-file needs to be opened in binary mode for Python 3,
844 ;; so patch in the "b"
845 (substitute* "Tests/tests.py"
846 (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line)
847 (string-append line "b")))
851 (zero? (system* "python" "-m" "unittest" "Tests.tests")))))))
852 (home-page "http://mstamy2.github.com/PyPDF2")
853 (synopsis "Pure Python PDF toolkit")
854 (description "PyPDF2 is a pure Python PDF library capable of:
857 @item extracting document information (title, author, …)
858 @item splitting documents page by page
859 @item merging documents page by page
861 @item merging multiple pages into a single page
862 @item encrypting and decrypting PDF files
865 By being pure Python, it should run on any Python platform without any
866 dependencies on external libraries. It can also work entirely on
867 @code{StringIO} objects rather than file streams, allowing for PDF
868 manipulation in memory. It is therefore a useful tool for websites that
869 manage or manipulate PDFs.")
870 (license license:bsd-3)))
872 (define-public python2-pypdf2
873 (package-with-python2 python-pypdf2))
875 (define-public python2-pypdf
877 (name "python2-pypdf")
881 (uri (pypi-uri "pyPdf" version))
884 "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
885 (build-system python-build-system)
887 `(#:tests? #f ; no tests
889 (home-page "http://pybrary.net/pyPdf/")
890 (synopsis "Pure Python PDF toolkit")
891 (description "PyPDF2 is a pure Python PDF toolkit.
893 Note: This module isn't maintained anymore. For new projects please use
894 python-pypdf2 instead.")
895 (license license:bsd-3)))
897 (define-public pdfposter
903 (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
906 "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
907 (build-system python-build-system)
909 `(#:tests? #f ; no test suite, only for visual control
912 ;; pdfposter 0.6.0 still uses the old pyPdf
913 `(("python2-pypdf" ,python2-pypdf)))
914 (home-page "https://pythonhosted.org/pdftools.pdfposter/")
915 (synopsis "Scale and tile PDF images/pages to print on multiple pages")
916 (description "@command{pdfposter} can be used to create a large poster by
917 building it from multple pages and/or printing it on large media. It expects
918 as input a PDF file, normally printing on a single page. The output is again
919 a PDF file, maybe containing multiple pages together building the poster. The
920 input page will be scaled to obtain the desired size.
922 This is much like @command{poster} does for Postscript files, but working with
923 PDF. Since sometimes @command{poster} does not like your files converted from
924 PDF. Indeed @command{pdfposter} was inspired by @command{poster}.")
925 (license license:gpl3+)))
927 (define-public pdfgrep
934 (uri (string-append "https://pdfgrep.org/download/"
935 name "-" version ".tar.gz"))
938 "07llkrkcfjwd3ybai9ad10ybhr0biffcplmy7lw4fb87nd2dfw03"))))
939 (build-system gnu-build-system)
941 `(("pkg-config" ,pkg-config)))
943 `(("libgcrypt" ,libgcrypt)
945 ("poppler" ,poppler)))
946 (home-page "https://pdfgrep.org")
947 (synopsis "Command-line utility to search text in PDF files")
949 "Pdfgrep searches in pdf files for strings matching a regular expression.
950 Support some GNU grep options as file name output, page number output,
951 optional case insensitivity, count occurrences, color highlights and search in
953 (license license:gpl2+)))