SeaPrint - Network printing for SailfishOS

I suspect it is a HTTP-to-HTTPS upgrade that it wants, same as @JSEHV’s printer.
So while some type of upgrade is supported, probably starting from IPPS/HTTPS from the beginning will help things along.

Speaking of which, I have that mostly sorted now (really helps to dwell on things for a long time) but it seems i picked up a really nasty performance hit with sharing settings between QML and C++. And honestly i’m not sure it is OK for harbour.

@JSEHV
Can you check if this works as expected?

Hopefully I didn’t break printer discovery too much…

My ET-2720 Epson is found now and it prints too, tested with one picture.
The ink levels are shown corretly too.

3 Likes

Yes, this works perfectly. The printer is found over ipps, printer details are all shown, all settings available at the moment can be adjusted and best of all: printing over ipps works.

Regarding this and some other currently missing features, can you (for payment/donation) add:

  • Show the location of the printer in the printer list (as name and ip address are not always that user friendly to find to which of the printers you want to send the job)

      "printer-location":{"tag":65,"value":"Studio"}
    
  • Option for print scaling

      "print-scaling-default":{"tag":68,"value":"auto"},
      "print-scaling-supported":{"tag":68,"value":["auto","auto-fit","fill","fit","none"]}
    
  • Option for margins (eg. to print a photo with a specified border)

      "media-col": The desired paper size and other attributes for the print Job 
      using a collection of key/value pairs for size, type, source (tray), and margins.
      
      "media-bottom-margin", 
      "media-left-margin", 
      "media-right-margin",
      "media-top- margin"
    
      Member attributes specify the printer's physical margins, allowing printer to determine how the content needs to be printed.
    
  • Option for media type and loaded media (media-ready)

      "media-type-supported":{"tag":68,"value":["stationery","com.epson-photographic-glossy","photographic-semi-gloss","com.epson-luster","photographic-glossy","baryta","com.epson-proofing-white-semimatte","com.epson-velvet-fine-art","com.epson-fine-art","com.epson-ultra-smooth-fine-art","washi","com.epson-matte-fine-art","com.epson-matte-canvas","com.epson-satin-canvas","photographic-matte","com.epson-coated"]}
      "media-ready":{"tag":68,"value":"iso_a4_210x297mm"}
    
  • Option for rendering intent and color profiles

      "print-rendering-intent": specifies how out-of-gamut colors (or shades of gray) are mapped to device colors when printing.
      "printer-icc-profiles": attribute lists one or more ICC profiles that characterize the printer or its rendering
      
      More details at:
      https://www.pwg.org/ipp/ipp-registrations.xml
      https://ftp.pwg.org/pub/pwg/candidates/cs-ippjobprinterext3v10-20120727-5100.13.pdf
    
  • Option for multiple pages on a single sheet of paper

      "number-up": This attribute specifies the number of Input Pages to impose upon a single Impression.  For example, if the value is: 1, 2 or 4.
      "number-up-supported"
    
  • Option for finishings (at least some basic ones: staple/stitch)

      "finishings-supported" and "finishings-col-database": A list of finishing processes (staple, punch, fold, etc.) that are supported.
      "finishings-ready" and "finishings-col-ready": A list of finishing processes that can be requested without stopping the printer.

I had noticed that ‘cheap’ HP printer were a problem and then just now that ipp works. Sooo, installed the .9 release and checked the ipp settings for my HP: ipp://localhost/printers/HP-HP-Neverstop-Laser-MFP-120x … substituted the ip address and sailfish found the printer and it ‘just works’!

PDF printing worked without adding libpoppler …

2 Likes

That’s one long list… and a very mixed bag in complexity.

This attribute seems well-behaved so i’ll try to squeeze it in.

Can you elaborate a bit more on the use case here?
Would it be OK if this is only available/used for transferring unaltered JPEGs?
Printing via any of the other formats would mean SeaPrint has to handle it instead of the printer AFAIK.

