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 -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -