From owner-freebsd-questions@freebsd.org Wed Apr 22 22:36:02 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 06D9B2C4F06 for ; Wed, 22 Apr 2020 22:36:02 +0000 (UTC) (envelope-from Norman.Gray@glasgow.ac.uk) Received: from hillend.cent.gla.ac.uk (hillend.cent.gla.ac.uk [130.209.16.102]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 496wJJ3KbNz44k7 for ; Wed, 22 Apr 2020 22:36:00 +0000 (UTC) (envelope-from Norman.Gray@glasgow.ac.uk) Received: from cas08.campus.gla.ac.uk ([130.209.14.165]) by hillend.cent.gla.ac.uk with esmtp (Exim 4.72) (envelope-from ) id 1jRNyI-0001CQ-03; Wed, 22 Apr 2020 23:35:58 +0100 Received: from CAS08.campus.gla.ac.uk (130.209.14.165) by cas08.campus.gla.ac.uk (130.209.14.165) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 22 Apr 2020 23:35:57 +0100 Received: from GBR01-CWL-obe.outbound.protection.outlook.com (104.47.20.50) by CAS08.campus.gla.ac.uk (130.209.14.165) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Wed, 22 Apr 2020 23:35:57 +0100 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iMc58y4Yrd/5D9CLZAkfaRSNATQFlLZPihcTVfD3RRedLSiohDyQAjTgOLaGXsmhZGKhW4+C4h3sO3WHNHkboo6fDE2TH6YwQ7zQr/1Hvw94XMW5J9g0IDiWliOpRbSue4/LwPf1kKxuxsOgly77yaXHwBWkROcJMCtYCH/oC+WiuRaRTJEGgkGPCwQb2MFS03mBNydXX1Lh/8y2UF+nDB3mp5eBT8kX2FrLoCGMMHyEh4Y9muRcVNxPgdSM0mXhZMnG91Eh1UkX1zVNHES5Hh215b3FCbWeR0+aGZ7Bxc5TtumOAZ7YZsr3Iq/bhwtemzKf3LO6AmGGN5qRv4p++w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+EkUgTs+OEwK0KNHVIsZMCocdWFREZzJNKavPURetns=; b=IkGkk69+stNZSZ0FdBCy8VhQ4CVnMrlhP7ZcpuLhYZv0vo8wx3228za6S9pX1EDdKzXVW2UkrCG2UOo2liIheAOTrSTFNTPD32jvCZUkQxBGPqbor0r2K++6xpG7dcWIhQPccnsQzQqIvHSoR7NI2RgcWN27iLLJhbhmGrbNq0ptc7pQVKedpyNVHGMB73SfrvBxR5nwvlziSuj/zapGJOvJUh2dNiXVOnsZWNVEVGLcciaolrwwIEDOlFZkxdd8rTUUTSNGzKtSjTiFufkG0lbXE4dyzxbgG5yNhLN9vDid/6Lbo0GiJRpj6ILNDbdOaLEbEL4LFnCEWsrmczNIjA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=glasgow.ac.uk; dmarc=pass action=none header.from=glasgow.ac.uk; dkim=pass header.d=glasgow.ac.uk; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gla.onmicrosoft.com; s=selector2-gla-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+EkUgTs+OEwK0KNHVIsZMCocdWFREZzJNKavPURetns=; b=CZ3qFcObhmKVVFceDmfRm5cZiM3y5PYeQb3HfenvOHqhALvZFG46m7mvqf5E//UebrUUZeTrhYk+GETU1IKU9o2+v4jCTYnqDNsO+2nx59nQFWxlumq4BVMst2hZteqGGIwQqBwdIJIfUKi0QaFEkE/vJbhqh915U6ED+8ClvcE= Received: from CWXP265MB0149.GBRP265.PROD.OUTLOOK.COM (10.164.144.19) by CWXP265MB2039.GBRP265.PROD.OUTLOOK.COM (20.181.78.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13; Wed, 22 Apr 2020 22:35:56 +0000 Received: from CWXP265MB0149.GBRP265.PROD.OUTLOOK.COM ([fe80::40d7:744b:8734:b8dd]) by CWXP265MB0149.GBRP265.PROD.OUTLOOK.COM ([fe80::40d7:744b:8734:b8dd%6]) with mapi id 15.20.2921.032; Wed, 22 Apr 2020 22:35:55 +0000 From: "Norman Gray" To: Jordan CC: Subject: Re: PDF Documents Manipulation Software options Date: Wed, 22 Apr 2020 23:35:53 +0100 X-Mailer: MailMate (1.13.1r5671) Message-ID: <366AA2B3-5107-4336-AFBC-7D1821618289@glasgow.ac.uk> In-Reply-To: <09e273ff-4d9d-47eb-a6e1-d91f18c8a0ef@www.fastmail.com> References: <09e273ff-4d9d-47eb-a6e1-d91f18c8a0ef@www.fastmail.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO2P265CA0039.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::27) To CWXP265MB0149.GBRP265.PROD.OUTLOOK.COM (2603:10a6:401:8::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.50] (2001:8b0:df5:af53:8c70:97b6:936e:f8ad) by LO2P265CA0039.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:61::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2937.13 via Frontend Transport; Wed, 22 Apr 2020 22:35:55 +0000 X-Mailer: MailMate (1.13.1r5671) X-Originating-IP: [2001:8b0:df5:af53:8c70:97b6:936e:f8ad] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 74a7c77c-afec-4c4e-f5c5-08d7e70d8556 X-MS-TrafficTypeDiagnostic: CWXP265MB2039: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:9508; X-Forefront-PRVS: 03818C953D X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CWXP265MB0149.GBRP265.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFTY:; SFS:(366004)(39860400002)(136003)(376002)(346002)(396003)(53546011)(52116002)(36756003)(2616005)(81156014)(8676002)(8936002)(2906002)(186003)(966005)(786003)(316002)(6916009)(478600001)(16526019)(4326008)(66946007)(66476007)(66556008)(86362001)(6486002)(33656002)(5660300002); DIR:OUT; SFP:1101; Received-SPF: None (protection.outlook.com: glasgow.ac.uk does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0tmJERRS7+ahwqThcoh6iXBvY4ycMU/H4aWEeBLLYa9pT04BOM6nTkJoUxudgmsa3ToTnljZy0/G8ZAd9cZdAFU5bUnEXWCs0QvjTzkA8Ly5DYBasNLj9TJf6Ipo3DGmOHyetMRSN++fI5yeYDRGVFLQmNL9ySZoMoGx9I2D638oAOv5nsBNYyQC3jvELABpsW2cT/BYIQ8GoO2NWpM3Y1OeS/3MxejvaNXCsrf8xEEoUT0LloUfN0s5VlQNjtklv/vGceY4pEwIBcE8eyPXm0AL2HOjlD0hf1+6a8trEbeHZE2g5mF2R+IUyfh5Dkqo7MmsP1EJDvN5Mj+yc2QzhjtUP5/+1Whjnt1hbjfVowtf4DxAe8u0TouwaYt01ho1GiG/Ack3UIHV0gS5j4JyE6/CURD9/bg4odCYfIupl05KAH8PTDNgb/1m0Y7XcanNIaSZFurTmFPV15gP1pteh78gJdZbg3pxomg9hZkVrzMCvMjIfnIm8WJuoSkuR+4ehMzlBUblH35Ge8rv80Ukjg== X-MS-Exchange-AntiSpam-MessageData: N9CrONQF/OgWr9tdmy35gXq/7yYHvy2KBJYXdxp8SW69Byv4hVoQ9HWQDWuOG5MyyQjltm09zz3Gg6VnGccALc6ke+FlAC5AuPcS4ffP+CKG4IHHsTwW7InQIRV7ISWXg0wFckzjpoF7LzUApLbSvPO7O2mY8av/cPWQ7kb9e6iUeUYta+XThzJ0oi6Vn4knhy91OVqQE63G2s+LhFFQag== X-MS-Exchange-CrossTenant-Network-Message-Id: 74a7c77c-afec-4c4e-f5c5-08d7e70d8556 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2020 22:35:55.7042 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 6e725c29-763a-4f50-81f2-2e254f0133c8 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: w2P7Z42+HBWefhS+r8p3+eIHQsATeglprHzePLcelyIGHCNC50wsDsHcDB3mU847MSOH1I7ZtXMBB9CH07ZSiyI5+3OMUmPFQAVYvnB9eNU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CWXP265MB2039 X-OriginatorOrg: glasgow.ac.uk X-Rspamd-Queue-Id: 496wJJ3KbNz44k7 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gla.onmicrosoft.com header.s=selector2-gla-onmicrosoft-com header.b=CZ3qFcOb; dmarc=none; spf=none (mx1.freebsd.org: domain of Norman.Gray@glasgow.ac.uk has no SPF policy when checking 130.209.16.102) smtp.mailfrom=Norman.Gray@glasgow.ac.uk X-Spamd-Result: default: False [-4.88 / 15.00]; RCVD_COUNT_SEVEN(0.00)[7]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[gla.onmicrosoft.com:s=selector2-gla-onmicrosoft-com]; HAS_XOIP(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[102.16.209.130.rep.mailspike.net : 127.0.0.18]; IP_SCORE(-0.99)[ipnet: 130.209.0.0/16(-4.52), asn: 786(-0.36), country: GB(-0.07)]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[glasgow.ac.uk]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; BAD_REP_POLICIES(0.10)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_MED(-0.20)[102.16.209.130.list.dnswl.org : 127.0.11.2]; DKIM_TRACE(0.00)[gla.onmicrosoft.com:+]; RCPT_COUNT_TWO(0.00)[2]; URIBL_PBL(0.01)[pdflabs.com]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:786, ipnet:130.209.0.0/16, country:GB]; ARC_ALLOW(-1.00)[i=1]; MID_RHS_MATCH_FROM(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2020 22:36:02 -0000 Greetings. On 22 Apr 2020, at 23:14, Jordan wrote: > Any suggestions that you use or have heard that works with FreeBSD? I have gathered a few links here, with (it sounds) similar goals in mind, but each time round this loop I've managed to solve my immediate problems without investigating what I've found too rigorously. Also, when doing this I've been primarily working on macOS. Bearing all that in mind, however, my notes are below. _Just_ before sending this message, Polytropon's message appeared on-list. They queried your statement that > I work > with hundreds of PDFs each day so I cannot work within a CLI to > manipulate the pages. I think that, in drafting my answer, I'd automatically misread what you said as 'so I cannot work _without_ a CLI to manipulate the images'. Echoing Polytropon, what tools are useful of course depends on just what you need to do, but whilst acknowledging that I may be answering a question you didn't ask, my notes below focus on programmatic manipulation of PDFs. Good luck, Norman There is a Python library called [pikepdf](https://github.com/pikepdf/pikepdf). It looks promising, but I had a little trouble building it -- I gave up before trying very hard, though. This tools compares itself (favourably, of course) to PyPDF2, which seems to be the conventional suggestion. However it seems to install happily enough as a python package (via venv/pip). Then: from pikepdf import Pdf import glob pdf = Pdf.new() for file in glob.glob('part?.pdf'): src = Pdf.open(file) pdf.pages.extend(src.pages) pdf.save('allparts.pdf') [pdftk](https://www.pdflabs.com/tools/pdftk-server/) is a ‘toolkit’ (not sure just what this means in this context), but it includes a [command-line interface](https://www.pdflabs.com/docs/pdftk-cli-examples/) which includes some useful examples such as % pdftk a.pdf b.pdf cat output ab.pdf This also looks a bit tricky to build from scratch. -- Norman Gray : http://www.astro.gla.ac.uk/users/norman/it/ Research IT Coordinator : School of Physics and Astronomy // My current template week for IT tasks is: Monday, Tuesday, and Friday