Some test text!

Is there an AnyCPU version of PDFNet?

Contents

Is there currently "AnyCpu" version of PDFTron PDFNet SDK, or is it only available as 32bit and 64bit versions separately?
Some errors related to 32-bit and 64-bit binaries are listed below

linkIs there currently "AnyCpu" version of PDFTron PDFNet SDK, or is it only available as 32bit and 64bit versions separately?

PDFTron SDK for .NET is a true .NET component and can be used by any .NET language (e.g. C#, VB.NET, etc). The assembly doesn't use PInvoke or COM interop and does not require/depend on other unmanaged non-system components. At the same, PDFNet for .NET, is a 'mixed' component and is not 'verifiable' since it has some native dependencies (e.g. for printer driver support, XPS printing, GDI, efficient image libs, COM interop etc - these features are by definition impossible to do in 'verifiable' .NET components).

'Any CPU' selection means different things in different versions of Visual Studio, however you can definitely make an 'AnyCPU' configuration and make the app work correctly on both x86, x64, and other platforms. The issue is not PDFNet specific any there are many solutions:

  1. The simplest option is to select 'x86' in your project solution. With this option the app will work on both x86 and x64 system.
  2. A bit more complicated option is that you select 'Any CPU' mode in your app. As part of the app install you would copy/install a version of PDFNet that matches the target hardware (i.e. x86, x64). This is possible because both versions have the same signature/cert.
  3. Alternatively you can register both the 32-bit as well as 64-bit DLLs in GAC.
  4. In case you do not want to haver any app 'installer' and you still want to use 'Any CPU' there are also multiple options some which are outlined here http://stackoverflow.com/questions/108971/using-side-by-side-assemblies-to-load-the-x64-or-x32-version-of-a-dll.

linkSome errors related to 32-bit and 64-bit binaries are listed below

Error: error LNK2019: unresolved external symbol __imp__TRN_PDFNetInitialize.
Solution: You probably have mixed up the 32bit and 64bit versions of PDFNetC. Make sure that the DLL architecture matches the project platform setting.

Error: The application was unable to start correctly.
Solution: Same as above, but at runtime you have the wrong PDFNetC.dll being loaded.

Error: warning MSB3270: There was a mismatch between the processor architecture of the project being built.
Solution: The architecture of the PDFNet dll and your project do not match. Either both the DLL, and project, should be x64, or x86. Don't mix and match. If using AnyCPU, it is not recommended for use with PDFNet as this can result in errors in some cases. Please see above for details.

Get the answers you need: Support

Contents

Is there currently "AnyCpu" version of PDFTron PDFNet SDK, or is it only available as 32bit and 64bit versions separately?
Some errors related to 32-bit and 64-bit binaries are listed below