Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Conversation

@MikeBlyth
Copy link

  • This adds a new feature formatted_columns that is similar

to text_box and formatted_box but flows across a number
of columns on the page then on to the next page.

Example usage:

p.formatted_columns(lorem*15, :columns=>2,
:size=>11, :align=>:left, :inline_format=> true)

An example is at examples/text/formatted_columns.rb

bradediger and others added 15 commits September 24, 2010 14:10
You can now pass arbitrary options inline with table cells:

    pdf.table([[ {:content => 'hello', :font_style => :bold } ]])
This was inflating the assertion count and increasing test time because
it would run the matcher block every time match? was called.
This reverses 8e0de9a, which I probably had a good reason for at the
time but for some reason didn't document. The behavior introduced by
that commit broke table cells inside stretchy bounds, because the
absolute location of the y-position depends on when the bounds are
stretched (prawnpdf#153).

Introduced a spec to cover the new behavior and prevent regressions.
Closes prawnpdf#153.
Previously, we would use the reference bounds (margin box if the parent
bounds were stretchy) to determine whether to flow a cell that would not
fit on the current page to the next page. This incorrectly handled the
case where the parent bounds were stretchy but we were at the top. That
has been specced and fixed.
* draw_text should draw exactly the string it is given, even if it is
  composed entirely of spaces
* text may collapse empty strings (due to line wrapping), but if it
  writes anything to the page, it should be blank.

Closes prawnpdf#132.
Check, before rendering the table, to be sure that we can draw the first
body row (excluding any header). If we can't, start the entire table on
the next page.

Closes prawnpdf#152.
Prawn::Images::{PNG,JPG} are now responsible for building the PDF
objects that they represent. This will allow for greater modularity --
adding more image types as needed, and as a stepping stone to table
image cell support. The protocol involves two methods on
Prawn::Images::*:

* #build_pdf_object(document): Build a PDF XObject representing the
  image. Return a Reference to that object.

* #min_pdf_version: The minimum PDF version (as a Float) required to
  support the image's features (such as alpha transparency or 16-bit
  color). This method is optional; it is guarded by respond_to?.
Since '.' is no longer in the $LOAD_PATH in Ruby 1.9.2, we have to run
an expand_path over the resulting path from File.dirname(__FILE__).

Closes prawnpdf#154.
formatted_text_boxes to make a multi-column layout
that is automatically filled (right column to left) and
continued to subsequent pages as needed.
* Block form is available via the Prawn::Document#text_rendering_mode()
  method
* Inline for is available as the :mode option to the
  Prawn::Document#text() method
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants