pdfinfo: be more specific about detecting XFA we can't render

This commit is contained in:
James R. Barlow
2019-04-18 15:07:25 -07:00
parent e0c8dadcce
commit f615b6f0e8
+6
View File
@@ -756,6 +756,12 @@ class PdfInfo:
infile, detailed_page_analysis, log=log
)
self._needs_rendering = pdf.root.get('/NeedsRendering', False)
self._has_acroform = False
if '/AcroForm' in pdf.root:
if len(pdf.root.AcroForm.get('/Fields', [])) > 0:
self._has_acroform = True
elif '/XFA' in pdf.root.AcroForm:
self._has_acroform = True
pdf.close()
@property