README in pdf-reader-0.5.1 vs README in pdf-reader-0.6
- old
+ new
@@ -27,10 +27,16 @@
For a full list of the supported callback methods and a description of when they
will be called, refer to PDF::Reader::Content. See the code examples below for a
way to print a list of all the callbacks generated by a file to STDOUT.
+= Text Encoding
+
+Internally, text can be stored inside a PDF in various encodings, including
+zingbats, win-1252, mac roman and a form of Unicode. To avoid confusion, all
+text will be converted to UTF-8 before it is passed back from PDF::Reader.
+
= Exceptions
There are two key exceptions that you will need to watch out for when processing a
PDF file:
@@ -45,10 +51,16 @@
= Maintainers
- Peter Jones <mailto:pjones@pmade.com>
- James Healy <mailto:jimmy@deefa.com>
+= Mailing List
+
+Any questions or feedback should be sent to the PDF::Reader google group.
+
+http://groups.google.com/group/pdf-reader
+
= Examples
The easiest way to explain how this works in practice is to show some examples.
== Page Counter
@@ -115,10 +127,14 @@
# there's a few text callbacks, so make sure we process them all
alias :super_show_text :show_text
alias :move_to_next_line_and_show_text :show_text
alias :set_spacing_next_line_show_text :show_text
+ def show_text_with_positioning(*params)
+ params = params.first
+ params.each { |str| show_text(str) if str.kind_of?(String)}
+ end
end
context "My generated PDF" do
specify "should have the correct text on 2 pages" do
@@ -181,9 +197,15 @@
end
receiver = ISBNReceiver.new
PDF::Reader.file("somefile.pdf", receiver)
+= Known Limitations
+
+The order of the callbacks is unpredicable, and is dependent on the internal
+layout of the file, not the order objects are displayed to the user. As a
+consequence of this it is highly unlikely that text will be completely in
+order.
= Resources
- PDF::Reader Homepage: http://software.pmade.com/pdfreader
- PDF::Reader Rubyforge Page: http://rubyforge.org/projects/pdf-reader/