title: Merging files into single pdf generate different view
body: <p>I´m trying to merge into one file with one or more <em>PDF</em> files stored files and a <em>JasperReports</em> file using <em>iText</em>.</p>
  
  <p>I did this method.</p>
  
  <pre><code>Map&lt;String, Object&gt; parameters = new HashMap&lt;String, Object&gt;();
  
  List&lt;String&gt; arquivos = new LinkedList&lt;String&gt;();
  arquivos.add("/Formulario/teste.jrxml");
  arquivos.add("/Formulario/teste.pdf");
  
  try {
      Document document = new Document(PageSize.A4);
      document.setMargins(0F, 0F, 0F, 0F);
      PdfCopy pdfCopy = new PdfCopy(document, new FileOutputStream("c:\\labels\\teste.pdf"));
      pdfCopy.setMargins(0, 0, 0, 0);
      document.open();
  
      PdfReader pdfReader = null;
      InputStream inputStream = null;
  
      for (String arquivo : arquivos) {
          inputStream = ReportService.class.getResourceAsStream(arquivo);
  
          if (FilenameUtils.getExtension(arquivo).equals("jrxml")) {
  
              JasperReport report = JasperCompileManager.compileReport(inputStream);
              JasperPrint jasperPrint = JasperFillManager.fillReport(report, parameters, new JREmptyDataSource());
              inputStream = new ByteArrayInputStream(JasperExportManager.exportReportToPdf(jasperPrint));
          }
  
          pdfReader = new PdfReader(inputStream);
  
          for (int i = 1; i &lt;= pdfReader.getNumberOfPages(); i++) {
              pdfCopy.addPage(pdfCopy.getImportedPage(pdfReader, i));
          }
          pdfCopy.freeReader(pdfReader);
          pdfReader.close();
      }
  
      document.close();
  } catch (DocumentException | IOException | JRException e) {
      e.printStackTrace();
  }
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/EWtzq.jpg" alt="enter image description here"></p>
  
  <p>I looked at google, but didn't found any answer. So whats wrong? It's possible to generate these pages in the same margins?</p>