Cups Printer Printing Blank Pages between copies - cups

Cups Printer Printing Blank Pages between copies When I give more than one copy. how to fix this issue
If I give two copies it should print 2

Related

Print with 'lp' command on the first available printer

I have a system where two different models of USB printers can be connected, but only one will be connected at a time. My software will print using the lp command. I can print correctly on the two printers specifying the connected model with the -d flag. I'd like to have lp to automatically detect the connected printer, and print on it.
How to do this?
I tried using classes. I've added the two printers to a class:
root#localhost:~/App# lpstat -c LabelWriterClass
members of class LabelWriterClass:
LabelWriter-550
LabelWriter-450
Then I run the print command with the class as destination:
lp -o media=Custom.167x188 -d LabelWriterClass label.pdf
It is somehow working, but it looks like it sends the first print jopb to the first printer on the class, the second job to the second printer, the third job to the first, ... I say this because, after launching a new print job, it won't print on the connected printer (that printed the last job), but as soon as I connect the other one it prints the pending job. If I send two consecutive commands, the first doesn't run (will run once I connect the other printer, as said), while the second will be printed on the currently connected printer.
Is this the expected behavior?
On this page I read
Alternatively, a class might contain several printers that are used in a particular order. The LP print service always checks for an available printer in the order in which printers were added to a class. Therefore, if you want a high-speed printer to be accessed first, add the high-speed printer to the class before you add a low-speed printer. As a result, the high-speed printer handles as many print requests as possible. The low-speed printer is reserved as a backup printer when the high-speed printer is in use.
What I get from this is that lp tries to print with the first printer in the list (LabelWriter-550 in my case), and if it fails, it tries the next in the list. But, as described, I'm getting a different behavior.
-- EDIT --
I implemented a workaround; I check the connected printer by parsing the output of lsusb, and send the lp command with the -d <printer> option. Quite dirty and a little slower, but does the trick.
If a cups-only solution emerge, I'll be glad to hear it.

Long text is cut when printed using NetSuite advanced pdf

I created a Bill of Material print out for a manufacturing company using advanced pdf. So one of the requirements is to print out the detailed manufacturing which is stored on a custom field (long text) in the assembly item record. This is done because items have different set of process each. The problem is in the print out, only a third of the manufacturing process is being printed. Normally the instruction is around 4k characters, but the pdf print out has around 1k characters only. Is there a way to resolve this?
You may be experiencing a built-in Netsuite issue.
One possible workaround is that if your instructions are consistent you could pull them from a library stored in the file path. Make sure the files are "available without login"
Then you'd include them as:
<#include "https://system....." parse=false>

Capture lab measurements as they are sent to printer

I have a lab instrument from the late 1980's that has a printer as its sole storable data output (it gives you the readout on the screen in real time but does not save it to memory, as it has none, you can just view the last measured data point).The printer is an Epson FX1050 but the instrument also has the option of using an "HP" printer (just putting it out there as I understand the standards are different in both cases). The instrument itself performs measurements and the calculations to get to the results that become the output. The time the instrument takes to perform the task will vary between samples.
I went ahead and purchased a data collection software "Collect 6.1" by labsoft/Perkin ELmer to see if it was the solution to my problems. I understand a bit about data parsing but the tech was a bit overwhelmed at the amount of data a single measurment would generate (over 100 lines) with only a couple of specific places where the same text would ever get repeated and I have not had any luck getting it to parse the data the way I want to, I think it times out even though I am setting the timing out very high, measurments are about 3 minutes on average. I can get it to see what is being sent but it does not do much with it, and I can only view it while in test mode and it gets saved as text.
After many frustrating days I am trying to change my approach. I have an article from 1995 where they connected this same instrument to an external computer with a communications software (PROCOMM which downloaded an ASCII file) and then they converted it to Lotus 123 / Excel for data processing. I would be in "hog heaven" if I could do something similar but I am thinking a printer file might be easier to work with. The instrument has the option for setting up hardware handshakes, CTS output, RTS input, etc... and from my failed attempts with the Collect software I know I am using the correct cables to get data from the instrument to the computer but now I am thinking of switching cables and just trying to get the printer output into the computer if there is an "easy" windows based importer for the printer output data.
The advantage of the "printer output" is that only the critical numbers, with the results, are sent, saving me from sorting through the individual measurements. I have read the other "intercepting printer data" questions and I did not find them 100% applicable.
As a warning, I am not particularly talented with computer softwares, apps or macros, just the basic windows type stuff and some better than average Excel skills. I stumbled across this forum as there were other printer data exporting questions and I became hopeful. Thanks in advance.
The mention of CTS and RTS suggests you have a UART between the instrument and the printer. Have you managed to capture any of this data in to a file? If so, could you supply a sample?
One gotcha is that the instrument might be running some sort of protocol against the printer, and won't emit the data without the right responses from the real printer. If that's the case, and you're planning on replacing the printer with a PC, then you might need to get the PC to spoof these responses to keep the instrument happy.
If you are keen on parsing the data yourself, you could write an application in the language of your choice that responds to whatever the UART spits out, then extracts the good bits. If you can do Regular Expressions, that would be a great help in parsing this kind of stuff - you can match on the features surrounding the data, then capture the important data and emit it to a .csv or whatever.
Good luck with this.

graphicsmagick burst multi page tiff into 2 page tiff's

I have a tiff file with several hundred pages in it. My goal is to break it into many files each containing two pages. i.e. every two pages save a new file. It is basically a stack of single sheet documents scanned front and back.
I'm working on a C# Forms (visual studio 2008) application to automate the process.
My initial thought is to use Graphicsmagick to split every page into a seperate file then step through the files to join them back to geather again two pages at a time.
I have the split process working by calling a command like this.
gm convert largeinputfile.tif +adjoin singlepageoutput%d.tif
When I try and join just two of the pages back togeather again with a command like this
gm convert -page A4 -append singlepageoutput0.tif singlepageoutput1.tif New2pageImage.tif
This creates one long document containing both pages but no page break.
I have tried seveveral things with the -page option but I'm just guessing and it's not having much effect.
I'm very close to a working solution but stuck on the last bit.
Any ideas?
Thanks in advance
David
Thought I would answer this as I had a similar problem and this was the first SO question I came across.
This will take the first two pages and create a new multi-page tiff file.
gm convert -page A4 page0.tif page1.tif -adjoin output.tif
Then you take the file you have created and add a new page to it.
gm convert output.tif page2.tif -adjoin output.tif
gm convert output.tif page3.tif -adjoin output.tif
.... and so on ....
This will also have the added benefit of not eating through CPU and RAM as graphics magick will try to do the whole thing in RAM and a 10MB 500 page tiff will take about 24GB of RAM if done in one go.

Large text file manipulation

Seeking help on manipulating large text files. I'm not a programmer and apparently have some serious trouble with regex. The text files in question are an output of some tool that logs enormous amount of information about the server it's running on. The produced output needs to be adjusted to defined requirements. Each text file between 4-10 MB of size. The structure of the file broken into a sections that look like this:
http://imageshack.us/photo/my-images/853/79515724.jpg/
What I need is to somehow remove the some sections where as leaving SOME of them intact.
I have around 200 of those files.
Thank you.