SeaPrint - Network printing for SailfishOS

Looks like a nice enough printer to have at least decent format support… so i guess it is not reporting correctly.
Please include the debug info (tap printer 5 times with no document selected).
One good way is to email it to yourself, and then posting from a computer.
Also; since it is a lot of information, please put it in a “hide details” section.

Here it is

Summary

{
“charset-configured”: {
“tag”: 71,
“value”: “utf-8”
},
“charset-supported”: {
“tag”: 71,
“value”: [
“utf-8”,
“us-ascii”
]
},
“color-supported”: {
“tag”: 34,
“value”: true
},
“compression-supported”: {
“tag”: 68,
“value”: [
“none”
]
},
“copies-default”: {
“tag”: 33,
“value”: 1
},
“copies-supported”: {
“tag”: 51,
“value”: {
“high”: 999,
“low”: 1
}
},
“document-format-default”: {
“tag”: 73,
“value”: “application/octet-stream”
},
“document-format-supported”: {
“tag”: 73,
“value”: [
“application/octet-stream”
]
},
“finishings-default”: {
“tag”: 35,
“value”: 3
},
“finishings-supported”: {
“tag”: 35,
“value”: [
3
]
},
“generated-natural-language-supported”: {
“tag”: 72,
“value”: [
“en-us”
]
},
“ipp-versions-supported”: {
“tag”: 68,
“value”: [
“1.0”,
“1.1”,
“2.0”
]
},
“job-hold-until-default”: {
“tag”: 68,
“value”: “no-hold”
},
“job-hold-until-supported”: {
“tag”: 68,
“value”: [
“no-hold”
]
},
“job-priority-default”: {
“tag”: 33,
“value”: 50
},
“job-priority-supported”: {
“tag”: 33,
“value”: [
50
]
},
“job-sheets-default”: {
“tag”: 68,
“value”: “none”
},
“job-sheets-supported”: {
“tag”: 68,
“value”: [
“none”
]
},
“media-default”: {
“tag”: 68,
“value”: “default”
},
“media-supported”: {
“tag”: 68,
“value”: [
“default”,
“iso_a4_210x297mm”,
“iso_a5_148x210mm”,
“iso_a6_105x148mm”,
“jis_b5_182x257mm”,
“jis_b6_128x182mm”,
“na_legal_8.5x14in”,
“na_foolscap_8.5x13in”,
“na_letter_8.5x11in”,
“oe_8-25x14_8.25x14in”,
“om_folio_210x330mm”,
“na_govt-legal_8x13in”,
“na_govt-letter_8x10in”,
“na_invoice_5.5x8.5in”,
“na_executive_7.25x10.5in”,
“na_fabfold-eur_8.5x12in”,
“om_195x267_195x267mm”,
“na_number-10_4.125x9.5in”,
“na_monarch_3.875x7.5in”,
“iso_c5_162x229mm”,
“iso_c6_114x162mm”,
“iso_dl_110x220mm”
]
},
“multiple-document-handling-default”: {
“tag”: 68,
“value”: “separate-documents-collated-copies”
},
“multiple-document-handling-supported”: {
“tag”: 68,
“value”: [
“separate-documents-collated-copies”,
“separate-documents-uncollated-copies”,
“single-document”
]
},
“multiple-document-jobs-supported”: {
“tag”: 34,
“value”: false
},
“multiple-operation-time-out”: {
“tag”: 33,
“value”: 60
},
“natural-language-configured”: {
“tag”: 72,
“value”: “en-us”
},
“number-up-default”: {
“tag”: 33,
“value”: 1
},
“number-up-supported”: {
“tag”: 33,
“value”: [
1
]
},
“operations-supported”: {
“tag”: 35,
“value”: [
2,
4,
8,
9,
10,
11,
5,
6,
16,
17,
18,
60
]
},
“orientation-requested-default”: {
“tag”: 35,
“value”: 3
},
“orientation-requested-supported”: {
“tag”: 35,
“value”: [
3,
4,
5,
6
]
},
“page-ranges-supported”: {
“tag”: 34,
“value”: true
},
“pdl-override-supported”: {
“tag”: 68,
“value”: [
“attempted”
]
},
“print-quality-default”: {
“tag”: 35,
“value”: 4
},
“print-quality-supported”: {
“tag”: 35,
“value”: [
4
]
},
“printer-current-time”: {
“tag”: 49,
“value”: “2022-03-28T21:06:20+13:00”
},
“printer-info”: {
“tag”: 65,
“value”: “RICOH MP C306Z [002673C258D7]”
},
“printer-is-accepting-jobs”: {
“tag”: 34,
“value”: true
},
“printer-location”: {
“tag”: 65,
“value”: “”
},
“printer-make-and-model”: {
“tag”: 65,
“value”: “RICOH MP C306Z PS3”
},
“printer-message-from-operator”: {
“tag”: 65,
“value”: “”
},
“printer-more-info”: {
“tag”: 69,
“value”: “http://192.168.1.60/web/entry/zz/websys/direct/airPrintConfig.cgi
},
“printer-more-info-manufacturer”: {
“tag”: 69,
“value”: “http://192.168.1.60/web/entry/zz/websys/direct/airPrintConfig.cgi
},
“printer-name”: {
“tag”: 66,
“value”: “IPP Printer”
},
“printer-resolution-default”: {
“tag”: 50,
“value”: {
“units”: 3,
“x”: 1200,
“y”: 1200
}
},
“printer-resolution-supported”: {
“tag”: 50,
“value”: [
{
“units”: 3,
“x”: 1200,
“y”: 1200
}
]
},
“printer-state”: {
“tag”: 35,
“value”: 3
},
“printer-state-reasons”: {
“tag”: 68,
“value”: [
“none-report”
]
},
“printer-up-time”: {
“tag”: 33,
“value”: 5873680
},
“printer-uri-supported”: {
“tag”: 69,
“value”: [
“ipp://192.168.1.60/ipp/print”,
“ipp://192.168.1.60/ipp/print”
]
},
“queued-job-count”: {
“tag”: 33,
“value”: 0
},
“sides-default”: {
“tag”: 68,
“value”: “one-sided”
},
“sides-supported”: {
“tag”: 68,
“value”: [
“one-sided”,
“two-sided-long-edge”,
“two-sided-short-edge”
]
},
“uri-authentication-supported”: {
“tag”: 68,
“value”: [
“requesting-user-name”,
“requesting-user-name”
]
},
“uri-security-supported”: {
“tag”: 68,
“value”: [
“none”,
“none”
]
}
}


