gnu: dpkg: Update to 1.20.9.
[jackhill/guix/guix.git] / gnu / packages / pdf.scm
CommitLineData
135eb524 1;;; GNU Guix --- Functional package management for GNU
8e755b1b 2;;; Copyright © 2013, 2015, 2016 Andreas Enge <andreas@enge.fr>
8befb33d 3;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
a773f141 4;;; Copyright © 2014, 2015, 2016, 2018, 2019 Ricardo Wurmus <rekado@elephly.net>
3e40bb82 5;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org>
f22debac 6;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
3c986a7d 7;;; Copyright © 2016 Nikita <nikita@n0.is>
2d8270ad 8;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner <efraim@flashner.co.il>
82862153 9;;; Copyright © 2016, 2017 Marius Bakke <mbakke@fastmail.com>
8b438f85 10;;; Copyright © 2016, 2017, 2019 Ludovic Courtès <ludo@gnu.org>
82862153 11;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
667c004c 12;;; Copyright © 2016, 2019 Arun Isaac <arunisaac@systemreboot.net>
6d161406 13;;; Copyright © 2017, 2018 Leo Famulari <leo@famulari.name>
92ae98e2 14;;; Copyright © 2017 Alex Vong <alexvong1995@gmail.com>
7da4dbb3 15;;; Copyright © 2017, 2018 Rene Saavedra <pacoon@protonmail.com>
df50d2a0 16;;; Copyright © 2017–2021 Tobias Geerinckx-Rice <me@tobias.gr>
a42cb6f1 17;;; Copyright © 2019 Alex Griffin <a@ajgrf.com>
0cd4a746 18;;; Copyright © 2019 Ben Sturmfels <ben@sturm.com.au>
e34b06b7 19;;; Copyright © 2019,2020 Hartmut Goebel <h.goebel@crazy-compilers.com>
1a4f1ea1 20;;; Copyright © 2020, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
2266f162 21;;; Copyright © 2020 Michael Rohleder <mike@rohleder.de>
cbcd520e 22;;; Copyright © 2020 Timotej Lazar <timotej.lazar@araneo.si>
c601e2bf 23;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
135eb524
AE
24;;;
25;;; This file is part of GNU Guix.
26;;;
27;;; GNU Guix is free software; you can redistribute it and/or modify it
28;;; under the terms of the GNU General Public License as published by
29;;; the Free Software Foundation; either version 3 of the License, or (at
30;;; your option) any later version.
31;;;
32;;; GNU Guix is distributed in the hope that it will be useful, but
33;;; WITHOUT ANY WARRANTY; without even the implied warranty of
34;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35;;; GNU General Public License for more details.
36;;;
37;;; You should have received a copy of the GNU General Public License
38;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
39
40(define-module (gnu packages pdf)
b5b73a82 41 #:use-module ((guix licenses) #:prefix license:)
135eb524
AE
42 #:use-module (guix packages)
43 #:use-module (guix download)
e2ec95c4 44 #:use-module (guix git-download)
ab1c2319 45 #:use-module (guix utils)
135eb524 46 #:use-module (guix build-system gnu)
0f28ee34 47 #:use-module (guix build-system cmake)
eb6a5dab 48 #:use-module (guix build-system meson)
3efb57ea 49 #:use-module (guix build-system python)
cbcd520e 50 #:use-module (guix build-system qt)
8d4169a1 51 #:use-module (guix build-system trivial)
135eb524 52 #:use-module (gnu packages)
ebbd30ff 53 #:use-module (gnu packages audio)
aae8ba47 54 #:use-module (gnu packages autotools)
31f248fa 55 #:use-module (gnu packages backup)
8d4169a1
LC
56 #:use-module (gnu packages base)
57 #:use-module (gnu packages bash)
ac847543 58 #:use-module (gnu packages check)
135eb524 59 #:use-module (gnu packages compression)
cbcd520e 60 #:use-module (gnu packages cups)
31f248fa 61 #:use-module (gnu packages curl)
bac31d1f 62 #:use-module (gnu packages djvu)
c601e2bf 63 #:use-module (gnu packages fonts)
31f248fa
EF
64 #:use-module (gnu packages fontutils)
65 #:use-module (gnu packages game-development)
ebbd30ff 66 #:use-module (gnu packages gcc)
3e40bb82 67 #:use-module (gnu packages gettext)
31f248fa 68 #:use-module (gnu packages ghostscript)
f3e22216 69 #:use-module (gnu packages gl)
8db824ba 70 #:use-module (gnu packages glib)
31f248fa
EF
71 #:use-module (gnu packages gnome)
72 #:use-module (gnu packages gnupg)
e2ec95c4 73 #:use-module (gnu packages gstreamer)
8db824ba 74 #:use-module (gnu packages gtk)
31f248fa 75 #:use-module (gnu packages image)
1650cf92 76 #:use-module (gnu packages javascript)
31f248fa 77 #:use-module (gnu packages lesstif)
77e0cebc 78 #:use-module (gnu packages libffi)
31f248fa 79 #:use-module (gnu packages linux)
0f28ee34 80 #:use-module (gnu packages lua)
765f0ac8
RW
81 #:use-module (gnu packages pcre)
82 #:use-module (gnu packages perl)
31f248fa
EF
83 #:use-module (gnu packages photo)
84 #:use-module (gnu packages pkg-config)
ebbd30ff 85 #:use-module (gnu packages pulseaudio)
3fa2dc27 86 #:use-module (gnu packages python)
77e0cebc
HG
87 #:use-module (gnu packages python-check)
88 #:use-module (gnu packages python-web)
44d10b1f 89 #:use-module (gnu packages python-xyz)
31f248fa 90 #:use-module (gnu packages qt)
8d4169a1 91 #:use-module (gnu packages sdl)
9d0c291e 92 #:use-module (gnu packages sphinx)
cd0322a3 93 #:use-module (gnu packages sqlite)
ebbd30ff 94 #:use-module (gnu packages tex)
1a4f1ea1 95 #:use-module (gnu packages time)
6d80e264 96 #:use-module (gnu packages tcl)
cc2b77df 97 #:use-module (gnu packages tls)
c5427f01 98 #:use-module (gnu packages web)
31f248fa 99 #:use-module (gnu packages xdisorg)
ebbd30ff 100 #:use-module (gnu packages xml)
31f248fa 101 #:use-module (gnu packages xorg)
8db824ba 102 #:use-module (srfi srfi-1))
135eb524 103
b9650f7f
NG
104(define-public extractpdfmark
105 (package
106 (name "extractpdfmark")
107 (version "1.1.0")
108 (source
109 (origin
110 (method git-fetch)
111 (uri (git-reference
112 (url "https://github.com/trueroad/extractpdfmark")
113 (commit (string-append "v" version))))
114 (file-name (git-file-name name version))
115 (sha256
116 (base32 "14aa6zly53j8gx5d32caiabk2j4b102xha0v9149yahz6kbn5b80"))))
117 (build-system gnu-build-system)
118 (arguments
119 `(#:phases
120 (modify-phases %standard-phases
121 (add-before 'check 'start-xorg-server
122 ;; The test suite wants to write to /homeless-shelter
123 (lambda _ (setenv "HOME" (getcwd)))))))
124 (native-inputs
125 `(("autoconf" ,autoconf)
126 ("automake" ,automake)
127 ("gettext" ,gettext-minimal)
128 ("ghostscript" ,ghostscript)
129 ("pkg-config" ,pkg-config)
130 ("texlive" ,texlive-tiny)))
131 (inputs
132 `(("poppler" ,poppler)))
133 (home-page "https://github.com/trueroad/extractpdfmark")
134 (synopsis "Extract page mode and named destinations as PDFmark from PDF")
135 (description
136 "PDFmarks is a technique that accompanies PDF, and that is used to store
137metadata such as author or title, but also structural information such as
138bookmarks or hyperlinks.
139
140When Ghostscript reads the main PDF generated by the TeX system with embedded
141PDF files and outputs the final PDF, the PDF page mode and name targets
142etc. are not preserved. Therefore, when you open the final PDF, it is not
143displayed correctly. Also, remote PDF links do not work correctly.
144
145This program is able to extract the page mode and named targets as PDFmark
146from PDF. In this way, you can obtain embedded PDF files that have kept this
147information.")
148 (license license:gpl3)))
149
e34b06b7
HG
150(define-public flyer-composer
151 (package
152 (name "flyer-composer")
153 (version "1.0rc2")
154 (source
155 (origin
156 (method url-fetch)
157 (uri (pypi-uri "flyer-composer" version))
158 (sha256
159 (base32 "17igqb5dlcgcq4nimjw6cf9qgz6a728zdx1d0rr90r2z0llcchsv"))))
160 (build-system python-build-system)
161 (arguments
162 `(#:tests? #f ;; TODO
163 #:phases
164 (modify-phases %standard-phases
165 (add-after 'install 'wrap-executable
166 (lambda* (#:key inputs outputs #:allow-other-keys)
167 (let* ((out (assoc-ref outputs "out"))
168 (qtbase (assoc-ref inputs "qtbase"))
169 (qml "/lib/qt5/qml"))
170 (wrap-program (string-append out "/bin/flyer-composer-gui")
171 `("QT_PLUGIN_PATH" ":" =
172 (,(string-append qtbase "/lib/qt5/plugins")))
173 `("QT_QPA_PLATFORM_PLUGIN_PATH" ":" =
174 (,(string-append qtbase "/lib/qt5/plugins/platforms"))))
175 #t))))))
176 (inputs
177 `(("python-pypdf2" ,python-pypdf2)
178 ("python-pyqt" ,python-pyqt)
179 ("python-poppler-qt5" ,python-poppler-qt5)
180 ("qtbase" ,qtbase)))
181 (home-page "http://crazy-compilers.com/flyer-composer")
182 (synopsis "Rearrange PDF pages to print as flyers on one sheet")
183 (description "@command{flyer-composer} can be used to prepare one- or
184two-sided flyers for printing on one sheet of paper.
185
186Imagine you have designed a flyer in A6 format and want to print it using your
187A4 printer. Of course, you want to print four flyers on each sheet. This is
188where Flyer Composer steps in, creating a PDF which holds your flyer four
189times. If you have a second page, Flyer Composer can arrange it the same way
190- even if the second page is in a separate PDF file.
191
f5dd283c 192This package contains both the command line tool and the gui too.")
e34b06b7
HG
193 (license license:agpl3+)))
194
8f83699b
HG
195(define-public flyer-composer-cli
196 (package/inherit flyer-composer
197 (name "flyer-composer-cli")
198 (arguments
199 `(#:tests? #f ;; TODO
200 #:phases
201 (modify-phases %standard-phases
202 (add-after 'unpack 'remove-gui
203 (lambda _
204 (delete-file-recursively "flyer_composer/gui")
205 (substitute* "setup.cfg"
206 (("^\\s+flyer-composer-gui\\s*=.*") ""))
207 #t)))))
208 (inputs
209 `(("python-pypdf2" ,python-pypdf2)))
210 (description "@command{flyer-composer} can be used to prepare one- or
211two-sided flyers for printing on one sheet of paper.
212
213Imagine you have designed a flyer in A6 format and want to print it using your
214A4 printer. Of course, you want to print four flyers on each sheet. This is
215where Flyer Composer steps in, creating a PDF which holds your flyer four
216times. If you have a second page, Flyer Composer can arrange it the same way
217- even if the second page is in a separate PDF file.
218
e0e873a9 219This package contains only the command line tool. If you like to use the gui,
8f83699b
HG
220please install the @code{flyer-composer-gui} package.")))
221
135eb524
AE
222(define-public poppler
223 (package
224 (name "poppler")
a7924ba9 225 (version "0.86.1")
135eb524
AE
226 (source (origin
227 (method url-fetch)
5cc3096c 228 (uri (string-append "https://poppler.freedesktop.org/poppler-"
8befb33d 229 version ".tar.xz"))
6983ba56
SB
230 (sha256
231 (base32
a7924ba9 232 "0v3z4mk1rr8i0c4cfkab7pnxdbil30j4cm4w6cqlq6cfghkhlqxg"))))
1b821701 233 (build-system cmake-build-system)
6983ba56 234 ;; FIXME:
a25fe6d6 235 ;; use libcurl: no
135eb524
AE
236 (inputs `(("fontconfig" ,fontconfig)
237 ("freetype" ,freetype)
1abe0554 238 ("libjpeg" ,libjpeg-turbo)
a25fe6d6 239 ("libpng" ,libpng)
135eb524 240 ("libtiff" ,libtiff)
927d4d9b 241 ("lcms" ,lcms)
301804d6 242 ("openjpeg" ,openjpeg)
8db824ba
LC
243 ("zlib" ,zlib)
244
245 ;; To build poppler-glib (as needed by Evince), we need Cairo and
246 ;; GLib. But of course, that Cairo must not depend on Poppler.
e21e0aff 247 ("cairo" ,cairo-sans-poppler)))
eb637c64
MB
248 (propagated-inputs
249 ;; As per poppler-cairo and poppler-glib.pc.
250 ;; XXX: Ideally we'd propagate Cairo too, but that would require a
251 ;; different solution to the circular dependency mentioned above.
252 `(("glib" ,glib)))
c4c4cc05 253 (native-inputs
426adbe8 254 `(("pkg-config" ,pkg-config)
6983ba56
SB
255 ("glib" ,glib "bin") ; glib-mkenums, etc.
256 ("gobject-introspection" ,gobject-introspection)))
135eb524
AE
257 (arguments
258 `(#:tests? #f ; no test data provided with the tarball
a25fe6d6 259 #:configure-flags
1b821701
MB
260 (let* ((out (assoc-ref %outputs "out"))
261 (lib (string-append out "/lib")))
9df39750 262 (list "-DENABLE_UNSTABLE_API_ABI_HEADERS=ON" ;to install header files
1b821701
MB
263 "-DENABLE_ZLIB=ON"
264 (string-append "-DCMAKE_INSTALL_LIBDIR=" lib)
265 (string-append "-DCMAKE_INSTALL_RPATH=" lib)))))
35b9e423 266 (synopsis "PDF rendering library")
135eb524
AE
267 (description
268 "Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
14ecc0ef 269 (license license:gpl2+)
5f8fc5e3 270 (home-page "https://poppler.freedesktop.org/")))
14ecc0ef 271
6d161406
LF
272(define-public poppler-data
273 (package
274 (name "poppler-data")
2c1023b3 275 (version "0.4.10")
6d161406
LF
276 (source (origin
277 (method url-fetch)
278 (uri (string-append "https://poppler.freedesktop.org/poppler-data"
279 "-" version ".tar.gz"))
280 (sha256
281 (base32
2c1023b3 282 "0c3vjs3p7rjc4yfacnhd865r27czmzwcr4j2z4jldi68dvvcwbvf"))))
6d161406
LF
283 (build-system gnu-build-system)
284 (arguments
2c1023b3 285 '(#:tests? #f ; no test suite
6d161406
LF
286 #:make-flags (list (string-append "prefix=" (assoc-ref %outputs "out")))
287 #:phases
288 (modify-phases %standard-phases
289 ;; The package only provides some data files, so there is nothing to
290 ;; build.
291 (delete 'configure)
292 (delete 'build))))
293 (synopsis "Poppler encoding files for rendering of CJK and Cyrillic text")
294 (description "This package provides optional encoding files for Poppler.
295When present, Poppler is able to correctly render CJK and Cyrillic text.")
296 (home-page (package-home-page poppler))
297 ;; See COPYING in the source distribution for more information about
298 ;; the licensing.
299 (license (list license:bsd-3
300 license:gpl2))))
301
f22debac 302(define-public poppler-qt5
021bf6af 303 (package/inherit poppler
f22debac 304 (name "poppler-qt5")
13297861 305 (inputs `(("qtbase" ,qtbase)
f22debac
RJ
306 ,@(package-inputs poppler)))
307 (synopsis "Qt5 frontend for the Poppler PDF rendering library")))
308
99bcae94
RW
309(define-public python-poppler-qt5
310 (package
311 (name "python-poppler-qt5")
02f664a0 312 (version "21.1.0")
99bcae94
RW
313 (source
314 (origin
315 (method url-fetch)
316 (uri (pypi-uri "python-poppler-qt5" version))
317 (sha256
318 (base32
02f664a0 319 "0b82gm4i75q5v19kfbq0h4y0b2vcwr2213zkhxh6l0h45kdndmxd"))))
99bcae94
RW
320 (build-system python-build-system)
321 (arguments
322 `(;; There are no tests. The check phase just causes a rebuild.
323 #:tests? #f
324 #:phases
325 (modify-phases %standard-phases
326 (replace 'build
327 (lambda* (#:key inputs #:allow-other-keys)
328 (substitute* "setup.py"
329 ;; This check always fails, so disable it.
330 (("if not check_qtxml\\(\\)")
0fe041bd 331 "if True"))
99bcae94
RW
332 ;; We need to pass an extra flag here. This cannot be in
333 ;; configure-flags because it should not be passed for the
334 ;; installation phase.
335 ((@@ (guix build python-build-system) call-setuppy)
336 "build_ext" (list (string-append "--pyqt-sip-dir="
337 (assoc-ref inputs "python-pyqt")
338 "/share/sip")) #t))))))
339 (native-inputs
340 `(("pkg-config" ,pkg-config)))
341 (inputs
c990604c 342 `(("python-sip" ,python-sip-4)
99bcae94
RW
343 ("python-pyqt" ,python-pyqt)
344 ("poppler-qt5" ,poppler-qt5)
345 ("qtbase" ,qtbase)))
e85af137 346 (home-page "https://pypi.org/project/python-poppler-qt5/")
99bcae94
RW
347 (synopsis "Python bindings for Poppler-Qt5")
348 (description
349 "This package provides Python bindings for the Qt5 interface of the
350Poppler PDF rendering library.")
351 (license license:lgpl2.1+)))
352
aae8ba47
RW
353(define-public libharu
354 (package
355 (name "libharu")
356 (version "2.3.0")
357 (source (origin
2b2ab39c
RW
358 (method git-fetch)
359 (uri (git-reference
b0e7b699 360 (url "https://github.com/libharu/libharu")
2b2ab39c
RW
361 (commit (string-append
362 "RELEASE_"
363 (string-join (string-split version #\.) "_")))))
364 (file-name (git-file-name name version))
aae8ba47
RW
365 (sha256
366 (base32
2b2ab39c 367 "15s9hswnl3qqi7yh29jyrg0hma2n99haxznvcywmsp8kjqlyg75q"))))
aae8ba47
RW
368 (build-system gnu-build-system)
369 (arguments
370 `(#:configure-flags
371 (list (string-append "--with-zlib="
372 (assoc-ref %build-inputs "zlib"))
373 (string-append "--with-png="
6f3dd09f 374 (assoc-ref %build-inputs "libpng")))))
aae8ba47
RW
375 (inputs
376 `(("zlib" ,zlib)
377 ("libpng" ,libpng)))
378 (native-inputs
379 `(("autoconf" ,autoconf)
380 ("automake" ,automake)
381 ("libtool" ,libtool)))
382 (home-page "http://libharu.org/")
383 (synopsis "Library for generating PDF files")
384 (description
385 "libHaru is a library for generating PDF files. libHaru does not support
386reading and editing of existing PDF files.")
387 (license license:zlib)))
388
14ecc0ef
AE
389(define-public xpdf
390 (package
391 (name "xpdf")
35089dca 392 (version "4.03")
04761fcc
TGR
393 (source
394 (origin
395 (method url-fetch)
35089dca 396 (uri (string-append "https://dl.xpdfreader.com/xpdf-" version ".tar.gz"))
04761fcc 397 (sha256
35089dca
VL
398 (base32 "0ip81c9vy0igjnasl9iv2lz214fb01vvvdzbvjmgwc63fi1jgr0g"))))
399 (build-system cmake-build-system)
400 (inputs `(("cups" ,cups)
401 ("freetype" ,freetype)
f410c110 402 ("libpng" ,libpng)
35089dca 403 ("qtbase" ,qtbase)
01eafd38 404 ("zlib" ,zlib)))
14ecc0ef 405 (arguments
35089dca 406 `(#:tests? #f)) ; there is no check target
9e771e3b 407 (synopsis "Viewer for PDF files based on the Motif toolkit")
14ecc0ef 408 (description
e881752c 409 "Xpdf is a viewer for Portable Document Format (PDF) files.")
04761fcc 410 (license license:gpl3) ; or gpl2, but not gpl2+
9900eb1c 411 (home-page "https://www.xpdfreader.com/")))
0f28ee34 412
b3886e0c
PW
413(define-public zathura-cb
414 (package
415 (name "zathura-cb")
02fcc6f2 416 (version "0.1.8")
b3886e0c
PW
417 (source (origin
418 (method url-fetch)
419 (uri
420 (string-append "https://pwmt.org/projects/zathura-cb/download/zathura-cb-"
02fcc6f2 421 version ".tar.xz"))
b3886e0c
PW
422 (sha256
423 (base32
02fcc6f2 424 "1i6cf0vks501cggwvfsl6qb7mdaf3sszdymphimfvnspw810faj5"))))
b3886e0c 425 (native-inputs `(("pkg-config" ,pkg-config)))
b3886e0c 426 (inputs `(("libarchive" ,libarchive)
b3886e0c 427 ("zathura" ,zathura)))
02fcc6f2 428 (build-system meson-build-system)
b3886e0c 429 (arguments
02fcc6f2 430 `(#:tests? #f ; package does not contain tests
b3886e0c 431 #:phases
02fcc6f2
TGR
432 (modify-phases %standard-phases
433 (add-after 'unpack 'patch-plugin-directory
434 ;; Something of a regression in 0.1.8: the new Meson build system
435 ;; now hard-codes an incorrect plugin directory. Fix it.
436 (lambda* (#:key outputs #:allow-other-keys)
437 (substitute* "meson.build"
438 (("(install_dir:).*" _ key)
439 (string-append key
440 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
441 #t)))))
b3886e0c
PW
442 (home-page "https://pwmt.org/projects/zathura-cb/")
443 (synopsis "Comic book support for zathura (libarchive backend)")
444 (description "The zathura-cb plugin adds comic book support to zathura
445using libarchive.")
446 (license license:zlib)))
447
721a4f7d
PW
448(define-public zathura-ps
449 (package
450 (name "zathura-ps")
06dbfb5d 451 (version "0.2.6")
721a4f7d
PW
452 (source (origin
453 (method url-fetch)
454 (uri
455 (string-append "https://pwmt.org/projects/zathura-ps/download/zathura-ps-"
06dbfb5d 456 version ".tar.xz"))
721a4f7d
PW
457 (sha256
458 (base32
06dbfb5d 459 "0wygq89nyjrjnsq7vbpidqdsirjm6iq4w2rijzwpk2f83ys8bc3y"))))
721a4f7d 460 (native-inputs `(("pkg-config" ,pkg-config)))
721a4f7d 461 (inputs `(("libspectre" ,libspectre)
721a4f7d 462 ("zathura" ,zathura)))
06dbfb5d 463 (build-system meson-build-system)
721a4f7d 464 (arguments
06dbfb5d 465 `(#:tests? #f ; package does not contain tests
721a4f7d 466 #:phases
06dbfb5d
TGR
467 (modify-phases %standard-phases
468 (add-after 'unpack 'patch-plugin-directory
469 ;; Something of a regression in 0.2.6: the new Meson build system
470 ;; now hard-codes an incorrect plugin directory. Fix it.
471 (lambda* (#:key outputs #:allow-other-keys)
472 (substitute* "meson.build"
473 (("(install_dir:).*" _ key)
474 (string-append key
475 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
476 #t)))))
721a4f7d
PW
477 (home-page "https://pwmt.org/projects/zathura-ps/")
478 (synopsis "PS support for zathura (libspectre backend)")
479 (description "The zathura-ps plugin adds PS support to zathura
480using libspectre.")
481 (license license:zlib)))
482
bac31d1f
PW
483(define-public zathura-djvu
484 (package
485 (name "zathura-djvu")
8b5185c6 486 (version "0.2.9")
bac31d1f
PW
487 (source (origin
488 (method url-fetch)
489 (uri
490 (string-append "https://pwmt.org/projects/zathura-djvu/download/zathura-djvu-"
7d475dd4 491 version ".tar.xz"))
bac31d1f
PW
492 (sha256
493 (base32
8b5185c6 494 "0062n236414db7q7pnn3ccg5111ghxj3407pn9ri08skxskgirln"))))
bac31d1f 495 (native-inputs `(("pkg-config" ,pkg-config)))
bac31d1f
PW
496 (inputs
497 `(("djvulibre" ,djvulibre)
bac31d1f 498 ("zathura" ,zathura)))
7d475dd4 499 (build-system meson-build-system)
bac31d1f 500 (arguments
7d475dd4 501 `(#:tests? #f ; package does not contain tests
bac31d1f 502 #:phases
7d475dd4
TGR
503 (modify-phases %standard-phases
504 (add-after 'unpack 'patch-plugin-directory
505 ;; Something of a regression in 0.2.8: the new Meson build system
506 ;; now hard-codes an incorrect plugin directory. Fix it.
507 (lambda* (#:key outputs #:allow-other-keys)
508 (substitute* "meson.build"
509 (("(install_dir:).*" _ key)
510 (string-append key
511 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
512 #t)))))
bac31d1f
PW
513 (home-page "https://pwmt.org/projects/zathura-djvu/")
514 (synopsis "DjVu support for zathura (DjVuLibre backend)")
515 (description "The zathura-djvu plugin adds DjVu support to zathura
516using the DjVuLibre library.")
517 (license license:zlib)))
518
43dc47fa
MB
519(define-public zathura-pdf-mupdf
520 (package
521 (name "zathura-pdf-mupdf")
17210f51 522 (version "0.3.6")
43dc47fa
MB
523 (source (origin
524 (method url-fetch)
525 (uri
526 (string-append "https://pwmt.org/projects/zathura-pdf-mupdf"
aac2006d 527 "/download/zathura-pdf-mupdf-" version ".tar.xz"))
43dc47fa
MB
528 (sha256
529 (base32
17210f51 530 "1r3v37k9fl2rxipvacgxr36llywvy7n20a25h3ajlyk70697sa66"))))
43dc47fa 531 (native-inputs `(("pkg-config" ,pkg-config)))
43dc47fa 532 (inputs
3bbd6469 533 `(("jbig2dec" ,jbig2dec)
4bd428a7 534 ("libjpeg" ,libjpeg-turbo)
b42b5afd 535 ("mujs" ,mujs)
43dc47fa
MB
536 ("mupdf" ,mupdf)
537 ("openjpeg" ,openjpeg)
538 ("openssl" ,openssl)
539 ("zathura" ,zathura)))
aac2006d 540 (build-system meson-build-system)
43dc47fa 541 (arguments
aac2006d 542 `(#:tests? #f ; package does not contain tests
a6f2afee
EF
543 #:configure-flags (list (string-append "-Dplugindir="
544 (assoc-ref %outputs "out")
7b046b1b
SB
545 "/lib/zathura")
546 "-Dlink-external=true")
547 #:phases
548 (modify-phases %standard-phases
8b6ce47c
TGR
549 (add-after 'unpack 'remove-libmupdfthird.a-requirement
550 (lambda _
551 ;; Ignore a missing (apparently superfluous) static library.
552 (substitute* "meson.build"
553 ((".*mupdfthird.*") ""))
554 #t))
7b046b1b
SB
555 (add-before 'configure 'add-mujs-to-dependencies
556 (lambda _
557 ;; Add mujs to the 'build_dependencies'.
558 (substitute* "meson.build"
559 (("^ libopenjp2 = dependency.*" x)
560 (string-append x " mujs = cc.find_library('mujs')\n"))
561 (("^ libopenjp2")
562 " libopenjp2, mujs")))))))
43dc47fa
MB
563 (home-page "https://pwmt.org/projects/zathura-pdf-mupdf/")
564 (synopsis "PDF support for zathura (mupdf backend)")
565 (description "The zathura-pdf-mupdf plugin adds PDF support to zathura
566by using the @code{mupdf} rendering library.")
567 (license license:zlib)))
568
7708557f
PW
569(define-public zathura-pdf-poppler
570 (package
571 (name "zathura-pdf-poppler")
13d87223 572 (version "0.3.0")
7708557f
PW
573 (source (origin
574 (method url-fetch)
575 (uri
576 (string-append "https://pwmt.org/projects/zathura-pdf-poppler/download/zathura-pdf-poppler-"
0ed99053 577 version ".tar.xz"))
7708557f
PW
578 (sha256
579 (base32
13d87223 580 "1vfl4vkyy3rf39r1sqaa7y8113bgkh2bkfq3nn2inis9mrykmk6m"))))
7708557f 581 (native-inputs `(("pkg-config" ,pkg-config)))
7708557f
PW
582 (inputs
583 `(("poppler" ,poppler)
3bbd6469 584 ("zathura" ,zathura)))
0ed99053 585 (build-system meson-build-system)
7708557f 586 (arguments
0ed99053 587 `(#:tests? #f ; package does not include tests
7708557f 588 #:phases
0ed99053
TGR
589 (modify-phases %standard-phases
590 (add-after 'unpack 'patch-plugin-directory
591 ;; Something of a regression in 0.2.9: the new Meson build system
592 ;; now hard-codes an incorrect plugin directory. Fix it.
593 (lambda* (#:key outputs #:allow-other-keys)
594 (substitute* "meson.build"
595 (("(install_dir:).*" _ key)
596 (string-append key
597 "'" (assoc-ref outputs "out") "/lib/zathura'\n")))
598 #t)))))
7708557f
PW
599 (home-page "https://pwmt.org/projects/zathura-pdf-poppler/")
600 (synopsis "PDF support for zathura (poppler backend)")
601 (description "The zathura-pdf-poppler plugin adds PDF support to zathura
602by using the poppler rendering engine.")
603 (license license:zlib)))
604
3e40bb82
PW
605(define-public zathura
606 (package
607 (name "zathura")
2266f162 608 (version "0.4.7")
3e40bb82
PW
609 (source (origin
610 (method url-fetch)
611 (uri
612 (string-append "https://pwmt.org/projects/zathura/download/zathura-"
eb6a5dab 613 version ".tar.xz"))
3e40bb82
PW
614 (sha256
615 (base32
2266f162 616 "1rx1fk9s556fk59lmqgvhwrmv71ashh89bx9adjq46wq5gzdn4p0"))))
3e40bb82 617 (native-inputs `(("pkg-config" ,pkg-config)
f2984d70 618 ("gettext" ,gettext-minimal)
ac847543
MB
619 ("glib:bin" ,glib "bin")
620
eb6a5dab
TGR
621 ;; For building documentation.
622 ("python-sphinx" ,python-sphinx)
623
a42cb6f1
AG
624 ;; For building icons.
625 ("librsvg" ,librsvg)
626
ac847543
MB
627 ;; For tests.
628 ("check" ,check)
60ecc10f 629 ("xorg-server" ,xorg-server-for-tests)))
1d9032fc
MB
630 (inputs `(("sqlite" ,sqlite)))
631 ;; Listed in 'Requires.private' of 'zathura.pc'.
632 (propagated-inputs `(("cairo" ,cairo)
633 ("girara" ,girara)))
3e40bb82
PW
634 (native-search-paths
635 (list (search-path-specification
6bd8ba61 636 (variable "ZATHURA_PLUGINS_PATH")
3e40bb82 637 (files '("lib/zathura")))))
eb6a5dab 638 (build-system meson-build-system)
3e40bb82 639 (arguments
eb6a5dab 640 `(#:phases (modify-phases %standard-phases
ac847543
MB
641 (add-before 'check 'start-xserver
642 ;; Tests require a running X server.
643 (lambda* (#:key inputs #:allow-other-keys)
644 (let ((xorg-server (assoc-ref inputs "xorg-server"))
645 (display ":1"))
646 (setenv "DISPLAY" display)
f0eba502
MB
647
648 ;; On busy machines, tests may take longer than
649 ;; the default of four seconds.
650 (setenv "CK_DEFAULT_TIMEOUT" "20")
651
ac847543
MB
652 ;; Don't fail due to missing '/etc/machine-id'.
653 (setenv "DBUS_FATAL_WARNINGS" "0")
654 (zero? (system (string-append xorg-server "/bin/Xvfb "
655 display " &")))))))))
3e40bb82
PW
656 (home-page "https://pwmt.org/projects/zathura/")
657 (synopsis "Lightweight keyboard-driven PDF viewer")
658 (description "Zathura is a customizable document viewer. It provides a
659minimalistic interface and an interface that mainly focuses on keyboard
660interaction.")
661 (license license:zlib)))
662
0f28ee34
LC
663(define-public podofo
664 (package
665 (name "podofo")
df50d2a0 666 (version "0.9.7")
0f28ee34
LC
667 (source (origin
668 (method url-fetch)
de67e922
LF
669 (uri (string-append "mirror://sourceforge/podofo/podofo/" version
670 "/podofo-" version ".tar.gz"))
0f28ee34
LC
671 (sha256
672 (base32
df50d2a0 673 "1f0yvkx6nf99fp741w2y706d8bs9824x1z2gqm3rdy5fv8bfgwkw"))))
0f28ee34 674 (build-system cmake-build-system)
22f00388
EF
675 (native-inputs
676 `(("cppunit" ,cppunit)
677 ("pkg-config" ,pkg-config)))
678 (inputs
4bd428a7 679 `(("libjpeg" ,libjpeg-turbo)
0f28ee34 680 ("libtiff" ,libtiff)
22f00388 681 ("fontconfig" ,fontconfig)
0f28ee34 682 ("freetype" ,freetype)
22f00388
EF
683 ("libpng" ,libpng)
684 ("lua" ,lua-5.1)
685 ("openssl" ,openssl)
0f28ee34 686 ("zlib" ,zlib)))
cb6a14ba 687 (arguments
81537055
TGR
688 `(#:configure-flags
689 (list "-DPODOFO_BUILD_SHARED=ON")
dde70926 690 #:phases
dc1d3cde
KK
691 (modify-phases %standard-phases
692 (add-before 'configure 'patch
693 (lambda* (#:key inputs #:allow-other-keys)
694 (let ((freetype (assoc-ref inputs "freetype")))
695 ;; Look for freetype include files in the correct place.
696 (substitute* "cmake/modules/FindFREETYPE.cmake"
697 (("/usr/local") freetype)))
698 #t)))))
0f28ee34
LC
699 (home-page "http://podofo.sourceforge.net")
700 (synopsis "Tools to work with the PDF file format")
701 (description
702 "PoDoFo is a C++ library and set of command-line tools to work with the
703PDF file format. It can parse PDF files and load them into memory, and makes
704it easy to modify them and write the changes to disk. It is primarily useful
705for applications that wish to do lower level manipulation of PDF, such as
706extracting content or merging files.")
707 (license license:lgpl2.0+)))
c0b390ed
MB
708
709(define-public mupdf
710 (package
711 (name "mupdf")
c5427f01 712 (version "1.18.0")
c0b390ed 713 (source
089f9be4
TGR
714 (origin
715 (method url-fetch)
716 (uri (string-append "https://mupdf.com/downloads/archive/"
717 "mupdf-" version "-source.tar.xz"))
718 (sha256
719 (base32 "16m5sksil22sshxy70xkslsb2qhvcqb1d95i9savnhds1xn4ybar"))
6891f957
KK
720 (patches (search-patches "mupdf-fix-linkage.patch"
721 "mupdf-CVE-2021-3407.patch"))
089f9be4
TGR
722 (modules '((guix build utils)))
723 (snippet
724 '(begin
725 ;; Remove bundled software.
726 (let* ((keep (list "lcms2")) ; different from our lcms2 package
727 (from "thirdparty")
728 (kept (string-append from "~temp")))
729 (mkdir-p kept)
730 (for-each (lambda (file) (rename-file (string-append from "/" file)
731 (string-append kept "/" file)))
732 keep)
733 (delete-file-recursively from)
734 (rename-file kept from))
735 #t))))
c0b390ed
MB
736 (build-system gnu-build-system)
737 (inputs
738 `(("curl" ,curl)
dab2542f 739 ("freeglut" ,freeglut)
c0b390ed 740 ("freetype" ,freetype)
c5427f01 741 ("gumbo-parser" ,gumbo-parser)
c41d97be 742 ("harfbuzz" ,harfbuzz)
c0b390ed 743 ("jbig2dec" ,jbig2dec)
4bd428a7 744 ("libjpeg" ,libjpeg-turbo)
c0b390ed
MB
745 ("libx11" ,libx11)
746 ("libxext" ,libxext)
1650cf92 747 ("mujs" ,mujs)
c41d97be 748 ("openjpeg" ,openjpeg)
c0b390ed
MB
749 ("openssl" ,openssl)
750 ("zlib" ,zlib)))
751 (native-inputs
752 `(("pkg-config" ,pkg-config)))
753 (arguments
6c1c5fec 754 `(#:tests? #f ; no check target
43ac6f59
TGR
755 #:make-flags (list "verbose=yes"
756 (string-append "CC=" ,(cc-for-target))
8e755b1b 757 "XCFLAGS=-fpic"
b1435fe7
EF
758 "USE_SYSTEM_LIBS=yes"
759 "USE_SYSTEM_MUJS=yes"
8b6ce47c
TGR
760 "shared=yes"
761 ;; Even with the linkage patch we must fix RUNPATH.
762 (string-append "LDFLAGS=-Wl,-rpath="
763 (assoc-ref %outputs "out") "/lib")
8e755b1b
AE
764 (string-append "prefix=" (assoc-ref %outputs "out")))
765 #:phases (modify-phases %standard-phases
c5427f01 766 (delete 'configure)))) ; no configure script
76379dca 767 (home-page "https://mupdf.com")
2274b816 768 (synopsis "Lightweight PDF viewer and toolkit")
c0b390ed
MB
769 (description
770 "MuPDF is a C library that implements a PDF and XPS parsing and
771rendering engine. It is used primarily to render pages into bitmaps,
772but also provides support for other operations such as searching and
773listing the table of contents and hyperlinks.
774
775The library ships with a rudimentary X11 viewer, and a set of command
7e0d513f
EF
776line tools for batch rendering @command{pdfdraw}, rewriting files
777@command{pdfclean}, and examining the file structure @command{pdfshow}.")
e726f093
EF
778 (license (list license:agpl3+
779 license:bsd-3 ; resources/cmaps
780 license:x11 ; thirdparty/lcms2
781 license:silofl1.1 ; resources/fonts/{han,noto,sil,urw}
782 license:asl2.0)))) ; resources/fonts/droid
765f0ac8
RW
783
784(define-public qpdf
785 (package
786 (name "qpdf")
44c95fa6 787 (version "10.0.1")
765f0ac8
RW
788 (source (origin
789 (method url-fetch)
de67e922
LF
790 (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
791 "/qpdf-" version ".tar.gz"))
8337cb21
EF
792 (sha256
793 (base32
44c95fa6 794 "0yw2cpw7ygfd6jlgpwbi8vsnvv9p55zxp9h17x77z2qq733pf8jx"))))
765f0ac8
RW
795 (build-system gnu-build-system)
796 (arguments
503409b5 797 `(#:disallowed-references (,perl)
0adfe0cc
EF
798 #:phases
799 (modify-phases %standard-phases
800 (add-before 'configure 'patch-paths
801 (lambda _
802 (substitute* "make/libtool.mk"
803 (("SHELL=/bin/bash")
804 (string-append "SHELL=" (which "bash"))))
805 (substitute* (append
806 '("qtest/bin/qtest-driver")
807 (find-files "." "\\.test"))
b5e53019
MW
808 (("/usr/bin/env") (which "env")))
809 #t)))))
765f0ac8 810 (native-inputs
503409b5
LC
811 `(("pkg-config" ,pkg-config)
812 ("perl" ,perl)))
765f0ac8 813 (propagated-inputs
e9a9298b
MB
814 ;; In Requires.private of libqpdf.pc.
815 `(("libjpeg-turbo" ,libjpeg-turbo)
816 ("zlib" ,zlib)))
765f0ac8
RW
817 (synopsis "Command-line tools and library for transforming PDF files")
818 (description
819 "QPDF is a command-line program that does structural, content-preserving
820transformations on PDF files. It could have been called something like
821pdf-to-pdf. It includes support for merging and splitting PDFs and to
822manipulate the list of pages in a PDF file. It is not a PDF viewer or a
823program capable of converting PDF into other formats.")
e9a9298b
MB
824 ;; Prior to the 7.0 release, QPDF was licensed under Artistic 2.0.
825 ;; Users can still choose to use the old license at their option.
826 (license (list license:asl2.0 license:clarified-artistic))
765f0ac8 827 (home-page "http://qpdf.sourceforge.net/")))
7ad608e4 828
cbcd520e
TL
829(define-public qpdfview
830 (package
831 (name "qpdfview")
832 (version "0.4.18")
833 (source
834 (origin
835 (method url-fetch)
836 (uri (string-append "https://launchpad.net/qpdfview/"
837 "trunk/" version "/+download/"
838 "qpdfview-" version ".tar.gz"))
839 (sha256
1e9f6677
TL
840 (base32 "0v1rl126hvblajnph2hkansgi0s8vjdc5yxrm4y3faa0lxzjwr6c"))
841 (patches (search-patches "qpdfview-qt515-compat.patch"))))
cbcd520e
TL
842 (build-system gnu-build-system)
843 (native-inputs
844 `(("pkg-config" ,pkg-config)))
845 (inputs
846 `(("cups" ,cups)
847 ("djvulibre" ,djvulibre)
848 ("libspectre" ,libspectre)
849 ("poppler-qt5" ,poppler-qt5)
850 ("qtbase" ,qtbase)
851 ("qtsvg" ,qtsvg)))
852 (arguments
853 `(#:imported-modules ((guix build qt-build-system)
854 (guix build cmake-build-system)
855 ,@%gnu-build-system-modules)
856 #:modules ((guix build utils)
857 (guix build gnu-build-system)
858 ((guix build qt-build-system) #:prefix qt:))
859 #:phases
860 (modify-phases %standard-phases
861 (replace 'configure
862 (lambda _
863 (substitute* "qpdfview.pri"
864 (("/usr") (assoc-ref %outputs "out")))
865 (invoke "qmake" "qpdfview.pro")))
866 ;; Otherwise, the user interface will not display any icons.
867 (add-after 'install 'qt-wrap
868 (assoc-ref qt:%standard-phases 'qt-wrap)))))
869 (home-page "https://launchpad.net/qpdfview")
870 (synopsis "Tabbed document viewer")
871 (description "@command{qpdfview} is a document viewer for PDF, PS and DJVU
872files. It uses the Qt toolkit and features persistent per-file settings,
873configurable toolbars and shortcuts, continuous and multi‐page layouts,
874SyncTeX support, and rudimentary support for annotations and forms.")
875 (license license:gpl2+)))
876
7ad608e4
RW
877(define-public xournal
878 (package
879 (name "xournal")
d0e888c3 880 (version "0.4.8.2016")
7ad608e4
RW
881 (source
882 (origin
883 (method url-fetch)
de67e922
LF
884 (uri (string-append "mirror://sourceforge/xournal/xournal/" version
885 "/xournal-" version ".tar.gz"))
7ad608e4
RW
886 (sha256
887 (base32
d0e888c3 888 "09i88v3wacmx7f96dmq0l3afpyv95lh6jrx16xzm0jd1szdrhn5j"))))
7ad608e4
RW
889 (build-system gnu-build-system)
890 (inputs
891 `(("gtk" ,gtk+-2)
892 ("pango" ,pango)
893 ("poppler" ,poppler)
894 ("glib" ,glib)
895 ("libgnomecanvas" ,libgnomecanvas)))
896 (native-inputs
897 `(("pkg-config" ,pkg-config)))
898 (home-page "http://xournal.sourceforge.net/")
899 (synopsis "Notetaking using a stylus")
900 (description
901 "Xournal is an application for notetaking, sketching, keeping a journal
902using a stylus.")
903 (license license:gpl2+)))
3fa2dc27 904
ebbd30ff
NG
905(define-public xournalpp
906 (package
907 (name "xournalpp")
78e93c26 908 (version "1.0.20")
ebbd30ff
NG
909 (source
910 (origin
911 (method git-fetch)
912 (uri (git-reference
b0e7b699 913 (url "https://github.com/xournalpp/xournalpp")
ebbd30ff
NG
914 (commit version)))
915 (file-name (git-file-name name version))
916 (sha256
78e93c26 917 (base32 "1c7n03xm3m4lwcwxgplkn25i8c6s3i7rijbkcx86br1j4jadcs3k"))))
ebbd30ff
NG
918 (build-system cmake-build-system)
919 (arguments
920 `(#:configure-flags (list "-DENABLE_CPPUNIT=ON") ;enable tests
921 #:imported-modules ((guix build glib-or-gtk-build-system)
922 ,@%cmake-build-system-modules)
923 #:modules (((guix build glib-or-gtk-build-system) #:prefix glib-or-gtk:)
924 (guix build cmake-build-system)
925 (guix build utils))
926 #:phases
927 (modify-phases %standard-phases
928 (add-after 'unpack 'fix-permissions-on-po-files
929 (lambda _
ebbd30ff
NG
930 ;; Make sure 'msgmerge' can modify the PO files.
931 (for-each (lambda (po) (chmod po #o666))
932 (find-files "." "\\.po$"))
933 #t))
226bb934
LDB
934 ;; Fix path to addr2line utility, which the crash reporter uses.
935 (add-after 'unpack 'fix-paths
936 (lambda* (#:key inputs #:allow-other-keys)
937 (substitute* "src/util/Stacktrace.cpp"
938 ;; Match only the commandline.
939 (("\"addr2line ")
940 (string-append "\"" (which "addr2line") " ")))
941 #t))
ebbd30ff
NG
942 (add-after 'install 'glib-or-gtk-wrap
943 (assoc-ref glib-or-gtk:%standard-phases 'glib-or-gtk-wrap)))))
944 (native-inputs
945 `(("cppunit" ,cppunit)
ebbd30ff
NG
946 ("gettext" ,gettext-minimal)
947 ("pkg-config" ,pkg-config)))
948 (inputs
949 `(("alsa-lib" ,alsa-lib)
950 ("glib" ,glib)
951 ("gtk+" ,gtk+)
952 ("libsndfile" ,libsndfile)
953 ("libxml2" ,libxml2)
954 ("libzip" ,libzip)
955 ("lua" ,lua) ;FIXME: It cannot find the Lua library.
956 ("poppler" ,poppler)
957 ("portaudio" ,portaudio)
958 ("texlive-bin" ,texlive-bin)))
959 (home-page "https://github.com/xournalpp/xournalpp")
960 (synopsis "Handwriting notetaking software with PDF annotation support")
961 (description "Xournal++ is a hand note taking software written in
962C++ with the target of flexibility, functionality and speed. Stroke
963recognizer and other parts are based on Xournal code.
964
965Xournal++ features:
966
967@itemize
968@item Support for Pen pressure, e.g., Wacom Tablet
969@item Support for annotating PDFs
970@item Fill shape functionality
971@item PDF Export (with and without paper style)
972@item PNG Export (with and without transparent background)
971b57d2 973@item Map different tools / colors etc. to stylus buttons /
ebbd30ff
NG
974mouse buttons
975@item Sidebar with Page Previews with advanced page sorting, PDF
976Bookmarks and Layers (can be individually hidden, editing layer can be
977selected)
978@item enhanced support for image insertion
979@item Eraser with multiple configurations
980@item LaTeX support
981@item bug reporting, autosave, and auto backup tools
982@item Customizeable toolbar, with multiple configurations, e.g., to
983optimize toolbar for portrait / landscape
984@item Page Template definitions
985@item Shape drawing (line, arrow, circle, rectangle)
986@item Shape resizing and rotation
987@item Rotation snapping every 45 degrees
988@item Rect snapping to grid
989@item Audio recording and playback alongside with handwritten notes
990@item Multi Language Support, Like English, German, Italian...
991@item Plugins using LUA Scripting
992@end itemize")
993 (license license:gpl2+)))
994
3fa2dc27
MB
995(define-public python-reportlab
996 (package
997 (name "python-reportlab")
e56ab46b 998 (version "3.5.42")
3fa2dc27
MB
999 (source (origin
1000 (method url-fetch)
1001 (uri (pypi-uri "reportlab" version))
1002 (sha256
1003 (base32
e56ab46b 1004 "0i17qgm7gzy7pzp240mkpsx9rn8rr67jh5npp5bylv3sd41g48cw"))))
3fa2dc27 1005 (build-system python-build-system)
9e378e6a 1006 (arguments
2d8270ad
EF
1007 '(;; FIXME: There is one test failure, building the pdf manual from source,
1008 ;; but it does not cause the build to fail.
1009 #:test-target "tests"
1010 #:configure-flags (list "--use-system-libart")
1011 #:phases
1012 (modify-phases %standard-phases
1013 (add-after 'unpack 'find-libraries
1014 (lambda* (#:key inputs #:allow-other-keys)
1015 (let ((libart (assoc-ref inputs "libart-lgpl"))
1016 (freetype (assoc-ref inputs "freetype"))
1017 (dlt1 (assoc-ref inputs "font-curve-files")))
1018 (substitute* "setup.py"
1019 (("/usr/include/libart-\\*")
1020 (string-append libart "/include/libart-2.0"))
1021 (("/usr/include/freetype2")
1022 (string-append freetype "/include"))
1023 (("http://www.reportlab.com/ftp/pfbfer-20180109.zip")
1024 (string-append "file://" dlt1)))
1025 #t))))))
ab61ce37 1026 (inputs
2d8270ad
EF
1027 `(("freetype" ,freetype)
1028 ("libart-lgpl" ,libart-lgpl)
1029 ("font-curve-files"
1030 ,(origin
1031 (method url-fetch)
1032 (uri "http://www.reportlab.com/ftp/pfbfer-20180109.zip")
1033 (sha256
1034 (base32
1035 "1v0gy4mbx02ys96ssx89420y0njknlrxs2bx64bv4rp8a0al66w5"))))))
3fa2dc27
MB
1036 (propagated-inputs
1037 `(("python-pillow" ,python-pillow)))
16c76cc4 1038 (home-page "https://www.reportlab.com")
3fa2dc27
MB
1039 (synopsis "Python library for generating PDFs and graphics")
1040 (description "This is the ReportLab PDF Toolkit. It allows rapid creation
1041of rich PDF documents, and also creation of charts in a variety of bitmap and
1042vector formats.")
d8013ee2 1043 (license license:bsd-3)))
3fa2dc27
MB
1044
1045(define-public python2-reportlab
d8013ee2 1046 (package-with-python2 python-reportlab))
8d4169a1
LC
1047
1048(define-public impressive
1049 (package
1050 (name "impressive")
7f0bccb5 1051 (version "0.12.1")
8d4169a1
LC
1052 (source (origin
1053 (method url-fetch)
1054 (uri (string-append
1055 "mirror://sourceforge/impressive/Impressive/"
1056 version "/Impressive-" version ".tar.gz"))
1057 (sha256
1058 (base32
7f0bccb5 1059 "1r7ihv41awnlnlry1kymb8fka053wdhzibfwcarn78rr3vs338vl"))))
8d4169a1
LC
1060 (build-system python-build-system)
1061
1062 ;; TODO: Add dependency on pdftk.
ed9b09e4 1063 (inputs `(("python2-pygame" ,python2-pygame)
8d4169a1
LC
1064 ("python2-pillow" ,python2-pillow)
1065 ("sdl" ,sdl)
1066 ("xpdf" ,xpdf)))
1067
1068 (arguments
1069 `(#:python ,python-2
1070 #:phases (modify-phases %standard-phases
1071 (delete 'build)
1072 (delete 'configure)
1073 (delete 'check)
1074 (replace 'install
1075 (lambda* (#:key inputs outputs #:allow-other-keys)
1076 ;; There's no 'setup.py' so install things manually.
1077 (let* ((out (assoc-ref outputs "out"))
1078 (bin (string-append out "/bin"))
1079 (man1 (string-append out "/share/man/man1"))
1080 (sdl (assoc-ref inputs "sdl"))
1081 (xpdf (assoc-ref inputs "xpdf")))
1082 (mkdir-p bin)
1083 (copy-file "impressive.py"
1084 (string-append bin "/impressive"))
1085 (wrap-program (string-append bin "/impressive")
1086 `("LIBRARY_PATH" ":" prefix ;for ctypes
1087 (,(string-append sdl "/lib")))
1088 `("PATH" ":" prefix ;for pdftoppm
1089 (,(string-append xpdf "/bin"))))
8d4169a1
LC
1090 (install-file "impressive.1" man1)
1091 #t))))))
1092 (home-page "http://impressive.sourceforge.net")
1093 (synopsis "PDF presentation tool with visual effects")
1094 (description
1095 "Impressive is a tool to display PDF files that provides visual effects
1096such as smooth alpha-blended slide transitions. It provides additional tools
1097such as zooming, highlighting an area of the screen, and a tool to navigate
1098the PDF pages.")
1099 (license license:gpl2)))
f3e22216 1100
6d80e264
NG
1101(define-public img2pdf
1102 (package
1103 (name "img2pdf")
1104 (version "0.4.0")
1105 (source
1106 (origin
1107 (method url-fetch)
1108 (uri (pypi-uri "img2pdf" version))
1109 (sha256
1110 (base32 "1jdhmpzgj8815bhargb3xp3ydlqxwkz0mcadrflx2ga0p056kvpa"))))
1111 (build-system python-build-system)
1112 (propagated-inputs
1113 `(("python-pikepdf" ,python-pikepdf)
1114 ("python-pillow" ,python-pillow)
1115 ("python-tkinter" ,python "tk")))
1116 (home-page "https://gitlab.mister-muffin.de/josch/img2pdf")
1117 (synopsis "Convert images to PDF via direct JPEG inclusion")
1118 (description
1119 "img2pdf converts images to PDF via direct JPEG inclusion. That
1120conversion is lossless: the image embedded in the PDF has the exact same color
1121information for every pixel as the input.")
1122 (license license:lgpl3)))
1123
f3e22216
JL
1124(define-public fbida
1125 (package
1126 (name "fbida")
b3e5cb4c 1127 (version "2.14")
f3e22216
JL
1128 (home-page "https://www.kraxel.org/blog/linux/fbida/")
1129 (source (origin
1130 (method url-fetch)
1131 (uri (string-append "https://www.kraxel.org/releases/fbida/"
91d42be7 1132 "fbida-" version ".tar.gz"))
f3e22216
JL
1133 (sha256
1134 (base32
b3e5cb4c 1135 "0f242mix20rgsqz1llibhsz4r2pbvx6k32rmky0zjvnbaqaw1dwm"))))
f3e22216
JL
1136 (build-system gnu-build-system)
1137 (arguments
dc1d3cde
KK
1138 '(#:phases
1139 (modify-phases %standard-phases
b3e5cb4c 1140 (add-after 'unpack 'patch-FHS-file-names
dc1d3cde
KK
1141 (lambda _
1142 (substitute* "mk/Autoconf.mk"
b3e5cb4c 1143 (("/bin/echo") "echo")
dc1d3cde
KK
1144 (("/sbin/ldconfig -p") "echo lib")) #t))
1145 (delete 'configure))
f3e22216
JL
1146 #:tests? #f
1147 #:make-flags (list "CC=gcc"
1148 (string-append "prefix=" (assoc-ref %outputs "out")))))
4bd428a7 1149 (inputs `(("libjpeg" ,libjpeg-turbo)
f3e22216
JL
1150 ("curl" ,curl)
1151 ("libtiff" ,libtiff)
1152 ("libudev" ,eudev)
1153 ("libwebp" ,libwebp)
1154 ("libdrm" ,libdrm)
f3e22216
JL
1155 ("giflib" ,giflib)
1156 ("glib" ,glib)
1157 ("cairo-xcb" ,cairo-xcb)
1158 ("freetype" ,freetype)
1159 ("fontconfig" ,fontconfig)
1160 ("libexif" ,libexif)
1161 ("mesa" ,mesa)
1162 ("libepoxy" ,libepoxy)
1163 ("libpng" ,libpng)
1164 ("poppler" ,poppler)))
1165 (native-inputs `(("pkg-config" ,pkg-config)))
1166 (synopsis "Framebuffer and drm-based image viewer")
1167 (description
1168 "fbida contains a few applications for viewing and editing images on
1169the framebuffer.")
1170
1171 (license license:gpl2+)))
5d68e9d6
AI
1172
1173(define-public pdf2svg
1174 (package
1175 (name "pdf2svg")
1176 (version "0.2.3")
1177 (source (origin
1300dc4b
RW
1178 (method git-fetch)
1179 (uri (git-reference
b0e7b699 1180 (url "https://github.com/dawbarton/pdf2svg")
1300dc4b
RW
1181 (commit (string-append "v" version))))
1182 (file-name (git-file-name name version))
5d68e9d6
AI
1183 (sha256
1184 (base32
1300dc4b 1185 "14ffdm4y26imq99wjhkrhy9lp33165xci1l5ndwfia8hz53bl02k"))))
5d68e9d6
AI
1186 (build-system gnu-build-system)
1187 (inputs
1188 `(("cairo" ,cairo)
1189 ("poppler" ,poppler)))
1190 (native-inputs
1191 `(("pkg-config" ,pkg-config)))
1192 (home-page "http://www.cityinthesky.co.uk/opensource/pdf2svg/")
1193 (synopsis "PDF to SVG converter")
1194 (description "@command{pdf2svg} is a simple command-line PDF to SVG
1195converter using the Poppler and Cairo libraries.")
1196 (license license:gpl2+)))
ad5a7d49
HG
1197
1198(define-public python-pypdf2
1199 (package
1200 (name "python-pypdf2")
1201 (version "1.26.0")
1202 (source (origin
1203 (method url-fetch)
1204 (uri (pypi-uri "PyPDF2" version))
1205 (sha256
1206 (base32
1207 "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
1208 (build-system python-build-system)
1209 (arguments
1210 `(#:phases
1211 (modify-phases %standard-phases
1212 (add-after
1213 'unpack 'patch-test-suite
1214 (lambda _
1215 ;; The text-file needs to be opened in binary mode for Python 3,
1216 ;; so patch in the "b"
1217 (substitute* "Tests/tests.py"
1218 (("pdftext_file = open\\(.* 'crazyones.txt'\\), 'r" line)
1219 (string-append line "b")))
1220 #t))
1221 (replace 'check
1222 (lambda _
60b88466 1223 (invoke "python" "-m" "unittest" "Tests.tests"))))))
ad5a7d49
HG
1224 (home-page "http://mstamy2.github.com/PyPDF2")
1225 (synopsis "Pure Python PDF toolkit")
1226 (description "PyPDF2 is a pure Python PDF library capable of:
1227
1228@enumerate
1229@item extracting document information (title, author, …)
1230@item splitting documents page by page
1231@item merging documents page by page
1232@item cropping pages
1233@item merging multiple pages into a single page
1234@item encrypting and decrypting PDF files
1235@end enumerate
1236
1237By being pure Python, it should run on any Python platform without any
1238dependencies on external libraries. It can also work entirely on
1239@code{StringIO} objects rather than file streams, allowing for PDF
1240manipulation in memory. It is therefore a useful tool for websites that
1241manage or manipulate PDFs.")
1242 (license license:bsd-3)))
1243
1244(define-public python2-pypdf2
1245 (package-with-python2 python-pypdf2))
c68e8591
HG
1246
1247(define-public python2-pypdf
1248 (package
1249 (name "python2-pypdf")
1250 (version "1.13")
1251 (source (origin
1252 (method url-fetch)
1253 (uri (pypi-uri "pyPdf" version))
1254 (sha256
1255 (base32
1256 "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
1257 (build-system python-build-system)
1258 (arguments
1259 `(#:tests? #f ; no tests
1260 #:python ,python-2))
1261 (home-page "http://pybrary.net/pyPdf/")
1262 (synopsis "Pure Python PDF toolkit")
1263 (description "PyPDF2 is a pure Python PDF toolkit.
1264
1265Note: This module isn't maintained anymore. For new projects please use
1266python-pypdf2 instead.")
1267 (license license:bsd-3)))
99abcdbd 1268
0cd4a746
BS
1269(define-public pdfarranger
1270 (package
1271 (name "pdfarranger")
2babf7d8 1272 (version "1.7.1")
0cd4a746
BS
1273 (source
1274 (origin
1275 (method git-fetch)
1276 (uri (git-reference
b0e7b699 1277 (url "https://github.com/jeromerobert/pdfarranger")
0cd4a746
BS
1278 (commit version)))
1279 (file-name (git-file-name name version))
1280 (sha256
2babf7d8 1281 (base32 "1c2mafnz8pv32wzkc2wx4q8y2x7xffpn6ag12dj7ga5n772fb6s3"))))
0cd4a746
BS
1282 (build-system python-build-system)
1283 (arguments
1a4f1ea1 1284 '(#:tests? #f ;no tests
8b438f85
LC
1285 #:phases (modify-phases %standard-phases
1286 (add-after 'install 'wrap-for-typelib
1287 (lambda* (#:key inputs outputs #:allow-other-keys)
1288 (let* ((out (assoc-ref outputs "out"))
1289 (program (string-append out "/bin/pdfarranger")))
1290 (wrap-program program
1291 `("GI_TYPELIB_PATH" ":" prefix
1292 (,(getenv "GI_TYPELIB_PATH"))))
1293 #t))))))
0cd4a746
BS
1294 (native-inputs
1295 `(("intltool" ,intltool)
1296 ("python-distutils-extra" ,python-distutils-extra)))
f63b8978 1297 (inputs
0cd4a746 1298 `(("gtk+" ,gtk+)
f63b8978
NG
1299 ("poppler" ,poppler)))
1300 (propagated-inputs
1301 `(("img2pdf" ,img2pdf)
1a4f1ea1
NG
1302 ("python-dateutil" ,python-dateutil)
1303 ("python-pikepdf" ,python-pikepdf)
0cd4a746 1304 ("python-pycairo" ,python-pycairo)
1a4f1ea1 1305 ("python-pygobject" ,python-pygobject)))
0cd4a746
BS
1306 (home-page "https://github.com/jeromerobert/pdfarranger")
1307 (synopsis "Merge, split and re-arrange pages from PDF documents")
1308 (description
1309 "PDF Arranger is a small application which allows one to merge or split
1310PDF documents and rotate, crop and rearrange their pages using an interactive
1311and intuitive graphical interface.
1312
1313PDF Arranger was formerly known as PDF-Shuffler.")
1314 (license license:gpl3+)))
1315
99abcdbd
HG
1316(define-public pdfposter
1317 (package
1318 (name "pdfposter")
60ba9d8c 1319 (version "0.7.post1")
99abcdbd
HG
1320 (source (origin
1321 (method url-fetch)
60ba9d8c 1322 (uri (pypi-uri "pdftools.pdfposter" version))
99abcdbd
HG
1323 (sha256
1324 (base32
60ba9d8c 1325 "0c1avpbr9q53yzq5ar2x485rmp9d0l3z27aham32bg7gplzd7w0j"))))
99abcdbd
HG
1326 (build-system python-build-system)
1327 (arguments
60ba9d8c 1328 `(#:tests? #f)) ; test-suite not included in source archive
99abcdbd 1329 (inputs
60ba9d8c 1330 `(("python-pypdf2" ,python-pypdf2)))
99abcdbd
HG
1331 (home-page "https://pythonhosted.org/pdftools.pdfposter/")
1332 (synopsis "Scale and tile PDF images/pages to print on multiple pages")
1333 (description "@command{pdfposter} can be used to create a large poster by
d6901d93 1334building it from multiple pages and/or printing it on large media. It expects
99abcdbd
HG
1335as input a PDF file, normally printing on a single page. The output is again
1336a PDF file, maybe containing multiple pages together building the poster. The
1337input page will be scaled to obtain the desired size.
1338
1339This is much like @command{poster} does for Postscript files, but working with
1340PDF. Since sometimes @command{poster} does not like your files converted from
1341PDF. Indeed @command{pdfposter} was inspired by @command{poster}.")
1342 (license license:gpl3+)))
e05fc441
RS
1343
1344(define-public pdfgrep
1345 (package
1346 (name "pdfgrep")
7da4dbb3 1347 (version "2.1.2")
e05fc441
RS
1348 (source
1349 (origin
1350 (method url-fetch)
1351 (uri (string-append "https://pdfgrep.org/download/"
1352 name "-" version ".tar.gz"))
1353 (sha256
1354 (base32
7da4dbb3 1355 "1fia10djcxxl7n9jw2prargw4yzbykk6izig2443ycj9syhxrwqf"))))
e05fc441
RS
1356 (build-system gnu-build-system)
1357 (native-inputs
1358 `(("pkg-config" ,pkg-config)))
1359 (inputs
1360 `(("libgcrypt" ,libgcrypt)
1361 ("pcre" ,pcre)
1362 ("poppler" ,poppler)))
1363 (home-page "https://pdfgrep.org")
1364 (synopsis "Command-line utility to search text in PDF files")
1365 (description
1366 "Pdfgrep searches in pdf files for strings matching a regular expression.
1367Support some GNU grep options as file name output, page number output,
1368optional case insensitivity, count occurrences, color highlights and search in
1369multiple files.")
1370 (license license:gpl2+)))
e2ec95c4
RW
1371
1372(define-public pdfpc
1373 (package
1374 (name "pdfpc")
7661f82d 1375 (version "4.4.1")
e2ec95c4
RW
1376 (source
1377 (origin
1378 (method git-fetch)
1379 (uri (git-reference
b0e7b699 1380 (url "https://github.com/pdfpc/pdfpc")
e2ec95c4
RW
1381 (commit (string-append "v" version))))
1382 (file-name (git-file-name name version))
1383 (sha256
7661f82d 1384 (base32 "11n925c5jj3yfwnqkgxzqrmsrpqh8ls1g4idmqqzpsanpam1xvna"))))
e2ec95c4
RW
1385 (build-system cmake-build-system)
1386 (arguments '(#:tests? #f)) ; no test target
1387 (inputs
1388 `(("cairo" ,cairo)
1389 ("gtk+" ,gtk+)
1390 ("gstreamer" ,gstreamer)
1391 ("gst-plugins-base" ,gst-plugins-base)
1392 ("libgee" ,libgee)
1393 ("poppler" ,poppler)
1394 ("pango" ,pango)
1395 ("vala" ,vala)))
1396 (native-inputs
1397 `(("pkg-config" ,pkg-config)))
1398 (home-page "https://pdfpc.github.io/")
1399 (synopsis "Presenter console with multi-monitor support for PDF files")
1400 (description
1401 "pdfpc is a presentation viewer application which uses multi-monitor
1402output to provide meta information to the speaker during the presentation. It
1403is able to show a normal presentation window on one screen, while showing a
1404more sophisticated overview on the other one providing information like a
1405picture of the next slide, as well as the left over time till the end of the
1406presentation. The input files processed by pdfpc are PDF documents.")
1407 (license license:gpl2+)))
a773f141
RW
1408
1409(define-public paps
a26b73b6
TGR
1410 (package
1411 (name "paps")
1412 (version "0.7.1")
1413 (source
1414 (origin
1415 (method url-fetch)
1416 (uri (string-append "https://github.com/dov/paps/releases/download/v"
1417 version "/paps-" version ".tar.gz"))
1418 (sha256
1419 (base32 "1z1w1fg2bvb8p92n1jlpqp3n9mq42szb2mqhh4xqmmnmfcdkpi9s"))))
1420 (build-system gnu-build-system)
1421 (inputs
1422 `(("pango" ,pango)))
1423 (native-inputs
1424 `(("intltool" ,intltool)
1425 ("pkg-config" ,pkg-config)))
1426 (home-page "https://github.com/dov/paps")
1427 (synopsis "Pango to PostScript converter")
1428 (description
1429 "Paps reads a UTF-8 encoded file and generates a PostScript language
6fdd40b3 1430rendering of the file through the Pango Cairo back end.")
a26b73b6 1431 (license license:lgpl2.0+)))
667c004c
AI
1432
1433(define-public stapler
1434 (package
1435 (name "stapler")
09dfb0c4 1436 (version "1.0.0")
667c004c
AI
1437 (source
1438 (origin
09dfb0c4
KK
1439 (method url-fetch)
1440 (uri (pypi-uri "stapler" version))
667c004c
AI
1441 (sha256
1442 (base32
09dfb0c4 1443 "0b2lbm3f79cdxcsagwhzihbzwahjabxqmbws0c8ki25gpdnygdd7"))))
667c004c 1444 (build-system python-build-system)
667c004c 1445 (arguments
09dfb0c4 1446 '(#:phases
667c004c 1447 (modify-phases %standard-phases
09dfb0c4 1448 (add-after 'unpack 'fix-more-itertools-version-requirement
667c004c 1449 (lambda _
09dfb0c4
KK
1450 ;; Tests require an version of the more-itertools module older
1451 ;; than the one we have packaged.
667c004c 1452 (substitute* "setup.py"
09dfb0c4 1453 (("more-itertools>=2\\.2,<6\\.0\\.0") "more-itertools>=2.2"))
667c004c 1454 #t)))))
09dfb0c4
KK
1455 (propagated-inputs
1456 `(("python-more-itertools" ,python-more-itertools)
1457 ("python-pypdf2" ,python-pypdf2)))
667c004c
AI
1458 (home-page "https://github.com/hellerbarde/stapler")
1459 (synopsis "PDF manipulation tool")
1460 (description "Stapler is a pure Python alternative to PDFtk, a tool for
1461manipulating PDF documents from the command line. It supports
1462
1463@itemize
1464@item cherry-picking pages and concatenating them into a new file
1465@item splitting a PDF document into single pages each in its own file
1466@item merging PDF documents with their pages interleaved
1467@item displaying metadata in a PDF document
1468@item displaying the mapping between logical and physical page numbers
1469@end itemize")
1470 (license license:bsd-3)))
77e0cebc
HG
1471
1472(define-public weasyprint
1473 (package
1474 (name "weasyprint")
c601e2bf 1475 (version "52.1")
77e0cebc
HG
1476 (source
1477 (origin
c601e2bf
MC
1478 (method git-fetch)
1479 (uri (git-reference
1480 (url "https://github.com/FelixSchwarz/WeasyPrint")
1481 (commit (string-append "v" version))))
1482 (file-name (git-file-name name version))
77e0cebc 1483 (sha256
c601e2bf
MC
1484 (base32
1485 "0rcj9yah3bp6bbvkmny3w4csx4l5v49lc7mrk29g0x77qnwswjy7"))))
77e0cebc
HG
1486 (build-system python-build-system)
1487 (arguments
1488 `(#:phases
1489 (modify-phases %standard-phases
1490 (add-after 'unpack 'patch-library-paths
1491 (lambda* (#:key inputs #:allow-other-keys)
1492 (let ((fontconfig (assoc-ref inputs "fontconfig"))
1493 (glib (assoc-ref inputs "glib"))
1494 (pango (assoc-ref inputs "pango"))
1495 (pangoft2 (assoc-ref inputs "pangoft2")))
1496 (substitute* "weasyprint/fonts.py"
c601e2bf
MC
1497 (("'fontconfig'")
1498 (format #f "'~a/lib/libfontconfig.so'" fontconfig))
1499 (("'pangoft2-1.0'")
1500 (format #f "'~a/lib/libpangoft2-1.0.so'" pango)))
77e0cebc 1501 (substitute* "weasyprint/text.py"
c601e2bf
MC
1502 (("'gobject-2.0'")
1503 (format #f "'~a/lib/libgobject-2.0.so'" glib))
1504 (("'pango-1.0'")
1505 (format #f "'~a/lib/libpango-1.0.so'" pango))
1506 (("'pangocairo-1.0'")
1507 (format #f "'~a/lib/libpangocairo-1.0.so'" pango)))
1508 #t)))
1509 (add-after 'unpack 'disable-linters
1510 ;; Their check fails; none of our business.
77e0cebc
HG
1511 (lambda _
1512 (substitute* "setup.cfg"
c601e2bf
MC
1513 ((".*pytest-flake8.*") "")
1514 ((".*pytest-isort.*") "")
1515 (("--flake8") "")
1516 (("--isort") ""))
1517 #t))
1518 (add-before 'check 'register-dejavu-font
1519 (lambda* (#:key inputs #:allow-other-keys)
1520 ;; TODO: fix FreeType so that fonts found in XDG_DATA_DIRS are
1521 ;; honored.
1522 (let* ((HOME "/tmp")
1523 (dejavu (assoc-ref inputs "font-dejavu"))
1524 (fonts-dir (string-append HOME "/.fonts")))
1525 (setenv "HOME" HOME)
1526 (mkdir-p fonts-dir)
1527 (symlink (string-append dejavu "/share/fonts/truetype")
1528 (string-append fonts-dir "/truetype"))
1529 (invoke "fc-cache" "-rv")))))))
77e0cebc
HG
1530 (inputs
1531 `(("fontconfig" ,fontconfig)
1532 ("glib" ,glib)
1533 ("pango" ,pango)))
1534 (propagated-inputs
1535 `(("gdk-pixbuf" ,gdk-pixbuf)
1536 ("python-cairocffi" ,python-cairocffi)
1537 ("python-cairosvg" ,python-cairosvg)
1538 ("python-cffi" ,python-cffi)
1539 ("python-cssselect2" ,python-cssselect2)
1540 ("python-html5lib" ,python-html5lib)
1541 ("python-pyphen" ,python-pyphen)
1542 ("python-tinycss2" ,python-tinycss2)))
1543 (native-inputs
c601e2bf
MC
1544 `(("font-dejavu" ,font-dejavu) ;tests depend on it
1545 ("python-pytest-cov" ,python-pytest-cov)
77e0cebc
HG
1546 ("python-pytest-runner" ,python-pytest-runner)))
1547 (home-page "https://weasyprint.org/")
1548 (synopsis "Document factory for creating PDF files from HTML")
1549 (description "WeasyPrint helps web developers to create PDF documents. It
1550turns simple HTML pages into gorgeous statistical reports, invoices, tickets,
1551etc.
1552
1553From a technical point of view, WeasyPrint is a visual rendering engine for
1554HTML and CSS that can export to PDF and PNG. It aims to support web standards
1555for printing.
1556
1557It is based on various libraries but not on a full rendering engine like
1558WebKit or Gecko. The CSS layout engine is written in Python, designed for
1559pagination, and meant to be easy to hack on. Weasyprint can also be used as a
1560python library.
1561
1562Keywords: html2pdf, htmltopdf")
1563 (license license:bsd-3)))