paperback 0.0.3 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +5 -5
  2. data/.github/workflows/tests.yml +46 -0
  3. data/.rubocop-disables.yml +26 -12
  4. data/CHANGELOG.md +21 -0
  5. data/README.md +27 -6
  6. data/bin/paperback +4 -0
  7. data/lib/paperback/cli.rb +38 -2
  8. data/lib/paperback/document.rb +134 -17
  9. data/lib/paperback/preparer.rb +107 -29
  10. data/lib/paperback/version.rb +2 -1
  11. data/lib/paperback.rb +12 -0
  12. data/paperback.gemspec +10 -7
  13. data/sorbet/config +3 -0
  14. data/sorbet/rbi/annotations/rainbow.rbi +269 -0
  15. data/sorbet/rbi/gems/ast@2.4.2.rbi +584 -0
  16. data/sorbet/rbi/gems/chunky_png@1.4.0.rbi +4498 -0
  17. data/sorbet/rbi/gems/coderay@1.1.3.rbi +3426 -0
  18. data/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +1083 -0
  19. data/sorbet/rbi/gems/method_source@1.0.0.rbi +272 -0
  20. data/sorbet/rbi/gems/netrc@0.11.0.rbi +158 -0
  21. data/sorbet/rbi/gems/parallel@1.22.1.rbi +277 -0
  22. data/sorbet/rbi/gems/parser@3.2.0.0.rbi +6963 -0
  23. data/sorbet/rbi/gems/pdf-core@0.4.0.rbi +1682 -0
  24. data/sorbet/rbi/gems/prawn@1.3.0.rbi +5567 -0
  25. data/sorbet/rbi/gems/pry@0.14.1.rbi +9990 -0
  26. data/sorbet/rbi/gems/rainbow@3.1.1.rbi +408 -0
  27. data/sorbet/rbi/gems/rake@13.0.6.rbi +3023 -0
  28. data/sorbet/rbi/gems/rbi@0.0.16.rbi +3008 -0
  29. data/sorbet/rbi/gems/regexp_parser@2.6.1.rbi +3481 -0
  30. data/sorbet/rbi/gems/rexml@3.2.5.rbi +4717 -0
  31. data/sorbet/rbi/gems/rqrcode@0.10.1.rbi +617 -0
  32. data/sorbet/rbi/gems/rspec-core@3.12.0.rbi +10791 -0
  33. data/sorbet/rbi/gems/rspec-expectations@3.12.1.rbi +8106 -0
  34. data/sorbet/rbi/gems/rspec-mocks@3.12.1.rbi +5305 -0
  35. data/sorbet/rbi/gems/rspec-support@3.12.0.rbi +1617 -0
  36. data/sorbet/rbi/gems/rspec@3.12.0.rbi +88 -0
  37. data/sorbet/rbi/gems/rubocop-ast@1.24.1.rbi +6617 -0
  38. data/sorbet/rbi/gems/rubocop@0.93.1.rbi +40848 -0
  39. data/sorbet/rbi/gems/ruby-progressbar@1.11.0.rbi +1234 -0
  40. data/sorbet/rbi/gems/sixword@0.4.0.rbi +536 -0
  41. data/sorbet/rbi/gems/spoom@1.1.15.rbi +2383 -0
  42. data/sorbet/rbi/gems/subprocess@1.5.6.rbi +391 -0
  43. data/sorbet/rbi/gems/tapioca@0.10.5.rbi +3207 -0
  44. data/sorbet/rbi/gems/thor@1.2.1.rbi +3956 -0
  45. data/sorbet/rbi/gems/ttfunk@1.4.0.rbi +1951 -0
  46. data/sorbet/rbi/gems/unicode-display_width@1.8.0.rbi +40 -0
  47. data/sorbet/rbi/gems/unparser@0.6.7.rbi +4524 -0
  48. data/sorbet/rbi/gems/webrick@1.7.0.rbi +2555 -0
  49. data/sorbet/rbi/gems/yard-sorbet@0.8.0.rbi +441 -0
  50. data/sorbet/rbi/gems/yard@0.9.28.rbi +17816 -0
  51. data/sorbet/tapioca/config.yml +13 -0
  52. data/sorbet/tapioca/require.rb +4 -0
  53. data/spec/functional/paperback/cli_spec.rb +195 -0
  54. data/spec/spec_helper.rb +1 -0
  55. data/spec/unit/paperback_spec.rb +1 -0
  56. metadata +91 -7
@@ -0,0 +1,1682 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `pdf-core` gem.
5
+ # Please instead update this file by running `bin/tapioca gem pdf-core`.
6
+
7
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#11
8
+ module PDF; end
9
+
10
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#12
11
+ module PDF::Core
12
+ private
13
+
14
+ # source://prawn/1.3.0/lib/prawn/security.rb#216
15
+ def EncryptedPdfObject(obj, key, id, gen, in_content_stream = T.unsafe(nil)); end
16
+
17
+ # Serializes Ruby objects to their PDF equivalents. Most primitive objects
18
+ # will work as expected, but please note that Name objects are represented
19
+ # by Ruby Symbol objects and Dictionary objects are represented by Ruby hashes
20
+ # (keyed by symbols)
21
+ #
22
+ # Examples:
23
+ #
24
+ # PdfObject(true) #=> "true"
25
+ # PdfObject(false) #=> "false"
26
+ # PdfObject(1.2124) #=> "1.2124"
27
+ # PdfObject("foo bar") #=> "(foo bar)"
28
+ # PdfObject(:Symbol) #=> "/Symbol"
29
+ # PdfObject(["foo",:bar, [1,2]]) #=> "[foo /bar [1 2]]"
30
+ #
31
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#40
32
+ def PdfObject(obj, in_content_stream = T.unsafe(nil)); end
33
+
34
+ # source://pdf-core//lib/pdf/core/reference.rb#74
35
+ def Reference(*args, &block); end
36
+
37
+ # encodes any string into a hex representation. The result is a string
38
+ # with only 0-9 and a-f characters. That result is valid ASCII so tag
39
+ # it as such to account for behaviour of different ruby VMs
40
+ #
41
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#22
42
+ def string_to_hex(str); end
43
+
44
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#15
45
+ def utf8_to_utf16(str); end
46
+
47
+ class << self
48
+ # source://prawn/1.3.0/lib/prawn/security.rb#216
49
+ def EncryptedPdfObject(obj, key, id, gen, in_content_stream = T.unsafe(nil)); end
50
+
51
+ # Serializes Ruby objects to their PDF equivalents. Most primitive objects
52
+ # will work as expected, but please note that Name objects are represented
53
+ # by Ruby Symbol objects and Dictionary objects are represented by Ruby hashes
54
+ # (keyed by symbols)
55
+ #
56
+ # Examples:
57
+ #
58
+ # PdfObject(true) #=> "true"
59
+ # PdfObject(false) #=> "false"
60
+ # PdfObject(1.2124) #=> "1.2124"
61
+ # PdfObject("foo bar") #=> "(foo bar)"
62
+ # PdfObject(:Symbol) #=> "/Symbol"
63
+ # PdfObject(["foo",:bar, [1,2]]) #=> "[foo /bar [1 2]]"
64
+ #
65
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#40
66
+ def PdfObject(obj, in_content_stream = T.unsafe(nil)); end
67
+
68
+ # source://pdf-core//lib/pdf/core/reference.rb#74
69
+ def Reference(*args, &block); end
70
+
71
+ # encodes any string into a hex representation. The result is a string
72
+ # with only 0-9 and a-f characters. That result is valid ASCII so tag
73
+ # it as such to account for behaviour of different ruby VMs
74
+ #
75
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#22
76
+ def string_to_hex(str); end
77
+
78
+ # source://pdf-core//lib/pdf/core/pdf_object.rb#15
79
+ def utf8_to_utf16(str); end
80
+ end
81
+ end
82
+
83
+ # Provides very low-level support for annotations.
84
+ #
85
+ # source://pdf-core//lib/pdf/core/annotations.rb#13
86
+ module PDF::Core::Annotations
87
+ # Adds a new annotation (section 8.4 in PDF spec) to the current page.
88
+ # +options+ must be a Hash describing the annotation.
89
+ #
90
+ # source://pdf-core//lib/pdf/core/annotations.rb#18
91
+ def annotate(options); end
92
+
93
+ # A convenience method for creating Link annotations. +rect+ must be an array
94
+ # of four numbers, describing the bounds of the annotation. The +options+ hash
95
+ # should include either :Dest (describing the target destination, usually as a
96
+ # string that has been recorded in the document's Dests tree), or :A (describing
97
+ # an action to perform on clicking the link), or :PA (for describing a URL to
98
+ # link to).
99
+ #
100
+ # source://pdf-core//lib/pdf/core/annotations.rb#41
101
+ def link_annotation(rect, options = T.unsafe(nil)); end
102
+
103
+ # A convenience method for creating Text annotations. +rect+ must be an array
104
+ # of four numbers, describing the bounds of the annotation. +contents+ should
105
+ # be a string, to be shown when the annotation is activated.
106
+ #
107
+ # source://pdf-core//lib/pdf/core/annotations.rb#29
108
+ def text_annotation(rect, contents, options = T.unsafe(nil)); end
109
+
110
+ private
111
+
112
+ # source://pdf-core//lib/pdf/core/annotations.rb#48
113
+ def sanitize_annotation_hash(options); end
114
+ end
115
+
116
+ # This is used to differentiate strings that must be encoded as
117
+ # a byte string, such as binary data from encrypted strings.
118
+ #
119
+ # source://pdf-core//lib/pdf/core/byte_string.rb#6
120
+ class PDF::Core::ByteString < ::String; end
121
+
122
+ # source://pdf-core//lib/pdf/core/destinations.rb#11
123
+ module PDF::Core::Destinations
124
+ # Adds a new destination to the dests name tree (see #dests). The
125
+ # +reference+ parameter will be converted into a PDF::Core::Reference if
126
+ # it is not already one.
127
+ #
128
+ # source://pdf-core//lib/pdf/core/destinations.rb#28
129
+ def add_dest(name, reference); end
130
+
131
+ # Return a Dest specification that will fit the given page into the
132
+ # viewport.
133
+ #
134
+ # source://pdf-core//lib/pdf/core/destinations.rb#43
135
+ def dest_fit(dest_page = T.unsafe(nil)); end
136
+
137
+ # Return a Dest specfication that will fit the given page's bounding box
138
+ # into the viewport.
139
+ #
140
+ # source://pdf-core//lib/pdf/core/destinations.rb#71
141
+ def dest_fit_bounds(dest_page = T.unsafe(nil)); end
142
+
143
+ # Same as #dest_fit_horizontally, but works on the page's bounding box
144
+ # instead of the entire page.
145
+ #
146
+ # source://pdf-core//lib/pdf/core/destinations.rb#78
147
+ def dest_fit_bounds_horizontally(top, dest_page = T.unsafe(nil)); end
148
+
149
+ # Same as #dest_fit_vertically, but works on the page's bounding box
150
+ # instead of the entire page.
151
+ #
152
+ # source://pdf-core//lib/pdf/core/destinations.rb#85
153
+ def dest_fit_bounds_vertically(left, dest_page = T.unsafe(nil)); end
154
+
155
+ # Return a Dest specification that will fit the given page horizontally
156
+ # into the viewport, aligned vertically at the given top coordinate.
157
+ #
158
+ # source://pdf-core//lib/pdf/core/destinations.rb#50
159
+ def dest_fit_horizontally(top, dest_page = T.unsafe(nil)); end
160
+
161
+ # Return a Dest specification that will fit the given rectangle into the
162
+ # viewport, for the given page.
163
+ #
164
+ # source://pdf-core//lib/pdf/core/destinations.rb#64
165
+ def dest_fit_rect(left, bottom, right, top, dest_page = T.unsafe(nil)); end
166
+
167
+ # Return a Dest specification that will fit the given page vertically
168
+ # into the viewport, aligned horizontally at the given left coordinate.
169
+ #
170
+ # source://pdf-core//lib/pdf/core/destinations.rb#57
171
+ def dest_fit_vertically(left, dest_page = T.unsafe(nil)); end
172
+
173
+ # Return a Dest specification for a specific location (and optional zoom
174
+ # level).
175
+ #
176
+ # source://pdf-core//lib/pdf/core/destinations.rb#36
177
+ def dest_xyz(left, top, zoom = T.unsafe(nil), dest_page = T.unsafe(nil)); end
178
+
179
+ # The Dests name tree in the Name dictionary (see Prawn::Document::Internal#names).
180
+ # This name tree is used to store named destinations (PDF spec 8.2.1).
181
+ # (For more on name trees, see section 3.8.4 in the PDF spec.)
182
+ #
183
+ # source://pdf-core//lib/pdf/core/destinations.rb#20
184
+ def dests; end
185
+ end
186
+
187
+ # The maximum number of children to fit into a single node in the Dests tree.
188
+ #
189
+ # source://pdf-core//lib/pdf/core/destinations.rb#14
190
+ PDF::Core::Destinations::NAME_TREE_CHILDREN_LIMIT = T.let(T.unsafe(nil), Integer)
191
+
192
+ # source://pdf-core//lib/pdf/core/document_state.rb#3
193
+ class PDF::Core::DocumentState
194
+ # @return [DocumentState] a new instance of DocumentState
195
+ #
196
+ # source://pdf-core//lib/pdf/core/document_state.rb#4
197
+ def initialize(options); end
198
+
199
+ # source://pdf-core//lib/pdf/core/document_state.rb#59
200
+ def before_render_actions(doc); end
201
+
202
+ # Returns the value of attribute before_render_callbacks.
203
+ #
204
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
205
+ def before_render_callbacks; end
206
+
207
+ # Sets the attribute before_render_callbacks
208
+ #
209
+ # @param value the value to set the attribute before_render_callbacks to.
210
+ #
211
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
212
+ def before_render_callbacks=(_arg0); end
213
+
214
+ # Returns the value of attribute compress.
215
+ #
216
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
217
+ def compress; end
218
+
219
+ # Sets the attribute compress
220
+ #
221
+ # @param value the value to set the attribute compress to.
222
+ #
223
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
224
+ def compress=(_arg0); end
225
+
226
+ # Returns the value of attribute encrypt.
227
+ #
228
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
229
+ def encrypt; end
230
+
231
+ # Sets the attribute encrypt
232
+ #
233
+ # @param value the value to set the attribute encrypt to.
234
+ #
235
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
236
+ def encrypt=(_arg0); end
237
+
238
+ # Returns the value of attribute encryption_key.
239
+ #
240
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
241
+ def encryption_key; end
242
+
243
+ # Sets the attribute encryption_key
244
+ #
245
+ # @param value the value to set the attribute encryption_key to.
246
+ #
247
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
248
+ def encryption_key=(_arg0); end
249
+
250
+ # source://pdf-core//lib/pdf/core/document_state.rb#49
251
+ def insert_page(page, page_number); end
252
+
253
+ # source://pdf-core//lib/pdf/core/document_state.rb#41
254
+ def normalize_metadata(options); end
255
+
256
+ # source://pdf-core//lib/pdf/core/document_state.rb#55
257
+ def on_page_create_action(doc); end
258
+
259
+ # Returns the value of attribute on_page_create_callback.
260
+ #
261
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
262
+ def on_page_create_callback; end
263
+
264
+ # Sets the attribute on_page_create_callback
265
+ #
266
+ # @param value the value to set the attribute on_page_create_callback to.
267
+ #
268
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
269
+ def on_page_create_callback=(_arg0); end
270
+
271
+ # Returns the value of attribute page.
272
+ #
273
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
274
+ def page; end
275
+
276
+ # Sets the attribute page
277
+ #
278
+ # @param value the value to set the attribute page to.
279
+ #
280
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
281
+ def page=(_arg0); end
282
+
283
+ # source://pdf-core//lib/pdf/core/document_state.rb#63
284
+ def page_count; end
285
+
286
+ # Returns the value of attribute pages.
287
+ #
288
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
289
+ def pages; end
290
+
291
+ # Sets the attribute pages
292
+ #
293
+ # @param value the value to set the attribute pages to.
294
+ #
295
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
296
+ def pages=(_arg0); end
297
+
298
+ # source://pdf-core//lib/pdf/core/document_state.rb#30
299
+ def populate_pages_from_store(document); end
300
+
301
+ # source://pdf-core//lib/pdf/core/document_state.rb#67
302
+ def render_body(output); end
303
+
304
+ # Returns the value of attribute skip_encoding.
305
+ #
306
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
307
+ def skip_encoding; end
308
+
309
+ # Sets the attribute skip_encoding
310
+ #
311
+ # @param value the value to set the attribute skip_encoding to.
312
+ #
313
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
314
+ def skip_encoding=(_arg0); end
315
+
316
+ # Returns the value of attribute store.
317
+ #
318
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
319
+ def store; end
320
+
321
+ # Sets the attribute store
322
+ #
323
+ # @param value the value to set the attribute store to.
324
+ #
325
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
326
+ def store=(_arg0); end
327
+
328
+ # Returns the value of attribute trailer.
329
+ #
330
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
331
+ def trailer; end
332
+
333
+ # Sets the attribute trailer
334
+ #
335
+ # @param value the value to set the attribute trailer to.
336
+ #
337
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
338
+ def trailer=(_arg0); end
339
+
340
+ # Returns the value of attribute version.
341
+ #
342
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
343
+ def version; end
344
+
345
+ # Sets the attribute version
346
+ #
347
+ # @param value the value to set the attribute version to.
348
+ #
349
+ # source://pdf-core//lib/pdf/core/document_state.rb#26
350
+ def version=(_arg0); end
351
+ end
352
+
353
+ # source://pdf-core//lib/pdf/core.rb#22
354
+ module PDF::Core::Errors; end
355
+
356
+ # This error is raise when trying to restore a graphic state that
357
+ #
358
+ # source://pdf-core//lib/pdf/core.rb#27
359
+ class PDF::Core::Errors::EmptyGraphicStateStack < ::StandardError; end
360
+
361
+ # This error is raised when PdfObject() fails
362
+ #
363
+ # source://pdf-core//lib/pdf/core.rb#24
364
+ class PDF::Core::Errors::FailedObjectConversion < ::StandardError; end
365
+
366
+ # This error is raised when Document#page_layout is set to anything
367
+ # other than :portrait or :landscape
368
+ #
369
+ # source://pdf-core//lib/pdf/core.rb#31
370
+ class PDF::Core::Errors::InvalidPageLayout < ::StandardError; end
371
+
372
+ # source://pdf-core//lib/pdf/core/filter_list.rb#3
373
+ class PDF::Core::FilterList
374
+ # @return [FilterList] a new instance of FilterList
375
+ #
376
+ # source://pdf-core//lib/pdf/core/filter_list.rb#4
377
+ def initialize; end
378
+
379
+ # source://pdf-core//lib/pdf/core/filter_list.rb#8
380
+ def <<(filter); end
381
+
382
+ # source://pdf-core//lib/pdf/core/filter_list.rb#34
383
+ def decode_params; end
384
+
385
+ # source://pdf-core//lib/pdf/core/filter_list.rb#44
386
+ def each(&block); end
387
+
388
+ # source://pdf-core//lib/pdf/core/filter_list.rb#40
389
+ def inspect; end
390
+
391
+ # source://pdf-core//lib/pdf/core/filter_list.rb#28
392
+ def names; end
393
+
394
+ # source://pdf-core//lib/pdf/core/filter_list.rb#23
395
+ def normalized; end
396
+
397
+ # source://pdf-core//lib/pdf/core/filter_list.rb#23
398
+ def to_a; end
399
+ end
400
+
401
+ # source://pdf-core//lib/pdf/core/filters.rb#13
402
+ module PDF::Core::Filters; end
403
+
404
+ # Pass through stub
405
+ #
406
+ # source://pdf-core//lib/pdf/core/filters.rb#25
407
+ module PDF::Core::Filters::DCTDecode
408
+ class << self
409
+ # source://pdf-core//lib/pdf/core/filters.rb#30
410
+ def decode(stream, params = T.unsafe(nil)); end
411
+
412
+ # source://pdf-core//lib/pdf/core/filters.rb#26
413
+ def encode(stream, params = T.unsafe(nil)); end
414
+ end
415
+ end
416
+
417
+ # source://pdf-core//lib/pdf/core/filters.rb#14
418
+ module PDF::Core::Filters::FlateDecode
419
+ class << self
420
+ # source://pdf-core//lib/pdf/core/filters.rb#19
421
+ def decode(stream, params = T.unsafe(nil)); end
422
+
423
+ # source://pdf-core//lib/pdf/core/filters.rb#15
424
+ def encode(stream, params = T.unsafe(nil)); end
425
+ end
426
+ end
427
+
428
+ # NOTE: This class may be a good candidate for a copy-on-write hash.
429
+ #
430
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#47
431
+ class PDF::Core::GraphicState
432
+ # @return [GraphicState] a new instance of GraphicState
433
+ #
434
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#51
435
+ def initialize(previous_state = T.unsafe(nil)); end
436
+
437
+ # Returns the value of attribute cap_style.
438
+ #
439
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
440
+ def cap_style; end
441
+
442
+ # Sets the attribute cap_style
443
+ #
444
+ # @param value the value to set the attribute cap_style to.
445
+ #
446
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
447
+ def cap_style=(_arg0); end
448
+
449
+ # Returns the value of attribute color_space.
450
+ #
451
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
452
+ def color_space; end
453
+
454
+ # Sets the attribute color_space
455
+ #
456
+ # @param value the value to set the attribute color_space to.
457
+ #
458
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
459
+ def color_space=(_arg0); end
460
+
461
+ # Returns the value of attribute dash.
462
+ #
463
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
464
+ def dash; end
465
+
466
+ # Sets the attribute dash
467
+ #
468
+ # @param value the value to set the attribute dash to.
469
+ #
470
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
471
+ def dash=(_arg0); end
472
+
473
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#65
474
+ def dash_setting; end
475
+
476
+ # Returns the value of attribute fill_color.
477
+ #
478
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
479
+ def fill_color; end
480
+
481
+ # Sets the attribute fill_color
482
+ #
483
+ # @param value the value to set the attribute fill_color to.
484
+ #
485
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
486
+ def fill_color=(_arg0); end
487
+
488
+ # Returns the value of attribute join_style.
489
+ #
490
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
491
+ def join_style; end
492
+
493
+ # Sets the attribute join_style
494
+ #
495
+ # @param value the value to set the attribute join_style to.
496
+ #
497
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
498
+ def join_style=(_arg0); end
499
+
500
+ # Returns the value of attribute line_width.
501
+ #
502
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
503
+ def line_width; end
504
+
505
+ # Sets the attribute line_width
506
+ #
507
+ # @param value the value to set the attribute line_width to.
508
+ #
509
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
510
+ def line_width=(_arg0); end
511
+
512
+ # Returns the value of attribute stroke_color.
513
+ #
514
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
515
+ def stroke_color; end
516
+
517
+ # Sets the attribute stroke_color
518
+ #
519
+ # @param value the value to set the attribute stroke_color to.
520
+ #
521
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#48
522
+ def stroke_color=(_arg0); end
523
+
524
+ private
525
+
526
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#75
527
+ def initialize_copy(other); end
528
+ end
529
+
530
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#13
531
+ class PDF::Core::GraphicStateStack
532
+ # @return [GraphicStateStack] a new instance of GraphicStateStack
533
+ #
534
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#16
535
+ def initialize(previous_state = T.unsafe(nil)); end
536
+
537
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#32
538
+ def current_state; end
539
+
540
+ # @return [Boolean]
541
+ #
542
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#40
543
+ def empty?; end
544
+
545
+ # @return [Boolean]
546
+ #
547
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#36
548
+ def present?; end
549
+
550
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#24
551
+ def restore_graphic_state; end
552
+
553
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#20
554
+ def save_graphic_state(graphic_state = T.unsafe(nil)); end
555
+
556
+ # Returns the value of attribute stack.
557
+ #
558
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#14
559
+ def stack; end
560
+
561
+ # Sets the attribute stack
562
+ #
563
+ # @param value the value to set the attribute stack to.
564
+ #
565
+ # source://pdf-core//lib/pdf/core/graphics_state.rb#14
566
+ def stack=(_arg0); end
567
+ end
568
+
569
+ # This is used to differentiate strings that must be encoded as
570
+ # a *literal* string, versus those that can be encoded in
571
+ # the PDF hexadecimal format.
572
+ #
573
+ # Some features of the PDF format appear to require that literal
574
+ # strings be used. One such feature is the /Dest key of a link
575
+ # annotation; if a hex encoded string is used there, the links
576
+ # do not work (as tested in Mac OS X Preview, and Adobe Acrobat
577
+ # Reader).
578
+ #
579
+ # source://pdf-core//lib/pdf/core/literal_string.rb#13
580
+ class PDF::Core::LiteralString < ::String; end
581
+
582
+ # source://pdf-core//lib/pdf/core/name_tree.rb#11
583
+ module PDF::Core::NameTree; end
584
+
585
+ # source://pdf-core//lib/pdf/core/name_tree.rb#12
586
+ class PDF::Core::NameTree::Node
587
+ # @return [Node] a new instance of Node
588
+ #
589
+ # source://pdf-core//lib/pdf/core/name_tree.rb#19
590
+ def initialize(document, limit, parent = T.unsafe(nil)); end
591
+
592
+ # source://pdf-core//lib/pdf/core/name_tree.rb#72
593
+ def <<(value); end
594
+
595
+ # source://pdf-core//lib/pdf/core/name_tree.rb#87
596
+ def >=(value); end
597
+
598
+ # source://pdf-core//lib/pdf/core/name_tree.rb#39
599
+ def add(name, value); end
600
+
601
+ # Returns the value of attribute children.
602
+ #
603
+ # source://pdf-core//lib/pdf/core/name_tree.rb#13
604
+ def children; end
605
+
606
+ # Returns a deep copy of this node, without copying expensive things
607
+ # like the ref to @document.
608
+ #
609
+ # source://pdf-core//lib/pdf/core/name_tree.rb#104
610
+ def deep_copy; end
611
+
612
+ # Returns the value of attribute document.
613
+ #
614
+ # source://pdf-core//lib/pdf/core/name_tree.rb#15
615
+ def document; end
616
+
617
+ # @return [Boolean]
618
+ #
619
+ # source://pdf-core//lib/pdf/core/name_tree.rb#27
620
+ def empty?; end
621
+
622
+ # source://pdf-core//lib/pdf/core/name_tree.rb#64
623
+ def greatest; end
624
+
625
+ # @return [Boolean]
626
+ #
627
+ # source://pdf-core//lib/pdf/core/name_tree.rb#35
628
+ def leaf?; end
629
+
630
+ # source://pdf-core//lib/pdf/core/name_tree.rb#56
631
+ def least; end
632
+
633
+ # Returns the value of attribute limit.
634
+ #
635
+ # source://pdf-core//lib/pdf/core/name_tree.rb#14
636
+ def limit; end
637
+
638
+ # Returns the value of attribute parent.
639
+ #
640
+ # source://pdf-core//lib/pdf/core/name_tree.rb#16
641
+ def parent; end
642
+
643
+ # Sets the attribute parent
644
+ #
645
+ # @param value the value to set the attribute parent to.
646
+ #
647
+ # source://pdf-core//lib/pdf/core/name_tree.rb#16
648
+ def parent=(_arg0); end
649
+
650
+ # Returns the value of attribute ref.
651
+ #
652
+ # source://pdf-core//lib/pdf/core/name_tree.rb#17
653
+ def ref; end
654
+
655
+ # Sets the attribute ref
656
+ #
657
+ # @param value the value to set the attribute ref to.
658
+ #
659
+ # source://pdf-core//lib/pdf/core/name_tree.rb#17
660
+ def ref=(_arg0); end
661
+
662
+ # source://pdf-core//lib/pdf/core/name_tree.rb#31
663
+ def size; end
664
+
665
+ # source://pdf-core//lib/pdf/core/name_tree.rb#91
666
+ def split!; end
667
+
668
+ # source://pdf-core//lib/pdf/core/name_tree.rb#43
669
+ def to_hash; end
670
+
671
+ protected
672
+
673
+ # source://pdf-core//lib/pdf/core/name_tree.rb#115
674
+ def split(node); end
675
+
676
+ private
677
+
678
+ # source://pdf-core//lib/pdf/core/name_tree.rb#145
679
+ def insertion_point(value); end
680
+
681
+ # source://pdf-core//lib/pdf/core/name_tree.rb#125
682
+ def new_node(parent = T.unsafe(nil)); end
683
+
684
+ # source://pdf-core//lib/pdf/core/name_tree.rb#131
685
+ def split_children(node, left, right); end
686
+ end
687
+
688
+ # source://pdf-core//lib/pdf/core/name_tree.rb#153
689
+ class PDF::Core::NameTree::Value
690
+ include ::Comparable
691
+
692
+ # @return [Value] a new instance of Value
693
+ #
694
+ # source://pdf-core//lib/pdf/core/name_tree.rb#159
695
+ def initialize(name, value); end
696
+
697
+ # source://pdf-core//lib/pdf/core/name_tree.rb#163
698
+ def <=>(leaf); end
699
+
700
+ # source://pdf-core//lib/pdf/core/name_tree.rb#167
701
+ def inspect; end
702
+
703
+ # Returns the value of attribute name.
704
+ #
705
+ # source://pdf-core//lib/pdf/core/name_tree.rb#156
706
+ def name; end
707
+
708
+ # source://pdf-core//lib/pdf/core/name_tree.rb#171
709
+ def to_s; end
710
+
711
+ # Returns the value of attribute value.
712
+ #
713
+ # source://pdf-core//lib/pdf/core/name_tree.rb#157
714
+ def value; end
715
+ end
716
+
717
+ # source://pdf-core//lib/pdf/core/object_store.rb#11
718
+ class PDF::Core::ObjectStore
719
+ include ::Enumerable
720
+
721
+ # @return [ObjectStore] a new instance of ObjectStore
722
+ #
723
+ # source://pdf-core//lib/pdf/core/object_store.rb#16
724
+ def initialize(opts = T.unsafe(nil)); end
725
+
726
+ # Adds the given reference to the store and returns the reference object.
727
+ # If the object provided is not a PDF::Core::Reference, one is created from the
728
+ # arguments provided.
729
+ #
730
+ # source://pdf-core//lib/pdf/core/object_store.rb#54
731
+ def <<(*args, &block); end
732
+
733
+ # source://pdf-core//lib/pdf/core/object_store.rb#74
734
+ def [](id); end
735
+
736
+ # source://pdf-core//lib/pdf/core/object_store.rb#68
737
+ def each; end
738
+
739
+ # source://pdf-core//lib/pdf/core/object_store.rb#34
740
+ def info; end
741
+
742
+ # @return [Boolean]
743
+ #
744
+ # source://pdf-core//lib/pdf/core/object_store.rb#99
745
+ def is_utf8?(str); end
746
+
747
+ # source://pdf-core//lib/pdf/core/object_store.rb#78
748
+ def length; end
749
+
750
+ # Returns the value of attribute min_version.
751
+ #
752
+ # source://pdf-core//lib/pdf/core/object_store.rb#14
753
+ def min_version; end
754
+
755
+ # returns the object ID for a particular page in the document. Pages
756
+ # are indexed starting at 1 (not 0!).
757
+ #
758
+ # object_id_for_page(1)
759
+ # => 5
760
+ # object_id_for_page(10)
761
+ # => 87
762
+ # object_id_for_page(-11)
763
+ # => 17
764
+ #
765
+ # source://pdf-core//lib/pdf/core/object_store.rb#93
766
+ def object_id_for_page(k); end
767
+
768
+ # source://pdf-core//lib/pdf/core/object_store.rb#46
769
+ def page_count; end
770
+
771
+ # source://pdf-core//lib/pdf/core/object_store.rb#42
772
+ def pages; end
773
+
774
+ # Adds the given reference to the store and returns the reference object.
775
+ # If the object provided is not a PDF::Core::Reference, one is created from the
776
+ # arguments provided.
777
+ #
778
+ # source://pdf-core//lib/pdf/core/object_store.rb#54
779
+ def push(*args, &block); end
780
+
781
+ # source://pdf-core//lib/pdf/core/object_store.rb#30
782
+ def ref(data, &block); end
783
+
784
+ # source://pdf-core//lib/pdf/core/object_store.rb#38
785
+ def root; end
786
+
787
+ # source://pdf-core//lib/pdf/core/object_store.rb#78
788
+ def size; end
789
+ end
790
+
791
+ # source://pdf-core//lib/pdf/core/outline_item.rb#3
792
+ class PDF::Core::OutlineItem
793
+ # @return [OutlineItem] a new instance of OutlineItem
794
+ #
795
+ # source://pdf-core//lib/pdf/core/outline_item.rb#6
796
+ def initialize(title, parent, options); end
797
+
798
+ # Returns the value of attribute closed.
799
+ #
800
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
801
+ def closed; end
802
+
803
+ # Sets the attribute closed
804
+ #
805
+ # @param value the value to set the attribute closed to.
806
+ #
807
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
808
+ def closed=(_arg0); end
809
+
810
+ # Returns the value of attribute count.
811
+ #
812
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
813
+ def count; end
814
+
815
+ # Sets the attribute count
816
+ #
817
+ # @param value the value to set the attribute count to.
818
+ #
819
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
820
+ def count=(_arg0); end
821
+
822
+ # Returns the value of attribute dest.
823
+ #
824
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
825
+ def dest; end
826
+
827
+ # Sets the attribute dest
828
+ #
829
+ # @param value the value to set the attribute dest to.
830
+ #
831
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
832
+ def dest=(_arg0); end
833
+
834
+ # Returns the value of attribute first.
835
+ #
836
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
837
+ def first; end
838
+
839
+ # Sets the attribute first
840
+ #
841
+ # @param value the value to set the attribute first to.
842
+ #
843
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
844
+ def first=(_arg0); end
845
+
846
+ # Returns the value of attribute last.
847
+ #
848
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
849
+ def last; end
850
+
851
+ # Sets the attribute last
852
+ #
853
+ # @param value the value to set the attribute last to.
854
+ #
855
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
856
+ def last=(_arg0); end
857
+
858
+ # Returns the value of attribute next.
859
+ #
860
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
861
+ def next; end
862
+
863
+ # Sets the attribute next
864
+ #
865
+ # @param value the value to set the attribute next to.
866
+ #
867
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
868
+ def next=(_arg0); end
869
+
870
+ # Returns the value of attribute parent.
871
+ #
872
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
873
+ def parent; end
874
+
875
+ # Sets the attribute parent
876
+ #
877
+ # @param value the value to set the attribute parent to.
878
+ #
879
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
880
+ def parent=(_arg0); end
881
+
882
+ # Returns the value of attribute prev.
883
+ #
884
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
885
+ def prev; end
886
+
887
+ # Sets the attribute prev
888
+ #
889
+ # @param value the value to set the attribute prev to.
890
+ #
891
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
892
+ def prev=(_arg0); end
893
+
894
+ # Returns the value of attribute title.
895
+ #
896
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
897
+ def title; end
898
+
899
+ # Sets the attribute title
900
+ #
901
+ # @param value the value to set the attribute title to.
902
+ #
903
+ # source://pdf-core//lib/pdf/core/outline_item.rb#4
904
+ def title=(_arg0); end
905
+
906
+ # source://pdf-core//lib/pdf/core/outline_item.rb#13
907
+ def to_hash; end
908
+ end
909
+
910
+ # source://pdf-core//lib/pdf/core/outline_root.rb#3
911
+ class PDF::Core::OutlineRoot
912
+ # @return [OutlineRoot] a new instance of OutlineRoot
913
+ #
914
+ # source://pdf-core//lib/pdf/core/outline_root.rb#6
915
+ def initialize; end
916
+
917
+ # Returns the value of attribute count.
918
+ #
919
+ # source://pdf-core//lib/pdf/core/outline_root.rb#4
920
+ def count; end
921
+
922
+ # Sets the attribute count
923
+ #
924
+ # @param value the value to set the attribute count to.
925
+ #
926
+ # source://pdf-core//lib/pdf/core/outline_root.rb#4
927
+ def count=(_arg0); end
928
+
929
+ # Returns the value of attribute first.
930
+ #
931
+ # source://pdf-core//lib/pdf/core/outline_root.rb#4
932
+ def first; end
933
+
934
+ # Sets the attribute first
935
+ #
936
+ # @param value the value to set the attribute first to.
937
+ #
938
+ # source://pdf-core//lib/pdf/core/outline_root.rb#4
939
+ def first=(_arg0); end
940
+
941
+ # Returns the value of attribute last.
942
+ #
943
+ # source://pdf-core//lib/pdf/core/outline_root.rb#4
944
+ def last; end
945
+
946
+ # Sets the attribute last
947
+ #
948
+ # @param value the value to set the attribute last to.
949
+ #
950
+ # source://pdf-core//lib/pdf/core/outline_root.rb#4
951
+ def last=(_arg0); end
952
+
953
+ # source://pdf-core//lib/pdf/core/outline_root.rb#10
954
+ def to_hash; end
955
+ end
956
+
957
+ # source://pdf-core//lib/pdf/core/page.rb#14
958
+ class PDF::Core::Page
959
+ # @return [Page] a new instance of Page
960
+ #
961
+ # source://pdf-core//lib/pdf/core/page.rb#18
962
+ def initialize(document, options = T.unsafe(nil)); end
963
+
964
+ # source://pdf-core//lib/pdf/core/page.rb#74
965
+ def content; end
966
+
967
+ # Sets the attribute content
968
+ #
969
+ # @param value the value to set the attribute content to.
970
+ #
971
+ # source://pdf-core//lib/pdf/core/page.rb#16
972
+ def content=(_arg0); end
973
+
974
+ # source://pdf-core//lib/pdf/core/page.rb#78
975
+ def dictionary; end
976
+
977
+ # Sets the attribute dictionary
978
+ #
979
+ # @param value the value to set the attribute dictionary to.
980
+ #
981
+ # source://pdf-core//lib/pdf/core/page.rb#16
982
+ def dictionary=(_arg0); end
983
+
984
+ # source://pdf-core//lib/pdf/core/page.rb#128
985
+ def dimensions; end
986
+
987
+ # Returns the value of attribute document.
988
+ #
989
+ # source://pdf-core//lib/pdf/core/page.rb#15
990
+ def document; end
991
+
992
+ # Sets the attribute document
993
+ #
994
+ # @param value the value to set the attribute document to.
995
+ #
996
+ # source://pdf-core//lib/pdf/core/page.rb#15
997
+ def document=(_arg0); end
998
+
999
+ # source://pdf-core//lib/pdf/core/page.rb#106
1000
+ def ext_gstates; end
1001
+
1002
+ # source://pdf-core//lib/pdf/core/page.rb#114
1003
+ def finalize; end
1004
+
1005
+ # source://pdf-core//lib/pdf/core/page.rb#90
1006
+ def fonts; end
1007
+
1008
+ # source://pdf-core//lib/pdf/core/page.rb#32
1009
+ def graphic_state; end
1010
+
1011
+ # @return [Boolean]
1012
+ #
1013
+ # source://pdf-core//lib/pdf/core/page.rb#124
1014
+ def imported_page?; end
1015
+
1016
+ # @return [Boolean]
1017
+ #
1018
+ # source://pdf-core//lib/pdf/core/page.rb#51
1019
+ def in_stamp_stream?; end
1020
+
1021
+ # source://pdf-core//lib/pdf/core/page.rb#36
1022
+ def layout; end
1023
+
1024
+ # Returns the value of attribute margins.
1025
+ #
1026
+ # source://pdf-core//lib/pdf/core/page.rb#15
1027
+ def margins; end
1028
+
1029
+ # Sets the attribute margins
1030
+ #
1031
+ # @param value the value to set the attribute margins to.
1032
+ #
1033
+ # source://pdf-core//lib/pdf/core/page.rb#15
1034
+ def margins=(_arg0); end
1035
+
1036
+ # source://pdf-core//lib/pdf/core/page.rb#82
1037
+ def resources; end
1038
+
1039
+ # source://pdf-core//lib/pdf/core/page.rb#47
1040
+ def size; end
1041
+
1042
+ # Returns the value of attribute stack.
1043
+ #
1044
+ # source://pdf-core//lib/pdf/core/page.rb#15
1045
+ def stack; end
1046
+
1047
+ # Sets the attribute stack
1048
+ #
1049
+ # @param value the value to set the attribute stack to.
1050
+ #
1051
+ # source://pdf-core//lib/pdf/core/page.rb#15
1052
+ def stack=(_arg0); end
1053
+
1054
+ # source://pdf-core//lib/pdf/core/page.rb#55
1055
+ def stamp_stream(dictionary); end
1056
+
1057
+ # source://pdf-core//lib/pdf/core/page.rb#98
1058
+ def xobjects; end
1059
+
1060
+ private
1061
+
1062
+ # some entries in the Page dict can be inherited from parent Pages dicts.
1063
+ #
1064
+ # Starting with the current page dict, this method will walk up the
1065
+ # inheritance chain return the first value that is found for key
1066
+ #
1067
+ # inherited_dictionary_value(:MediaBox)
1068
+ # => [ 0, 0, 595, 842 ]
1069
+ #
1070
+ # source://pdf-core//lib/pdf/core/page.rb#183
1071
+ def inherited_dictionary_value(key, local_dict = T.unsafe(nil)); end
1072
+
1073
+ # source://pdf-core//lib/pdf/core/page.rb#145
1074
+ def init_from_object(options); end
1075
+
1076
+ # source://pdf-core//lib/pdf/core/page.rb#157
1077
+ def init_new_page(options); end
1078
+ end
1079
+
1080
+ # Dimensions pulled from PDF::Writer, rubyforge.org/projects/ruby-pdf
1081
+ #
1082
+ # All of these dimensions are in PDF Points (1/72 inch)
1083
+ #
1084
+ # ===Inbuilt Sizes:
1085
+ #
1086
+ #
1087
+ # 4A0:: => 4767.87 x 6740.79
1088
+ # 2A0:: => 3370.39 x 4767.87
1089
+ # A0:: => 2383.94 x 3370.39
1090
+ # A1:: => 1683.78 x 2383.94
1091
+ # A2:: => 1190.55 x 1683.78
1092
+ # A3:: => 841.89 x 1190.55
1093
+ # A4:: => 595.28 x 841.89
1094
+ # A5:: => 419.53 x 595.28
1095
+ # A6:: => 297.64 x 419.53
1096
+ # A7:: => 209.76 x 297.64
1097
+ # A8:: => 147.40 x 209.76
1098
+ # A9:: => 104.88 x 147.40
1099
+ # A10:: => 73.70 x 104.88
1100
+ # B0:: => 2834.65 x 4008.19
1101
+ # B1:: => 2004.09 x 2834.65
1102
+ # B2:: => 1417.32 x 2004.09
1103
+ # B3:: => 1000.63 x 1417.32
1104
+ # B4:: => 708.66 x 1000.63
1105
+ # B5:: => 498.90 x 708.66
1106
+ # B6:: => 354.33 x 498.90
1107
+ # B7:: => 249.45 x 354.33
1108
+ # B8:: => 175.75 x 249.45
1109
+ # B9:: => 124.72 x 175.75
1110
+ # B10:: => 87.87 x 124.72
1111
+ # C0:: => 2599.37 x 3676.54
1112
+ # C1:: => 1836.85 x 2599.37
1113
+ # C2:: => 1298.27 x 1836.85
1114
+ # C3:: => 918.43 x 1298.27
1115
+ # C4:: => 649.13 x 918.43
1116
+ # C5:: => 459.21 x 649.13
1117
+ # C6:: => 323.15 x 459.21
1118
+ # C7:: => 229.61 x 323.15
1119
+ # C8:: => 161.57 x 229.61
1120
+ # C9:: => 113.39 x 161.57
1121
+ # C10:: => 79.37 x 113.39
1122
+ # RA0:: => 2437.80 x 3458.27
1123
+ # RA1:: => 1729.13 x 2437.80
1124
+ # RA2:: => 1218.90 x 1729.13
1125
+ # RA3:: => 864.57 x 1218.90
1126
+ # RA4:: => 609.45 x 864.57
1127
+ # SRA0:: => 2551.18 x 3628.35
1128
+ # SRA1:: => 1814.17 x 2551.18
1129
+ # SRA2:: => 1275.59 x 1814.17
1130
+ # SRA3:: => 907.09 x 1275.59
1131
+ # SRA4:: => 637.80 x 907.09
1132
+ # EXECUTIVE:: => 521.86 x 756.00
1133
+ # FOLIO:: => 612.00 x 936.00
1134
+ # LEGAL:: => 612.00 x 1008.00
1135
+ # LETTER:: => 612.00 x 792.00
1136
+ # TABLOID:: => 792.00 x 1224.00
1137
+ #
1138
+ # source://pdf-core//lib/pdf/core/page_geometry.rb#70
1139
+ module PDF::Core::PageGeometry; end
1140
+
1141
+ # source://pdf-core//lib/pdf/core/page_geometry.rb#72
1142
+ PDF::Core::PageGeometry::SIZES = T.let(T.unsafe(nil), Hash)
1143
+
1144
+ # source://pdf-core//lib/pdf/core/reference.rb#12
1145
+ class PDF::Core::Reference
1146
+ # @return [Reference] a new instance of Reference
1147
+ #
1148
+ # source://pdf-core//lib/pdf/core/reference.rb#16
1149
+ def initialize(id, data); end
1150
+
1151
+ # source://pdf-core//lib/pdf/core/reference.rb#34
1152
+ def <<(io); end
1153
+
1154
+ # Returns the value of attribute data.
1155
+ #
1156
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1157
+ def data; end
1158
+
1159
+ # Sets the attribute data
1160
+ #
1161
+ # @param value the value to set the attribute data to.
1162
+ #
1163
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1164
+ def data=(_arg0); end
1165
+
1166
+ # Creates a deep copy of this ref. If +share+ is provided, shares the
1167
+ # given dictionary entries between the old ref and the new.
1168
+ #
1169
+ # source://pdf-core//lib/pdf/core/reference.rb#46
1170
+ def deep_copy(share = T.unsafe(nil)); end
1171
+
1172
+ # source://prawn/1.3.0/lib/prawn/security.rb#272
1173
+ def encrypted_object(key); end
1174
+
1175
+ # Returns the value of attribute gen.
1176
+ #
1177
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1178
+ def gen; end
1179
+
1180
+ # Sets the attribute gen
1181
+ #
1182
+ # @param value the value to set the attribute gen to.
1183
+ #
1184
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1185
+ def gen=(_arg0); end
1186
+
1187
+ # Returns the value of attribute identifier.
1188
+ #
1189
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1190
+ def identifier; end
1191
+
1192
+ # Sets the attribute identifier
1193
+ #
1194
+ # @param value the value to set the attribute identifier to.
1195
+ #
1196
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1197
+ def identifier=(_arg0); end
1198
+
1199
+ # source://pdf-core//lib/pdf/core/reference.rb#23
1200
+ def object; end
1201
+
1202
+ # Returns the value of attribute offset.
1203
+ #
1204
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1205
+ def offset; end
1206
+
1207
+ # Sets the attribute offset
1208
+ #
1209
+ # @param value the value to set the attribute offset to.
1210
+ #
1211
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1212
+ def offset=(_arg0); end
1213
+
1214
+ # Replaces the data and stream with that of other_ref.
1215
+ #
1216
+ # source://pdf-core//lib/pdf/core/reference.rb#66
1217
+ def replace(other_ref); end
1218
+
1219
+ # Returns the value of attribute stream.
1220
+ #
1221
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1222
+ def stream; end
1223
+
1224
+ # Sets the attribute stream
1225
+ #
1226
+ # @param value the value to set the attribute stream to.
1227
+ #
1228
+ # source://pdf-core//lib/pdf/core/reference.rb#14
1229
+ def stream=(_arg0); end
1230
+
1231
+ # source://pdf-core//lib/pdf/core/reference.rb#39
1232
+ def to_s; end
1233
+ end
1234
+
1235
+ # source://pdf-core//lib/pdf/core/renderer.rb#5
1236
+ class PDF::Core::Renderer
1237
+ # @return [Renderer] a new instance of Renderer
1238
+ #
1239
+ # source://pdf-core//lib/pdf/core/renderer.rb#6
1240
+ def initialize(state); end
1241
+
1242
+ # Appends a raw string to the current page content.
1243
+ #
1244
+ # # Raw line drawing example:
1245
+ # x1,y1,x2,y2 = 100,500,300,550
1246
+ # pdf.add_content("%.3f %.3f m" % [ x1, y1 ]) # move
1247
+ # pdf.add_content("%.3f %.3f l" % [ x2, y2 ]) # draw path
1248
+ # pdf.add_content("S") # stroke
1249
+ #
1250
+ # source://pdf-core//lib/pdf/core/renderer.rb#54
1251
+ def add_content(str); end
1252
+
1253
+ # Defines a block to be called just before the document is rendered.
1254
+ #
1255
+ # source://pdf-core//lib/pdf/core/renderer.rb#75
1256
+ def before_render(&block); end
1257
+
1258
+ # source://pdf-core//lib/pdf/core/renderer.rb#227
1259
+ def close_graphics_state; end
1260
+
1261
+ # Returns true if content streams will be compressed before rendering,
1262
+ # false otherwise
1263
+ #
1264
+ # @return [Boolean]
1265
+ #
1266
+ # source://pdf-core//lib/pdf/core/renderer.rb#243
1267
+ def compression_enabled?; end
1268
+
1269
+ # At any stage in the object tree an object can be replaced with an
1270
+ # indirect reference. To get access to the object safely, regardless
1271
+ # of if it's hidden behind a Prawn::Reference, wrap it in deref().
1272
+ #
1273
+ # source://pdf-core//lib/pdf/core/renderer.rb#42
1274
+ def deref(obj); end
1275
+
1276
+ # source://pdf-core//lib/pdf/core/renderer.rb#129
1277
+ def finalize_all_page_contents; end
1278
+
1279
+ # Re-opens the page with the given (1-based) page number so that you can
1280
+ # draw on it.
1281
+ #
1282
+ # See Prawn::Document#number_pages for a sample usage of this capability.
1283
+ #
1284
+ # source://pdf-core//lib/pdf/core/renderer.rb#124
1285
+ def go_to_page(k); end
1286
+
1287
+ # source://pdf-core//lib/pdf/core/renderer.rb#258
1288
+ def graphic_stack; end
1289
+
1290
+ # source://pdf-core//lib/pdf/core/renderer.rb#262
1291
+ def graphic_state; end
1292
+
1293
+ # raise the PDF version of the file we're going to generate.
1294
+ # A private method, designed for internal use when the user adds a feature
1295
+ # to their document that requires a particular version.
1296
+ #
1297
+ # source://pdf-core//lib/pdf/core/renderer.rb#143
1298
+ def min_version(min); end
1299
+
1300
+ # The Name dictionary (PDF spec 3.6.3) for this document. It is
1301
+ # lazily initialized, so that documents that do not need a name
1302
+ # dictionary do not incur the additional overhead.
1303
+ #
1304
+ # source://pdf-core//lib/pdf/core/renderer.rb#63
1305
+ def names; end
1306
+
1307
+ # Returns true if the Names dictionary is in use for this document.
1308
+ #
1309
+ # @return [Boolean]
1310
+ #
1311
+ # source://pdf-core//lib/pdf/core/renderer.rb#69
1312
+ def names?; end
1313
+
1314
+ # Defines a block to be called just before a new page is started.
1315
+ #
1316
+ # source://pdf-core//lib/pdf/core/renderer.rb#81
1317
+ def on_page_create(&block); end
1318
+
1319
+ # source://pdf-core//lib/pdf/core/renderer.rb#223
1320
+ def open_graphics_state; end
1321
+
1322
+ # source://pdf-core//lib/pdf/core/renderer.rb#115
1323
+ def page_count; end
1324
+
1325
+ # Creates a new Reference and adds it to the Document's object
1326
+ # list. The +data+ argument is anything that Prawn::PdfObject() can convert.
1327
+ #
1328
+ # Returns the identifier which points to the reference in the ObjectStore
1329
+ #
1330
+ # source://pdf-core//lib/pdf/core/renderer.rb#22
1331
+ def ref(data); end
1332
+
1333
+ # Like ref, but returns the actual reference instead of its identifier.
1334
+ #
1335
+ # While you can use this to build up nested references within the object
1336
+ # tree, it is recommended to persist only identifiers, and then provide
1337
+ # helper methods to look up the actual references in the ObjectStore
1338
+ # if needed. If you take this approach, Document::Snapshot
1339
+ # will probably work with your extension
1340
+ #
1341
+ # source://pdf-core//lib/pdf/core/renderer.rb#34
1342
+ def ref!(data); end
1343
+
1344
+ # Renders the PDF document to string.
1345
+ # Pass an open file descriptor to render to file.
1346
+ #
1347
+ # source://pdf-core//lib/pdf/core/renderer.rb#150
1348
+ def render(output = T.unsafe(nil)); end
1349
+
1350
+ # Write out the PDF Body, as per spec 3.4.2
1351
+ #
1352
+ # source://pdf-core//lib/pdf/core/renderer.rb#191
1353
+ def render_body(output); end
1354
+
1355
+ # Renders the PDF document to file.
1356
+ #
1357
+ # pdf.render_file "foo.pdf"
1358
+ #
1359
+ # source://pdf-core//lib/pdf/core/renderer.rb#173
1360
+ def render_file(filename); end
1361
+
1362
+ # Write out the PDF Header, as per spec 3.4.1
1363
+ #
1364
+ # source://pdf-core//lib/pdf/core/renderer.rb#179
1365
+ def render_header(output); end
1366
+
1367
+ # Write out the PDF Trailer, as per spec 3.4.4
1368
+ #
1369
+ # source://pdf-core//lib/pdf/core/renderer.rb#210
1370
+ def render_trailer(output); end
1371
+
1372
+ # Write out the PDF Cross Reference Table, as per spec 3.4.3
1373
+ #
1374
+ # source://pdf-core//lib/pdf/core/renderer.rb#197
1375
+ def render_xref(output); end
1376
+
1377
+ # Pops the last saved graphics state off the graphics state stack and
1378
+ # restores the state to those values
1379
+ #
1380
+ # source://pdf-core//lib/pdf/core/renderer.rb#249
1381
+ def restore_graphics_state; end
1382
+
1383
+ # source://pdf-core//lib/pdf/core/renderer.rb#231
1384
+ def save_graphics_state(graphic_state = T.unsafe(nil)); end
1385
+
1386
+ # source://pdf-core//lib/pdf/core/renderer.rb#89
1387
+ def start_new_page(options = T.unsafe(nil)); end
1388
+
1389
+ # Returns the value of attribute state.
1390
+ #
1391
+ # source://pdf-core//lib/pdf/core/renderer.rb#15
1392
+ def state; end
1393
+ end
1394
+
1395
+ # source://pdf-core//lib/pdf/core/stream.rb#11
1396
+ class PDF::Core::Stream
1397
+ # @return [Stream] a new instance of Stream
1398
+ #
1399
+ # source://pdf-core//lib/pdf/core/stream.rb#14
1400
+ def initialize(io = T.unsafe(nil)); end
1401
+
1402
+ # source://pdf-core//lib/pdf/core/stream.rb#20
1403
+ def <<(io); end
1404
+
1405
+ # source://pdf-core//lib/pdf/core/stream.rb#26
1406
+ def compress!; end
1407
+
1408
+ # @return [Boolean]
1409
+ #
1410
+ # source://pdf-core//lib/pdf/core/stream.rb#33
1411
+ def compressed?; end
1412
+
1413
+ # source://pdf-core//lib/pdf/core/stream.rb#72
1414
+ def data; end
1415
+
1416
+ # @return [Boolean]
1417
+ #
1418
+ # source://pdf-core//lib/pdf/core/stream.rb#37
1419
+ def empty?; end
1420
+
1421
+ # source://prawn/1.3.0/lib/prawn/security.rb#258
1422
+ def encrypted_object(key, id, gen); end
1423
+
1424
+ # source://pdf-core//lib/pdf/core/stream.rb#41
1425
+ def filtered_stream; end
1426
+
1427
+ # Returns the value of attribute filters.
1428
+ #
1429
+ # source://pdf-core//lib/pdf/core/stream.rb#12
1430
+ def filters; end
1431
+
1432
+ # source://pdf-core//lib/pdf/core/stream.rb#93
1433
+ def inspect; end
1434
+
1435
+ # source://pdf-core//lib/pdf/core/stream.rb#60
1436
+ def length; end
1437
+
1438
+ # source://pdf-core//lib/pdf/core/stream.rb#64
1439
+ def object; end
1440
+ end
1441
+
1442
+ # source://pdf-core//lib/pdf/core/text.rb#11
1443
+ module PDF::Core::Text
1444
+ # source://pdf-core//lib/pdf/core/text.rb#232
1445
+ def add_text_content(text, x, y, options); end
1446
+
1447
+ # Increases or decreases the space between characters.
1448
+ # For horizontal text, a positive value will increase the space.
1449
+ # For veritical text, a positive value will decrease the space.
1450
+ #
1451
+ # source://pdf-core//lib/pdf/core/text.rb#200
1452
+ def character_spacing(amount = T.unsafe(nil)); end
1453
+
1454
+ # Call with a boolean to set the document-wide kerning setting. This can be
1455
+ # overridden using the :kerning text option when drawing text or a text
1456
+ # box.
1457
+ #
1458
+ # pdf.default_kerning = false
1459
+ # pdf.text("hello world") # text is not kerned
1460
+ # pdf.text("hello world", :kerning => true) # text is kerned
1461
+ #
1462
+ # source://pdf-core//lib/pdf/core/text.rb#55
1463
+ def default_kerning(boolean); end
1464
+
1465
+ # Call with a boolean to set the document-wide kerning setting. This can be
1466
+ # overridden using the :kerning text option when drawing text or a text
1467
+ # box.
1468
+ #
1469
+ # pdf.default_kerning = false
1470
+ # pdf.text("hello world") # text is not kerned
1471
+ # pdf.text("hello world", :kerning => true) # text is kerned
1472
+ #
1473
+ # source://pdf-core//lib/pdf/core/text.rb#55
1474
+ def default_kerning=(boolean); end
1475
+
1476
+ # Retrieve the current default kerning setting.
1477
+ #
1478
+ # Defaults to true
1479
+ #
1480
+ # @return [Boolean]
1481
+ #
1482
+ # source://pdf-core//lib/pdf/core/text.rb#42
1483
+ def default_kerning?; end
1484
+
1485
+ # Call with no argument to retrieve the current default leading.
1486
+ #
1487
+ # Call with a number to set the document-wide text leading. This can be
1488
+ # overridden using the :leading text option when drawing text or a text
1489
+ # box.
1490
+ #
1491
+ # pdf.default_leading = 7
1492
+ # pdf.text("hello world") # a leading of 7 is used
1493
+ # pdf.text("hello world", :leading => 0) # a leading of 0 is used
1494
+ #
1495
+ # Defaults to 0
1496
+ #
1497
+ # source://pdf-core//lib/pdf/core/text.rb#73
1498
+ def default_leading(number = T.unsafe(nil)); end
1499
+
1500
+ # Call with no argument to retrieve the current default leading.
1501
+ #
1502
+ # Call with a number to set the document-wide text leading. This can be
1503
+ # overridden using the :leading text option when drawing text or a text
1504
+ # box.
1505
+ #
1506
+ # pdf.default_leading = 7
1507
+ # pdf.text("hello world") # a leading of 7 is used
1508
+ # pdf.text("hello world", :leading => 0) # a leading of 0 is used
1509
+ #
1510
+ # Defaults to 0
1511
+ #
1512
+ # source://pdf-core//lib/pdf/core/text.rb#73
1513
+ def default_leading=(number = T.unsafe(nil)); end
1514
+
1515
+ # Call with no argument to retrieve the current fallback fonts.
1516
+ #
1517
+ # Call with an array of font names. Each name must be the name of an AFM
1518
+ # font or the name that was used to register a family of TTF fonts (see
1519
+ # Prawn::Document#font_families). If present, then each glyph will be
1520
+ # rendered using the first font that includes the glyph, starting with the
1521
+ # current font and then moving through :fallback_fonts from left to right.
1522
+ #
1523
+ # Call with an empty array to turn off fallback fonts
1524
+ #
1525
+ # file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
1526
+ # font_families["Kai"] = {
1527
+ # :normal => { :file => file, :font => "Kai" }
1528
+ # }
1529
+ # file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
1530
+ # font_families["Action Man"] = {
1531
+ # :normal => { :file => file, :font => "ActionMan" },
1532
+ # }
1533
+ # fallback_fonts ["Times-Roman", "Kai"]
1534
+ # font "Action Man"
1535
+ # text "hello ƒ 你好"
1536
+ # > hello prints in Action Man
1537
+ # > ƒ prints in Times-Roman
1538
+ # > 你好 prints in Kai
1539
+ #
1540
+ # fallback_fonts [] # clears document-wide fallback fonts
1541
+ #
1542
+ # Side effects:
1543
+ #
1544
+ # * Increased overhead when fallback fonts are declared as each glyph is
1545
+ # checked to see whether it exists in the current font
1546
+ #
1547
+ # source://pdf-core//lib/pdf/core/text.rb#145
1548
+ def fallback_fonts(fallback_fonts = T.unsafe(nil)); end
1549
+
1550
+ # Call with no argument to retrieve the current fallback fonts.
1551
+ #
1552
+ # Call with an array of font names. Each name must be the name of an AFM
1553
+ # font or the name that was used to register a family of TTF fonts (see
1554
+ # Prawn::Document#font_families). If present, then each glyph will be
1555
+ # rendered using the first font that includes the glyph, starting with the
1556
+ # current font and then moving through :fallback_fonts from left to right.
1557
+ #
1558
+ # Call with an empty array to turn off fallback fonts
1559
+ #
1560
+ # file = "#{Prawn::DATADIR}/fonts/gkai00mp.ttf"
1561
+ # font_families["Kai"] = {
1562
+ # :normal => { :file => file, :font => "Kai" }
1563
+ # }
1564
+ # file = "#{Prawn::DATADIR}/fonts/Action Man.dfont"
1565
+ # font_families["Action Man"] = {
1566
+ # :normal => { :file => file, :font => "ActionMan" },
1567
+ # }
1568
+ # fallback_fonts ["Times-Roman", "Kai"]
1569
+ # font "Action Man"
1570
+ # text "hello ƒ 你好"
1571
+ # > hello prints in Action Man
1572
+ # > ƒ prints in Times-Roman
1573
+ # > 你好 prints in Kai
1574
+ #
1575
+ # fallback_fonts [] # clears document-wide fallback fonts
1576
+ #
1577
+ # Side effects:
1578
+ #
1579
+ # * Increased overhead when fallback fonts are declared as each glyph is
1580
+ # checked to see whether it exists in the current font
1581
+ #
1582
+ # source://pdf-core//lib/pdf/core/text.rb#145
1583
+ def fallback_fonts=(fallback_fonts = T.unsafe(nil)); end
1584
+
1585
+ # source://pdf-core//lib/pdf/core/text.rb#192
1586
+ def forget_text_rendering_mode!; end
1587
+
1588
+ # Low level call to set the current font style and extract text options from
1589
+ # an options hash. Should be called from within a save_font block
1590
+ #
1591
+ # source://pdf-core//lib/pdf/core/text.rb#24
1592
+ def process_text_options(options); end
1593
+
1594
+ # Returns the value of attribute skip_encoding.
1595
+ #
1596
+ # source://pdf-core//lib/pdf/core/text.rb#19
1597
+ def skip_encoding; end
1598
+
1599
+ # Call with no argument to retrieve the current text direction.
1600
+ #
1601
+ # Call with a symbol to set the document-wide text direction. This can be
1602
+ # overridden using the :direction text option when drawing text or a text
1603
+ # box.
1604
+ #
1605
+ # pdf.text_direction = :rtl
1606
+ # pdf.text("hello world") # prints "dlrow olleh"
1607
+ # pdf.text("hello world", :direction => :ltr) # prints "hello world"
1608
+ #
1609
+ # Valid directions are:
1610
+ #
1611
+ # * :ltr - left-to-right (default)
1612
+ # * :rtl - right-to-left
1613
+ #
1614
+ # Side effects:
1615
+ #
1616
+ # * When printing left-to-right, the default text alignment is :left
1617
+ # * When printing right-to-left, the default text alignment is :right
1618
+ #
1619
+ # source://pdf-core//lib/pdf/core/text.rb#103
1620
+ def text_direction(direction = T.unsafe(nil)); end
1621
+
1622
+ # Call with no argument to retrieve the current text direction.
1623
+ #
1624
+ # Call with a symbol to set the document-wide text direction. This can be
1625
+ # overridden using the :direction text option when drawing text or a text
1626
+ # box.
1627
+ #
1628
+ # pdf.text_direction = :rtl
1629
+ # pdf.text("hello world") # prints "dlrow olleh"
1630
+ # pdf.text("hello world", :direction => :ltr) # prints "hello world"
1631
+ #
1632
+ # Valid directions are:
1633
+ #
1634
+ # * :ltr - left-to-right (default)
1635
+ # * :rtl - right-to-left
1636
+ #
1637
+ # Side effects:
1638
+ #
1639
+ # * When printing left-to-right, the default text alignment is :left
1640
+ # * When printing right-to-left, the default text alignment is :right
1641
+ #
1642
+ # source://pdf-core//lib/pdf/core/text.rb#103
1643
+ def text_direction=(direction = T.unsafe(nil)); end
1644
+
1645
+ # Call with no argument to retrieve the current text rendering mode.
1646
+ #
1647
+ # Call with a symbol and block to temporarily change the current
1648
+ # text rendering mode.
1649
+ #
1650
+ # pdf.text_rendering_mode(:stroke) do
1651
+ # pdf.text("Outlined Text")
1652
+ # end
1653
+ #
1654
+ # Valid modes are:
1655
+ #
1656
+ # * :fill - fill text (default)
1657
+ # * :stroke - stroke text
1658
+ # * :fill_stroke - fill, then stroke text
1659
+ # * :invisible - invisible text
1660
+ # * :fill_clip - fill text then add to path for clipping
1661
+ # * :stroke_clip - stroke text then add to path for clipping
1662
+ # * :fill_stroke_clip - fill then stroke text, then add to path for clipping
1663
+ # * :clip - add text to path for clipping
1664
+ #
1665
+ # source://pdf-core//lib/pdf/core/text.rb#174
1666
+ def text_rendering_mode(mode = T.unsafe(nil)); end
1667
+
1668
+ # Increases or decreases the space between words.
1669
+ # For horizontal text, a positive value will increase the space.
1670
+ # For veritical text, a positive value will decrease the space.
1671
+ #
1672
+ # source://pdf-core//lib/pdf/core/text.rb#218
1673
+ def word_spacing(amount = T.unsafe(nil)); end
1674
+ end
1675
+
1676
+ # source://pdf-core//lib/pdf/core/text.rb#15
1677
+ PDF::Core::Text::MODES = T.let(T.unsafe(nil), Hash)
1678
+
1679
+ # These should be used as a base. Extensions may build on this list
1680
+ #
1681
+ # source://pdf-core//lib/pdf/core/text.rb#14
1682
+ PDF::Core::Text::VALID_OPTIONS = T.let(T.unsafe(nil), Array)