Sent from my Sailfish device

Hmm, as i suspected… it only lists "application/octet-stream" in document-format-supported.
That just means auto-detect, and it is supposed to include more formats so that clients knows what to send… Wonder if they are related to Kyocera, they seem to do the same.
From googling the printer, format support really isn’t very clear. They are quite secretive about what it supports in the specs; only scanner formats seems to be of concern. But there are mentions of Postscript, so there is hope…

So what you could do is add some local overrides for that printer and make SeaPrint think it supports some actual usable formats.
See: https://github.com/attah/harbour-seaprint/#dealing-with-misbehaving-printers for how to do it.
I suggest you add "application/pdf", "application/postscript" and "image/jpeg" (keep "application/octet-stream" in the list), then trying them out one by one by selecting the format in “Transfer format” when printing. Then remove any that didn’t work, and hopefully you are left with a working set.

You’ll need to match on something other than uuid when making the override though, maybe printer-make-and-model is good.

Thank you for the help. I’ll give that a go.

I might need a bit more help. :frowning:

As per the information in your link I created a file called “overrides” at /home/nemo/.config/net.attah/seaprint/.

I used vi via PuTTY to create the file copying what you had used as an example and then edited that.

I still get the same error message plus I don’t see a “Transfer format” option. Obviously I’ve got something wrong.

This is the content of that file

{
“printer-uuid”: {
“urn:uuid:xxx-yyy-zzz-111-1234567890”: {
“printer-name”: {
“tag”: 54,
“value”: "Ricoh C306Z "
},
“document-format-supported”: {
“tag”: 73,
“value”: [
“application/octet-stream”, “application/pdf”, “application/postscript”, image/jpeg,
]
}
}

Here is a correct overrides file for your scenario:

{
    "printer-make-and-model": {
        "RICOH MP C306Z PS3": {
            "document-format-supported": {
                "tag": 73,
                "value": [
                    "application/octet-stream", "application/pdf", "application/postscript", "image/jpeg"
                ]
            }
        }
    }
}

Is there something i could i have said to make it clearer?
By nature it is a bit complicated, but i also want people to be able to do it…

Thank you for your reply.

I’m sorry I am very much a novice when it coms to using terminal. Some steps which are obvious to an accomplished user are not always evident.

I looked at the example you had in your link and modified it to the best of my knowledge. I misunderstood what was required regarding the printer name and assumed all I need to do was change the text which was highlighted in blue (“A better name”) in the section above the section about supported formats.

I have edited the overrides file to be the same as your text by cutting and pasting your text. Still no go.

Is the overrides file in the correct folder for my phone? Note my device uses nemo and not $user.

Where are the rest of the seaprint files located? I had to create the file path: /home/nemo/.config/net.attah/seaprint. What points to that file to use it’s contents?

$USER, all caps, is a variable that will already be assigned with your username, be it nemo or defaultuser, so the path listed works regardless.
You should not have had to create any folders, just the file (assuming you had launched the app at all on the relevant device).

Only thing that comes to mind is that you would be defaultuser and not nemo… but i’ll have take your word for that not being the case.
My overrides file is located at /home/defaultuser/.config/net.attah/seaprint/overrides, so if you are nemo, the username would be the only change to that.
But judging from your other threads you have(had?) a pretty broken install… so maybe worth waiting with this until that is resolved.

The app itself is over in /usr/share, but config stuff is in ~/.config and ~/.local/share as for pretty much all other apps.

Yes, you are correct, I did have an issue with the update. That seems to have been resolved, thankfully though I still may do a re-install in the near future.

I did some more digging. I found the following folder which is empty /home/nemo/.config/ harbour-seaprint. Could it be that is where the overrides file should reside?

That folder is from many versions ago, and overrides never resided there. Before the current location (1.0+) it was straight in your home folder as a dot-file, i.e. hidden.

I installed the unjailed/default-jailed 1.0.4 that is latest in store to make sure, and my overrides file in the current location still works just fine. I have the dump of your printer loaded as a dummy, and just what i sent you for overrides.

No idea what it could be… i guess you must still have some permission gremlins.

Since sailjail access to files on sdcard did not work anymore. The files could be selected by the document dialog but printing shows an error ‘could not access’ (öffnen der Datei fehlgeschlagen).

Yes, i deliberately didn’t add RemovableMedia to the permissions, trying to keep things minimal. I didn’t think people would store small things like documents on the additional storage.
I thought the pickers had gotten an update to not show things they couldn’t access, but apparently not.

But it doesn’t hurt, so i’ll add it for the next release.

2 Likes

Pictures taken by the camera could(should?) be placed on sdcard … :thinking:
They are also printable with seaprint (as i know) :smiley:

2 Likes

I have a question to the printer-status messages:
I found it good if you can add the status-message (for example: low toner (Warning)) tho the translation page that it can be translate to the each languages. Because it can help people to understand it. I don´t know if different printers have different messages. So i think it will be enough to translate the important messages like “low toner (Warning)”.

I thought I solved it in the override file:

“printer-state-reasons”: {
“tag”: 68,
“value”: [
“Toner fast leer”
]

But then I noticed that other messages are not displayed when I overwrite the message.

Yes, obviously, if you statically override the contents of a dynamic message it no longer has any use.
Think of it as overriding toner level; if you set it to 100% it doesn’t make it so.

I’ll see if i can add the printer-state-reasons as translatable. Both the fact that there are over 800 of them, and how they are stored might make that not so easy. And no, i will not do it partially - all or nothing (translations themselves can of course still be partial).
I’ll also look in to if for strings where the printer supplies the plaintext, it can be asked to provide those matching the translation (where applicable).

2 Likes

I have added media, media-type, and printer-state-reasons as translatable now.
That is almost 1200 strings in total… have fun! :slight_smile:

5 Likes

Straight from the department of silly gadgets and soon in a SeaPrint near you:


The Amazon Smart Sticky Note Printer.

(Setting up WiFi needs an actual Android device and the Alexa app - will look in to if that can be remedied at some point)

6 Likes

User survey time!

Have you printed images as PNG at all?
(I.e. not necessarily a image that was a PNG, but that got transferred as PNG - best transfer format available, or manually selected)
Did it work well and behave as expected? What kind of printer was that?

I’m thinking i should change what SeaPrint does when sending images to the printer, and not apply any fit-to-page etc, same as for JPEGs.
(And where applicable converting to the target format of course).

So this would mean that for Postscript, PDF and raster formats SeaPrint would do fit-to-page, but that it no longer would do that for image formats as intermediaries.

I think things like label printers would be much happier doing the scaling themselves, and anything else would do a pretty good job anyway.

Any opinions?

And of course; if you have other feedback, don’t hesitate to share.

I print occasionally (like once a month) pngs. Printing a screen capture (which is in png format) results in somewhat distorted scale on axle x if I remember correctly. I haven’t given it many thoughts as it works good for my using scenario. Fit-to-page seems to stretch the screen capture from an Xperia 10 II wider. I have a ten years old and badly behaving Samsung SL-M2070 laser printer (after Samsung’s printer business was sold to HP, I guess, it has started to give notifications in French and Turkish on a Windows pc and the actual printing job getting done is best acchived from a pc using a cable, the wireless connection isn’t so reliable). The pngs are printed in couple of seconds when using SeaPrint. That among other things is great in SeaPrint. Thanks!

BTW is there any change to have a wireless scan option to SeaPrint? Or are the manufacturers using proprietary drivers? Wireless scan would be awesome but I can only try to imagine the work it would need.

2 Likes

Hmm, that doesn’t sound quite optimal. Do note that source and transfer format are rarely the same except for jpeg.
Could you please share the debug info you get by tapping the printer 5 times with no document selected?

Apart from scanning being evil in that too many people use it as a crutch to not properly keep track of digital source documents, there are no standard scanner protocols. Some combination of SANE and CUPS/PAPPL can act as a go-between and behave in a proposed-standard way, but you’d probably be better of just using those more directly. (Can you tell i never scan?)

1 Like