Giter Site home page Giter Site logo

cnlpete / harbour-seaprint Goto Github PK

View Code? Open in Web Editor NEW

This project forked from attah/harbour-seaprint

0.0 2.0 0.0 1.14 MB

๐ŸŸ๐Ÿ–จ Network printing for Sailfish OS

License: GNU General Public License v3.0

QMake 1.31% QML 28.84% Shell 0.32% C++ 35.54% JavaScript 29.12% C 4.86%

harbour-seaprint's Introduction

SeaPrint

Network printing for Sailfish OS

SeaPrint icon

Print PDFs and images over IPP (Internet Printing Protocol).

Most, but not all, IPP-capable printers are supported.

A minority of printers support only PCL and/or their own proprietary formats, these are not supported.

Format support

For PDFs or plaintext, your printer needs to support one of the following formats:

  • PDF
  • Postscript
  • PWG-raster
  • URF-raster

For Postscript, your printer needs to support Postscript natively. (SeaPrint just sends it as-is)

For printing "Office" files, like .doc(x) and odt, you need to install calligraconverter (from the calligra package in Sailfish OS 4.2 onwards). Then the printer support follows that of PDF.

For images, your printer needs to support one of the following formats:

  • PNG
  • JPEG
  • PWG-raster
  • URF-raster
  • PDF
  • Postscript

For printing JPEG images, transferring the unaltered image has priority and the printer does the scaling. Other image formats are lossless and SeaPrint does scale-and-rotate to fit, so JPEG has lowest prio there.

Printers with any of these IPP certifications and derivative standards should likely be supported:

  • IPP Everywhere
  • AirPrint
  • Mopria
  • WiFi Direct

(obviously SeaPrint is unaffiliated and uncertified)

Dealing with misbehaving printers

SeaPrint, in contrast to other printing clients, is not concerned with dealing with the idiosyncrasies of individual printers. If some manufacturer can't make a reasonably well-behaved printer that's on them, not something for SeaPrint to cover for.

There is however a possibility for you, the user, to override certain attributes (to fix names, claimed format support etc.) in the IPP data structure.

To see what your printer sent, aka "the debug info", tap it 5 times rapidly without any document selected. The format is a SeaPrint-specific JSON equivalent representation of the IPP binary data.

Create the file /home/$USER/.config/net.attah/seaprint/overrides. (NB: New location for 1.0, and may move again)

This file should contain a JSON structure, with the outermost key(s) being "what attribute to match on" (uuid recommended if available), the next level is "if this value matches". Everything beneath that is what to inject/replace into the printer's attributes (see debug info above).

Example:

{
  "printer-uuid": {
    "urn:uuid:xxx-yyy-zzz-111-1234567890": {
      "printer-name": {
        "tag": 54,
        "value": "A better name"
      },
      "document-format-supported": {
        "tag": 73,
        "value": [
          "application/octet-stream", "application/pdf"
        ]
      }
      "some-other-attribute-name": {
        "tag": <some tag number>,
        "value": <some value>
      }
    }
  }
}

Dealing with printers using other protocols

SeaPrint only supports IPP, not port 9100 pjl/pcl raw, lpd/lpr or anything else.

Just use a PAPPL or CUPS as an intermediary. A shared printer there is IPP by definition.

harbour-seaprint's People

Contributors

attah avatar dashinfantry avatar ensag-dev avatar wheelseal avatar carmenfdezb avatar black-sheep-dev avatar atlochowski avatar cnlpete avatar karry avatar quenty31 avatar vigejolla avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.