title: How to change printing margins with JasperReports?
body: <p>I'm generating a report straight to printer, but am encountering some problems.  If I render it to screen and print the resulting PDF, it prints fine.  However, when I print directly, I get weird margin problems.  The target is a Zebra with 4"x3" labels.</p>
  
  <p>If I set the paper size like so:</p>
  
  <pre><code>MediaSizeName mediaSizeName=MediaSize.findMedia(4, 3, MediaPrintableArea.INCH);
  printRequestAttributeSet.add(mediaSizeName);
  </code></pre>
  
  <p>The result is a label up against the top margin, with a half inch left margin (should be none), the right margin is about .25" with part of the label chopped off, and the bottom maring is 1.5" with a lot of label chopped off.</p>
  
  <p>If I don't set the paper size, then the top and left margins are perfect (meaning, there aren't any, goes to the edge of the label), but I still end up with the big bottom margin (with stuff chopped off), and my right margin gets a lot bigger (chopped off at the same point in regards to the printed information).</p>
  
  <p>What am I missing here?</p>