Page 1 of 1

Save Multi-images PDF as stream into SQlserver

Posted: Wed Nov 05, 2008 6:54 am
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

Posted: Wed Nov 05, 2008 5:44 pm
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: http://www.vintasoft.com/download.html

Best regards, Alexander