VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

Save Multi-images PDF as stream into SQlserver



Save Multi-images PDF as stream into SQlserver

Post by chen_jon »

Hi,

I used the following code to save multi-page images as PDF into table. But it only saves the last image:
bool firstImage=true;
System.IO.MemoryStream mem=null;
try
{
while (m_TwainObject.AcquireModal())
{
if (firstImage)
{
mem = m_TwainObject.GetImageAsStream(0, ImageFileFormat.PDF);
firstImage = false;
}
else
{
m_TwainObject.SaveImage(0, mem, ImageFileFormat.PDF);
}
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}

//code below to save into table
//dbService.SaveScannedImage(mem.ToArray());

My question: Can the current library save multi-image PDF? If yes, how?
Thanks for help


Re: Save Multi-images PDF as stream into SQlserver

Post by Alex »

Hello Chen,

Thank you for your message, your code is fully correct. We have found a bug in the SaveImage(int, Stream, ImageFileFormat) method in version 4.3.0.1 of library and now this bug is fixed. Please download the latest version (4.3.0.3) version of library from this page: https://www.vintasoft.com/download.html

Best regards, Alexander


Page 1 from 1: 1