SeaPrint - Network printing for SailfishOS

No, it wasn’t obvious otherwise I wouldn’t have used that method.

Thank you for your generous help.

I see the bracket error, I miscounted the brackets in my haste. I had also somehow corrupted the override code for the document format and was back to having the unsupported document error.

It all works now.

Thanks again.

1 Like

@Firefox84
Please post your issue here. That way you can give a more complete description, we don’t have to poll the store app for answers, or type long things on a touchscreen.

Basic questions for rendering:

  • What format is being sent to the printer? It will 99% say auto-detect, but what can it select from?
  • Does it work in the Documents app?
  • Does it work with pdftocairo?

And so post your debug info (rapidly tap printer 5 times with no document selected).

1 Like

Hey @attah ,
thanks really much for your deep interest in this matter. I don’t know if i can answer all your questions. I am only printing through your sea printer app on a Canon Pixma TS5150 network printer. It was a Hermes packaging label: Version 1.0.2. You can find samples on Google. Like i said, as a postcript document it did not print correctly, but as a picture yes. So my thought, was an error with vector graphics or also the barcode format.

hermes paketschein version 1.0.2 - Google Suche

Sorry for not being able to be more precise.

Thanks for your hard work for the community :slight_smile:

Greetings

So the input was Postscript? That SeaPrint only sends as-is to the printer. I’d be very surprised if an inkjet supported Postcript. So please share the debug info so i can check if the detection is giving false positives.

You’ll have to dig up an actual file for me to be able to look at it, not just spamware sites that may or may not let you download one after selling your soul. …and probably not in original format.

So i again tried to print the document, it is printing it, but like before without the barcode,
only the graphics. As it printed without an “error”, i cannot get a debug info. But i did a bit more research.

The document consists of:

Manufacturer: OpenPDF 1.3.26
Editor: JasperReports Library version 6.19.0-646c68931cebf1a58bc65c4359d1f0ca223c5e94
Format: PDF-1.5
1x Barcode in Code 39
1x Barcode in ITF-14

I hope this will get you some information. I this time tried to print it with my computer, and there the same document with barcodes, prints without any problems.

Greetings

So it is a PDF and not Postscript?
By all means do add information, but also please explicitly answer the questions i ask. It’s so much easier that way,

Of course you can get the printer debug info (not terminal output!) regardless of print job success/failure. Please read the instructions again.

If it is indeed a PDF (please just be clear about this); the questions from my first post still apply - i.e. does the document work in Documents/pdftocairo, and what transfer formats can you choose in the app?

Yes, it is a PDF. I just meant postscript for the type of graphic. Sorry for my this misinformation. I am not such an expert for bug tracking or bug reports. What i found out additionally is, that apparently i am printing with:

IPP Version: 1.1 2.0
Airprint-1.7

So apparently its just my fault and i am doing something wrong. Just ignore it, if you can’t reprodruce it. Thanks

I don’t think it is your fault. I suspect Poppler cannot render the document properly - but since you are not answering the questions or sharing a document it’s hard to move forward.

Hey @attah i later realized what you actually asked me:

What format is being sent to the printer? It will 99% say auto-detect, but what can it select from?

Yes it is on autodetect
The other options are

  • URF Raster
  • PWG-Raster
    Does it work in the Documents app?
    I haven’t installed the Seaprint share plugin, so i don’t even have a printing option there
    Does it work with pdftocairo?
    I am sorry, i cannot answer this question.

I tried the debug info, but somehow i can’t find out where the output comes.

I would give you the original document, but as there is personal data on it, and i don’t want to spread these over the internet… And if i anonymize them, maybe i will alter the file format.

After all i am just an end user using a network printing app. In the past it always worked fine, but with this example it didn’t. Thanks for all the work you are doing on this app :slight_smile:
Greetings

Thank you.

As in does the barcodes or whatever is failing render properly when viewed in the Documents app?
(We are testing the PDF rendering here).

…is a cli tool available in poppler-utils on pretty much any Linux distro, including SFOS.

Tap the printer 5 times rapidly without any document selected, i.e. at a fresh start of the app.
You will know when you succeed; the view changes.

1 Like

Yes in the documents app qr codes are rendered correctly.

Here the requested debug info:

Summary

{
“charset-configured”: {
“tag”: 71,
“value”: “us-ascii”
},
“charset-supported”: {
“tag”: 71,
“value”: [
“us-ascii”,
“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”: 99,
“low”: 1
}
},
“document-format-default”: {
“tag”: 73,
“value”: “application/octet-stream”
},
“document-format-preferred”: {
“tag”: 73,
“value”: “image/urf”
},
“document-format-supported”: {
“tag”: 73,
“value”: [
“application/octet-stream”,
“image/jpeg”,
“image/urf”,
“image/pwg-raster”
]
},
“finishings-default”: {
“tag”: 35,
“value”: 3
},
“finishings-supported”: {
“tag”: 35,
“value”: [
3
]
},
“generated-natural-language-supported”: {
“tag”: 72,
“value”: [
“en-us”
]
},
“identify-actions-default”: {
“tag”: 68,
“value”: “flash”
},
“identify-actions-supported”: {
“tag”: 68,
“value”: [
“flash”
]
},
“ipp-features-supported”: {
“tag”: 68,
“value”: [
“airprint-1.7”
]
},
“ipp-versions-supported”: {
“tag”: 68,
“value”: [
“1.1”,
“2.0”
]
},
“job-creation-attributes-supported”: {
“tag”: 68,
“value”: [
“copies”,
“finishings”,
“sides”,
“orientation-requested”,
“media”,
“print-quality”,
“printer-resolution”,
“output-bin”,
“media-col”,
“print-color-mode”,
“ipp-attribute-fidelity”,
“job-name”
]
},
“jpeg-features-supported”: {
“tag”: 68,
“value”: [
“none”
]
},
“jpeg-k-octets-supported”: {
“tag”: 51,
“value”: {
“high”: 16384,
“low”: 0
}
},
“jpeg-x-dimension-supported”: {
“tag”: 51,
“value”: {
“high”: 19200,
“low”: 16
}
},
“jpeg-y-dimension-supported”: {
“tag”: 51,
“value”: {
“high”: 19200,
“low”: 16
}
},
“landscape-orientation-requested-preferred”: {
“tag”: 35,
“value”: 5
},
“marker-colors”: {
“tag”: 66,
“value”: [
#00CFFF#F200FF#FFDA00”,
#000000
]
},
“marker-high-levels”: {
“tag”: 33,
“value”: [
100,
100
]
},
“marker-levels”: {
“tag”: 33,
“value”: [
20,
0
]
},
“marker-low-levels”: {
“tag”: 33,
“value”: [
15,
15
]
},
“marker-names”: {
“tag”: 66,
“value”: [
“Color”,
“Black”
]
},
“marker-types”: {
“tag”: 68,
“value”: [
“ink-cartridge”,
“ink-cartridge”
]
},
“media-bottom-margin-supported”: {
“tag”: 33,
“value”: [
500,
0,
1270,
600
]
},
“media-col-supported”: {
“tag”: 68,
“value”: [
“media-bottom-margin”,
“media-left-margin”,
“media-right-margin”,
“media-size”,
“media-source”,
“media-top-margin”,
“media-type”
]
},
“media-default”: {
“tag”: 68,
“value”: “iso_a4_210x297mm”
},
“media-left-margin-supported”: {
“tag”: 33,
“value”: [
340,
0,
640,
560,
600
]
},
“media-ready”: {
“tag”: 68,
“value”: [
“iso_a4_210x297mm”,
“iso_a4_210x297mm”
]
},
“media-right-margin-supported”: {
“tag”: 33,
“value”: [
340,
0,
630,
560,
600
]
},
“media-source-supported”: {
“tag”: 68,
“value”: [
“auto”,
“main”,
“rear”
]
},
“media-supported”: {
“tag”: 68,
“value”: [
“iso_a5_148x210mm”,
“iso_a4_210x297mm”,
“jis_b5_182x257mm”,
“na_letter_8.5x11in”,
“na_legal_8.5x14in”,
“jpn_hagaki_100x148mm”,
“na_number-10_4.125x9.5in”,
“iso_dl_110x220mm”,
“jpn_you4_105x235mm”,
“jpn_you6_98x190mm”,
“jpn_chou3_120x235mm”,
“jpn_chou4_90x205mm”,
“oe_photo-l_3.5x5in”,
“na_index-4x6_4x6in”,
“na_5x7_5x7in”,
“na_govt-letter_8x10in”,
“om_cardsize_55x91mm”,
“om_square_127x127mm”,
“custom_min_55x89mm”,
“custom_max_215.9x676mm”
]
},
“media-top-margin-supported”: {
“tag”: 33,
“value”: [
500,
0,
800,
600
]
},
“media-type-supported”: {
“tag”: 68,
“value”: [
“stationery”,
“photographic”,
“envelope”
]
},
“mopria-certified”: {
“tag”: 65,
“value”: “1.3”
},
“multiple-document-jobs-supported”: {
“tag”: 34,
“value”: false
},
“multiple-operation-time-out”: {
“tag”: 33,
“value”: 60
},
“multiple-operation-time-out-action”: {
“tag”: 68,
“value”: “abort-job”
},
“natural-language-configured”: {
“tag”: 72,
“value”: “en-us”
},
“operations-supported”: {
“tag”: 35,
“value”: [
2,
4,
5,
6,
8,
9,
10,
11,
59,
60
]
},
“orientation-requested-default”: {
“tag”: 35,
“value”: 3
},
“orientation-requested-supported”: {
“tag”: 35,
“value”: [
3
]
},
“output-bin-default”: {
“tag”: 68,
“value”: “face-up”
},
“output-bin-supported”: {
“tag”: 68,
“value”: [
“face-up”
]
},
“output-mode-default”: {
“tag”: 68,
“value”: “color”
},
“output-mode-supported”: {
“tag”: 68,
“value”: [
“color”,
“monochrome”,
“auto”,
“auto-monochrome”
]
},
“page-ranges-supported”: {
“tag”: 34,
“value”: false
},
“pages-per-minute”: {
“tag”: 33,
“value”: 11
},
“pages-per-minute-color”: {
“tag”: 33,
“value”: 4
},
“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”: [
“color”,
“monochrome”,
“auto”,
“auto-monochrome”
]
},
“print-content-optimize-default”: {
“tag”: 68,
“value”: “auto”
},
“print-content-optimize-supported”: {
“tag”: 68,
“value”: [
“auto”
]
},
“print-quality-default”: {
“tag”: 35,
“value”: 4
},
“print-quality-supported”: {
“tag”: 35,
“value”: [
4,
5
]
},
“print-scaling-default”: {
“tag”: 68,
“value”: “auto”
},
“print-scaling-supported”: {
“tag”: 68,
“value”: [
“none”,
“fill”,
“fit”,
“auto-fit”,
“auto”
]
},
“printer-alert”: {
“tag”: 48,
“value”: “code=other”
},
“printer-alert-description”: {
“tag”: 65,
“value”: “Non-critical alert - marker ink almost empty”
},
“printer-config-change-date-time”: {
“tag”: 49,
“value”: “1970-01-01T00:00:00Z”
},
“printer-config-change-time”: {
“tag”: 33,
“value”: 0
},
“printer-current-time”: {
“tag”: 49,
“value”: “1970-01-01T02:47:06Z”
},
“printer-device-id”: {
“tag”: 65,
“value”: “MFG:Canon;CMD:BJRaster3,NCCe,IVEC,URF;SOJ:CHMP;MDL:TS5100 series;CLS:PRINTER;DES:Canon TS5100 series;VER:1.120;STA:10;PSE:KNMC20747;CID:CA_IVEC1TYPE7_IJP;URF:V1.4,CP1,PQ4-5,RS600,SRGB24,W8,OB9,OFU0,DM3,IS1-18;”
},
“printer-dns-sd-name”: {
“tag”: 66,
“value”: “Canon TS5100 series”
},
“printer-firmware-name”: {
“tag”: 66,
“value”: [
“TS5100 series”
]
},
“printer-firmware-string-version”: {
“tag”: 65,
“value”: [
“1.120”
]
},
“printer-firmware-version”: {
“tag”: 48,
“value”: [
“1.120”
]
},
“printer-geo-location”: {
“tag”: 69,
“value”: “geo:0.00000,0.00000,0”
},
“printer-get-attributes-supported”: {
“tag”: 68,
“value”: [
“document-format”
]
},
“printer-icons”: {
“tag”: 69,
“value”: [
http://192.168.0.231/icon/printer_icon.png”,
http://192.168.0.231/icon/printer_icon_large.png
]
},
“printer-info”: {
“tag”: 65,
“value”: “Canon TS5100 series”
},
“printer-input-tray”: {
“tag”: 48,
“value”: [
“type=other;mediafeed=-2;mediaxfeed=-2;maxcapacity=-2;level=-2;status=5;name=auto;”,
“type=sheetFeedAutoRemovableTray;mediafeed=-2;mediaxfeed=-2;maxcapacity=-2;level=-2;status=5;name=main;”,
“type=sheetFeedAutoNonRemovableTray;mediafeed=-2;mediaxfeed=-2;maxcapacity=-2;level=-2;status=5;name=rear;”
]
},
“printer-is-accepting-jobs”: {
“tag”: 34,
“value”: true
},
“printer-kind”: {
“tag”: 68,
“value”: [
“document”,
“envelope”,
“photo”,
“postcard”
]
},
“printer-location”: {
“tag”: 65,
“value”: “”
},
“printer-make-and-model”: {
“tag”: 65,
“value”: “Canon TS5100 series”
},
“printer-more-info”: {
“tag”: 69,
“value”: “http://192.168.0.231/index.html?page=PAGE_AAP
},
“printer-name”: {
“tag”: 66,
“value”: “TS5100 series”
},
“printer-organization”: {
“tag”: 65,
“value”: " "
},
“printer-organizational-unit”: {
“tag”: 65,
“value”: " "
},
“printer-output-tray”: {
“tag”: 48,
“value”: “type=unRemovableBin;maxcapacity=-2;remaining=-2;status=5;name=face-up;stackingorder=lastToFirst;pagedelivery=faceUp;”
},
“printer-resolution-default”: {
“tag”: 50,
“value”: {
“units”: 3,
“x”: 600,
“y”: 600
}
},
“printer-resolution-supported”: {
“tag”: 50,
“value”: [
{
“units”: 3,
“x”: 600,
“y”: 600
}
]
},
“printer-state”: {
“tag”: 35,
“value”: 3
},
“printer-state-change-date-time”: {
“tag”: 49,
“value”: “1970-01-01T02:46:25Z”
},
“printer-state-change-time”: {
“tag”: 33,
“value”: 9985
},
“printer-state-reasons”: {
“tag”: 68,
“value”: [
“marker-supply-low-warning”
]
},
“printer-supply-info-uri”: {
“tag”: 69,
“value”: “http://192.168.0.231/index.html?page=PAGE_INK
},
“printer-up-time”: {
“tag”: 33,
“value”: 10026
},
“printer-uri-supported”: {
“tag”: 69,
“value”: [
“ipp://192.168.0.231/ipp/print”,
“ipps://192.168.0.231/ipp/print”
]
},
“printer-uuid”: {
“tag”: 69,
“value”: “urn:uuid:00000000-0000-1000-8000-001825206258”
},
“pwg-raster-document-resolution-supported”: {
“tag”: 50,
“value”: [
{
“units”: 3,
“x”: 600,
“y”: 600
}
]
},
“pwg-raster-document-sheet-back”: {
“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”: [
“V1.4”,
“CP1”,
“PQ4-5”,
“RS600”,
“SRGB24”,
“W8”,
“OB9”,
“OFU0”,
“DM3”,
“IS1-18”
]
},
“uri-authentication-supported”: {
“tag”: 68,
“value”: [
“none”,
“tls”
]
},
“uri-security-supported”: {
“tag”: 68,
“value”: [
“none”,
“tls”
]
},
“which-jobs-supported”: {
“tag”: 68,
“value”: [
“completed”,
“not-completed”
]
}
}

