如何在axAcroPDF控件上获取pdf文件的文本选择部分并将其放入Clipboard.SetText(选中) [英] How to get a part of text selection of pdf file on axAcroPDF control and put it into Clipboard.SetText(the selected)

查看:194
本文介绍了如何在axAcroPDF控件上获取pdf文件的文本选择部分并将其放入Clipboard.SetText(选中)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我仔细阅读了大部分Youtube内容和一周搜索到Google。


我无法将剪贴板设置为axAcroPDF控件中的选定文本。


问题:Adobe Reader DC的文档部分与其他多个孩子的课程相同。


             也就是说,它没有唯一的类名,而是唯一的标题。



方法1:EnumWindows    --->它的使用应由唯一的标题名称制作,而不是通用的类名。



方法2:与My.Computer.Clipboard类似,我们应该使用主窗口句柄检测。


                   即使在这种情况下,也存在多个具有独特字幕名称的同类儿童的问题。


方法3:有没有办法使用iTextSharp获取一些选定的文本?在我看来,它没有这样的属性或方法。



解决方案

您好phpJSCSHARP,


感谢您发布此处。


>> 方法3:有没有办法使用iTextSharp获取一些选定的文本?在我看来,它没有这样的属性或方法。


对于您的问题,所选文本是什么意思?突出显示文字?如果是,基于我的搜索,我在SO中发现了一个关于
的线程
如何使用iTextSharp从PDF中提取高亮度文本
。你可以试试。


我希望这会对你有所帮助。


最好的问候,


I read through most of Youtube content and a week search into Google.

I failed to set the Clipboard to the selected texts from axAcroPDF control.

Problem: The document part of Adobe Reader DC has the same class to other multiple children.

              Namely, it doesn't have a unique class name, but a unique caption.

Approach 1 : EnumWindows    ---> Its use shall be made by the unique Caption Name, not common class name.

Approach 2: Similarly to My.Computer.Clipboard, we should use master window handle detection.

                   Even in this case, there's the problem of the multiple same classed children with a unique caption name.

Approach 3: Is there any way of getting some selected texts using iTextSharp? In my opinion, it has no such property or method.

解决方案

Hi phpJSCSHARP,

Thank you for posting here.

>>Approach 3: Is there any way of getting some selected texts using iTextSharp? In my opinion, it has no such property or method.

For your question, what does the selected text mean? Highlight text? If yes, based on my search, I found a thread in SO about How to extract highlighed text from PDF using iTextSharp. You could try.

I hope this would be helpful to you.

Best Regards,


这篇关于如何在axAcroPDF控件上获取pdf文件的文本选择部分并将其放入Clipboard.SetText(选中)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