Giter Site home page Giter Site logo

goipp's Introduction

goipp

godoc.org GitHub Go Report Card

The goipp library is fairly complete implementation of IPP core protocol in pure Go. Essentially, it is IPP messages parser/composer. Transport is not implemented here, because Go standard library has an excellent built-in HTTP client, and it doesn't make a lot of sense to wrap it here.

High-level requests, like "print a file" are also not implemented, only the low-level stuff.

All documentation is on godoc.org -- follow the link above. Pull requests are welcomed, assuming they don't break existing API.

goipp's People

Contributors

alexpevzner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

goipp's Issues

Get-Jobs returns invalid response

Consider the following code:

req := goipp.NewRequest(goipp.DefaultVersion, goipp.OpGetJobs, 1)
req.Operation.Add(goipp.MakeAttribute("attributes-charset", goipp.TagCharset, "utf-8"))
req.Operation.Add(goipp.MakeAttribute("attributes-natural-language", goipp.TagLanguage, "en-US"))
req.Operation.Add(goipp.MakeAttribute("which-jobs", goipp.TagKeyword, goipp.String("not-completed")))

// send request

What I get
The response is

Attributes: [
  {
    "Name": "job-id",
    "Values": [
      {
        "T": 33,
        "V": 128
      }
    ]
  },
  {
    "Name": "job-uri",
    "Values": [
      {
        "T": 69,
        "V": "ipps://EPSONB44453.local.:631/jobs/128"
      }
    ]
  },
  {
    "Name": "job-id",
    "Values": [
      {
        "T": 33,
        "V": 127
      }
    ]
  },
  {
    "Name": "job-uri",
    "Values": [
      {
        "T": 69,
        "V": "ipps://EPSONB44453.local.:631/jobs/127"
      }
    ]
  }
]

What I expect to get
The response should be logically grouped by the job. Currently we get 4 separate attributes and no easy way to tie them together, there should be a logical grouping as described in the spec:

The Printer object responds with one set of Job Object Attributes for each returned Job object

Example on how to print a PDF document

Hi,

Thanks for creating this awesome library!

I'm having some difficulties with printing a PDF document, Is it possible for you to provide an example for that?

Because I'm unsure what attributes I'll have to use and how I'll attach a document.

Thanks in advance,
Ramon

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.