Showing posts with label printer. Show all posts
Showing posts with label printer. Show all posts

Wednesday, August 28, 2013

Raspberry Pi Journal #13

Installing CUPS for Printer


So, I have an old Samsung ML-2525W laser printer laying around. Naturally, since I'm looking for more gadgets to be connected to my Raspberry Pi, it got the job. The first shock of the day is that there is no standard printing spool. It took some digging to come up with lpr, and lp. Both of these program are old. The new one, after much digging, is CUPS (Common Unix Printing System). That one threw me out for a loop, because Apple made it.

Anyway, having CUPS makes life tremendously easy. There is a gotcha with permission, though. Let's go through the process.

The first thing you do is to install CUPS:

sudo apt-get install cups

After some heavy duty downloading, everything is set up. The installation starts cups daemon server automatically. You can check it out by opening your web browser to localhost port 631

http://127.0.0.1:631

If all goes well, you will see the browser showing CUPS Administration page.


Everything is browser-based, so it's really easy. Just add a new printer and you're home free.


You need to login and enter your password. The browser interface allows you to administer the printer completely, including moving printing jobs, or even cancelling them. You don't want just anybody to be able to do so.


Did I say adding a new printer is easy? Well, there's a gotcha. You cannot add a new printer without proper permission. Didn't you just entered your password? Yes, you did. So, what's going on?

This instruction should be with all printer installation instruction, but some missed it. You need to add yourself to printing administration group. Do this:

sudo usermod -aG lpadmin username

where if you're the default user, that should be "pi".




Success! I see my printer name there. After selecting it, would you believe I still have to choose my printer from a long list of names? Anyway, set up your defaults here. I set my page size to "US Letter".

That's it! Do a test print and see if it works! Congratulations, you just added a new printer!

Friday, August 23, 2013

Raspberry Pi (POD) Print On Demand
Book Making with Duck Tape

It has been my secret desire to be a book maker. I always look with jealousy the video of a book maker machine. Those cost about $4500. Obviously, it's not something I can afford on personal basis. How about a professional basis? Unless I have a thriving business for Print-On-Demand, I can't justify it.

Well, I have a laser printer, a Raspberry Pi that is connected to it, a big stapler, and of course, a big roll of Duck Tape. I'm ready to roll, baby!

The first thing to do, of course, is to print the document. Here I'm printing MagPi magazines, because I missed the window of Kickstarter for printed copies. I'm printing them on one side because I'm anticipating writing notes on the other side. 

The laser printer doesn't print duplex. It does have a duplex printing system by printing odd pages first, then you're supposed to feed the paper back into the tray and print the other side. It doesn't work that well, because the paper print well on first run, but will have misfeed on the second run.

The printer also defaults to A4, for some reason, so I did a command to scale it down to 96%.

lp -o scaling=96 filename

For some reason, xpdf does a segmentation fault every time it tried to print. Oh, well. Also, TheMagPi #8 has some kind of problem. I keep getting SpliX error. In the end, I used a Windows box to print it.



Did I mention I have a big stapler? Look at those printed pages! I'm using 26 lbs laser printer paper, not the cheap multi-purpose paper. Those are rather hefty! I was going to just print the relevant articles, but it turns out there's a lot more interesting articles than skip articles. In the end, it's faster to just print them all out.


Yup, the big stapler comes in handy! The staples is designed to staple 120 sheets of paper. Not a problem with this one! Three magazine in one go!



And to keep things neat: the Duck tape. After I have done this, it occurred to me that I should have printer the cover in cardstock paper. Well, I forgot I have some. Oh, well. Maybe next time.



Laser printer are cheap nowadays. In fact, some of the cheap ones are duplex, now. I have a Brother inkjet printer that is duplex printing. Very neat! 

The Raspberry Pi does the job as POD printer well, as you can see. Say $250 for a laser printer, $50 for various knick-knacks, $50 for a complete Raspberry Pi, and you can have your very own POD system for less than $350. The drawback is that you have to bind the book manually, but for something that cost about 10% of the professional model, I think that's a great deal.


Tuesday, August 6, 2013

Raspberry Pi Journal #3

Printer Trouble


I was printing my other blogspot for archival purposes, when I realized that I was double printing the month of June. I quickly cancel the print process, except it already got sent to the server, and I couldn't open up the web page quick enough for me to cancel the print. So, I did what I know would work: Turn off the printer.

Sure enough, when the printer administration web page came up, it said unable to send job to the printer. So far, so good. Obviously, I cancelled all print jobs so far.

The trouble was, I couldn't send any new print job to the printer! After trying various attempt over 10 minutes, I gave up and rebooted the computer and printer. This should have worked. Except, it didn't!

More going around to check the printer. It's not until I stumbled upon "Resume Printer" option in the Maintenance menu that I am able to print again. Apparently, there is a status recording somewhere that cause the printer to be invalid until "resumed", whatever that means.

I think this is bad behaviour.I should be able to reset the printer by turning it off. Smart devices are way too smart these days. It's no longer just a simple turn off, turn on for resetting their values. What if something got screwed up inside? You'll have to take it to the service department. What a hassle!

Libre Office trouble

I was doing multiple windows on Libre Calc, when I found out that the new window I spawned was affecting the old window as well. Of course, this happens after I'm done all editing with the new window. There goes my work out the window! To be honest, this is the first time I've seen it happen. I wonder what the purpose is to link multiple windows to a file?

In the end, I simply toss out all changes. Reload the old file, and save under different name. Close all windows, and load all files. Problem solved, but more time wasted. Growing pains, I suppose.

Monday, August 5, 2013

Raspberry Pi Journal #2

Raspberry Pi Journal #2
Libre Office Printing Trouble

I was using Libre Office Calc, the spreadsheet, to print out my schedule for the day. It works fine, but when I printed it, it's a bit too small. I decided to zoom it up a little and use landscape format. The landscape format is fine, but there's no zoom control. Worse, when I printed it, the top got cut off.

Obviously, I need the whole thing on page, and aligned properly. In the end, I use lp command again, and manually adjusted the margins. I also adjusted the scaling and landscape mode.

So, the steps that works would be
1. Print to PDF in portrait
2. Use lp to print the PDF with appropriate settings.

In my case, the settings was scaling=150 page-top=-450

At least I can adjust the margin to negative values without error.

One more thing: I found out what SpliX is. It's Samsung printer driver for Linux. I tried to print from Midori web browser, and that is the error I got. Don't know how to solve it.