LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-07-2011, 01:47 PM   #1
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,358

Rep: Reputation: 51
Question Virtual printer? (take content to custom shell script/program/another printer)


Hello,

I would like to write a program or shell script that:

- can be a printer for any program that might want to print things

- can take whatever is asked to be printed and send to one or more other printers (e.g., pipe the content to 2 printers at once)

How may I achieve this? I see many threads on similar subjects but not much practical content.
 
Old 07-07-2011, 03:07 PM   #2
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by dedec0 View Post
Hello,

I would like to write a program or shell script that:

- can be a printer for any program that might want to print things

- can take whatever is asked to be printed and send to one or more other printers (e.g., pipe the content to 2 printers at once)

How may I achieve this? I see many threads on similar subjects but not much practical content.
IIRC, CUPS (Common Unix Print System) allows to have virtual printers and a file can serve as that virtual printer. Then sending that file to a number of printers is trivial, isn't it ? I.e. you just launch a printing process per printer and that's it.
 
Old 07-11-2011, 06:54 AM   #3
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,358

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by Sergei Steshenko View Post
IIRC, CUPS (Common Unix Print System) allows to have virtual printers and a file can serve as that virtual printer.
Ok.

Quote:
Originally Posted by Sergei Steshenko View Post
Then sending that file to a number of printers is trivial, isn't it ? I.e. you just launch a printing process per printer and that's it.
Mmm... I guess. Can you tell me how, then? Or where could I learn how do it?

For me, this is trivial only manually, but I am searching an automated solution.

Thank you

Last edited by dedec0; 07-11-2011 at 06:57 AM.
 
Old 07-11-2011, 07:01 AM   #4
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,358

Original Poster
Rep: Reputation: 51
Question

I have found http://www.cups.org/doc-1.1/sam.html but I am lost within it.

I am not sure if it tells me how to do what I want.
 
Old 07-11-2011, 09:12 AM   #5
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,358

Original Poster
Rep: Reputation: 51
Unhappy

From reading everything said until now, I can't get it.
 
Old 07-11-2011, 11:34 AM   #6
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by dedec0 View Post
I have found http://www.cups.org/doc-1.1/sam.html but I am lost within it.

I am not sure if it tells me how to do what I want.
Where exactly are you lost ?
...
http://www.cups-pdf.de/
 
Old 07-12-2011, 07:28 AM   #7
dedec0
Senior Member
 
Registered: May 2007
Posts: 1,358

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by Sergei Steshenko View Post
Where exactly are you lost ?
I didn't read anything about duplicating a job to one or more printers. What I have read about printer classes indicates that these classes can't do what I want.

From what I have read, I think that a filter also can't do what I want.

Seeing the server directives (http://www.cups.org/doc-1.1/sam.html#7_4) I didn't see anything either.

And also I haven't see anything about creating virtual printers and how to assign them an arbitrary output location (a physical printer or files).

I have read their documentation and their commented configuration file. It doesn't seem to do duplication of a job out of the box.


Am I missing something that is simple? Or am I beeing unclear on what I need? (english is not my first language)

Thank you
 
Old 07-12-2011, 06:18 PM   #8
Sergei Steshenko
Senior Member
 
Registered: May 2005
Posts: 4,481

Rep: Reputation: 454Reputation: 454Reputation: 454Reputation: 454Reputation: 454
Quote:
Originally Posted by dedec0 View Post
I didn't read anything about duplicating a job to one or more printers. What I have read about printer classes indicates that these classes can't do what I want.

From what I have read, I think that a filter also can't do what I want.

Seeing the server directives (http://www.cups.org/doc-1.1/sam.html#7_4) I didn't see anything either.

And also I haven't see anything about creating virtual printers and how to assign them an arbitrary output location (a physical printer or files).



I have read their documentation and their commented configuration file. It doesn't seem to do duplication of a job out of the box.


Am I missing something that is simple?
Or am I beeing unclear on what I need? (english is not my first language)

Thank you
You are missing an important element of the original plan:

Quote:
IIRC, CUPS (Common Unix Print System) allows to have virtual printers and a file can serve as that virtual printer. Then sending that file to a number of printers is trivial, isn't it ? I.e. you just launch a printing process per printer and that's it.
I.e. you can have a script monitoring creation of in this case PDF files and sending each file to a number of printers if you need more than one copy and if you want copies to be printed in parallel.

But there is something about "printer classes" and "load balancing" - maybe these can give what you need out of the box.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer question- custom installation of Slack 12.0 hitest Slackware 2 04-05-2008 07:13 PM
Print directly to Windows network printer within a bash shell script jwillyuaz Linux - Newbie 1 02-12-2008 02:15 AM
KDEPrint virtual printer that pipes content to custom shell script? hexstar Linux - Software 1 07-03-2007 09:17 AM
Virtual Printer / CUPS-PDF Printer Issue in SuSE 10 jlstratton42 SUSE / openSUSE 0 12-21-2005 11:04 AM
keeping printer on at bootup keeps printer from printing (some printer modules loaded TheOneAndOnlySM Slackware 1 10-17-2003 07:39 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:13 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration