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, 2018 Ricardo Wurmus <rekado@elephly.net>
5 ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
6 ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
7 ;;; Copyright © 2016 Nils Gillmann <ng0@n0.is>
8 ;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
9 ;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
11 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
12 ;;; Copyright © 2016 Arun Isaac <arunisaac@systemreboot.net>
13 ;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
14 ;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
15 ;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
16 ;;; Copyright © 2017, 2018 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 git-download)
38 #:use-module (guix utils)
39 #:use-module (guix build-system gnu)
40 #:use-module (guix build-system cmake)
41 #:use-module (guix build-system meson)
42 #:use-module (guix build-system python)
43 #:use-module (guix build-system trivial)
44 #:use-module (gnu packages)
45 #:use-module (gnu packages autotools)
46 #:use-module (gnu packages backup)
47 #:use-module (gnu packages base)
48 #:use-module (gnu packages bash)
49 #:use-module (gnu packages check)
50 #:use-module (gnu packages compression)
51 #:use-module (gnu packages curl)
52 #:use-module (gnu packages databases)
53 #:use-module (gnu packages djvu)
54 #:use-module (gnu packages fontutils)
55 #:use-module (gnu packages game-development)
56 #:use-module (gnu packages gettext)
57 #:use-module (gnu packages ghostscript)
58 #:use-module (gnu packages gl)
59 #:use-module (gnu packages glib)
60 #:use-module (gnu packages gnome)
61 #:use-module (gnu packages gnupg)
62 #:use-module (gnu packages gstreamer)
63 #:use-module (gnu packages gtk)
64 #:use-module (gnu packages image)
65 #:use-module (gnu packages imagemagick)
66 #:use-module (gnu packages javascript)
67 #:use-module (gnu packages lesstif)
68 #:use-module (gnu packages linux)
69 #:use-module (gnu packages lua)
70 #:use-module (gnu packages pcre)
71 #:use-module (gnu packages perl)
72 #:use-module (gnu packages photo)
73 #:use-module (gnu packages pkg-config)
74 #:use-module (gnu packages python)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages sdl)
77 #:use-module (gnu packages tls)
78 #:use-module (gnu packages xdisorg)
79 #:use-module (gnu packages xorg)
80 #:use-module (srfi srfi-1))
82 (define-public poppler
85 (replacement poppler/fixed)
89 (uri (string-append "https://poppler.freedesktop.org/poppler-"
93 "0n0f7mv24lzv9p3dlzakpdhqg7ygcvl6l40grcz95xldzgq083gr"))))
94 (build-system cmake-build-system)
97 (inputs `(("fontconfig" ,fontconfig)
98 ("freetype" ,freetype)
99 ("libjpeg" ,libjpeg-turbo)
103 ("openjpeg" ,openjpeg)
106 ;; To build poppler-glib (as needed by Evince), we need Cairo and
107 ;; GLib. But of course, that Cairo must not depend on Poppler.
108 ("cairo" ,(package (inherit cairo)
109 (inputs (alist-delete "poppler"
110 (package-inputs cairo)))))))
112 ;; As per poppler-cairo and poppler-glib.pc.
113 ;; XXX: Ideally we'd propagate Cairo too, but that would require a
114 ;; different solution to the circular dependency mentioned above.
117 `(("pkg-config" ,pkg-config)
118 ("glib" ,glib "bin") ; glib-mkenums, etc.
119 ("gobject-introspection" ,gobject-introspection)))
121 `(#:tests? #f ; no test data provided with the tarball
123 (let* ((out (assoc-ref %outputs "out"))
124 (lib (string-append out "/lib")))
125 (list "-DENABLE_XPDF_HEADERS=ON" ; to install header files
127 (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
128 (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
129 (synopsis "PDF rendering library")
131 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
132 (license license:gpl2+)
133 (home-page "https://poppler.freedesktop.org/")))
135 (define poppler/fixed
139 (inherit (package-source poppler))
140 (patches (append (origin-patches (package-source poppler))
141 (search-patches "poppler-CVE-2018-19149.patch")))))))
143 (define-public poppler-data
145 (name "poppler-data")
149 (uri (string-append "https://poppler.freedesktop.org/poppler-data"
150 "-" version ".tar.gz"))
153 "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z"))))
154 (build-system gnu-build-system)
156 '(#:tests? #f ; no test suite
157 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
159 (modify-phases %standard-phases
160 ;; The package only provides some data files, so there is nothing to
164 (synopsis "Poppler encoding files for rendering of CJK and Cyrillic text")
165 (description "This package provides optional encoding files for Poppler.
166 When present, Poppler is able to correctly render CJK and Cyrillic text.")
167 (home-page (package-home-page poppler))
168 ;; See COPYING in the source distribution for more information about
170 (license (list license:bsd-3
173 (define-public poppler-qt4
174 (package/inherit poppler
176 (inputs `(("qt-4" ,qt-4)
177 ,@(package-inputs poppler)))
178 (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
180 (define-public poppler-qt5
181 (package/inherit poppler
183 (inputs `(("qtbase" ,qtbase)
184 ,@(package-inputs poppler)))
185 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
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
241 (url "https://github.com/libharu/libharu.git")
242 (commit (string-append
244 (string-join (string-split version #\.) "_")))))
245 (file-name (git-file-name name version))
248 "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q"))))
249 (build-system gnu-build-system)
252 (list (string-append "--with-zlib="
253 (assoc-ref %build-inputs "zlib"))
254 (string-append "--with-png="
255 (assoc-ref %build-inputs "libpng")))))
260 `(("autoconf" ,autoconf)
261 ("automake" ,automake)
262 ("libtool" ,libtool)))
263 (home-page "http://libharu.org/")
264 (synopsis "Library for generating PDF files")
266 "libHaru is a library for generating PDF files. libHaru does not support
267 reading and editing of existing PDF files.")
268 (license license:zlib)))
276 (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
279 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
280 (build-system gnu-build-system)
281 (inputs `(("freetype" ,freetype)
282 ("gs-fonts" ,gs-fonts)
284 ("libpaper" ,libpaper)
293 `(#:tests? #f ; there is no check target
294 #:parallel-build? #f ; build fails randomly on 8-way machines
296 (list (string-append "--with-freetype2-includes="
297 (assoc-ref %build-inputs "freetype")
298 "/include/freetype2"))
300 (modify-phases %standard-phases
302 (lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
303 (let* ((install (assoc-ref %standard-phases 'install))
304 (out (assoc-ref outputs "out"))
305 (xpdfrc (string-append out "/etc/xpdfrc"))
306 (gs-fonts (assoc-ref inputs "gs-fonts")))
309 (("/usr/local/share/ghostscript/fonts")
310 (string-append gs-fonts "/share/fonts/type1/ghostscript"))
311 (("#fontFile") "fontFile")))
313 (synopsis "Viewer for PDF files based on the Motif toolkit")
315 "Xpdf is a viewer for Portable Document Format (PDF) files.")
316 (license license:gpl3) ; or gpl2, but not gpl2+
317 (home-page "http://www.foolabs.com/xpdf/")))
319 (define-public zathura-cb
326 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
330 "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
331 (native-inputs `(("pkg-config" ,pkg-config)))
332 (inputs `(("libarchive" ,libarchive)
333 ("zathura" ,zathura)))
334 (build-system meson-build-system)
336 `(#:tests? #f ; package does not contain tests
338 (modify-phases %standard-phases
339 (add-after 'unpack 'patch-plugin-directory
340 ;; Something of a regression in 0.1.8: the new Meson build system
341 ;; now hard-codes an incorrect plugin directory. Fix it.
342 (lambda* (#:key outputs #:allow-other-keys)
343 (substitute* "meson.build"
344 (("(install_dir:).*" _ key)
346 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
348 (home-page "https://pwmt.org/projects/zathura-cb/")
349 (synopsis "Comic book support for zathura (libarchive backend)")
350 (description "The zathura-cb plugin adds comic book support to zathura
352 (license license:zlib)))
354 (define-public zathura-ps
361 (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
365 "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
366 (native-inputs `(("pkg-config" ,pkg-config)))
367 (inputs `(("libspectre" ,libspectre)
368 ("zathura" ,zathura)))
369 (build-system meson-build-system)
371 `(#:tests? #f ; package does not contain tests
373 (modify-phases %standard-phases
374 (add-after 'unpack 'patch-plugin-directory
375 ;; Something of a regression in 0.2.6: the new Meson build system
376 ;; now hard-codes an incorrect plugin directory. Fix it.
377 (lambda* (#:key outputs #:allow-other-keys)
378 (substitute* "meson.build"
379 (("(install_dir:).*" _ key)
381 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
383 (home-page "https://pwmt.org/projects/zathura-ps/")
384 (synopsis "PS support for zathura (libspectre backend)")
385 (description "The zathura-ps plugin adds PS support to zathura
387 (license license:zlib)))
389 (define-public zathura-djvu
391 (name "zathura-djvu")
396 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
400 "0axkv1crdxn0z44whaqp2ibkdqcykhjnxk7qzms0dp1b67an9rnh"))))
401 (native-inputs `(("pkg-config" ,pkg-config)))
403 `(("djvulibre" ,djvulibre)
404 ("zathura" ,zathura)))
405 (build-system meson-build-system)
407 `(#:tests? #f ; package does not contain tests
409 (modify-phases %standard-phases
410 (add-after 'unpack 'patch-plugin-directory
411 ;; Something of a regression in 0.2.8: the new Meson build system
412 ;; now hard-codes an incorrect plugin directory. Fix it.
413 (lambda* (#:key outputs #:allow-other-keys)
414 (substitute* "meson.build"
415 (("(install_dir:).*" _ key)
417 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
419 (home-page "https://pwmt.org/projects/zathura-djvu/")
420 (synopsis "DjVu support for zathura (DjVuLibre backend)")
421 (description "The zathura-djvu plugin adds DjVu support to zathura
422 using the DjVuLibre library.")
423 (license license:zlib)))
425 (define-public zathura-pdf-mupdf
427 (name "zathura-pdf-mupdf")
432 (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
433 "/download/zathura-pdf-mupdf-" version ".tar.xz"))
436 "166d5nz47ixzwj4pixsd5fd9qvjf5v34cdqi3p72vr23pswk2hyn"))))
437 (native-inputs `(("pkg-config" ,pkg-config)))
439 `(("jbig2dec" ,jbig2dec)
442 ("openjpeg" ,openjpeg)
444 ("zathura" ,zathura)))
445 (build-system meson-build-system)
447 `(#:tests? #f ; package does not contain tests
448 #:configure-flags (list (string-append "-Dplugindir="
449 (assoc-ref %outputs "out")
451 (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
452 (synopsis "PDF support for zathura (mupdf backend)")
453 (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
454 by using the @code{mupdf} rendering library.")
455 (license license:zlib)))
457 (define-public zathura-pdf-poppler
459 (name "zathura-pdf-poppler")
464 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
468 "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y"))))
469 (native-inputs `(("pkg-config" ,pkg-config)))
471 `(("poppler" ,poppler)
472 ("zathura" ,zathura)))
473 (build-system meson-build-system)
475 `(#:tests? #f ; package does not include tests
477 (modify-phases %standard-phases
478 (add-after 'unpack 'patch-plugin-directory
479 ;; Something of a regression in 0.2.9: the new Meson build system
480 ;; now hard-codes an incorrect plugin directory. Fix it.
481 (lambda* (#:key outputs #:allow-other-keys)
482 (substitute* "meson.build"
483 (("(install_dir:).*" _ key)
485 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
487 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
488 (synopsis "PDF support for zathura (poppler backend)")
489 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
490 by using the poppler rendering engine.")
491 (license license:zlib)))
493 (define-public zathura
500 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
504 "1j0yah09adv3bsjhhbqra5lambal32svk8fxmf89wwmcqrcr4qma"))
505 (patches (search-patches
506 "zathura-plugindir-environment-variable.patch"))))
507 (native-inputs `(("pkg-config" ,pkg-config)
508 ("gettext" ,gettext-minimal)
509 ("glib:bin" ,glib "bin")
511 ;; For building documentation.
512 ("python-sphinx" ,python-sphinx)
516 ("xorg-server" ,xorg-server-for-tests)))
517 (inputs `(("sqlite" ,sqlite)))
518 ;; Listed in 'Requires.private' of 'zathura.pc'.
519 (propagated-inputs `(("cairo" ,cairo)
522 (list (search-path-specification
523 (variable "ZATHURA_PLUGIN_PATH")
524 (files '("lib/zathura")))))
525 (build-system meson-build-system)
527 `(#:phases (modify-phases %standard-phases
528 (add-before 'check 'start-xserver
529 ;; Tests require a running X server.
530 (lambda* (#:key inputs #:allow-other-keys)
531 (let ((xorg-server (assoc-ref inputs "xorg-server"))
533 (setenv "DISPLAY" display)
535 ;; On busy machines, tests may take longer than
536 ;; the default of four seconds.
537 (setenv "CK_DEFAULT_TIMEOUT" "20")
539 ;; Don't fail due to missing '/etc/machine-id'.
540 (setenv "DBUS_FATAL_WARNINGS" "0")
541 (zero? (system (string-append xorg-server "/bin/Xvfb "
542 display " &")))))))))
543 (home-page "https://pwmt.org/projects/zathura/")
544 (synopsis "Lightweight keyboard-driven PDF viewer")
545 (description "Zathura is a customizable document viewer. It provides a
546 minimalistic interface and an interface that mainly focuses on keyboard
548 (license license:zlib)))
550 (define-public podofo
556 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
557 "/podofo-" version ".tar.gz"))
560 "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9"))
561 (patches (search-patches "podofo-cmake-3.12.patch"))))
562 (build-system cmake-build-system)
564 `(("cppunit" ,cppunit)
565 ("pkg-config" ,pkg-config)))
567 `(("libjpeg" ,libjpeg)
569 ("fontconfig" ,fontconfig)
570 ("freetype" ,freetype)
576 `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON"
577 "-DPODOFO_BUILD_STATIC=ON")
579 (modify-phases %standard-phases
580 (add-before 'configure 'patch
581 (lambda* (#:key inputs #:allow-other-keys)
582 (let ((freetype (assoc-ref inputs "freetype")))
583 ;; Look for freetype include files in the correct place.
584 (substitute* "cmake/modules/FindFREETYPE.cmake"
585 (("/usr/local") freetype)))
587 (home-page "http://podofo.sourceforge.net")
588 (synopsis "Tools to work with the PDF file format")
590 "PoDoFo is a C++ library and set of command-line tools to work with the
591 PDF file format. It can parse PDF files and load them into memory, and makes
592 it easy to modify them and write the changes to disk. It is primarily useful
593 for applications that wish to do lower level manipulation of PDF, such as
594 extracting content or merging files.")
595 (license license:lgpl2.0+)))
604 (uri (string-append "https://mupdf.com/downloads/archive/"
605 name "-" version "-source.tar.xz"))
608 "1psnz02w5p7wc1s1ma7vvjmkjfy641xvsh9ykaqzkk84dflnjgk0"))
609 (modules '((guix build utils)))
611 ;; We keep lcms2 since it is different than our lcms.
615 (delete-file-recursively (string-append "thirdparty/" dir)))
616 '("curl" "freeglut" "freetype" "harfbuzz" "jbig2dec"
617 "libjpeg" "mujs" "openjpeg" "zlib"))
619 (build-system gnu-build-system)
622 ("freeglut" ,freeglut)
623 ("freetype" ,freetype)
624 ("harfbuzz" ,harfbuzz)
625 ("jbig2dec" ,jbig2dec)
630 ("openjpeg" ,openjpeg)
634 `(("pkg-config" ,pkg-config)))
636 '(#:tests? #f ; no check target
637 #:make-flags (list "CC=gcc"
639 "USE_SYSTEM_LIBS=yes"
640 "USE_SYSTEM_MUJS=yes"
641 (string-append "prefix=" (assoc-ref %outputs "out")))
642 #:phases (modify-phases %standard-phases
643 (delete 'configure))))
644 (home-page "https://mupdf.com")
645 (synopsis "Lightweight PDF viewer and toolkit")
647 "MuPDF is a C library that implements a PDF and XPS parsing and
648 rendering engine. It is used primarily to render pages into bitmaps,
649 but also provides support for other operations such as searching and
650 listing the table of contents and hyperlinks.
652 The library ships with a rudimentary X11 viewer, and a set of command
653 line tools for batch rendering @command{pdfdraw}, rewriting files
654 @command{pdfclean}, and examining the file structure @command{pdfshow}.")
655 (license (list license:agpl3+
656 license:bsd-3 ; resources/cmaps
657 license:x11 ; thirdparty/lcms2
658 license:silofl1.1 ; resources/fonts/{han,noto,sil,urw}
659 license:asl2.0)))) ; resources/fonts/droid
667 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
668 "/qpdf-" version ".tar.gz"))
671 "1jdb0jj72fjdp6xip4m7yz31r5x13zs7h4smnxsycgw3vbmx6igl"))
672 (modules '((guix build utils)))
674 ;; Replace shebang with the bi-lingual shell/Perl trick to remove
675 ;; dependency on Perl.
677 (substitute* "qpdf/fix-qdf"
678 (("#!/usr/bin/env perl")
680 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
681 & eval 'exec perl -wS \"$0\" $argv:q'
684 (build-system gnu-build-system)
686 `(#:disallowed-references (,perl)
688 (modify-phases %standard-phases
689 (add-before 'configure 'patch-paths
691 (substitute* "make/libtool.mk"
693 (string-append "SHELL=" (which "bash"))))
695 '("qtest/bin/qtest-driver")
696 (find-files "." "\\.test"))
697 (("/usr/bin/env") (which "env")))
700 `(("pkg-config" ,pkg-config)
703 ;; In Requires.private of libqpdf.pc.
704 `(("libjpeg-turbo" ,libjpeg-turbo)
706 (synopsis "Command-line tools and library for transforming PDF files")
708 "QPDF is a command-line program that does structural, content-preserving
709 transformations on PDF files. It could have been called something like
710 pdf-to-pdf. It includes support for merging and splitting PDFs and to
711 manipulate the list of pages in a PDF file. It is not a PDF viewer or a
712 program capable of converting PDF into other formats.")
713 ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0.
714 ;; Users can still choose to use the old license at their option.
715 (license (list license:asl2.0 license:clarified-artistic))
716 (home-page "http://qpdf.sourceforge.net/")))
718 (define-public xournal
721 (version "0.4.8.2016")
725 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
726 "/xournal-" version ".tar.gz"))
729 "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j"))))
730 (build-system gnu-build-system)
736 ("libgnomecanvas" ,libgnomecanvas)))
738 `(("pkg-config" ,pkg-config)))
739 (home-page "http://xournal.sourceforge.net/")
740 (synopsis "Notetaking using a stylus")
742 "Xournal is an application for notetaking, sketching, keeping a journal
744 (license license:gpl2+)))
746 (define-public python-reportlab
748 (name "python-reportlab")
752 (uri (pypi-uri "reportlab" version))
755 "0hy304pzsz9lblmk7mrbk2682bi911lxgvzx2kcfpmfzb5gg7sjv"))))
756 (build-system python-build-system)
758 '(;; FIXME: There is one test failure, but it does not cause the
759 ;; build to fail. No time to investigate right now.
760 #:test-target "tests"))
762 `(("python-pillow" ,python-pillow)))
763 (home-page "https://www.reportlab.com")
764 (synopsis "Python library for generating PDFs and graphics")
765 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
766 of rich PDF documents, and also creation of charts in a variety of bitmap and
768 (license license:bsd-3)))
770 (define-public python2-reportlab
771 (package-with-python2 python-reportlab))
773 (define-public impressive
780 "mirror://sourceforge/impressive/Impressive/"
781 version "/Impressive-" version ".tar.gz"))
784 "0b3rmy6acp2vmf5nill3aknxvr9a5aawk1vnphkah61anxp62gsr"))))
785 (build-system python-build-system)
787 ;; TODO: Add dependency on pdftk.
788 (inputs `(("python2-pygame" ,python2-pygame)
789 ("python2-pillow" ,python2-pillow)
795 #:phases (modify-phases %standard-phases
800 (lambda* (#:key inputs outputs #:allow-other-keys)
801 ;; There's no 'setup.py' so install things manually.
802 (let* ((out (assoc-ref outputs "out"))
803 (bin (string-append out "/bin"))
804 (man1 (string-append out "/share/man/man1"))
805 (sdl (assoc-ref inputs "sdl"))
806 (xpdf (assoc-ref inputs "xpdf")))
808 (copy-file "impressive.py"
809 (string-append bin "/impressive"))
810 (wrap-program (string-append bin "/impressive")
811 `("LIBRARY_PATH" ":" prefix ;for ctypes
812 (,(string-append sdl "/lib")))
813 `("PATH" ":" prefix ;for pdftoppm
814 (,(string-append xpdf "/bin"))))
815 (install-file "impressive.1" man1)
817 (home-page "http://impressive.sourceforge.net")
818 (synopsis "PDF presentation tool with visual effects")
820 "Impressive is a tool to display PDF files that provides visual effects
821 such as smooth alpha-blended slide transitions. It provides additional tools
822 such as zooming, highlighting an area of the screen, and a tool to navigate
824 (license license:gpl2)))
830 (home-page "https://www.kraxel.org/blog/linux/fbida/")
833 (uri (string-append "https://www.kraxel.org/releases/fbida/"
834 name "-" version ".tar.gz"))
837 "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk"))))
838 (build-system gnu-build-system)
841 (modify-phases %standard-phases
842 (add-after 'unpack 'patch-ldconfig
844 (substitute* "mk/Autoconf.mk"
845 (("/sbin/ldconfig -p") "echo lib")) #t))
848 #:make-flags (list "CC=gcc"
849 (string-append "prefix=" (assoc-ref %outputs "out")))))
850 (inputs `(("libjpeg" ,libjpeg)
856 ("imagemagick" ,imagemagick)
859 ("cairo-xcb" ,cairo-xcb)
860 ("freetype" ,freetype)
861 ("fontconfig" ,fontconfig)
864 ("libepoxy" ,libepoxy)
866 ("poppler" ,poppler)))
867 (native-inputs `(("pkg-config" ,pkg-config)))
868 (synopsis "Framebuffer and drm-based image viewer")
870 "fbida contains a few applications for viewing and editing images on
873 (license license:gpl2+)))
875 (define-public pdf2svg
882 "https://github.com/dawbarton/pdf2svg/archive/v"
884 (file-name (string-append name "-" version ".tar.gz"))
887 "12pa1pajirnlrkz2il3h4l30lc2prryk1qr132jk6z9y1c3qdcag"))))
888 (build-system gnu-build-system)
891 ("poppler" ,poppler)))
893 `(("pkg-config" ,pkg-config)))
894 (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/")
895 (synopsis "PDF to SVG converter")
896 (description "@command{pdf2svg} is a simple command-line PDF to SVG
897 converter using the Poppler and Cairo libraries.")
898 (license license:gpl2+)))
900 (define-public python-pypdf2
902 (name "python-pypdf2")
906 (uri (pypi-uri "PyPDF2" version))
909 "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
910 (build-system python-build-system)
913 (modify-phases %standard-phases
915 'unpack 'patch-test-suite
917 ;; The text-file needs to be opened in binary mode for Python 3,
918 ;; so patch in the "b"
919 (substitute* "Tests/tests.py"
920 (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line)
921 (string-append line "b")))
925 (invoke "python" "-m" "unittest" "Tests.tests"))))))
926 (home-page "http://mstamy2.github.com/PyPDF2")
927 (synopsis "Pure Python PDF toolkit")
928 (description "PyPDF2 is a pure Python PDF library capable of:
931 @item extracting document information (title, author, …)
932 @item splitting documents page by page
933 @item merging documents page by page
935 @item merging multiple pages into a single page
936 @item encrypting and decrypting PDF files
939 By being pure Python, it should run on any Python platform without any
940 dependencies on external libraries. It can also work entirely on
941 @code{StringIO} objects rather than file streams, allowing for PDF
942 manipulation in memory. It is therefore a useful tool for websites that
943 manage or manipulate PDFs.")
944 (license license:bsd-3)))
946 (define-public python2-pypdf2
947 (package-with-python2 python-pypdf2))
949 (define-public python2-pypdf
951 (name "python2-pypdf")
955 (uri (pypi-uri "pyPdf" version))
958 "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
959 (build-system python-build-system)
961 `(#:tests? #f ; no tests
963 (home-page "http://pybrary.net/pyPdf/")
964 (synopsis "Pure Python PDF toolkit")
965 (description "PyPDF2 is a pure Python PDF toolkit.
967 Note: This module isn't maintained anymore. For new projects please use
968 python-pypdf2 instead.")
969 (license license:bsd-3)))
971 (define-public pdfposter
977 (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
980 "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
981 (build-system python-build-system)
983 `(#:tests? #f ; no test suite, only for visual control
986 ;; pdfposter 0.6.0 still uses the old pyPdf
987 `(("python2-pypdf" ,python2-pypdf)))
988 (home-page "https://pythonhosted.org/pdftools.pdfposter/")
989 (synopsis "Scale and tile PDF images/pages to print on multiple pages")
990 (description "@command{pdfposter} can be used to create a large poster by
991 building it from multple pages and/or printing it on large media. It expects
992 as input a PDF file, normally printing on a single page. The output is again
993 a PDF file, maybe containing multiple pages together building the poster. The
994 input page will be scaled to obtain the desired size.
996 This is much like @command{poster} does for Postscript files, but working with
997 PDF. Since sometimes @command{poster} does not like your files converted from
998 PDF. Indeed @command{pdfposter} was inspired by @command{poster}.")
999 (license license:gpl3+)))
1001 (define-public pdfgrep
1008 (uri (string-append "https://pdfgrep.org/download/"
1009 name "-" version ".tar.gz"))
1012 "02qcl5kmr5qzjfc99qpbpfb1890bxlrq3r208gnding51zrmb09c"))))
1013 (build-system gnu-build-system)
1015 `(("pkg-config" ,pkg-config)))
1017 `(("libgcrypt" ,libgcrypt)
1019 ("poppler" ,poppler)))
1020 (home-page "https://pdfgrep.org")
1021 (synopsis "Command-line utility to search text in PDF files")
1023 "Pdfgrep searches in pdf files for strings matching a regular expression.
1024 Support some GNU grep options as file name output, page number output,
1025 optional case insensitivity, count occurrences, color highlights and search in
1027 (license license:gpl2+)))
1029 (define-public pdfpc
1037 (url "https://github.com/pdfpc/pdfpc.git")
1038 (commit (string-append "v" version))))
1039 (file-name (git-file-name name version))
1042 "1rmsrpf5vlqhnyyrhq8apndny88ld2qvfjx6258653pqbimv7mx5"))))
1043 (build-system cmake-build-system)
1044 (arguments '(#:tests? #f)) ; no test target
1048 ("gstreamer" ,gstreamer)
1049 ("gst-plugins-base" ,gst-plugins-base)
1051 ("poppler" ,poppler)
1055 `(("pkg-config" ,pkg-config)))
1056 (home-page "https://pdfpc.github.io/")
1057 (synopsis "Presenter console with multi-monitor support for PDF files")
1059 "pdfpc is a presentation viewer application which uses multi-monitor
1060 output to provide meta information to the speaker during the presentation. It
1061 is able to show a normal presentation window on one screen, while showing a
1062 more sophisticated overview on the other one providing information like a
1063 picture of the next slide, as well as the left over time till the end of the
1064 presentation. The input files processed by pdfpc are PDF documents.")
1065 (license license:gpl2+)))