Solid Framework core features like PDF to Word conversion can now be used outside of the .NET environment by native C++ projects.
In truth, this has always been the case but until now Solid Documents has not published these interfaces. In an effort to avoid dependencies between customer product versions and Solid Framework versions, we've published source code to this interface (rather than simply .h and .lib files). The linking is done using LoadLibrary/GetProcAddress so it does not depend on project specific setting like structure alignment, etc.
You can always get the latest version of the lightweight C++ wrapper by downloading solidframeworknative.zip. This API will work with the current version of the regular Solid Framework download.
Getting Started
Getting started is surprisingly simple:
1. Create a new C++ project in Visual Studio. Make sure to set C++ options to (these are the defaults anyway):
- Use Unicode Character Set
- Use Multi-threaded DLL Runtime Library
2. Add the .cpp and .h files to your project from solidframeworknative.zip
3. #include "solidframeworknative.h" where you use the native API
4. Unzip the contents of SolidFramework.dll to the executable folder of your project (typically .\Debug or .\Release). For more information on how to extract the contents of this DLL, read this earlier blog post about extracting the contents of SolidFramework.
5. Write some code that calls the Solid Framework APIs.
6. Run.
For step 4, you could use the sample code below to get started (obviously you'll set the source file to a PDF on your machine). Here is the entire sample project (without the Solid Framework files). This is a VS 2005 project which means it will correctly import into later versions like VS 2008 and Express.
We've named the classes, methods and properties in the C++ API to correspond very closely to their C# counterparts in Solid Framework. enum values for option properties have the same order and naming as in C#.
This was done deliberately in order to make all the C# documentation and samples apply equally to the C++ interface. As with the C# interfaces, we've made a concious effort to follow Microsoft's .NET component design guidelines. The classes follow the usual create-set-call pattern of:
- create object
- set properties
- do action
- use results
In addition, we've made sure that the naming conventions are intuitive. Often using the Object Browser and IntelliSense in Visual Studio is enough to answer the obvious "what now" questions.
Limitations
Based on customer demand, this initial release implements:
- License class
- PdfToWordConvert class (including supporting enums and event handlers)
- PdfToExcelConverter class
- PdfToTextConverter class
- PdfToPdfAConverter class
- ConversionResult class


1 comments:
We've added PdfToExcelConverter, PdfToTextConverter, and PdfToPdfAConverter objects to the C++ API. Both the sample project and solidframeworknative zip files have been updated.
Post a Comment