title: remove extra blank lines
body: <p>I am using itext API in java to create and print the dynamic content in the PDF document. </p>
  
  <p>Below is the dynamic content which i need to add in the PDF document.</p>
  
  <pre><code>This is first line.
  This is second line.
  
  This is third printed line.
  
  This is fourth printed line.
  
  #ACC004342-123
  
  
  
  
  
  More information:
  This is fifth printed line.
  #ACC004342-123
  
  This is Sixth printed line.
  Some information goes here.
  </code></pre>
  
  <p>In the above shown sample text, their is a gap between #ACC004342-123 and More information: lines which i need to remove. </p>
  
  <pre><code>    public static File createInformationPdf(final List&lt;MyDocumentType&gt; content) throws AccServiceException
      {
          Document document = null;
          FileOutputStream fos = null;
  
          try
          {
               final String prefix = "letter";
          final File myPDF = File.createTempFile(prefix, ".pdf");
          document = new Document(PageSize.LETTER);
  
          fos = new FileOutputStream(temporaryPDF);
  
          PdfWriter.getInstance(document, fos);
          document.open();
  
          Font font = new Font(Font.FontFamily.COURIER,10);
     for (final MyDocumentType myDocument : content)
          {
              if (myDocument.getDocumentines() != null)
              {
                  final DocumentLinesType documentLines = myDocument.getDocumentLines();
                  for (final String line : documentLines.getDocumentLine())
                  {
            document.add(new Paragraph(line,font));
                  }
              }
    }
              document.close();
              return temporaryPDF;
          }
          catch (Exception e)
          {
           //log the exception
          }
  
      }
  </code></pre>
  
  <p>PS: Above is my java code, i just want to <strong>remove the more number of blank lines which are present between #ACC004342-123 and More information:</strong>  lines and just give one blank line between them. As i am getting that content from webservice call i need to handle in my java code. Hope iam clear now. Thanks.</p>