There is the option for zero margins, but you want more that it and the default?
Media-col is a terrible mess to support completely, and it is also partially redundant with other simpler (better) attributes.
The spec authors must not have tried to use it. :confused:
Currently SeaPrint ignores margins internally, this is just a setting, and i should really limit it to pure JPEG.

This goes inside media-col… but maybe i can do something with a few simpler attributes like this one without taking the terrible model into account too much.

I guess i could look in to highlighting these inside the media selection from media-supported… but how often would this be used really?

Looks like a pretty easy multiple-choice thing. How does it relate to ICC?

That looks read-only, not like a job option?
So it is something the client would be expected to pre-apply yo the image before shipping it?
I don’t think i have any possibility to add that… the old Qt version we have doesn’t support it.

Interesting… as long as i can keep from having to emulate it in SeaPrint under some circumstances, and just send it, that would be very nice to have.
What transfer formats would this be valid for? Mostly PDF and similar?

If i can keep from having to do the collection version of this (and still achieve something useful), it sounds good. Collections are horrible.

And please do send me the debug info for a couple of related printers. (Tap them quickly 5 times without a document selected) No need to put them online, SeaPrint can have files as local pretend-printers to test the UI.

  • Cool to squeeze in then location, appreciated!
  • Scaling for unaltered JPEGs only is perfect (it is indeed to fill the page instead of fit or none (so no fit, just normal size)). It is not useful for pdf or text. I prefer that only the printer has to handle anything, not SeaPrint. We should use the hardware/firmware of the printer to do tricks and keep SeaPrint as clean as possible.
  • Margins are meant to create a white boarder around a JPEG, so it is printable with a fixed border size and not fitted to a page. More control over the size of how the JPEG ends up. Not only ‘no border’ indeed. That is the intention. I guess setting these borders for the print job makes most sense. Maybe standard for a printer too, but not necessarily in my view (but that’s just me, maybe others prefer it as a standard too)
  • Media type is used by the printer to determine the amount of ink, etc then the job is sent. So it is really a big benefit of the quality output when we can use this. So all the time when we don’t use standard plain 80/90g paper it is very useful. In my view a good one to add for this.
  • Media ready is only to check if it can be printed, without an intervention of the user. The (at least our Epson) printers nowadays know which paper is loaded.
  • Rendering intent is indeed a multiple-choice thing, but good to be able to set when supported.
  • Connected with that, based on the ICC profile (that is available in the printer, so also multiple-choice in my view), the printer calculates how the color should be build up to end up on the paper type in the correct way. When using glossy, satin, pearl, matt, etc. etc. papers, always a different combo of ink-dots is needed to create the right color. So selecting an available ICC profile can create a difference of night and day in the output. For what I read, it is possible to select one with the job (said in simple human, non tech words, sorry, not a dev myself). More info on: [IPP] Question on ICC profiles. - Printer Working Group
    I can’t see what Qt is able of, else we have to ask Jolla for/about it.
  • Multiple pages on a sheet, yes very nice to have. Loved by many I think, better for the environment, etc. etc. Indeed mostly on PDF, or if you are able to do multiple JPEGs on 1 page, that would be great either, but then we run into first selecting more files than 1. But I think PDF is most useful.
  • I leave it up to you, I think it is a very nice one to have when doing printing in the office, where all thee finishing options are available. You can create full booklets this way with SeaPrint.
  • I will do my best for the debug info of printers. See what I can collect.

Shipping 0.9.1 with IPPS and a few minor additions.
Probably good to get feedback on what it broke with a fairly small increment.

Ah, now i see why ICC profiles looks read-only (not like a setting), it is because they are.
Apparently you don’t set them as a client, but the administrator does - and then they are communicated as “if you create a job like this, the following profile will be applied”. No client-side processing needed… phew! And I don’t think it is feasible to assist the user in creating jobs matching a particular profile, but it also is probably nor necessary, since i assume it will be mostly based on media selection.

