docraptor 1.1.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/.gitignore +42 -2
- data/.rspec +2 -0
- data/.swagger-codegen-ignore +32 -0
- data/.swagger-codegen/VERSION +1 -0
- data/.swagger-revision +1 -1
- data/.travis.yml +9 -0
- data/CHANGELOG.md +17 -0
- data/Gemfile +5 -1
- data/LICENSE +4 -10
- data/README.md +11 -17
- data/Rakefile +9 -0
- data/docraptor.gemspec +36 -17
- data/docraptor.yaml +129 -20
- data/examples/hosted_async.rb +75 -0
- data/examples/hosted_sync.rb +62 -0
- data/lib/docraptor.rb +13 -1
- data/lib/docraptor/api/doc_api.rb +202 -81
- data/lib/docraptor/api_client.rb +112 -43
- data/lib/docraptor/api_error.rb +19 -5
- data/lib/docraptor/configuration.rb +43 -4
- data/lib/docraptor/models/async_doc.rb +60 -25
- data/lib/docraptor/models/doc.rb +164 -69
- data/lib/docraptor/models/{async_doc_status.rb → doc_status.rb} +66 -36
- data/lib/docraptor/models/prince_options.rb +132 -90
- data/lib/docraptor/version.rb +13 -1
- data/script/fix_gemspec.rb +40 -0
- data/script/post_generate_language +3 -0
- data/script/setup +25 -0
- data/script/swagger +6 -1
- data/script/test +38 -7
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- data/swagger-config.json +11 -3
- data/test/async.rb +11 -2
- data/test/expire_hosted.rb +45 -0
- data/test/hosted_async.rb +29 -0
- data/test/hosted_sync.rb +28 -0
- data/test/sync.rb +10 -2
- data/test/xlsx.rb +10 -2
- metadata +149 -107
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
NGUwYTQ0ZGE4YTY1MjhkYzkzYjM5MTdhNGM5ZDg0ZGQ1ODQ1YTNiNg==
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bfd3d5b8d3364bd02c04b712136686d4a714f6cd3ab3fced0c7efae7e9709ee0
|
4
|
+
data.tar.gz: 89d4fb74883b56c49a71eef45487534474a8f9fa0ae8fc065a592e6a1ae7340c
|
7
5
|
SHA512:
|
8
|
-
metadata.gz:
|
9
|
-
|
10
|
-
ZTAwNmVkMzdhODgyYTlhZjQ0ZWVmN2YwNGNiOWU3NTlhODEwZGJiM2M3YmM0
|
11
|
-
MjFhNGVkYzQwYTE1Y2M4NjdjOWY3MjEyZjM3MDMxMmIwMjdhMmM=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZTAxM2FhYjc4MTEwOThkZDE4ZTYxZjc0MmViMTBmNWMxYmU0ZTJkZDg5MGY4
|
14
|
-
NzhhZGE2M2YxOTgyNjA0NWJiY2QyMGM0MzhmMTBiZjRhNjEwMmJiNGE0OGEz
|
15
|
-
NjFkOWM5MDU3YzMzNWUxYTk1OGYzOThkOGFmYzZhMTcxMzNhMzI=
|
6
|
+
metadata.gz: 964a77fd28bb343dd5410b01e5b6981f631fd5c0ed047225b2dc048b8070249d9d704bb7a4bd289d154b406e8b794a2ac71e7d031af047bb8c47a0500c86b29d
|
7
|
+
data.tar.gz: 90787b9656e2455038833d260caf62b7aa48ce833d3de5e1483c1a9893feed6e0deb5d4cb995ee565510c0c3bfabe7e851decdf5cae00fd0389dc07d8319ff90
|
data/.gitignore
CHANGED
@@ -1,5 +1,45 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
## Specific to RubyMotion:
|
14
|
+
.dat*
|
15
|
+
.repl_history
|
16
|
+
build/
|
17
|
+
|
18
|
+
## Documentation cache and generated files:
|
19
|
+
/.yardoc/
|
20
|
+
/_yardoc/
|
21
|
+
/doc/
|
22
|
+
/rdoc/
|
23
|
+
|
24
|
+
## Environment normalization:
|
25
|
+
/.bundle/
|
26
|
+
/vendor/bundle
|
27
|
+
/lib/bundler/man/
|
28
|
+
Gemfile.lock
|
29
|
+
.ruby-version
|
30
|
+
.ruby-gemset
|
31
|
+
.rvmrc
|
32
|
+
.rubocop.yml
|
33
|
+
|
34
|
+
## Ignore dumb OSX files
|
1
35
|
.DS_Store
|
2
36
|
Thumbs.db
|
37
|
+
|
38
|
+
## Ignore baked in swagger generator
|
3
39
|
swagger-codegen
|
4
|
-
|
5
|
-
|
40
|
+
|
41
|
+
## Ignore dumb emacs files
|
42
|
+
*~
|
43
|
+
|
44
|
+
## Ignore files that contain special keys
|
45
|
+
.docraptor_key
|
data/.rspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# Swagger Codegen Ignore
|
2
|
+
# Generated by swagger-codegen https://github.com/swagger-api/swagger-codegen
|
3
|
+
|
4
|
+
# Use this file to prevent files from being overwritten by the generator.
|
5
|
+
# The patterns follow closely to .gitignore or .dockerignore.
|
6
|
+
|
7
|
+
# As an example, the C# client generator defines ApiClient.cs.
|
8
|
+
# You can make changes and tell Swagger Codgen to ignore just this file by uncommenting the following line:
|
9
|
+
#ApiClient.cs
|
10
|
+
|
11
|
+
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
12
|
+
#foo/*/qux
|
13
|
+
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
14
|
+
|
15
|
+
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
16
|
+
#foo/**/qux
|
17
|
+
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
18
|
+
|
19
|
+
# You can also negate patterns with an exclamation (!).
|
20
|
+
# For example, you can ignore all files in a docs folder with the file extension .md:
|
21
|
+
#docs/*.md
|
22
|
+
# Then explicitly reverse the ignore rule for a single file:
|
23
|
+
#!docs/README.md
|
24
|
+
|
25
|
+
# Can't Touch This. Dun-dun-dun-dun. Dun dun. Dun dun.
|
26
|
+
README.md
|
27
|
+
CHANGELOG.md
|
28
|
+
git_push.sh
|
29
|
+
docs/
|
30
|
+
.gitignore
|
31
|
+
LICENSE
|
32
|
+
Rakefile
|
@@ -0,0 +1 @@
|
|
1
|
+
2.4.19
|
data/.swagger-revision
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
v2.4.19
|
data/.travis.yml
ADDED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
### 2.0.0 [June 1, 2021]
|
2
|
+
* Add support for ruby 3.x (remove `URI.encode`)
|
3
|
+
* Remove support for rubies <2.3
|
4
|
+
|
5
|
+
### 1.4.0 [July 31, 2020]
|
6
|
+
* add support for hosted documents
|
7
|
+
* upgrade to latest swagger 2.4.14
|
8
|
+
|
9
|
+
### 1.3.0 [November 21, 2017]
|
10
|
+
* Added support for `prince_options[pdf_title]` and `ignore_console_messages` options
|
11
|
+
|
12
|
+
### 1.2.0 [August 22, 2017]
|
13
|
+
* No changes from beta1
|
14
|
+
|
15
|
+
### 1.2.0beta1 [August 9, 2017]
|
16
|
+
* Re-runnning against newer swagger version (v.2.2.3), bumping many gem dependencies to much newer versions. Applications using client *should not* be affected.
|
17
|
+
|
1
18
|
### 1.1.0 [November 3, 2016]
|
2
19
|
* Added support for pipeline API parameter
|
3
20
|
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
@@ -1,13 +1,7 @@
|
|
1
|
-
Copyright
|
1
|
+
Copyright © 2010-2017 Expected Behavior
|
2
2
|
|
3
|
-
|
4
|
-
you may not use this file except in compliance with the License.
|
5
|
-
You may obtain a copy of the License at
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
6
4
|
|
7
|
-
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
8
6
|
|
9
|
-
|
10
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
-
See the License for the specific language governing permissions and
|
13
|
-
limitations under the License.
|
7
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -18,14 +18,12 @@ bundle install
|
|
18
18
|
```
|
19
19
|
|
20
20
|
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
See [examples](examples/) for runnable examples with file output, error handling, etc.
|
21
|
+
## Basic Usage
|
24
22
|
|
25
23
|
```ruby
|
26
|
-
DocRaptor.configure do |
|
27
|
-
|
28
|
-
#
|
24
|
+
DocRaptor.configure do |config|
|
25
|
+
config.username = "YOUR_API_KEY_HERE" # this key works for test documents
|
26
|
+
# config.debugging = true
|
29
27
|
end
|
30
28
|
|
31
29
|
$docraptor = DocRaptor::DocApi.new
|
@@ -44,20 +42,15 @@ response = $docraptor.create_doc(
|
|
44
42
|
)
|
45
43
|
```
|
46
44
|
|
47
|
-
|
48
|
-
|
49
|
-
We have guides for doing some of the common things:
|
50
|
-
|
51
|
-
* [Headers and Footers](https://docraptor.com/documentation/style#pdf-headers-footers) including page skipping
|
52
|
-
* [CSS Media Selector](https://docraptor.com/documentation/api#api_basic_pdf) to make the page look exactly as it does in your browser
|
53
|
-
* Protect content with [HTTP authentication](https://docraptor.com/documentation/api#api_http_user) or [proxies](https://docraptor.com/documentation/api#api_http_proxy) so only DocRaptor can access them
|
45
|
+
## Next Steps
|
54
46
|
|
47
|
+
- Optionally store and get a URL for your converted document with [document hosting](https://docraptor.com/document-hosting)
|
48
|
+
- View more [code examples](examples) with error handling, asynchronous creation, file saving, and document hosting.
|
49
|
+
- Perfect your document styling with our [style and formatting reference](https://docraptor.com/documentation/style), and [API reference](https://docraptor.com/documentation/api). Easily add headers and footers, page breaks, page numbers, table of contents, and much more!
|
55
50
|
|
56
51
|
## More Help
|
57
52
|
|
58
|
-
|
59
|
-
|
60
|
-
Stuck? We're experts at using DocRaptor so please [email us](mailto:support@docraptor.com) if you run into trouble.
|
53
|
+
Stuck? We're experts at turning HTML into PDFs so please [email us](mailto:support@docraptor.com) if you run into trouble.
|
61
54
|
|
62
55
|
|
63
56
|
## Development
|
@@ -76,7 +69,8 @@ The majority of the code in this repo is generated using swagger-codegen on [doc
|
|
76
69
|
5. Update [CHANGELOG.md](CHANGELOG.md)
|
77
70
|
6. Commit "Release version vX.Y.Z"
|
78
71
|
7. `rake release`
|
79
|
-
8.
|
72
|
+
8. Verify package release at https://rubygems.org/gems/docraptor
|
73
|
+
9. Refresh documentation on docraptor.com
|
80
74
|
|
81
75
|
|
82
76
|
## Version Policy
|
data/Rakefile
CHANGED
data/docraptor.gemspec
CHANGED
@@ -1,4 +1,17 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#DocRaptor
|
5
|
+
|
6
|
+
#A native client library for the DocRaptor HTML to PDF/XLS service.
|
7
|
+
|
8
|
+
OpenAPI spec version: 1.4.0
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.19
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
2
15
|
$:.push File.expand_path("../lib", __FILE__)
|
3
16
|
require "docraptor/version"
|
4
17
|
|
@@ -6,28 +19,34 @@ Gem::Specification.new do |s|
|
|
6
19
|
s.name = "docraptor"
|
7
20
|
s.version = DocRaptor::VERSION
|
8
21
|
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["
|
10
|
-
s.email = ["
|
22
|
+
s.authors = ["Expected Behavior"]
|
23
|
+
s.email = ["support@docraptor.com"]
|
11
24
|
s.homepage = "https://github.com/docraptor/docraptor-ruby"
|
12
|
-
s.summary =
|
13
|
-
s.description =
|
14
|
-
s.license =
|
15
|
-
|
16
|
-
|
17
|
-
s.add_runtime_dependency '
|
18
|
-
|
19
|
-
s.
|
20
|
-
|
21
|
-
s.add_development_dependency 'rspec', '~> 3.
|
22
|
-
s.add_development_dependency 'vcr', '~>
|
23
|
-
s.add_development_dependency 'webmock', '~> 1.
|
25
|
+
s.summary = "A wrapper for the DocRaptor HTML to PDF/XLS service."
|
26
|
+
s.description = "A native client library for the DocRaptor HTML to PDF/XLS service."
|
27
|
+
s.license = 'MIT'
|
28
|
+
s.required_ruby_version = ">= 2.3"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
s.add_runtime_dependency 'addressable', '~> 2.3', '>= 2.3.0'
|
33
|
+
|
34
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
35
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
36
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
24
37
|
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
25
38
|
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
26
39
|
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
27
|
-
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.
|
40
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
41
|
+
|
42
|
+
# added by script/fix_gemspec.rb.
|
43
|
+
s.add_development_dependency 'rake', '~>11.2', '>= 11.2.2'
|
44
|
+
s.add_development_dependency 'pry', '~>0.10', '>= 0.10.4'
|
45
|
+
# </added> : if the above lines are missing in the gemspec, then
|
46
|
+
# the matcher for autotest is probably broken
|
28
47
|
|
29
|
-
s.files = `git ls-files`.split("\n").uniq.sort.select{|f| !f.empty? }
|
30
|
-
|
48
|
+
s.files = `git ls-files`.split("\n").uniq.sort.select { |f| !f.empty? }
|
49
|
+
s.test_files = `git ls-files spec test`.split("\n")
|
31
50
|
s.executables = []
|
32
51
|
s.require_paths = ["lib"]
|
33
52
|
end
|
data/docraptor.yaml
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
swagger: '2.0'
|
2
2
|
|
3
|
-
info:
|
4
|
-
version: "1.
|
5
|
-
title: DocRaptor
|
3
|
+
info: # https://github.com/OAI/OpenAPI-Specification/blob/master/versions/2.0.md#info-object
|
4
|
+
version: "1.4.0"
|
5
|
+
title: DocRaptor
|
6
|
+
description: "A native client library for the DocRaptor HTML to PDF/XLS service."
|
7
|
+
termsOfService: "https://docraptor.com/tos"
|
8
|
+
license:
|
9
|
+
name: "MIT"
|
10
|
+
url: "https://mit-license.org/"
|
6
11
|
|
7
12
|
host: docraptor.com
|
8
13
|
basePath: /
|
@@ -50,14 +55,79 @@ paths:
|
|
50
55
|
description: Unprocessable Entity
|
51
56
|
500:
|
52
57
|
description: Server Error
|
58
|
+
|
59
|
+
/hosted_docs:
|
60
|
+
post:
|
61
|
+
operationId: createHostedDoc
|
62
|
+
tags: [Doc]
|
63
|
+
description: >
|
64
|
+
Creates a hosted document synchronously.
|
65
|
+
security:
|
66
|
+
- basicAuth: []
|
67
|
+
parameters:
|
68
|
+
- name: doc
|
69
|
+
in: body
|
70
|
+
description: The document to be created.
|
71
|
+
required: true
|
72
|
+
schema:
|
73
|
+
$ref: '#/definitions/Doc'
|
74
|
+
responses:
|
75
|
+
200:
|
76
|
+
description: Successful response
|
77
|
+
schema:
|
78
|
+
$ref: '#/definitions/DocStatus'
|
79
|
+
400:
|
80
|
+
description: Bad Request
|
81
|
+
401:
|
82
|
+
description: Unauthorized
|
83
|
+
403:
|
84
|
+
description: Forbidden
|
85
|
+
422:
|
86
|
+
description: Unprocessable Entity
|
87
|
+
500:
|
88
|
+
description: Server Error
|
89
|
+
|
53
90
|
/async_docs:
|
54
91
|
post:
|
55
92
|
operationId: createAsyncDoc
|
56
93
|
tags: [Doc]
|
57
94
|
description: >
|
58
95
|
Creates a document asynchronously.
|
59
|
-
You must use a callback url or the
|
60
|
-
Then use the download
|
96
|
+
You must use a callback url or the returned status id and the status API to find out when it completes.
|
97
|
+
Then use the download API to get the document.
|
98
|
+
security:
|
99
|
+
- basicAuth: []
|
100
|
+
parameters:
|
101
|
+
- name: doc
|
102
|
+
in: body
|
103
|
+
description: The document to be created.
|
104
|
+
required: true
|
105
|
+
schema:
|
106
|
+
$ref: '#/definitions/Doc'
|
107
|
+
responses:
|
108
|
+
200:
|
109
|
+
description: Successful response
|
110
|
+
schema:
|
111
|
+
$ref: '#/definitions/AsyncDoc'
|
112
|
+
400:
|
113
|
+
description: Bad Request
|
114
|
+
401:
|
115
|
+
description: Unauthorized
|
116
|
+
403:
|
117
|
+
description: Forbidden
|
118
|
+
422:
|
119
|
+
description: Unprocessable Entity
|
120
|
+
500:
|
121
|
+
description: Server Error
|
122
|
+
|
123
|
+
/hosted_async_docs:
|
124
|
+
post:
|
125
|
+
operationId: createHostedAsyncDoc
|
126
|
+
tags: [Doc]
|
127
|
+
description: >
|
128
|
+
Creates a hosted document asynchronously.
|
129
|
+
You must use a callback url or the returned status id and the status API to find out when it completes.
|
130
|
+
Then use the download API to get the document.
|
61
131
|
security:
|
62
132
|
- basicAuth: []
|
63
133
|
parameters:
|
@@ -96,13 +166,12 @@ paths:
|
|
96
166
|
in: path
|
97
167
|
description: The status_id returned when creating an asynchronous document.
|
98
168
|
required: true
|
99
|
-
|
100
|
-
$ref: '#/definitions/AsyncDocStatus'
|
169
|
+
type: string
|
101
170
|
responses:
|
102
171
|
200:
|
103
172
|
description: Successful response
|
104
173
|
schema:
|
105
|
-
$ref: '#/definitions/
|
174
|
+
$ref: '#/definitions/DocStatus'
|
106
175
|
401:
|
107
176
|
description: Unauthorized
|
108
177
|
403:
|
@@ -115,14 +184,15 @@ paths:
|
|
115
184
|
operationId: getAsyncDoc
|
116
185
|
tags: [Doc]
|
117
186
|
description: >
|
118
|
-
Downloads a document.
|
187
|
+
Downloads a finished document.
|
119
188
|
security:
|
120
189
|
- basicAuth: []
|
121
190
|
parameters:
|
122
191
|
- name: id
|
123
192
|
in: path
|
124
|
-
description: The download_id returned from status request or
|
193
|
+
description: The download_id returned from an async status request or callback.
|
125
194
|
required: true
|
195
|
+
type: string
|
126
196
|
responses:
|
127
197
|
200:
|
128
198
|
description: Successful response
|
@@ -136,6 +206,30 @@ paths:
|
|
136
206
|
500:
|
137
207
|
description: Server Error
|
138
208
|
|
209
|
+
/expire/{id}:
|
210
|
+
patch:
|
211
|
+
operationId: expire
|
212
|
+
tags: [Doc]
|
213
|
+
description: >
|
214
|
+
Expires a previously created hosted doc.
|
215
|
+
security:
|
216
|
+
- basicAuth: []
|
217
|
+
parameters:
|
218
|
+
- name: id
|
219
|
+
in: path
|
220
|
+
description: The download_id returned from status request or hosted document response.
|
221
|
+
required: true
|
222
|
+
type: string
|
223
|
+
responses:
|
224
|
+
200:
|
225
|
+
description: Successful response
|
226
|
+
401:
|
227
|
+
description: Unauthorized
|
228
|
+
403:
|
229
|
+
description: Forbidden
|
230
|
+
500:
|
231
|
+
description: Server Error
|
232
|
+
|
139
233
|
definitions:
|
140
234
|
Doc:
|
141
235
|
type: object
|
@@ -144,9 +238,6 @@ definitions:
|
|
144
238
|
- document_type
|
145
239
|
- document_content
|
146
240
|
properties:
|
147
|
-
pipeline:
|
148
|
-
type: string
|
149
|
-
description: Specify a specific verison of the DocRaptor Pipeline to use.
|
150
241
|
name:
|
151
242
|
type: string
|
152
243
|
description: A name for identifying your document.
|
@@ -171,17 +262,23 @@ definitions:
|
|
171
262
|
type: boolean
|
172
263
|
description: Enable test mode for this document. Test documents are not charged for but include a watermark.
|
173
264
|
default: true
|
265
|
+
pipeline:
|
266
|
+
type: string
|
267
|
+
description: Specify a specific verison of the DocRaptor Pipeline to use.
|
174
268
|
strict:
|
175
269
|
type: string
|
176
270
|
description: Force strict HTML validation.
|
177
|
-
default: none
|
178
271
|
enum:
|
179
272
|
- none
|
180
|
-
-
|
273
|
+
- html
|
181
274
|
ignore_resource_errors:
|
182
275
|
type: boolean
|
183
276
|
description: Failed loading of images/javascripts/stylesheets/etc. will not cause the rendering to stop.
|
184
277
|
default: true
|
278
|
+
ignore_console_messages:
|
279
|
+
type: boolean
|
280
|
+
description: Prevent console.log from stopping document rendering during JavaScript execution.
|
281
|
+
default: false
|
185
282
|
tag:
|
186
283
|
type: string
|
187
284
|
description: A field for storing a small amount of metadata with this document.
|
@@ -200,8 +297,14 @@ definitions:
|
|
200
297
|
type: string
|
201
298
|
description: >
|
202
299
|
A URL that will receive a POST request after successfully completing an asynchronous document.
|
203
|
-
The POST data will include download_url and download_id similar to status
|
300
|
+
The POST data will include download_url and download_id similar to status API responses.
|
204
301
|
WARNING: this only works on asynchronous documents.
|
302
|
+
hosted_download_limit:
|
303
|
+
type: integer
|
304
|
+
description: The number of times a hosted document can be downloaded. If no limit is specified, the document will be available for an unlimited number of downloads.
|
305
|
+
hosted_expires_at:
|
306
|
+
type: string
|
307
|
+
description: The date and time at which a hosted document will be removed and no longer available. Must be a properly formatted ISO 8601 datetime, like 1981-01-23T08:02:30-05:00.
|
205
308
|
prince_options:
|
206
309
|
$ref: '#/definitions/PrinceOptions'
|
207
310
|
|
@@ -296,7 +399,8 @@ definitions:
|
|
296
399
|
- auto
|
297
400
|
version:
|
298
401
|
type: string
|
299
|
-
|
402
|
+
deprecated: true
|
403
|
+
description: Deprecated, use the appropriate `pipeline` version. Specify a specific verison of PrinceXML to use.
|
300
404
|
# default: 10
|
301
405
|
# disabled because Java will try to make an enum as 7_1 which fails
|
302
406
|
# enum:
|
@@ -317,17 +421,22 @@ definitions:
|
|
317
421
|
# disabled because Java will try to make an enum with PDF/A-1b which fails
|
318
422
|
# enum:
|
319
423
|
# - PDF/A-1b
|
424
|
+
# - PDF/A-3b # (Pipeline 6+)
|
425
|
+
# - PDF/X-1a # (Pipeline 6+)
|
320
426
|
# - PDF/X-3:2003
|
321
427
|
# - PDF/X-4
|
428
|
+
pdf_title:
|
429
|
+
type: string
|
430
|
+
description: Specify the PDF title, part of the document's metadata.
|
322
431
|
|
323
432
|
AsyncDoc:
|
324
433
|
type: object
|
325
434
|
properties:
|
326
435
|
status_id:
|
327
436
|
type: string
|
328
|
-
description: The identifier used to get the status of the document using the status
|
437
|
+
description: The identifier used to get the status of the document using the status API.
|
329
438
|
|
330
|
-
|
439
|
+
DocStatus:
|
331
440
|
type: object
|
332
441
|
properties:
|
333
442
|
status:
|
@@ -338,7 +447,7 @@ definitions:
|
|
338
447
|
description: The URL where the document can be retrieved. This URL may only be used a few times.
|
339
448
|
download_id:
|
340
449
|
type: string
|
341
|
-
description: The identifier for downloading the document with the download
|
450
|
+
description: The identifier for downloading the document with the download API.
|
342
451
|
message:
|
343
452
|
type: string
|
344
453
|
description: Additional information.
|