public void PrintToPdf(string pdfConfig, string filename) { IntPtr nativePdfConfig = Cef3Binder.MyCefCreatePdfPrintSetting(pdfConfig); MyCefCallback cb = null; cb = new MyCefCallback((id, args) => { //remove after finish var metArg = new NativeCallArgs(args); int isOK = metArg.GetArgAsInt32(1); tmpCallbacks.Remove(cb); }); tmpCallbacks.Add(cb); // Cef3Binder.MyCefPrintToPdf(_myCefBw.ptr, nativePdfConfig, filename, cb); }