acrobat 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.standard.yml +3 -0
- data/CHANGELOG.md +5 -0
- data/CODE_OF_CONDUCT.md +132 -0
- data/Guardfile +28 -30
- data/{LICENSE.adoc → LICENSE.txt} +3 -4
- data/README.md +107 -0
- data/Rakefile +6 -54
- data/examples/6030.17.antenna.pdf +0 -0
- data/examples/6030.17.cm300.tx.pdf +0 -0
- data/examples/form_field.rb +21 -0
- data/examples/merge.rb +11 -0
- data/lib/acrobat/app.rb +172 -187
- data/lib/acrobat/jso.rb +87 -94
- data/lib/acrobat/pdoc.rb +134 -137
- data/lib/acrobat/version.rb +5 -0
- data/lib/acrobat.rb +45 -48
- data/samples_other/background.js +40 -0
- data/samples_other/find_word.vb +440 -0
- data/samples_other/form.vb +393 -0
- data/vba/overlay.vba +40 -0
- metadata +27 -190
- data/.gitignore +0 -32
- data/History.adoc +0 -6
- data/Manifest.txt +0 -14
- data/README.adoc +0 -117
- data/bin/acrobat +0 -3
- data/test/acrobat_test.rb +0 -36
- data/test/test_helper.rb +0 -13
data/.gitignore
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
*.gem
|
2
|
-
*.rbc
|
3
|
-
/pkg/
|
4
|
-
/spec/reports/
|
5
|
-
/spec/examples.txt
|
6
|
-
/test/tmp/
|
7
|
-
/test/version_tmp/
|
8
|
-
/tmp/
|
9
|
-
|
10
|
-
# Used by dotenv library to load environment variables.
|
11
|
-
# .env
|
12
|
-
|
13
|
-
|
14
|
-
## Documentation cache and generated files:
|
15
|
-
/.yardoc/
|
16
|
-
/_yardoc/
|
17
|
-
/doc/
|
18
|
-
/rdoc/
|
19
|
-
|
20
|
-
## Environment normalization:
|
21
|
-
/.bundle/
|
22
|
-
/vendor/bundle
|
23
|
-
/lib/bundler/man/
|
24
|
-
|
25
|
-
# for a library or gem, you might want to ignore these files since the code is
|
26
|
-
# intended to run in multiple environments; otherwise, check them in:
|
27
|
-
Gemfile.lock
|
28
|
-
.ruby-version
|
29
|
-
.ruby-gemset
|
30
|
-
|
31
|
-
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
32
|
-
.rvmrc
|
data/History.adoc
DELETED
data/Manifest.txt
DELETED
data/README.adoc
DELETED
@@ -1,117 +0,0 @@
|
|
1
|
-
= acrobat
|
2
|
-
Dominic Sisneros <https://github.com/dsisnero[@dsisnero]
|
3
|
-
//settings
|
4
|
-
:page-layout: base
|
5
|
-
:idprefix:
|
6
|
-
:idseparator: -
|
7
|
-
:source-language: ruby
|
8
|
-
:language: {source-language}
|
9
|
-
// Uris
|
10
|
-
:uri-org: https://github.com/dsisnero
|
11
|
-
:uri-repo: {uri-org}/acrobat
|
12
|
-
:uri-issues: {uri-repo}/issues
|
13
|
-
:uri-contributors: {uri-repo}/graphs/contributors
|
14
|
-
:uri-rel-file-base: {uri-repo}/blob/master/
|
15
|
-
:uri-rel-tree-base: {uri-repo}/tree/master/
|
16
|
-
:uri-contribute: {uri-rel-file-base}CONTRIBUTING.adoc
|
17
|
-
:uri-changelog: {uri-rel-file-base}CHANGELOG.adoc
|
18
|
-
:uri-license: {uri-rel-file-base}LICENSE.adoc
|
19
|
-
|
20
|
-
== DESCRIPTION:
|
21
|
-
|
22
|
-
The acrobat gem is a library that uses WIN32OLE to automate pdf functions. Adobe Reader or Adobe Acrobat must be installed and then you can fill forms and merge documents
|
23
|
-
|
24
|
-
== Requirements
|
25
|
-
|
26
|
-
* Windows Adobe Acrobat installed
|
27
|
-
|
28
|
-
== Install 0ptions
|
29
|
-
|
30
|
-
acrobat can be installed using (a) the `gem install` command, (b) Bundler
|
31
|
-
|
32
|
-
=== (a) gem install
|
33
|
-
|
34
|
-
Open a terminal and type
|
35
|
-
$ gem install acrobat
|
36
|
-
|
37
|
-
.Upgrading your installation
|
38
|
-
[TIP]
|
39
|
-
====
|
40
|
-
If you have an earlier version of acrobat installed you can update it using:
|
41
|
-
|
42
|
-
$ gem update acrobat
|
43
|
-
|
44
|
-
If you install a new version of the gem using `gem install` instead of
|
45
|
-
gem update, you'll have multiple versions installed. If that's the
|
46
|
-
case, use the following gem command to remove the old versions:
|
47
|
-
|
48
|
-
$ gem cleanup acrobat
|
49
|
-
====
|
50
|
-
=== (b) Bundler
|
51
|
-
|
52
|
-
. Create a Gemfile in the root folder of your project (or the current directory)
|
53
|
-
. Add the `asciidoctor` gem to your Gemfile as follows:
|
54
|
-
+
|
55
|
-
[source]
|
56
|
-
----
|
57
|
-
source 'https://rubygems.org'
|
58
|
-
gem 'acrobat'
|
59
|
-
# or specify the version explicitly
|
60
|
-
# gem 'acrobat', '0.0.5'
|
61
|
-
----
|
62
|
-
|
63
|
-
. Save the Gemfile
|
64
|
-
. Open a terminal and install the gem using:
|
65
|
-
|
66
|
-
$ bundle
|
67
|
-
|
68
|
-
To upgrade the gem, specify the new version in the Gemfile and run `bundle` again.
|
69
|
-
Using `bundle update` is *not* recommended as it will also update other gems, which may not be the desired result.
|
70
|
-
|
71
|
-
== Usage
|
72
|
-
|
73
|
-
[source,ruby]
|
74
|
-
----
|
75
|
-
|
76
|
-
require 'acrobat'
|
77
|
-
Adobe::Acrobat.run do |app|
|
78
|
-
fields = {city: 'City', state: 'State', zip: 'zip'}
|
79
|
-
doc = app.open('apd_document.pdf')
|
80
|
-
doc.fill_form(fields)
|
81
|
-
doc.show
|
82
|
-
doc2 = app.open('another_doc.pdf')
|
83
|
-
doc2.fill_form(fields)
|
84
|
-
doc1.merge_doc(doc2)
|
85
|
-
doc1.save_as(name: 'merged_doc.pdf', dir: 'tmp')
|
86
|
-
end
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
----
|
91
|
-
|
92
|
-
== Getting Help
|
93
|
-
|
94
|
-
|
95
|
-
We encourage you to ask questions and discuss any aspects of the project on the discussion list, Twitter or IRC.
|
96
|
-
|
97
|
-
Mailing list:: {uri-discuss}
|
98
|
-
|
99
|
-
|
100
|
-
ifdef::env-github[]
|
101
|
-
Further information and documentation about acrobat gem can be found on the project's website.
|
102
|
-
|
103
|
-
{uri-project}/[Home] | {uri-news}[News] | {uri-docs}[Docs]
|
104
|
-
endif::[]
|
105
|
-
|
106
|
-
The project's source code, issue tracker, and sub-projects are on github
|
107
|
-
|
108
|
-
Source repository (git):: {uri-repo}
|
109
|
-
Issue tracker:: {uri-issues}
|
110
|
-
acrobat organization on GitHub:: {uri-org}
|
111
|
-
|
112
|
-
== Copyright and Licensing
|
113
|
-
|
114
|
-
Copyright (C) 2012-2016 Dominic Sisneros and the acrobat-Ruby Project.
|
115
|
-
Free use of this software is granted under the terms of the MIT License.
|
116
|
-
|
117
|
-
See the {uri-license}[LICENSE] file for details.
|
data/bin/acrobat
DELETED
data/test/acrobat_test.rb
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
require_relative 'test_helper'
|
2
|
-
|
3
|
-
|
4
|
-
require "acrobat"
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
module Acrobat
|
9
|
-
|
10
|
-
describe App do
|
11
|
-
|
12
|
-
|
13
|
-
describe 'new' do
|
14
|
-
|
15
|
-
it 'works' do
|
16
|
-
assert true
|
17
|
-
end
|
18
|
-
|
19
|
-
|
20
|
-
it 'can be created' do
|
21
|
-
app = App.new
|
22
|
-
app.must_be_instance_of App
|
23
|
-
end
|
24
|
-
|
25
|
-
it 'has an ole_obj' do
|
26
|
-
app = App.new
|
27
|
-
app.ole_obj.must_be_instance_of WIN32OLE
|
28
|
-
end
|
29
|
-
|
30
|
-
end
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
end
|
data/test/test_helper.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
2
|
-
|
3
|
-
if RUBY_VERSION < '1.9.3'
|
4
|
-
::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require File.join(File.dirname(f), File.basename(f, '.rb')) }
|
5
|
-
else
|
6
|
-
::Dir.glob(::File.expand_path('../support/**/*.rb', __FILE__)).each { |f| require_relative f }
|
7
|
-
end
|
8
|
-
|
9
|
-
|
10
|
-
require 'minitest/spec'
|
11
|
-
require 'minitest/autorun'
|
12
|
-
#require 'minitest/focus'
|
13
|
-
#require 'minitest/utils'
|