mack-pdf_writer 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/lib/gems/archive-tar-minitar-0.5.2/bin/minitar +27 -0
  2. data/lib/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar/command.rb +814 -0
  3. data/lib/gems/archive-tar-minitar-0.5.2/lib/archive/tar/minitar.rb +979 -0
  4. data/lib/gems/color-1.4.0/lib/color/cmyk.rb +281 -0
  5. data/lib/gems/color-1.4.0/lib/color/css.rb +30 -0
  6. data/lib/gems/color-1.4.0/lib/color/grayscale.rb +214 -0
  7. data/lib/gems/color-1.4.0/lib/color/hsl.rb +223 -0
  8. data/lib/gems/color-1.4.0/lib/color/palette/adobecolor.rb +274 -0
  9. data/lib/gems/color-1.4.0/lib/color/palette/gimp.rb +118 -0
  10. data/lib/gems/color-1.4.0/lib/color/palette/monocontrast.rb +182 -0
  11. data/lib/gems/color-1.4.0/lib/color/palette.rb +18 -0
  12. data/lib/gems/color-1.4.0/lib/color/rgb/metallic.rb +45 -0
  13. data/lib/gems/color-1.4.0/lib/color/rgb-colors.rb +357 -0
  14. data/lib/gems/color-1.4.0/lib/color/rgb.rb +455 -0
  15. data/lib/gems/color-1.4.0/lib/color/yiq.rb +86 -0
  16. data/lib/gems/color-1.4.0/lib/color.rb +147 -0
  17. data/lib/gems/pdf-writer-1.1.8/bin/techbook +24 -0
  18. data/lib/gems/pdf-writer-1.1.8/lib/pdf/charts/stddev.rb +430 -0
  19. data/lib/gems/pdf-writer-1.1.8/lib/pdf/charts.rb +13 -0
  20. data/lib/gems/pdf-writer-1.1.8/lib/pdf/math.rb +108 -0
  21. data/lib/gems/pdf-writer-1.1.8/lib/pdf/quickref.rb +332 -0
  22. data/lib/gems/pdf-writer-1.1.8/lib/pdf/simpletable.rb +947 -0
  23. data/lib/gems/pdf-writer-1.1.8/lib/pdf/techbook.rb +901 -0
  24. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/arc4.rb +63 -0
  25. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fontmetrics.rb +203 -0
  26. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Courier-Bold.afm +342 -0
  27. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Courier-BoldOblique.afm +342 -0
  28. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Courier-Oblique.afm +342 -0
  29. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Courier.afm +342 -0
  30. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Helvetica-Bold.afm +2827 -0
  31. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Helvetica-BoldOblique.afm +2827 -0
  32. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Helvetica-Oblique.afm +3051 -0
  33. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Helvetica.afm +3051 -0
  34. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/MustRead.html +19 -0
  35. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Symbol.afm +213 -0
  36. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Times-Bold.afm +2588 -0
  37. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Times-BoldItalic.afm +2384 -0
  38. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Times-Italic.afm +2667 -0
  39. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/Times-Roman.afm +2419 -0
  40. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/fonts/ZapfDingbats.afm +225 -0
  41. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/graphics/imageinfo.rb +365 -0
  42. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/graphics.rb +813 -0
  43. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/lang/en.rb +99 -0
  44. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/lang.rb +43 -0
  45. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/action.rb +35 -0
  46. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/annotation.rb +42 -0
  47. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/catalog.rb +39 -0
  48. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/contents.rb +65 -0
  49. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/destination.rb +40 -0
  50. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/encryption.rb +53 -0
  51. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/font.rb +72 -0
  52. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/fontdescriptor.rb +34 -0
  53. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/fontencoding.rb +40 -0
  54. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/image.rb +304 -0
  55. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/info.rb +51 -0
  56. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/outline.rb +30 -0
  57. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/outlines.rb +30 -0
  58. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/page.rb +195 -0
  59. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/pages.rb +115 -0
  60. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/procset.rb +46 -0
  61. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object/viewerpreferences.rb +74 -0
  62. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/object.rb +23 -0
  63. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/ohash.rb +58 -0
  64. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/oreader.rb +25 -0
  65. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/state.rb +48 -0
  66. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer/strokestyle.rb +138 -0
  67. data/lib/gems/pdf-writer-1.1.8/lib/pdf/writer.rb +2729 -0
  68. data/lib/gems/transaction-simple-1.4.0/lib/transaction/simple/group.rb +146 -0
  69. data/lib/gems/transaction-simple-1.4.0/lib/transaction/simple/threadsafe/group.rb +36 -0
  70. data/lib/gems/transaction-simple-1.4.0/lib/transaction/simple/threadsafe.rb +68 -0
  71. data/lib/gems/transaction-simple-1.4.0/lib/transaction/simple.rb +486 -0
  72. data/lib/gems.rb +13 -0
  73. data/lib/mack-pdf_writer.rb +2 -0
  74. metadata +111 -16
@@ -0,0 +1,225 @@
1
+ StartFontMetrics 4.1
2
+ Comment Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.
3
+ Comment Creation Date: Thu May 1 15:14:13 1997
4
+ Comment UniqueID 43082
5
+ Comment VMusage 45775 55535
6
+ FontName ZapfDingbats
7
+ FullName ITC Zapf Dingbats
8
+ FamilyName ZapfDingbats
9
+ Weight Medium
10
+ ItalicAngle 0
11
+ IsFixedPitch false
12
+ CharacterSet Special
13
+ FontBBox -1 -143 981 820
14
+ UnderlinePosition -100
15
+ UnderlineThickness 50
16
+ Version 002.000
17
+ Notice Copyright (c) 1985, 1987, 1988, 1989, 1997 Adobe Systems Incorporated. All Rights Reserved.ITC Zapf Dingbats is a registered trademark of International Typeface Corporation.
18
+ EncodingScheme FontSpecific
19
+ StdHW 28
20
+ StdVW 90
21
+ StartCharMetrics 202
22
+ C 32 ; WX 278 ; N space ; B 0 0 0 0 ;
23
+ C 33 ; WX 974 ; N a1 ; B 35 72 939 621 ;
24
+ C 34 ; WX 961 ; N a2 ; B 35 81 927 611 ;
25
+ C 35 ; WX 974 ; N a202 ; B 35 72 939 621 ;
26
+ C 36 ; WX 980 ; N a3 ; B 35 0 945 692 ;
27
+ C 37 ; WX 719 ; N a4 ; B 34 139 685 566 ;
28
+ C 38 ; WX 789 ; N a5 ; B 35 -14 755 705 ;
29
+ C 39 ; WX 790 ; N a119 ; B 35 -14 755 705 ;
30
+ C 40 ; WX 791 ; N a118 ; B 35 -13 761 705 ;
31
+ C 41 ; WX 690 ; N a117 ; B 34 138 655 553 ;
32
+ C 42 ; WX 960 ; N a11 ; B 35 123 925 568 ;
33
+ C 43 ; WX 939 ; N a12 ; B 35 134 904 559 ;
34
+ C 44 ; WX 549 ; N a13 ; B 29 -11 516 705 ;
35
+ C 45 ; WX 855 ; N a14 ; B 34 59 820 632 ;
36
+ C 46 ; WX 911 ; N a15 ; B 35 50 876 642 ;
37
+ C 47 ; WX 933 ; N a16 ; B 35 139 899 550 ;
38
+ C 48 ; WX 911 ; N a105 ; B 35 50 876 642 ;
39
+ C 49 ; WX 945 ; N a17 ; B 35 139 909 553 ;
40
+ C 50 ; WX 974 ; N a18 ; B 35 104 938 587 ;
41
+ C 51 ; WX 755 ; N a19 ; B 34 -13 721 705 ;
42
+ C 52 ; WX 846 ; N a20 ; B 36 -14 811 705 ;
43
+ C 53 ; WX 762 ; N a21 ; B 35 0 727 692 ;
44
+ C 54 ; WX 761 ; N a22 ; B 35 0 727 692 ;
45
+ C 55 ; WX 571 ; N a23 ; B -1 -68 571 661 ;
46
+ C 56 ; WX 677 ; N a24 ; B 36 -13 642 705 ;
47
+ C 57 ; WX 763 ; N a25 ; B 35 0 728 692 ;
48
+ C 58 ; WX 760 ; N a26 ; B 35 0 726 692 ;
49
+ C 59 ; WX 759 ; N a27 ; B 35 0 725 692 ;
50
+ C 60 ; WX 754 ; N a28 ; B 35 0 720 692 ;
51
+ C 61 ; WX 494 ; N a6 ; B 35 0 460 692 ;
52
+ C 62 ; WX 552 ; N a7 ; B 35 0 517 692 ;
53
+ C 63 ; WX 537 ; N a8 ; B 35 0 503 692 ;
54
+ C 64 ; WX 577 ; N a9 ; B 35 96 542 596 ;
55
+ C 65 ; WX 692 ; N a10 ; B 35 -14 657 705 ;
56
+ C 66 ; WX 786 ; N a29 ; B 35 -14 751 705 ;
57
+ C 67 ; WX 788 ; N a30 ; B 35 -14 752 705 ;
58
+ C 68 ; WX 788 ; N a31 ; B 35 -14 753 705 ;
59
+ C 69 ; WX 790 ; N a32 ; B 35 -14 756 705 ;
60
+ C 70 ; WX 793 ; N a33 ; B 35 -13 759 705 ;
61
+ C 71 ; WX 794 ; N a34 ; B 35 -13 759 705 ;
62
+ C 72 ; WX 816 ; N a35 ; B 35 -14 782 705 ;
63
+ C 73 ; WX 823 ; N a36 ; B 35 -14 787 705 ;
64
+ C 74 ; WX 789 ; N a37 ; B 35 -14 754 705 ;
65
+ C 75 ; WX 841 ; N a38 ; B 35 -14 807 705 ;
66
+ C 76 ; WX 823 ; N a39 ; B 35 -14 789 705 ;
67
+ C 77 ; WX 833 ; N a40 ; B 35 -14 798 705 ;
68
+ C 78 ; WX 816 ; N a41 ; B 35 -13 782 705 ;
69
+ C 79 ; WX 831 ; N a42 ; B 35 -14 796 705 ;
70
+ C 80 ; WX 923 ; N a43 ; B 35 -14 888 705 ;
71
+ C 81 ; WX 744 ; N a44 ; B 35 0 710 692 ;
72
+ C 82 ; WX 723 ; N a45 ; B 35 0 688 692 ;
73
+ C 83 ; WX 749 ; N a46 ; B 35 0 714 692 ;
74
+ C 84 ; WX 790 ; N a47 ; B 34 -14 756 705 ;
75
+ C 85 ; WX 792 ; N a48 ; B 35 -14 758 705 ;
76
+ C 86 ; WX 695 ; N a49 ; B 35 -14 661 706 ;
77
+ C 87 ; WX 776 ; N a50 ; B 35 -6 741 699 ;
78
+ C 88 ; WX 768 ; N a51 ; B 35 -7 734 699 ;
79
+ C 89 ; WX 792 ; N a52 ; B 35 -14 757 705 ;
80
+ C 90 ; WX 759 ; N a53 ; B 35 0 725 692 ;
81
+ C 91 ; WX 707 ; N a54 ; B 35 -13 672 704 ;
82
+ C 92 ; WX 708 ; N a55 ; B 35 -14 672 705 ;
83
+ C 93 ; WX 682 ; N a56 ; B 35 -14 647 705 ;
84
+ C 94 ; WX 701 ; N a57 ; B 35 -14 666 705 ;
85
+ C 95 ; WX 826 ; N a58 ; B 35 -14 791 705 ;
86
+ C 96 ; WX 815 ; N a59 ; B 35 -14 780 705 ;
87
+ C 97 ; WX 789 ; N a60 ; B 35 -14 754 705 ;
88
+ C 98 ; WX 789 ; N a61 ; B 35 -14 754 705 ;
89
+ C 99 ; WX 707 ; N a62 ; B 34 -14 673 705 ;
90
+ C 100 ; WX 687 ; N a63 ; B 36 0 651 692 ;
91
+ C 101 ; WX 696 ; N a64 ; B 35 0 661 691 ;
92
+ C 102 ; WX 689 ; N a65 ; B 35 0 655 692 ;
93
+ C 103 ; WX 786 ; N a66 ; B 34 -14 751 705 ;
94
+ C 104 ; WX 787 ; N a67 ; B 35 -14 752 705 ;
95
+ C 105 ; WX 713 ; N a68 ; B 35 -14 678 705 ;
96
+ C 106 ; WX 791 ; N a69 ; B 35 -14 756 705 ;
97
+ C 107 ; WX 785 ; N a70 ; B 36 -14 751 705 ;
98
+ C 108 ; WX 791 ; N a71 ; B 35 -14 757 705 ;
99
+ C 109 ; WX 873 ; N a72 ; B 35 -14 838 705 ;
100
+ C 110 ; WX 761 ; N a73 ; B 35 0 726 692 ;
101
+ C 111 ; WX 762 ; N a74 ; B 35 0 727 692 ;
102
+ C 112 ; WX 762 ; N a203 ; B 35 0 727 692 ;
103
+ C 113 ; WX 759 ; N a75 ; B 35 0 725 692 ;
104
+ C 114 ; WX 759 ; N a204 ; B 35 0 725 692 ;
105
+ C 115 ; WX 892 ; N a76 ; B 35 0 858 705 ;
106
+ C 116 ; WX 892 ; N a77 ; B 35 -14 858 692 ;
107
+ C 117 ; WX 788 ; N a78 ; B 35 -14 754 705 ;
108
+ C 118 ; WX 784 ; N a79 ; B 35 -14 749 705 ;
109
+ C 119 ; WX 438 ; N a81 ; B 35 -14 403 705 ;
110
+ C 120 ; WX 138 ; N a82 ; B 35 0 104 692 ;
111
+ C 121 ; WX 277 ; N a83 ; B 35 0 242 692 ;
112
+ C 122 ; WX 415 ; N a84 ; B 35 0 380 692 ;
113
+ C 123 ; WX 392 ; N a97 ; B 35 263 357 705 ;
114
+ C 124 ; WX 392 ; N a98 ; B 34 263 357 705 ;
115
+ C 125 ; WX 668 ; N a99 ; B 35 263 633 705 ;
116
+ C 126 ; WX 668 ; N a100 ; B 36 263 634 705 ;
117
+ C 128 ; WX 390 ; N a89 ; B 35 -14 356 705 ;
118
+ C 129 ; WX 390 ; N a90 ; B 35 -14 355 705 ;
119
+ C 130 ; WX 317 ; N a93 ; B 35 0 283 692 ;
120
+ C 131 ; WX 317 ; N a94 ; B 35 0 283 692 ;
121
+ C 132 ; WX 276 ; N a91 ; B 35 0 242 692 ;
122
+ C 133 ; WX 276 ; N a92 ; B 35 0 242 692 ;
123
+ C 134 ; WX 509 ; N a205 ; B 35 0 475 692 ;
124
+ C 135 ; WX 509 ; N a85 ; B 35 0 475 692 ;
125
+ C 136 ; WX 410 ; N a206 ; B 35 0 375 692 ;
126
+ C 137 ; WX 410 ; N a86 ; B 35 0 375 692 ;
127
+ C 138 ; WX 234 ; N a87 ; B 35 -14 199 705 ;
128
+ C 139 ; WX 234 ; N a88 ; B 35 -14 199 705 ;
129
+ C 140 ; WX 334 ; N a95 ; B 35 0 299 692 ;
130
+ C 141 ; WX 334 ; N a96 ; B 35 0 299 692 ;
131
+ C 161 ; WX 732 ; N a101 ; B 35 -143 697 806 ;
132
+ C 162 ; WX 544 ; N a102 ; B 56 -14 488 706 ;
133
+ C 163 ; WX 544 ; N a103 ; B 34 -14 508 705 ;
134
+ C 164 ; WX 910 ; N a104 ; B 35 40 875 651 ;
135
+ C 165 ; WX 667 ; N a106 ; B 35 -14 633 705 ;
136
+ C 166 ; WX 760 ; N a107 ; B 35 -14 726 705 ;
137
+ C 167 ; WX 760 ; N a108 ; B 0 121 758 569 ;
138
+ C 168 ; WX 776 ; N a112 ; B 35 0 741 705 ;
139
+ C 169 ; WX 595 ; N a111 ; B 34 -14 560 705 ;
140
+ C 170 ; WX 694 ; N a110 ; B 35 -14 659 705 ;
141
+ C 171 ; WX 626 ; N a109 ; B 34 0 591 705 ;
142
+ C 172 ; WX 788 ; N a120 ; B 35 -14 754 705 ;
143
+ C 173 ; WX 788 ; N a121 ; B 35 -14 754 705 ;
144
+ C 174 ; WX 788 ; N a122 ; B 35 -14 754 705 ;
145
+ C 175 ; WX 788 ; N a123 ; B 35 -14 754 705 ;
146
+ C 176 ; WX 788 ; N a124 ; B 35 -14 754 705 ;
147
+ C 177 ; WX 788 ; N a125 ; B 35 -14 754 705 ;
148
+ C 178 ; WX 788 ; N a126 ; B 35 -14 754 705 ;
149
+ C 179 ; WX 788 ; N a127 ; B 35 -14 754 705 ;
150
+ C 180 ; WX 788 ; N a128 ; B 35 -14 754 705 ;
151
+ C 181 ; WX 788 ; N a129 ; B 35 -14 754 705 ;
152
+ C 182 ; WX 788 ; N a130 ; B 35 -14 754 705 ;
153
+ C 183 ; WX 788 ; N a131 ; B 35 -14 754 705 ;
154
+ C 184 ; WX 788 ; N a132 ; B 35 -14 754 705 ;
155
+ C 185 ; WX 788 ; N a133 ; B 35 -14 754 705 ;
156
+ C 186 ; WX 788 ; N a134 ; B 35 -14 754 705 ;
157
+ C 187 ; WX 788 ; N a135 ; B 35 -14 754 705 ;
158
+ C 188 ; WX 788 ; N a136 ; B 35 -14 754 705 ;
159
+ C 189 ; WX 788 ; N a137 ; B 35 -14 754 705 ;
160
+ C 190 ; WX 788 ; N a138 ; B 35 -14 754 705 ;
161
+ C 191 ; WX 788 ; N a139 ; B 35 -14 754 705 ;
162
+ C 192 ; WX 788 ; N a140 ; B 35 -14 754 705 ;
163
+ C 193 ; WX 788 ; N a141 ; B 35 -14 754 705 ;
164
+ C 194 ; WX 788 ; N a142 ; B 35 -14 754 705 ;
165
+ C 195 ; WX 788 ; N a143 ; B 35 -14 754 705 ;
166
+ C 196 ; WX 788 ; N a144 ; B 35 -14 754 705 ;
167
+ C 197 ; WX 788 ; N a145 ; B 35 -14 754 705 ;
168
+ C 198 ; WX 788 ; N a146 ; B 35 -14 754 705 ;
169
+ C 199 ; WX 788 ; N a147 ; B 35 -14 754 705 ;
170
+ C 200 ; WX 788 ; N a148 ; B 35 -14 754 705 ;
171
+ C 201 ; WX 788 ; N a149 ; B 35 -14 754 705 ;
172
+ C 202 ; WX 788 ; N a150 ; B 35 -14 754 705 ;
173
+ C 203 ; WX 788 ; N a151 ; B 35 -14 754 705 ;
174
+ C 204 ; WX 788 ; N a152 ; B 35 -14 754 705 ;
175
+ C 205 ; WX 788 ; N a153 ; B 35 -14 754 705 ;
176
+ C 206 ; WX 788 ; N a154 ; B 35 -14 754 705 ;
177
+ C 207 ; WX 788 ; N a155 ; B 35 -14 754 705 ;
178
+ C 208 ; WX 788 ; N a156 ; B 35 -14 754 705 ;
179
+ C 209 ; WX 788 ; N a157 ; B 35 -14 754 705 ;
180
+ C 210 ; WX 788 ; N a158 ; B 35 -14 754 705 ;
181
+ C 211 ; WX 788 ; N a159 ; B 35 -14 754 705 ;
182
+ C 212 ; WX 894 ; N a160 ; B 35 58 860 634 ;
183
+ C 213 ; WX 838 ; N a161 ; B 35 152 803 540 ;
184
+ C 214 ; WX 1016 ; N a163 ; B 34 152 981 540 ;
185
+ C 215 ; WX 458 ; N a164 ; B 35 -127 422 820 ;
186
+ C 216 ; WX 748 ; N a196 ; B 35 94 698 597 ;
187
+ C 217 ; WX 924 ; N a165 ; B 35 140 890 552 ;
188
+ C 218 ; WX 748 ; N a192 ; B 35 94 698 597 ;
189
+ C 219 ; WX 918 ; N a166 ; B 35 166 884 526 ;
190
+ C 220 ; WX 927 ; N a167 ; B 35 32 892 660 ;
191
+ C 221 ; WX 928 ; N a168 ; B 35 129 891 562 ;
192
+ C 222 ; WX 928 ; N a169 ; B 35 128 893 563 ;
193
+ C 223 ; WX 834 ; N a170 ; B 35 155 799 537 ;
194
+ C 224 ; WX 873 ; N a171 ; B 35 93 838 599 ;
195
+ C 225 ; WX 828 ; N a172 ; B 35 104 791 588 ;
196
+ C 226 ; WX 924 ; N a173 ; B 35 98 889 594 ;
197
+ C 227 ; WX 924 ; N a162 ; B 35 98 889 594 ;
198
+ C 228 ; WX 917 ; N a174 ; B 35 0 882 692 ;
199
+ C 229 ; WX 930 ; N a175 ; B 35 84 896 608 ;
200
+ C 230 ; WX 931 ; N a176 ; B 35 84 896 608 ;
201
+ C 231 ; WX 463 ; N a177 ; B 35 -99 429 791 ;
202
+ C 232 ; WX 883 ; N a178 ; B 35 71 848 623 ;
203
+ C 233 ; WX 836 ; N a179 ; B 35 44 802 648 ;
204
+ C 234 ; WX 836 ; N a193 ; B 35 44 802 648 ;
205
+ C 235 ; WX 867 ; N a180 ; B 35 101 832 591 ;
206
+ C 236 ; WX 867 ; N a199 ; B 35 101 832 591 ;
207
+ C 237 ; WX 696 ; N a181 ; B 35 44 661 648 ;
208
+ C 238 ; WX 696 ; N a200 ; B 35 44 661 648 ;
209
+ C 239 ; WX 874 ; N a182 ; B 35 77 840 619 ;
210
+ C 241 ; WX 874 ; N a201 ; B 35 73 840 615 ;
211
+ C 242 ; WX 760 ; N a183 ; B 35 0 725 692 ;
212
+ C 243 ; WX 946 ; N a184 ; B 35 160 911 533 ;
213
+ C 244 ; WX 771 ; N a197 ; B 34 37 736 655 ;
214
+ C 245 ; WX 865 ; N a185 ; B 35 207 830 481 ;
215
+ C 246 ; WX 771 ; N a194 ; B 34 37 736 655 ;
216
+ C 247 ; WX 888 ; N a198 ; B 34 -19 853 712 ;
217
+ C 248 ; WX 967 ; N a186 ; B 35 124 932 568 ;
218
+ C 249 ; WX 888 ; N a195 ; B 34 -19 853 712 ;
219
+ C 250 ; WX 831 ; N a187 ; B 35 113 796 579 ;
220
+ C 251 ; WX 873 ; N a188 ; B 36 118 838 578 ;
221
+ C 252 ; WX 927 ; N a189 ; B 35 150 891 542 ;
222
+ C 253 ; WX 970 ; N a190 ; B 35 76 931 616 ;
223
+ C 254 ; WX 918 ; N a191 ; B 34 99 884 593 ;
224
+ EndCharMetrics
225
+ EndFontMetrics
@@ -0,0 +1,365 @@
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
+ # This file is also licensed under standard Ruby licensing provisions: the
10
+ # Ruby licence and the GNU General Public Licence, version 2 or later.
11
+ #
12
+ # $Id: imageinfo.rb 173 2007-11-15 17:58:43Z sandal $
13
+ #++
14
+ require 'pdf/writer/oreader'
15
+
16
+ # This is based on ImageSize, by Keisuke Minami <keisuke@rccn.com>. It can
17
+ # be found at http://www.rubycgi.org/tools/index.en.htm
18
+ #
19
+ # This has been integrated into PDF::Writer because as yet there has been
20
+ # no response to emails asking for my extensions to be integrated and a
21
+ # RubyGem package to be made available.
22
+ class PDF::Writer::Graphics::ImageInfo
23
+ # Image Format Constants
24
+ module Formats
25
+ OTHER = "OTHER"
26
+ GIF = "GIF" # CompuServe GIF87a and GIF89a images.
27
+ PNG = "PNG" # Portable Network Graphics, PNG
28
+ JPEG = "JPEG" # JPEG
29
+ BMP = "BMP" # Windows or OS/2 Bitmaps
30
+ PPM = "PPM" # PPM is like PBM, PGM, & XV
31
+ PBM = "PBM"
32
+ PGM = "PGM"
33
+ # XV = "XV" # Not supported
34
+ TIFF = "TIFF" # TIFF formats
35
+ XBM = "XBM" # X Bitmap
36
+ XPM = "XPM" # X Pixmap
37
+ PSD = "PSD" # PhotoShop
38
+ PCX = "PCX" # PCX Bitmap
39
+ SWF = "SWF" # Flash
40
+ end
41
+ Type = Formats
42
+
43
+ class << self
44
+ def formats
45
+ Formats.constants
46
+ end
47
+ alias :type_list :formats
48
+ end
49
+
50
+ JPEG_SOF_BLOCKS = %W(\xc0 \xc1 \xc2 \xc3 \xc5 \xc6 \xc7 \xc9 \xca \xcb \xcd \xce \xcf)
51
+ JPEG_APP_BLOCKS = %W(\xe0 \xe1 \xe2 \xe3 \xe4 \xe5 \xe6 \xe7 \xe8 \xe9 \xea \xeb \xec \xed \xee \xef)
52
+
53
+ # Receive image & make size. argument is image String or IO
54
+ def initialize(data, format = nil)
55
+ @data = data.dup rescue data
56
+ @info = {}
57
+
58
+ if @data.kind_of?(IO)
59
+ @top = @data.read(128)
60
+ @data.seek(0, 0)
61
+ # Define Singleton-method definition to IO (byte, offset)
62
+ def @data.read_o(length = 1, offset = nil)
63
+ self.seek(offset, 0) if offset
64
+ ret = self.read(length)
65
+ raise "cannot read!!" unless ret
66
+ ret
67
+ end
68
+ elsif @data.is_a?(String)
69
+ @top = @data[0, 128]
70
+ # Define Singleton-method definition to String (byte, offset)
71
+ @data.extend(PDF::Writer::OffsetReader)
72
+ else
73
+ raise "argument class error!! #{data.type}"
74
+ end
75
+
76
+ if format.nil?
77
+ @format = discover_format
78
+ else
79
+ match = false
80
+ Formats.constants.each { |t| match = true if format == t }
81
+ raise("format is failed. #{format}\n") unless match
82
+ @format = format
83
+ end
84
+
85
+ __send__("measure_#@format".intern) unless @format == Formats::OTHER
86
+
87
+ @data = data.dup
88
+ end
89
+
90
+ attr_reader :format
91
+ alias :get_type :format
92
+ attr_reader :height
93
+ alias :get_height :height
94
+ attr_reader :width
95
+ alias :get_width width
96
+
97
+ attr_reader :bits
98
+ attr_reader :channels
99
+
100
+ attr_reader :info
101
+
102
+ def discover_format
103
+ if @top =~ %r{^GIF8[79]a}
104
+ Formats::GIF
105
+ elsif @top[0, 3] == "\xff\xd8\xff"
106
+ Formats::JPEG
107
+ elsif @top[0, 8] == "\x89PNG\x0d\x0a\x1a\x0a"
108
+ Formats::PNG
109
+ elsif @top[0, 3] == "FWS"
110
+ Formats::SWF
111
+ elsif @top[0, 4] == "8BPS"
112
+ Formats::PSD
113
+ elsif @top[0, 2] == 'BM'
114
+ Formats::BMP
115
+ elsif @top[0, 4] == "MM\x00\x2a"
116
+ Formats::TIFF
117
+ elsif @top[0, 4] == "II\x2a\x00"
118
+ Formats::TIFF
119
+ elsif @top[0, 12] == "\x00\x00\x00\x0c\x6a\x50\x20\x20\x0d\x0a\x87\x0a"
120
+ Formats::JP2
121
+ elsif @top =~ %r{^P[1-7]}
122
+ Formats::PPM
123
+ elsif @top =~ %r{\#define\s+\S+\s+\d+}
124
+ Formats::XBM
125
+ elsif @top =~ %r{/\* XPM \*/}
126
+ Formats::XPM
127
+ elsif @top[0] == 10
128
+ Formats::PCX
129
+ else
130
+ Formats::OTHER # might be WBMP
131
+ end
132
+ end
133
+ private :discover_format
134
+
135
+ def measure_GIF
136
+ @data.read_o(6) # Skip GIF8.a
137
+ @width, @height, @bits = @data.read_o(5).unpack('vvC')
138
+ if @bits & 0x80 == 0x80
139
+ @bits = (@bits & 0x07) + 1
140
+ else
141
+ @bits = 0
142
+ end
143
+ @channels = 3
144
+ end
145
+ private :measure_GIF
146
+
147
+ def measure_PNG
148
+ @data.read_o(12)
149
+ raise "This file is not PNG." unless @data.read_o(4) == "IHDR"
150
+ # The file information is in the IHDR section.
151
+ # Offset Bytes Meaning
152
+ # 0 4 Width
153
+ # 5 4 Height
154
+ # 9 1 Bit Depth
155
+ # 10 1 Compression Method
156
+ # 11 1 Filter Method
157
+ # 12 1 Interlace Method
158
+ ihdr = @data.read_o(13).unpack("NNCCCCC")
159
+ @width = ihdr[0]
160
+ @height = ihdr[1]
161
+ @bits = ihdr[2]
162
+ @info[:color_type] = ihdr[3]
163
+ @info[:compression_method] = ihdr[4]
164
+ @info[:filter_method] = ihdr[5]
165
+ @info[:interlace_method] = ihdr[6]
166
+
167
+
168
+ end
169
+ private :measure_PNG
170
+
171
+ def measure_JPEG
172
+ c_marker = "\xff" # Section marker.
173
+ @data.read_o(2) # Skip the first two bytes of JPEG identifier.
174
+ loop do
175
+ marker, code, length = @data.read_o(4).unpack('aan')
176
+ raise "JPEG marker not found!" if marker != c_marker
177
+
178
+ if JPEG_SOF_BLOCKS.include?(code)
179
+ @bits, @height, @width, @channels = @data.read_o(6).unpack("CnnC")
180
+ break
181
+ end
182
+
183
+ buffer = @data.read_o(length - 2)
184
+
185
+ if JPEG_APP_BLOCKS.include?(code)
186
+ @info["APP#{code.to_i - 0xe0}"] = buffer
187
+ end
188
+ end
189
+ end
190
+ private :measure_JPEG
191
+
192
+ def measure_BMP
193
+ # Skip the first 14 bytes of the image.
194
+ @data.read_o(14)
195
+ # Up to the next 16 bytes will be used.
196
+ dim = @data.read_o(16)
197
+
198
+ # Get the "size" of the image from the next four bytes.
199
+ size = dim.unpack("V").first # <- UNPACK RETURNS ARRAY, SO GET FIRST ELEMENT
200
+
201
+ if size == 12
202
+ @width, @height, @bits = dim.unpack("x4vvx3C")
203
+ elsif size > 12 and (size <= 64 or size == 108)
204
+ @width, @height, @bits = dim.unpack("x4VVv")
205
+ end
206
+ end
207
+ private :measure_BMP
208
+
209
+ def measure_PPM
210
+ header = @data.read_o(1024)
211
+ header.gsub!(/^\#[^\n\r]*/m, "")
212
+ md = %r{^(P[1-6])\s+?(\d+)\s+?(\d+)}mo.match(header)
213
+
214
+ @width = md.captures[1]
215
+ @height = md.captures[2]
216
+
217
+ case md.captures[0]
218
+ when "P1", "P4"
219
+ @format = "PBM"
220
+ when "P2", "P5"
221
+ @format = "PGM"
222
+ when "P3", "P6"
223
+ @format = "PPM"
224
+ # when "P7"
225
+ # @format = "XV"
226
+ # header =~ /IMGINFO:(\d+)x(\d+)/m
227
+ # width = $1.to_i; height = $2.to_i
228
+ end
229
+ end
230
+ private :measure_PPM
231
+
232
+ alias :measure_PGM :measure_PPM
233
+ private :measure_PGM
234
+ alias :measure_PBM :measure_PPM
235
+ private :measure_PBM
236
+
237
+ XBM_DIMENSIONS_RE = %r{^\#define\s*\S*\s*(\d+)\s*\n\#define\s*\S*\s*(\d+)}mi
238
+ def measure_XBM
239
+ md = XBM_DIMENSIONS_RE.match(@data.read_o(1024))
240
+
241
+ @width = md.captures[0].to_i
242
+ @height = md.captures[1].to_i
243
+ end
244
+ private :measure_XBM
245
+
246
+ XPM_DIMENSIONS_RE = %r<"\s*(\d+)\s+(\d+)(\s+\d+\s+\d+){1,2}\s*">m
247
+ def measure_XPM
248
+ while line = @data.read_o(1024)
249
+ md = XPM_DIMENSIONS_RE.match(line)
250
+ if md
251
+ @width = md.captures[0].to_i
252
+ @height = md.captures[1].to_i
253
+ break
254
+ end
255
+ end
256
+ end
257
+ private :measure_XPM
258
+
259
+ def measure_PSD
260
+ @width, @height = @data.read_o(26).unpack("x14NN")
261
+ end
262
+ private :measure_PSD
263
+
264
+ def measure_PCX
265
+ header = @data.read_o(128)
266
+ head_part = header.unpack('C4S4')
267
+ @width = head_part[6] - head_part[4] + 1
268
+ @height = head_part[7] - head_part[5] + 1
269
+ end
270
+ private :measure_PCX
271
+
272
+ def measure_SWF
273
+ header = @data.read_o(9)
274
+ raise "This file is not SWF." unless header.unpack('a3')[0] == 'FWS'
275
+
276
+ bits = Integer("0b#{header.unpack('@8B5')}")
277
+ header << @data.read_o(bits * 4 / 8 + 1)
278
+
279
+ str = *(header.unpack("@8B#{5 + bits * 4}"))
280
+ last = 5
281
+ x_min = Integer("0b#{str[last, bits]}")
282
+ x_max = Integer("0b#{str[(last + bits), bits]}")
283
+ y_min = Integer("0b#{str[(last + (2 * bits)), bits]}")
284
+ y_max = Integer("0b#{str[(last + (3 * bits)), bits]}")
285
+ @width = (x_max - x_min) / 20
286
+ @height = (y_max - y_min) / 20
287
+ end
288
+ private :measure_SWF
289
+
290
+ # The same as SWF, except that the original data is compressed with
291
+ # Zlib. Disabled for now.
292
+ def measure_SWC
293
+ end
294
+ private :measure_SWC
295
+
296
+ def measure_TIFF
297
+ # 'v' little-endian
298
+ # 'n' default to big-endian
299
+ endian = (@data.read_o(4) =~ /II\x2a\x00/o) ? 'v' : 'n'
300
+
301
+ packspec = [
302
+ nil, # nothing (shouldn't happen)
303
+ 'C', # BYTE (8-bit unsigned integer)
304
+ nil, # ASCII
305
+ endian, # SHORT (16-bit unsigned integer)
306
+ endian.upcase, # LONG (32-bit unsigned integer)
307
+ nil, # RATIONAL
308
+ 'c', # SBYTE (8-bit signed integer)
309
+ nil, # UNDEFINED
310
+ endian, # SSHORT (16-bit unsigned integer)
311
+ endian.upcase, # SLONG (32-bit unsigned integer)
312
+ ]
313
+
314
+ # Find the IFD location.
315
+ ifd_addr = *(@data.read_o(4).unpack(endian.upcase))
316
+ # Get the number of entries in the IFD.
317
+ ifd = @data.read_o(2, ifd_addr)
318
+ num_dirent = *(ifd.unpack(endian)) # Make it useful
319
+ ifd_addr += 2
320
+ num_dirent = ifd_addr + (num_dirent * 12) # Calc. maximum offset of IFD
321
+
322
+ loop do
323
+ break if @width and @height
324
+
325
+ ifd = @data.read_o(12, ifd_addr) # Get directory entry.
326
+ break if ifd.nil? or ifd_addr > num_dirent
327
+ ifd_addr += 12
328
+
329
+ tag = *(ifd.unpack(endian)) # ...decode its tag
330
+ type = *(ifd[2, 2].unpack(endian)) # ... and data type
331
+
332
+ # Check the type for sanity.
333
+ next if type > packspec.size or packspec[type].nil?
334
+
335
+ case tag
336
+ when 0x0100, 0xa002 # width
337
+ @width = *(ifd[8, 4].unpack(packspec[type]))
338
+ when 0x0101, 0xa003 # height
339
+ @height = *(ifd[8, 4].unpack(packspec[type]))
340
+ end
341
+ end
342
+ end
343
+ private :measure_TIFF
344
+ end
345
+
346
+ if __FILE__ == $0
347
+ require 'pdf/writer'
348
+ require 'pdf/writer/graphics'
349
+
350
+ print "Image Formats: #{PDF::Writer::Graphics::ImageInfo.formats.inspect}\n"
351
+
352
+ Dir.glob("*").each do |file|
353
+ print "#{file} (string)\n"
354
+ open(file, "rb") do |fh|
355
+ image = PDF::Writer::Graphics::ImageInfo.new(fh.read)
356
+ print <<-EOF
357
+ Format : #{image.format}
358
+ Width : #{image.width.inspect}
359
+ Height : #{image.height.inspect}
360
+ Bits : #{image.bits.inspect}
361
+ Channels: #{image.channels.inspect}
362
+ EOF
363
+ end
364
+ end
365
+ end