From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B766C1382C5 for ; Thu, 10 Dec 2020 15:37:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BBCC9E089A; Thu, 10 Dec 2020 15:37:43 +0000 (UTC) Received: from mail-oo1-f47.google.com (mail-oo1-f47.google.com [209.85.161.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77A79E0884 for ; Thu, 10 Dec 2020 15:37:43 +0000 (UTC) Received: by mail-oo1-f47.google.com with SMTP id k9so1360279oop.6 for ; Thu, 10 Dec 2020 07:37:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=B8BICQwyNBRIGuz1VSJ1/MxKGhgHyqvj05QRMu1WVzM=; b=R3vrKJ3xTem+mkvX3vyT0G3rPms613lj8nPpJVC1++sGWYC8M1PL04JwEJgUiNfMbO TrXfwRHqU9mj90fj7Y4vNFfmQviBVqGrUXl7WdlQtfFaqFF/kc2JuxAvM54qV/0QfTDs rTLTXBrbHIkysqxAGC5hmIxL1NtYqnj1fa+nudQqmsSD4J7RszHO8bx6uLdRbZMRgUiH YqYfSegF6YX1ueWUh59sY6jLDTDCTSmLBSoFxAoxWOMgP7fMfNpkeHjQ3qyrnUAWQR4c ubvMW85Rw0ltdtEjyy30CvkcQjg+5FvLKqgOP+L3zRWpseot0faI6anpyVDRojLeYZ7/ qYkw== X-Gm-Message-State: AOAM530LNIFR/V/Y56v1s9L1rw5o6s2HW/sriqXJHclv0+W6vEsbh1Vr zfUH6byR5kL54cZx3J1vbOj9AXgHrPX8xGApwHIOYEWm6Xw= X-Google-Smtp-Source: ABdhPJymfB9qJQM304rTP4JJvF0NCzgYIDpWTE/0LtImDaljK+4+WhC7lUfCurX44Xus18eOrQc1szp8xLNoQ70NPwk= X-Received: by 2002:a4a:b4c4:: with SMTP id g4mr6253201ooo.7.1607614662335; Thu, 10 Dec 2020 07:37:42 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <6c6ec963-5766-d0d8-c644-d5bbaaee6fcf@gmail.com> In-Reply-To: <6c6ec963-5766-d0d8-c644-d5bbaaee6fcf@gmail.com> From: Rich Freeman Date: Thu, 10 Dec 2020 10:37:31 -0500 Message-ID: Subject: Re: [gentoo-user] Scanning double sided documents and printing them the same. To: gentoo-user@lists.gentoo.org Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 4f42851d-161d-4223-b83e-152fa23ffb47 X-Archives-Hash: 39a26a9376ffb25a0f74d0889f5e4217 On Wed, Dec 9, 2020 at 7:09 PM Dale wrote: > > How do I print them the > same way tho? I didn't see much discussion on the printing side of this - how to print two-sided on a one-sided printer. Step 1 (optional): I created a CUPS queue for such jobs that just outputs everything into PDF in a directory. This lets you easily print stuff that isn't already PDF from various computers/OSes and accumulate a bunch as printing this way is easier in bulk since it involves a bit of manual manipulation. Step 2 (optional): I have a script that takes each PDF and adds a blank page if needed to result in an even number of pages, then concatenates all the PDFs into a single file. I probably stole this from somewhere: #!/bin/bash for file in *.pdf do #get the number of pages numberofpages=`pdftk "$file" dump_data | sed -e '/NumberOfPages/!d;s/NumberOfPages: //'` echo -n "$file" 'has' $numberofpages 'pages, ' uneven=$(($numberofpages % 2)) if [ $uneven == 1 ] then echo 'which is uneven - added 1 more' tempfile=`mktemp` pdftk A="$file" B=/usr/local/share/blank.pdf cat A B1 output "$tempfile" mv $tempfile $file else echo 'which is even' fi done pdftk *.pdf cat output out.pdf Step 3: To print a single PDF double-sided follow this guide: http://duramecho.com/ComputerInformation/HowToDoTwoSidedPrinting/index.html So the idea is that I accumulate a bunch of documents to print this way, combine them such that they can be printed all at once, and then do the page flip technique in that guide. No need to worry about individual pages as long as you ID which type of printer you have and follow the appropriate process. However, to print multiple documents at once this way they all have to have an even number of pages, which is why I have the script. Concatenating the files with blank pages added means that you can just print the whole thing once, flip, then print it again, and it all works. -- Rich