[英]Extract current page from Adobe Acrobat Reader and DejaVu Reader processes?
I want to make a C# program which will save bookmarks for pdf and djvu files. 我想制作一个C#程序,它将保存pdf和djvu文件的书签。 How can I find out the current page number from the AcroRd32/DjVuReader process?
如何从AcroRd32 / DjVuReader进程中找到当前页码 ?
You may be able to do it via a the DDE protocol which is supported by Adobe Acrobat. 您可能可以通过Adobe Acrobat支持的DDE协议来做到这一点。 Check the DDE Spec ( Adobe Inter Proces Communication Support Paper ) for Acrobat.
检查Acrobat的DDE规范( Adobe Inter Proces通信支持文件 )。
Now, if you are not familiar with DDE, let me give you a brief overview - it is a Microsoft (Windows) based IPC protocol similar to named pipes (Windows), COM(OLE), WCF, MSMQ (for IPC), RPC, etc.. Actually MSMQ is probably in my opinion the closest. 现在,如果您不熟悉DDE,让我给您一个简短的概述-它是基于Microsoft(Windows)的IPC协议,类似于命名管道(Windows),COM(OLE),WCF,MSMQ(用于IPC),RPC等等。实际上,我认为MSMQ可能是最接近的。
Basically with DDE you connect to a DDE server (local machine that's running acrobat), and send messages/commands to it. 基本上,使用DDE可以连接到DDE服务器(运行acrobat的本地计算机),并向其发送消息/命令。 The trick to it is that DDE is not natively supported by .NET (any version).
诀窍是.NET(任何版本)都不支持DDE。 To get around this issue, you can use the NDDE wrapper (written in Managed C++) on CodePlex
要解决此问题,可以在CodePlex上使用NDDE包装器(用托管C ++编写)
I have sucessfuly been able to force AcroRd32.exe to open file, print specific pages to a network printer... etc using this library (NDDE), which is why I would recommend it. 我已经能够使用此库(NDDE)强制AcroRd32.exe打开文件,将特定页面打印到网络打印机...等等,这就是为什么我推荐它的原因。 It sure as hell beats paying for a Acrobat Development Toolkit license.... grrrrrr.
可以肯定,买Acrobat开发工具包许可证真是难过……grrrrrr。
In either case, I hope this helps. 无论哪种情况,希望对您有所帮助。 You might be able to do it via OLE automation & COM but I have never tried it.
您可能可以通过OLE自动化和COM来做到这一点,但我从未尝试过。
Thanks, 谢谢,
<bleepzter/>
PS. PS。 Please mark my question if it has helped you in your endeavors :) Thanks!
请注明我的问题,如果它对您的工作有所帮助:)谢谢!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.