GNU bug report logs -
#77915
[PATCH 0/2] Add cpdf
Previous Next
To reply to this bug, email your comments to 77915 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#77915
; Package
guix-patches
.
(Sat, 19 Apr 2025 05:38:04 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jussi Timperi <jussi.timperi <at> iki.fi>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Sat, 19 Apr 2025 05:38:04 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Jussi Timperi (2):
gnu: Add ocaml-camlpdf.
gnu: Add cpdf.
gnu/packages/ocaml.scm | 40 ++++++++++++++++++++
gnu/packages/pdf.scm | 85 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 125 insertions(+)
base-commit: a4a7ff0319c622cd08aa7461cc88cc6608fe62cb
--
2.49.0
Information forwarded
to
julien <at> lepiller.eu, pukkamustard <at> posteo.net, guix-patches <at> gnu.org
:
bug#77915
; Package
guix-patches
.
(Sat, 19 Apr 2025 05:45:05 GMT)
Full text and
rfc822 format available.
Message #8 received at 77915 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/ocaml.scm (ocaml-camlpdf): New variable.
Change-Id: I097280bdd16eaf810f83fbca13f615a03e4d6702
---
gnu/packages/ocaml.scm | 40 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index a5632c6ad1..b4813c5049 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -31,6 +31,7 @@
;;; Copyright © 2023, 2024 Foundation Devices, Inc. <hello <at> foundation.xyz>
;;; Copyright © 2023 Arnaud DABY-SEESARAM <ds-ac <at> nanein.fr>
;;; Copyright © 2024 Sören Tempel <soeren <at> soeren-tempel.net>
+;;; Copyright © 2025 Jussi Timperi <jussi.timperi <at> iki.fi>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -659,6 +660,45 @@ (define-public ocaml-extlib
;; With static-linking exception
(license license:lgpl2.1+)))
+(define-public ocaml-camlpdf
+ (package
+ (name "ocaml-camlpdf")
+ (version "2.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/johnwhitington/camlpdf")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1cbqgwh62cqnsbax4k4iv9gb63k1v545izmbffxj8gj1q6sm0k34"))))
+ (build-system ocaml-build-system)
+ (arguments
+ (list
+ #:tests? #f ;no tests
+ #:make-flags
+ #~(list (string-append "CC=" #$(cc-for-target)))
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'patch-makefile-shell
+ (lambda _
+ (patch-makefile-SHELL "OCamlMakefile")))
+ (add-after 'install 'install-doc
+ (lambda _
+ (let ((doc (string-append #$output "/share/doc/"
+ #$name "-" #$version)))
+ (copy-recursively "doc/camlpdf/html"
+ (string-append doc "/html"))))))))
+ (home-page "https://github.com/johnwhitington/camlpdf")
+ (synopsis "OCaml library for PDF file manipulation")
+ (description
+ "CamlPDF is an OCaml library that provides functionality for reading,
+writing, and modifying PDF files. It serves as the foundation for the
+@command{cpdf} command-line tool and various API bindings.")
+ (license license:lgpl2.1+)))
+
(define-public ocaml-cudf
(package
(name "ocaml-cudf")
--
2.49.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#77915
; Package
guix-patches
.
(Sat, 19 Apr 2025 05:46:03 GMT)
Full text and
rfc822 format available.
Message #11 received at 77915 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/pdf.scm (cpdf): New variable.
Change-Id: I16fa4bf7251f5d38bdd14f472adeef513c34623c
---
gnu/packages/pdf.scm | 85 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 6340f9b3bf..6de03e6e03 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -29,6 +29,7 @@
;;; Copyright © 2023 Benjamin Slade <slade <at> lambda-y.net>
;;; Copyright © 2024 Artyom V. Poptsov <poptsov.artyom <at> gmail.com>
;;; Copyright © 2024 Aaron Covrig <aaron.covrig.us <at> ieee.org>
+;;; Copyright © 2025 Jussi Timperi <jussi.timperi <at> iki.fi>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -56,6 +57,7 @@ (define-module (gnu packages pdf)
#:use-module (guix build-system gnu)
#:use-module (guix build-system cmake)
#:use-module (guix build-system meson)
+ #:use-module (guix build-system ocaml)
#:use-module (guix build-system pyproject)
#:use-module (guix build-system python)
#:use-module (guix build-system qt)
@@ -95,6 +97,7 @@ (define-module (gnu packages pdf)
#:use-module (gnu packages man)
#:use-module (gnu packages markup)
#:use-module (gnu packages nss)
+ #:use-module (gnu packages ocaml)
#:use-module (gnu packages ocr)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
@@ -159,6 +162,88 @@ (define-public capypdf
convert data in any way.")
(license license:asl2.0)))
+(define-public cpdf
+ (package
+ (name "cpdf")
+ (version "2.8.1")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/johnwhitington/cpdf-source")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0dn4lxbnj7izrpxshil1wcvpc60yv9mwfy52dndpi9b66rm3rbih"))))
+ (build-system ocaml-build-system)
+ (arguments
+ (list
+ #:tests? #f ;no tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'patch-makefile-shell
+ (lambda _
+ (patch-makefile-SHELL "OCamlMakefile")))
+ (add-after 'install 'install-bin
+ (lambda _
+ (let ((bin (string-append #$output "/bin")))
+ (install-file "cpdf" bin))))
+ (add-after 'install-bin 'install-doc
+ (lambda _
+ (let ((doc (string-append #$output "/share/doc/"
+ #$name "-" #$version))
+ (man1 (string-append #$output "/share/man/man1")))
+ (install-file "cpdf.1" man1)
+ (install-file "cpdfmanual.pdf" doc)
+ (copy-recursively "doc/cpdf/html"
+ (string-append doc "/html"))))))))
+ (propagated-inputs (list ocaml-camlpdf))
+ (home-page "https://www.coherentpdf.com")
+ (synopsis "Command-line tool for PDF manipulation")
+ (description
+ "Command-line tool and OCaml library designed for manipulating PDF
+documents. Key Features include:
+
+@itemize @bullet
+@item
+Splitting and merging PDF files (including bookmark preservation and
+splitting on bookmarks).
+@item
+Encryption and decryption (supports AES 128 and AES 256).
+@item
+Page manipulation: scaling, rotation, cropping, and flipping; fitting
+pages to a specific size.
+@item
+Bookmark management: copying, removing, and adding bookmarks.
+@item
+Watermarking: stamping logos, page numbers, and multi-line text with
+transparency support.
+@item
+Text and font handling: embedding TrueType fonts, supporting Unicode
+UTF-8 input and output, and converting text to PDF.
+@item
+Presentation features: creating PDF-based presentations and arranging
+multiple pages on a single page.
+@item
+Annotation management: listing, copying, setting, and removing
+annotations.
+@item
+Metadata management: reading and setting document information and
+metadata.
+@item
+Attachment handling: adding and removing file attachments to documents
+or pages.
+@item
+Advanced features: thickening hairlines, blackening text,
+reconstructing malformed files, detecting missing fonts and
+low-resolution images, exporting/importing in JSON format, and
+building table of contents.
+@item
+Drawing: Adding graphics and text directly onto PDF files.
+@end itemize")
+ (license license:agpl3+)))
+
(define-public a4pdf
(deprecated-package "a4pdf" capypdf))
--
2.49.0
This bug report was last modified 5 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.