java - Print only one page of a multiple page pdf -
i have document has multiple pages. want print first pages , first page again.
is there attribute can set (printrequestattributeset) make sure prints first page? didn't find list of attributes can set printrequestattributeset.
you should use pageranges attribute print first page of document:
docprintjob printjob = printservice.createprintjob(); hashprintrequestattributeset attributes = new hashprintrequestattributeset(); attributes.add(new pageranges(1)); printjob.print(pdfdoc, attributes);
full list of supported attributes can found @ documentation page of printrequestattribute.
Comments
Post a Comment