如何从C ++ / C#代码链接到word或pdf文档中的特定部分。 [英] How do I link from C++/C# code to a specific section in a word or pdf document.

查看:81
本文介绍了如何从C ++ / C#代码链接到word或pdf文档中的特定部分。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被要求用C ++编写应用程序的后端,而前端GUI是用C#编写的。应用程序在树视图中向用户显示一些参数,用户可以编辑这些参数。每个参数必须具有链接到并允许用户查看文档的特定部分的方法。该文件目前是单词和pdf。

或者,可以获取并复制文档相关部分的文本,以便在GUI上显示。



有没有办法做到这一点,如果没有,请问最好的选择是什么。



客户需要参数定义在一个传统的,可读的格式的文档中,可以打印出来,并且不希望在两个地方有定义,即不希望一个文件是人类友好版本,一个文件是软件一个用于显示参数信息。



我认为唯一的选择可能是将文本放在一个软件友好的文件中,可以在不同的部分读取和链接,然后有一些设施以更标准的格式输出,供人类打印和阅读。



任何人都可以建议最好的前进方式,使用什么文件类型等。



很多,非常感谢。

I have been asked to write the back-end of an application in C++ and the front-end GUI is being written in C#. The application displays some parameters to the user in a tree-view, and the user can edit these parameters. Each parameter must have a method of linking to, and allowing the user to view, a specific section of a document. The document is currently in word and pdf.
Alternatively, the text from the relevant section of the document could be obtained and copied in order to be displayed on the GUI.

Is there any way to do this, and if not, what is the best alternative, please.

The customer wants the parameter definitions in a document in a conventional, readable format and which can be printed out, and does not want to have the definitions in two places, ie does not want one file to be the human friendly version and one file to be the one that the software uses to display parameter info.

I am thinking that the only option may be to put the text in a software friendly file which can be read and linked to at different sections, and then have some facility to output this in a more standard format for printing and reading by humans.

Can anyone suggest the best way forward please, what file type to use etc.

Many, many thanks.

推荐答案

我不确定你为什么要用C ++编写后端,因为.NET(即C#)是更好的工具。 .NET提供完整的库支持,用于读取/写入Word文档 [ ^ ],您可以查看 iTextSharp [ ^ ]用于PDF文件。
I'm not sure why you are writing the backend in C++, since .NET (i.e. C#) is much the better vehicle for this. .NET provides full library support for reading/writing Word documents[^], and you could look into iTextSharp[^] for PDF files.


这篇关于如何从C ++ / C#代码链接到word或pdf文档中的特定部分。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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