[poppler] poppler/utils: pdffonts.cc, 1.3, 1.4 pdfinfo.cc, 1.3, 1.4 pdftotext.cc, 1.3, 1.4

Albert Astals Cid aacid at kemper.freedesktop.org
Fri Aug 4 15:48:11 PDT 2006


Update of /cvs/poppler/poppler/utils
In directory kemper:/tmp/cvs-serv22465/utils

Modified Files:
	pdffonts.cc pdfinfo.cc pdftotext.cc 
Log Message:
2006-08-05  Albert Astals Cid  <aacid at kde.org>

        * utils/pdftotext.cc:
        * utils/pdfinfo.cc:
        * utils/pdffonts.cc: Add the posibility of reading a file from stdin.
        Patch by Dom Lachowicz



Index: pdffonts.cc
===================================================================
RCS file: /cvs/poppler/poppler/utils/pdffonts.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pdffonts.cc	23 Jan 2006 15:40:54 -0000	1.3
+++ pdffonts.cc	4 Aug 2006 22:48:09 -0000	1.4
@@ -115,7 +115,16 @@
   } else {
     userPW = NULL;
   }
-  doc = new PDFDoc(fileName, ownerPW, userPW);
+
+  if(fileName->cmp("-") != 0) {
+      doc = new PDFDoc(fileName, ownerPW, userPW);
+  } else {
+      Object obj;
+
+      obj.initNull();
+      doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+  }
+
   if (userPW) {
     delete userPW;
   }

Index: pdfinfo.cc
===================================================================
RCS file: /cvs/poppler/poppler/utils/pdfinfo.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pdfinfo.cc	23 Jan 2006 15:40:54 -0000	1.3
+++ pdfinfo.cc	4 Aug 2006 22:48:09 -0000	1.4
@@ -131,7 +131,16 @@
   } else {
     userPW = NULL;
   }
-  doc = new PDFDoc(fileName, ownerPW, userPW);
+
+  if(fileName->cmp("-") != 0) {
+      doc = new PDFDoc(fileName, ownerPW, userPW);
+  } else {
+      Object obj;
+
+      obj.initNull();
+      doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+  }
+
   if (userPW) {
     delete userPW;
   }

Index: pdftotext.cc
===================================================================
RCS file: /cvs/poppler/poppler/utils/pdftotext.cc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- pdftotext.cc	23 Jan 2006 15:40:54 -0000	1.3
+++ pdftotext.cc	4 Aug 2006 22:48:09 -0000	1.4
@@ -151,7 +151,16 @@
   } else {
     userPW = NULL;
   }
-  doc = new PDFDoc(fileName, ownerPW, userPW);
+
+  if(fileName->cmp("-") != 0) {
+      doc = new PDFDoc(fileName, ownerPW, userPW);
+  } else {
+      Object obj;
+
+      obj.initNull();
+      doc = new PDFDoc(new FileStream(stdin, 0, gFalse, 0, &obj), ownerPW, userPW);
+  }
+
   if (userPW) {
     delete userPW;
   }



More information about the poppler mailing list