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

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -