pdf-forms 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/pdf_forms/pdftk_wrapper.rb +7 -2
- data/lib/pdf_forms/version.rb +1 -1
- data/release.md +12 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72a9789f0cd4a13555123fd0d5736cb0bb2fe8a671a501994c0880bc0f26bb05
|
4
|
+
data.tar.gz: cb6472a02f6779107051cdb44619ca04fced3b011b6c3fdaa5625d9274ce41c1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ab804f59b1953b84e9862bc0879dbaac34b233b85f81a64d64708c9d5a9839ac2186b48e258f908b48524f2cd28294b02b058d29be0a740ac51b9b9286d5848
|
7
|
+
data.tar.gz: f806a512d4a570ee1ff7bc3da5d7f6b81a95b98472784513b120e3099840fbe14f8c7bd61812efdf1ef804f43e32ca7426e3e7c4aa91bb30230151bf7a67406f
|
data/README.md
CHANGED
@@ -69,6 +69,13 @@ Any options shown above can also be set when initializing the PdfForms
|
|
69
69
|
instance. In this case, options given to `fill_form` will override the global
|
70
70
|
options.
|
71
71
|
|
72
|
+
### Field names with HTML entities
|
73
|
+
|
74
|
+
In case your form's field names contain HTML entities (like
|
75
|
+
`Straße Hausnummer`), make sure you unescape those before using them, i.e.
|
76
|
+
`CGI.unescapeHTML(name)`. Thanks to @phoet for figuring this out in #65.
|
77
|
+
|
78
|
+
|
72
79
|
### Prior Art
|
73
80
|
|
74
81
|
The FDF generation part is a straight port of Steffen Schwigon's PDF::FDF::Simple perl module. Didn't port the FDF parsing, though ;-)
|
@@ -23,6 +23,9 @@ module PdfForms
|
|
23
23
|
#
|
24
24
|
# The pdftk binary may also be explecitly specified:
|
25
25
|
# PdftkWrapper.new('/usr/bin/pdftk', :flatten => true, :encrypt => true, :encrypt_options => 'allow Printing')
|
26
|
+
#
|
27
|
+
# Besides the options shown above, the drop_xfa or drop_xmp options are
|
28
|
+
# also supported.
|
26
29
|
def initialize(*args)
|
27
30
|
pdftk, options = normalize_args *args
|
28
31
|
@pdftk = Cliver.detect! pdftk
|
@@ -136,8 +139,10 @@ module PdfForms
|
|
136
139
|
def append_options(args, local_options = {})
|
137
140
|
return args if options.empty? && local_options.empty?
|
138
141
|
args = args.dup
|
139
|
-
|
140
|
-
|
142
|
+
%i(flatten drop_xfa drop_xmp).each do |option|
|
143
|
+
if option_or_global(option, local_options)
|
144
|
+
args << option.to_s
|
145
|
+
end
|
141
146
|
end
|
142
147
|
if option_or_global(:encrypt, local_options)
|
143
148
|
encrypt_pass = option_or_global(:encrypt_password, local_options)
|
data/lib/pdf_forms/version.rb
CHANGED
data/release.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
https://wiki.debian.org/Creating%20signed%20GitHub%20releases
|
2
|
+
|
3
|
+
* edit history and lib/pdf_forms/version.rb
|
4
|
+
* commit
|
5
|
+
|
6
|
+
~~~~
|
7
|
+
export version=1.3.0
|
8
|
+
git tag -s ${version}
|
9
|
+
git push --tags
|
10
|
+
git archive --prefix="pdf-forms-${version}/" -o "../pdf-forms-${version}.tar.gz" ${version}
|
11
|
+
gpg --armor --detach-sign "../pdf-forms-${version}.tar.gz"
|
12
|
+
~~~~
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pdf-forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Krämer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cliver
|
@@ -93,6 +93,7 @@ files:
|
|
93
93
|
- lib/pdf_forms/pdftk_wrapper.rb
|
94
94
|
- lib/pdf_forms/version.rb
|
95
95
|
- lib/pdf_forms/xfdf.rb
|
96
|
+
- release.md
|
96
97
|
homepage: http://github.com/jkraemer/pdf-forms
|
97
98
|
licenses:
|
98
99
|
- MIT
|