Add version to produced XML file.
In case somebody tries to change/improve the XML output format,
version should at least give some guidance as to how parse the thing.
Also, poppler's pdf2xml is pretty much only one which doesn't add some
version information to the XML generated.
Patch attached.
diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 3d8836b..02699e4 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
{
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler