AirPrint on MorphOS?
  • Order of the Butterfly
    Order of the Butterfly
    Primax
    Posts: 184 from 2021/7/2
    Therefore I pointed to the article which I hoped could be a good starting point:

    https://www.amiga-news.de/en/news/AN-2025-02-00083-EN.html
    AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon X1650 / AmigaOS 4.1 Final Edition / MorphOS 3.19
    Amiga1200 / Blizzard 1230 IV PiStorm32-lite / 128 MB RAM / AmigaOS 3.9
  • »17.03.25 - 05:48
    Profile Visit Website
  • Just looking around
    jvaltane
    Posts: 19 from 2015/1/15
    Printer things reminded me yesterday that I made quick and dirty non-threaded MorphOS port from GhostPDL. Needed gpcl5 command when I tested my network printer. Used printers IPP port for printing.

    GhostPDL includes GhostScript, GhostPCL and GhostXPS.
    See details: https://www.ghostscript.com/releases/index.html

    Patch for latest release 10.05.0 + instructions how to cross compile without ixemul:
    https://jvaltane.kapsi.fi/morphos/patches/ghostpdl/

    Purpose was to get both MorphOS "new" printing system and TurboPrint to use network printer.

    To get it work I did something like:

    1. binary patched with hexeditor some MOS binaries in MOSSYS:Data/Printer. MOS versions write stderr to output file unlike *nix. Have to report bugs about those problems as soon as I find my notes

    2. make TurboPrint to use LaserJet and write to file in RAM:

    3. wrote couple of scripts for file conversion and net printing etc. I used gpcl5 to convert outputs to my Samsung printer + just copy file to properly configured NETPAR:

    4. wrote small utility in C which uses Dos.library Notify system to detect file/dir-modifications, deletes and creates. ...and run net printing scripts. (MUI prefs)

    5. replaced one command in MOSSYS:Data/Printer dir. I do not remember which one, but make it just convert to suitable format


    Mission was accomplished.

    I'm not familiar with AirPrint, but what I read it sounds like you just need to convert files to suitable format and probably some way copy (with or without SSL) that file to AirPrint (IPP) address. Like I did to printer.

    I'll share later detailed information + sources + scripts.
  • »04.04.25 - 18:00
    Profile
  • Just looking around
    jvaltane
    Posts: 19 from 2015/1/15
    I hope I'm not completely wrong:

    Found some links about IPP and AirPrint. AirPrint just provides service that can print different fileformats and use DNS-SD (Avahi, Bonjou etc. -service). Even older IPP printers seems to be way of find printer/service and communication protocol.

    How to setup CUPS printing server which provides IPP/AirPrint
    CUPS implement IPP everywhere
    How to Use the Internet Printing Protocol explains how IPP works.

    To understand what IPP can provide I tested with Avahi tools what DNS-SD tells about devices:

    avahi-browser --all -r prints:

    Pretty old Samsung network printer:
    Code:
    = enp1s0 IPv4 Samsung CLP-320 Series (samppa)               Internet Printer     local
    hostname = [SEC0015997412EE.local]
    address = [192.168.1.99]
    port = [631]
    txt = ["Punch=0" "Staple=F" "Sort=F" "Collate=F" "Bind=F" "PaperCustom=T" "Duplex=F" "Copies=F" "Color=T" "Binary=T" "Transparent=T" "MDL=CLP-320 Series" "CMD=SPL,PCL5E,PCL6,FWV,EXT,WSP,SCR,CMP,CMS,EWU" "MFG=Samsung" "adminurl=http://192.168.1.99" "product=(Samsung CLP-320 Series)" "ty=Samsung CLP-320 Series" "priority=51" "qtotal=1" "note=Olohuone" "txtvers=1"]


    CUPS "AirPrint" Avahi service:
    Code:
    = enp1s0 IPv4 AirPrint Samsung-CLP-320N @ mustanaamio       Internet Printer     local
    hostname = [mustanaamio.local]
    address = [192.168.1.1]
    port = [631]
    txt = ["pdl=application/octet-stream,application/pdf,application/postscript,application/vnd.cups-raster,image/gif,image/jpeg,image/png,image/tiff,image/urf,text/html,text/plain,application/vnd.adobe-reader-postscript,application/vnd.cups-pdf" "printer-type=0x2900c" "printer-state=3" "product=(GPL Ghostscript)" "note=Samsung CLP-320N" "rp=printers/Samsung-CLP-320N" "URF=none" "Transparent=T" "qtotal=1" "txtvers=1"]


    Looks quite different when compared to each other. Printer provides information about low level things and CUPS what fileformats it supports like PDF, PS, TXT. Printer still needs drivers/filters to convert printable data to right format. Both are advertised as "Internet Printer", but command avahi-browse _universal._sub._ipp._tcp prints only CUPS/Avahi services.

    I have not tested CUPS AirPrint yet. Real Printers IPP with Android-phone.
  • »17.04.25 - 21:30
    Profile
  • jPV
  • Yokemate of Keyboards
    Yokemate of Keyboards
    jPV
    Posts: 2141 from 2003/2/24
    From: po-RNO
    I once took a look how these things are supposed to work, and downloaded at least couple of docs.. The Printer Working Group's IPP Implementor's Guide v2.0 and IPP Everywhere v1.1 at least. It seems to be quite doable, but boring work when doing properly.. but basically shouldn't be too hard to make on our platforms. It seems to be fun that you can basically send documents without converting them in any other format.
    The wiki based MorphOS Library - Your starting point for MorphOS
    Software and other things made by me
  • »18.04.25 - 05:29
    Profile Visit Website
  • Just looking around
    jvaltane
    Posts: 19 from 2015/1/15
    Yes, doable.

    Requirements are something like:
    * DNS-SD client. There are plenty of implementations in c/c++ already
    * IPP implementation. libcups might help also.
    * SSL support. Works also without, but good to have.

    I had at some point Linux server running Python script which checks if files has been added at specified place and then prints+removes it. Setup is easy to use with any operating system which can transfer files with any method (FTP, SMB, NFS, SFTP, etc). Next step would be to add convert support to foreign fileformats. For example. Atari printing system was problematic until I found recoil

    BTW. Actual CUPS does DNS-SD service itself. Probably still needs to add Avahi server for Linux. I did not manage add IPP Everywhere printer from Linux or Android. Probably I'm using too old CUPS server. It complains about missing attributes.
  • »18.04.25 - 07:07
    Profile