Giter VIP home page Giter VIP logo

Comments (5)

WillCHansen avatar WillCHansen commented on August 11, 2024

Hi Batajus,

I think your issue is related to the issue I just opened. (#43)

As a work around you can see my example of writing out the message to the printer manually.

from ipp.

williamkapke avatar williamkapke commented on August 11, 2024

I believe I have #43 fixed now.
For more information on how to select a media source, see: #46 (comment)

from ipp.

Batajus avatar Batajus commented on August 11, 2024

I found another solution for my issue:

var ipp = require('./../ipp');
var PDFDocument = require('pdfkit');
var concat = require("concat-stream");

var doc = new PDFDocument({margin:0});
doc.text(".", 0, 0);


doc.pipe(concat(function (data) {
	var printer = ipp.Printer("http://cp02.local.:631/ipp/printer");
	var msg = {
		"operation-attributes-tag": {
			"requesting-user-name": "Bumblebee",
			"job-name": "whatever.pdf",
			"document-format": "application/pdf"
		},
		"job-attributes-tag":{
			"media": [ "tray-2" ] // <- This worked for me
		}
		, data: data
	};
	printer.execute("Print-Job", msg, function(err, res){
		console.log(err);
		console.log(res);
	});
}));
doc.end();

I used this (4.2.11) for my solution.

But i will try your fix as soon as possible and inform you about the results ;-)

from ipp.

wifiprintguy avatar wifiprintguy commented on August 11, 2024

@Batajus, just a recommendation: if you are going to quote an IPP specification for an IPP attribute definition, for instance "job-priority", you might want to quote the latest non-obsolete revision for IPP, which is RFC 8011 section 5.2.1.

from ipp.

Batajus avatar Batajus commented on August 11, 2024

@wifiprintguy thanks for the tipp ;-)
I referenced the old one, because I have used it and not the latest one. But here's the link to the respective paragraph in the new one.

@williamkapke, I tried the latest version and now everything works fine, so thanks for the fix =)

from ipp.

Related Issues (20)

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.