Home › Forums › TWAIN Direct › System.BadImageFormatException
- This topic is empty.
- AuthorPosts
- Brian Liu
Hi,
I download TwainDirect sample code from https://github.com/twain/twain-direct.
I build windows x64 version, including TwainDirect and pdfraster solution. It’s fine to run TwainDriect bridge and execute startCapturing, but throw exception at below code.TwainLocalOnTwain.cs, line 859,
blSuccess = PdfRaster.CreatePdfRaster
(
szPdfFile,
m_szEncryptionProfileName,
Config.Get(“pfxFile”, “”),
Config.Get(“pfxFilePassword”, “”),
szMeta,
abImage,
a_iImageOffset,
szPixelFormat,
szCompression,
twimageinfo.XResolution.Whole,
twimageinfo.ImageWidth,
twimageinfo.ImageLength
);The exception message is
System.BadImageFormatException: Could not load file or assembly. ‘pdfras_writer_managed, Version=0.14.7263.27603, Culture=neutral, PublicKeyToken=null’I am sure pdfraster solution is build by set x64.
Thanks.
markmTo be honest, I’ve not checked the 64-bit code path recently. I usually do 32-bit, since I’ve been focused on making sure the TWAIN Bridge works, and most old drivers are 32-bit. I’ll give it a shot and get back to you.
- AuthorPosts