[ANN] PDF::Writer 1.1.0

Whew. The problem with making certain types of API changes is that once
you start, you don't want to stop. I am pleased to finally release
PDF::Writer 1.1.0, which as promised both breaks and fixes drawing and
text angles; angles are now expressed in terms of counter-clockwise
directions, which is the common direction recognised by most vector
graphics programs, including the SVG standard. In addition to these
changes—which are not warned—there are two API changes to text methods
which PDF::Writer tries to correct for and warn against; these changes
will be made permanent with no warning for PDF::Writer 2.0 when it is
released.

Only one bug against PDF::Writer has been filed so far, and that
regarded a known problem in the ZLib extension included with Ruby and
the installation of the PDF::Writer 1.0.1 gem (the first usable gem of
PDF::Writer) on Windows. The newest gem resolves this, but it may appear
again in the future until Ruby 1.8.3 has been released.

Also new is the PDF::Writer website on RubyForge (see below) and a new
graphical look to go with it.

= What is PDF::Writer for Ruby?
It provides the ability to create PDF documents using only native Ruby
libraries. There are several demo programs available in the demo/
directory. The canonical documentation for PDF::Writer is "manual.pdf",
which can be generated using bin/techbook (just "techbook" for RubyGem
users) and the manual file "manual.pwd".

Homepage:: http://ruby-pdf.rubyforge.org/pdf-writer/
Download:: http://rubyforge.org/frs/?group_id=81&release_id=2417
Copyright:: 2003—2005, Austin Ziegler

This software is based on Adobe's PDF Reference, Fifth Edition, version
1.6. This and earlier editions are available from Adobe's PDF developer
website[1].

== LICENCE NOTES
PDF::Writer is generally available under an MIT-style licence with few
restrictions, but there are subtle restrictions on portions of the
library, and there are patents for which some rights have been granted
by Adobe. Please read the file LICENCE[2] for more information.

== Requirements and Installation
PDF::Writer requires Ruby 1.8.2 or better, color-tools 1.0.0[3] or
better, and Transaction::Simple 1.3.0[4] or better.

Once these packages are installed, PDF::Writer can be installed with:

  % ruby setup.rb

Alternatively, you can use the RubyGems version of PDF::Writer available
as pdf-writer-1.1.0.gem from the usual sources. The gem knows its
dependencies on Transaction::Simple and color-tools and offers to
install them.

== Demo Programs
For the first time, the demo programs are available as a separately
downloadable package.

If PDF::Writer has been installed with RubyGems, then the demos will
need to be run explicitly referencing RubyGems:

  % ruby -rubygems chunkybacon.rb

== Changes for PDF::Writer 1.1.0: June 29, 2005
  NOTE: The first two changes are INCOMPATIBLE with previous versions of
  PDF::Writer. If you find that your text is showing up at odd angles,
  negate the value. That is, if you have 90 as your angle, use -90 (or
  270) as your angle and it will work like it used to.

* Axis transformations in PDF::Writer::Graphics have been fixed.
* Text axis transformation in PDF::Writer#add_text has been fixed.
* Changed #text_width and #text_line_width so that the text value is the
  first parameter and the size parameter is second, and is optional. The code
  warns about it now, but it will break in PDF::Writer 2.0.
* Changed #add_text and #add_text_wrap so that the text parameter is before
  the now-optional size parameter. The code warns about it now, but it will
  break in PDF::Writer 2.0.
* Added #transform_matrix.
* Fixed compression. NOTE: Compression must be set early in the documentation
  process, or only some items will be compressed in the document. The various
  #save_as methods have been changed to reflect this fact.
* Enabled the placement of encoding differences dictionaries in the resulting
  PDF document. This change should be considered experimental.
