title: How to set printing document name in java
body: <p>I am printing 4 copies of a document. Each copy has only a single line change.
  While saving it through "microsoft print to PDF", I am getting dialogue box to set location path and  has default name of document as "java printing". 
  How can I programmatically change name of the document?</p>
  
  <p>I have read about the <code>DocumentName</code> attribute class, but I don't know how to use it with a <code>printerJob</code> object.</p>
  
  <p>Please help with an example.</p>