Comments (3)
from cups4j.
Something like the following should work. Please give it a try and come back if it does not work for you.
CupsClient client = new CupsClient("localhost", 631);
Map<String,String> attributes = new HashMap<String,String>();
attributes.put("job-attributes", "media:keyword:A4");
PrintJob printJob = new PrintJob.Builder(new FileInputStream("cups4j.ps"))
.userName("user").mediaSource("ManualPaper").attributes(attributes).build();
client.getDefaultPrinter().print(printJob);
Is there anyway to specify the paper tray to use when printing?
from cups4j.
As it's not very useful mixing issues I started a new issue to talk about this here:
#13
I know this might seem out of scope for a linux/macos java library but in my app I support printing in all supported environments in which there is a java runtime including windows. It would be great if the library also implements windows as an operating system by detecting the OS it’s running on and calling windows to replicate the same functionality. You would then be able to write code which is truly OS independent. I specially need to send print jobs (jaserreports) to a user selected print queue.
…
On 2 Feb 2019, at 05:39, mntwinsfan @.***> wrote: Is there anyway to specify the paper tray to use when printing? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#12>, or mute the thread https://github.com/notifications/unsubscribe-auth/ATmdTo1HSkCn-wxMXgSknPAoTDpbjLbrks5vJSSegaJpZM4afbvH.
from cups4j.
Related Issues (20)
- cannot set resolution & metadata (user & jobname) not set HOT 5
- 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.