Save Multi-images PDF as stream into SQlserver

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

Moderator: Alex

Post Reply
Posts: 1
Joined: Wed Nov 05, 2008 6:48 am

Save Multi-images PDF as stream into SQlserver

Post by chen_jon » Wed Nov 05, 2008 6:54 am


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;
while (m_TwainObject.AcquireModal())
if (firstImage)
mem = m_TwainObject.GetImageAsStream(0, ImageFileFormat.PDF);
firstImage = false;
m_TwainObject.SaveImage(0, mem, ImageFileFormat.PDF);
catch (Exception ex)

//code below to save into table

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

Site Admin
Posts: 1474
Joined: Thu Jul 10, 2008 2:21 pm

Re: Save Multi-images PDF as stream into SQlserver

Post by Alex » Wed Nov 05, 2008 5:44 pm

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 of library and now this bug is fixed. Please download the latest version ( version of library from this page:

Best regards, Alexander

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest