Path: csiph.com!weretis.net!feeder9.news.weretis.net!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-3.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Sat, 20 Jun 2026 03:34:35 +0000 From: steve g Newsgroups: gnu.emacs.help Subject: Re: Script to pdf References: Date: Fri, 19 Jun 2026 23:34:34 -0400 Message-ID: <87se6hhol1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Cancel-Lock: sha1:CrGQ3CwQbOZn6KE7TGPksXx0Q9Q= MIME-Version: 1.0 Content-Type: text/plain Lines: 34 X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-b70VELq77BDWeycomrXWYK4vWXwMeqxvQn0eLJ+WNbuRrxOXzx1O+Xy5k/PIdZ5QcQKNDstKbmUOy6d!pKQbpoeq0ZX2ftBk58OXzNs7x2O38f453z3ILbjmgppHqUE= X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 Xref: csiph.com gnu.emacs.help:61064 Wu Ming writes: > New to Emacs. This may be my introduction to it. > > In non-interactive mode, via bash script, I would like to perform text > replacement in a Open Document text file and then save it as PDF. As > alternative save ODT as HTML first and then perform the other steps. > > Is it possible? File: emacs.info, Node: PostScript, Next: PostScript Variables, Up: Printing C-u ps-print-buffer-with-faces That is Control-u followed by ps-print-buffer-with-faces. emacs will ask the name of the file and save the current buffer as a postscript document. going from postscript to pdf is usually not a problem. use poppler or ghostscript. > I have a bash script completing the process with HTML as input. But how > LibreOffice handles the conversion from ODT is tricky. Sometimes adds > unnecessary tags. Also saving HTML to PDF requires some tuning because, as > far as I know, the format is not meant for paper publishing. Emacs may have > better options. unfortunately on unix systems printing has been beyond difficult. I think most people use CUPs these days. back in the day you would just copy the postscript file to /dev/lp0, which still exists on my system. If you need to use an HP printer then you need ghostscript. > Thanks for sharing. you are welcomed.