Giter VIP home page Giter VIP logo

Comments (5)

harwey avatar harwey commented on June 23, 2024

Hi Marc,
have you tried to use the IPP way of specifying the resolution like 300,300,3. 3 Indicates dots per inch, 4 would indicate dots per cm.
As a hint for other attributes you might want to set: You can check possible printer attributes with the class org.cups4j.PrinterAttributes in the test package in the project. This class is a simple gui that will show all printers from localhost.

Regards Harald

from cups4j.

marcelser avatar marcelser commented on June 23, 2024

Hi Harvey,

I tried setting the resolution in ipp way with 300,600,3 which does not result in a NumberFormatException and the print job runs. But it is ignored although the printer reports of beeing able to accept resolution attribute. But maybe it also expects some kind of string or sth. But it always get's printed in the way the printer settings are set to, but not what I pass it as parameters

from cups4j.

harwey avatar harwey commented on June 23, 2024

Hi Marc,
You could try to set LogLevel debug2 in /etc/cups/cupsd.conf restart cups and check your logs to see if cups f.ex. tells that it ignores those values and why they are ignored.
This would help to see what exactly happens in your setup.
Also you might send a complete code sample to check your code.
Harald

from cups4j.

mm-mkkm avatar mm-mkkm commented on June 23, 2024

@marcelser
I had a similar sort of issue, when I was trying to define the .pageFormat("iso-a5"), it didn't print in a5 size as I expected. Rather was printing in a6, which is my printer's default setting.
Then I figured out that if I were to use .pageFormat("dnp6x8") instead, it was able to print correctly as expected in a5 size, though my printer's default settings still is a6.
So the real question is where did I get this string dnp6x8 ?. I got it from my printer's ppd file which is usually located in /etc/cups/ppd/. Probably, if you could look into your printer's ppd file and figure out what this text is and use it, I guess it should override the default settings. Please let me know how it goes. Curious to know how it went.
Cheers, Mani

from cups4j.

gmuth avatar gmuth commented on June 23, 2024

By using ipp-client you can set the resolution via printerResolution(300,600,DPI)

from cups4j.

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.