title: Getting Image DPI in PDF files using iText
body: <p>I 'm trying to get information about scanned images that are saved into PDF files through iText (using Java).</p>
  
  <p>Using <a href="https://stackoverflow.com/questions/15639593/how-to-find-images-in-a-pdf-and-draw-another-on-top-of-it/">the answer and comments</a>, I got width and height (either through Matrix, or through BufferedImage). The idea was to use the <a href="https://stackoverflow.com/questions/6981439/browsing-pdf-page-content-problem-with-color-space-and-dpi">answer</a> here to calculate the DPI, but I am a bit lost.</p>
  
  <p>Are these values (width and height) in pixels or points? Is there any other way to achieve this? There are a lot of answers on how to scale and save an image to a PDF file, but I didn't find any on how to read the width/height/scale of an image and be confident about the result.</p>