From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jean Louis Newsgroups: gmane.emacs.help Subject: Re: printing with paps Date: Sun, 1 Jan 2023 02:46:40 +0300 Message-ID: References: <765db885-3ab1-9a7b-9f66-16fc19a22c80@posteo.de> <595d0f1b-71ca-b313-2ebd-24f106598007@posteo.de> <6d31bebc-4d7b-9798-fa74-3fb29f4423b9@posteo.de> <0f698243-3a01-7e21-9d44-3e83e5d2f6df@posteo.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35013"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/2.2.9+54 (af2080d) (2022-11-21) To: Gottfried , "help-gnu-emacs@gnu.org" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Jan 01 00:49:22 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pBlbO-0008sT-4Z for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 01 Jan 2023 00:49:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pBlad-0004kK-IN; Sat, 31 Dec 2022 18:48:35 -0500 Original-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 1pBlab-0004kA-Kv for help-gnu-emacs@gnu.org; Sat, 31 Dec 2022 18:48:34 -0500 Original-Received: from stw1.rcdrun.com ([217.170.207.13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pBlaZ-0002rK-Ej for help-gnu-emacs@gnu.org; Sat, 31 Dec 2022 18:48:33 -0500 Original-Received: from localhost ([::ffff:102.85.159.48]) (AUTH: PLAIN admin, TLS: TLS1.3,256bits,ECDHE_RSA_AES_256_GCM_SHA384) by stw1.rcdrun.com with ESMTPSA id 0000000000055D5F.0000000063B0CA4D.000049A5; Sat, 31 Dec 2022 16:48:29 -0700 Mail-Followup-To: Gottfried , "help-gnu-emacs@gnu.org" Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=217.170.207.13; envelope-from=bugs@gnu.support; helo=stw1.rcdrun.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142073 Archived-At: Look at GNU/Emacs TUTORIAL generated by using RCD Paps package as PDF file: https://gnu.support/files/emacs/packages/rcd-paps/2023-01-01-02:42:51.pdf Here are instructions how to customize headers and footer: https://github.com/dov/paps/issues/30 They all take a string that is based on python f-strings. I have defined the following variable that may be used in the definitions of the headers: path - The complete path of the file being printed filename - The basename (without directory) of the file being printed mtime - The file's modification time now - The current time num_pages - The total number of pages in the document page_idx - The current page being printed Here is an example of how it may be used: paps --header-left="{now:%Y-%m-%d %H:%M}" --header-center="{filename}" --header-right="Page {page_idx:02d}/{num_pages:02d}" --header -o hello.pdf paps.cc I will work on easier customization of header and footer. It is so important to be able to generate PDF files for even simple text. -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns In support of Richard M. Stallman https://stallmansupport.org/