[cups-devel] Need information of replacing PPD API to JobTicket

My Sadhukhan psadhukhan at gmail.com
Mon May 22 00:23:05 PDT 2017


Hi,

I was reading through the archives to understand how we can replace PPD
APIs to JobTicket but am not able to get much out of it as to how to
replace.
I am working on opensource Java printing system (
https://docs.oracle.com/javase/tutorial/2d/printing/index.html)
that deals with showing Java printer dialogs, set printing options and
submit printing jobs. We have PPD APIs to get native printer information in
unix platforms
code of which can be found in
http://hg.openjdk.java.net/jdk10/client/jdk/file/8af6f583c64e/src/java.desktop/unix/native/common/awt/CUPSfuncs.c
PPD APIs used in JDK are ppdOpenFile, ppdClose, ppdFindOption, ppdPageSize.
ppdFindOption() is used to get supported PageSize, InputSlot and Resolution
from installed printer.

I want to know if these API needs to be replaced with JobTicket API or we
can continue using the same. Right now latest JDK9 works fine with latest
ubuntu 16 and mac 10.12 which I guess use CUPS 2.2 but would like to know
if we will face any problem in future version of CUPS if we continue to use
these PPD APIs.
This information is important so as future version of Java continue to do
"printing" seamlessly in linux and mac, without facing problem of missing
API.
I read some of the mails in the archive which tells we can continue to use
PPD API for printer setup and all.

If we need to replace with JobTicket, can you please point me to
corresponding JobTicket APIs.
I am not very sure from the documentation (
https://www.cups.org/doc/api-ppd.html) how and what to replace to which.

Thanks & Regards
Prasanta


More information about the cups-devel mailing list