title: iTextSharp Resize each page to fit the pagesize
body: <p>I have a .pdf document which has for example 7 pages. I split this document into 7 .pdf document, so it means that each document has only one page. But mainly I need to make fit the content of pages. So delete whitespaces, margins, resize. Have you got some simple advice? I add links for images and also code for split pdf document. Thank you for your response.</p>
  <p>INPUT:</p>
  <p><a href="https://i.stack.imgur.com/8A9b3.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8A9b3.png" alt="enter image description here" /></a></p>
  <p>DESIRED OUTPUT:</p>
  <p><a href="https://i.stack.imgur.com/LpBGs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LpBGs.png" alt="enter image description here" /></a></p>
  <p>CODE:</p>
  <pre><code>        public void PdfSplitDocument(string filename)
      {
          String path = &quot;C:/Doc/&quot; + filename;
          String result = &quot;d:/output/result&quot;;
          PdfCopy copy;
          PdfReader reader = new PdfReader(path);
  
          for (int i = 1; i &lt;= reader.NumberOfPages; i++)
          {
  
              Document document = new Document(PageSize.A4, 0, 0, 0, 0);
              copy = new PdfCopy(document, new FileStream(result + i + &quot;.pdf&quot;, FileMode.Create));
              document.Open();
              copy.AddPage(copy.GetImportedPage(reader, i));
              document.Close();
  
          }
  
      }
  </code></pre>