title: Merging Documents iText7
body: <p>I am adding text to an existing pdf.</p>
  <p>My code so far will add the text to the file but it deletes the original content that was on the pdf before, does anyone know how to fix this? So that the added text is on a new page and the original content of the pdf is on another page.</p>
  <pre><code>String field1 = (&quot;/Users/Desktop/&quot;) + selectedFile.getName();
  System.out.println(field1);
  PdfDocument pdfDoc = new PdfDocument(new PdfWriter(field1));
  PdfPage page = pdfDoc.addNewPage();
  PdfCanvas pdfCanvas = new PdfCanvas(page);
  Rectangle rectangle = new Rectangle(1,1, 600, 843);
  pdfCanvas.rectangle(rectangle);
  pdfCanvas.stroke();
  Canvas canvas = new Canvas( pdfCanvas, pdfDoc, rectangle);
  
  Scanner myObj = new Scanner(System.in);  // Create a Scanner object
  System.out.println(&quot;Enter text to add&quot;);
  String addText = myObj.nextLine();  // Read user input
  Paragraph p = new Paragraph(addText);
  Scanner myObj1 = new Scanner(System.in);  // Create a Scanner object
  
  PdfFont font = PdfFontFactory.createFont(FontConstants.HELVETICA_BOLD); 
  p.setFont(font);                                
  canvas.add(p);
  pdfDoc.close();
  canvas.close();
  </code></pre>