简体   繁体   English

在PDF工程图中以x,y坐标插入图钉/观测

[英]Inserting pin/observation with x,y coordinate in a PDF drawing

We use PDF drawings to let users in the construction industry insert errors, deviations, observations, etc. into floor plans etc. Today we convert the PDF to a png/jpg to get x,y coordinates in the image. 我们使用PDF图纸让建筑行业的用户将错误,偏差,观察结果等插入到平面图等中。今天,我们将PDF转换为png / jpg,以获取图像中的x,y坐标。 This gives us the possibility to insert a observation "pin" on any mobile device, PC or Mac, and show it on another device on the same location in the drawing. 这使我们可以在任何移动设备(PC或Mac)上插入观察“针”,并在图形中相同位置的另一台设备上显示观察针。 Converting the PDF to a image either reduces quality or file size. 将PDF转换为图像会降低质量或文件大小。 My question is: How can we insert our observations directly into a pdf in our mobile/web apps, and keep it in the exact same location when opening it in different devices (different screen sizes and resolutions) The files should not be to big neither, as they are used on mobile devices in the field. 我的问题是:我们如何才能将观察结果直接插入移动/网络应用程序中的pdf文件中,并在不同的设备(不同的屏幕尺寸和分辨率)中打开文件时将其保存在完全相同的位置。文件也不应该太大,因为它们在现场用于移动设备上。

First thought - use two systems of coordinates - global(independent) and local(dependent of actual device). 首先考虑-使用两个坐标系-全局(独立)和局部(取决于实际设备)。 For example you can keep global pixel coordinates and after have some helper function on each platform to translate those to local PDF coordinates. 例如,您可以保留全局像素坐标,然后在每个平台上都具有一些辅助功能,以将其转换为本地PDF坐标。

Hope this helps. 希望这可以帮助。 If not please add some actual code of your current coordinate calculation. 如果没有,请在当前坐标计算中添加一些实际代码。

You don't need to convert to image to add "pins" to a PDF on mobile. 您无需转换为图像即可将“图钉”添加到移动设备上的PDF。 If you use the Adobe Reader (it's free) on both desktop and mobile, you'll be able to add an icon with a comment... even in the form of an arrow or pin to your document. 如果您在台式机和移动设备上都使用Adobe Reader(免费),则可以添加带有注释的图标...甚至可以是箭头或固定在文档上的形式。 The comment will then appear in the same place on the PDF in all Readers. 然后,注释将在所有Reader中的PDF的相同位置出现。 If you previously had set the geo-spatial location on that PDF, you'll even be able get the position of the pin in real-world units, measure the PDF in real-world units, and create a report of the pin locations with their longitude and latitude. 如果您先前已在该PDF上设置了地理空间位置,则甚至可以以实际单位获取图钉的位置,以实际单位来测量PDF,并使用以下方法创建图钉位置的报告:他们的经度和纬度。

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

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