Comments (5)
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.
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.
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.
@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.
By using ipp-client you can set the resolution via printerResolution(300,600,DPI)
from cups4j.
Related Issues (20)
- Publish new version with latest in master HOT 2
- CupsGetPrintersOperation make-and-model requested but not captured
- cups printer getPrinterState() returns 'null' HOT 4
- Inability to use secure print feature after setting job-password attribute
- Make getPrinters return CupsPrinter objects with a correct isDefault() return value
- May I ask a question about number-up-layout?
- Override duplex settings HOT 4
- who published 0.7.9? HOT 6
- getState() returning null
- getPrinters() returns no printers when I use 192.168.0.213 instead of 127.0.0.1 HOT 4
- In java cups library want to fetch all the jobs attributes of given print job with the completion time? HOT 1
- Unable to add the ipp network printer to cup server HOT 1
- how can i get media source info【tray】 HOT 2
- Cups4j sometimes does not connect correctly
- Compatibility with cups 1.6.3 HOT 1
- printJob 的color方法设置不起作用,大神们该如何设置,跟cups的版本有关系么?
- Failed resolution of: Lorg/apache/http/client/config/RequestConfig;
- There seems to be a version conflict issue with the pache HttpClient library.
- HTTPS protocol is not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cups4j.