--- a/cpp/poppler-document.h.org   2019-12-14 00:17:55.133665304 -0700
+++ b/cpp/poppler-document.h       2019-12-14 00:19:09.238484052 -0700
@@ -90,6 +90,10 @@

     bool is_encrypted() const;
     bool is_linearized() const;
+    bool has_js() const;
+    bool has_xfa() const;
+    bool has_acroform() const;
+    
     bool has_permission(permission_enum which) const;
     ustring metadata() const;
     bool get_pdf_id(std::string *permanent_id, std::string *update_id) const;
--- a/cpp/poppler-document.cpp.org 2019-12-14 00:18:06.563483004 -0700
+++ b/cpp/poppler-document.cpp     2019-12-14 00:21:24.117340547 -0700
@@ -981,6 +981,21 @@
     return d->doc->getCatalog()->numEmbeddedFiles() > 0;
 }

+bool document::has_js() const
+{
+    return d->doc->getCatalog()->numJS() > 0;
+}
+
+bool document::has_xfa() const 
+{
+    return d->doc->getCatalog()->getFormType() == Catalog::XfaForm;
+}
+
+bool document::has_acroform() const
+{
+    return d->doc->getCatalog()->getFormType() == Catalog::AcroForm;
+}
+
 /**
  Reads all the %document-level embedded files of the %document.