dxpdf 0.8.1
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 +7 -0
- data/LICENSE +18 -0
- data/README.md +141 -0
- data/lib/dxpdf/lib.rb +68 -0
- data/lib/dxpdf/version.rb +5 -0
- data/lib/dxpdf.rb +21 -0
- data/licenses/LICENSE-dxpdf +21 -0
- data/licenses/LICENSE-freetype +169 -0
- data/licenses/LICENSE-harfbuzz +42 -0
- data/licenses/LICENSE-rust-skia +22 -0
- data/licenses/LICENSE-skia +29 -0
- metadata +68 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: d2e226307ab99e2eeec8cedfec0d051524d78d1c1025399850ef3b5cba292db2
|
|
4
|
+
data.tar.gz: cc6c13c2c2b0467270470332374b8803e999a3d34ebe8f5fc7e0301860e35641
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 7384191a7b8c9795e29db15ea76dea8404deeacbb8255a6240400fc5ded98c002659dfdcab73db50126673204e3e61e8146c612d2124a3ac282565ee176bafd3
|
|
7
|
+
data.tar.gz: 90d1fb5692e54ab42f32a9677915c9651507e8bb4867d748da2a9666fb018649e39ad7196d52e79698ff77839607619e25ae7f3fde9ba19dfa3852c87b271bab
|
data/LICENSE
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DocuSeal, LLC
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
|
6
|
+
associated documentation files (the "Software"), to deal in the Software without restriction, including
|
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the
|
|
9
|
+
following conditions:
|
|
10
|
+
|
|
11
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial
|
|
12
|
+
portions of the Software.
|
|
13
|
+
|
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
|
15
|
+
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
|
|
16
|
+
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
|
17
|
+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
|
|
18
|
+
USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# dxpdf
|
|
2
|
+
|
|
3
|
+
Fast DOCX to PDF conversion for Ruby. Ruby FFI bindings for [dxpdf](https://github.com/nerdy-pro/dxpdf), a Rust DOCX to PDF converter that renders with Skia.
|
|
4
|
+
|
|
5
|
+
- **In-process.** No LibreOffice, no headless browser, no conversion service.
|
|
6
|
+
- **Fast.** A typical document converts in tens of milliseconds.
|
|
7
|
+
- **Thread-friendly.** Conversions release the GVL, so Puma and Sidekiq threads convert in parallel.
|
|
8
|
+
- **Prebuilt.** Native libraries ship inside the platform gems; nothing compiles on install.
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
# Gemfile
|
|
14
|
+
gem 'dxpdf'
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Requires Ruby 3.1+. On Linux the library links `libfontconfig` and `libstdc++`, so install them along with DejaVu and a few other fonts (see [Fonts](#fonts)). Debian and Ubuntu always have `libstdc++`; on Alpine add it with `apk add libstdc++`.
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'dxpdf'
|
|
23
|
+
|
|
24
|
+
pdf = Dxpdf.convert(File.binread('contract.docx'))
|
|
25
|
+
File.binwrite('contract.pdf', pdf)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## API
|
|
29
|
+
|
|
30
|
+
### `Dxpdf.convert(docx, image_dpi: nil) → String`
|
|
31
|
+
|
|
32
|
+
Converts a DOCX document to PDF.
|
|
33
|
+
|
|
34
|
+
| Argument | Type | |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `docx` | `String` | The DOCX file's bytes (read it with `File.binread`, or take it from an upload or `ActiveStorage::Blob#download`). |
|
|
37
|
+
| `image_dpi:` | `Numeric`, optional | Resolution embedded images are resampled to. Defaults to dxpdf's 220 DPI. Lower it for smaller PDFs. |
|
|
38
|
+
|
|
39
|
+
Returns the PDF as a binary (`ASCII-8BIT`) `String`.
|
|
40
|
+
|
|
41
|
+
Raises `Dxpdf::Error` when the input is empty, isn't a DOCX (`"Parse error: failed to read ZIP archive: …"`), or dxpdf fails while converting.
|
|
42
|
+
|
|
43
|
+
```ruby
|
|
44
|
+
pdf = Dxpdf.convert(docx)
|
|
45
|
+
pdf = Dxpdf.convert(docx, image_dpi: 150)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### `Dxpdf.convert_file(input_path, output_path, image_dpi: nil) → String`
|
|
49
|
+
|
|
50
|
+
Reads `input_path`, converts it, and writes the PDF to `output_path`. Returns `output_path`. Same errors as `convert`, plus the usual `File` errors.
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
Dxpdf.convert_file('in.docx', 'out.pdf')
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### `Dxpdf::Error`
|
|
57
|
+
|
|
58
|
+
Subclass of `StandardError` raised for every conversion failure. The message comes from dxpdf.
|
|
59
|
+
|
|
60
|
+
```ruby
|
|
61
|
+
begin
|
|
62
|
+
Dxpdf.convert(upload.read)
|
|
63
|
+
rescue Dxpdf::Error => e
|
|
64
|
+
Rails.logger.warn("DOCX conversion failed: #{e.message}")
|
|
65
|
+
end
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### `Dxpdf::VERSION`
|
|
69
|
+
|
|
70
|
+
The gem version. It follows the dxpdf release it bundles (`0.8.1` bundles dxpdf `v0.8.1`).
|
|
71
|
+
|
|
72
|
+
### `Dxpdf::Lib` (low level)
|
|
73
|
+
|
|
74
|
+
The FFI binding to dxpdf's C ABI. You normally don't need it.
|
|
75
|
+
|
|
76
|
+
| | |
|
|
77
|
+
|---|---|
|
|
78
|
+
| `Dxpdf::Lib::PLATFORM` | Platform directory the library is loaded from, e.g. `"aarch64-linux-musl"`. |
|
|
79
|
+
| `Dxpdf::Lib.dxpdf_default_image_dpi` | dxpdf's default image DPI (`220.0`). |
|
|
80
|
+
| `Dxpdf::Lib.dxpdf_min_image_dpi` | Lowest DPI dxpdf accepts; smaller values are clamped (`1.0`). |
|
|
81
|
+
| `ENV['DXPDF_LIB']` | Path to a `libdxpdf.so` / `libdxpdf.dylib` to load instead of the bundled one. Read once, when `Dxpdf::Lib` loads. |
|
|
82
|
+
|
|
83
|
+
## Examples
|
|
84
|
+
|
|
85
|
+
Send a converted upload from a Rails controller:
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
def create
|
|
89
|
+
pdf = Dxpdf.convert(params[:file].read)
|
|
90
|
+
|
|
91
|
+
send_data pdf, type: 'application/pdf', filename: 'document.pdf'
|
|
92
|
+
rescue Dxpdf::Error => e
|
|
93
|
+
render plain: e.message, status: :unprocessable_entity
|
|
94
|
+
end
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Convert an Active Storage attachment:
|
|
98
|
+
|
|
99
|
+
```ruby
|
|
100
|
+
pdf = Dxpdf.convert(document.file.download)
|
|
101
|
+
|
|
102
|
+
document.pdf.attach(io: StringIO.new(pdf), filename: "#{document.file.filename.base}.pdf",
|
|
103
|
+
content_type: 'application/pdf')
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Alpine (musl) performance
|
|
107
|
+
|
|
108
|
+
musl's `malloc` is slow for dxpdf, especially with parallel conversions. Preload jemalloc for a 5–7× speedup:
|
|
109
|
+
|
|
110
|
+
```dockerfile
|
|
111
|
+
RUN apk add --no-cache jemalloc
|
|
112
|
+
ENV LD_PRELOAD=/usr/lib/libjemalloc.so.2
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Untrusted input
|
|
116
|
+
|
|
117
|
+
Using this library to convert untrusted documents (user uploads, files from the internet) is not recommended. The conversion runs native code (Rust, and Skia in C++) inside your Ruby process with no sandbox:
|
|
118
|
+
|
|
119
|
+
- A crash in native code takes the whole process down, not just the request.
|
|
120
|
+
- There is no time or memory limit on a conversion, so a crafted document can tie up a thread or exhaust memory.
|
|
121
|
+
|
|
122
|
+
If you must convert untrusted documents, you must use an isolated, sandboxed process.
|
|
123
|
+
|
|
124
|
+
## Fonts
|
|
125
|
+
|
|
126
|
+
dxpdf uses the fonts embedded in the document first, then installed system fonts (fontconfig on Linux, CoreText on macOS). For Word's proprietary fonts it picks metric-compatible open ones when they are installed: Carlito for Calibri, Liberation Sans / Serif / Mono for Arial / Times New Roman / Courier New.
|
|
127
|
+
|
|
128
|
+
On Linux dxpdf also needs the font fontconfig picks for its default `sans-serif` family, which is DejaVu Sans on Debian and Alpine. Without it every conversion fails with `no fonts available on this system`, even when other fonts are installed.
|
|
129
|
+
|
|
130
|
+
Slim Docker images have almost no fonts, so install DejaVu plus the metric-compatible ones:
|
|
131
|
+
|
|
132
|
+
```dockerfile
|
|
133
|
+
# Alpine
|
|
134
|
+
RUN apk add --no-cache libstdc++ fontconfig font-dejavu font-liberation font-carlito
|
|
135
|
+
# Debian / Ubuntu
|
|
136
|
+
RUN apt-get install -y --no-install-recommends libfontconfig1 fonts-dejavu-core fonts-liberation2 fonts-crosextra-carlito
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
MIT. The native library bundles dxpdf (MIT), rust-skia (MIT), Skia (BSD-3-Clause), FreeType (FTL) and HarfBuzz (MIT); their licenses are in `licenses/`.
|
data/lib/dxpdf/lib.rb
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'ffi'
|
|
4
|
+
|
|
5
|
+
module Dxpdf
|
|
6
|
+
module Lib
|
|
7
|
+
extend FFI::Library
|
|
8
|
+
|
|
9
|
+
PLATFORM =
|
|
10
|
+
case FFI::Platform::OS
|
|
11
|
+
when 'darwin'
|
|
12
|
+
FFI::Platform::ARCH == 'aarch64' ? 'arm64-darwin' : 'x86_64-darwin'
|
|
13
|
+
else
|
|
14
|
+
arch = FFI::Platform::ARCH == 'aarch64' ? 'aarch64' : 'x86_64'
|
|
15
|
+
|
|
16
|
+
is_musl = defined?(FFI::Platform::IS_GNU) ? !FFI::Platform::IS_GNU : RbConfig::CONFIG['host_os'].include?('musl')
|
|
17
|
+
|
|
18
|
+
is_musl ? "#{arch}-linux-musl" : "#{arch}-linux"
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
LIB_FILE = FFI::Platform::OS == 'darwin' ? 'libdxpdf.dylib' : 'libdxpdf.so'
|
|
22
|
+
|
|
23
|
+
PLATFORM_DIR = File.join(__dir__, PLATFORM)
|
|
24
|
+
|
|
25
|
+
ffi_lib [ENV.fetch('DXPDF_LIB', nil), File.join(PLATFORM_DIR, LIB_FILE), 'dxpdf'].compact
|
|
26
|
+
|
|
27
|
+
class Buffer < FFI::Struct
|
|
28
|
+
layout :data, :pointer,
|
|
29
|
+
:len, :size_t,
|
|
30
|
+
:cap, :size_t
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
attach_function :dxpdf_convert, [:pointer, :size_t, :float, Buffer.by_ref, :pointer], :int32, blocking: true
|
|
34
|
+
attach_function :dxpdf_free_buffer, [Buffer.by_value], :void
|
|
35
|
+
attach_function :dxpdf_free_error, [:pointer], :void
|
|
36
|
+
attach_function :dxpdf_default_image_dpi, [], :float
|
|
37
|
+
attach_function :dxpdf_min_image_dpi, [], :float
|
|
38
|
+
|
|
39
|
+
module_function
|
|
40
|
+
|
|
41
|
+
def convert(docx, image_dpi: nil)
|
|
42
|
+
raise Error, 'empty document' if docx.nil? || docx.empty?
|
|
43
|
+
|
|
44
|
+
input = FFI::MemoryPointer.new(:uint8, docx.bytesize)
|
|
45
|
+
input.put_bytes(0, docx)
|
|
46
|
+
out = Buffer.new
|
|
47
|
+
err = FFI::MemoryPointer.new(:pointer)
|
|
48
|
+
|
|
49
|
+
code = dxpdf_convert(input, docx.bytesize, image_dpi || dxpdf_default_image_dpi, out, err)
|
|
50
|
+
|
|
51
|
+
raise Error, take_error(err.read_pointer, code) unless code.zero?
|
|
52
|
+
|
|
53
|
+
begin
|
|
54
|
+
out[:data].read_bytes(out[:len])
|
|
55
|
+
ensure
|
|
56
|
+
dxpdf_free_buffer(out)
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def take_error(ptr, code)
|
|
61
|
+
return "dxpdf error #{code}" if ptr.null?
|
|
62
|
+
|
|
63
|
+
ptr.read_string.force_encoding(Encoding::UTF_8)
|
|
64
|
+
ensure
|
|
65
|
+
dxpdf_free_error(ptr) unless ptr.null?
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
data/lib/dxpdf.rb
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Dxpdf
|
|
4
|
+
autoload :Lib, 'dxpdf/lib'
|
|
5
|
+
autoload :VERSION, 'dxpdf/version'
|
|
6
|
+
|
|
7
|
+
class Error < StandardError
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
module_function
|
|
11
|
+
|
|
12
|
+
def convert(docx, image_dpi: nil)
|
|
13
|
+
Lib.convert(docx, image_dpi:)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def convert_file(input_path, output_path, image_dpi: nil)
|
|
17
|
+
File.binwrite(output_path, convert(File.binread(input_path), image_dpi:))
|
|
18
|
+
|
|
19
|
+
output_path
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 nerdy.pro
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
The FreeType Project LICENSE
|
|
2
|
+
----------------------------
|
|
3
|
+
|
|
4
|
+
2006-Jan-27
|
|
5
|
+
|
|
6
|
+
Copyright 1996-2002, 2006 by
|
|
7
|
+
David Turner, Robert Wilhelm, and Werner Lemberg
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
Introduction
|
|
12
|
+
============
|
|
13
|
+
|
|
14
|
+
The FreeType Project is distributed in several archive packages;
|
|
15
|
+
some of them may contain, in addition to the FreeType font engine,
|
|
16
|
+
various tools and contributions which rely on, or relate to, the
|
|
17
|
+
FreeType Project.
|
|
18
|
+
|
|
19
|
+
This license applies to all files found in such packages, and
|
|
20
|
+
which do not fall under their own explicit license. The license
|
|
21
|
+
affects thus the FreeType font engine, the test programs,
|
|
22
|
+
documentation and makefiles, at the very least.
|
|
23
|
+
|
|
24
|
+
This license was inspired by the BSD, Artistic, and IJG
|
|
25
|
+
(Independent JPEG Group) licenses, which all encourage inclusion
|
|
26
|
+
and use of free software in commercial and freeware products
|
|
27
|
+
alike. As a consequence, its main points are that:
|
|
28
|
+
|
|
29
|
+
o We don't promise that this software works. However, we will be
|
|
30
|
+
interested in any kind of bug reports. (`as is' distribution)
|
|
31
|
+
|
|
32
|
+
o You can use this software for whatever you want, in parts or
|
|
33
|
+
full form, without having to pay us. (`royalty-free' usage)
|
|
34
|
+
|
|
35
|
+
o You may not pretend that you wrote this software. If you use
|
|
36
|
+
it, or only parts of it, in a program, you must acknowledge
|
|
37
|
+
somewhere in your documentation that you have used the
|
|
38
|
+
FreeType code. (`credits')
|
|
39
|
+
|
|
40
|
+
We specifically permit and encourage the inclusion of this
|
|
41
|
+
software, with or without modifications, in commercial products.
|
|
42
|
+
We disclaim all warranties covering The FreeType Project and
|
|
43
|
+
assume no liability related to The FreeType Project.
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
Finally, many people asked us for a preferred form for a
|
|
47
|
+
credit/disclaimer to use in compliance with this license. We thus
|
|
48
|
+
encourage you to use the following text:
|
|
49
|
+
|
|
50
|
+
"""
|
|
51
|
+
Portions of this software are copyright © <year> The FreeType
|
|
52
|
+
Project (https://freetype.org). All rights reserved.
|
|
53
|
+
"""
|
|
54
|
+
|
|
55
|
+
Please replace <year> with the value from the FreeType version you
|
|
56
|
+
actually use.
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
Legal Terms
|
|
60
|
+
===========
|
|
61
|
+
|
|
62
|
+
0. Definitions
|
|
63
|
+
--------------
|
|
64
|
+
|
|
65
|
+
Throughout this license, the terms `package', `FreeType Project',
|
|
66
|
+
and `FreeType archive' refer to the set of files originally
|
|
67
|
+
distributed by the authors (David Turner, Robert Wilhelm, and
|
|
68
|
+
Werner Lemberg) as the `FreeType Project', be they named as alpha,
|
|
69
|
+
beta or final release.
|
|
70
|
+
|
|
71
|
+
`You' refers to the licensee, or person using the project, where
|
|
72
|
+
`using' is a generic term including compiling the project's source
|
|
73
|
+
code as well as linking it to form a `program' or `executable'.
|
|
74
|
+
This program is referred to as `a program using the FreeType
|
|
75
|
+
engine'.
|
|
76
|
+
|
|
77
|
+
This license applies to all files distributed in the original
|
|
78
|
+
FreeType Project, including all source code, binaries and
|
|
79
|
+
documentation, unless otherwise stated in the file in its
|
|
80
|
+
original, unmodified form as distributed in the original archive.
|
|
81
|
+
If you are unsure whether or not a particular file is covered by
|
|
82
|
+
this license, you must contact us to verify this.
|
|
83
|
+
|
|
84
|
+
The FreeType Project is copyright (C) 1996-2000 by David Turner,
|
|
85
|
+
Robert Wilhelm, and Werner Lemberg. All rights reserved except as
|
|
86
|
+
specified below.
|
|
87
|
+
|
|
88
|
+
1. No Warranty
|
|
89
|
+
--------------
|
|
90
|
+
|
|
91
|
+
THE FREETYPE PROJECT IS PROVIDED `AS IS' WITHOUT WARRANTY OF ANY
|
|
92
|
+
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
|
93
|
+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
94
|
+
PURPOSE. IN NO EVENT WILL ANY OF THE AUTHORS OR COPYRIGHT HOLDERS
|
|
95
|
+
BE LIABLE FOR ANY DAMAGES CAUSED BY THE USE OR THE INABILITY TO
|
|
96
|
+
USE, OF THE FREETYPE PROJECT.
|
|
97
|
+
|
|
98
|
+
2. Redistribution
|
|
99
|
+
-----------------
|
|
100
|
+
|
|
101
|
+
This license grants a worldwide, royalty-free, perpetual and
|
|
102
|
+
irrevocable right and license to use, execute, perform, compile,
|
|
103
|
+
display, copy, create derivative works of, distribute and
|
|
104
|
+
sublicense the FreeType Project (in both source and object code
|
|
105
|
+
forms) and derivative works thereof for any purpose; and to
|
|
106
|
+
authorize others to exercise some or all of the rights granted
|
|
107
|
+
herein, subject to the following conditions:
|
|
108
|
+
|
|
109
|
+
o Redistribution of source code must retain this license file
|
|
110
|
+
(`FTL.TXT') unaltered; any additions, deletions or changes to
|
|
111
|
+
the original files must be clearly indicated in accompanying
|
|
112
|
+
documentation. The copyright notices of the unaltered,
|
|
113
|
+
original files must be preserved in all copies of source
|
|
114
|
+
files.
|
|
115
|
+
|
|
116
|
+
o Redistribution in binary form must provide a disclaimer that
|
|
117
|
+
states that the software is based in part of the work of the
|
|
118
|
+
FreeType Team, in the distribution documentation. We also
|
|
119
|
+
encourage you to put an URL to the FreeType web page in your
|
|
120
|
+
documentation, though this isn't mandatory.
|
|
121
|
+
|
|
122
|
+
These conditions apply to any software derived from or based on
|
|
123
|
+
the FreeType Project, not just the unmodified files. If you use
|
|
124
|
+
our work, you must acknowledge us. However, no fee need be paid
|
|
125
|
+
to us.
|
|
126
|
+
|
|
127
|
+
3. Advertising
|
|
128
|
+
--------------
|
|
129
|
+
|
|
130
|
+
Neither the FreeType authors and contributors nor you shall use
|
|
131
|
+
the name of the other for commercial, advertising, or promotional
|
|
132
|
+
purposes without specific prior written permission.
|
|
133
|
+
|
|
134
|
+
We suggest, but do not require, that you use one or more of the
|
|
135
|
+
following phrases to refer to this software in your documentation
|
|
136
|
+
or advertising materials: `FreeType Project', `FreeType Engine',
|
|
137
|
+
`FreeType library', or `FreeType Distribution'.
|
|
138
|
+
|
|
139
|
+
As you have not signed this license, you are not required to
|
|
140
|
+
accept it. However, as the FreeType Project is copyrighted
|
|
141
|
+
material, only this license, or another one contracted with the
|
|
142
|
+
authors, grants you the right to use, distribute, and modify it.
|
|
143
|
+
Therefore, by using, distributing, or modifying the FreeType
|
|
144
|
+
Project, you indicate that you understand and accept all the terms
|
|
145
|
+
of this license.
|
|
146
|
+
|
|
147
|
+
4. Contacts
|
|
148
|
+
-----------
|
|
149
|
+
|
|
150
|
+
There are two mailing lists related to FreeType:
|
|
151
|
+
|
|
152
|
+
o freetype@nongnu.org
|
|
153
|
+
|
|
154
|
+
Discusses general use and applications of FreeType, as well as
|
|
155
|
+
future and wanted additions to the library and distribution.
|
|
156
|
+
If you are looking for support, start in this list if you
|
|
157
|
+
haven't found anything to help you in the documentation.
|
|
158
|
+
|
|
159
|
+
o freetype-devel@nongnu.org
|
|
160
|
+
|
|
161
|
+
Discusses bugs, as well as engine internals, design issues,
|
|
162
|
+
specific licenses, porting, etc.
|
|
163
|
+
|
|
164
|
+
Our home page can be found at
|
|
165
|
+
|
|
166
|
+
https://freetype.org
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
--- end of FTL.TXT ---
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
HarfBuzz is licensed under the so-called "Old MIT" license. Details follow.
|
|
2
|
+
For parts of HarfBuzz that are licensed under different licenses see individual
|
|
3
|
+
files names COPYING in subdirectories where applicable.
|
|
4
|
+
|
|
5
|
+
Copyright © 2010-2022 Google, Inc.
|
|
6
|
+
Copyright © 2015-2020 Ebrahim Byagowi
|
|
7
|
+
Copyright © 2019,2020 Facebook, Inc.
|
|
8
|
+
Copyright © 2012,2015 Mozilla Foundation
|
|
9
|
+
Copyright © 2011 Codethink Limited
|
|
10
|
+
Copyright © 2008,2010 Nokia Corporation and/or its subsidiary(-ies)
|
|
11
|
+
Copyright © 2009 Keith Stribley
|
|
12
|
+
Copyright © 2011 Martin Hosken and SIL International
|
|
13
|
+
Copyright © 2007 Chris Wilson
|
|
14
|
+
Copyright © 2005,2006,2020,2021,2022,2023 Behdad Esfahbod
|
|
15
|
+
Copyright © 2004,2007,2008,2009,2010,2013,2021,2022,2023 Red Hat, Inc.
|
|
16
|
+
Copyright © 1998-2005 David Turner and Werner Lemberg
|
|
17
|
+
Copyright © 2016 Igalia S.L.
|
|
18
|
+
Copyright © 2022 Matthias Clasen
|
|
19
|
+
Copyright © 2018,2021 Khaled Hosny
|
|
20
|
+
Copyright © 2018,2019,2020 Adobe, Inc
|
|
21
|
+
Copyright © 2013-2015 Alexei Podtelezhnikov
|
|
22
|
+
|
|
23
|
+
For full copyright notices consult the individual files in the package.
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
Permission is hereby granted, without written agreement and without
|
|
27
|
+
license or royalty fees, to use, copy, modify, and distribute this
|
|
28
|
+
software and its documentation for any purpose, provided that the
|
|
29
|
+
above copyright notice and the following two paragraphs appear in
|
|
30
|
+
all copies of this software.
|
|
31
|
+
|
|
32
|
+
IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
33
|
+
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
34
|
+
ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
35
|
+
IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
36
|
+
DAMAGE.
|
|
37
|
+
|
|
38
|
+
THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
39
|
+
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
40
|
+
FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
41
|
+
ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
42
|
+
PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 LongYinan & Armin Sander
|
|
4
|
+
Copyright (c) 2019 rust-skia Contributors
|
|
5
|
+
|
|
6
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
7
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
8
|
+
in the Software without restriction, including without limitation the rights
|
|
9
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
10
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
11
|
+
furnished to do so, subject to the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be included in all
|
|
14
|
+
copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
17
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
18
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
19
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
20
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
21
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
22
|
+
SOFTWARE.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
Copyright (c) 2011 Google Inc. All rights reserved.
|
|
2
|
+
|
|
3
|
+
Redistribution and use in source and binary forms, with or without
|
|
4
|
+
modification, are permitted provided that the following conditions are
|
|
5
|
+
met:
|
|
6
|
+
|
|
7
|
+
* Redistributions of source code must retain the above copyright
|
|
8
|
+
notice, this list of conditions and the following disclaimer.
|
|
9
|
+
|
|
10
|
+
* Redistributions in binary form must reproduce the above copyright
|
|
11
|
+
notice, this list of conditions and the following disclaimer in
|
|
12
|
+
the documentation and/or other materials provided with the
|
|
13
|
+
distribution.
|
|
14
|
+
|
|
15
|
+
* Neither the name of the copyright holder nor the names of its
|
|
16
|
+
contributors may be used to endorse or promote products derived
|
|
17
|
+
from this software without specific prior written permission.
|
|
18
|
+
|
|
19
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
20
|
+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
21
|
+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
22
|
+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
23
|
+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
24
|
+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
25
|
+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
26
|
+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
27
|
+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
28
|
+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
metadata
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: dxpdf
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.8.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Pete Matsyburka
|
|
8
|
+
bindir: bin
|
|
9
|
+
cert_chain: []
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
|
+
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: ffi
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - ">="
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '1.15'
|
|
19
|
+
type: :runtime
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '1.15'
|
|
26
|
+
description: Ruby FFI bindings for dxpdf, a Rust DOCX to PDF converter. Ships prebuilt
|
|
27
|
+
native libraries for macOS arm64 and Linux (glibc and musl, arm64 and x86_64).
|
|
28
|
+
email:
|
|
29
|
+
- pete@docuseal.com
|
|
30
|
+
executables: []
|
|
31
|
+
extensions: []
|
|
32
|
+
extra_rdoc_files: []
|
|
33
|
+
files:
|
|
34
|
+
- LICENSE
|
|
35
|
+
- README.md
|
|
36
|
+
- lib/dxpdf.rb
|
|
37
|
+
- lib/dxpdf/lib.rb
|
|
38
|
+
- lib/dxpdf/version.rb
|
|
39
|
+
- licenses/LICENSE-dxpdf
|
|
40
|
+
- licenses/LICENSE-freetype
|
|
41
|
+
- licenses/LICENSE-harfbuzz
|
|
42
|
+
- licenses/LICENSE-rust-skia
|
|
43
|
+
- licenses/LICENSE-skia
|
|
44
|
+
licenses:
|
|
45
|
+
- MIT
|
|
46
|
+
metadata:
|
|
47
|
+
bug_tracker_uri: https://github.com/docusealco/dxpdf-ruby/issues
|
|
48
|
+
homepage_uri: https://github.com/docusealco/dxpdf-ruby
|
|
49
|
+
source_code_uri: https://github.com/docusealco/dxpdf-ruby
|
|
50
|
+
rubygems_mfa_required: 'true'
|
|
51
|
+
rdoc_options: []
|
|
52
|
+
require_paths:
|
|
53
|
+
- lib
|
|
54
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
55
|
+
requirements:
|
|
56
|
+
- - ">="
|
|
57
|
+
- !ruby/object:Gem::Version
|
|
58
|
+
version: 3.1.0
|
|
59
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
60
|
+
requirements:
|
|
61
|
+
- - ">="
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '0'
|
|
64
|
+
requirements: []
|
|
65
|
+
rubygems_version: 4.0.10
|
|
66
|
+
specification_version: 4
|
|
67
|
+
summary: Fast DOCX to PDF conversion in Ruby, powered by dxpdf and Skia.
|
|
68
|
+
test_files: []
|