Getting DPI of PDPage/PDDocument to calculate PDF Dimensions Accurately
问题 I'm looking to get an accurate size of each page in a PDF as part of a Unit test of PDF's I'll be creating. As I'm dealing with PDFs that have many different page sizes in each document the code returns an ArrayList of dimensions. AFAIK each page can have its own DPI setting too. I've done quite a bit of Googling but I've only come up with this which only gives me part of the answer, as I still need to work out what DPI each page is. PDFBox - find page dimensions public static ArrayList<float