【发布时间】:2021-06-20 11:52:28
【问题描述】:
我的任务是比较我使用以下库的两个 pdf:
https://github.com/red6/pdfcompare
问题是,我必须忽略 pdf 的某些部分,我需要为此提供坐标。如何获得文档中提到的坐标?我研究过,但使用的所有工具都只显示 x 和 y 坐标,我这里需要 4 个维度。
exclusions: [
{
page: 2
x1: 300 // entries without a unit are in pixels. Pdfs are rendered by default at 300DPI
y1: 1000
x2: 550
y2: 1300
},
{
// page is optional. When not given, the exclusion applies to all pages.
x1: 130.5mm // entries can also be given in units of cm, mm or pt (DTP-Point defined as 1/72 Inches)
y1: 3.3cm
x2: 190mm
y2: 3.7cm
},
{
page: 7
// coordinates are optional. When not given, the whole page is excluded.
}
]
我想忽略 PDF 中的以下内容
谢谢。
【问题讨论】:
-
"我需要 4 个维度" 你需要 2 个点的坐标:一个矩形的左上角和右下角。
-
谢谢@Olivier,我是新手,你能指导我怎么做吗?
-
您可以尝试使用 DrawPrintTextLocations.java 示例。