eventioz-pdf-writer 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/ChangeLog +113 -0
- data/Demo-README +43 -0
- data/Gemfile +4 -0
- data/LICENCE +131 -0
- data/README +33 -0
- data/Rakefile +1 -0
- data/Release-Announcement +87 -0
- data/bin/techbook +24 -0
- data/bugs/first_page_margins.rb +28 -0
- data/bugs/page_numbering_simple.rb +14 -0
- data/bugs/page_numbering_stop_and_start.rb +21 -0
- data/demo/chunkybacon.rb +36 -0
- data/demo/code.rb +71 -0
- data/demo/colornames.rb +47 -0
- data/demo/demo.rb +73 -0
- data/demo/gettysburg.rb +66 -0
- data/demo/hello.rb +26 -0
- data/demo/individual-i.rb +89 -0
- data/demo/pac.rb +70 -0
- data/demo/qr-language.rb +580 -0
- data/demo/qr-library.rb +380 -0
- data/images/bluesmoke.jpg +0 -0
- data/images/chunkybacon.jpg +0 -0
- data/images/chunkybacon.png +0 -0
- data/lib/pdf/charts.rb +13 -0
- data/lib/pdf/charts/stddev.rb +431 -0
- data/lib/pdf/core_ext/mutex.rb +11 -0
- data/lib/pdf/math.rb +108 -0
- data/lib/pdf/quickref.rb +333 -0
- data/lib/pdf/simpletable.rb +948 -0
- data/lib/pdf/techbook.rb +905 -0
- data/lib/pdf/writer.rb +2734 -0
- data/lib/pdf/writer/arc4.rb +63 -0
- data/lib/pdf/writer/fontmetrics.rb +203 -0
- data/lib/pdf/writer/fonts/Courier-Bold.afm +342 -0
- data/lib/pdf/writer/fonts/Courier-BoldOblique.afm +342 -0
- data/lib/pdf/writer/fonts/Courier-Oblique.afm +342 -0
- data/lib/pdf/writer/fonts/Courier.afm +342 -0
- data/lib/pdf/writer/fonts/Helvetica-Bold.afm +2827 -0
- data/lib/pdf/writer/fonts/Helvetica-BoldOblique.afm +2827 -0
- data/lib/pdf/writer/fonts/Helvetica-Oblique.afm +3051 -0
- data/lib/pdf/writer/fonts/Helvetica.afm +3051 -0
- data/lib/pdf/writer/fonts/MustRead.html +19 -0
- data/lib/pdf/writer/fonts/Symbol.afm +213 -0
- data/lib/pdf/writer/fonts/Times-Bold.afm +2588 -0
- data/lib/pdf/writer/fonts/Times-BoldItalic.afm +2384 -0
- data/lib/pdf/writer/fonts/Times-Italic.afm +2667 -0
- data/lib/pdf/writer/fonts/Times-Roman.afm +2419 -0
- data/lib/pdf/writer/fonts/ZapfDingbats.afm +225 -0
- data/lib/pdf/writer/graphics.rb +817 -0
- data/lib/pdf/writer/graphics/imageinfo.rb +365 -0
- data/lib/pdf/writer/lang.rb +43 -0
- data/lib/pdf/writer/lang/en.rb +99 -0
- data/lib/pdf/writer/object.rb +23 -0
- data/lib/pdf/writer/object/action.rb +35 -0
- data/lib/pdf/writer/object/annotation.rb +42 -0
- data/lib/pdf/writer/object/catalog.rb +39 -0
- data/lib/pdf/writer/object/contents.rb +70 -0
- data/lib/pdf/writer/object/destination.rb +40 -0
- data/lib/pdf/writer/object/encryption.rb +53 -0
- data/lib/pdf/writer/object/font.rb +72 -0
- data/lib/pdf/writer/object/fontdescriptor.rb +34 -0
- data/lib/pdf/writer/object/fontencoding.rb +40 -0
- data/lib/pdf/writer/object/image.rb +304 -0
- data/lib/pdf/writer/object/info.rb +51 -0
- data/lib/pdf/writer/object/outline.rb +30 -0
- data/lib/pdf/writer/object/outlines.rb +30 -0
- data/lib/pdf/writer/object/page.rb +195 -0
- data/lib/pdf/writer/object/pages.rb +115 -0
- data/lib/pdf/writer/object/procset.rb +46 -0
- data/lib/pdf/writer/object/viewerpreferences.rb +74 -0
- data/lib/pdf/writer/ohash.rb +58 -0
- data/lib/pdf/writer/oreader.rb +25 -0
- data/lib/pdf/writer/state.rb +48 -0
- data/lib/pdf/writer/strokestyle.rb +138 -0
- data/manual.pwd +5965 -0
- data/metaconfig +13 -0
- data/pdf-writer.gemspec +28 -0
- data/pre-setup.rb +56 -0
- data/setup.rb +1366 -0
- data/test/helper.rb +4 -0
- data/test/test_image_info.rb +16 -0
- data/test/test_page_numbering.rb +13 -0
- metadata +196 -0
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MGU0OGM1ODE5NDUxYmZiYmU0NzYyYTFhNGI5NTIwYzUwMjdlNWM1YQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MjIyMTYzOTU3Y2EwNTgxMjU5MDBlNGMxNjMyYmY2ZGYxNDc5ZTc5Mw==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTM0N2NhMDk5ZmI4NDhhOWY1MmY3MTcwY2JhODFiYmI3ODQxNjMwODc5OGQw
|
10
|
+
MWRmYjA3MGUxYTY5NzQ5NTU5MWRmODJlODkxNDgxYzlmNzI2ZjVhY2I3MGFh
|
11
|
+
MDg0NDI0NTU5ZWY5N2U2ODdiM2U2NjcyN2UxODc4NThiYTM5YWE=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YzlmNGE2YzcyZDUwMDQ0NWFjMzMxYWYwYTYyNzg4NTczNjZjOTIyNmMxZTYw
|
14
|
+
NzM0ZDlmNGYyZGYxNGExYjBhYTUwN2RjM2VjYjJmODhiODVhOGY1YjMyMmYx
|
15
|
+
MTRhMTQ1ZjhkNzU2NjgxNDZiNGYxOGU5NjYwYzE2MjAzNWRiYWM=
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
Gemfile.lock
|
data/ChangeLog
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
= PDF::Writer Change Log
|
2
|
+
|
3
|
+
== PDF::Writer 1.2.1: May 13, 2009
|
4
|
+
* Ruby 1.9 compatibility.
|
5
|
+
|
6
|
+
== PDF::Writer 1.1.3: September 9, 2005
|
7
|
+
* Fixed #2356 submitted by Matthew Thill. Margins set by the various margins
|
8
|
+
methods would behave incorrectly.
|
9
|
+
|
10
|
+
== PDF::Writer 1.1.2: August 25, 2005
|
11
|
+
* Thomas Gantner <thomas.gantner@gmx.net> found a problem with the
|
12
|
+
interpretation of the placement of page numbers and provided a patch.
|
13
|
+
Thanks!
|
14
|
+
* Thomas also reported a problem with an inability to place page numbering on
|
15
|
+
the first page of a document, as well as strange results from not providing
|
16
|
+
a starting page number. This has been fixed. Also reported as #2204.
|
17
|
+
* Modified PDF::Writer requirements to require color-tools version 1.3.0 or
|
18
|
+
later. This necessitates that Color constants be changed to Color::RGB
|
19
|
+
constants.
|
20
|
+
* Updated supporting library documentation to include information on
|
21
|
+
color-tools version 1.3.
|
22
|
+
* Fixed a bug with Graphics#transform_matrix truncating one of the transform
|
23
|
+
parameters.
|
24
|
+
* Applied a fix to PDF::SimpleTable submitted by Mike Leddy in #2129 on the
|
25
|
+
RubyForge tracker.
|
26
|
+
* Applied a partial fix for PNG with index-transparency provided by Marc
|
27
|
+
Vleugels in #2245 on the RubyForge tracker. NOTE: This does not solve the
|
28
|
+
transparency problem; at this point, PDF::Writer cannot be said to support
|
29
|
+
PNGs with transparency. This will be fixed in a later version of
|
30
|
+
PDF::Writer.
|
31
|
+
|
32
|
+
== PDF::Writer 1.1.1: July 1, 2005
|
33
|
+
* Fixed the packaging process; the .tar.gz files will no longer corrupt the
|
34
|
+
images.
|
35
|
+
* Added the images and the manual (both raw and generated) to the demo
|
36
|
+
package.
|
37
|
+
|
38
|
+
== PDF::Writer 1.1.0: June 29, 2005
|
39
|
+
NOTE: The first two changes are INCOMPATIBLE with previous versions of
|
40
|
+
PDF::Writer. If you find that your text is showing up at odd angles, negate
|
41
|
+
the value. That is, if you have 90 as your angle, use -90 (or 270) as your
|
42
|
+
angle and it will work like it used to.
|
43
|
+
|
44
|
+
* Axis transformations in PDF::Writer::Graphics have been fixed.
|
45
|
+
* Text axis transformation in PDF::Writer#add_text has been fixed.
|
46
|
+
* Changed #text_width and #text_line_width so that the text value is the
|
47
|
+
first parameter and the size parameter is second, and is optional. The code
|
48
|
+
warns about it now, but it will break in PDF::Writer 2.0.
|
49
|
+
* Changed #add_text and #add_text_wrap so that the text parameter is before
|
50
|
+
the now-optional size parameter. The code warns about it now, but it will
|
51
|
+
break in PDF::Writer 2.0.
|
52
|
+
* Added #transform_matrix.
|
53
|
+
* Fixed compression. NOTE: Compression must be set early in the documentation
|
54
|
+
process, or only some items will be compressed in the document. The various
|
55
|
+
#save_as methods have been changed to reflect this fact.
|
56
|
+
* Enabled the placement of encoding differences dictionaries in the resulting
|
57
|
+
PDF document. This change should be considered experimental.
|
58
|
+
* Added TTF licence checking. The embedding of a file not licenced for
|
59
|
+
inclusion in a document will continue, but a warning will be output to
|
60
|
+
standard error. This code has been gakked from FPDF (http://www.fpdf.org).
|
61
|
+
* Properly supporting symbolic font flags now.
|
62
|
+
* Added support and documentation for a separately downloadable demo package.
|
63
|
+
* Expanded the installation documentation.
|
64
|
+
* Added the ability to make images clickable links with any of the three
|
65
|
+
image insertion methods.
|
66
|
+
|
67
|
+
== PDF::Writer 1.0.1: June 13, 2005
|
68
|
+
* Fixed a few minor gem issues.
|
69
|
+
* Renamed bin/manual to bin/techbook.
|
70
|
+
* Fixed the manual.pwd locator for the default install.
|
71
|
+
|
72
|
+
== PDF::Writer 1.0.0: June 12, 2005
|
73
|
+
* Integrated ezwriter.rb functionality with writer.rb.
|
74
|
+
* Factored out some functionality into modules and classes.
|
75
|
+
* Added CMYK colour support to JPEG images.
|
76
|
+
* Uses Color::CMYK (from color-utils) to provide CMYK support to drawing
|
77
|
+
capabilities.
|
78
|
+
* Simplified the image API significantly.
|
79
|
+
* Modified image support to properly handle full image flipping.
|
80
|
+
* Fixed several multi-column issues.
|
81
|
+
* Fixed a bug where new pages automatically started by overflowing text may
|
82
|
+
have resulted in writing the first line of text above the top margin. This
|
83
|
+
may need further testing and probably causes problems with column handling.
|
84
|
+
* Fixed some page numbering issues.
|
85
|
+
* Added several demos, including Ruby Quick Reference Sheets.
|
86
|
+
* Scrubbed the API.
|
87
|
+
* Updated the documentation.
|
88
|
+
* Changed installer to setup.rb 3.3.1-modified.
|
89
|
+
* Applied an image resize patch; the image will be resized manually before
|
90
|
+
checking to see if a new page is required. Thanks to Leslie Hensley.
|
91
|
+
* Fixed a bug where entities would generate the width specified for the
|
92
|
+
component characters, not the represented characters.
|
93
|
+
* Fixed a performance bug. Thanks again to Leslie Hensley.
|
94
|
+
|
95
|
+
== PDF::Writer 0.1.2: CVS only
|
96
|
+
* Fixed a problem with the improper reading of character numbers from .afm
|
97
|
+
files that are not default files. Other font issues remain but will be fixed
|
98
|
+
at a later date.
|
99
|
+
|
100
|
+
== PDF::Writer 0.1.0: September, 2003
|
101
|
+
* Initial technology preview.
|
102
|
+
|
103
|
+
#--
|
104
|
+
# PDF::Writer for Ruby.
|
105
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
106
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
107
|
+
#
|
108
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
109
|
+
# for full licensing information.
|
110
|
+
#
|
111
|
+
# $Id$
|
112
|
+
#++
|
113
|
+
# vim: sts=2 sw=2 ts=4 et ai tw=77
|
data/Demo-README
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
= PDF::Writer Demo Programs
|
2
|
+
This package is a collection of demo programs for PDF::Writer for Ruby version
|
3
|
+
1.1.3, intended for users of the RubyGems package, because the demo programs
|
4
|
+
are not easily accessible. This package includes:
|
5
|
+
|
6
|
+
manual.pwd:: The text version of the PDF manual.
|
7
|
+
manual.pdf:: A pregenerated version of the PDF manual.
|
8
|
+
chunkybacon.rb:: A simple program to insert three images and two lines of
|
9
|
+
text
|
10
|
+
code.rb:: An example of a custom text formatting tag. Note that this
|
11
|
+
tag doesn't *quite* work as it should because of an as-yet
|
12
|
+
unidentified bug in PDF::Writer's tag handling code.
|
13
|
+
colornames.rb:: A program to generate colour names known to the color-tools
|
14
|
+
package.
|
15
|
+
demo.rb:: Generates gradients and coloured text.
|
16
|
+
gettysburg.rb:: Creates a PDF with the Gettysburg Address wrapped in a
|
17
|
+
rounded rectangle.
|
18
|
+
hello.rb:: A simple "Hello, Ruby" application for PDF::Writer.
|
19
|
+
individual-i.rb:: An example of drawing a vector graphic with PDF::Writer,
|
20
|
+
translated from the Individual I website's EPS version of
|
21
|
+
the logo.
|
22
|
+
pac.rb:: A vector graphics image based on a famous video game.
|
23
|
+
qr-language.rb:: Generates a quick reference sheet for the Ruby language.
|
24
|
+
Based on Ryan Davis's quick reference sheet.
|
25
|
+
qr-library.rb:: Generates a quick reference sheet for the Ruby standard
|
26
|
+
library. Based on Ryan Davis's quick reference sheet.
|
27
|
+
|
28
|
+
If PDF::Writer has been installed with RubyGems, then the demos will need to
|
29
|
+
be run explicitly referencing RubyGems:
|
30
|
+
|
31
|
+
% ruby -rubygems chunkybacon.rb
|
32
|
+
|
33
|
+
#--
|
34
|
+
# PDF::Writer for Ruby.
|
35
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
36
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
37
|
+
#
|
38
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
39
|
+
# for full licensing information.
|
40
|
+
#
|
41
|
+
# $Id$
|
42
|
+
#++
|
43
|
+
# vim: sts=2 sw=2 ts=4 et ai tw=77
|
data/Gemfile
ADDED
data/LICENCE
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
= PDF::Writer for Ruby
|
2
|
+
Homepage:: http://rubyforge.org/projects/ruby-pdf/
|
3
|
+
Copyright:: Copyright � 2003�2005 Austin Ziegler.
|
4
|
+
Summary:: MIT-style
|
5
|
+
|
6
|
+
This project had a change of maintainers in November, 2007.
|
7
|
+
New developments are now copyrighted by Gregory Brown and Michael Milner,
|
8
|
+
unless otherwise noted.
|
9
|
+
|
10
|
+
---
|
11
|
+
|
12
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
13
|
+
of this software and associated documentation files (the "Software"), to deal
|
14
|
+
in the Software without restriction, including without limitation the rights
|
15
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
16
|
+
copies of the Software, and to permit persons to whom the Software is
|
17
|
+
furnished to do so, subject to the following conditions:
|
18
|
+
|
19
|
+
* The names of its contributors may not be used to endorse or promote
|
20
|
+
products derived from this software without specific prior written
|
21
|
+
permission.
|
22
|
+
|
23
|
+
The above copyright notice and this permission notice shall be included in
|
24
|
+
all copies or substantial portions of the Software.
|
25
|
+
|
26
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
27
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
28
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
29
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
30
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
31
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
32
|
+
SOFTWARE.
|
33
|
+
|
34
|
+
== Works Included Under Other Licences
|
35
|
+
=== pdf/writer/graphics/imageinfo.rb
|
36
|
+
PDF::Writer includes a derivative of Keisuke Minami's ImageSize library,
|
37
|
+
which can be found at rubycgi[http://www.rubycgi.org/tools/index.en.htm].
|
38
|
+
This work�and only this or other named works�may be treated as under the Ruby
|
39
|
+
licensing scheme (GPL 2 or later, Ruby's licence) as well as the overall
|
40
|
+
PDF::Writer licence.
|
41
|
+
|
42
|
+
=== Ruby Quick Reference Sheets
|
43
|
+
PDF::Writer has demo programs that will create Quick Reference cards for
|
44
|
+
Ruby. The content and output of these programs is copyright 2003�2005 Ryan
|
45
|
+
Davis and is licensed under the Creative Commons
|
46
|
+
Attribution-NonCommercial-ShareAlike[http://creativecommons.org/licenses/by-nc-sa/2.0/]
|
47
|
+
licence.
|
48
|
+
|
49
|
+
=== Images from "Why's (Poignant) Guide to Ruby"
|
50
|
+
One of the demo programs uses images originally from "Why's (Poignant) Guide
|
51
|
+
to Ruby"[http://poignantguide.net/ruby], with permission. These immages are
|
52
|
+
released under the Creative Commons
|
53
|
+
Attributions ShareAlike[http://creativecommons.org/licenses/by-sa/2.0/]
|
54
|
+
licence.
|
55
|
+
|
56
|
+
=== Adobe PostScript AFM Files
|
57
|
+
pdf/writer/fonts/MustRead.html and the 14 PostScript(R) AFM files it
|
58
|
+
accompanies may be used, copied, and distributed for any purpose and without
|
59
|
+
charge, with or without modification, provided that all copyright notices are
|
60
|
+
retained; that the AFM files are not distributed without this file; that all
|
61
|
+
modifications to this file or any of the AFM files are prominently noted in
|
62
|
+
the modified file(s); and that this paragraph is not modified. Adobe Systems
|
63
|
+
has no responsibility or obligation to support the use of the AFM files.
|
64
|
+
|
65
|
+
== Other Credits
|
66
|
+
=== PDF::Writer
|
67
|
+
PDF::Writer is based originally on the R & OS PDF class for
|
68
|
+
PHP[http://www.ros.co.nz/pdf/], which is released as public domain.
|
69
|
+
|
70
|
+
=== Standard Deviation Chart
|
71
|
+
The standard deviation chart (pdf/charts/stddev.rb) class is based on
|
72
|
+
work by Cris Ewing[mailto:cewing@u.washington.edu] of the University of
|
73
|
+
Washington School of Medicine, originally created for the R & OS PDF class
|
74
|
+
for PHP. He has graciously donated the code for PDF::Writer for Ruby.
|
75
|
+
|
76
|
+
=== bluesmoke.jpg
|
77
|
+
The logo image for PDF::Writer, bluesmoke.jpg, is modified from a picture
|
78
|
+
taken by Matthew "TheSaint" Bowden[mailto:matthewbowden@gmail.com] and is
|
79
|
+
available on the stock.xchng(R) at
|
80
|
+
<http://www.sxc.hu/browse.phtml?f=view&id=275430>. Many thanks to Matthew for
|
81
|
+
the use of this image.
|
82
|
+
|
83
|
+
== Patents Covering the Adobe PDF Format
|
84
|
+
=== ADOBE PATENTS
|
85
|
+
This software is based on Adobe's PDF Reference, Third Edition, version 1.6.
|
86
|
+
There may be limitations on the use of this library based on patent
|
87
|
+
restrictions from Adobe. See bewlow for more information.
|
88
|
+
|
89
|
+
=== UNISYS LZW PATENT
|
90
|
+
This software does not fully conform to the Adobe PDF specification because
|
91
|
+
no support for LZW is included in this software. At the time of original
|
92
|
+
development of this software (2003), the Unisys LZW patent was still in
|
93
|
+
effect outside of the United States. This will be modified in a future
|
94
|
+
version of this software.
|
95
|
+
|
96
|
+
== Patent Clarification Notice: Reading and Writing PDF Files
|
97
|
+
Adobe has a number of patents covering technology that is disclosed in the
|
98
|
+
Portable Document Format (PDF) Specification, version 1.6 and later, as
|
99
|
+
documented in PDF Reference and associated Technical Notes (the
|
100
|
+
"Specification". Adobe desires to promote the use of PDF for information
|
101
|
+
interchange among diverse products and applications.
|
102
|
+
|
103
|
+
Accordingly, the following patents are licensed on a royalty-free, non-
|
104
|
+
exclusive basis for the term of each patent and for the sole purpose of
|
105
|
+
developing software that produces, consumes, and interprets PDF files that
|
106
|
+
are compliant with the Specification:
|
107
|
+
|
108
|
+
U.S. Patent Numbers: 5,634,064; 5,737,599; 5,781,785; 5,819,301; 6,028,583;
|
109
|
+
6,289,364; 6,421,460
|
110
|
+
|
111
|
+
In addition, the following patent is licensed on a royalty-free, non-
|
112
|
+
exclusive basis for its term and for the sole purpose of developing software
|
113
|
+
that produces PDF files that are compliant with the Specification
|
114
|
+
(specifically excluding, however, software that consumes and/or interprets
|
115
|
+
PDF files):
|
116
|
+
|
117
|
+
U.S. Patent Numbers: 5,860,074
|
118
|
+
|
119
|
+
The above licenses are limited to only those rights required to implement the
|
120
|
+
Specification and no others. That is to say, Adobe grants only those rights
|
121
|
+
in the above patent(s) necessarily practiced to implement the Specification,
|
122
|
+
and does not grant any rights not required to implement the Specification.
|
123
|
+
The licenses do not grant the right to practice any patent covering other
|
124
|
+
technologies, such as implementation techniques that are not explicitly
|
125
|
+
disclosed in the Specification, nor does it allow the use of any patented
|
126
|
+
feature for any purpose other than as set forth in the applicable license
|
127
|
+
grant. Adobe has other patents in various fields, none of which are hereby
|
128
|
+
licensed.
|
129
|
+
|
130
|
+
$Id$
|
131
|
+
# vim: sts=2 sw=2 ts=4 et ai tw=77
|
data/README
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
= PDF::Writer for Ruby
|
2
|
+
This library provides the ability to create PDF documents using only native
|
3
|
+
Ruby libraries. There are several demo programs available in the demo/
|
4
|
+
directory. The canonical documentation for PDF::Writer is "manual.pdf", which
|
5
|
+
can be generated using bin/techbook (just "techbook" for RubyGem users) and
|
6
|
+
the manual file "manual.pwd".
|
7
|
+
|
8
|
+
Homepage:: http://rubyforge.org/projects/ruby-pdf/
|
9
|
+
Copyright:: 2003�2005, Austin Ziegler
|
10
|
+
|
11
|
+
This software is based on Adobe's PDF Reference, Fifth Edition, version 1.6.
|
12
|
+
This and earlier editions are available from Adobe's PDF developer
|
13
|
+
website[http://partners.adobe.com/public/developer/pdf/index_reference.html].
|
14
|
+
|
15
|
+
== LICENCE NOTES
|
16
|
+
Please read the file LICENCE for licensing restrictions on this library, as
|
17
|
+
well as important patent considerations.
|
18
|
+
|
19
|
+
== Requirements
|
20
|
+
PDF::Writer requires Ruby 1.8.2 or better, Color 1.4.0 or better, and
|
21
|
+
Transaction::Simple 1.3.0 or better.
|
22
|
+
|
23
|
+
#--
|
24
|
+
# PDF::Writer for Ruby.
|
25
|
+
# http://rubyforge.org/projects/ruby-pdf/
|
26
|
+
# Copyright 2003 - 2005 Austin Ziegler.
|
27
|
+
#
|
28
|
+
# Licensed under a MIT-style licence. See LICENCE in the main distribution
|
29
|
+
# for full licensing information.
|
30
|
+
#
|
31
|
+
# $Id$
|
32
|
+
#++
|
33
|
+
# vim: sts=2 sw=2 ts=4 et ai tw=77
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,87 @@
|
|
1
|
+
I am pleased to announce the release of PDF::Writer 1.1.3. This release
|
2
|
+
fixes margin setting bugs. I again have to thank the wonderful users of
|
3
|
+
PDF::Writer:
|
4
|
+
|
5
|
+
* Matthew Thill found a bug with #margins_cm, #margins_mm, and
|
6
|
+
#margins_in. It was reported as #2356 and has been fixed.
|
7
|
+
|
8
|
+
= What is PDF::Writer for Ruby?
|
9
|
+
It provides the ability to create PDF documents using only native Ruby
|
10
|
+
libraries. There are several demo programs available in the demo/
|
11
|
+
directory. The canonical documentation for PDF::Writer is the 95-page
|
12
|
+
manual "manual.pdf", which can be generated using bin/techbook (just
|
13
|
+
"techbook" for RubyGem users) and the manual file "manual.pwd".
|
14
|
+
|
15
|
+
Homepage:: http://ruby-pdf.rubyforge.org/pdf-writer/
|
16
|
+
Download:: http://rubyforge.org/frs/?group_id=81
|
17
|
+
Copyright:: 2003�2005, Austin Ziegler
|
18
|
+
|
19
|
+
This software is based on Adobe's PDF Reference, Fifth Edition, version
|
20
|
+
1.6. This and earlier editions are available from Adobe's PDF developer
|
21
|
+
website[1].
|
22
|
+
|
23
|
+
== LICENCE NOTES
|
24
|
+
PDF::Writer is generally available under an MIT-style licence with few
|
25
|
+
restrictions, but there are subtle restrictions on portions of the
|
26
|
+
library, and there are patents for which some rights have been granted
|
27
|
+
by Adobe. Please read the file LICENCE[2] for more information.
|
28
|
+
|
29
|
+
== Requirements and Installation
|
30
|
+
PDF::Writer requires Ruby 1.8.2 or better, color-tools 1.3.0[3] or
|
31
|
+
better, and Transaction::Simple 1.3.0[4] or better.
|
32
|
+
|
33
|
+
Once these packages are installed, PDF::Writer can be installed with:
|
34
|
+
|
35
|
+
% ruby setup.rb
|
36
|
+
|
37
|
+
Alternatively, you can use the RubyGems version of PDF::Writer available
|
38
|
+
as pdf-writer-1.1.3.gem from the usual sources. The gem knows its
|
39
|
+
dependencies on Transaction::Simple and color-tools and offers to
|
40
|
+
install them.
|
41
|
+
|
42
|
+
== Demo Programs
|
43
|
+
The demo programs are available as a separately downloadable package. If
|
44
|
+
PDF::Writer has been installed with RubyGems, then the demos will need to be
|
45
|
+
run explicitly referencing RubyGems:
|
46
|
+
|
47
|
+
% ruby -rubygems chunkybacon.rb
|
48
|
+
|
49
|
+
== Whet your appetite:
|
50
|
+
|
51
|
+
# This is demo/hello.rb.
|
52
|
+
require 'pdf/writer'
|
53
|
+
|
54
|
+
pdf = PDF::Writer.new
|
55
|
+
pdf.select_font "Times-Roman"
|
56
|
+
pdf.text "Hello, Ruby.", :font_size => 72, :justification => :center
|
57
|
+
|
58
|
+
pdf.save_as("hello.pdf")
|
59
|
+
|
60
|
+
# This is demo/chunkybacon.rb.
|
61
|
+
require 'pdf/writer'
|
62
|
+
|
63
|
+
pdf = PDF::Writer.new
|
64
|
+
pdf.select_font "Times-Roman"
|
65
|
+
pdf.text "Chunky Bacon!!", :font_size => 72, :justification => :center
|
66
|
+
|
67
|
+
i0 = pdf.image "../images/chunkybacon.jpg", :resize => 0.75
|
68
|
+
i1 = pdf.image "../images/chunkybacon.png", :justification => :center,
|
69
|
+
:resize => 0.75
|
70
|
+
pdf.image i0, :justification => :right, :resize => 0.75
|
71
|
+
|
72
|
+
pdf.text "Chunky Bacon!!", :font_size => 72, :justification => :center
|
73
|
+
|
74
|
+
pdf.save_as("chunkybacon.pdf")
|
75
|
+
|
76
|
+
== PDF::Writer 1.1.3: September 9, 2005
|
77
|
+
* Fixed #2356 submitted by Matthew Thill. Margins set by the various margins
|
78
|
+
methods would behave incorrectly.
|
79
|
+
|
80
|
+
-austin
|
81
|
+
1: http://partners.adobe.com/public/developer/pdf/index_reference.html
|
82
|
+
2: http://ruby-pdf.rubyforge.org/pdf-writer/licence.html
|
83
|
+
3: http://rubyforge.org/frs/?group_id=295
|
84
|
+
4: http://rubyforge.org/frs/?group_id=81
|
85
|
+
--
|
86
|
+
Austin Ziegler * halostatue@gmail.com
|
87
|
+
* Alternate: austin@halostatue.ca
|
data/bin/techbook
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
#! /usr/bin/env ruby
|
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
|
+
# $Id$
|
11
|
+
#++
|
12
|
+
begin
|
13
|
+
require 'pdf/techbook'
|
14
|
+
rescue LoadError => le
|
15
|
+
if le.message =~ %r{pdf/techbook$}
|
16
|
+
root = File.dirname(File.dirname(File.expand_path(__FILE__)))
|
17
|
+
$LOAD_PATH.unshift(File.join(root, "lib"))
|
18
|
+
require 'pdf/techbook'
|
19
|
+
else
|
20
|
+
raise
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
PDF::TechBook.run(ARGV)
|