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

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


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

New commits:
commit 871564f39f98b863fef8155d00f68eda58949821
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 57fad0a254d363d6003f7376a46a8111489d4ad1
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