简体   繁体   English

如何在PDF文件中找到字符串的确切坐标?

[英]How to find the exact co-ordinates of a string in a PDF file?

I am using iTextSharp to read some strings from a PDF file which are present in a table. 我正在使用iTextSharp从表中存在的PDF文件中读取一些字符串。 For this i need to provide the co-ordinates of the positions from where i need to read the strings. 为此,我需要提供我需要从中读取字符串的位置的坐标。 I need these co-ordinates in the form which can be passed into the System.util.RectangleJ object to create a rectangle around the string. 我需要这些坐标的形式可以传递给System.util.RectangleJ对象以在字符串周围创建一个矩形。 Can you tell me how do i find these coordinates? 你能告诉我如何找到这些坐标吗?

IText has a companion application called "iText RUPS" that will show you the format of a PDF document. IText具有一个名为“ iText RUPS”的辅助应用程序,它将向您显示PDF文档的格式。 It's a little crude and difficult to understand at first, but you will see coordinates, Embedded JavaScripts etc in the document. 刚开始时有点粗糙且难以理解,但是您会在文档中看到坐标,嵌入式JavaScript等。 It is a stand-application application so it is valid for iTextsharp too because it's using IText terminology to show you a document. 这是一个独立应用程序应用程序,因此它对iTextsharp也有效,因为它使用IText术语向您显示文档。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM