title: c# iText7 - interate throuh pdf images and change size and dpi
body: <p>I have a lot of very large PDF files, which contains huge images (scans).
  The goal is to open PDF , read all images , change dpi, resolution and compress it.</p>
  
  <p>How to managed it with Itex7?
  And generally ho to iterate through all images in PDF?</p>
  
  <pre><code>using (iText.Kernel.Pdf.PdfReader pdfReader = new iText.Kernel.Pdf.PdfReader(inputPdfFile))
  {
      using (iText.Kernel.Pdf.PdfDocument pdfDocument = new iText.Kernel.Pdf.PdfDocument(pdfReader))
      {
          //??
          //foreach (var image in pdfDocumentImagesList)
          //{
              //  //image.SetNewDPI()                 
          //}
      }
  }
  </code></pre>