I want to know if the PDF file is composed of scanned images or electronically generated.
In order to do this, we decided to judge it as a scanned image document if the following conditions are satisfied.
Each page of the PDF consists of one image
The images are very similar to the size of the MediaBox.
Using this, we can see that the width and height of the XImage object can be obtained in pixels, and the width and height of the MediaBox can be obtained in point.
If the DPI is fixed (200 for example), it can be converted to (MediaBox.getWidth () / 72) * 200, but we could not find any clue to calculate it.