[poppler] 2 commits - poppler/PDFDoc.cc test/pdf-fullrewrite.cc

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Sep 26 09:31:58 PDT 2009


 poppler/PDFDoc.cc       |    8 +++++++-
 test/pdf-fullrewrite.cc |    1 +
 2 files changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 04b232d48930af9bc614d7fef47f79ce247713a4
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Sep 26 18:30:41 2009 +0200

    Write the Info into the trailer dict if there is one
    
    Bug 24091

diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index b61a8e4..8d85230 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -848,7 +848,7 @@ void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr,
   obj1.initString(new GooString((const char*)digest, 16));
 
   //create ID array
-  Object obj2,obj3,obj4;
+  Object obj2,obj3,obj4,obj5;
   obj2.initArray(xref);
 
   if (incrUpdate) {
@@ -881,6 +881,12 @@ void PDFDoc::writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr,
     obj1.initInt(xref->getLastXRefPos());
     trailerDict->set("Prev", &obj1);
   }
+  
+  xref->getDocInfoNF(&obj5);
+  if (!obj5.isNull()) {
+    trailerDict->set("Info", &obj5);
+  }
+  
   outStr->printf( "trailer\r\n");
   writeDictionnary(trailerDict, outStr);
   outStr->printf( "\r\nstartxref\r\n");
commit 343e4f9aceb935eb393ad94bbef4dbb1b1a450ee
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sat Sep 26 18:28:40 2009 +0200

    Plug leak

diff --git a/test/pdf-fullrewrite.cc b/test/pdf-fullrewrite.cc
index b782bc4..89511f0 100644
--- a/test/pdf-fullrewrite.cc
+++ b/test/pdf-fullrewrite.cc
@@ -41,4 +41,5 @@ int main (int argc, char *argv[])
 
   delete doc;
   delete globalParams;
+  delete outputName;
 }


More information about the poppler mailing list