How do I resolve 'BadImageFormatException' when using the tools SDKs?

Q:

When I try the trial pdfa_sdk VB.Net sample in Visual Studio 2013, I receive the following error, thanks in advance for your help:

  • An unhandled exception of type ‘System.BadImageFormatException’ occurred in test.exe
    Additional information: An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)

A:

It sounds like you may need to set your Target CPU to x86.

Note that this advice applies to other tools SDKs: pdfsecure_sdk, pdfa_sdk, pdf2text_sdk, pdf2image_sdk, and pagemaster_sdk.

If you need a true .NET component another option would be to use PDFNet SDK with PDF/A Add-on.

To test drive this functionality please download PDFNet (http://www.pdftron.com/pdfnet/downloads.html) and run PDF/A sample: