TTMSFMXPDFLib thread safe?

Hi,

I'm pretty sure it's something I'm doing but can I just check, is the PDF library thread safe? I'm generating multiple PDFs simultaneously and I'm getting the occasional AV but not always - which would suggest conflicting-thread problems. Also, is there any way to control the memory usage of this library? It's using many hundreds of MBs sometimes.

Thanks,
Pete

Hi, 


It depends on which operating system you are using. On Windows the PDF library is using FontSub.dll to generate sub sets of fonts to embedded. It's unclear if the functionality in FontSub.dll is thread safe. Can you send us a sample that indicates the access violation so we can investigate this here?

Hi Pieter,

Thanks for getting back to me so quickly. I'm deploying to Win32 and OSX, I'm seeing similar issues on both OS. I'm creating and managing individual PDF documents in separate threads - there's no cross thread interaction, they're entirely independent. I'm seeing memory usage ramp up by several hundred MBs (total filesize of all the PDFs is about 40MB) - sometimes I'm catching Out Of Memory exceptions, sometimes AVs. I'll look into it further, there's not a neat little example prog I can split out of this currently.

Thanks,
Pete

Hi again,

 I've switched to using TThreads rather than the Parallel Programming Library and haven't seen it again yet. Still might have been something I did rather an Embarcadero bug as I had to refactor a fair bit to switch to old fashioned TThreads. I'll wait and see.

Thanks,
Pete 

Hi, 


Thank you for your feedback!