ypdf-writer 1.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/ChangeLog +134 -0
  3. data/LICENCE +131 -0
  4. data/bin/techbook +24 -0
  5. data/demo/chunkybacon.rb +40 -0
  6. data/demo/code.rb +71 -0
  7. data/demo/colornames.rb +47 -0
  8. data/demo/demo.rb +73 -0
  9. data/demo/gettysburg.rb +66 -0
  10. data/demo/hello.rb +26 -0
  11. data/demo/individual-i.rb +89 -0
  12. data/demo/pac.rb +70 -0
  13. data/demo/qr-language.rb +580 -0
  14. data/demo/qr-library.rb +380 -0
  15. data/images/bluesmoke.jpg +0 -0
  16. data/images/chunkybacon.jpg +0 -0
  17. data/images/chunkybacon.png +0 -0
  18. data/lib/pdf/charts.rb +13 -0
  19. data/lib/pdf/charts/stddev.rb +431 -0
  20. data/lib/pdf/core_ext/mutex.rb +12 -0
  21. data/lib/pdf/math.rb +108 -0
  22. data/lib/pdf/quickref.rb +333 -0
  23. data/lib/pdf/simpletable.rb +952 -0
  24. data/lib/pdf/techbook.rb +907 -0
  25. data/lib/pdf/writer.rb +2760 -0
  26. data/lib/pdf/writer/arc4.rb +63 -0
  27. data/lib/pdf/writer/fontmetrics.rb +203 -0
  28. data/lib/pdf/writer/fonts/Courier-Bold.afm +342 -0
  29. data/lib/pdf/writer/fonts/Courier-BoldOblique.afm +342 -0
  30. data/lib/pdf/writer/fonts/Courier-Oblique.afm +342 -0
  31. data/lib/pdf/writer/fonts/Courier.afm +342 -0
  32. data/lib/pdf/writer/fonts/Helvetica-Bold.afm +2827 -0
  33. data/lib/pdf/writer/fonts/Helvetica-BoldOblique.afm +2827 -0
  34. data/lib/pdf/writer/fonts/Helvetica-Oblique.afm +3051 -0
  35. data/lib/pdf/writer/fonts/Helvetica.afm +3051 -0
  36. data/lib/pdf/writer/fonts/MustRead.html +19 -0
  37. data/lib/pdf/writer/fonts/Symbol.afm +213 -0
  38. data/lib/pdf/writer/fonts/Times-Bold.afm +2588 -0
  39. data/lib/pdf/writer/fonts/Times-BoldItalic.afm +2384 -0
  40. data/lib/pdf/writer/fonts/Times-Italic.afm +2667 -0
  41. data/lib/pdf/writer/fonts/Times-Roman.afm +2419 -0
  42. data/lib/pdf/writer/fonts/ZapfDingbats.afm +225 -0
  43. data/lib/pdf/writer/graphics.rb +813 -0
  44. data/lib/pdf/writer/graphics/imageinfo.rb +366 -0
  45. data/lib/pdf/writer/lang.rb +43 -0
  46. data/lib/pdf/writer/lang/en.rb +99 -0
  47. data/lib/pdf/writer/object.rb +23 -0
  48. data/lib/pdf/writer/object/action.rb +35 -0
  49. data/lib/pdf/writer/object/annotation.rb +42 -0
  50. data/lib/pdf/writer/object/catalog.rb +39 -0
  51. data/lib/pdf/writer/object/contents.rb +70 -0
  52. data/lib/pdf/writer/object/destination.rb +40 -0
  53. data/lib/pdf/writer/object/encryption.rb +53 -0
  54. data/lib/pdf/writer/object/font.rb +72 -0
  55. data/lib/pdf/writer/object/fontdescriptor.rb +34 -0
  56. data/lib/pdf/writer/object/fontencoding.rb +40 -0
  57. data/lib/pdf/writer/object/image.rb +305 -0
  58. data/lib/pdf/writer/object/info.rb +51 -0
  59. data/lib/pdf/writer/object/outline.rb +30 -0
  60. data/lib/pdf/writer/object/outlines.rb +30 -0
  61. data/lib/pdf/writer/object/page.rb +195 -0
  62. data/lib/pdf/writer/object/pages.rb +115 -0
  63. data/lib/pdf/writer/object/procset.rb +46 -0
  64. data/lib/pdf/writer/object/viewerpreferences.rb +74 -0
  65. data/lib/pdf/writer/ohash.rb +58 -0
  66. data/lib/pdf/writer/oreader.rb +25 -0
  67. data/lib/pdf/writer/state.rb +48 -0
  68. data/lib/pdf/writer/strokestyle.rb +138 -0
  69. data/manual.pwd +5965 -0
  70. data/readme.md +36 -0
  71. metadata +151 -0
