Every repository with this icon (
Every repository with this icon (
CHANGELOG
Please be sure to read through these changes carefully when migrating between versions of Prawn, and let us know if you run into any problems or find something missing from these notes.
Prawn 0.6.3
General Information
Thanks again to our vigilant users for quickly spotting bugs in the 0.6 codebase.
Bug fixes since 0.6.2
In prawn-core:
- Fixed a bug in annotations that prevented proper references from being generated [#58] (jlh)
- Prawn::Reference on_encode() method removed, this should fix marshaling issue in transactions. [#56] (Brad Ediger)
- Document extensions now work in inherited classes [#57] (Gregory Brown)
In prawn-layout:
- Cursor is now placed directly at the bottom of a table after generation, as in Prawn 0.5.x (Gregory Brown)
In prawn-format:
- Fixed internal links in basic formatting example [#11] (jlh)
- width_of() and height_of() now should work as they did in 0.5.x [#12,#13] (Gregory Brown)
As a result of fixes in core, Prawn::Format should work in classes inherited from Prawn::Document, and links should now work again.
Prawn 0.6.2 : 2009-11-13
General Information
With this release, we welcome Daniel Nelson as a core committer to Prawn. Though most of the heavy lifting on Prawn is primarily done by our casual contributors, we need a couple people upstream to keep things organized and provide us with a bus-factor greater than 1. Based on his recent work and expected things to come, we’re glad to have Daniel join us.
Updated core committer list: Gregory Brown, Brad Ediger, James Healy, Daniel Nelson (Jamis Buck has retired)
This is a bug fix release that fixes issues with some of the new features in Prawn 0.6. It should not introduce any incompatibilities with Prawn 0.6.1, so please upgrade immediately.
Bugfixes since 0.6.1
All changes were to prawn-core
- Stamped content no longer cut off when too close to document boundaries (Daniel Nelson)
- Reopening pages no longer creates an invalid content length, so page numbering should now work (Brad Ediger)
- Updated some copyright info (Brad Ediger)
- Include procedure sets on every page for PDF <= 1.3 compatibility. (Brad Ediger)
- Updated stamp example (Daniel Nelson)
- create_stamp now is able to work prior to page creation (Daniel Nelson)
NOTE: There is still one known issue that is somewhat severe that we have not resolved. Currently transactions will not work when using TTF fonts in your document. We’re aware of the fact that this means that transactions are currently not m17n-friendly, and we will absolutely fix this before Prawn 0.7. If we get this issue fixed soon, we’ll get another 0.6 maintenance release out shortly after we get it resolved.
Prawn 0.6.1 : 2009-11-10
This is a major release that includes many new features, fixes, and overall changes. Prawn 0.6 users should look to upgrade to Prawn 0.6 as soon as possible, as Prawn 0.5 is no longer officially supported.
General Information
Brad Ediger’s prawn-security extension is now an official part of Prawn, and has been added as a dependency to the prawn metagem. This adds support for encryption, password protection, and permissions to Prawn.
Example:
require "prawn"
require "prawn/security"
Prawn::Document.generate("hello_foo.pdf") do
text "Hello, world!"
encrypt_document :user_password => 'foo', :owner_password => 'bar',
:permissions => { :print_document => false }
end
Changed since 0.5.1:
In prawn-core:
- Improved low-level handling of PDF objects via ObjectStore. May break extensions that rely on certain low level features, see source for details. (Brad Ediger)
- Using text() with both :at and :align now raises an error. These two options never worked together, but may cause unexpected errors in code that was previously failing silently. (Gregory Brown)
- text_box() now returns the portion of the text that did not fit in the box. [#2] ( (Sam Livingston-Gray)
- Stretchy bounding boxes now calculate height as the largest distance the box has been stretched to, rather than the last evaluated distance from the top of the box. See the bounding box examples for clarification. (Gregory Brown)
- bounding_box() now returns the generated bounding box. This is only really useful for checking things like the final height of a stretchy box, and isn’t meant to be used as alternative API to the block form. (Gregory Brown)
No user facing API changes were made in prawn-format or prawn-layout.
Features / Fixes / Cleanup
In prawn-core:
Users will appreciate the following items:
- Added support for transactional rendering via Document#transaction and Document#rollback (Brad Ediger)
- Added Document#group() to group contents within the same column or page (Brad Ediger)
- Added for stroke dashing. See the dash(), undash() and dashed?() methods on Document (Daniel Nelson)
- Added a :margin option for Document#new and Document#start_new_page, can be specified as a single value or CSS shorthand. [#18] (Henrik Nyh)
- Added transparency support for PDF Vector graphics, see Prawn::Graphics::Transparency. (Daniel Nelson)
- Added “stamps” which allow for repeatable elements via XObjects. See Prawn::Stamp. (Daniel Nelson)
- Added stroke cap and join styles, see Graphics::CapStyle and Graphics::JoinStyle (Daniel Nelson)
- Added Document#move_cursor_to() to allow for moving the y position relative to the bottom boundary. (Gregory Brown)
- Added Document#number_pages() for “Page k of n” style page numbering templates. (Gregory Brown)
- Updated some outdated documentation
Those extending Prawn will want to know about these changes as well:
- Fixed PDF format identifier to conform to spec (Brad Ediger)
- Added a simple system for defining extensions to Prawn::Document via Document.extensions (James Edward Gray II)
- Fixed a bug in NameTree insertion when nodes are already in insertion order [#48] (JeanLuc)
- Added ByteString to denote literal byte streams (Brad Ediger)
In prawn-layout:
- Cells should no longer have a gap between their border and background color (corny)
- Added AndrewO’s prawn-grid examples to prawn-layout. (Brad Ediger)
- Added :row_gutter and :column_gutter options to Grid. (Jordan Byron)
In prawn-format
- Fixed an encoding bug (Jose Espinal)
- Refactored to use new extension system in prawn-core (James Edward Gray II)
In prawn-security
- Birthday!
Prawn 0.5.1 : 2009-09-22
This is a major release that includes many new features, fixes, and overall changes. Prawn 0.4 users should look to upgrade to Prawn 0.5 as soon as possible, as Prawn 0.4 is no longer officially supported. This also goes for Prawn 0.5.0.1, which was mainly released as an unstable developer preview.
General Information
Note that our bug trackers have moved from lighthouse, and are now on Github:
core: http://github.com/sandal/prawn/issues
layout: http://github.com/sandal/prawn-layout/issues
format: http://github.com/sandal/prawn-format/issues
Also note that Jamis Buck has retired as a Prawn core developer, so the new home for prawn-format is:
http://github.com/sandal/prawn-format
Prawn has been restructured so that the prawn gem is just a meta-gem that pulls in prawn-core, prawn-layout, and prawn-format. This change is backwards compatible, so unless you plan to mix and match gem versions for the various packages in a way other than what we recommend, you don’t need to make any changes to the way you load Prawn.
Changed since 0.4.1:
In prawn-core:
- Document::Font#width_of becomes Document#width_of (Jamis Buck)
- padded_box, lazy_bounding_box, header, and footer moved to prawn/layout
- Raise Errors::NotOnPage if font is called without a current page (Brad Ediger)
- Prawn::Document.text_options removed.
- :spacing is now :leading for Document#text()
- Font#normalize_encoding now non-destructive, use Font#normalize_encoding!() to modify in place.
In prawn-layout:
Note that this version is not compatible with Prawn 0.4.×. To use the new prawn-layout code you must upgrade to Prawn 0.5.1. However, the API should be mostly backwards compatible.
No user facing API changes were made in prawn-format
Features / Fixes / Cleanup
In prawn-core:
- Unsupported image types now throw a better error [James Healy]
- Added Document#min_version to internals, to allow extensions to set a minimum PDF version other than the one Prawn provides. (James Healy)
- Added Document#column_box to allow flowing text from column to column (Paul Ostazeski)
- Added Document#indent to allow temporary resetting x position to allow for indentation. (Jeremy Friesen)
- Added support for document metadata properties (John Weathers)
- Many improvements to documentation (Mikel Lindsaar)
- Output a newline after %EOF to make Ghostscript and ImageMagick happy (Brad Ediger)
- A whole bunch of refactorings and cleanup (Petrik de Heus)
- Minor documentation fix (Brandon Hauff)
In prawn-layout:
- As previously mentioned, prawn-layout now includes padded_box, lazy_bounding_box, header, and footer
- Hash syntax for cells now supports any key that Cell.new supports.
- Merged prawn-grid, a tool for doing grid based layouts. (Andrew O’Brien)
- Fix a bug involving colspan width calculations (Jesús GS)
- Allow font_style to be set on individual cells, and properly handle font size changes: (Sean Kirby)
- Add License files to repository
- Other minor cleanups (Łukasz Piestrzeniewicz)
In prawn-format
- External links now supported (Phil Morris)







