]> source.dussan.org Git - redmine.git/commitdiff
pdf: fix empty page attached when exporting (#13632)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 30 Sep 2013 10:16:16 +0000 (10:16 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Mon, 30 Sep 2013 10:16:16 +0000 (10:16 +0000)
Contributed by Jun NAITOH.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@12189 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/plugins/rfpdf/lib/tcpdf.rb

index 22e1d2c25667dbab60db6412c71b6e3d43063356..d754eb89152fda0a40827584a2435232a370feca 100644 (file)
@@ -2431,7 +2431,7 @@ class TCPDF
                out('1 0 obj');
                out('<</Type /Pages');
                kids='/Kids [';
-               0.upto(nb) do |i|
+               0.upto(nb - 1) do |i|
                        kids<<(3+2*i).to_s + ' 0 R ';
                end
                out(kids + ']');
@@ -3103,7 +3103,7 @@ class TCPDF
                # is a stream object that contains the definition of the CMap
                # (PDF Reference 1.3 chap. 5.9)
                newobj();
-               out('<</Length 383>>');
+               out('<</Length 345>>')
                out('stream');
                out('/CIDInit /ProcSet findresource begin');
                out('12 dict begin');