lib/hexapdf/cli/form.rb in hexapdf-0.21.1 vs lib/hexapdf/cli/form.rb in hexapdf-0.22.0

- old
+ new

@@ -95,9 +95,13 @@ if (@fill || @flatten) && !out_file raise "Output file missing" end with_document(in_file, password: @password, out_file: out_file, incremental: @incremental) do |doc| + if doc.acro_form[:XFA] + $stderr.puts "Warning: Unsupported XFA form detected, some things may not work correctly" + end + if !doc.acro_form raise "This PDF doesn't contain an interactive form" elsif out_file doc.acro_form[:NeedAppearances] = @need_appearances unless @need_appearances.nil? if @fill || !@flatten