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>
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 backup)
44 #:use-module (gnu packages base)
45 #:use-module (gnu packages bash)
46 #:use-module (gnu packages compression)
47 #:use-module (gnu packages curl)
48 #:use-module (gnu packages databases)
49 #:use-module (gnu packages djvu)
50 #:use-module (gnu packages fontutils)
51 #:use-module (gnu packages game-development)
52 #:use-module (gnu packages gettext)
53 #:use-module (gnu packages ghostscript)
54 #:use-module (gnu packages gl)
55 #:use-module (gnu packages glib)
56 #:use-module (gnu packages gnome)
57 #:use-module (gnu packages gnupg)
58 #:use-module (gnu packages gtk)
59 #:use-module (gnu packages image)
60 #:use-module (gnu packages imagemagick)
61 #:use-module (gnu packages javascript)
62 #:use-module (gnu packages lesstif)
63 #:use-module (gnu packages linux)
64 #:use-module (gnu packages lua)
65 #:use-module (gnu packages pcre)
66 #:use-module (gnu packages perl)
67 #:use-module (gnu packages photo)
68 #:use-module (gnu packages pkg-config)
69 #:use-module (gnu packages python)
70 #:use-module (gnu packages qt)
71 #:use-module (gnu packages sdl)
72 #:use-module (gnu packages tls)
73 #:use-module (gnu packages xdisorg)
74 #:use-module (gnu packages xorg)
75 #:use-module (srfi srfi-1))
77 (define-public poppler
83 (uri (string-append "https://poppler.freedesktop.org/poppler-"
87 "0hcnghliyr8pr887qza18qfgaclw5jr889g1cjcglkni9jr2dmm3"))))
88 (build-system gnu-build-system)
91 (inputs `(("fontconfig" ,fontconfig)
92 ("freetype" ,freetype)
97 ("openjpeg" ,openjpeg)
100 ;; To build poppler-glib (as needed by Evince), we need Cairo and
101 ;; GLib. But of course, that Cairo must not depend on Poppler.
102 ("cairo" ,(package (inherit cairo)
103 (inputs (alist-delete "poppler"
104 (package-inputs cairo)))))
107 `(("pkg-config" ,pkg-config)
108 ("glib" ,glib "bin") ; glib-mkenums, etc.
109 ("gobject-introspection" ,gobject-introspection)))
111 `(#:tests? #f ; no test data provided with the tarball
113 '("--enable-xpdf-headers" ; to install header files
116 ;; Saves 8 MiB of .a files.
117 "--disable-static")))
118 (synopsis "PDF rendering library")
120 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
121 (license license:gpl2+)
122 (home-page "https://poppler.freedesktop.org/")))
124 (define-public poppler-qt4
125 (package (inherit poppler)
127 (inputs `(("qt-4" ,qt-4)
128 ,@(package-inputs poppler)))
129 (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
131 (define-public poppler-qt5
132 (package (inherit poppler)
134 (inputs `(("qtbase" ,qtbase)
135 ,@(package-inputs poppler)))
137 (substitute-keyword-arguments (package-arguments poppler)
138 ((#:configure-flags flags)
139 `(cons "CXXFLAGS=-std=gnu++11" ,flags))))
140 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
142 (define-public python-poppler-qt4
144 (name "python-poppler-qt4")
149 (uri (string-append "https://pypi.python.org/packages/source/p"
150 "/python-poppler-qt4/python-poppler-qt4-"
154 "0x63niylkk4q3h3ay8zrk3m1xiik0x3hlr4gvj7kswx48qi1vb99"))))
155 (build-system python-build-system)
158 (modify-phases %standard-phases
160 'unpack 'patch-poppler-include-paths
162 (substitute* (find-files "." "poppler-.*\\.sip")
163 (("qt4/poppler-.*\\.h" header)
164 (string-append "poppler/" header)))
167 `(("pkg-config" ,pkg-config)))
169 `(("python-sip" ,python-sip)
170 ("python-pyqt-4" ,python-pyqt-4)
171 ("poppler-qt4" ,poppler-qt4)))
172 (home-page "https://pypi.python.org/pypi/python-poppler-qt4")
173 (synopsis "Python bindings for Poppler-Qt4")
175 "This package provides Python bindings for the Qt4 interface of the
176 Poppler PDF rendering library.")
177 (license license:lgpl2.1+)))
179 (define-public python-poppler-qt5
181 (name "python-poppler-qt5")
186 (uri (pypi-uri "python-poppler-qt5" version))
189 "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"))))
190 (build-system python-build-system)
192 `(;; There are no tests. The check phase just causes a rebuild.
195 (modify-phases %standard-phases
197 (lambda* (#:key inputs #:allow-other-keys)
198 (substitute* "setup.py"
199 ;; This check always fails, so disable it.
200 (("if not check_qtxml\\(\\)")
202 ;; Enable C++11, which is needed because of Qt5.
203 (("\\*\\*ext_args" line)
204 (string-append "extra_compile_args=['-std=gnu++11'], " line)))
205 ;; We need to pass an extra flag here. This cannot be in
206 ;; configure-flags because it should not be passed for the
207 ;; installation phase.
208 ((@@ (guix build python-build-system) call-setuppy)
209 "build_ext" (list (string-append "--pyqt-sip-dir="
210 (assoc-ref inputs "python-pyqt")
211 "/share/sip")) #t))))))
213 `(("pkg-config" ,pkg-config)))
215 `(("python-sip" ,python-sip)
216 ("python-pyqt" ,python-pyqt)
217 ("poppler-qt5" ,poppler-qt5)
219 (home-page "https://pypi.python.org/pypi/python-poppler-qt5")
220 (synopsis "Python bindings for Poppler-Qt5")
222 "This package provides Python bindings for the Qt5 interface of the
223 Poppler PDF rendering library.")
224 (license license:lgpl2.1+)))
226 (define-public libharu
232 (uri (string-append "https://github.com/libharu/libharu/archive/"
234 (string-join (string-split version #\.) "_")
236 (file-name (string-append name "-" version ".tar.gz"))
239 "1lm4v539y9cb1lvbq387j57sy7yxda3yv8b1pk8m6zazbp66i7lg"))))
240 (build-system gnu-build-system)
243 (list (string-append "--with-zlib="
244 (assoc-ref %build-inputs "zlib"))
245 (string-append "--with-png="
246 (assoc-ref %build-inputs "libpng")))
248 (modify-phases %standard-phases
249 (add-after 'unpack 'autogen
250 (lambda _ (zero? (system* "autoreconf" "-vif")))))))
255 `(("autoconf" ,autoconf)
256 ("automake" ,automake)
257 ("libtool" ,libtool)))
258 (home-page "http://libharu.org/")
259 (synopsis "Library for generating PDF files")
261 "libHaru is a library for generating PDF files. libHaru does not support
262 reading and editing of existing PDF files.")
263 (license license:zlib)))
271 (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
274 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
275 (build-system gnu-build-system)
276 (inputs `(("freetype" ,freetype)
277 ("gs-fonts" ,gs-fonts)
279 ("libpaper" ,libpaper)
288 `(#:tests? #f ; there is no check target
289 #:parallel-build? #f ; build fails randomly on 8-way machines
291 (list (string-append "--with-freetype2-includes="
292 (assoc-ref %build-inputs "freetype")
293 "/include/freetype2"))
295 (modify-phases %standard-phases
297 (lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
298 (let* ((install (assoc-ref %standard-phases 'install))
299 (out (assoc-ref outputs "out"))
300 (xpdfrc (string-append out "/etc/xpdfrc"))
301 (gs-fonts (assoc-ref inputs "gs-fonts")))
304 (("/usr/local/share/ghostscript/fonts")
305 (string-append gs-fonts "/share/fonts/type1/ghostscript"))
306 (("#fontFile") "fontFile")))
308 (synopsis "Viewer for PDF files based on the Motif toolkit")
310 "Xpdf is a viewer for Portable Document Format (PDF) files.")
311 (license license:gpl3) ; or gpl2, but not gpl2+
312 (home-page "http://www.foolabs.com/xpdf/")))
314 (define-public zathura-cb
321 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
325 "1fim4mpm8l2g3msj1vg70ks3c9lrwllv3yh4jv8l9f8k3r19b3l8"))))
326 (native-inputs `(("pkg-config" ,pkg-config)))
327 (propagated-inputs `(("girara" ,girara)))
328 (inputs `(("libarchive" ,libarchive)
330 ("zathura" ,zathura)))
331 (build-system gnu-build-system)
333 `(#:make-flags (list (string-append "PREFIX=" %output)
334 (string-append "PLUGINDIR=" %output "/lib/zathura")
336 #:tests? #f ; Package does not contain tests.
338 (modify-phases %standard-phases (delete 'configure))))
339 (home-page "https://pwmt.org/projects/zathura-cb/")
340 (synopsis "Comic book support for zathura (libarchive backend)")
341 (description "The zathura-cb plugin adds comic book support to zathura
343 (license license:zlib)))
345 (define-public zathura-ps
352 (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
356 "1nxbl0glnzpan78fhdfzhkcd0cikcvrkzf9m56mb0pvnwzlwg7zv"))))
357 (native-inputs `(("pkg-config" ,pkg-config)))
358 (propagated-inputs `(("girara" ,girara)))
359 (inputs `(("libspectre" ,libspectre)
361 ("zathura" ,zathura)))
362 (build-system gnu-build-system)
364 `(#:make-flags (list (string-append "PREFIX=" %output)
365 (string-append "PLUGINDIR=" %output "/lib/zathura")
367 #:tests? #f ; Package does not contain tests.
369 (modify-phases %standard-phases (delete 'configure))))
370 (home-page "https://pwmt.org/projects/zathura-ps/")
371 (synopsis "PS support for zathura (libspectre backend)")
372 (description "The zathura-ps plugin adds PS support to zathura
374 (license license:zlib)))
376 (define-public zathura-djvu
378 (name "zathura-djvu")
383 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
387 "0py0ra44f65cg064xzds0qr6vnglj2a5bwhnbwa0dyh2nyizdzmf"))))
388 (native-inputs `(("pkg-config" ,pkg-config)))
389 (propagated-inputs `(("girara" ,girara)))
391 `(("djvulibre" ,djvulibre)
393 ("zathura" ,zathura)))
394 (build-system gnu-build-system)
396 `(#:make-flags (list (string-append "PREFIX=" %output)
397 (string-append "PLUGINDIR=" %output "/lib/zathura")
399 #:tests? #f ; Package does not contain tests.
401 (modify-phases %standard-phases (delete 'configure))))
402 (home-page "https://pwmt.org/projects/zathura-djvu/")
403 (synopsis "DjVu support for zathura (DjVuLibre backend)")
404 (description "The zathura-djvu plugin adds DjVu support to zathura
405 using the DjVuLibre library.")
406 (license license:zlib)))
408 (define-public zathura-pdf-mupdf
410 (name "zathura-pdf-mupdf")
415 (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
416 "/download/zathura-pdf-mupdf-" version ".tar.gz"))
419 "06zqn8z6a0hfsx3s1kzqvqzb73afgcl6z5r062sxv7kv570fvffr"))))
420 (native-inputs `(("pkg-config" ,pkg-config)))
421 (propagated-inputs `(("girara" ,girara)))
424 ("jbig2dec" ,jbig2dec)
427 ("openjpeg" ,openjpeg)
429 ("zathura" ,zathura)))
430 (build-system gnu-build-system)
432 `(#:make-flags (list (string-append "PREFIX=" %output)
433 (string-append "PLUGINDIR=" %output "/lib/zathura")
435 #:tests? #f ;No tests.
436 #:phases (modify-phases %standard-phases (delete 'configure))))
437 (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
438 (synopsis "PDF support for zathura (mupdf backend)")
439 (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
440 by using the @code{mupdf} rendering library.")
441 (license license:zlib)))
443 (define-public zathura-pdf-poppler
445 (name "zathura-pdf-poppler")
450 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
454 "1h43sgxpsbrsnn5z19661642plzhpv6b0y3f4kyzshv1rr6lwplq"))))
455 (native-inputs `(("pkg-config" ,pkg-config)))
456 (propagated-inputs `(("girara" ,girara)))
458 `(("poppler" ,poppler)
462 (build-system gnu-build-system)
464 `(#:make-flags (list (string-append "PREFIX=" %output)
465 (string-append "PLUGINDIR=" %output "/lib/zathura")
467 #:tests? #f ; Package does not include tests.
469 (modify-phases %standard-phases (delete 'configure))))
470 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
471 (synopsis "PDF support for zathura (poppler backend)")
472 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
473 by using the poppler rendering engine.")
474 (license license:zlib)))
476 (define-public zathura
483 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
487 "1w0g74dq4z2vl3f99s2gkaqrb5pskgzig10qhbxj4gq9yj4zzbr2"))
488 (patches (search-patches
489 "zathura-plugindir-environment-variable.patch"))))
490 (native-inputs `(("pkg-config" ,pkg-config)
491 ("gettext" ,gettext-minimal)))
492 (inputs `(("girara" ,girara)
496 (list (search-path-specification
497 (variable "ZATHURA_PLUGIN_PATH")
498 (files '("lib/zathura")))))
499 (build-system gnu-build-system)
502 `(,(string-append "PREFIX=" (assoc-ref %outputs "out"))
504 #:tests? #f ; Tests fail: "Gtk cannot open display".
507 (modify-phases %standard-phases (delete 'configure))))
508 (home-page "https://pwmt.org/projects/zathura/")
509 (synopsis "Lightweight keyboard-driven PDF viewer")
510 (description "Zathura is a customizable document viewer. It provides a
511 minimalistic interface and an interface that mainly focuses on keyboard
513 (license license:zlib)))
515 (define-public podofo
521 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
522 "/podofo-" version ".tar.gz"))
525 "012kgfx5j5n6w4zkc1d290d2cwjk60jhzsjlr2x19g3yi75q2jc5"))))
526 (build-system cmake-build-system)
527 (inputs ; TODO: Add cppunit for tests
531 ("fontconfig" ,fontconfig)
533 ("libjpeg" ,libjpeg-8)
534 ("freetype" ,freetype)
537 `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON"
538 "-DPODOFO_BUILD_STATIC=ON")
540 (modify-phases %standard-phases
541 (add-before 'configure 'patch
542 (lambda* (#:key inputs #:allow-other-keys)
543 (let ((freetype (assoc-ref inputs "freetype")))
544 ;; Look for freetype include files in the correct place.
545 (substitute* "cmake/modules/FindFREETYPE.cmake"
546 (("/usr/local") freetype)))
548 (home-page "http://podofo.sourceforge.net")
549 (synopsis "Tools to work with the PDF file format")
551 "PoDoFo is a C++ library and set of command-line tools to work with the
552 PDF file format. It can parse PDF files and load them into memory, and makes
553 it easy to modify them and write the changes to disk. It is primarily useful
554 for applications that wish to do lower level manipulation of PDF, such as
555 extracting content or merging files.")
556 (license license:lgpl2.0+)))
565 (uri (string-append "https://mupdf.com/downloads/archive/"
566 name "-" version "-source.tar.gz"))
569 "02phamcchgsmvjnb3ir7r5sssvx9fcrscn297z73b82n1jl79510"))
570 (patches (search-patches "mupdf-build-with-openjpeg-2.1.patch"
571 "mupdf-CVE-2017-14685.patch"
572 "mupdf-CVE-2017-14686.patch"
573 "mupdf-CVE-2017-14687.patch"
574 "mupdf-CVE-2017-15587.patch"))
575 (modules '((guix build utils)))
576 (snippet '(delete-file-recursively "thirdparty"))))
577 (build-system gnu-build-system)
580 ("freetype" ,freetype)
581 ("harfbuzz" ,harfbuzz)
582 ("jbig2dec" ,jbig2dec)
587 ("openjpeg" ,openjpeg)
591 `(("pkg-config" ,pkg-config)))
593 '(#:tests? #f ; no check target
594 #:make-flags (list "CC=gcc"
596 (string-append "prefix=" (assoc-ref %outputs "out")))
597 #:phases (modify-phases %standard-phases
598 (delete 'configure))))
599 (home-page "https://mupdf.com")
600 (synopsis "Lightweight PDF viewer and toolkit")
602 "MuPDF is a C library that implements a PDF and XPS parsing and
603 rendering engine. It is used primarily to render pages into bitmaps,
604 but also provides support for other operations such as searching and
605 listing the table of contents and hyperlinks.
607 The library ships with a rudimentary X11 viewer, and a set of command
608 line tools for batch rendering @command{pdfdraw}, rewriting files
609 @command{pdfclean}, and examining the file structure @command{pdfshow}.")
610 (license license:agpl3+)))
618 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
619 "/qpdf-" version ".tar.gz"))
622 "0csj2p2gkxrc0rk8ykymlsdgfas96vzf1dip3y1x7z1q9plwgzd9"))
623 (modules '((guix build utils)))
625 ;; Replace shebang with the bi-lingual shell/Perl trick to remove
626 ;; dependency on Perl.
627 '(substitute* "qpdf/fix-qdf"
628 (("#!/usr/bin/env perl")
630 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
631 & eval 'exec perl -wS \"$0\" $argv:q'
633 (build-system gnu-build-system)
635 `(#:disallowed-references (,perl)
637 (modify-phases %standard-phases
638 (add-before 'configure 'patch-paths
640 (substitute* "make/libtool.mk"
642 (string-append "SHELL=" (which "bash"))))
644 '("qtest/bin/qtest-driver")
645 (find-files "." "\\.test"))
646 (("/usr/bin/env") (which "env"))))))))
648 `(("pkg-config" ,pkg-config)
654 (synopsis "Command-line tools and library for transforming PDF files")
656 "QPDF is a command-line program that does structural, content-preserving
657 transformations on PDF files. It could have been called something like
658 pdf-to-pdf. It includes support for merging and splitting PDFs and to
659 manipulate the list of pages in a PDF file. It is not a PDF viewer or a
660 program capable of converting PDF into other formats.")
661 (license license:clarified-artistic)
662 (home-page "http://qpdf.sourceforge.net/")))
664 (define-public xournal
671 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
672 "/xournal-" version ".tar.gz"))
675 "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13"))))
676 (build-system gnu-build-system)
682 ("libgnomecanvas" ,libgnomecanvas)))
684 `(("pkg-config" ,pkg-config)))
685 (home-page "http://xournal.sourceforge.net/")
686 (synopsis "Notetaking using a stylus")
688 "Xournal is an application for notetaking, sketching, keeping a journal
690 (license license:gpl2+)))
692 (define-public python-reportlab
694 (name "python-reportlab")
698 (uri (pypi-uri "reportlab" version))
701 "0rz2pg04wnzjjm2f5a8ik9v8s54mv4xrjhv5liqjijqv6awh12gl"))))
702 (build-system python-build-system)
704 '(;; FIXME: There is one test failure, but it does not cause the
705 ;; build to fail. No time to investigate right now.
706 #:test-target "tests"))
708 `(("python-pillow" ,python-pillow)))
709 (home-page "http://www.reportlab.com")
710 (synopsis "Python library for generating PDFs and graphics")
711 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
712 of rich PDF documents, and also creation of charts in a variety of bitmap and
714 (license license:bsd-3)))
716 (define-public python2-reportlab
717 (package-with-python2 python-reportlab))
719 (define-public impressive
726 "mirror://sourceforge/impressive/Impressive/"
727 version "/Impressive-" version ".tar.gz"))
730 "0b3rmy6acp2vmf5nill3aknxvr9a5aawk1vnphkah61anxp62gsr"))))
731 (build-system python-build-system)
733 ;; TODO: Add dependency on pdftk.
734 (inputs `(("python2-pygame" ,python2-pygame)
735 ("python2-pillow" ,python2-pillow)
741 #:phases (modify-phases %standard-phases
746 (lambda* (#:key inputs outputs #:allow-other-keys)
747 ;; There's no 'setup.py' so install things manually.
748 (let* ((out (assoc-ref outputs "out"))
749 (bin (string-append out "/bin"))
750 (man1 (string-append out "/share/man/man1"))
751 (sdl (assoc-ref inputs "sdl"))
752 (xpdf (assoc-ref inputs "xpdf")))
754 (copy-file "impressive.py"
755 (string-append bin "/impressive"))
756 (wrap-program (string-append bin "/impressive")
757 `("LIBRARY_PATH" ":" prefix ;for ctypes
758 (,(string-append sdl "/lib")))
759 `("PATH" ":" prefix ;for pdftoppm
760 (,(string-append xpdf "/bin"))))
761 (install-file "impressive.1" man1)
763 (home-page "http://impressive.sourceforge.net")
764 (synopsis "PDF presentation tool with visual effects")
766 "Impressive is a tool to display PDF files that provides visual effects
767 such as smooth alpha-blended slide transitions. It provides additional tools
768 such as zooming, highlighting an area of the screen, and a tool to navigate
770 (license license:gpl2)))
776 (home-page "https://www.kraxel.org/blog/linux/fbida/")
779 (uri (string-append "https://www.kraxel.org/releases/fbida/"
780 name "-" version ".tar.gz"))
783 "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk"))))
784 (build-system gnu-build-system)
787 (modify-phases %standard-phases
788 (add-after 'unpack 'patch-ldconfig
790 (substitute* "mk/Autoconf.mk"
791 (("/sbin/ldconfig -p") "echo lib")) #t))
794 #:make-flags (list "CC=gcc"
795 (string-append "prefix=" (assoc-ref %outputs "out")))))
796 (inputs `(("libjpeg" ,libjpeg)
802 ("imagemagick" ,imagemagick)
805 ("cairo-xcb" ,cairo-xcb)
806 ("freetype" ,freetype)
807 ("fontconfig" ,fontconfig)
810 ("libepoxy" ,libepoxy)
812 ("poppler" ,poppler)))
813 (native-inputs `(("pkg-config" ,pkg-config)))
814 (synopsis "Framebuffer and drm-based image viewer")
816 "fbida contains a few applications for viewing and editing images on
819 (license license:gpl2+)))
821 (define-public pdf2svg
828 "https://github.com/dawbarton/pdf2svg/archive/v"
830 (file-name (string-append name "-" version ".tar.gz"))
833 "12pa1pajirnlrkz2il3h4l30lc2prryk1qr132jk6z9y1c3qdcag"))))
834 (build-system gnu-build-system)
837 ("poppler" ,poppler)))
839 `(("pkg-config" ,pkg-config)))
840 (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/")
841 (synopsis "PDF to SVG converter")
842 (description "@command{pdf2svg} is a simple command-line PDF to SVG
843 converter using the Poppler and Cairo libraries.")
844 (license license:gpl2+)))
846 (define-public python-pypdf2
848 (name "python-pypdf2")
852 (uri (pypi-uri "PyPDF2" version))
855 "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
856 (build-system python-build-system)
859 (modify-phases %standard-phases
861 'unpack 'patch-test-suite
863 ;; The text-file needs to be opened in binary mode for Python 3,
864 ;; so patch in the "b"
865 (substitute* "Tests/tests.py"
866 (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line)
867 (string-append line "b")))
871 (zero? (system* "python" "-m" "unittest" "Tests.tests")))))))
872 (home-page "http://mstamy2.github.com/PyPDF2")
873 (synopsis "Pure Python PDF toolkit")
874 (description "PyPDF2 is a pure Python PDF library capable of:
877 @item extracting document information (title, author, …)
878 @item splitting documents page by page
879 @item merging documents page by page
881 @item merging multiple pages into a single page
882 @item encrypting and decrypting PDF files
885 By being pure Python, it should run on any Python platform without any
886 dependencies on external libraries. It can also work entirely on
887 @code{StringIO} objects rather than file streams, allowing for PDF
888 manipulation in memory. It is therefore a useful tool for websites that
889 manage or manipulate PDFs.")
890 (license license:bsd-3)))
892 (define-public python2-pypdf2
893 (package-with-python2 python-pypdf2))
895 (define-public python2-pypdf
897 (name "python2-pypdf")
901 (uri (pypi-uri "pyPdf" version))
904 "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
905 (build-system python-build-system)
907 `(#:tests? #f ; no tests
909 (home-page "http://pybrary.net/pyPdf/")
910 (synopsis "Pure Python PDF toolkit")
911 (description "PyPDF2 is a pure Python PDF toolkit.
913 Note: This module isn't maintained anymore. For new projects please use
914 python-pypdf2 instead.")
915 (license license:bsd-3)))
917 (define-public pdfposter
923 (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
926 "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
927 (build-system python-build-system)
929 `(#:tests? #f ; no test suite, only for visual control
932 ;; pdfposter 0.6.0 still uses the old pyPdf
933 `(("python2-pypdf" ,python2-pypdf)))
934 (home-page "https://pythonhosted.org/pdftools.pdfposter/")
935 (synopsis "Scale and tile PDF images/pages to print on multiple pages")
936 (description "@command{pdfposter} can be used to create a large poster by
937 building it from multple pages and/or printing it on large media. It expects
938 as input a PDF file, normally printing on a single page. The output is again
939 a PDF file, maybe containing multiple pages together building the poster. The
940 input page will be scaled to obtain the desired size.
942 This is much like @command{poster} does for Postscript files, but working with
943 PDF. Since sometimes @command{poster} does not like your files converted from
944 PDF. Indeed @command{pdfposter} was inspired by @command{poster}.")
945 (license license:gpl3+)))
947 (define-public pdfgrep
954 (uri (string-append "https://pdfgrep.org/download/"
955 name "-" version ".tar.gz"))
958 "07llkrkcfjwd3ybai9ad10ybhr0biffcplmy7lw4fb87nd2dfw03"))))
959 (build-system gnu-build-system)
961 `(("pkg-config" ,pkg-config)))
963 `(("libgcrypt" ,libgcrypt)
965 ("poppler" ,poppler)))
966 (home-page "https://pdfgrep.org")
967 (synopsis "Command-line utility to search text in PDF files")
969 "Pdfgrep searches in pdf files for strings matching a regular expression.
970 Support some GNU grep options as file name output, page number output,
971 optional case insensitivity, count occurrences, color highlights and search in
973 (license license:gpl2+)))