Click here to Skip to main content
15,912,977 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted

1 solution

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.
 
Share this answer
 
Comments
Jackie Lloyd 6-Feb-14 5:14am    
Thanks very much :) , the interop looks really useful. The C# backend has come about because I'm writing my code within a pre-existing framework that was written here in C++, so C# is not an option for that part. I presume there is nothing so useful for C++.
Richard MacCutchan 6-Feb-14 6:10am    
You presume right unfortunately. It is possible to access Word docs through C++ but it is a somewhat more difficult interface than that provided by .NET. I don't know of anything for PDF files. It is, of course, possible to write the document handling code in C# and then provide an interface between the C# and C++ code, which would, in theory, make it easier.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900