This topic and its replies were posted before the current version of LEADTOOLS was released and may no longer be applicable.
#1
Posted
:
Saturday, March 3, 2012 6:11:02 PM(UTC)
Groups: Registered
Posts: 13
Hello,
First time using 17.5. Currently using 13.5 with VB6 and the COM libraries. We use Leadtools to convert our PDF to TIFF (G3/G4). I am able to convert 1 page PDF but not multiply pages. This is the C++ code:
I load the PDF as follows:
nRet = L_LoadBitmap (Data.szFilename, &Data.BitmapHandle, sizeof(BITMAPHANDLE),
Data.FileInfo.BitsPerPixel, ORDER_BGR, &LoadFileOption, &Data.FileInfo);
I then save as TIFF as follows:
nRet = L_SaveBitmap(FSParm.szFileName ,
pBitmapHandle,
FILE_CCITT_GROUP4,
FSParm.nBitsPerPixel,
FSParm.nQFactor,
&SaveFileOption );
I am so sure what to do next
#2
Posted
:
Sunday, March 4, 2012 8:22:04 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Hello,
You will need to load and save the pages using a loop to go through all pages.
Please take a look at help topic "Converting Multi-page Images" in our C DLL help file and see how the "for" loop is used to load a page from PDF, then append it to the TIFF file.
#3
Posted
:
Monday, March 5, 2012 3:43:46 AM(UTC)
Groups: Registered
Posts: 13
Thanks, will try and let you know.
#4
Posted
:
Friday, March 9, 2012 4:01:07 AM(UTC)
Groups: Registered
Posts: 13
Finally got back to this task with some level of success. I am not able
to get a multi-page tiff but of the first page only. That all the
pages are the same. See section of code below
Data.FileInfo.uStructSize = sizeof(FILEINFO);
nRet = L_FileInfo (Data.szFilename, &Data.FileInfo, sizeof(FILEINFO), 0, &LoadFileOption);
for(icount=1; icount <= Data.FileInfo.TotalPages; icount++)
{
Data.FileInfo.PageNumber = icount;
if ( nRet == SUCCESS )
{
/*Load the selected file into a bitmap */
nRet = L_LoadBitmap (Data.szFilename, &Data.BitmapHandle, sizeof(BITMAPHANDLE),
Data.FileInfo.BitsPerPixel, ORDER_BGR, &LoadFileOption, &Data.FileInfo);
SaveFileOption.PageNumber = icount;
nRet = L_SaveBitmap(m_strFileOut, //FSParm.szFileName ,
&Data.BitmapHandle, //pBitmapHandle,
FILE_CCITT_GROUP4,
0,
0,
&SaveFileOption );
}
}
#5
Posted
:
Friday, March 9, 2012 2:28:03 PM(UTC)
Groups: Registered
Posts: 13
Found the mistake I was making..
loadfileoption.pagenumber was not set.
Thanks for the help
#6
Posted
:
Friday, March 30, 2012 7:43:06 AM(UTC)
Groups: Registered
Posts: 13
Another question on this topic:
Would this function works for both 32bit and 64 bit windows OS? If not what exactly do I need to do to make if 32 and 64 bit compliant.
#7
Posted
:
Sunday, April 1, 2012 3:39:05 AM(UTC)
Groups: Guests
Posts: 3,022
Was thanked: 2 time(s) in 2 post(s)
Hello,
Our toolkit in general, and the code sample I told you about in particular, support both 32-bit and 64-bit OS's.
If you want to create one EXE that can be deployed on both 32-bit and 64-bit operating systems, you will have to build it as 32-bit and deploy the 32-bit DLLs.
If you want to work with larger memory sizes and benefit from 64-bit Windows, you must create 64-bit EXE and use with it our 64-bit DLLs.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.