Thanks for pointing to a2ps, i guess that is as standard as it gets. But wow, is it opinionated by default. I managed to dumb it down with a handful of switches - i want something simple enough to not get complaints on that it does something wrong. People whining about wanting it to do something more complicated are easier to dismiss
Do you mean using actual QPrinter? I guess that is a no-go since it wonāt be allowed in harbour (or i could make a stand-alone thing that uses it, but still). Or do you mean that wanting to render text on QImages sounds suspiciously similar to what i would have to do in order to make use of it? I guess that is what iād prefer to avoid if reasonable.
Hmmm, maybe it got fixed by someone else and came for free with the uplift. Or maybe the rebuild heuristics arenāt quite right and all files didnāt get recompile. Anyway, it doesnāt really matter really. Great job!
I failed, as always, to get git to actually show the right files. (fatal: remote error: Please use the https: protocol to connect to anongit) Maybe upstream had moved? Anyway git couldnāt just trust your repo and was being stubborn. Did i mention i hate git?
So cloned anew and on to building, and here iām pretty certain that it is a matter of PEBKAC⦠Iām building with a sfdk apply and sfdk build, and several dependencies could not be found⦠i guess that was a requirement for the uplift? But where should i have found those, and how do people that actually know what they are doing build things?
Edit: and i was just going to ask if we could/should propose to package calligraconverter in the official builds, but you go there first. Would be very nice if i didnāt have to maintain packaging that.
Well thatās indeed the idea that it gets compiled and distributed officially yes. Iām pretty sure it could, at least in a separated package, but hopefully installed by default (maybe).
For compilation, I donāt know, never used sfdk, I should but Iām accustomed to my routine of running the docker, and typing there mb2 -t SailfishOS-4.0.1.48-armv7hl -s rpm/calligra.spec build. Itās indeed doing all the download for the dependencies⦠I guess that sfdk is doing the same thing, but Iāve no idea and cannot help, sorry : ( Iāve seen in the release notes of the latest SDK that they fixed an issue with the docker not having the repository listing refreshed or something like that. Maybe itās your case ?
The patches for Calligra have been accepted upstream earlier today, so tomorrow, Iāll rebase my work in SailfishOS on upstream/master and submit a MR for converter inclusion. Weāll see.
I still have to figure out why it doesnāt like the deps for this, but the old mainline version was just fine.
mb2 did indeed yield the exact same results.
Just for the benefit of those following along here. I finally got the new version of Calligra to install, and it works great (as expected).
Now i can start plumbing it in to SeaPrint.
@dcaliste, @direc85 I can only recommend to go with a laser printer that supports PDF natively, at least if you will mainly be using it for documents and similar. For photos, laser often doesnāt do a great job.
Good ones seems to be available already from ā¬200. Make sure it has duplex, or you will regret it. If the reported issues are anything to go by Brother printers are a bit picky with formats and finicky in general, or really popular. Probably both. As you might have spotted, I have a fondness of OKI printers⦠not that they are especially awesome, but they have been consistently good enough so far.
If native PDF is not in the cards, look for āIPP Everywhereā, which mandates PWG-raster and JPG (for color printers). Anything that supports AirPrint should also work.
Thanks, will do! Currently it behaves.
Edit: or maybe not⦠I tried a presentation, and it segfaulted. Youāll get an email shortly.
As iām not really aware of any problems currently, and 4.1 seems just around the corner, i have been holding off releasing this properly. But there are many new things coming in SeaPrint. Obviously odt and doc(x) support being the biggest (the dependency wonāt come until SFOS 4.2, unless you build it yourself). You can now also save settings per printer, and raster compression performance has been improved 30-35%.
There has also been updates to the UI, with format icons on the first page, and visual separation of default settings and actual choices made.
(more detailed changelog on GitHub, even more details in the commits)
Feedback, especially on interacting with saving settings, and the UI updates would be much appreciated.
Related to all this there has been new strings added that are untranslated for the time being. So if you like SeaPrint in your native language, feel free to contribute.
Sort of. And i definitely agree it would be useful. (Mentioned it back in 25 Feb)
But there is a bit of thinking left to do. Not many printers support it natively, so there are two types of issuesā¦
For those who do, it still seems i need to re-linebreak them with \r\n (maybe even reflow is desirable)⦠and iām a bit sceptical to writing that code myself, but i canāt see any existing solution that will keep \f characters.
For those who donāt, i need to get it in to pdf. Some will need going on to raster, some Postscript, but those steps i have available to reuse. The existing tooling seems to start in Postscript, which isnāt optimal, and honestly taking on dependencies, especially that arenāt already in the repos, feels a bit silly for plaintext.
So if you want to help me think, letās talk at some point.
The logic thing to do (at least sounds logic to me) is have something convert txt to a format all printers support.
However i have no idea about all those stuff and its better to ask help from someone that knows about coding.
Good point, had actually not explicitly tested (just seen that sailfish-office doesnāt use Calligra for this), but it doesnāt seem to handle plaintext.
Unknown Calligra MimeType ātext/plainā
I havenāt seen sailfish-office do pagination for plaintext, but the code kinda looks like it would.
However it doesnāt look very reusable for rendering to pdf or images, so probably it doesnāt matterā¦
Youāre right it seems that Calligra converter cannot open plain/text mime type. Thatās too bad. Iāll try next week to give a closer to look to see if it can be added simply.
Sailfish-office is using a specific handling for plain/text, that would not be convenient I think.
You probably knew this already, but calligrawords does a great job both with files that needs reflow, and with ones that are more āformattedā plaintext, like RFCs. (Using the āas isā setting for end of paragraphs.) So if that result had be had in calligraconverter, that will definitely do the trick. Iāll just ignore native plaintext handling on printers and consider it a sub-genre of āofficeā documents.
Edit: no, scratch that, it is good but not perfect. They only mostly agreed on the amount of text that fits on a page. Sometimes it is off-by-one, and \f seems to have been ignored.