Permalink
Browse files

Initial import from svn

Original repo was:
svn checkout http://pdf-labels.rubyforge.org/svn/
  • Loading branch information...
0 parents commit d24d5035eacaad5910c100434d0173c033d1c5fc @smathieu smathieu committed Jul 13, 2011
Showing with 41,389 additions and 0 deletions.
  1. +3 −0 .gitignore
  2. +19 −0 History.txt
  3. +38 −0 LICENCE
  4. +119 −0 Manifest.txt
  5. +73 −0 README.txt
  6. +30 −0 Rakefile
  7. +275 −0 fonts/Code128.afm
  8. BIN fonts/Code128.pfb
  9. BIN fonts/Code128.ttf
  10. +275 −0 fonts/Code2of5interleaved.afm
  11. BIN fonts/Code2of5interleaved.pfb
  12. BIN fonts/Code2of5interleaved.ttf
  13. +275 −0 fonts/Code3de9.afm
  14. BIN fonts/Code3de9.pfb
  15. BIN fonts/Code3de9.ttf
  16. +275 −0 fonts/CodeDatamatrix.afm
  17. BIN fonts/CodeDatamatrix.pfb
  18. BIN fonts/CodeDatamatrix.ttf
  19. +275 −0 fonts/CodeEAN13.afm
  20. BIN fonts/CodeEAN13.pfb
  21. BIN fonts/CodeEAN13.ttf
  22. +275 −0 fonts/CodePDF417.afm
  23. BIN fonts/CodePDF417.pfb
  24. BIN fonts/CodePDF417.ttf
  25. +2 −0 init.rb
  26. +12 −0 lib/pdf/label.rb
  27. +11 −0 lib/pdf/label/alias.rb
  28. +276 −0 lib/pdf/label/batch.rb
  29. +38 −0 lib/pdf/label/glabel_template.rb
  30. +55 −0 lib/pdf/label/label.rb
  31. +15 −0 lib/pdf/label/layout.rb
  32. +52 −0 lib/pdf/label/length_node.rb
  33. +26 −0 lib/pdf/label/markup.rb
  34. +39 −0 lib/pdf/label/template.rb
  35. +222 −0 templates/avery-iso-templates.xml
  36. +21 −0 templates/avery-other-templates.xml
  37. +599 −0 templates/avery-us-templates.xml
  38. +329 −0 templates/glabels-2.0.dtd
  39. +434 −0 templates/misc-iso-templates.xml
  40. +21 −0 templates/misc-other-templates.xml
  41. +183 −0 templates/misc-us-templates.xml
  42. +37 −0 templates/paper-sizes.xml
  43. +197 −0 templates/zweckform-iso-templates.xml
  44. +149 −0 test/test_pdf_label_page.rb
  45. +87 −0 vendor/color.rb
  46. +182 −0 vendor/color/cmyk.rb
  47. +27 −0 vendor/color/css.rb
  48. +135 −0 vendor/color/grayscale.rb
  49. +130 −0 vendor/color/hsl.rb
  50. +15 −0 vendor/color/palette.rb
  51. +107 −0 vendor/color/palette/gimp.rb
  52. +180 −0 vendor/color/palette/monocontrast.rb
  53. +189 −0 vendor/color/rgb-colors.rb
  54. +311 −0 vendor/color/rgb.rb
  55. +28 −0 vendor/color/rgb/metallic.rb
  56. +78 −0 vendor/color/yiq.rb
  57. +13 −0 vendor/pdf/charts.rb
  58. +433 −0 vendor/pdf/charts/stddev.rb
  59. +135 −0 vendor/pdf/grid.rb
  60. +108 −0 vendor/pdf/math.rb
  61. +288 −0 vendor/pdf/pagenumbers.rb
  62. +331 −0 vendor/pdf/quickref.rb
  63. +947 −0 vendor/pdf/simpletable.rb
  64. +901 −0 vendor/pdf/techbook.rb
  65. +2,804 −0 vendor/pdf/writer.rb
  66. +63 −0 vendor/pdf/writer/arc4.rb
  67. +202 −0 vendor/pdf/writer/fontmetrics.rb
  68. +342 −0 vendor/pdf/writer/fonts/Courier-Bold.afm
  69. +342 −0 vendor/pdf/writer/fonts/Courier-BoldOblique.afm
  70. +342 −0 vendor/pdf/writer/fonts/Courier-Oblique.afm
  71. +342 −0 vendor/pdf/writer/fonts/Courier.afm
  72. +2,827 −0 vendor/pdf/writer/fonts/Helvetica-Bold.afm
  73. +2,827 −0 vendor/pdf/writer/fonts/Helvetica-BoldOblique.afm
  74. +3,051 −0 vendor/pdf/writer/fonts/Helvetica-Oblique.afm
  75. +3,051 −0 vendor/pdf/writer/fonts/Helvetica.afm
  76. +213 −0 vendor/pdf/writer/fonts/Symbol.afm
  77. +2,588 −0 vendor/pdf/writer/fonts/Times-Bold.afm
  78. +2,384 −0 vendor/pdf/writer/fonts/Times-BoldItalic.afm
  79. +2,667 −0 vendor/pdf/writer/fonts/Times-Italic.afm
  80. +2,419 −0 vendor/pdf/writer/fonts/Times-Roman.afm
  81. +225 −0 vendor/pdf/writer/fonts/ZapfDingbats.afm
  82. +813 −0 vendor/pdf/writer/graphics.rb
  83. +365 −0 vendor/pdf/writer/graphics/imageinfo.rb
  84. +44 −0 vendor/pdf/writer/lang.rb
  85. +104 −0 vendor/pdf/writer/lang/en.rb
  86. +23 −0 vendor/pdf/writer/object.rb
  87. +40 −0 vendor/pdf/writer/object/action.rb
  88. +42 −0 vendor/pdf/writer/object/annotation.rb
  89. +39 −0 vendor/pdf/writer/object/catalog.rb
  90. +69 −0 vendor/pdf/writer/object/contents.rb
  91. +40 −0 vendor/pdf/writer/object/destination.rb
  92. +53 −0 vendor/pdf/writer/object/encryption.rb
  93. +68 −0 vendor/pdf/writer/object/font.rb
  94. +34 −0 vendor/pdf/writer/object/fontdescriptor.rb
  95. +40 −0 vendor/pdf/writer/object/fontencoding.rb
  96. +308 −0 vendor/pdf/writer/object/image.rb
  97. +79 −0 vendor/pdf/writer/object/info.rb
  98. +30 −0 vendor/pdf/writer/object/outline.rb
  99. +30 −0 vendor/pdf/writer/object/outlines.rb
  100. +195 −0 vendor/pdf/writer/object/page.rb
  101. +115 −0 vendor/pdf/writer/object/pages.rb
  102. +46 −0 vendor/pdf/writer/object/procset.rb
  103. +74 −0 vendor/pdf/writer/object/viewerpreferences.rb
  104. +58 −0 vendor/pdf/writer/ohash.rb
  105. +25 −0 vendor/pdf/writer/oreader.rb
  106. +48 −0 vendor/pdf/writer/state.rb
  107. +140 −0 vendor/pdf/writer/strokestyle.rb
  108. +35 −0 vendor/pdf_writer_font_patch.diff
  109. +486 −0 vendor/transaction/simple.rb
  110. +146 −0 vendor/transaction/simple/group.rb
  111. +68 −0 vendor/transaction/simple/threadsafe.rb
  112. +36 −0 vendor/transaction/simple/threadsafe/group.rb
  113. +56 −0 vendor/xml/LICENSE
  114. +386 −0 vendor/xml/README
  115. +14 −0 vendor/xml/mapping.rb
  116. +571 −0 vendor/xml/mapping/base.rb
  117. +343 −0 vendor/xml/mapping/standard_nodes.rb
  118. +8 −0 vendor/xml/mapping/version.rb
  119. +354 −0 vendor/xml/xxpath.rb
