Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify the trayno programatically in Java #6122

Open
sksundaramoorthy opened this issue May 18, 2023 · 0 comments
Open

How to specify the trayno programatically in Java #6122

sksundaramoorthy opened this issue May 18, 2023 · 0 comments

Comments

@sksundaramoorthy
Copy link

Have built a tray element programmatically and passed the same configuration to the CUPS API. However, I'm having trouble getting the lotsheet printer to recognize this tray element, which always picks up the paper from the default tray instead.

Attrunutes are below.

StringBuilder attributeString = new StringBuilder();
attributeString.append("fitplot:boolean:true");
attributeString.append("#");
attributeString.append("multiple-document-handling:keyword:separate-documents-collated-copies");

if (StringUtils.isNotBlank(trayAttribute)) {
attributeString.append("#");
attributeString.append("media:keyword:");
attributeString.append(trayAttribute);
}

Also tried with below attributes.
//attributeMap.put("job-attributes", "media=A4 -o InputSlot=Tray2");
//attributeMap.put("job-attributes", "media=A4 -o InputSlot=Tray-2");
//attributeMap.put("job-attributes", "media=A4 -o InputSlot=Tray 2");
//attributeMap.put("job-attributes", "InputSlot=Tray 2");

Please let me know the correct approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant