使用 IcePdf
(1.8 版),我将 SwingController
集成到我的 JPanel
中,以便在我的应用程序中使用它。由于显示到 SwingController
中的页面位于 Controller 中的特定位置。
我如何获得相对于整个 SwingController
的页面坐标(例如左上角,如果使用 PDF 坐标则为左下角),以便我可以获得相对于 JPanel 的页面坐标
?
我在 IcePDf 的 API 中进行了深入搜索,但我不知道该怎么做。谢谢。
最佳答案
试试这个
swingController.getDocumentViewController()
.getDocumentView().getViewModel().getPageBounds(0).getLocation();
关于java - SwingController 获取页面坐标,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35150703/