Hi fellow self-hosting lemmings,

In an SME setting, I’m looking for a service to regularly fetch mails from an IMAP server and print incoming mails and attachments on a local network printer based on rules (e.g., only print mails where the subject contains a specific word.)

Does a solution like that exist, ideally with a browser frontend to set it up?

Thank you!

  • ikidd@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    11 months ago

    Nicely done, for not a JS guy. I’d have be a while longer figuring out that process.

    Not sure what to suggest on the scaling, that might be happening in your conversion to PCL, you might be able to execute that as a ghostscript process on the host and then just stream the resulting file out of the filesystem to the print node, or even just drop it to a queue folder and cut the IPP node out entirely to eliminate it as a source of the scaling.

    Edit: https://github.com/NickNaso/ghostscript4js

    • tofublOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      edit-2
      11 months ago

      A very welcome compliment after this ordeal. Thank you! :)

      The cleanest way to solve the scaling issue would probably be to go into the pdf2pic module and hack it open to accept the “pcl:fit-to-page” option that GraphicsMagick (the underlying software package doing the actual conversion from PDF to PCL) supports. (Supposing it actually does what it says. I’m not so sure about anything in printer land anymore.)

      But since this whole thing is for internal documents only and the scaling can probably be estimated by choosing better values for width/height to account for printer margins I most likely won’t bother.

      Thanks again for suggesting Node-RED. I’m very happy with the result.