我有一个任务来比较两个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中忽略以下内容

谢谢。
发布于 2021-06-21 20:34:51
感谢@Olivier指导我。我使用GIMP加载PDF,并选择要忽略的区域的左上角区域,然后复制该位置。我对右下角做了同样的事情。然后,我将右上角粘贴到x1和y1中,将右下角粘贴到x2和y2中。现在,它像预期的那样工作。谢谢你们所有人。
附件中的截图显示了我所做的事情。
https://stackoverflow.com/questions/68055558
复制相似问题