Given a few suitably rainy days, some more media-col settings, and ones requiring a certain transfer format should happen. Media type has been requested before, and i completely agree… just a lot of strings to add, and consulting the printer for the prettified names.
Job finishings should be multi-choice, right? None of your (very nice) samples contain any finishing options (beyond “none”), so it falls a bit lower on the prio list.

No time plan on this currently, but i guess that means all but ICC and finishings-col goes on the list.

Nice to hear! It wasn’t showing up before, or you didn’t try?
Those are quite modern at not at all bargain-basement, and i’d even say pretty ambitious about being good to the user.
It does however surprise me that you say you didn’t have to install poppler-utils (libpoppler is not used directly), since they are quite low on ram, and doesn’t list built-in PDF support.

It would be very helpful if the icc profile can be visualised when the media type is selected. Indeed, no processing, that was not the purpose indeed. Just let the printer do the work, but with photo printing very relevant when selecting media :slight_smile:

I keep my fingers crossed for some suitable rainy days :wink:

Yes, job finishings should be multiple-choice or a checkbox, as there is only a limited amount possible in my view, but they can sometimes be used together (just don’t know if the combo is a seperate option for you or just a different number in the option list). No problem when it is lower/lowest on the priority list. I will try to look for the (big office) printer, see if I can connect via ipp and send the debug info.

If anybody else has a printer with eg. stapling options at work and can connect to it with SeaPrint and send attah the logs, feel free. We all help each other with simple things like this :slight_smile:

I hadn’t tried seaprint since I don’t print much, but had read this thread and thought to myself, I wonder … I was also surprised that pdf printing just worked. It’s ‘just’ a 220 euro printer, but I guess that’s not cheap by todays’ standards?

1 Like

What do you change in 0.9.2?

  • Since 0.9.1 you added the option “ignore SSL errors” to settings. If I deactivate this option my printer will not shown any more. But I never added self-signed certificate to it.

  • In the about menu of Seaprint I found calligraconverter - not installed. And in the release nodes in the Jolla store I read something about the dependencies comes with SFOS 4.2. What is calligraconverter? Do I understand it right that is support for office documents?

  • In 0.9.2 It is not possible for me to change the number of copies of a print Job. Only 1 is Accepted.

  • in the printer setting I found Collated copies. What is this?

Here you find my debug log for the problem with the number of copies:

Summary

