qpdf_ruby 0.1.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 +7 -0
- data/.clang-format +4 -0
- data/.rspec +3 -0
- data/.rubocop.yml +88 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +5 -0
- data/LICENSE.txt +21 -0
- data/README.md +129 -0
- data/Rakefile +25 -0
- data/docker/Dockerfile +46 -0
- data/exe/qpdf_ruby +4 -0
- data/ext/qpdf_ruby/array_node.cpp +17 -0
- data/ext/qpdf_ruby/document_handle.cpp +102 -0
- data/ext/qpdf_ruby/document_handle.hpp +60 -0
- data/ext/qpdf_ruby/extconf.rb +25 -0
- data/ext/qpdf_ruby/figure_node.cpp +109 -0
- data/ext/qpdf_ruby/mcid_node.cpp +15 -0
- data/ext/qpdf_ruby/mcr_node.cpp +20 -0
- data/ext/qpdf_ruby/pdf_image_mapper.cpp +294 -0
- data/ext/qpdf_ruby/pdf_image_mapper.hpp +66 -0
- data/ext/qpdf_ruby/pdf_struct_walker.cpp +46 -0
- data/ext/qpdf_ruby/pdf_struct_walker.hpp +34 -0
- data/ext/qpdf_ruby/qpdf_ruby.cpp +204 -0
- data/ext/qpdf_ruby/qpdf_ruby.hpp +10 -0
- data/ext/qpdf_ruby/stream_node.cpp +10 -0
- data/ext/qpdf_ruby/struct_elem_node.cpp +203 -0
- data/ext/qpdf_ruby/struct_node.cpp +51 -0
- data/ext/qpdf_ruby/struct_node.hpp +115 -0
- data/ext/qpdf_ruby/unknown_node.cpp +10 -0
- data/lib/qpdf_ruby/version.rb +5 -0
- data/lib/qpdf_ruby.rb +9 -0
- data/sig/qpdf_ruby.rbs +4 -0
- metadata +191 -0
@@ -0,0 +1,203 @@
|
|
1
|
+
#include "struct_node.hpp"
|
2
|
+
|
3
|
+
void StructElemNode::ensureLayoutBBox(PDFStructWalker& walker) {
|
4
|
+
if (node.hasKey("/K")) {
|
5
|
+
QPDFObjectHandle kids = node.getKey("/K");
|
6
|
+
|
7
|
+
// Handle direct value (single child)
|
8
|
+
if (kids.isInteger() || kids.isDictionary() || kids.isStream()) {
|
9
|
+
std::unique_ptr<StructNode> childNode = StructNode::fromQPDF(kids);
|
10
|
+
childNode->ensureLayoutBBox(walker);
|
11
|
+
}
|
12
|
+
// Handle array of children
|
13
|
+
else if (kids.isArray()) {
|
14
|
+
for (int i = 0; i < kids.getArrayNItems(); ++i) {
|
15
|
+
QPDFObjectHandle kid = kids.getArrayItem(i);
|
16
|
+
std::unique_ptr<StructNode> childNode = StructNode::fromQPDF(kid);
|
17
|
+
childNode->ensureLayoutBBox(walker);
|
18
|
+
}
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
std::string StructElemNode::to_string(int level, PDFStructWalker& walker) {
|
24
|
+
std::ostringstream oss;
|
25
|
+
std::string tag = getStructureTag();
|
26
|
+
int pageNum = findPageNumber(walker);
|
27
|
+
|
28
|
+
// Print opening tag with attributes
|
29
|
+
printOpeningTag(oss, level, tag, pageNum, walker);
|
30
|
+
|
31
|
+
// Process children
|
32
|
+
processChildren(oss, level + 1, walker);
|
33
|
+
|
34
|
+
// Print closing tag
|
35
|
+
IndentHelper::indent(oss, level);
|
36
|
+
oss << "</" << tag << ">" << std::endl;
|
37
|
+
|
38
|
+
return oss.str();
|
39
|
+
}
|
40
|
+
|
41
|
+
std::string StructElemNode::getStructureTag() {
|
42
|
+
std::string tag = "Unknown";
|
43
|
+
if (node.hasKey("/S") && node.getKey("/S").isName()) {
|
44
|
+
std::string rawName = node.getKey("/S").getName();
|
45
|
+
tag = (rawName[0] == '/') ? rawName.substr(1) : rawName;
|
46
|
+
}
|
47
|
+
return tag;
|
48
|
+
}
|
49
|
+
|
50
|
+
int StructElemNode::findPageNumber(PDFStructWalker& walker) {
|
51
|
+
int pageNum = -1;
|
52
|
+
QPDFObjectHandle currentNode = this->node;
|
53
|
+
|
54
|
+
while (currentNode.isDictionary()) {
|
55
|
+
if (currentNode.hasKey("/Pg")) {
|
56
|
+
QPDFObjectHandle page_ref = currentNode.getKey("/Pg");
|
57
|
+
if (page_ref.isIndirect()) {
|
58
|
+
const auto& page_map = walker.getPageObjectMap();
|
59
|
+
auto og = page_ref.getObjGen();
|
60
|
+
if (page_map.count(og)) {
|
61
|
+
return page_map.at(og);
|
62
|
+
}
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
// Move to parent
|
67
|
+
if (currentNode.hasKey("/P")) {
|
68
|
+
currentNode = currentNode.getKey("/P");
|
69
|
+
} else {
|
70
|
+
break;
|
71
|
+
}
|
72
|
+
}
|
73
|
+
return pageNum;
|
74
|
+
}
|
75
|
+
|
76
|
+
void StructElemNode::printOpeningTag(std::ostringstream& oss, int level, const std::string& tag, int pageNum,
|
77
|
+
PDFStructWalker& walker) {
|
78
|
+
IndentHelper::indent(oss, level);
|
79
|
+
oss << "<" << tag;
|
80
|
+
|
81
|
+
// Object ID
|
82
|
+
if (node.isIndirect()) {
|
83
|
+
oss << " obj=\"" << node.getObjectID() << " " << node.getGeneration() << "\"";
|
84
|
+
}
|
85
|
+
|
86
|
+
addAttributeIfPresent(oss, "/Alt", "Alt");
|
87
|
+
addAttributeIfPresent(oss, "/ActualText", "ActualText");
|
88
|
+
addAttributeIfPresent(oss, "/T", "Title");
|
89
|
+
addAttributeIfPresent(oss, "/Lang", "Lang");
|
90
|
+
addAttributeIfPresent(oss, "/ID", "ID");
|
91
|
+
|
92
|
+
addClassAttribute(oss);
|
93
|
+
addBboxAttribute(oss);
|
94
|
+
|
95
|
+
// Artifact type
|
96
|
+
if (tag == "Artifact" && node.hasKey("/Type") && node.getKey("/Type").isName()) {
|
97
|
+
std::string artifactType = node.getKey("/Type").getName();
|
98
|
+
oss << " ArtifactType=\"" << (artifactType[0] == '/' ? artifactType.substr(1) : artifactType) << "\"";
|
99
|
+
}
|
100
|
+
|
101
|
+
addNamespaceAttribute(oss);
|
102
|
+
addAttributeIfPresent(oss, "/Type", "Type");
|
103
|
+
|
104
|
+
if (pageNum > 0) {
|
105
|
+
oss << " Page=\"" << pageNum << "\"";
|
106
|
+
}
|
107
|
+
|
108
|
+
oss << ">" << std::endl;
|
109
|
+
}
|
110
|
+
|
111
|
+
void StructElemNode::addAttributeIfPresent(std::ostringstream& oss, const std::string& key,
|
112
|
+
const std::string& attributeName) {
|
113
|
+
if (node.hasKey(key) && node.getKey(key).isString()) {
|
114
|
+
oss << " " << attributeName << "=\"" << node.getKey(key).getStringValue() << "\"";
|
115
|
+
}
|
116
|
+
}
|
117
|
+
|
118
|
+
void StructElemNode::addClassAttribute(std::ostringstream& oss) {
|
119
|
+
if (!node.hasKey("/C")) return;
|
120
|
+
|
121
|
+
oss << " Class=\"";
|
122
|
+
QPDFObjectHandle classObj = node.getKey("/C");
|
123
|
+
if (classObj.isName()) {
|
124
|
+
std::string className = classObj.getName();
|
125
|
+
oss << (className[0] == '/' ? className.substr(1) : className);
|
126
|
+
} else if (classObj.isArray()) {
|
127
|
+
for (int i = 0; i < classObj.getArrayNItems(); ++i) {
|
128
|
+
if (i > 0) oss << " ";
|
129
|
+
if (classObj.getArrayItem(i).isName()) {
|
130
|
+
std::string className = classObj.getArrayItem(i).getName();
|
131
|
+
oss << (className[0] == '/' ? className.substr(1) : className);
|
132
|
+
}
|
133
|
+
}
|
134
|
+
}
|
135
|
+
oss << "\"";
|
136
|
+
}
|
137
|
+
|
138
|
+
void StructElemNode::processChildren(std::ostringstream& oss, int level, PDFStructWalker& walker) {
|
139
|
+
if (!node.hasKey("/K")) return;
|
140
|
+
|
141
|
+
QPDFObjectHandle kids = node.getKey("/K");
|
142
|
+
|
143
|
+
// Handle direct value (single child)
|
144
|
+
if (!kids.isArray()) {
|
145
|
+
std::unique_ptr<StructNode> childNode = StructNode::fromQPDF(kids);
|
146
|
+
oss << childNode->to_string(level, walker);
|
147
|
+
return;
|
148
|
+
}
|
149
|
+
|
150
|
+
// Handle array of children
|
151
|
+
for (int i = 0; i < kids.getArrayNItems(); ++i) {
|
152
|
+
QPDFObjectHandle kid = kids.getArrayItem(i);
|
153
|
+
std::unique_ptr<StructNode> childNode = StructNode::fromQPDF(kid);
|
154
|
+
oss << childNode->to_string(level, walker);
|
155
|
+
}
|
156
|
+
}
|
157
|
+
|
158
|
+
void StructElemNode::addBboxAttribute(std::ostringstream& oss) {
|
159
|
+
if (node.hasKey("/BBox") && node.getKey("/BBox").isArray()) {
|
160
|
+
QPDFObjectHandle bbox = node.getKey("/BBox");
|
161
|
+
if (bbox.getArrayNItems() == 4) {
|
162
|
+
oss << " BBox=\"";
|
163
|
+
for (int i = 0; i < 4; ++i) {
|
164
|
+
if (i > 0) oss << " ";
|
165
|
+
if (bbox.getArrayItem(i).isNumber()) {
|
166
|
+
oss << bbox.getArrayItem(i).getNumericValue();
|
167
|
+
}
|
168
|
+
}
|
169
|
+
oss << "\"";
|
170
|
+
}
|
171
|
+
}
|
172
|
+
|
173
|
+
if (node.hasKey("/A")) {
|
174
|
+
QPDFObjectHandle A = node.getKey("/A");
|
175
|
+
if (A.isDictionary() && A.hasKey("/BBox")) {
|
176
|
+
auto bbox = A.getKey("/BBox");
|
177
|
+
oss << " BBox=\"[" << bbox.getArrayItem(0).getNumericValue() << ", " << bbox.getArrayItem(1).getNumericValue()
|
178
|
+
<< ", " << bbox.getArrayItem(2).getNumericValue() << ", " << bbox.getArrayItem(3).getNumericValue() << "]\"";
|
179
|
+
} else if (A.isArray()) {
|
180
|
+
for (int i = 0; i < A.getArrayNItems(); ++i) {
|
181
|
+
if (A.getArrayItem(i).isDictionary() && A.getArrayItem(i).hasKey("/O") &&
|
182
|
+
A.getArrayItem(i).getKey("/O").getName() == "/Layout" && A.getArrayItem(i).hasKey("/BBox")) {
|
183
|
+
auto bbox = A.getArrayItem(i).getKey("/BBox");
|
184
|
+
oss << " BBox=\"[" << bbox.getArrayItem(0).getNumericValue() << ", " << bbox.getArrayItem(1).getNumericValue()
|
185
|
+
<< ", " << bbox.getArrayItem(2).getNumericValue() << ", " << bbox.getArrayItem(3).getNumericValue()
|
186
|
+
<< "]\"";
|
187
|
+
break;
|
188
|
+
}
|
189
|
+
}
|
190
|
+
}
|
191
|
+
oss << " ";
|
192
|
+
}
|
193
|
+
}
|
194
|
+
|
195
|
+
void StructElemNode::addNamespaceAttribute(std::ostringstream& oss) {
|
196
|
+
if (node.hasKey("/NS") && node.getKey("/NS").isDictionary()) {
|
197
|
+
QPDFObjectHandle ns = node.getKey("/NS");
|
198
|
+
if (ns.hasKey("/NS") && ns.getKey("/NS").isName()) {
|
199
|
+
std::string nsName = ns.getKey("/NS").getName();
|
200
|
+
oss << " NS=\"" << (nsName[0] == '/' ? nsName.substr(1) : nsName) << "\"";
|
201
|
+
}
|
202
|
+
}
|
203
|
+
}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#include "struct_node.hpp"
|
2
|
+
|
3
|
+
std::unique_ptr<StructNode> StructNode::fromQPDF(QPDFObjectHandle node) {
|
4
|
+
if (node.isInteger()) {
|
5
|
+
return std::make_unique<McidNode>(node.getIntValue());
|
6
|
+
}
|
7
|
+
|
8
|
+
if (node.isArray()) {
|
9
|
+
auto arrayNode = std::make_unique<ArrayNode>();
|
10
|
+
for (int i = 0; i < node.getArrayNItems(); ++i) {
|
11
|
+
arrayNode->addChild(fromQPDF(node.getArrayItem(i)));
|
12
|
+
}
|
13
|
+
return arrayNode;
|
14
|
+
}
|
15
|
+
|
16
|
+
if (node.isDictionary()) {
|
17
|
+
if (node.hasKey("/Type") && node.getKey("/Type").isName() && node.getKey("/Type").getName() == "MCR" &&
|
18
|
+
node.hasKey("/MCID") && node.hasKey("/Pg")) {
|
19
|
+
int mcid = node.getKey("/MCID").getIntValue();
|
20
|
+
QPDFObjectHandle pg = node.getKey("/Pg");
|
21
|
+
auto og = pg.getObjGen();
|
22
|
+
// Optionally, pass page number if you can look it up here
|
23
|
+
return std::make_unique<McrNode>(mcid, og.getObj(), og.getGen());
|
24
|
+
}
|
25
|
+
|
26
|
+
if (node.hasKey("/S") && node.getKey("/S").isName()) {
|
27
|
+
std::string tag = node.getKey("/S").getName();
|
28
|
+
if (tag == "/Figure") {
|
29
|
+
return std::make_unique<FigureNode>(node);
|
30
|
+
}
|
31
|
+
}
|
32
|
+
|
33
|
+
if (node.hasKey("/S") ||
|
34
|
+
(node.hasKey("/Type") && node.getKey("/Type").isName() && node.getKey("/Type").getName() == "StructElem")) {
|
35
|
+
return std::make_unique<StructElemNode>(node);
|
36
|
+
}
|
37
|
+
// Handle other dictionary types as needed
|
38
|
+
return std::make_unique<UnknownNode>("Dictionary");
|
39
|
+
}
|
40
|
+
|
41
|
+
if (node.isStream()) {
|
42
|
+
auto data = node.getStreamData();
|
43
|
+
return std::make_unique<StreamNode>(data->getSize());
|
44
|
+
}
|
45
|
+
|
46
|
+
return std::make_unique<UnknownNode>(node.getTypeName());
|
47
|
+
}
|
48
|
+
|
49
|
+
void StructNode::print(std::ostream& out, int level, PDFStructWalker& walker) { out << this->to_string(level, walker); }
|
50
|
+
|
51
|
+
void StructNode::ensureLayoutBBox(PDFStructWalker& walker) {}
|
@@ -0,0 +1,115 @@
|
|
1
|
+
#pragma once
|
2
|
+
|
3
|
+
#include <qpdf/QPDF.hh>
|
4
|
+
#include <qpdf/QPDFWriter.hh>
|
5
|
+
#include <qpdf/QPDFPageObjectHelper.hh>
|
6
|
+
#include <qpdf/QPDFObjectHandle.hh>
|
7
|
+
|
8
|
+
#include <iostream>
|
9
|
+
#include <stdexcept> // For std::exception (if you add try-catch)
|
10
|
+
#include <vector> // For std::vector
|
11
|
+
#include <string> // For std::string
|
12
|
+
#include <regex>
|
13
|
+
#include <map>
|
14
|
+
|
15
|
+
#include "pdf_struct_walker.hpp"
|
16
|
+
|
17
|
+
class StructNode {
|
18
|
+
public:
|
19
|
+
virtual ~StructNode() = default;
|
20
|
+
virtual std::string to_string(int level, PDFStructWalker& walker) = 0;
|
21
|
+
void print(std::ostream& out, int level, PDFStructWalker& walker);
|
22
|
+
virtual void ensureLayoutBBox(PDFStructWalker& walker);
|
23
|
+
|
24
|
+
static std::unique_ptr<StructNode> fromQPDF(QPDFObjectHandle node);
|
25
|
+
};
|
26
|
+
|
27
|
+
class StructElemNode : public StructNode {
|
28
|
+
protected:
|
29
|
+
QPDFObjectHandle node;
|
30
|
+
|
31
|
+
public:
|
32
|
+
StructElemNode(QPDFObjectHandle n) : node(n) {}
|
33
|
+
std::string to_string(int level, PDFStructWalker& walker) override;
|
34
|
+
void ensureLayoutBBox(PDFStructWalker& walker) override;
|
35
|
+
|
36
|
+
private:
|
37
|
+
std::string getStructureTag();
|
38
|
+
int findPageNumber(PDFStructWalker& walker);
|
39
|
+
void printOpeningTag(std::ostringstream& oss, int level, const std::string& tag, int pageNum,
|
40
|
+
PDFStructWalker& walker);
|
41
|
+
void addAttributeIfPresent(std::ostringstream& oss, const std::string& key, const std::string& attributeName);
|
42
|
+
void addClassAttribute(std::ostringstream& oss);
|
43
|
+
void addBboxAttribute(std::ostringstream& oss);
|
44
|
+
void addNamespaceAttribute(std::ostringstream& oss);
|
45
|
+
void processChildren(std::ostringstream& oss, int level, PDFStructWalker& walker);
|
46
|
+
};
|
47
|
+
|
48
|
+
class FigureNode : public StructElemNode {
|
49
|
+
public:
|
50
|
+
FigureNode(QPDFObjectHandle n) : StructElemNode(n) {}
|
51
|
+
void ensureLayoutBBox(PDFStructWalker& walker) override;
|
52
|
+
};
|
53
|
+
|
54
|
+
class McidNode : public StructNode {
|
55
|
+
private:
|
56
|
+
int mcid;
|
57
|
+
int pageNumber = -1; // Default to -1 (unknown)
|
58
|
+
public:
|
59
|
+
McidNode(int id) : mcid(id) {}
|
60
|
+
std::string to_string(int level, PDFStructWalker& walker) override;
|
61
|
+
int getMcid() const; // Declaration only
|
62
|
+
void setPage(int page); // Declaration only
|
63
|
+
};
|
64
|
+
|
65
|
+
class McrNode : public StructNode {
|
66
|
+
public:
|
67
|
+
McrNode(int mcid, int pageObj, int pageGen, int pageNumber = 0);
|
68
|
+
std::string to_string(int level, PDFStructWalker& walker) override;
|
69
|
+
int getMcid() const;
|
70
|
+
void setPageNumber(int pageNum);
|
71
|
+
|
72
|
+
private:
|
73
|
+
int mcid;
|
74
|
+
int pageObj;
|
75
|
+
int pageGen;
|
76
|
+
int pageNumber;
|
77
|
+
};
|
78
|
+
|
79
|
+
class ArrayNode : public StructNode {
|
80
|
+
private:
|
81
|
+
std::vector<std::unique_ptr<StructNode>> children;
|
82
|
+
|
83
|
+
public:
|
84
|
+
ArrayNode() = default;
|
85
|
+
void addChild(std::unique_ptr<StructNode> child);
|
86
|
+
std::string to_string(int level, PDFStructWalker& walker) override;
|
87
|
+
void ensureLayoutBBox(PDFStructWalker& walker) override;
|
88
|
+
};
|
89
|
+
|
90
|
+
class StreamNode : public StructNode {
|
91
|
+
private:
|
92
|
+
size_t size;
|
93
|
+
|
94
|
+
public:
|
95
|
+
StreamNode(size_t streamSize) : size(streamSize) {}
|
96
|
+
std::string to_string(int level, PDFStructWalker& walker) override;
|
97
|
+
};
|
98
|
+
|
99
|
+
class UnknownNode : public StructNode {
|
100
|
+
private:
|
101
|
+
std::string typeName;
|
102
|
+
|
103
|
+
public:
|
104
|
+
UnknownNode(const std::string& type) : typeName(type) {}
|
105
|
+
std::string to_string(int level, PDFStructWalker& walker) override;
|
106
|
+
};
|
107
|
+
|
108
|
+
class IndentHelper {
|
109
|
+
public:
|
110
|
+
static void indent(std::ostream& out, int level) {
|
111
|
+
for (int i = 0; i < level; ++i) {
|
112
|
+
out << " ";
|
113
|
+
}
|
114
|
+
}
|
115
|
+
};
|
data/lib/qpdf_ruby.rb
ADDED
data/sig/qpdf_ruby.rbs
ADDED
metadata
ADDED
@@ -0,0 +1,191 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: qpdf_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dieter S.
|
8
|
+
bindir: exe
|
9
|
+
cert_chain: []
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
11
|
+
dependencies:
|
12
|
+
- !ruby/object:Gem::Dependency
|
13
|
+
name: irb
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
15
|
+
requirements:
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '0'
|
19
|
+
type: :development
|
20
|
+
prerelease: false
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ">="
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '0'
|
26
|
+
- !ruby/object:Gem::Dependency
|
27
|
+
name: nokogiri
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - "~>"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '1.8'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '1.8'
|
40
|
+
- !ruby/object:Gem::Dependency
|
41
|
+
name: rake
|
42
|
+
requirement: !ruby/object:Gem::Requirement
|
43
|
+
requirements:
|
44
|
+
- - "~>"
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: '13.0'
|
47
|
+
type: :development
|
48
|
+
prerelease: false
|
49
|
+
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - "~>"
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '13.0'
|
54
|
+
- !ruby/object:Gem::Dependency
|
55
|
+
name: rake-compiler
|
56
|
+
requirement: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
type: :development
|
62
|
+
prerelease: false
|
63
|
+
version_requirements: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
- !ruby/object:Gem::Dependency
|
69
|
+
name: rspec
|
70
|
+
requirement: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - "~>"
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '3.0'
|
75
|
+
type: :development
|
76
|
+
prerelease: false
|
77
|
+
version_requirements: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '3.0'
|
82
|
+
- !ruby/object:Gem::Dependency
|
83
|
+
name: rubocop
|
84
|
+
requirement: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '1.21'
|
89
|
+
type: :development
|
90
|
+
prerelease: false
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '1.21'
|
96
|
+
- !ruby/object:Gem::Dependency
|
97
|
+
name: rubocop-rake
|
98
|
+
requirement: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0.7'
|
103
|
+
type: :development
|
104
|
+
prerelease: false
|
105
|
+
version_requirements: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0.7'
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: rubocop-rspec
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.5'
|
117
|
+
type: :development
|
118
|
+
prerelease: false
|
119
|
+
version_requirements: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - "~>"
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '3.5'
|
124
|
+
description: This gem provides a comprehensive Ruby wrapper around
|
125
|
+
email:
|
126
|
+
- 101627195+dieter-medium@users.noreply.github.com
|
127
|
+
executables:
|
128
|
+
- qpdf_ruby
|
129
|
+
extensions:
|
130
|
+
- ext/qpdf_ruby/extconf.rb
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- ".clang-format"
|
134
|
+
- ".rspec"
|
135
|
+
- ".rubocop.yml"
|
136
|
+
- ".ruby-gemset"
|
137
|
+
- ".ruby-version"
|
138
|
+
- CHANGELOG.md
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.md
|
141
|
+
- Rakefile
|
142
|
+
- docker/Dockerfile
|
143
|
+
- exe/qpdf_ruby
|
144
|
+
- ext/qpdf_ruby/array_node.cpp
|
145
|
+
- ext/qpdf_ruby/document_handle.cpp
|
146
|
+
- ext/qpdf_ruby/document_handle.hpp
|
147
|
+
- ext/qpdf_ruby/extconf.rb
|
148
|
+
- ext/qpdf_ruby/figure_node.cpp
|
149
|
+
- ext/qpdf_ruby/mcid_node.cpp
|
150
|
+
- ext/qpdf_ruby/mcr_node.cpp
|
151
|
+
- ext/qpdf_ruby/pdf_image_mapper.cpp
|
152
|
+
- ext/qpdf_ruby/pdf_image_mapper.hpp
|
153
|
+
- ext/qpdf_ruby/pdf_struct_walker.cpp
|
154
|
+
- ext/qpdf_ruby/pdf_struct_walker.hpp
|
155
|
+
- ext/qpdf_ruby/qpdf_ruby.cpp
|
156
|
+
- ext/qpdf_ruby/qpdf_ruby.hpp
|
157
|
+
- ext/qpdf_ruby/stream_node.cpp
|
158
|
+
- ext/qpdf_ruby/struct_elem_node.cpp
|
159
|
+
- ext/qpdf_ruby/struct_node.cpp
|
160
|
+
- ext/qpdf_ruby/struct_node.hpp
|
161
|
+
- ext/qpdf_ruby/unknown_node.cpp
|
162
|
+
- lib/qpdf_ruby.rb
|
163
|
+
- lib/qpdf_ruby/version.rb
|
164
|
+
- sig/qpdf_ruby.rbs
|
165
|
+
homepage: https://github.com/dieter-medium/qpdf_ruby
|
166
|
+
licenses:
|
167
|
+
- MIT
|
168
|
+
metadata:
|
169
|
+
allowed_push_host: https://rubygems.org
|
170
|
+
homepage_uri: https://github.com/dieter-medium/qpdf_ruby
|
171
|
+
source_code_uri: https://github.com/dieter-medium/qpdf_ruby
|
172
|
+
changelog_uri: https://github.com/dieter-medium/qpdf_ruby/blob/master/CHANGELOG.md
|
173
|
+
rubygems_mfa_required: 'true'
|
174
|
+
rdoc_options: []
|
175
|
+
require_paths:
|
176
|
+
- lib
|
177
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: 3.3.0
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
requirements: []
|
188
|
+
rubygems_version: 3.6.8
|
189
|
+
specification_version: 4
|
190
|
+
summary: A Ruby interface .
|
191
|
+
test_files: []
|