From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 4Jt4JM5d+mRmRAAAG6o9tA:P1 (envelope-from ) for ; Fri, 08 Sep 2023 01:33:34 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 4Jt4JM5d+mRmRAAAG6o9tA (envelope-from ) for ; Fri, 08 Sep 2023 01:33:34 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 46D4E853C for ; Fri, 8 Sep 2023 01:33:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694129614; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=/XQyh1kZ516+BkC0XIPzI2mLnbIQJbcuT8UtR4xRjwM=; b=Nt2U11i3Pyef4A31zaRMVZDwY+b7RDO3oq8KwKfhaZsurLfV9zUHNINR54JM5AZp/0BgWX 8TuqLAgM0tQ3JuwivCukAFpbhw3vU/5jrSrT6MNIa1khFDiiotM2w3pHhSxGdqLOjtxSBH iNQy6WdFS7VWPaxE1psu31PgPvCrAAyYsSpo2vNvmRmgcKIMkhkfmMF5qRCcM1ylKy2k+7 Fkxfi8NSlHYtMTMmTKfZInMCDGqpLT5jr9wDbBFroyYWzbxXJpB3nlN9CECLZwZbhi1TjN N7BX3llgb1Q2EjwQy8MXkI25RbSn9ZAQ4Sr0T+lGZSteFcdF13pPEidWKVX+PQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1694129614; a=rsa-sha256; cv=none; b=s2GrHgv8HAtBq91heZYzxhBDiTIXdjvVmKQfWYrMb4+431ifanpnA1YrYK9l+B+BUPCShd qIcObOLSdQn1k9peOphsMVpvj50jIpndPp4Aw5vRHi45RBWfn376k/j2UHcC38sRjOQELb 5cO93ibWTzvm2PVaXvtOt72sdM7C/tiiAtWQtQgyuTF3cqJmlxnFE1kPrEME0FRFhDwJmc h/gbtZtgRX1feO/Ajz1xmQIBE1mPULtbHei/AB2szBf37W+C34Cu7SkVr/PI6MCj/JpXDD e8guRzWc0ZC1JKJ1x4hNpsgEYJGqaXTOcg9k9JxWZuuGS09dMkv0YYbqDm7W4w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qeOUh-0001gX-LR; Thu, 07 Sep 2023 19:33:03 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qeOUf-0001fu-6b for guix-patches@gnu.org; Thu, 07 Sep 2023 19:33:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qeOUe-0006Zs-UK for guix-patches@gnu.org; Thu, 07 Sep 2023 19:33:00 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qeOUg-0000V8-Ie for guix-patches@gnu.org; Thu, 07 Sep 2023 19:33:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65806] [PATCH 3/4] gnu: Add pdf-crop-margins. Resent-From: Nicolas Graves Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 07 Sep 2023 23:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65806 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 65806@debbugs.gnu.org Cc: ngraves@ngraves.fr Received: via spool by 65806-submit@debbugs.gnu.org id=B65806.16941295571875 (code B ref 65806); Thu, 07 Sep 2023 23:33:02 +0000 Received: (at 65806) by debbugs.gnu.org; 7 Sep 2023 23:32:37 +0000 Received: from localhost ([127.0.0.1]:41736 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeOUH-0000U5-65 for submit@debbugs.gnu.org; Thu, 07 Sep 2023 19:32:37 -0400 Received: from 13.mo582.mail-out.ovh.net ([188.165.56.124]:39309) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qeOUB-0000TR-RZ for 65806@debbugs.gnu.org; Thu, 07 Sep 2023 19:32:34 -0400 Received: from director10.ghost.mail-out.ovh.net (unknown [10.108.16.222]) by mo582.mail-out.ovh.net (Postfix) with ESMTP id 5E73424544 for <65806@debbugs.gnu.org>; Thu, 7 Sep 2023 23:32:28 +0000 (UTC) Received: from ghost-submission-6684bf9d7b-pv2nq (unknown [10.110.208.181]) by director10.ghost.mail-out.ovh.net (Postfix) with ESMTPS id 1CB781FD83; Thu, 7 Sep 2023 23:32:28 +0000 (UTC) Received: from ngraves.fr ([37.59.142.105]) by ghost-submission-6684bf9d7b-pv2nq with ESMTPSA id /NtrA4xd+mQiaQQAzeOs4g (envelope-from ); Thu, 07 Sep 2023 23:32:28 +0000 X-OVh-ClientIp: 81.67.140.142 Date: Fri, 8 Sep 2023 01:32:12 +0200 Message-ID: <3535c0c58a946e35378224215147e969deba1659.1694129533.git.ngraves@ngraves.fr> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 6740762743007077090 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: 0 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedviedrudehiedgvdegucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecuhedttdenucenucfjughrpefhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefpihgtohhlrghsucfirhgrvhgvshcuoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqnecuggftrfgrthhtvghrnhepvdehleeiffehtedvlefhffffjeefgfduhfetkeevheeiteduiedugfekuedtheejnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepuddvjedrtddrtddruddpkedurdeijedrudegtddrudegvddpfeejrdehledrudegvddruddtheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeduvdejrddtrddtrddupdhmrghilhhfrhhomhepoehnghhrrghvvghssehnghhrrghvvghsrdhfrheqpdhnsggprhgtphhtthhopedupdhrtghpthhtohepieehkedtieesuggvsggsuhhgshdrghhnuhdrohhrghdpoffvtefjohhsthepmhhoheekvddpmhhouggvpehsmhhtphhouhht X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-to: Nicolas Graves X-ACL-Warn: , Nicolas Graves via Guix-patches From: Nicolas Graves via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.23 X-Spam-Score: -6.23 X-Migadu-Queue-Id: 46D4E853C X-TUID: yxxkDctDIpa3 * gnu/packages/pdf.scm (pdf-crop-margins): New variable. --- gnu/packages/pdf.scm | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm index 30cc325d48..2266296621 100644 --- a/gnu/packages/pdf.scm +++ b/gnu/packages/pdf.scm @@ -964,6 +964,63 @@ (define-public python-pymupdf analysis, conversion & manipulation of PDF (and other) documents.") (license license:agpl3+))) +(define-public pdf-crop-margins + (let ((commit "6d89093e33e98ab02196cfc5e06e96003771e735") + (revision "0")) + (package + (name "pdf-crop-margins") + (version "2.0.3") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/abarker/pdfCropMargins") + ;; Releases are not in git tags. + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0144px9kl927z6gx380i2sd75izqzxnnzl3laih2dwpqp82r9j6f")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'lift-requirements + (lambda _ + (substitute* "setup.py" + (("pillow>=9\\.3\\.0") ; security issues handled by a patch + "pillow>=9.2.0"))))))) + (native-inputs (list python-setuptools + python-pillow)) + (propagated-inputs (list ghostscript + python-pymupdf + python-pysimplegui)) + (home-page "https://github.com/abarker/pdfCropMargins") + (synopsis "Automatically crop the margins of PDF files") + (description "The pdfCropMargins program is a command-line application to +automatically crop the margins of PDF files. Cropping the margins can make it +easier to read the pages of a PDF document -- whether the document is printed +or displayed on a screen -- because the display fonts are larger. + +Features +@itemize +@item Automatically detects the margins and can crop a given percentage of them. +@item Can crop all the pages to the same size to give a uniform appearance. +@item Renders and analyzes page images to find the bounding boxes, which allows +it to deal with noisy scanned PDFs. +@item A rudimentary 'undo' capability is implemented by default. +@item Can crop pages uniformly based on the nth smallest crop values, to help +with noisy documents where a few pages have unwanted markings in their margins. +@item Can automatically run a document previewer on the output file. +@item The format of automatically-generated output-file names is modifiable. +@item Preserves document catalog information such as outlines if possible. +@item Crops rotated pages according to their appearance in the document viewer. +@item Can deal with at least simple cases of password-encrypted files. +@item Can automatically apply a Ghostscript repair operation to attempt to fix +corrupt PDF files. +@end itemize") + (license license:gpl3+)))) + (define-public qpdf (package (name "qpdf") -- 2.41.0