title: How to add additional PostScript commands in PS files
body: <p>My requirement is to add additional setpagedevice commands (eg: staple, punch, etc) like the below in a PS file.</p>
  <pre><code>**&lt;/Staple 3&gt; setpagedevice**      % Start the first subset to be stapled
  %Page 1
  %Page 2
  %Page 3
  **&lt;/Staple 0&gt; setpagedevice**     % End the first subset
  **&lt;/Staple 3&gt; setpagedevice**    % Start the second subset to be stapled
  %Page 4
  %Page 5
  %Page 6
  %Page 7
  **&lt;/Staple 0&gt; setpagedevice**     % End the second subset
  </code></pre>
  <p>I've to do this operation in a C# application. I would like to know whether there are any existing libraries that will allow me to insert setpagedevice commands in a PS file based on the specified page numbers. For example, I should be able to insert a staple setpagedevice command after 10th page in a PS file.</p>