[poppler] utils/HtmlOutputDev.cc utils/pdf2xml.dtd

Albert Astals Cid aacid at kemper.freedesktop.org
Mon Apr 9 10:21:40 PDT 2012


 utils/HtmlOutputDev.cc |    2 +-
 utils/pdf2xml.dtd      |    4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 1f45afde6410f03c79fcf4b66d5834079879d38f
Author: Ihar Filipau <thephilips at gmail.com>
Date:   Mon Apr 9 19:17:41 2012 +0200

    Add producer and version to xml output

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 3d8836b..cc57c91 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1192,7 +1192,7 @@ HtmlOutputDev::HtmlOutputDev(Catalog *catalogA, char *fileName, char *title,
     {
       fprintf(page, "<?xml version=\"1.0\" encoding=\"%s\"?>\n", htmlEncoding->getCString());
       fputs("<!DOCTYPE pdf2xml SYSTEM \"pdf2xml.dtd\">\n\n", page);
-      fputs("<pdf2xml>\n",page);
+      fprintf(page,"<pdf2xml producer=\"%s\" version=\"%s\">\n", PACKAGE_NAME, PACKAGE_VERSION);
     } 
     else 
     {
diff --git a/utils/pdf2xml.dtd b/utils/pdf2xml.dtd
index 389676c..bf7f14f 100644
--- a/utils/pdf2xml.dtd
+++ b/utils/pdf2xml.dtd
@@ -1,5 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!ELEMENT pdf2xml (page+, outline?)>
+<!ATTLIST pdf2xml
+	producer CDATA #REQUIRED
+	version CDATA #REQUIRED
+>
 <!ELEMENT page (fontspec*, image*, text*)>
 <!ATTLIST page
 	number CDATA #REQUIRED


More information about the poppler mailing list