I am using MSAccess VBA to process sets of JPG files into a single PDF file. The steps I use in VBA are;
1) Copy the set of jpg files into working directory
2) Use the follwoing code on each JPG to create a single PDF
Set imgobj = New MagickImage
imgobj.Convert strImgFrom, "-resample", "100x100", "-quality", "60", strImgTo
Set imgobj = Nothing
3) I use PDFTK to combine the single image PDF files into one multi page PDF file. I use PDFTK because when I have used ImageMagick it re-renders the image and a lot of image quality is lost. PDFTK allows for the combining of PDFs with out re-rendering.
The only problem with this routine is that after processing about 150 jpg files the processing slows from about 8 files per minute to about 1 file per 15 minutes. Task manager also show a slowing from 90% CPU to about 155 CPU. The is no increase in memory use whcih is well below the total of the PC. Can anyone suggest where this process could be clogging up?
Thanks
John