{
“charset-configured”: {
“tag”: 71,
“value”: “utf-8”
},
“charset-supported”: {
“tag”: 71,
“value”: [
“utf-8”
]
},
“color-supported”: {
“tag”: 34,
“value”: true
},
“compression-supported”: {
“tag”: 68,
“value”: [
“none”
]
},
“copies-default”: {
“tag”: 33,
“value”: 1
},
“copies-supported”: {
“tag”: 51,
“value”: {
“high”: 1,
“low”: 1
}
},
“document-format-default”: {
“tag”: 73,
“value”: “application/octet-stream”
},
“document-format-supported”: {
“tag”: 73,
“value”: [
“application/octet-stream”,
“image/urf”,
“image/pwg-raster”
]
},
“finishings-default”: {
“tag”: 35,
“value”: 3
},
“finishings-supported”: {
“tag”: 35,
“value”: [
3
]
},
“generated-natural-language-supported”: {
“tag”: 72,
“value”: [
“de”
]
},
“ipp-features-supported”: {
“tag”: 68,
“value”: [
“wfds-print-1.0”
]
},
“ipp-versions-supported”: {
“tag”: 68,
“value”: [
“1.0”,
“1.1”,
“2.0”
]
},
“job-creation-attributes-supported”: {
“tag”: 68,
“value”: [
“copies”,
“finishings”,
“ipp-attribute-fidelity”,
“job-name”,
“media”,
“media-col”,
“orientation-requested”,
“output-bin”,
“output-mode”,
“print-quality”,
“printer-resolution”,
“requesting-user-name”,
“sides”,
“print-color-mode”
]
},
“landscape-orientation-requested-preferred”: {
“tag”: 35,
“value”: 5
},
“marker-colors”: {
“tag”: 54,
“value”: [
“”,
“”,
“”,
#ffff00
]
},
“marker-high-levels”: {
“tag”: 33,
“value”: [
100,
100,
100,
100
]
},
“marker-levels”: {
“tag”: 33,
“value”: [
40,
40,
40,
100
]
},
“marker-low-levels”: {
“tag”: 33,
“value”: [
10,
10,
10,
10
]
},
“marker-names”: {
“tag”: 54,
“value”: [
“Schwarz”,
“Cyan”,
“Magenta”,
“Gelb”
]
},
“marker-types”: {
“tag”: 68,
“value”: [
“toner”,
“toner”,
“toner”,
“toner”
]
},
“media-bottom-margin-supported”: {
“tag”: 33,
“value”: [
432
]
},
“media-col-default”: {
“tag”: 52,
“value”: {
“media-bottom-margin”: {
“tag”: 33,
“value”: 432
},
“media-left-margin”: {
“tag”: 33,
“value”: 432
},
“media-right-margin”: {
“tag”: 33,
“value”: 432
},
“media-size”: {
“tag”: 52,
“value”: {
“x-dimension”: {
“tag”: 33,
“value”: 21000
},
“y-dimension”: {
“tag”: 33,
“value”: 29700
}
}
},
“media-source”: {
“tag”: 68,
“value”: “auto”
},
“media-top-margin”: {
“tag”: 33,
“value”: 432
},
“media-type”: {
“tag”: 68,
“value”: “stationery”
}
}
},
“media-col-supported”: {
“tag”: 68,
“value”: [
“media-type”,
“media-size”,
“media-top-margin”,
“media-left-margin”,
“media-right-margin”,
“media-bottom-margin”,
“media-source”
]
},
“media-default”: {
“tag”: 68,
“value”: “iso_a4_210x297mm”
},
“media-left-margin-supported”: {
“tag”: 33,
“value”: [
432
]
},
“media-right-margin-supported”: {
“tag”: 33,
“value”: [
432
]
},
“media-source-supported”: {
“tag”: 68,
“value”: [
“auto”,
“manual”,
“tray-1”
]
},
“media-supported”: {
“tag”: 68,
“value”: [
“iso_a4_210x297mm”,
“na_letter_8.5x11in”,
“na_legal_8.5x14in”,
“na_executive_7.25x10.5in”,
“iso_a5_148x210mm”,
“iso_a6_105x148mm”,
“iso_b5_176x250mm”,
“jis_b5_182x257mm”,
“na_number-10_4.125x9.5in”,
“iso_dl_110x220mm”,
“iso_c5_162x229mm”,
“na_monarch_3.875x7.5in”,
“na_index-3x5_3x5in”,
“om_folio_210x330mm”,
“custom_min_76.2x127mm”,
“custom_max_215.9x355.6mm”
]
},
“media-top-margin-supported”: {
“tag”: 33,
“value”: [
432
]
},
“media-type-supported”: {
“tag”: 68,
“value”: [
“stationery”,
“stationery-lightweight”,
“stationery-heavyweight”,
“stationery-cover”,
“envelope”,
“envelope-heavyweight”,
“envelope-lightweight”,
“stationery-recycled”,
“labels”,
“photographic-glossy”,
“stationery-bond”
]
},
“multiple-document-jobs-supported”: {
“tag”: 34,
“value”: false
},
“natural-language-configured”: {
“tag”: 72,
“value”: “de”
},
“operations-supported”: {
“tag”: 35,
“value”: [
2,
4,
8,
9,
10,
11
]
},
“orientation-requested-default”: {
“tag”: 35,
“value”: 3
},
“orientation-requested-supported”: {
“tag”: 35,
“value”: [
3,
4
]
},
“output-bin-default”: {
“tag”: 68,
“value”: “face-down”
},
“output-bin-supported”: {
“tag”: 68,
“value”: [
“face-down”
]
},
“output-mode-default”: {
“tag”: 68,
“value”: “color”
},
“output-mode-supported”: {
“tag”: 68,
“value”: [
“color”,
“auto”,
“monochrome”
]
},
“pages-per-minute”: {
“tag”: 33,
“value”: 23
},
“pages-per-minute-color”: {
“tag”: 33,
“value”: 23
},
“pdf-versions-supported”: {
“tag”: 68,
“value”: [
“none”
]
},
“pdl-override-supported”: {
“tag”: 68,
“value”: [
“attempted”
]
},
“print-color-mode-default”: {
“tag”: 68,
“value”: “color”
},
“print-color-mode-supported”: {
“tag”: 68,
“value”: [
“auto”,
“color”,
“monochrome”
]
},
“print-quality-default”: {
“tag”: 35,
“value”: 4
},
“print-quality-supported”: {
“tag”: 35,
“value”: [
4,
5
]
},
“printer-device-id”: {
“tag”: 53,
“value”: “”
},
“printer-icons”: {
“tag”: 69,
“value”: [
http://BRN30055C0D2E59.local./ipp/printer-icons-128.png”,
http://BRN30055C0D2E59.local./ipp/printer-icons-512.png”
]
},
“printer-info”: {
“tag”: 65,
“value”: “Brother MFC-9340CDW”
},
“printer-is-accepting-jobs”: {
“tag”: 34,
“value”: true
},
“printer-location”: {
“tag”: 53,
“value”: “”
},
“printer-make-and-model”: {
“tag”: 53,
“value”: “Brother Industries”
},
“printer-more-info”: {
“tag”: 69,
“value”: “http://BRN30055C0D2E59.local./net/net/airprint.html”
},
“printer-name”: {
“tag”: 54,
“value”: “Brother MFC-9340CDW”
},
“printer-resolution-default”: {
“tag”: 50,
“value”: {
“units”: 3,
“x”: 600,
“y”: 600
}
},
“printer-resolution-supported”: {
“tag”: 50,
“value”: [
{
“units”: 3,
“x”: 600,
“y”: 600
},
{
“units”: 3,
“x”: 2400,
“y”: 600
}
]
},
“printer-state”: {
“tag”: 35,
“value”: 3
},
“printer-state-reasons”: {
“tag”: 68,
“value”: [
“none”
]
},
“printer-up-time”: {
“tag”: 33,
“value”: 1144702
},
“printer-uri-supported”: {
“tag”: 69,
“value”: [
“ipp://BRN30055C0D2E59.local./ipp/print”,
“ipps://BRN30055C0D2E59.local./ipp/print”,
“ipps://BRN30055C0D2E59.local./ipp/print”
]
},
“printer-uuid”: {
“tag”: 69,
“value”: “urn:uuid:e3248000-80ce-11db-8000-30055c0d2e59”
},
“pwg-raster-document-resolution-supported”: {
“tag”: 50,
“value”: [
{
“units”: 3,
“x”: 600,
“y”: 600
}
]
},
“pwg-raster-document-sheet-back-supported”: {
“tag”: 68,
“value”: [
“Rotated”
]
},
“pwg-raster-document-type-supported”: {
“tag”: 68,
“value”: [
“srgb_8”,
“sgray_8”
]
},
“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”
]
},
“urf-supported”: {
“tag”: 68,
“value”: [
“SRGB24”,
“W8”,
“CP1”,
“IS1-4”,
“MT1-3-4-5-8-11”,
“OB10”,
“PQ4-5”,
“RS600”,
“DM1”
]
},
“uri-authentication-supported”: {
“tag”: 68,
“value”: [
“none”,
“none”,
“none”
]
},
“uri-security-supported”: {
“tag”: 68,
“value”: [
“none”,
“ssl3”,
“tls”
]
}
}

The changelog for 0.9.2 is in store, just look more closely.

Your printer manufacturer has (self-)signed the certificate, and unless you import it manually it is not trusted.

Yes, calligraconverter is for office documents.

Number of copies has nothing to do with 0.9.2. Your printer does not support copies.

Collated copies is that copies are grouped document-wise and not page-wise. (You could have googled this)

Thank you. :see_no_evil:

interesting

OK, if it is no failure. You mean my printer support copies only not over IPP?

A group option for copies. OK, thanks. I Translator give me 4 results for in German.
The first was “Kollationierte Kopien” I searched for it an found nothing with printers. If I had read the other resulds, I had known what it is. One of the others was “sortierte kopien” (sorted kopies). :see_no_evil: :see_no_evil: :see_no_evil:
In the german translation of seaprint it is called “Collated copies” please translate it into “seiten sortieren”

I have a Idea for a solution of the copies problem:
An option in the settings menu of Seaprint where the user can decide if when using the copy function then alternatively the print job should be repeated. But the name is the same.

Description:
I would like to make multible Copys of a page. But my printer don`t support it.

  1. I go to the setting of seaprint an activate the option for example “replace side copies with repeat print-job”

  2. Go back to the printer-settings-menu of the job.

  3. Select point three “Copies” and set for example it to 5

The result should be that the printer repeat the job 5 times instead of making 5 copies.

I don`t know if it is the best solution. But a way.

