用于查看 PDF 坐标的免费工具

发布于 2024-12-28 08:55:21 字数 1807 浏览 1 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(11

╭ゆ眷念 2025-01-04 08:55:21

Apache PDFBox PDFDebugger 2.0.* 在状态栏中显示 PDF 坐标。在这里获取:
https://pdfbox.apache.org/download.cgi

下载 pdfbox-app-2.0。 *.jar 可在上面链接的命令行工具下使用。然后使用所需的文件运行以下命令。

  java -jar pdfbox-app-2.0.*.jar PDFDebugger "InputFile" 

将鼠标悬停在 pdf 页面上即可看到坐标。您可以从左侧选择特定页面,相应的页面将显示在右侧。注意 pdf 显示页面左下角的坐标,因此如果您想使用这些坐标提取一些文本,您需要从总高度中减去 y 轴,然后使用它。在下面的示例中,您必须使用 x:47 y:(792-522)=270

在此处输入图像描述

3.0.0 版本有一些与此问题无关的额外功能:
https://存储库。 apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-debugger/3.0.0-SNAPSHOT/

Apache PDFBox PDFDebugger 2.0.* displays PDF coordinates in the status bar. Get it here:
https://pdfbox.apache.org/download.cgi

Download the pdfbox-app-2.0.*.jar available under command line tools on above link. Then run the below command with the required file.

  java -jar pdfbox-app-2.0.*.jar PDFDebugger "InputFile" 

You would be able to see the coordinates by hovering the mouse on pdf page. You can select a particular page from left hand side and corresponding page will be displayed on right. Note pdf displays coordinates from lower left of the page so if you want to extract some text using these coordinates you need to subtract the y axis from the total height and then use it. In case of below example you will have to use x:47 y:(792-522)=270

enter image description here

The 3.0.0 version has a few extra features unrelated to this question:
https://repository.apache.org/content/groups/snapshots/org/apache/pdfbox/pdfbox-debugger/3.0.0-SNAPSHOT/

朱染 2025-01-04 08:55:21

我发现 Gimp 非常适合这个!它甚至有不同的测量单位,所以这是我的选择

I've found that Gimp is perfect for this! It even has different units of measure, so this is my choice

中性美 2025-01-04 08:55:21

为了解释@michael Z的答案,我发现了以下作品:

这些步骤适用于paint.net,但大多数图像处理程序(如The Gimp)应该类似:

  1. 在阅读器中打开pdf。
  2. 截图它。
  3. 粘贴到paint.net
  4. 选择图像>垂直翻转。
  5. 选择“视图”>“显示标尺”。
  6. 还要勾选像素。
  7. 调整图像大小以使用英寸并为 8.5 x 11(如果是美国字母)和 72 DPI。

现在使用矩形选择工具。图像是上下颠倒的,因此该工具的左上角是 .pdf 的左下角,右下角是 .pdf 的右上角。

仅供参考 - 在 Paint.Net 中,底部工具栏始终显示光标的 xy 坐标。

颠倒阅读文档会让您的眼睛有点肿,但至少您现在可以很好地估计文档上的位置!

我发现这个描述也很有帮助

To explain @michael Z's answer, I found the following works:

These steps are for paint.net, but most image manipulation programs like The Gimp should be similar:

  1. open the pdf up in reader.
  2. screenshot it.
  3. paste into paint.net
  4. choose image > flip vertical.
  5. choose view >show rulers.
  6. Also tick pixels.
  7. Resize image to use inches and be 8.5 x 11 (if it's American letter) and 72 DPI.

Now use the rectangle select tool. The image is upside-down, so the upper-left of the tool is the lower-left for the .pdf and the lower right is the upper-right for the .pdf.

FYI - In Paint.Net, the bottom toolbar always shows the xy coordinates of the cursor.

It makes your eyes a bit squiffy to read documents upside-down for while, but at least you can now get a pretty good estimate of the locations on the document!

I found this description helpful too

无力看清 2025-01-04 08:55:21

还有很好的旧 GhostView (gv) 显示坐标。
输入图像描述这里

Also good old GhostView (gv) shows coordinates.
enter image description here

最冷一天 2025-01-04 08:55:21
  1. CanOpener 是一个非常令人印象深刻的 PDF 文件处理工具。它作为 Acrobat Pro 的插件运行 - http://www.windjack.com/product/pdfcanopener/< /a>

  2. 另一个选择是使用福昕高级 PDF 编辑器,它允许您选择对象并查看每个对象的属性。

  3. 您可以使用诸如 Quick PDF Library 之类的库将图像渲染为 BMP 文件,然后自己编写一个小工具来滚动和缩放 BMP 文件,并报告回来协调。 http://www.quickpdflibrary.com - (注:我从事 Quick PDF 的咨询工作)

  4. 我我确信您可以将 PDF 加载到 Adob​​e Illustrator 中并获取状态栏中的当前坐标。

安德鲁

  1. CanOpener is a very impressive tool for working with PDF files. It operates as a plugin for Acrobat Pro - http://www.windjack.com/product/pdfcanopener/

  2. Another option would be to use the Foxit Phantom PDF Advanced Editor which allows you to select objects and see the properties of each object.

  3. You could use a library such as Quick PDF Library to render the image to a BMP file and then write yourself a little TOOL to scroll and zoom around the BMP file reporting back coordinated. http://www.quickpdflibrary.com - (Note : I do consulting work for Quick PDF)

  4. I am sure you could load the PDF into Adobe Illustrator and get the current coordinates in the status bar.

Andrew

月朦胧 2025-01-04 08:55:21

如果您尝试在不使用 Acrobat Pro 的情况下执行此操作(因为它不是免费的),则可以按照以下方法执行此操作。
1.下载并安装Acrobat Pro(是的,认真的)
2.激活试用版。如果你已经这样做了,那没关系
3.试用完成后你会失去Acrobat的一堆工具,但绝对不会失去光标坐标工具

这里是如何使用它
1.进入主菜单栏,点击查看,然后选择显示/隐藏
2. 从这里您可以选择光标坐标,瞧

If you are trying to do this without using Acrobat Pro because it not free, here is how you can do it.
1. download and install Acrobat Pro (yes seriously)
2. activate the trial version. if you already did this, it's okay
3. once the trial is done you will lose a bunch of tools from Acrobat, but you will definitely not lose the cursor coordinate tool

here is how to use it
1. go to the main menu strip, click view, and select show/hide
2. from here you can select cursor coordinate and voilà

浊酒尽余欢 2025-01-04 08:55:21

我使用 InkScape v 0.91 绘制 PDF 矩形以提取文本。它可以将 PDF 加载到画布中。打开文档以查看文档属性时,不要忘记将测量值更改为英寸 (Ctrl-Shift-D)。对于“页面”属性选项卡,将“默认单位”设置为英寸,对于“网格”属性选项卡,将“网格单位”设置为英寸。
此页面 PDF 坐标 解释了PDF 坐标系及其测量单位。

I use InkScape v 0.91 to map out PDF rectangles for extracting text. It can load a PDF into the canvas. Don't forget to change the measurements to inches (Ctrl-Shift-D) with the document open for the document properties. For the Page property tab set the Default Units to inches, for the Grids property tab set Grid Units to inches.
This page, PDF coordinates, explains the PDF coordinate system, and its unit of measurement.

疯狂的代价 2025-01-04 08:55:21

如果您不想为如此琐碎的任务安装任何繁重的软件,您可以在 xfdf 文件中创建注释,设置它们的位置,然后查看 PDF 中的哪个区域被注释。

您可以使用此模板:

<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
    <annots>
        <square style="solid" width="4" color="#000000" opacity="1" creationdate="D:20190624111403Z" flags="print" date="D:20190624111403Z" page="0" rect="0,0,135,390.6" subject="ROI" title="ROI" />
    </annots>
    <pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" />
</xfdf>

更改“rect”属性的坐标,将文件另存为xfdf。然后,当您在 Adob​​e reader 中打开 xfdf 文件时,阅读器将询问 PDF 文件的位置。找到PDF文档,您将看到在指定坐标处绘制的矩形。

In case you don't want to install any heavy software for such a trivial task, you can create annotations in a xfdf file, set their location and then see which area is annotated in PDF.

You can use this template:

<xfdf xmlns="http://ns.adobe.com/xfdf/" xml:space="preserve">
    <annots>
        <square style="solid" width="4" color="#000000" opacity="1" creationdate="D:20190624111403Z" flags="print" date="D:20190624111403Z" page="0" rect="0,0,135,390.6" subject="ROI" title="ROI" />
    </annots>
    <pdf-info version="2" xmlns="http://www.pdftron.com/pdfinfo" />
</xfdf>

Change the coordinates of the "rect" attribute, save the file as xfdf. Then, as you open the xfdf file in Adobe reader, the reader will ask for the location of the PDF file. Locate the PDF document, and you will see the rectangle drawn at the specified coordinates.

北斗星光 2025-01-04 08:55:21

我正在寻找一个工具来获取坐标以使用 PDFBox 库中提供的提取选项。 Gimp 方式非常适合我的目的。我在 Gimp 中打开 PDF 并将测量单位设置为点。

I was looking for a tool to get the co-ordinates to use extract option available in PDFBox library. Gimp way worked well for my purpose. I opened the PDF in Gimp and set the measuring unit to points.

走野 2025-01-04 08:55:21

ImageMagickGimp 更轻,可以为您提供沿鼠标指针的坐标。

There is ImageMagick which is lighter than Gimp and gives you coordinates along your mouse pointer.

未央 2025-01-04 08:55:21

Adobe Reader 有。

编辑->分析->地理空间定位工具

Adobe Reader has it.

Edit->Analysis->Geospatial Location Tool

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文