title: JasperReport: Is it possible to set Initial Zoom in PDF?
body: <p>I have a JasperPrint that is exported to PDF and it's showing embedded into a web page.</p>
  
  <p><strong>Is it possible to set the initial zoom in any way?</strong></p>
  
  <p>I know how to do it with POI (by javascript), but I don't find the way to add the JavaScript code in Jasper...</p>
  
  <p>EDIT:</p>
  
  <p><strong>Thanks to the link of @ AlexK</strong>, I found the solution :)</p>
  
  <pre><code>public ByteArrayOutputStream fillPDF(JasperPrint jasperPrint) {
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
  
      try{
          JRPdfExporter exporter = new  JRPdfExporter();
          exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
          exporter.setParameter(JRPdfExporterParameter.PDF_JAVASCRIPT, "this.zoom = 70;");
          exporter.setParameter(JRPdfExporterParameter.OUTPUT_STREAM,baos); 
          exporter.exportReport(); 
      }catch (Throwable e){
      }
      return baos;
  }
  </code></pre>