[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 476
  • Last Modified:

LINUX CUPS print background bars

Can LINUX CUPS print background bars to make reports easier to read?
if so, how?
0
waipahu
Asked:
waipahu
  • 3
  • 3
2 Solutions
 
Rance_HallCommented:
do you mean to ask if cups can print alternating light background colors in a table?  sure.  If you format the print job to do just that.

care to be more specific about what you are looking for?
0
 
waipahuAuthor Commented:
Yes that's what I want.  
The reports will be accounting reports.  I want to have alternating horizontal grey bars going across the page to make it easier for the users to read.

0
 
Rance_HallCommented:
cups by itself doesnt do alot of document formatting, and you dont really want it do to much beyond formatting the job to fit the printer and adding paper tray options and stuff.

I'm assuming that you have some control over the app thats generating those reports, any way you can tell that app to print with alternating background rows?

it would be really difficult for cups to be able to process a print job figure out which parts to add the alternating background to, and which parts NOT to.

You best bet is to get the application that generated the report to do the background, or at least underline data rows.

0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
waipahuAuthor Commented:
All i want to do is simulate a GREEN BAR report like a mainframe report. From top to bottom print alternating rows of grey bars.
Is there a simple of way doing this?
0
 
Rance_HallCommented:
is the report generated by the server as a plain text file? or is it generated by the clients as part of an application?

If its a server generated text file, then you can write a txt to html conversion file that creates a html table with one row/cell per line in the text file, you can count the number of rows youve processed and if the row counter is odd add a background = #color option to the row, if its even, leave it out.

then when the html is rendered by the postscript imager this background is automatically added.

let me know if this is an option you can consider, if it isnt, maybe there is something else.



0
 
waipahuAuthor Commented:
The report by a batch application program in plain ascii text file on our server.
Currently, in the script, a lpr statement is used to send it to the printer.
I just thought there might be a way to print the grey shade bars in the background for readability.

I don't want to modify our exisiting programs to embed code to print out the grey bars.

Any ideas?

0
 
nociSoftware EngineerCommented:
As you are using a postscript emulator printer (i.e. cups common printing language = post script),
you can use 'enscript --highlight-bars=1 ascii-file' to print them.

http://www.gnu.org/software/enscript/enscript.html
0

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now