SeaPrint - Network printing for SailfishOS

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

@attah: Thanks a lot for the 1.1.4 update that solve the crash of re-encoding jpeg files.
Sea Print works perfectly :slight_smile:

1 Like

Hi,
I can´t add my printer, it seems to be detected but there are errors:

~ $ harbour-seaprint 
[D] unknown:0 - Using Wayland-EGL
library "libGLESv2_adreno.so" not found
library "eglSubDriverAndroid.so" not found
library "vendor.qti.qspmhal@1.0.so" not found
[D] unknown:0 - discovering 12 ("_ipp._tcp.local", "_ipps._tcp.local")
[D] unknown:0 - new ipp ptrs ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - new ipps ptrs ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - ipp ptrs ()
[D] unknown:0 - ipps ptrs ()
[D] unknown:0 - rps QMap()
[D] unknown:0 - ports QMap()
[D] unknown:0 - new targets ()
[D] unknown:0 - targets QMap()
[D] unknown:0 - AAs QMap()
[D] unknown:0 - AAAAs QMap()
[D] unknown:0 - querying txt  "EPSON ET-M1170 Series._ipps._tcp.local"
[D] unknown:0 - discovering 16 ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - querying srv  "EPSON ET-M1170 Series._ipps._tcp.local"
[D] unknown:0 - discovering 33 ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - querying txt  "EPSON ET-M1170 Series._ipp._tcp.local"
[D] unknown:0 - discovering 16 ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - querying srv  "EPSON ET-M1170 Series._ipp._tcp.local"
[D] unknown:0 - discovering 33 ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - tmprp "EPSON ET-M1170 Series._ipps._tcp.local" ipp/print
[D] unknown:0 - new ipp ptrs ()
[D] unknown:0 - new ipps ptrs ()
[D] unknown:0 - ipp ptrs ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - ipps ptrs ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - rps QMap(("EPSON ET-M1170 Series._ipps._tcp.local", "ipp/print"))
[D] unknown:0 - ports QMap()
[D] unknown:0 - new targets ()
[D] unknown:0 - targets QMap()
[D] unknown:0 - AAs QMap()
[D] unknown:0 - AAAAs QMap()
[D] unknown:0 - new ipp ptrs ()
[D] unknown:0 - new ipps ptrs ()
[D] unknown:0 - ipp ptrs ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - ipps ptrs ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - rps QMap(("EPSON ET-M1170 Series._ipps._tcp.local", "ipp/print"))
[D] unknown:0 - ports QMap(("EPSON ET-M1170 Series._ipps._tcp.local", 631))
[D] unknown:0 - new targets ("EPSONA7B694.local")
[D] unknown:0 - targets QMap(("EPSON ET-M1170 Series._ipps._tcp.local", "EPSONA7B694.local"))
[D] unknown:0 - AAs QMap()
[D] unknown:0 - AAAAs QMap()
[D] unknown:0 - discovering 1 ("EPSONA7B694.local")
[D] unknown:0 - tmprp "EPSON ET-M1170 Series._ipp._tcp.local" ipp/print
[D] unknown:0 - new ipp ptrs ()
[D] unknown:0 - new ipps ptrs ()
[D] unknown:0 - ipp ptrs ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - ipps ptrs ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - rps QMap(("EPSON ET-M1170 Series._ipp._tcp.local", "ipp/print")("EPSON ET-M1170 Series._ipps._tcp.local", "ipp/print"))
[D] unknown:0 - ports QMap(("EPSON ET-M1170 Series._ipps._tcp.local", 631))
[D] unknown:0 - new targets ()
[D] unknown:0 - targets QMap(("EPSON ET-M1170 Series._ipps._tcp.local", "EPSONA7B694.local"))
[D] unknown:0 - AAs QMap()
[D] unknown:0 - AAAAs QMap()
[D] unknown:0 - new ipp ptrs ()
[D] unknown:0 - new ipps ptrs ()
[D] unknown:0 - ipp ptrs ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - ipps ptrs ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - rps QMap(("EPSON ET-M1170 Series._ipp._tcp.local", "ipp/print")("EPSON ET-M1170 Series._ipps._tcp.local", "ipp/print"))
[D] unknown:0 - ports QMap(("EPSON ET-M1170 Series._ipp._tcp.local", 631)("EPSON ET-M1170 Series._ipps._tcp.local", 631))
[D] unknown:0 - new targets ("EPSONA7B694.local")
[D] unknown:0 - targets QMap(("EPSON ET-M1170 Series._ipp._tcp.local", "EPSONA7B694.local")("EPSON ET-M1170 Series._ipps._tcp.local", "EPSONA7B694.local"))
[D] unknown:0 - AAs QMap()
[D] unknown:0 - AAAAs QMap()
[D] unknown:0 - nothing to do
[D] unknown:0 - new ipp ptrs ()
[D] unknown:0 - new ipps ptrs ()
[D] unknown:0 - ipp ptrs ("EPSON ET-M1170 Series._ipp._tcp.local")
[D] unknown:0 - ipps ptrs ("EPSON ET-M1170 Series._ipps._tcp.local")
[D] unknown:0 - rps QMap(("EPSON ET-M1170 Series._ipp._tcp.local", "ipp/print")("EPSON ET-M1170 Series._ipps._tcp.local", "ipp/print"))
[D] unknown:0 - ports QMap(("EPSON ET-M1170 Series._ipp._tcp.local", 631)("EPSON ET-M1170 Series._ipps._tcp.local", 631))
[D] unknown:0 - new targets ()
[D] unknown:0 - targets QMap(("EPSON ET-M1170 Series._ipp._tcp.local", "EPSONA7B694.local")("EPSON ET-M1170 Series._ipps._tcp.local", "EPSONA7B694.local"))
[D] unknown:0 - AAs QMap(("EPSONA7B694.local", "10.100.0.100"))
[D] unknown:0 - AAAAs QMap()
[D] unknown:0 - "ipps://10.100.0.100:631/ipp/print" QUrl("ipps://10.100.0.100:631/ipp/print")
[D] unknown:0 - QUrl("ipps://10.100.0.100:631/ipp/print")
[D] unknown:0 - "ipps://10.100.0.100:631/ipp/print" QUrl("ipps://10.100.0.100:631/ipp/print")
[D] unknown:0 - write  160
*   Trying 10.100.0.100:631...
[W] unknown:498 - file:///usr/share/harbour-seaprint/qml/pages/utils.js:498: TypeError: Cannot read property 'value' of undefined
[W] unknown:144 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:144: TypeError: Cannot read property 'value' of undefined
[W] unknown:261 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:261: TypeError: Cannot read property 'value' of undefined
[W] unknown:146 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:146: TypeError: Cannot read property 'mimetypes' of undefined
[W] unknown:276 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:276: TypeError: Cannot read property 'pdf' of undefined
[W] unknown:286 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:286: TypeError: Cannot read property 'pdf' of undefined
[W] unknown:294 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:294: TypeError: Cannot read property 'postscript' of undefined
[W] unknown:303 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:303: TypeError: Cannot read property 'plaintext' of undefined
[W] unknown:311 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:311: TypeError: Cannot read property 'office' of undefined
[W] unknown:319 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:319: TypeError: Cannot read property 'office' of undefined
[W] unknown:327 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:327: TypeError: Cannot read property 'images' of undefined
[W] unknown:9 - file:///usr/share/harbour-seaprint/qml/pages/utils.js:9: TypeError: Cannot read property 'value' of undefined
[W] unknown:0 - QImage::scaleHeight: Image is a null image
* Connected to 10.100.0.100 (10.100.0.100) port 631 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: CN=EPSONA7B694; O=SEIKO EPSON CORP.
*  start date: Jan  1 00:00:00 2010 GMT
*  expire date: Jan  1 00:00:00 2038 GMT
*  issuer: CN=EPSONA7B694; O=SEIKO EPSON CORP.
*  SSL certificate verify result: self signed certificate (18), continuing anyway.
> POST /ipp/print HTTP/1.1
Host: 10.100.0.100:631
Accept: */*
User-Agent: SeaPrint 1.1.4
Transfer-Encoding: chunked
Content-Type: application/ipp
Accept-Encoding: identity

* Signaling end of chunked upload via terminating chunk.
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: Epson_IPP-Server/2.0.0
< Cache-Control: no-cache
< Pragma: no-cache
< Keep-Alive: timeout=30
< Connection: Keep-Alive
< Content-Type: application/ipp
< Content-Length: 7847
< 
* Connection #0 to host 10.100.0.100 left intact
[D] unknown:0 - 0
[D] unknown:0 - Tried to read past end
[W] unknown:9 - file:///usr/share/harbour-seaprint/qml/pages/utils.js:9: TypeError: Cannot read property 'value' of undefined
[W] unknown:261 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:261: TypeError: Cannot read property 'value' of undefined
[W] unknown:144 - file:///usr/share/harbour-seaprint/qml/pages/FirstPage.qml:144: TypeError: Cannot read property 'value' of undefined
[W] unknown:498 - file:///usr/share/harbour-seaprint/qml/pages/utils.js:498: TypeError: Cannot read property 'value' of undefined

Oh, that isn’t good.
Most of that is just noise from the UI, but where it goes wrong is “Tried to read past end”.
So it seems i must have some mistake in the IPP decoding.

Unfortunately that doesn’t really say much, so i’d need your help to get a network capture troubleshoot further if you are up for it.

Basically it goes like this:

  • Install (pkcon install/zypper in) tcpdump
  • Start tcpdump -s 0 -i wlan0 -w /tmp/tcpdump.pcap port 631
  • Manually try to add the printer with ipp://, not ipps:// since it is encrypted (probably ipp:// 10.100.0.100:631/ipp/print)
  • Stop (ctrl-c) the capture and get it to me somehow (pm perhaps)

Since it is just capturing port 631 there shouldn’t™ be anything sensitive there.
You can look at the capture with Wireshark to see that it worked and what it contains. Or you can of course keep an eye on the SeaPrint log output so you know it worked.

I can´t add the printer manually, the validation button is grayed out, so I tried to look at the logs.

I send you in PM the tcpdum capture file.

1 Like

The failure is expected here - it will behave the same as with the automatic discovery. But it should have triggered the same IPP request/response in the background, only unencrypted. Looking forward to the capture, hopefully it is an easy fix :slight_smile:

This should do it: Release SeaPrint 1.1 "Kelp" · attah/harbour-seaprint · GitHub
Thanks for reporting and assisting with the packet capture.

3 Likes

It works, thanks !

1 Like

But does it print? :slight_smile:

Yes, I tested a printout and everything is functional.

3 Likes

The 1.2-series is turning out to be an interesting one.
I just pushed 1.2.1 to GitHub and Harbour (coming next week).

1.2 added, among other things, that the app itself can perform copies by sending (sequences of) pages over and over again.
Turns out @Se’s printer is the normal one and my OKIs are the exception. Printers that are simple enough to need raster formats generally can’t perform copies.

1.2.1 Builds on that infrastructure and add custom discontinuous page ranges, at least one step on the way for manual duplex @asavasa.
But what is probably most interesting is that with some inspiration from ipptransform, i have turned off anti-aliasing and with no visual loss (thanks to the high resolution of printers) the raster sizes are halved for printing text documents.

Happy tree-killing!

5 Likes

I try to take a look in the scaling issue if it is still there (or was just me remembering wrong). Unfortunately I have been too busy with other stuff.
The coming updates surely look promising!

2 Likes

Well, after the (imagined?) problem appearing there have been an OS uppdate and a SeaPrint update. Anyway, now the png printing is working very well and I did not notice any problems (Xperia 10II, SFOS 4.4.0.68, SeaPrint 1.2).
Once more, thank you very much for a crucial and well working application!

4 Likes

I See that the number-of-copies-feature works again since Seaprint 1.2. Today I updated to 1.2.1.

The printer-settings-page have a empty Drop-down-menu.

It simply cannot have ever worked for you before (unless your printer changed).

That looks like the printer properties page, as opposed to the printer or print-job-page that you print from.
I.e. all you are are missing out on is making the printer flash and beep.
I’ll hide the whole menu for incapable printers.