* Added TTF licence checking. The embedding of a file not licenced for
  inclusion in a document will continue, but a warning will be output to
  standard error. This code has been gakked from FPDF (http://www.fpdf.org).
* Properly supporting symbolic font flags now.
* Added support and documentation for a separately downloadable demo package.
* Expanded the installation documentation.
* Added the ability to make images clickable links with any of the three
  image insertion methods.

-austin
1: http://partners.adobe.com/public/developer/pdf/index_reference.html
2: http://ruby-pdf.rubyforge.org/pdf-writer/licence.html
3: http://rubyforge.org/frs/?group_id=295&release_id=2130
4: http://rubyforge.org/frs/?group_id=81&release_id=2127

···

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca

Hi Austin,

I have two minor errors to report (on Win XP Home SP2, using ruby182-15.exe one-click):

1. While installing, when I do "ruby pre-setup.rb" I get:

Couldn't build Ri documentation
wrong number of arguments (1 for 0)

2. When I run the demo app chunkybacon.rb I get:

C:\extract\_ruby\pdf-writer-1.1.0\demo>ruby chunkybacon.rb
c:/ruby/lib/ruby/site_ruby/1.8/pdf/writer/graphics.rb:668:in `image': Unsupported Image Type (RuntimeError)
        from chunkybacon.rb:31
C:\extract\_ruby\pdf-writer-1.1.0\demo>

I am not sure if this second one is truly an error in the code, it code a wrong setup on my machine.

Thank you for this wonderful library! Is it possible to use it for closed source commercial use?
-- shanko

···

Austin Ziegler <halostatue@gmail.com> wrote:

<snip>
Only one bug against PDF::Writer has been filed so far, and that
regarded a known problem in the ZLib extension included with Ruby and
the installation of the PDF::Writer 1.0.1 gem (the first usable gem of
PDF::Writer) on Windows. The newest gem resolves this, but it may appear
again in the future until Ruby 1.8.3 has been released.

== Demo Programs
For the first time, the demo programs are available as a separately
downloadable package.

If PDF::Writer has been installed with RubyGems, then the demos will
need to be run explicitly referencing RubyGems:

% ruby -rubygems chunkybacon.rb

== Changes for PDF::Writer 1.1.0: June 29, 2005
NOTE: The first two changes are INCOMPATIBLE with previous versions of
PDF::Writer. If you find that your text is showing up at odd angles,
negate the value. That is, if you have 90 as your angle, use -90 (or
270) as your angle and it will work like it used to.

* Axis transformations in PDF::Writer::Graphics have been fixed.
* Text axis transformation in PDF::Writer#add_text has been fixed.
* Changed #text_width and #text_line_width so that the text value is the
first parameter and the size parameter is second, and is optional. The code
warns about it now, but it will break in PDF::Writer 2.0.
* Changed #add_text and #add_text_wrap so that the text parameter is before
the now-optional size parameter. The code warns about it now, but it will
break in PDF::Writer 2.0.
* Added #transform_matrix.
* Fixed compression. NOTE: Compression must be set early in the documentation
process, or only some items will be compressed in the document. The various
#save_as methods have been changed to reflect this fact.
* Enabled the placement of encoding differences dictionaries in the resulting
PDF document. This change should be considered experimental.
* Added TTF licence checking. The embedding of a file not licenced for
inclusion in a document will continue, but a warning will be output to
standard error. This code has been gakked from FPDF (http://www.fpdf.org).
* Properly supporting symbolic font flags now.
* Added support and documentation for a separately downloadable demo package.
* Expanded the installation documentation.
* Added the ability to make images clickable links with any of the three
image insertion methods.

-austin
1: http://partners.adobe.com/public/developer/pdf/index_reference.html
2: http://ruby-pdf.rubyforge.org/pdf-writer/licence.html
3: http://rubyforge.org/frs/?group_id=295&release_id=2130
4: http://rubyforge.org/frs/?group_id=81&release_id=2127
--
Austin Ziegler * halostatue@gmail.com
* Alternate: austin@halostatue.ca

---------------------------------
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football

Two minor issues have been brought to my attention.

1. The ri documentation does not automatically build with the setup
install. This is
   not a critical error.
2. More critically, the images/ directory in the .tar.gz are corrupted
and neither the
   manual nor the demo programs will build. Also, the demo package download does
   not (at this point) include the images; this will be fixed soon.
The images, in the
   meantime, can be downloaded separately from
       http://ruby-pdf.rubyforge.org/pdf-writer/images-1.1.0.tar.gz

My apologies for these issues.

-austin

···

On 6/29/05, Austin Ziegler <halostatue@gmail.com> wrote:

Only one bug against PDF::Writer has been filed so far, and that
regarded a known problem in the ZLib extension included with Ruby and
the installation of the PDF::Writer 1.0.1 gem (the first usable gem of
PDF::Writer) on Windows. The newest gem resolves this, but it may appear
again in the future until Ruby 1.8.3 has been released.

--
Austin Ziegler * halostatue@gmail.com
               * Alternate: austin@halostatue.ca