[Podofo-users] Thread safety

2013-07-11 Thread Mocanu Lucian
Hello  I'm having multiple issues here: I'm watermarking multiple files in multiple threads (with encryption). Helgrind reports issues here: -document read/write ->PDFEncryptRC4Base->RC4 -createfont, setfontsize -> it's almost logic here that the font is from the cache but shouldn't every "copy" h

[Podofo-users] Mutex wraper

2013-07-10 Thread Mocanu Lucian
In PdfEncodingFactory.cpp in various functions why is the mutex locked before variable checking? What if thread switches after check? Helgrind notified me of this possible race condition. Along with other things like this one when I create a font in separate threads. I'm guessing CreateFont is n

[Podofo-users] FontConfig load time

2012-10-11 Thread Mocanu Lucian
Hello, I profiled my application using callgrind and it seems it takes quite a while to initialize the font cache in  PdfFontCache.cpp: 141        m_pFcConfig     = static_cast(FcInitLoadConfigAndFonts()); Isn't this variable constant throughout my application? I use allot of pdf files and each

[Podofo-users] Out of memory when writing to buffer

2012-10-09 Thread Mocanu Lucian
Hello, I have a multi-threaded application that parses in memory PDFs. At first I used buffer->PdfMemDocument for reading and OutputDevice(ostream)-> buffer to write to memory but i keep getting a race condition on the stream (even tough I have separate mem documents, something with the imbue th

[Podofo-users] Multiple pdf output

2012-09-18 Thread Mocanu Lucian
Hello, I just started using PoDoFo for a project that involves pdf processing. I need to open a PDF file (once) and create in memory copies of it, alter them according to a list of attributes(add specific elements) and write them to disk. Since there are allot of files to be written I need to re