@@ -0,0 +1,3 @@
+.rvmrc
+*.swp
+tags
@@ -0,0 +1,19 @@
+== 0.2.0 / 2006-04-25
+
+* First published to Rubyforge
+
+== 0.3.0 / 2007-06-23
+
+* PDFLabels library packed for Ruport and general consumption
+
+== 1.0.1 / 2007-10-17
+
+* PDFLabels xml-mapping package is wrong in the vendor directory
+
+== 2.0
+
+*
+
+== 2.0.1 / 2008-08-30
+
+* Label PDFs will not open properly if the PrintScaling attribute is set
@@ -0,0 +1,38 @@
+PDF::Labels, the compilation and the majority of the works, are copyright � 2006 Rob Kaufman and are released under an MIT-style licence, detailed below. There are other portions of PDF::Labels which are derivative works of others under other licences and Adobe holds several patents related to PDF document creation and reading.
+
+PDF::Labels for Ruby Licence
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the *Software*), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+ * The names of its contributors may not be used to endorse or promote products derived from this software without specific prior written permission.
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Works Under Other Licences
+All files in the templates/ directory
+
+PDF::Labels includes an XML schema and label discription files from the gLabels project (http://glabels.sourceforge.org). These gLabels templates are released under the LGPL licence.
+
+Patents Covering the Adobe PDF Format
+ADOBE PATENTS
+
+This software is based on Adobe�s PDF Reference, Third Edition, version 1.6. There may be limitations on the use of this library based on patent restrictions from Adobe. See below for more information.
+UNISYS LZW PATENT
+
+This software does not fully conform to the Adobe PDF specification because no support for LZW is included in this software. At the time of original development of this software (2003), the Unisys LZW patent was still in effect outside of the United States. This will be modified in a future version of this software.
+Patent Clarification Notice: Reading and Writing PDF Files
+
+Adobe has a number of patents covering technology that is disclosed in the Portable Document Format (PDF) Specification, version 1.6 and later, as documented in PDF Reference and associated Technical Notes (the �Specification�. Adobe desires to promote the use of PDF for information interchange among diverse products and applications.
+
+Accordingly, the following patents are licensed on a royalty-free, non-exclusive basis for the term of each patent and for the sole purpose of developing software that produces, consumes, and interprets PDF files that are compliant with the Specification:
+
+ * U.S. Patent Numbers: 5,634,064; 5,737,599; 5,781,785; 5,819,301; 6,028,583; 6,289,364; 6,421,460
+
+In addition, the following patent is licensed on a royalty-free, non-exclusive basis for its term and for the sole purpose of developing software that produces PDF files that are compliant with the Specification (specifically excluding, however, software that consumes and/or interprets PDF files):
+
+ * U.S. Patent Numbers: 5,860,074
+
+The above licenses are limited to only those rights required to implement the Specification and no others. That is to say, Adobe grants only those rights in the above patent(s) necessarily practiced to implement the Specification, and does not grant any rights not required to implement the Specification. The licenses do not grant the right to practice any patent covering other technologies, such as implementation techniques that are not explicitly disclosed in the Specification, nor does it allow the use of any patented feature for any purpose other than as set forth in the applicable license grant. Adobe has other patents in various fields, none of which are hereby licensed.
+
@@ -0,0 +1,119 @@
+fonts/Code128.afm
+fonts/Code128.pfb
+fonts/Code128.ttf
+fonts/Code2of5interleaved.afm
+fonts/Code2of5interleaved.pfb
+fonts/Code2of5interleaved.ttf
+fonts/Code3de9.afm
+fonts/Code3de9.pfb
+fonts/Code3de9.ttf
+fonts/CodeDatamatrix.afm
+fonts/CodeDatamatrix.pfb
+fonts/CodeDatamatrix.ttf
+fonts/CodeEAN13.afm
+fonts/CodeEAN13.pfb
+fonts/CodeEAN13.ttf
+fonts/CodePDF417.afm
+fonts/CodePDF417.pfb
+fonts/CodePDF417.ttf
+History.txt
+init.rb
+lib/pdf/label/alias.rb
+lib/pdf/label/batch.rb
+lib/pdf/label/glabel_template.rb
+lib/pdf/label/label.rb
+lib/pdf/label/layout.rb
+lib/pdf/label/length_node.rb
+lib/pdf/label/markup.rb
+lib/pdf/label/template.rb
+lib/pdf/label.rb
+LICENCE
+Manifest.txt
+pdf-labels-patch-to-r62.txt
+Rakefile
+README.txt
+templates/avery-iso-templates.xml
+templates/avery-other-templates.xml
+templates/avery-us-templates.xml
+templates/glabels-2.0.dtd
+templates/misc-iso-templates.xml
+templates/misc-other-templates.xml
+templates/misc-us-templates.xml
+templates/paper-sizes.xml
+templates/zweckform-iso-templates.xml
+test/test_pdf_label_page.rb
+vendor/color/cmyk.rb
+vendor/color/css.rb
+vendor/color/grayscale.rb
+vendor/color/hsl.rb
+vendor/color/palette/gimp.rb
+vendor/color/palette/monocontrast.rb
+vendor/color/palette.rb
+vendor/color/rgb/metallic.rb
+vendor/color/rgb-colors.rb
+vendor/color/rgb.rb
+vendor/color/yiq.rb
+vendor/color.rb
+vendor/pdf/charts/stddev.rb
+vendor/pdf/charts.rb
+vendor/pdf/grid.rb
+vendor/pdf/math.rb
+vendor/pdf/pagenumbers.rb
+vendor/pdf/quickref.rb
+vendor/pdf/simpletable.rb
+vendor/pdf/techbook.rb
+vendor/pdf/writer/arc4.rb
+vendor/pdf/writer/fontmetrics.rb
+vendor/pdf/writer/fonts/Courier-Bold.afm
+vendor/pdf/writer/fonts/Courier-BoldOblique.afm
+vendor/pdf/writer/fonts/Courier-Oblique.afm
+vendor/pdf/writer/fonts/Courier.afm
+vendor/pdf/writer/fonts/Helvetica-Bold.afm
+vendor/pdf/writer/fonts/Helvetica-BoldOblique.afm
+vendor/pdf/writer/fonts/Helvetica-Oblique.afm
+vendor/pdf/writer/fonts/Helvetica.afm
+vendor/pdf/writer/fonts/Symbol.afm
+vendor/pdf/writer/fonts/Times-Bold.afm
+vendor/pdf/writer/fonts/Times-BoldItalic.afm
+vendor/pdf/writer/fonts/Times-Italic.afm
+vendor/pdf/writer/fonts/Times-Roman.afm
+vendor/pdf/writer/fonts/ZapfDingbats.afm
+vendor/pdf/writer/graphics/imageinfo.rb
+vendor/pdf/writer/graphics.rb
+vendor/pdf/writer/lang/en.rb
+vendor/pdf/writer/lang.rb
+vendor/pdf/writer/object/action.rb
+vendor/pdf/writer/object/annotation.rb
+vendor/pdf/writer/object/catalog.rb
+vendor/pdf/writer/object/contents.rb
+vendor/pdf/writer/object/destination.rb
+vendor/pdf/writer/object/encryption.rb
+vendor/pdf/writer/object/font.rb
+vendor/pdf/writer/object/fontdescriptor.rb
+vendor/pdf/writer/object/fontencoding.rb
+vendor/pdf/writer/object/image.rb
+vendor/pdf/writer/object/info.rb
+vendor/pdf/writer/object/outline.rb
+vendor/pdf/writer/object/outlines.rb
+vendor/pdf/writer/object/page.rb
+vendor/pdf/writer/object/pages.rb
+vendor/pdf/writer/object/procset.rb
+vendor/pdf/writer/object/viewerpreferences.rb
+vendor/pdf/writer/object.rb
+vendor/pdf/writer/ohash.rb
+vendor/pdf/writer/oreader.rb
+vendor/pdf/writer/state.rb
+vendor/pdf/writer/strokestyle.rb
+vendor/pdf/writer.rb
+vendor/pdf_writer_font_patch.diff
+vendor/transaction/simple/group.rb
+vendor/transaction/simple/threadsafe/group.rb
+vendor/transaction/simple/threadsafe.rb
+vendor/transaction/simple.rb
+vendor/xml/LICENSE
+vendor/xml/mapping/base.rb
+vendor/xml/mapping/standard_nodes.rb
+vendor/xml/mapping/version.rb
+vendor/xml/mapping.rb
+vendor/xml/README
+vendor/xml/xxpath.rb
@@ -0,0 +1,73 @@
+= PdfLabels
+
+* by Rob Kaufman - http://www.lightning-tree.net
+* http://rubyforge.org/projects/pdf-labels/
+
+== DESCRIPTION:
+
+Welcome to the PDF-Labels project. Our aim is to make creating labels
+programmatically easy in Ruby. This Library builds on top of
+"PDF::Writer":http://ruby-pdf.rubyforge.org/ and uses the templates
+from "gLabels":http://glabels.sourceforge.org. What this means is
+easy, clean Ruby code to create many common label types without
+measuring the labels yourself! All of this in pure Ruby (we use the
+XML templates from gLabels, we do NOT have a dependancy on gLabels,
+nor on Gnome)
+
+== FEATURES/PROBLEMS:
+
+* Works with all gLabels supported templates for rectangular labels
+* Does not yet work for CD labels (circles)
+
+== SYNOPSIS:
+
+ p = PDFLabelPage.new("Avery 8160") # label is 2 x 10
+ #Some examples of adding labels
+ p.add_label() # should add to col 1, row 1
+ p.add_label(:position => 1) # should add col 1, row 2
+ p.add_label(:text => "Positoin 15", :position => 15) # should add col 2, row 1
+ p.add_label(:text => 'No Margin', :position => 5, :use_margin => false) #this doesn't use a margin
+ p.add_label(:position => 9, :text => "X Offset = 4, Y Offset = -6", :offset_x => 4, :offset_y => -6)
+ p.add_label(:text => "Centered", :position => 26, :justification => :center) # should add col 2, row 15
+ p.add_label(:text => "[Right justified]", :justification => :right, :position => 28)# col 2, row 14, right justified.
+ p.add_label(:position => 29) # should add col 2, row 15
+ p.add_label(:position => 8, :text => "This was added last and has a BIG font", :font_size => 18)
+
+ #If you want to see the boxes around each label (good for printing alignment samples)
+ p.draw_boxes(false, true)
+
+ #Save your PDF when your done
+ p.save_as("../label_output.pdf")
+
+== REQUIREMENTS:
+
+Currently there are no external dependencies, though a version of xml-mapping and pdf-writer (and its dependencies) are provided in vendor
+
+== INSTALL:
+
+sudo gem install pdf-labels
+
+== LICENSE:
+
+(The MIT License)
+
+Copyright (c) 2007 Rob Kaufman
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,30 @@
+# -*- ruby -*-
+
+ENV['RUBY_FLAGS'] = "-I#{%w(lib test vendor).join(File::PATH_SEPARATOR)}"
+require 'rubygems'
+require 'hoe'
+require './lib/pdf/label'
+
+#Ryan, if you want to have strong opinions thats cool, but if you want to be a prick about it, you'd better be right... and your not
+class Hoe
+ def extra_deps
+ @extra_deps.reject do |x|
+ Array(x).first == 'hoe'
+ end
+ end
+end
+
+Hoe.new('pdf-labels', Pdf::Label::VERSION) do |p|
+ p.rubyforge_name = 'pdf-labels'
+ p.author = 'Rob Kaufman'
+ p.email = 'rgkaufman@gmail.com'
+ p.summary = 'Easy label creation in Ruby through PDF::Writer and using templates from gLabels. Contains the library pdf_labels, the Rails engine LabelPageEngine and an example application FileClerk.'
+ p.description = p.paragraphs_of('README.txt', 2..5).join("\n\n")
+ p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
+ p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
+end
+
+task :clean do
+ dir = Dir.new(Dir.pwd)
+ dir.grep(/pdf$/) {|file| rm file}
+end
Oops, something went wrong.

0 comments on commit d24d503

Please sign in to comment.