@@ -0,0 +1,366 @@
1
+ #encoding: ASCII-8BIT
2
+ #--
3
+ # PDF::Writer for Ruby.
4
+ # http://rubyforge.org/projects/ruby-pdf/
5
+ # Copyright 2003 - 2005 Austin Ziegler.
6
+ #
7
+ # Licensed under a MIT-style licence. See LICENCE in the main distribution
8
+ # for full licensing information.
9
+ #
10
+ # This file is also licensed under standard Ruby licensing provisions: the
11
+ # Ruby licence and the GNU General Public Licence, version 2 or later.
12
+ #
13
+ # $Id: imageinfo.rb 173 2007-11-15 17:58:43Z sandal $
14
+ #++
15
+ require 'pdf/writer/oreader'
16
+
17
+ # This is based on ImageSize, by Keisuke Minami <keisuke@rccn.com>. It can
18
+ # be found at http://www.rubycgi.org/tools/index.en.htm
19
+ #
20
+ # This has been integrated into PDF::Writer because as yet there has been
21
+ # no response to emails asking for my extensions to be integrated and a
22
+ # RubyGem package to be made available.
23
+ class PDF::Writer::Graphics::ImageInfo
24
+ # Image Format Constants
25
+ module Formats
26
+ OTHER = "OTHER"
27
+ GIF = "GIF" # CompuServe GIF87a and GIF89a images.
28
+ PNG = "PNG" # Portable Network Graphics, PNG
29
+ JPEG = "JPEG" # JPEG
30
+ BMP = "BMP" # Windows or OS/2 Bitmaps
31
+ PPM = "PPM" # PPM is like PBM, PGM, & XV
32
+ PBM = "PBM"
33
+ PGM = "PGM"
34
+ # XV = "XV" # Not supported
35
+ TIFF = "TIFF" # TIFF formats
36
+ XBM = "XBM" # X Bitmap
37
+ XPM = "XPM" # X Pixmap
38
+ PSD = "PSD" # PhotoShop
39
+ PCX = "PCX" # PCX Bitmap
40
+ SWF = "SWF" # Flash
41
+ end
42
+ Type = Formats
43
+
44
+ class << self
45
+ def formats
46
+ Formats.constants
47
+ end
48
+ alias :type_list :formats
49
+ end
50
+
51
+ JPEG_SOF_BLOCKS = %W(\xc0 \xc1 \xc2 \xc3 \xc5 \xc6 \xc7 \xc9 \xca \xcb \xcd \xce \xcf).collect{|m| m.b}
52
+ JPEG_APP_BLOCKS = %W(\xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef).collect{|m| m.b}
53
+
54
+ # Receive image & make size. argument is image String or IO
55
+ def initialize(data, format = nil)
56
+ @data = data.dup rescue data
57
+ @info = {}
58
+
59
+ if @data.kind_of?(IO)
60
+ @top = @data.read(128)
61
+ @data.seek(0, 0)
62
+ # Define Singleton-method definition to IO (byte, offset)
63
+ def @data.read_o(length = 1, offset = nil)
64
+ self.seek(offset, 0) if offset
65
+ ret = self.read(length)
66
+ raise "cannot read!!" unless ret
67
+ ret
68
+ end
69
+ elsif @data.is_a?(String)
70
+ @top = @data[0, 128]
71
+ # Define Singleton-method definition to String (byte, offset)
72
+ @data.extend(PDF::Writer::OffsetReader)
73
+ else
74
+ raise "argument class error!! #{data.type}"
75
+ end
76
+
77
+ if format.nil?
78
+ @format = discover_format
79
+ else
80
+ match = false
81
+ Formats.constants.each { |t| match = true if format == t }
82
+ raise("format is failed. #{format}\n") unless match
83
+ @format = format
84
+ end
85
+
86
+ __send__("measure_#@format".intern) unless @format == Formats::OTHER
87
+
88
+ @data = data.dup
89
+ end
90
+
91
+ attr_reader :format
92
+ alias :get_type :format
93
+ attr_reader :height
94
+ alias :get_height :height
95
+ attr_reader :width
96
+ alias :get_width width
97
+
98
+ attr_reader :bits
99
+ attr_reader :channels
100
+
101
+ attr_reader :info
102
+
103
+ def discover_format
104
+ if @top =~ %r{^GIF8[79]a}
105
+ Formats::GIF
106
+ elsif @top[0, 3] == "\xff\xd8\xff".b
107
+ Formats::JPEG
108
+ elsif @top[0, 8] == "\x89PNG\x0d\x0a\x1a\x0a".b
109
+ Formats::PNG
110
+ elsif @top[0, 3] == "FWS"
111
+ Formats::SWF
112
+ elsif @top[0, 4] == "8BPS"
113
+ Formats::PSD
114
+ elsif @top[0, 2] == 'BM'
115
+ Formats::BMP
116
+ elsif @top[0, 4] == "MM\x00\x2a".b
117
+ Formats::TIFF
118
+ elsif @top[0, 4] == "II\x2a\x00".b
119
+ Formats::TIFF
120
+ elsif @top[0, 12] == "\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a".b
121
+ Formats::JP2
122
+ elsif @top =~ %r{^P[1-7]}
123
+ Formats::PPM
124
+ elsif @top =~ %r{\#define\s+\S+\s+\d+}
125
+ Formats::XBM
126
+ elsif @top =~ %r{/\* XPM \*/}
127
+ Formats::XPM
128
+ elsif @top[0] == 10
129
+ Formats::PCX
130
+ else
131
+ Formats::OTHER # might be WBMP
132
+ end
133
+ end
134
+ private :discover_format
135
+
136
+ def measure_GIF
137
+ @data.read_o(6) # Skip GIF8.a
138
+ @width, @height, @bits = @data.read_o(5).unpack('vvC')
139
+ if @bits & 0x80 == 0x80
140
+ @bits = (@bits & 0x07) + 1
141
+ else
142
+ @bits = 0
143
+ end
144
+ @channels = 3
145
+ end
146
+ private :measure_GIF
147
+
148
+ def measure_PNG
149
+ @data.read_o(12)
150
+ raise "This file is not PNG." unless @data.read_o(4) == "IHDR"
151
+ # The file information is in the IHDR section.
152
+ # Offset Bytes Meaning
153
+ # 0 4 Width
154
+ # 5 4 Height
155
+ # 9 1 Bit Depth
156
+ # 10 1 Compression Method
157
+ # 11 1 Filter Method
158
+ # 12 1 Interlace Method
159
+ ihdr = @data.read_o(13).unpack("NNCCCCC")
160
+ @width = ihdr[0]
161
+ @height = ihdr[1]
162
+ @bits = ihdr[2]
163
+ @info[:color_type] = ihdr[3]
164
+ @info[:compression_method] = ihdr[4]
165
+ @info[:filter_method] = ihdr[5]
166
+ @info[:interlace_method] = ihdr[6]
167
+
168
+
169
+ end
170
+ private :measure_PNG
171
+
172
+ def measure_JPEG
173
+ c_marker = "\xff".b # Section marker.
174
+ @data.read_o(2) # Skip the first two bytes of JPEG identifier.
175
+ loop do
176
+ marker, code, length = @data.read_o(4).unpack('aan')
177
+ raise "JPEG marker not found!" if marker != c_marker
178
+
179
+ if JPEG_SOF_BLOCKS.include?(code)
180
+ @bits, @height, @width, @channels = @data.read_o(6).unpack("CnnC")
181
+ break
182
+ end
183
+
184
+ buffer = @data.read_o(length - 2)
185
+
186
+ if JPEG_APP_BLOCKS.include?(code)
187
+ @info["APP#{code.to_i - 0xe0}"] = buffer
188
+ end
189
+ end
190
+ end
191
+ private :measure_JPEG
192
+
193
+ def measure_BMP
194
+ # Skip the first 14 bytes of the image.
195
+ @data.read_o(14)
196
+ # Up to the next 16 bytes will be used.
197
+ dim = @data.read_o(16)
198
+
199
+ # Get the "size" of the image from the next four bytes.
200
+ size = dim.unpack("V").first # <- UNPACK RETURNS ARRAY, SO GET FIRST ELEMENT
201
+
202
+ if size == 12
203
+ @width, @height, @bits = dim.unpack("x4vvx3C")
204
+ elsif size > 12 and (size <= 64 or size == 108)
205
+ @width, @height, @bits = dim.unpack("x4VVv")
206
+ end
207
+ end
208
+ private :measure_BMP
209
+
210
+ def measure_PPM
211
+ header = @data.read_o(1024)
212
+ header.gsub!(/^\#[^\n\r]*/m, "")
213
+ md = %r{^(P[1-6])\s+?(\d+)\s+?(\d+)}mo.match(header)
214
+
215
+ @width = md.captures[1]
216
+ @height = md.captures[2]
217
+
218
+ case md.captures[0]
219
+ when "P1", "P4"
220
+ @format = "PBM"
221
+ when "P2", "P5"
222
+ @format = "PGM"
223
+ when "P3", "P6"
224
+ @format = "PPM"
225
+ # when "P7"
226
+ # @format = "XV"
227
+ # header =~ /IMGINFO:(\d+)x(\d+)/m
228
+ # width = $1.to_i; height = $2.to_i
229
+ end
230
+ end
231
+ private :measure_PPM
232
+
233
+ alias :measure_PGM :measure_PPM
234
+ private :measure_PGM
235
+ alias :measure_PBM :measure_PPM
236
+ private :measure_PBM
237
+
238
+ XBM_DIMENSIONS_RE = %r{^\#define\s*\S*\s*(\d+)\s*\n\#define\s*\S*\s*(\d+)}mi
239
+ def measure_XBM
240
+ md = XBM_DIMENSIONS_RE.match(@data.read_o(1024))
241
+
242
+ @width = md.captures[0].to_i
243
+ @height = md.captures[1].to_i
244
+ end
245
+ private :measure_XBM
246
+
247
+ XPM_DIMENSIONS_RE = %r<"\s*(\d+)\s+(\d+)(\s+\d+\s+\d+){1,2}\s*">m
248
+ def measure_XPM
249
+ while line = @data.read_o(1024)
250
+ md = XPM_DIMENSIONS_RE.match(line)
251
+ if md
252
+ @width = md.captures[0].to_i
253
+ @height = md.captures[1].to_i
254
+ break
255
+ end
256
+ end
257
+ end
258
+ private :measure_XPM
259
+
260
+ def measure_PSD
261
+ @width, @height = @data.read_o(26).unpack("x14NN")
262
+ end
263
+ private :measure_PSD
264
+
265
+ def measure_PCX
266
+ header = @data.read_o(128)
267
+ head_part = header.unpack('C4S4')
268
+ @width = head_part[6] - head_part[4] + 1
269
+ @height = head_part[7] - head_part[5] + 1
270
+ end
271
+ private :measure_PCX
272
+
273
+ def measure_SWF
274
+ header = @data.read_o(9)
275
+ raise "This file is not SWF." unless header.unpack('a3')[0] == 'FWS'
276
+
277
+ bits = Integer("0b#{header.unpack('@8B5')}")
278
+ header << @data.read_o(bits * 4 / 8 + 1)
279
+
280
+ str = *(header.unpack("@8B#{5 + bits * 4}"))
281
+ last = 5
282
+ x_min = Integer("0b#{str[last, bits]}")
283
+ x_max = Integer("0b#{str[(last + bits), bits]}")
284
+ y_min = Integer("0b#{str[(last + (2 * bits)), bits]}")
285
+ y_max = Integer("0b#{str[(last + (3 * bits)), bits]}")
286
+ @width = (x_max - x_min) / 20
287
+ @height = (y_max - y_min) / 20
288
+ end
289
+ private :measure_SWF
290
+
291
+ # The same as SWF, except that the original data is compressed with
292
+ # Zlib. Disabled for now.
293
+ def measure_SWC
294
+ end
295
+ private :measure_SWC
296
+
297
+ def measure_TIFF
298
+ # 'v' little-endian
299
+ # 'n' default to big-endian
300
+ endian = (@data.read_o(4) =~ /II\x2a\x00/o) ? 'v' : 'n'
301
+
302
+ packspec = [
303
+ nil, # nothing (shouldn't happen)
304
+ 'C', # BYTE (8-bit unsigned integer)
305
+ nil, # ASCII
306
+ endian, # SHORT (16-bit unsigned integer)
307
+ endian.upcase, # LONG (32-bit unsigned integer)
308
+ nil, # RATIONAL
309
+ 'c', # SBYTE (8-bit signed integer)
310
+ nil, # UNDEFINED
311
+ endian, # SSHORT (16-bit unsigned integer)
312
+ endian.upcase, # SLONG (32-bit unsigned integer)
313
+ ]
314
+
315
+ # Find the IFD location.
316
+ ifd_addr = *(@data.read_o(4).unpack(endian.upcase))
317
+ # Get the number of entries in the IFD.
318
+ ifd = @data.read_o(2, ifd_addr)
319
+ num_dirent = *(ifd.unpack(endian)) # Make it useful
320
+ ifd_addr += 2
321
+ num_dirent = ifd_addr + (num_dirent * 12) # Calc. maximum offset of IFD
322
+
323
+ loop do
324
+ break if @width and @height
325
+
326
+ ifd = @data.read_o(12, ifd_addr) # Get directory entry.
327
+ break if ifd.nil? or ifd_addr > num_dirent
328
+ ifd_addr += 12
329
+
330
+ tag = *(ifd.unpack(endian)) # ...decode its tag
331
+ type = *(ifd[2, 2].unpack(endian)) # ... and data type
332
+
333
+ # Check the type for sanity.
334
+ next if type > packspec.size or packspec[type].nil?
335
+
336
+ case tag
337
+ when 0x0100, 0xa002 # width
338
+ @width = *(ifd[8, 4].unpack(packspec[type]))
339
+ when 0x0101, 0xa003 # height
340
+ @height = *(ifd[8, 4].unpack(packspec[type]))
341
+ end
342
+ end
343
+ end
344
+ private :measure_TIFF
345
+ end
346
+
347
+ if __FILE__ == $0
348
+ require 'pdf/writer'
349
+ require 'pdf/writer/graphics'
350
+
351
+ print "Image Formats: #{PDF::Writer::Graphics::ImageInfo.formats.inspect}\n"
352
+
353
+ Dir.glob("*").each do |file|
354
+ print "#{file} (string)\n"
355
+ open(file, "rb") do |fh|
356
+ image = PDF::Writer::Graphics::ImageInfo.new(fh.read)
357
+ print <<-EOF
358
+ Format : #{image.format}
359
+ Width : #{image.width.inspect}
360
+ Height : #{image.height.inspect}
361
+ Bits : #{image.bits.inspect}
362
+ Channels: #{image.channels.inspect}
363
+ EOF
364
+ end
365
+ end
366
+ end
@@ -0,0 +1,43 @@
1
+ #--
2
+ # PDF::Writer for Ruby.
3
+ # http://rubyforge.org/projects/ruby-pdf/
4
+ # Copyright 2003 - 2005 Austin Ziegler.
5
+ #
6
+ # Licensed under a MIT-style licence. See LICENCE in the main distribution
7
+ # for full licensing information.
8
+ #
9
+ # $Id$
10
+ #++
11
+
12
+ module PDF::Writer::Lang
13
+ @message = {}
14
+
15
+ class << self
16
+ # PDF::Writer is fully internationalized. This module method sets the
17
+ # error messages to the specified language Module. The language Module
18
+ # must have a constant Hash called +Message+ containing a set of
19
+ # symbols and localized versions of the messages associated with them.
20
+ #
21
+ # If the file 'pdf/writer/lang/es' contains the module
22
+ # <tt>PDF::Writer::Lang::ES</tt>, the error messages for PDF could be
23
+ # localized to Espa�ol thus:
24
+ #
25
+ # require 'pdf/writer'
26
+ # require 'pdf/writer/lang/es'
27
+ #
28
+ # Localization is module-global; in a multithreaded program, all
29
+ # threads will use the current language's messages.
30
+ #
31
+ # See PDF::Writer::Lang::EN for more information.
32
+ attr_accessor :language
33
+ def language=(ll) #:nodoc:
34
+ @language = ll
35
+ @message.replace ll.instance_variable_get('@message')
36
+ end
37
+
38
+ # Looks up the mesasge
39
+ def [](message_id)
40
+ @message[message_id]
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,99 @@
1
+ #--
2
+ # PDF::Writer for Ruby.
3
+ # http://rubyforge.org/projects/ruby-pdf/
4
+ # Copyright 2003 - 2005 Austin Ziegler.
5
+ #
6
+ # Licensed under a MIT-style licence. See LICENCE in the main distribution
7
+ # for full licensing information.
8
+ #
9
+ # $Id$
10
+ #++
11
+ # PDF::Writer::Lang::EN is the English-language output module. It contains a
12
+ # hash, @message, that contains the messages that may be reported by any
13
+ # method in the PDF library. The messages are identified by a Symbol.
14
+ #
15
+ # <b>Symbol</b>:: <b>Meaning</b>
16
+ # <b>:uri_09x</b>:: URIs must be HTTP or FTP URIs in this version of RSS.
17
+ module PDF::Writer::Lang::EN
18
+ @message = {
19
+ :invalid_pos => ":pos must be either :before or :after.",
20
+ :req_FPXO => "Pages#<< requires a PDF::Writer::Page, PDF::Writer::Font, or PDF::Writer::ExternalObject.",
21
+ :req_FPXOH => "Pages#add requires a PDF::Writer::Page, PDF::Writer::Font, PDF::Writer::ExternalObject, or Hash.",
22
+ :text_width_parameters_reversed => <<-EOS,
23
+ %s
24
+ As of PDF::Writer 1.1, the signature for #text_width and #text_line_width
25
+ is (text, size), not (size, text). It appears that the old version is still
26
+ in use in your code. Please change it.
27
+ EOS
28
+ :add_text_parameters_reversed => <<-EOS,
29
+ %s
30
+ As of PDF::Writer 1.1, the signature for #add_text is (x, y, text, size,
31
+ angle, word_space_adjust), not (x, y, size, text, angle, word_space_adjust).
32
+ It appears that the old version is still in use in your code. Please change
33
+ it.
34
+ EOS
35
+ :add_textw_parameters_reversed => <<-EOS,
36
+ %s
37
+ As of PDF::Writer 1.1, the signature for #add_text_wrap is (x, y, text,
38
+ size, justification, angle, test), not (x, y, size, text, justification,
39
+ angle, test). It appears that the old version is still in use in your
40
+ code. Please change it.
41
+ EOS
42
+ :png_invalid_header => "Invalid PNG header.",
43
+ :png_unsupp_compres => "Unsupported PNG compression method.",
44
+ :png_unsupp_filter => "Unsupported PNG filter method.",
45
+ :png_header_missing => "PNG information header is missing.",
46
+ :png_8bit_colour => "Only PNG colour depths of 8 bits or less are supported.",
47
+ :png_interlace => "Interlaced PNG images are not currently supported.",
48
+ :png_alpha_trans => "PNG alpha channel transparency is not supported; only palette transparency is supported.",
49
+ :data_must_be_array => "The table data is not an Array. (Temporary limitation.)",
50
+ :columns_unspecified => "Columns are unspecified. They must be data[0] and be an array.",
51
+ :no_zlib_no_compress => "Could not load Zlib. PDF compression is disabled.",
52
+ :ttf_licence_no_embedding => "The TrueType font %1s has a licence that does not allow for embedding.",
53
+ :simpletable_columns_undefined => "Columns are undefined for table.",
54
+ :simpletable_data_empty => "Table data is empty.",
55
+ :techbook_eval_exception => <<-EOS,
56
+
57
+ Error in document around line %d:
58
+ %s
59
+ Backtrace:
60
+ %s
61
+ EOS
62
+ :techbook_bad_columns_directive => "Invalid argument to directive .columns: %s",
63
+ :techbook_cannot_find_document => "Error: cannot find a document.",
64
+ :techbook_using_default_doc => "Using default document '%s'.",
65
+ :techbook_using_cached_doc => "Using cached document '%s'...",
66
+ :techbook_regenerating => "Cached document is older than source document. Regenerating.",
67
+ :techbook_ignoring_cache => "Ignoring cached document.",
68
+ :techbook_unknown_xref => "Unknown cross-reference %s.",
69
+ :techbook_code_not_empty => "Code is not empty:",
70
+ :techbook_usage_banner => "Usage: %s [options] [INPUT FILE]",
71
+ :techbook_usage_banner_1 => [
72
+ "INPUT FILE, if not specified, will be 'manual.pwd', either in the",
73
+ "current directory or relative to this file.",
74
+ ""
75
+ ],
76
+ :techbook_help_force_regen => [
77
+ "Forces the regeneration of the document,",
78
+ "ignoring the cached document version."
79
+ ],
80
+ :techbook_help_no_cache => [
81
+ "Disables generated document caching.",
82
+ ],
83
+ :techbook_help_compress => [
84
+ "Compresses the resulting PDF.",
85
+ ],
86
+ :techbook_help_help => [
87
+ "Shows this text.",
88
+ ],
89
+ :techbook_exception => "Exception %1s around line %2d.",
90
+ :C_callback_form_error => "Stand-alone callbacks must be of the form <C:callback />.",
91
+ :c_callback_form_error => "Paired callbacks must be of the form <c:callback>...</c:callback>.",
92
+ :callback_warning => "Unknown %1s callback: '%2s'. Ignoring.",
93
+ :charts_stddev_data_empty => "Charts::StdDev data is empty.",
94
+ :charts_stddev_scale_norange => "Charts::StdDev::Scale has no range.",
95
+ :charts_stddev_scale_nostep => "Charts::StdDev::Scale has no step.",
96
+ }
97
+
98
+ PDF::Writer::Lang.language = self
99
+ end