c++pdfconsolestderrpodofo

podofo writes unwanted stuff to stderr


I am using this line in my code:

PdfMemDocument doc(path);

And podofo writes this to stderr:

<<27598670A0B3314EB669BB62DEB4F7FD>]/Info 126 0 R/Prev 503377/Root 1 0 R/Size 1107/XRefStm 500774>>

<<27598670A0B3314EB669BB62DEB4F7FD>]/Info 126 0 R/Prev 503377/Root 1 0 R/Size 1107/XRefStm 500774>>

<<27598670A0B3314EB669BB62DEB4F7FD>]/Info 126 0 R/Prev 503377/Root 1 0 R/Size 1107/XRefStm 500774>>

I dont want this (debug?) output of podofo. Any ideas how to deactivate this?


Solution

  • Call once PoDoFo::PDFError::EnableDebug static method:

    PoDoFo::PdfError::EnableDebug(false);
    PoDoFo::PdfError::EnableLogging(false);
    

    Unfortunately, this method defined in header file, so there will be PoDoFo DLL linking errors on Windows. You can fix this issue by modifying PoDoFo source code: move definitions into CPP file.