<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -258,5 +258,4 @@ desc &quot;Release the latest version.&quot;
 task :release =&gt; [ :verify_rubyforge, :verify_gmail, :release_files,
   :publish_news, :email_announcement, :docs ]
 
-desc &quot;Build everything.&quot;
-task :default =&gt; [ :tar, :gem, :demotar, :docs ]
+task :default =&gt; [ :test ]</diff>
      <filename>Rakefile</filename>
    </modified>
    <modified>
      <diff>@@ -2155,11 +2155,7 @@ class PDF::Writer
     #
     # Each time page numbers are started, a new page number scheme will be
     # started. The scheme number will be returned.
-  def start_page_numbering(x, y, size, pos = nil, pattern = nil, starting = nil)  
-    if starting
-      raise &quot;We have currently disabled starting values for start_page_numbering&quot; +
-            &quot; because it is buggy.&quot; 
-    end   
+  def start_page_numbering(x, y, size, pos = nil, pattern = nil, starting = nil)   
     pos     ||= :left
     pattern ||= &quot;&lt;PAGENUM&gt; of &lt;TOTALPAGENUM&gt;&quot;
     starting  ||= 1
@@ -2268,6 +2264,7 @@ class PDF::Writer
         end
 
         status  = nil
+        delta   = pattern = pos = x = y = size = nil 
         pattern = pos = x = y = size = nil
 
         @pageset.each_with_index do |page, index|
@@ -2277,6 +2274,11 @@ class PDF::Writer
           if info
             if info[:start]
               status = true
+              if info[:starting] 
+                delta = info[:starting] - index 
+              else 
+                delta = index 
+              end  
 
               pattern = info[:pattern]
               pos     = info[:pos]
@@ -2296,8 +2298,8 @@ class PDF::Writer
 
           if status
               # Add the page numbering to this page
-            num   = index + 1
-            total = total_pages
+            num   = index + delta.to_i 
+            total = total_pages + num - index
             patt  = pattern.gsub(/&lt;PAGENUM&gt;/, num.to_s).gsub(/&lt;TOTALPAGENUM&gt;/, total.to_s)
             reopen_object(page.contents.first)
 </diff>
      <filename>lib/pdf/writer.rb</filename>
    </modified>
    <modified>
      <diff>@@ -10,16 +10,4 @@ describe &quot;Page Numbering&quot; do
     @pdf.current_page_number.should == 1
   end   
   
-  it &quot;should not raise an error when starting value isn't set&quot; do
-     assert_nothing_raised do
-       @pdf.start_page_numbering(0,0,12, nil, nil)                   
-     end
-  end 
-  
-  it &quot;should raise an error when starting is set (disabled due to bugginess&quot; do
-    assert_raises(RuntimeError) do
-      @pdf.start_page_numbering(0,0,12,nil,nil,1)
-    end
-  end
-  
 end
\ No newline at end of file</diff>
      <filename>test/test_page_numbering.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>41bc74f4732526fb25cf891d6b287ee47e810890</id>
    </parent>
  </parents>
  <author>
    <name>sandal</name>
    <email>sandal@8d9166c5-6811-0410-8782-ea71c07d3dbd</email>
  </author>
  <url>http://github.com/metaskills/pdf-writer/commit/a9f9efcd56b43724abb61baa0187f84b1cdcacd7</url>
  <id>a9f9efcd56b43724abb61baa0187f84b1cdcacd7</id>
  <committed-date>2007-12-13T10:16:25-08:00</committed-date>
  <authored-date>2007-12-13T10:16:25-08:00</authored-date>
  <message>Fixes for trunk too</message>
  <tree>69e0423f35e7e660125b2c6689f32c2a7cac7bd1</tree>
  <committer>
    <name>sandal</name>
    <email>sandal@8d9166c5-6811-0410-8782-ea71c07d3dbd</email>
  </committer>
</commit>
