TWAIN Working Group

Newsletter Signup
Donate
Help keep TWAIN free
  • About TWAIN
    • What’s New?
    • News
    • Events
    • Membership
    • Consider a Donation
    • Contact Us
  • Why TWAIN?
  • Developers
    • Driver Developer
    • Application Developer
    • TWAIN Features
    • Specification & Tools
    • Self Certification Process
  • Support Forums
  • Scanner End-User
  • Find Certified Drivers
    • Facebook
    • LinkedIn
    • Vimeo

System.BadImageFormatException

Forums › TWAIN Direct › System.BadImageFormatException

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • December 2, 2019 at 4:49 am #51715 Reply
    Brian Liu
    • Topics - 101
    • Replies - 195
    • Total Posts - 296

    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.

    December 6, 2019 at 11:08 am #52066 Reply
    markm
    • Topics - 101
    • Replies - 195
    • Total Posts - 296

    To 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.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: System.BadImageFormatException
Your information:




Quick Links

Service Providers
TWAIN Support Forums
Membership
Contact Us
Privacy Policy

Newsletter Signup

TWAIN Working Group Family

TWAIN Working Group
TWAIN Direct®
TWAIN Resources
TWAIN Certified Drivers
PDF/raster

  • Facebook
  • GitHub
  • LinkedIn
  • Vimeo

Recent Topics

  • PDF/R For who and where?
  • Making searchable PDF with PDF/R
  • Backward compatibility with PDF/A and traditional PDF
  • could not open the twain source. Make sure there is a valid source for your sca
  • Changing TWAIN driver defaults
  • Quarterly Newsletter
  • TWAIN Working Group Membership
  • Logo Usage
  • TWAIN License
  • Contact Us
Privacy Policy • Privacy Tools • Copyright © 2021 TWAIN Working Group • by iHwy, LLC • Log in

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.