[英]Annotate the pdf file on the location clicked by user
I am having trouble in trying to find the solution for the below described problem. 我在尝试找到以下问题的解决方案时遇到了麻烦。
Annotate the PDF file when user clicks on specific location in pdf and then finaly save the pdf which in future opens at annotated location. 当用户单击pdf中的特定位置时,对PDF文件进行注释,然后最终保存pdf,以后会在带注释的位置打开该pdf。
How to approach this? 如何处理呢?
What I have tried. 我尝试过的。
minipdf
in python
, pdfbox
in java
to mention few relevant ones. 我试图找到各种与程序语言无关的库(因为程序语言不是依赖项)-在python
找到了诸如minipdf
库,在java
找到了pdfbox
,仅提及了一些相关的库。 Finally selected pdfbox
since it seemed to be mature enough to provide the solution closeby. 最终选择了pdfbox
因为它似乎已经足够成熟,可以提供附近的解决方案。 I had similar problem and have solved it the other way. 我有类似的问题,但已经用其他方法解决了。 In my case I am not opening PDF in Adobe reader, but in browser. 就我而言,我不是在Adobe Reader中打开PDF,而是在浏览器中打开。 So what I did is converted the pdf to html using python libraries (Let me know if you are interested, I will share different library names with their pros and cons). 因此,我所做的就是使用python库将pdf转换为html(如果您有兴趣,请告诉我,我将与他们的优缺点共享不同的库名称)。
Now that html can be edited easily. 现在,可以轻松地编辑html。 We can put hyperlinks, highlights everything there as source code is with us. 我们可以放置超链接,突出显示其中的所有内容,因为源代码与我们同在。
This workaround may be applicable to you if your front end is web based. 如果您的前端是基于Web的,则此变通办法可能适用于您。
PS: Wanted to post this workaround as comment, but couldn't due to little less reputation count as of now. PS:希望将此变通办法发布为评论,但由于目前信誉数很少而无法发布。 Hope, it won't be downmarked :) 希望,它不会被降级:)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.