SeaPrint - Network printing for SailfishOS

Thank you.
What sort of time-frame are we talking about?
0.9.6 to 1.0, or 1.0(.1) to 1.0.2? Old releases are available on my github.
I swapped out the http client for 1.0, and tweaked its settings a bit for 1.0.2, so those are likely candidates.
Also if you run it from the terminal, it will print huge amounts of debug info - then it would be possible to tell whether it is discovery or getting printer attributes that fails, and if we are lucky something about how.

Also double-check that the setting for ignoring SSL errors is still set.

That’s cool, I’ll check out the versions. At least it’s not the latest, I was still on 1.01

I am probably missing something very obvious, but where do I find the controls to select which pages to print from a document? An is there any fast way for printing manually on both sides? Thanks!

That would be “Page range” - i.e. it currently only allows selecting one contiguous range.

As in printing only even or odd pages in the most basic incarnation of it? No, currently there is not.
I’ll add it to my mental list of things to compensate printer shortcomings with, along with client-side copies.
No promises on if or when i’ll get around to those.

I was going to suggest you could use pdftocairo to separate out even and odd pages, but apparently it segfaults on getting the even ones.

1 Like

SeaPrint 1.1 is waiting for SFOS 4.4 to become widely available, but there are many changes under the hood… so here is a beta release:

This version comes with a small/correct SailJail profile. The biggest feature is probably fixed printing of some JPEG images on many printers. The IPP spec only requires printers to handle baseline-encoded JPEGs, and many edited or web-adapted JPEGs are progressive, so many (but not all) printers would fail on these. Fortunately this re-encoding can be done losslessly.

7 Likes

As requested from your reply in the comments section from the Seaprint app in the Jolla Store. I don’t have any logs but this screen shows the error and the printer model.

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.