使用Java打印PDF双面打印 [英] Printing a PDF duplex using Java

查看:890
本文介绍了使用Java打印PDF双面打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台连接到CUPS的打印机,它支持双面打印,如何通过我的java例程将其设置为打印单面打印或双面打印?

i have a printer attached to CUPS, it supports duplex printing, how can i set it to print simplex or duplex through my java routine?

我试图使用使用ASET add和addViewerPreference的itext库没有任何运气。

i have attempted using itext libraries using the ASET add and the addViewerPreference without any luck.

任何人都可以提供一些建议吗?

can anyone offer some suggestions?

推荐答案

使用IPP时,您应该设置作业属性
sides =双面长边

When using IPP you should set the job-attribute sides = two-sided-long-edge

https://docs.oracle.com/javase/7/docs/api/javax/print/attribute/standard/Sides.html

这篇关于使用Java打印PDF双面打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