Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Mladen Gogala Newsgroups: comp.os.linux.misc Subject: Re: redirecting printer output to file PDF Date: Sat, 14 Feb 2015 21:38:18 +0000 (UTC) Organization: A noiseless patient Spider Lines: 66 Message-ID: References: <00d52381-a090-4def-b6c6-f1cdd2f02be5@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 14 Feb 2015 21:38:18 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="9dbb49b777b4f27f09e09421fc52f8c8"; logging-data="2392"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19c90PrgaDDzKuczY4smv6U" User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Cancel-Lock: sha1:ckUti9/Z1sfo8CkNGMllxsQ1rfc= Xref: csiph.com comp.os.linux.misc:13684 On Fri, 13 Feb 2015 21:34:54 -0800, pureheart wrote: > I filled out an online PDF form with text in the fields as it allowed > this. > Before hitting the :send" button I tried to save a copy only to get the > message that it was not allowed. > > The form *did*, however, allow me to print it before leaving if I > wished. > > Is there a way I could have invoked the program from the command line so > as to redirect the printer output to a file? > > I have seen stderr redirection examples (stdin, stdout, stderr), but if > there is no standard printer file such as stdprn I guess I might be out > of luck. > > Any ideas? > > Pureheart There is a cups-pdf package which allows you to print anything to mgogala@medo ~]$ rpm -qa|grep -i cups-pdf cups-pdf-2.6.1-7.fc20.x86_64 Similar packages also exist for other distributions, too. I use the same trick on Ubuntu. When the package is installed, you get a corresponding printer: [mgogala@medo ~]$ lpstat -t scheduler is running system default destination: Canon-PIXMA-MG3100 device for Canon-PIXMA-MG3100: lpd://lpt/0D88A3000000 device for Cups-PDF: cups-pdf:/ Canon-PIXMA-MG3100 accepting requests since Fri 13 Feb 2015 07:53:57 PM EST Cups-PDF accepting requests since Fri 20 Jun 2014 07:21:42 PM EDT printer Canon-PIXMA-MG3100 is idle. enabled since Fri 13 Feb 2015 07:53:57 PM EST Data file sent successfully. printer Cups-PDF is idle. enabled since Fri 20 Jun 2014 07:21:42 PM EDT The printer is called Cups-PDF on my computer. You can then print to it: [mgogala@medo ~]$ lp -d Cups-PDF ~/.bashrc request id is Cups-PDF-127 (1 file(s)) Where will the printer put the output file, depends on your configuration. In my case, the PDF version of my ~/.bashrc ended up on my desktop. For the details, I recommend you doing what very few people do these days: read the documentation. It's available here: http://www.cups-pdf.de/documentation.shtml On Fedora, cups-pdf.conf is located here: [mgogala@medo ~]$ locate cups-pdf.conf /etc/cups/cups-pdf.conf -- Mladen Gogala The Oracle Whisperer http://mgogala.byethost5.com Je suis Charlie