Index: samples/pdfium_test.cc |
diff --git a/samples/pdfium_test.cc b/samples/pdfium_test.cc |
index d861f2f5c9f92dc6e53fef2054499c0793bfbe5e..85f70012e96a04e3e3a2b48fb5a0d1d13140d3bd 100644 |
--- a/samples/pdfium_test.cc |
+++ b/samples/pdfium_test.cc |
@@ -472,8 +472,11 @@ void RenderPdf(const std::string& name, const char* pBuf, size_t len, |
(void) FPDFAvail_IsFormAvail(pdf_avail, &hints); |
FPDF_FORMHANDLE form = FPDFDOC_InitFormFillEnvironment(doc, &form_callbacks); |
- if (!FPDF_LoadXFA(doc)) { |
- fprintf(stderr, "LoadXFA unsuccessful, continuing anyway.\n"); |
+ int docType = DOCTYPE_PDF; |
+ if (FPDF_HasXFAField(doc, docType)) |
Tom Sepez
2015/03/03 00:53:34
This same test probably has to go into testing/emb
jun_fang
2015/03/03 01:02:31
Shall we remove LoadXFA here?
|
+ { |
+ if (docType != DOCTYPE_PDF && !FPDF_LoadXFA(doc)) |
+ fprintf(stderr, "LoadXFA unsuccessful, continuing anyway.\n"); |
} |
FPDF_SetFormFieldHighlightColor(form, 0, 0xFFE4DD); |
FPDF_SetFormFieldHighlightAlpha(form, 100); |