I have no idea why Brother decided to not support executing copies on the device, but I’d assume it is the same for all network protocols it speaks, and the clients needs to help it along. Probably it is low on RAM and doesn’t have any other storage.

I’m planning on swapping out the Qt http client for CURL some time in the future, that way i can hopefully run conversion and transfer in lock-step and save some time for larger documents. That should also let me repeat documents into that stream.

I don’t think multiple jobs, which is pretty much all i could do currently, is the way to go. Since the printer is already supposedly out of resources, i could hit rejects and timeouts. In either case, no need for a setting; the app would do it behind the scenes if needed. But yeah, won’t be happening quite yet… it’s a bit of work to swap out the http client.

I can’t make it the norm to handle translations word-by-word, or i wouldn’t do anything else. It would be better if those needing/wanting translations submit GitHub pull-requests, and for larger chunks of the remaining words.

If you want something more to complain to Brother support about, your printer is (probably) really misbehaving about backside orientation. It has an attribute, "pwg-raster-document-sheet-back-supported" which is set to "Rotated". The actual name should be "pwg-raster-document-sheet-back" and a valid value would be "rotated" with a lowercase R. If the printer indeed needs help rotating the backs of two-sided prints, this means you’d always get two-sided-short-edge even if you select long-edge, which is more normal.

@JSEHV
That should be everything except:

  • ICC profiles (without dumps i don’t see what i could tell the user)
  • rendering-intent (also lacking dumps)
  • Finishings (annoying multi-select format where “None” has precedence, and lacking dumps)

I also decided to disregard output-tray as it is just extra info to what values in output-bin means.

For media-type, the vendor-specific names show the logical/untranslated names and not the human-friendly ones. I have no printers with printer-strings-uri to test with, and it’s “good enough” for now.

Please test.

1 Like

@robthebold Can i assume Plaintext started working for you?

I forgot to get back to you with a report on that, sorry. :frowning:

Plain text prints fine on my Epson eco-tank inkjet, but still doesn’t on the Lexmark laser.

Hmm, i’ll give it some more thoughts then.

I think i found it…

Not sure why i didn’t load up your debug dump before, but it already highlighted one thing i needed to fix, and now this. Thanks for that.
Been faffing about with releases too much already today, so this will have to go in the next one.

1 Like