简体   繁体   English

从Adobe Acrobat Reader和DejaVu Reader进程中提取当前页面?

[英]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.

相关问题 使用Adobe Acrobat Reader打开pdf并跳到书签 - Open pdf with Adobe Acrobat Reader and jump to bookmark 使用Acrobat“添加允许对Adobe Reader进行注释” - “Adding Enable for commenting Adobe Reader” using Acrobat 编辑 PDF 后,Adobe Acrobat Reader DC 不会将当前文件夹作为另存为目标 - After editing a PDF, Adobe Acrobat Reader DC does not give the Current Folder as a Save As destination 检查是否安装了 Adobe Acrobat Reader - WebBrowser 控件中的 pdf - Check if Adobe Acrobat Reader installed - pdf in WebBrowser control Adobe Acrobat Reader 和 Foxit 阅读器显示 PDF Signature Valid 但 iText7 另有说明 - Adobe Acrobat Reader and Foxit reader show PDF Signature Valid but iText7 says otherwise 根据用户选择下载Acrobat Reader - Download Acrobat reader on user choice 如何确定Acrobat Reader版本? - How to determine Acrobat Reader version? 即使CreateNoWindow为true,PdfFilePrinter.Print仍会启动Adobe Acrobat阅读器 - PdfFilePrinter.Print still launches the Adobe Acrobat reader even if CreateNoWindow is true 如何在安装过程中检测计算机(不仅仅是浏览器)中的 Adobe Acrobat Reader 安装? - how to detect Adobe Acrobat Reader installation in computer (not just browser) during Setup? 从C#启动Acrobat Reader 10.0:如何最小化? - Launching Acrobat Reader 10.0 from C#: how to minimize?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM