[SOLVED] Unsuccessful attempt to print a large jpeg file: what resource did I run out of?
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Unsuccessful attempt to print a large jpeg file: what resource did I run out of?
I was trying to reproduce an A4 page of text by scanning it in grayscale with maximum resolution and then printing it. The file was about 4 MB in size. I couldn't print it either from the gimp or from geequie. The machine just seized up. Everything stopped and the image never reached the printing queue.
Just out of curiosity, I'd like to know what I ran out of: processing power or memory? I have a 4-core 2.41 GHz Intel Baytrail SoC and 4 GB of core.
4MB for an image is not much - there's no reason trying to print one should cause your computer to run out of anything.
(Though I'd also expect an A4 page scanned at maximum resolution to take up more space than that - how many pixels - i.e. width*height - and what file format was it?)
Also, if you were hitting any limits I'd expect some kind of log entries to say so - have you checked any yet?
Assuming there is some kind of bug preventing images from being printed, a possible workaround may be to OCR it and print the resulting text.
It is possible that the printer ran out of memory for that file. you did not say what make / model the printer is so I cannot research that theory, but it is entirely possible.
Also, for printing images it is better to reduce the resolution of the scan if you want it on one page since the printer has a max resolution (dpi) as well, and when you send an image that is of higher resolution, something (I think the printer) has to reduce (interprolate) the image to what can actually be printed. Sometimes the image may be cut into 2 or 4 pages to use the original resolution depending upon what app is used to send it to the printer. Using print preview can tell you a lot at times.
Try opening the file with something like LO Writer or image viewer then print it
There's nothing in messages or syslog. Cups shows a persistent error that looks like
Code:
W [18/May/2021:11:40:48 +0100] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [18/May/2021:11:40:48 +0100] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [19/May/2021:14:10:21 +0100] CreateProfile failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
W [19/May/2021:14:10:22 +0100] CreateDevice failed: org.freedesktop.DBus.Error.ServiceUnknown:The name org.freedesktop.ColorManager was not provided by any .service files
but I've been getting that for months and it doesn't seem to have done any harm before.
I just printed a small png file out of geeqie and it printed with no problems.
@computersavvy. The printer is a Brother HL1110 B/W laser printer. Your explanation looks convincing to me. So you're saying it's not the size of the file that matters but whether the printer can handle the resolution. I used maximum resolution because I wanted a readable printout. What's a reasonable resolution for a scanned printed page then?
It was a jpg. I mentioned that in the title. Sadly I deleted the image in disgust, but I can always remake it. I'll try again tomorrow and see if I can supply the size information you want.
Great! That gives me a lot to try out tomorrow. I'm too tired right now.
Also I've never really understood graphics. For example, I can't distinguish fonts or work up any preference for one font over another. I think that some people live through their eyes but I have always lived through my ears.
If the image is converted to a bitmap when sent to the printer, a 4MB jpeg could end up as a ten times larger file, which might explain the issue.
Based on the specifications for your printer it appears to only have a 1MB memory (which seems really low; perhaps it is only a buffer), but if it runs out there's a light that flashes - if that's happening it would support what computersavvy said. (Though again I'd expect the file to still be in the print queue in that situation.)
Either way, reducing the image to 2480x3508px - or even 1204x1754px - should help. To put those numbers in perspective, the latter is roughly 6 pixels per millimeter - around twice as many as the screen in front of you is probably using.
If that still exhibits the problem (or isn't sharp enough for your needs) then perhaps look into Tesseract OCR to convert the image to text, (which will use very little memory and still print high resolution).
Quote:
Originally Posted by EdGr
Your printer does 600 DPI, and so the scan should also be 600 DPI.
For a letter-size page, this produces a 5100x6600 image (33 megapixels).
That would be 25 pixels per millimeter - which is far more than is needed for text! If the issue is due to excess printer or software memory use this would not help solve the problem.
(Also, letter-size is peculiar to the US; Hazel is in the UK.)
That would be 25 pixels per millimeter - which is far more than is needed for text! If the issue is due to excess printer or software memory use this would not help solve the problem.
Hazel should first try 600 DPI, and if that does not work, then try 300 DPI.
I have a slightly more recent Brother monochrome laser printer than Hazel. These printers don't do much computing - the Postscript gets processed on the host PC by Ghostscript. A full-page monochrome image at native resolution should not be problematic for the host.
ETA - Hazel, for printing, in Gimp convert the grayscale image to indexed with 1bpp (black and white) and set the print resolution to 600 DPI with no page margins. This will produce an exact pixel-by-pixel image for the printer.
Ed
Brilliant! That did it. Printing the initial 600 dpi scan gave a reasonable but not very good-quality result, rather grey-in-grey. But when I made the indexed version (I had to browse around a bit before I found the right transform option) it came out almost as good as print.
So I have learned that higher resolution is not always a good thing and that you can add contrast later, and those are valuable lessons. Thanks a lot, gentlemen!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.