acrofill 0.1.2
“Fills PDF form fields (text, checkbox, radio, choice) in-process and optionally flattens the result into static page content. An MIT-licens…”
Writes binary content with Ruby File.binwriteRuby dynamically invokes a method with send
SHA-256ce47196d2cbd0eb930d1244e0cfc70aea5c1d15060c22bb97c310cc1f5caa737
MaleculeH₂(Db₂F)
Evidence
1# frozen_string_literal: true
2
3module Acrofill
4 # Public entry point, signature-compatible with PdfForms#fill_form:
5 #
6 # Acrofill.new.fill_form(template, output, { 'Field' => 'value' }, …
8:40… ta_format:, utf8_fields:, ...) are
9 # accepted and ignored — acrofill needs no FDF and is always UTF-aware.
10 class Filler
11 # Accepts and ignores a pdftk path argument for drop-in compatibility.
12 def initialize(*); end
13
14 def fill_form(template, destination, dat …
38:6… form.flatten! if options[:flatten] || options['flatten']
39 File.binwrite(destination, Writer.new(doc).render)
40 destination
41 end
⋯5 lines
46:60… t a deserialization
47 # boundary (see Template docs).
48 doc.send(:restore_state, *Marshal.load(snapshot)) # rubocop:disable Security/MarshalLoad
49 doc
50 end
⋯4 lines
209:28… raw)
210 return raw unless raw.is_a?(String)
211
212 if raw.start_with?("\xFE\xFF".b)
213 raw.byteslice(2..).force_encoding('UTF-16BE')
214 .encode('UTF-8', invalid: :replace, undef: :replace)
215 else
216 raw.dup.force_encoding('UTF-8').scrub
⋯7 lines
No evidence locations were recorded for this file. Raw result