mupdf 1.0.0 → 1.0.2
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/lib/mupdf/box.rb +2 -1
- data/lib/mupdf/page.rb +20 -10
- data/lib/mupdf/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 33eaf76d7941cd48249d245e79852baac44e1735a6ed41b55c57b000c22637b4
|
4
|
+
data.tar.gz: ec7b80abfd826b1ae5fd5745e8da85e92da20288989f76552f1e92e8099dcc42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 980c614f227fddaba6e878ccab9896c9a517b39bed56334c415061e5968c8cf38ce667080501359ff603b8f996f86f0a441b947b39e5e9a397cf9195815cae32
|
7
|
+
data.tar.gz: 6b145288f55da2f363f468126c1d67e0b90d477e69bd56cec0bb3884e56aacd3d1733617e49f68ff50a51370f424d1ffeeab58522abb733e52fde726027f1daf
|
data/lib/mupdf/box.rb
CHANGED
data/lib/mupdf/page.rb
CHANGED
@@ -28,62 +28,72 @@ module MuPDF
|
|
28
28
|
|
29
29
|
# @param text [String]
|
30
30
|
#
|
31
|
-
# @return [MuPDF::Box]
|
31
|
+
# @return [MuPDF::Box, nil]
|
32
32
|
def self.parse_media_box(text)
|
33
33
|
match = MEDIA_BOX_REGEX.match(text)
|
34
|
+
return unless match
|
35
|
+
|
34
36
|
MuPDF::Box.parse(match[:content], kind: :media)
|
35
37
|
end
|
36
38
|
|
37
39
|
# @param text [String]
|
38
40
|
#
|
39
|
-
# @return [MuPDF::Box]
|
41
|
+
# @return [MuPDF::Box, nil]
|
40
42
|
def self.parse_crop_box(text)
|
41
43
|
match = CROP_BOX_REGEX.match(text)
|
44
|
+
return unless match
|
45
|
+
|
42
46
|
MuPDF::Box.parse(match[:content], kind: :crop)
|
43
47
|
end
|
44
48
|
|
45
49
|
# @param text [String]
|
46
50
|
#
|
47
|
-
# @return [MuPDF::Box]
|
51
|
+
# @return [MuPDF::Box, nil]
|
48
52
|
def self.parse_art_box(text)
|
49
53
|
match = ART_BOX_REGEX.match(text)
|
54
|
+
return unless match
|
55
|
+
|
50
56
|
MuPDF::Box.parse(match[:content], kind: :art)
|
51
57
|
end
|
52
58
|
|
53
59
|
# @param text [String]
|
54
60
|
#
|
55
|
-
# @return [MuPDF::Box]
|
61
|
+
# @return [MuPDF::Box, nil]
|
56
62
|
def self.parse_bleed_box(text)
|
57
63
|
match = BLEED_BOX_REGEX.match(text)
|
64
|
+
return unless match
|
65
|
+
|
58
66
|
MuPDF::Box.parse(match[:content], kind: :bleed)
|
59
67
|
end
|
60
68
|
|
61
69
|
# @param text [String]
|
62
70
|
#
|
63
|
-
# @return [MuPDF::Box]
|
71
|
+
# @return [MuPDF::Box, nil]
|
64
72
|
def self.parse_trim_box(text)
|
65
73
|
match = TRIM_BOX_REGEX.match(text)
|
74
|
+
return unless match
|
75
|
+
|
66
76
|
MuPDF::Box.parse(match[:content], kind: :trim)
|
67
77
|
end
|
68
78
|
|
69
79
|
# @!attribute media_box
|
70
|
-
# @return [MuPDFBox]
|
80
|
+
# @return [MuPDFBox, nil]
|
71
81
|
attr_accessor :media_box
|
72
82
|
|
73
83
|
# @!attribute crop_box
|
74
|
-
# @return [MuPDFBox]
|
84
|
+
# @return [MuPDFBox, nil]
|
75
85
|
attr_accessor :crop_box
|
76
86
|
|
77
87
|
# @!attribute art_box
|
78
|
-
# @return [MuPDFBox]
|
88
|
+
# @return [MuPDFBox, nil]
|
79
89
|
attr_accessor :art_box
|
80
90
|
|
81
91
|
# @!attribute bleed_box
|
82
|
-
# @return [MuPDFBox]
|
92
|
+
# @return [MuPDFBox, nil]
|
83
93
|
attr_accessor :bleed_box
|
84
94
|
|
85
95
|
# @!attribute trim_box
|
86
|
-
# @return [MuPDFBox]
|
96
|
+
# @return [MuPDFBox, nil]
|
87
97
|
attr_accessor :trim_box
|
88
98
|
|
89
99
|
# @!attribute pagenum
|
data/lib/mupdf/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mupdf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Sylvestre
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: open3
|
@@ -62,8 +62,8 @@ licenses:
|
|
62
62
|
metadata:
|
63
63
|
rubygems_mfa_required: 'true'
|
64
64
|
homepage_uri: https://github.com/ksylvest/mupdf
|
65
|
-
source_code_uri: https://github.com/ksylvest/mupdf/tree/v1.0.
|
66
|
-
changelog_uri: https://github.com/ksylvest/mupdf/releases/tag/v1.0.
|
65
|
+
source_code_uri: https://github.com/ksylvest/mupdf/tree/v1.0.2
|
66
|
+
changelog_uri: https://github.com/ksylvest/mupdf/releases/tag/v1.0.2
|
67
67
|
documentation_uri: https://mupdf.ksylvest.com/
|
68
68
|
post_install_message:
|
69
69
|
rdoc_options: []
|