Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Thursday, March 27, 2008 9:45:45 AM(UTC)
jreasonor

Groups: Registered
Posts: 1


I'm using the following code in Leadtools 14.0 with VB6 to convert several JPEGS into multi-page PDFs:

               For n = 1 To ColImages.count
                    intReturn = LEAD1.Load(ColImages(n), 0, 0, 1)
                    intReturn = LEAD1.Save(strDestFile, FILE_RAS_PDF_JPEG, 24, 2, SAVE_APPEND)

              Next
                    Call FreeBitmap(frmMain.LEAD1)

Many of these will be comprised of 500+ jpegs and it takes about 5 minutes for each of those.  I do not need the image display and need to find a better way of doing this rather than to append to my file 500+ times.  I'm wondering if the LoadMemory/LoadArray will solve my problem and am hoping for an example if this is the way to go.  Thanks for your help.

 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Friday, March 28, 2008 3:45:53 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


Unfortunately, this code is so simple, there's not much more you can do to speed it up.

Since the files are coming in from disk, you don't want to change how you're loading it because you'll only add more processor ticks by loading them into memory, then loading them into the Lead Main control from memory.

In the saving you might be able to save a little bit of time by saving to memory (SaveMemory/SaveArray) the same way you are now and then saving that buffer out to disk.  This could go either way though.  If your final PDF file is larger than the amount of memory you have available, then it will actually be slower than doing what you are right now becuase using virtual memory will be slower than simply writing the files to disk.
 
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.

Powered by YAF.NET | YAF.NET © 2003-2020, Yet Another Forum.NET
This page was generated in 0.059 seconds.