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, 2019 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, 2018 Rene Saavedra <pacoon@protonmail.com>
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 djvu)
53 #:use-module (gnu packages fontutils)
54 #:use-module (gnu packages game-development)
55 #:use-module (gnu packages gettext)
56 #:use-module (gnu packages ghostscript)
57 #:use-module (gnu packages gl)
58 #:use-module (gnu packages glib)
59 #:use-module (gnu packages gnome)
60 #:use-module (gnu packages gnupg)
61 #:use-module (gnu packages gstreamer)
62 #:use-module (gnu packages gtk)
63 #:use-module (gnu packages image)
64 #:use-module (gnu packages imagemagick)
65 #:use-module (gnu packages javascript)
66 #:use-module (gnu packages lesstif)
67 #:use-module (gnu packages linux)
68 #:use-module (gnu packages lua)
69 #:use-module (gnu packages pcre)
70 #:use-module (gnu packages perl)
71 #:use-module (gnu packages photo)
72 #:use-module (gnu packages pkg-config)
73 #:use-module (gnu packages python)
74 #:use-module (gnu packages python-xyz)
75 #:use-module (gnu packages qt)
76 #:use-module (gnu packages sdl)
77 #:use-module (gnu packages sqlite)
78 #:use-module (gnu packages tls)
79 #:use-module (gnu packages xdisorg)
80 #:use-module (gnu packages xorg)
81 #:use-module (srfi srfi-1))
83 (define-public poppler
86 (replacement poppler/fixed)
90 (uri (string-append "https://poppler.freedesktop.org/poppler-"
94 "0n0f7mv24lzv9p3dlzakpdhqg7ygcvl6l40grcz95xldzgq083gr"))))
95 (build-system cmake-build-system)
98 (inputs `(("fontconfig" ,fontconfig)
99 ("freetype" ,freetype)
100 ("libjpeg" ,libjpeg-turbo)
104 ("openjpeg" ,openjpeg)
107 ;; To build poppler-glib (as needed by Evince), we need Cairo and
108 ;; GLib. But of course, that Cairo must not depend on Poppler.
109 ("cairo" ,(package (inherit cairo)
110 (inputs (alist-delete "poppler"
111 (package-inputs cairo)))))))
113 ;; As per poppler-cairo and poppler-glib.pc.
114 ;; XXX: Ideally we'd propagate Cairo too, but that would require a
115 ;; different solution to the circular dependency mentioned above.
118 `(("pkg-config" ,pkg-config)
119 ("glib" ,glib "bin") ; glib-mkenums, etc.
120 ("gobject-introspection" ,gobject-introspection)))
122 `(#:tests? #f ; no test data provided with the tarball
124 (let* ((out (assoc-ref %outputs "out"))
125 (lib (string-append out "/lib")))
126 (list "-DENABLE_XPDF_HEADERS=ON" ; to install header files
128 (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
129 (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
130 (synopsis "PDF rendering library")
132 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
133 (license license:gpl2+)
134 (home-page "https://poppler.freedesktop.org/")))
136 (define poppler/fixed
140 (inherit (package-source poppler))
141 (patches (append (origin-patches (package-source poppler))
142 (search-patches "poppler-CVE-2018-19149.patch")))))))
144 (define-public poppler-data
146 (name "poppler-data")
150 (uri (string-append "https://poppler.freedesktop.org/poppler-data"
151 "-" version ".tar.gz"))
154 "04i0wgdkn5lhda8cyxd1ll4a2p41pwqrwd47n9mdpl7cx5ypx70z"))))
155 (build-system gnu-build-system)
157 '(#:tests? #f ; no test suite
158 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
160 (modify-phases %standard-phases
161 ;; The package only provides some data files, so there is nothing to
165 (synopsis "Poppler encoding files for rendering of CJK and Cyrillic text")
166 (description "This package provides optional encoding files for Poppler.
167 When present, Poppler is able to correctly render CJK and Cyrillic text.")
168 (home-page (package-home-page poppler))
169 ;; See COPYING in the source distribution for more information about
171 (license (list license:bsd-3
174 (define-public poppler-qt4
175 (package/inherit poppler
177 (inputs `(("qt-4" ,qt-4)
178 ,@(package-inputs poppler)))
179 (synopsis "Qt4 frontend for the Poppler PDF rendering library")))
181 (define-public poppler-qt5
182 (package/inherit poppler
184 (inputs `(("qtbase" ,qtbase)
185 ,@(package-inputs poppler)))
186 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
188 (define-public python-poppler-qt5
190 (name "python-poppler-qt5")
195 (uri (pypi-uri "python-poppler-qt5" version))
198 "0l69llw1fzwz8y90q0qp9q5pifbrqjjbwii7di54dwghw5fc6w1r"))))
199 (build-system python-build-system)
201 `(;; There are no tests. The check phase just causes a rebuild.
204 (modify-phases %standard-phases
206 (lambda* (#:key inputs #:allow-other-keys)
207 (substitute* "setup.py"
208 ;; This check always fails, so disable it.
209 (("if not check_qtxml\\(\\)")
211 ;; Enable C++11, which is needed because of Qt5.
212 (("\\*\\*ext_args" line)
213 (string-append "extra_compile_args=['-std=gnu++11'], " line)))
214 ;; We need to pass an extra flag here. This cannot be in
215 ;; configure-flags because it should not be passed for the
216 ;; installation phase.
217 ((@@ (guix build python-build-system) call-setuppy)
218 "build_ext" (list (string-append "--pyqt-sip-dir="
219 (assoc-ref inputs "python-pyqt")
220 "/share/sip")) #t))))))
222 `(("pkg-config" ,pkg-config)))
224 `(("python-sip" ,python-sip)
225 ("python-pyqt" ,python-pyqt)
226 ("poppler-qt5" ,poppler-qt5)
228 (home-page "https://pypi.python.org/pypi/python-poppler-qt5")
229 (synopsis "Python bindings for Poppler-Qt5")
231 "This package provides Python bindings for the Qt5 interface of the
232 Poppler PDF rendering library.")
233 (license license:lgpl2.1+)))
235 (define-public libharu
242 (url "https://github.com/libharu/libharu.git")
243 (commit (string-append
245 (string-join (string-split version #\.) "_")))))
246 (file-name (git-file-name name version))
249 "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q"))))
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")))))
261 `(("autoconf" ,autoconf)
262 ("automake" ,automake)
263 ("libtool" ,libtool)))
264 (home-page "http://libharu.org/")
265 (synopsis "Library for generating PDF files")
267 "libHaru is a library for generating PDF files. libHaru does not support
268 reading and editing of existing PDF files.")
269 (license license:zlib)))
277 (uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
280 "1rbp54mr3z2x3a3a1qmz8byzygzi223vckfam9ib5g1sfds0qf8i"))))
281 (build-system gnu-build-system)
282 (inputs `(("freetype" ,freetype)
283 ("gs-fonts" ,gs-fonts)
285 ("libpaper" ,libpaper)
294 `(#:tests? #f ; there is no check target
295 #:parallel-build? #f ; build fails randomly on 8-way machines
297 (list (string-append "--with-freetype2-includes="
298 (assoc-ref %build-inputs "freetype")
299 "/include/freetype2"))
301 (modify-phases %standard-phases
303 (lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
304 (let* ((install (assoc-ref %standard-phases 'install))
305 (out (assoc-ref outputs "out"))
306 (xpdfrc (string-append out "/etc/xpdfrc"))
307 (gs-fonts (assoc-ref inputs "gs-fonts")))
310 (("/usr/local/share/ghostscript/fonts")
311 (string-append gs-fonts "/share/fonts/type1/ghostscript"))
312 (("#fontFile") "fontFile")))
314 (synopsis "Viewer for PDF files based on the Motif toolkit")
316 "Xpdf is a viewer for Portable Document Format (PDF) files.")
317 (license license:gpl3) ; or gpl2, but not gpl2+
318 (home-page "http://www.foolabs.com/xpdf/")))
320 (define-public zathura-cb
327 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
331 "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
332 (native-inputs `(("pkg-config" ,pkg-config)))
333 (inputs `(("libarchive" ,libarchive)
334 ("zathura" ,zathura)))
335 (build-system meson-build-system)
337 `(#:tests? #f ; package does not contain tests
339 (modify-phases %standard-phases
340 (add-after 'unpack 'patch-plugin-directory
341 ;; Something of a regression in 0.1.8: the new Meson build system
342 ;; now hard-codes an incorrect plugin directory. Fix it.
343 (lambda* (#:key outputs #:allow-other-keys)
344 (substitute* "meson.build"
345 (("(install_dir:).*" _ key)
347 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
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 "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
367 (native-inputs `(("pkg-config" ,pkg-config)))
368 (inputs `(("libspectre" ,libspectre)
369 ("zathura" ,zathura)))
370 (build-system meson-build-system)
372 `(#:tests? #f ; package does not contain tests
374 (modify-phases %standard-phases
375 (add-after 'unpack 'patch-plugin-directory
376 ;; Something of a regression in 0.2.6: the new Meson build system
377 ;; now hard-codes an incorrect plugin directory. Fix it.
378 (lambda* (#:key outputs #:allow-other-keys)
379 (substitute* "meson.build"
380 (("(install_dir:).*" _ key)
382 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
384 (home-page "https://pwmt.org/projects/zathura-ps/")
385 (synopsis "PS support for zathura (libspectre backend)")
386 (description "The zathura-ps plugin adds PS support to zathura
388 (license license:zlib)))
390 (define-public zathura-djvu
392 (name "zathura-djvu")
397 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
401 "0axkv1crdxn0z44whaqp2ibkdqcykhjnxk7qzms0dp1b67an9rnh"))))
402 (native-inputs `(("pkg-config" ,pkg-config)))
404 `(("djvulibre" ,djvulibre)
405 ("zathura" ,zathura)))
406 (build-system meson-build-system)
408 `(#:tests? #f ; package does not contain tests
410 (modify-phases %standard-phases
411 (add-after 'unpack 'patch-plugin-directory
412 ;; Something of a regression in 0.2.8: the new Meson build system
413 ;; now hard-codes an incorrect plugin directory. Fix it.
414 (lambda* (#:key outputs #:allow-other-keys)
415 (substitute* "meson.build"
416 (("(install_dir:).*" _ key)
418 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
420 (home-page "https://pwmt.org/projects/zathura-djvu/")
421 (synopsis "DjVu support for zathura (DjVuLibre backend)")
422 (description "The zathura-djvu plugin adds DjVu support to zathura
423 using the DjVuLibre library.")
424 (license license:zlib)))
426 (define-public zathura-pdf-mupdf
428 (name "zathura-pdf-mupdf")
433 (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
434 "/download/zathura-pdf-mupdf-" version ".tar.xz"))
437 "166d5nz47ixzwj4pixsd5fd9qvjf5v34cdqi3p72vr23pswk2hyn"))))
438 (native-inputs `(("pkg-config" ,pkg-config)))
440 `(("jbig2dec" ,jbig2dec)
444 ("openjpeg" ,openjpeg)
446 ("zathura" ,zathura)))
447 (build-system meson-build-system)
449 `(#:tests? #f ; package does not contain tests
450 #:configure-flags (list (string-append "-Dplugindir="
451 (assoc-ref %outputs "out")
453 "-Dlink-external=true")
455 (modify-phases %standard-phases
456 (add-before 'configure 'add-mujs-to-dependencies
458 ;; Add mujs to the 'build_dependencies'.
459 (substitute* "meson.build"
460 (("^ libopenjp2 = dependency.*" x)
461 (string-append x " mujs = cc.find_library('mujs')\n"))
463 " libopenjp2, mujs")))))))
464 (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
465 (synopsis "PDF support for zathura (mupdf backend)")
466 (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
467 by using the @code{mupdf} rendering library.")
468 (license license:zlib)))
470 (define-public zathura-pdf-poppler
472 (name "zathura-pdf-poppler")
477 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
481 "1p4jcny0jniygns78mcf0nlm298dszh49qpmjmackrm6dq8hc25y"))))
482 (native-inputs `(("pkg-config" ,pkg-config)))
484 `(("poppler" ,poppler)
485 ("zathura" ,zathura)))
486 (build-system meson-build-system)
488 `(#:tests? #f ; package does not include tests
490 (modify-phases %standard-phases
491 (add-after 'unpack 'patch-plugin-directory
492 ;; Something of a regression in 0.2.9: the new Meson build system
493 ;; now hard-codes an incorrect plugin directory. Fix it.
494 (lambda* (#:key outputs #:allow-other-keys)
495 (substitute* "meson.build"
496 (("(install_dir:).*" _ key)
498 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
500 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
501 (synopsis "PDF support for zathura (poppler backend)")
502 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
503 by using the poppler rendering engine.")
504 (license license:zlib)))
506 (define-public zathura
513 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
517 "1j0yah09adv3bsjhhbqra5lambal32svk8fxmf89wwmcqrcr4qma"))
518 (patches (search-patches
519 "zathura-plugindir-environment-variable.patch"))))
520 (native-inputs `(("pkg-config" ,pkg-config)
521 ("gettext" ,gettext-minimal)
522 ("glib:bin" ,glib "bin")
524 ;; For building documentation.
525 ("python-sphinx" ,python-sphinx)
529 ("xorg-server" ,xorg-server-for-tests)))
530 (inputs `(("sqlite" ,sqlite)))
531 ;; Listed in 'Requires.private' of 'zathura.pc'.
532 (propagated-inputs `(("cairo" ,cairo)
535 (list (search-path-specification
536 (variable "ZATHURA_PLUGIN_PATH")
537 (files '("lib/zathura")))))
538 (build-system meson-build-system)
540 `(#:phases (modify-phases %standard-phases
541 (add-before 'check 'start-xserver
542 ;; Tests require a running X server.
543 (lambda* (#:key inputs #:allow-other-keys)
544 (let ((xorg-server (assoc-ref inputs "xorg-server"))
546 (setenv "DISPLAY" display)
548 ;; On busy machines, tests may take longer than
549 ;; the default of four seconds.
550 (setenv "CK_DEFAULT_TIMEOUT" "20")
552 ;; Don't fail due to missing '/etc/machine-id'.
553 (setenv "DBUS_FATAL_WARNINGS" "0")
554 (zero? (system (string-append xorg-server "/bin/Xvfb "
555 display " &")))))))))
556 (home-page "https://pwmt.org/projects/zathura/")
557 (synopsis "Lightweight keyboard-driven PDF viewer")
558 (description "Zathura is a customizable document viewer. It provides a
559 minimalistic interface and an interface that mainly focuses on keyboard
561 (license license:zlib)))
563 (define-public podofo
569 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
570 "/podofo-" version ".tar.gz"))
573 "0wj0y4zcmj4q79wrn3vv3xq4bb0vhhxs8yifafwy9f2sjm83c5p9"))
574 (patches (search-patches "podofo-cmake-3.12.patch"))))
575 (build-system cmake-build-system)
577 `(("cppunit" ,cppunit)
578 ("pkg-config" ,pkg-config)))
580 `(("libjpeg" ,libjpeg)
582 ("fontconfig" ,fontconfig)
583 ("freetype" ,freetype)
589 `(#:configure-flags '("-DPODOFO_BUILD_SHARED=ON"
590 "-DPODOFO_BUILD_STATIC=ON")
592 (modify-phases %standard-phases
593 (add-before 'configure 'patch
594 (lambda* (#:key inputs #:allow-other-keys)
595 (let ((freetype (assoc-ref inputs "freetype")))
596 ;; Look for freetype include files in the correct place.
597 (substitute* "cmake/modules/FindFREETYPE.cmake"
598 (("/usr/local") freetype)))
600 (home-page "http://podofo.sourceforge.net")
601 (synopsis "Tools to work with the PDF file format")
603 "PoDoFo is a C++ library and set of command-line tools to work with the
604 PDF file format. It can parse PDF files and load them into memory, and makes
605 it easy to modify them and write the changes to disk. It is primarily useful
606 for applications that wish to do lower level manipulation of PDF, such as
607 extracting content or merging files.")
608 (license license:lgpl2.0+)))
617 (uri (string-append "https://mupdf.com/downloads/archive/"
618 name "-" version "-source.tar.xz"))
621 "1psnz02w5p7wc1s1ma7vvjmkjfy641xvsh9ykaqzkk84dflnjgk0"))
622 (modules '((guix build utils)))
624 ;; We keep lcms2 since it is different than our lcms.
628 (delete-file-recursively (string-append "thirdparty/" dir)))
629 '("curl" "freeglut" "freetype" "harfbuzz" "jbig2dec"
630 "libjpeg" "mujs" "openjpeg" "zlib"))
632 (build-system gnu-build-system)
635 ("freeglut" ,freeglut)
636 ("freetype" ,freetype)
637 ("harfbuzz" ,harfbuzz)
638 ("jbig2dec" ,jbig2dec)
643 ("openjpeg" ,openjpeg)
647 `(("pkg-config" ,pkg-config)))
649 '(#:tests? #f ; no check target
650 #:make-flags (list "CC=gcc"
652 "USE_SYSTEM_LIBS=yes"
653 "USE_SYSTEM_MUJS=yes"
654 (string-append "prefix=" (assoc-ref %outputs "out")))
655 #:phases (modify-phases %standard-phases
656 (delete 'configure))))
657 (home-page "https://mupdf.com")
658 (synopsis "Lightweight PDF viewer and toolkit")
660 "MuPDF is a C library that implements a PDF and XPS parsing and
661 rendering engine. It is used primarily to render pages into bitmaps,
662 but also provides support for other operations such as searching and
663 listing the table of contents and hyperlinks.
665 The library ships with a rudimentary X11 viewer, and a set of command
666 line tools for batch rendering @command{pdfdraw}, rewriting files
667 @command{pdfclean}, and examining the file structure @command{pdfshow}.")
668 (license (list license:agpl3+
669 license:bsd-3 ; resources/cmaps
670 license:x11 ; thirdparty/lcms2
671 license:silofl1.1 ; resources/fonts/{han,noto,sil,urw}
672 license:asl2.0)))) ; resources/fonts/droid
680 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
681 "/qpdf-" version ".tar.gz"))
684 "1jdb0jj72fjdp6xip4m7yz31r5x13zs7h4smnxsycgw3vbmx6igl"))
685 (modules '((guix build utils)))
687 ;; Replace shebang with the bi-lingual shell/Perl trick to remove
688 ;; dependency on Perl.
690 (substitute* "qpdf/fix-qdf"
691 (("#!/usr/bin/env perl")
693 eval '(exit $?0)' && eval 'exec perl -wS \"$0\" ${1+\"$@\"}'
694 & eval 'exec perl -wS \"$0\" $argv:q'
697 (build-system gnu-build-system)
699 `(#:disallowed-references (,perl)
701 (modify-phases %standard-phases
702 (add-before 'configure 'patch-paths
704 (substitute* "make/libtool.mk"
706 (string-append "SHELL=" (which "bash"))))
708 '("qtest/bin/qtest-driver")
709 (find-files "." "\\.test"))
710 (("/usr/bin/env") (which "env")))
713 `(("pkg-config" ,pkg-config)
716 ;; In Requires.private of libqpdf.pc.
717 `(("libjpeg-turbo" ,libjpeg-turbo)
719 (synopsis "Command-line tools and library for transforming PDF files")
721 "QPDF is a command-line program that does structural, content-preserving
722 transformations on PDF files. It could have been called something like
723 pdf-to-pdf. It includes support for merging and splitting PDFs and to
724 manipulate the list of pages in a PDF file. It is not a PDF viewer or a
725 program capable of converting PDF into other formats.")
726 ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0.
727 ;; Users can still choose to use the old license at their option.
728 (license (list license:asl2.0 license:clarified-artistic))
729 (home-page "http://qpdf.sourceforge.net/")))
731 (define-public xournal
734 (version "0.4.8.2016")
738 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
739 "/xournal-" version ".tar.gz"))
742 "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j"))))
743 (build-system gnu-build-system)
749 ("libgnomecanvas" ,libgnomecanvas)))
751 `(("pkg-config" ,pkg-config)))
752 (home-page "http://xournal.sourceforge.net/")
753 (synopsis "Notetaking using a stylus")
755 "Xournal is an application for notetaking, sketching, keeping a journal
757 (license license:gpl2+)))
759 (define-public python-reportlab
761 (name "python-reportlab")
765 (uri (pypi-uri "reportlab" version))
768 "0hy304pzsz9lblmk7mrbk2682bi911lxgvzx2kcfpmfzb5gg7sjv"))))
769 (build-system python-build-system)
771 '(;; FIXME: There is one test failure, but it does not cause the
772 ;; build to fail. No time to investigate right now.
773 #:test-target "tests"))
775 `(("python-pillow" ,python-pillow)))
776 (home-page "https://www.reportlab.com")
777 (synopsis "Python library for generating PDFs and graphics")
778 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
779 of rich PDF documents, and also creation of charts in a variety of bitmap and
781 (license license:bsd-3)))
783 (define-public python2-reportlab
784 (package-with-python2 python-reportlab))
786 (define-public impressive
793 "mirror://sourceforge/impressive/Impressive/"
794 version "/Impressive-" version ".tar.gz"))
797 "0zaqq3yvd296mfr5bxpj2hqlk7vrb0rsbgd4dc1l5ag46giqvivx"))))
798 (build-system python-build-system)
800 ;; TODO: Add dependency on pdftk.
801 (inputs `(("python2-pygame" ,python2-pygame)
802 ("python2-pillow" ,python2-pillow)
808 #:phases (modify-phases %standard-phases
813 (lambda* (#:key inputs outputs #:allow-other-keys)
814 ;; There's no 'setup.py' so install things manually.
815 (let* ((out (assoc-ref outputs "out"))
816 (bin (string-append out "/bin"))
817 (man1 (string-append out "/share/man/man1"))
818 (sdl (assoc-ref inputs "sdl"))
819 (xpdf (assoc-ref inputs "xpdf")))
821 (copy-file "impressive.py"
822 (string-append bin "/impressive"))
823 (wrap-program (string-append bin "/impressive")
824 `("LIBRARY_PATH" ":" prefix ;for ctypes
825 (,(string-append sdl "/lib")))
826 `("PATH" ":" prefix ;for pdftoppm
827 (,(string-append xpdf "/bin"))))
828 (install-file "impressive.1" man1)
830 (home-page "http://impressive.sourceforge.net")
831 (synopsis "PDF presentation tool with visual effects")
833 "Impressive is a tool to display PDF files that provides visual effects
834 such as smooth alpha-blended slide transitions. It provides additional tools
835 such as zooming, highlighting an area of the screen, and a tool to navigate
837 (license license:gpl2)))
843 (home-page "https://www.kraxel.org/blog/linux/fbida/")
846 (uri (string-append "https://www.kraxel.org/releases/fbida/"
847 name "-" version ".tar.gz"))
850 "0bw224vb7jh0lrqaf4jgxk48xglvxs674qcpj5y0axyfbh896cfk"))))
851 (build-system gnu-build-system)
854 (modify-phases %standard-phases
855 (add-after 'unpack 'patch-ldconfig
857 (substitute* "mk/Autoconf.mk"
858 (("/sbin/ldconfig -p") "echo lib")) #t))
861 #:make-flags (list "CC=gcc"
862 (string-append "prefix=" (assoc-ref %outputs "out")))))
863 (inputs `(("libjpeg" ,libjpeg)
869 ("imagemagick" ,imagemagick)
872 ("cairo-xcb" ,cairo-xcb)
873 ("freetype" ,freetype)
874 ("fontconfig" ,fontconfig)
877 ("libepoxy" ,libepoxy)
879 ("poppler" ,poppler)))
880 (native-inputs `(("pkg-config" ,pkg-config)))
881 (synopsis "Framebuffer and drm-based image viewer")
883 "fbida contains a few applications for viewing and editing images on
886 (license license:gpl2+)))
888 (define-public pdf2svg
895 (url "https://github.com/dawbarton/pdf2svg.git")
896 (commit (string-append "v" version))))
897 (file-name (git-file-name name version))
900 "14ffdm4y26imq99wjhkrhy9lp33165xci1l5ndwfia8hz53bl02k"))))
901 (build-system gnu-build-system)
904 ("poppler" ,poppler)))
906 `(("pkg-config" ,pkg-config)))
907 (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/")
908 (synopsis "PDF to SVG converter")
909 (description "@command{pdf2svg} is a simple command-line PDF to SVG
910 converter using the Poppler and Cairo libraries.")
911 (license license:gpl2+)))
913 (define-public python-pypdf2
915 (name "python-pypdf2")
919 (uri (pypi-uri "PyPDF2" version))
922 "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
923 (build-system python-build-system)
926 (modify-phases %standard-phases
928 'unpack 'patch-test-suite
930 ;; The text-file needs to be opened in binary mode for Python 3,
931 ;; so patch in the "b"
932 (substitute* "Tests/tests.py"
933 (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line)
934 (string-append line "b")))
938 (invoke "python" "-m" "unittest" "Tests.tests"))))))
939 (home-page "http://mstamy2.github.com/PyPDF2")
940 (synopsis "Pure Python PDF toolkit")
941 (description "PyPDF2 is a pure Python PDF library capable of:
944 @item extracting document information (title, author, …)
945 @item splitting documents page by page
946 @item merging documents page by page
948 @item merging multiple pages into a single page
949 @item encrypting and decrypting PDF files
952 By being pure Python, it should run on any Python platform without any
953 dependencies on external libraries. It can also work entirely on
954 @code{StringIO} objects rather than file streams, allowing for PDF
955 manipulation in memory. It is therefore a useful tool for websites that
956 manage or manipulate PDFs.")
957 (license license:bsd-3)))
959 (define-public python2-pypdf2
960 (package-with-python2 python-pypdf2))
962 (define-public python2-pypdf
964 (name "python2-pypdf")
968 (uri (pypi-uri "pyPdf" version))
971 "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
972 (build-system python-build-system)
974 `(#:tests? #f ; no tests
976 (home-page "http://pybrary.net/pyPdf/")
977 (synopsis "Pure Python PDF toolkit")
978 (description "PyPDF2 is a pure Python PDF toolkit.
980 Note: This module isn't maintained anymore. For new projects please use
981 python-pypdf2 instead.")
982 (license license:bsd-3)))
984 (define-public pdfposter
990 (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
993 "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
994 (build-system python-build-system)
996 `(#:tests? #f ; no test suite, only for visual control
999 ;; pdfposter 0.6.0 still uses the old pyPdf
1000 `(("python2-pypdf" ,python2-pypdf)))
1001 (home-page "https://pythonhosted.org/pdftools.pdfposter/")
1002 (synopsis "Scale and tile PDF images/pages to print on multiple pages")
1003 (description "@command{pdfposter} can be used to create a large poster by
1004 building it from multple pages and/or printing it on large media. It expects
1005 as input a PDF file, normally printing on a single page. The output is again
1006 a PDF file, maybe containing multiple pages together building the poster. The
1007 input page will be scaled to obtain the desired size.
1009 This is much like @command{poster} does for Postscript files, but working with
1010 PDF. Since sometimes @command{poster} does not like your files converted from
1011 PDF. Indeed @command{pdfposter} was inspired by @command{poster}.")
1012 (license license:gpl3+)))
1014 (define-public pdfgrep
1021 (uri (string-append "https://pdfgrep.org/download/"
1022 name "-" version ".tar.gz"))
1025 "1fia10djcxxl7n9jw2prargw4yzbykk6izig2443ycj9syhxrwqf"))))
1026 (build-system gnu-build-system)
1028 `(("pkg-config" ,pkg-config)))
1030 `(("libgcrypt" ,libgcrypt)
1032 ("poppler" ,poppler)))
1033 (home-page "https://pdfgrep.org")
1034 (synopsis "Command-line utility to search text in PDF files")
1036 "Pdfgrep searches in pdf files for strings matching a regular expression.
1037 Support some GNU grep options as file name output, page number output,
1038 optional case insensitivity, count occurrences, color highlights and search in
1040 (license license:gpl2+)))
1042 (define-public pdfpc
1050 (url "https://github.com/pdfpc/pdfpc.git")
1051 (commit (string-append "v" version))))
1052 (file-name (git-file-name name version))
1055 "1rmsrpf5vlqhnyyrhq8apndny88ld2qvfjx6258653pqbimv7mx5"))))
1056 (build-system cmake-build-system)
1057 (arguments '(#:tests? #f)) ; no test target
1061 ("gstreamer" ,gstreamer)
1062 ("gst-plugins-base" ,gst-plugins-base)
1064 ("poppler" ,poppler)
1068 `(("pkg-config" ,pkg-config)))
1069 (home-page "https://pdfpc.github.io/")
1070 (synopsis "Presenter console with multi-monitor support for PDF files")
1072 "pdfpc is a presentation viewer application which uses multi-monitor
1073 output to provide meta information to the speaker during the presentation. It
1074 is able to show a normal presentation window on one screen, while showing a
1075 more sophisticated overview on the other one providing information like a
1076 picture of the next slide, as well as the left over time till the end of the
1077 presentation. The input files processed by pdfpc are PDF documents.")
1078 (license license:gpl2+)))
1081 (let ((commit "37e6ca1cd96d751bbbff5539d795c90d657289a5")
1085 ;; The last release was in 2015, but since then there have been security
1087 (version (git-version "0.7.0" revision commit))
1092 (url "https://github.com/dov/paps.git")
1094 (file-name (git-file-name name version))
1097 "1ilcyjqdynxsd2p8dnn8h4592dwf531x9pbkxa1w09hkcdn7hgwc"))))
1098 (build-system gnu-build-system)
1101 (modify-phases %standard-phases
1102 (add-after 'unpack 'do-not-run-configure-script-during-bootstrap
1104 (substitute* "autogen.sh"
1105 (("^./configure") "#"))
1108 `(("pango" ,pango)))
1110 `(("autoconf" ,autoconf)
1111 ("automake" ,automake)
1112 ("gettext" ,gettext-minimal)
1113 ("glib" ,glib "bin")
1114 ("intltool" ,intltool)
1115 ("pkg-config" ,pkg-config)))
1116 (home-page "https://github.com/dov/paps")
1117 (synopsis "Pango to PostScript converter")
1119 "Paps reads a UTF-8 encoded file and generates a PostScript language
1120 rendering of the file. The rendering is done by creating outline curves
1121 through the Pango @code{ft2} backend.")
1122 (license license:lgpl2.0+))))