Log message when XFA load fails
authorTom Sepez <tsepez@chromium.org>
Fri, 5 Dec 2014 21:30:51 +0000 (13:30 -0800)
committerTom Sepez <tsepez@chromium.org>
Fri, 5 Dec 2014 21:30:51 +0000 (13:30 -0800)
A minor change to make it obvious when generated/test XFA files are not
being fully processed.

R=bo_xu@foxitsoftware.com

Review URL: https://codereview.chromium.org/732173003

samples/pdfium_test.cc

index 665849d..d01602f 100644 (file)
@@ -291,7 +291,9 @@ void RenderPdf(const char* name, const char* pBuf, size_t len,
   (void) FPDFAvail_IsFormAvail(pdf_avail, &hints);
 
   FPDF_FORMHANDLE form = FPDFDOC_InitFormFillEnvironment(doc, &form_callbacks);
-  FPDF_LoadXFA(doc);
+  if (!FPDF_LoadXFA(doc)) {
+    printf("LoadXFA unsuccessful, continuing anyway.\n");
+  }
   FPDF_SetFormFieldHighlightColor(form, 0, 0xFFE4DD);
   FPDF_SetFormFieldHighlightAlpha(form, 100);