Is FPDF_LoadCustomDocument itself thread safe?

334 views
Skip to first unread message

Zifei QIAN

unread,
Jan 9, 2019, 10:54:59 PM1/9/19
to pdfium
Hi community,

It is known that pdfium is not thread safe. But I'm wondering if the method FPDF_LoadCustomDocument is OK to be used in parallel processing scenarios? We want to check PDF file's validity in a service using this method. I did a simple test locally and examined the source code. The answer seems a yes to me but I'd still like to get a more solid confirmation. :) Or any other suggestion regading PDF validity check is welcomed. 

Your help is very much appreciated!

Thanks,
Zifei

Lei Zhang

unread,
Jan 10, 2019, 7:54:34 PM1/10/19
to Zifei QIAN, pdfium
You shouldn't assume PDFium is thread-safe anywhere. Even if the
current implementation is to some degree, there is no guarantee that
won't change in the future. If you want to do parallel processing,
consider going multi-process instead of multi-thread.
> --
> You received this message because you are subscribed to the Google Groups "pdfium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pdfium+un...@googlegroups.com.
> To post to this group, send email to pdf...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/pdfium/2f43a78a-8725-4a48-a4bf-533939076052%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages