Saving multiple page pdf to database
Posted: Thu Sep 09, 2010 8:28 am
Hi
I am upgrading an application from version 5 which scans one or more pages as pdf to a database using javascript. It is working fine for single pages but when scanning more than one page I receive an error 'wrong number of arguments or invalid property assignment' on the line
device.AcquiredImages.Last.Save(mem, 5);
here is the code:
do
{
acquireState = device.AcquireModal();
if (acquireState == 2) // image acquired
{
iCount++;
// save all acquired images as PDF stored in the memory
if (firstImage)
{
// get the first image as PDF stored in memory
mem = device.AcquiredImages.Last.GetAsStream(5);
firstImage = false;
}
else
{
// add image to PDF stored in the memory
device.AcquiredImages.Last.Save(mem, 5);
}
}
}while (acquireState != 0);
I am upgrading an application from version 5 which scans one or more pages as pdf to a database using javascript. It is working fine for single pages but when scanning more than one page I receive an error 'wrong number of arguments or invalid property assignment' on the line
device.AcquiredImages.Last.Save(mem, 5);
here is the code:
do
{
acquireState = device.AcquireModal();
if (acquireState == 2) // image acquired
{
iCount++;
// save all acquired images as PDF stored in the memory
if (firstImage)
{
// get the first image as PDF stored in memory
mem = device.AcquiredImages.Last.GetAsStream(5);
firstImage = false;
}
else
{
// add image to PDF stored in the memory
device.AcquiredImages.Last.Save(mem, 5);
}
}
}while (acquireState != 0);