1 Like

Please use a “hide details” section to not make the post 1 km long.

So where does this leave us?
The printer supports only raster formats - thus SeaPrint (or rather Poppler) failed to render it.
…but since it works in the Documents application it is not the parsing/understanding part but somehow related to the Cairo rendering backend. (To be confirmed with pdftocairo).

I just want to say thanks for SeaPrint. It’s the most seamless printer experience on any of my machines. It Just works :slight_smile:

Is there a way to run it on normal Linux? Perhaps without the GUI?

2 Likes

You have been peeking in my repos, haven’t you?

ippposter ippclient from GitHub - attah/ppm2pwg: Misc printing format conversion utilities is just that.
Still slightly WIP, name likely to change, and option values are in IPP spec format (i.e. not in the help printout) etc. But that is the core of SeaPrint ported to plain C++. A bit clunky, but very usable. Plaintext, “Office” and image-to-image conversion is still left in Qt land for the foreseeable future.

Refactoring SeaPrint to use that is what’s for 2.0, whenever that happens. (The conversion functionality here has been used since 1.0, but now more logic and the IPP client has moved too).
With this separation i can test better, and it makes it reusable. Currently i’m doing fuzz-testing for the parser. After the first two bugs yesterday, i have now had it not crash with 30 fuzzer threads and over 3 hours runtime.

4 Likes

hello and thank you for this wonderful piece of software, i have used with satisfaction with an epson printer, but now i have a brother and it’s not working

printer is listed as unknown and if i tap on it i can see the remaining ink but all cartridges have no names and they are all black

tried printing but it does not work

printer says “receiving data”, seaprint says “print succesfull” but nothing actually gets printed

any hint?the printer is actually a Brother DCP-JW132W, which by the way as been recently added by gnome in their printer drivers (not that it matters, but it makes me think it should work)

This :point_up: has nothing to do with that :point_down:.

Apart from Brother clearly not being able to produce quality software.

I very much doubt that Gnome maintains printer drivers.
But SeaPrint is driverless anyway. Drivers for printers is 10+ years obsolete as a concept.

There are a few issues that it could be (or variations of the same):

  • SeaPrint detecting and trying a format the that printer doesn’t actually support, see “additional formats” in settings.
  • The printer more actively lying about what it supports.
  • The printer being bad at detecting what format was actually sent to it.

If you send me the the debug information (tap 5 times…) i can make a slightly more educated guess.
But the solution is more or less the same - actively select a “transfer format” that works.
You can save that as a default setting (per document type). You can also use the overrides file if necessary, e.g. to remove lies - but also to add names etc for the missing toner info. This was discussed at length in this thread before.

Note to self: Eat before answering.

Assuming it is variant 3 of the problem, i have actually made the reworked SeaPrint internals hold the printer’s hand even more with regard to format detection. The reintegration/uplift is just so tedious to do that i’m not spending time on it at the moment.

@aerique How did ippclient work out for you?

1 Like

Thank you for your answer, in fact it was n.3, as selected jpeg as format and printer started printing right away, it was previously set as auto set.

Anyway if it may help to something, this is the debug
https://paste.centos.org/view/3b9ac0c2

Ps, the reason why i cited gnome is the fact that on fedora 38 i had to install drivers from the brother website, now on 39/40, printer is driverless, so i guessed they had done something gnome side

I haven’t checked yet, sorry :grimacing:

I use the Overrides-Funktionally of Seaprint to show the unvisible information of my printer.
On the mainpage I See for example:

  • My printer
  • Brother MFC 9340
  • ipps://192.168.x.x

On the Printer Settings page I see on point:
“Make and Model”
Brother MFC 9340

Is there a way to display this differently?

On the main page for example:

  • My printer
  • MFC 9340
  • ipps://192.168.x.x

And on the printer settings page under the item:
“Make and model”
Brother MFC 9340