--- HtmlOutputDev.cc	2012-05-16 13:34:51.000000000 +0100
+++ ../../poppler-0.20.0/utils/HtmlOutputDev.cc	2012-04-16 18:28:21.000000000 +0100
@@ -784,7 +784,7 @@
   // http://stackoverflow.com/questions/1309055/cross-browser-way-to-flip-html-image-via-javascript-css
   // tested in Chrome, Fx (Linux) and IE9 (W7)
   static const char css[] = 
-    "<style type=\"text/css\">" "\n"
+    "<STYLE type=\"text/css\">" "\n"
     "<!--" "\n"
     ".xflip {" "\n"
     "    -moz-transform: scaleX(-1);" "\n"
@@ -808,7 +808,7 @@
     "    filter: fliph + flipv;" "\n"
     "}" "\n"
     "-->" "\n"
-    "</style>" "\n";
+    "</STYLE>" "\n";
 
   fwrite( css, sizeof(css)-1, 1, f );
 }
@@ -835,17 +835,17 @@
       } 
 
       if (!singleHtml)
-        fprintf(pageFile,"%s\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<head>\n<title>Page %d</title>\n\n", DOCTYPE, page);
+        fprintf(pageFile,"%s\n<HTML xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<HEAD>\n<TITLE>Page %d</TITLE>\n\n", DOCTYPE, page);
       else
-        fprintf(pageFile,"%s\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<head>\n<title>%s</title>\n\n", DOCTYPE, tmp->getCString());
+        fprintf(pageFile,"%s\n<HTML xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<HEAD>\n<TITLE>%s</TITLE>\n\n", DOCTYPE, tmp->getCString());
 
       delete tmp;
 
       GooString *htmlEncoding = HtmlOutputDev::mapEncodingToHtml(globalParams->getTextEncodingName());
       if (!singleHtml)
-        fprintf(pageFile, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n", htmlEncoding->getCString());
+        fprintf(pageFile, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n", htmlEncoding->getCString());
       else
-        fprintf(pageFile, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n <br/>\n", htmlEncoding->getCString());
+        fprintf(pageFile, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n <br/>\n", htmlEncoding->getCString());
       delete htmlEncoding;
   }
   else 
@@ -868,7 +868,7 @@
 
   tmp=basename(DocName);
    
-  fputs("<style type=\"text/css\">\n<!--\n",pageFile);
+  fputs("<STYLE type=\"text/css\">\n<!--\n",pageFile);
   fputs("\tp {margin: 0; padding: 0;}",pageFile);
   for(int i=fontsPageMarker;i!=fonts->size();i++) {
     GooString *fontCSStyle;
@@ -880,20 +880,20 @@
     delete fontCSStyle;
   }
  
-  fputs("-->\n</style>\n",pageFile);
+  fputs("-->\n</STYLE>\n",pageFile);
   
   if( !noframes )
   {  
-      fputs("</head>\n<body bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n",pageFile); 
+      fputs("</HEAD>\n<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n",pageFile); 
   }
   
-  fprintf(pageFile,"<div id=\"page%d-div\" style=\"position:relative;width:%dpx;height:%dpx;\">\n",
+  fprintf(pageFile,"<DIV id=\"page%d-div\" style=\"position:relative;width:%dpx;height:%dpx;\">\n",
       page, pageWidth, pageHeight);
 
   if( !ignore ) 
   {
     fprintf(pageFile,
-	    "<img width=\"%d\" height=\"%d\" src=\"%s%03d.%s\" alt=\"background image\"/>\n",
+	    "<IMG width=\"%d\" height=\"%d\" src=\"%s%03d.%s\" alt=\"background image\"/>\n",
 	    pageWidth, pageHeight, tmp->getCString(), 
 		(page-firstPage+1), imgExt->getCString());
   }
@@ -903,7 +903,7 @@
   for(HtmlString *tmp1=yxStrings;tmp1;tmp1=tmp1->yxNext){
     if (tmp1->htext){
       fprintf(pageFile,
-	      "<p style=\"position:absolute;top:%dpx;left:%dpx;white-space:nowrap\" class=\"ft",
+	      "<P style=\"position:absolute;top:%dpx;left:%dpx;white-space:nowrap\" class=\"ft",
 	      xoutRound(tmp1->yMin),
 	      xoutRound(tmp1->xMin));
       if (!singleHtml) {
@@ -913,15 +913,15 @@
       }
       fprintf(pageFile,"%d\">", tmp1->fontpos);
       fputs(tmp1->htext->getCString(), pageFile);
-      fputs("</p>\n", pageFile);
+      fputs("</P>\n", pageFile);
     }
   }
 
-  fputs("</div>\n", pageFile);
+  fputs("</DIV>\n", pageFile);
   
   if( !noframes )
   {
-      fputs("</body>\n</html>\n",pageFile);
+      fputs("</BODY>\n</HTML>\n",pageFile);
       fclose(pageFile);
   }
 }
@@ -936,7 +936,7 @@
   }
   else
   {
-    fprintf(f,"<a name=%d></a>",pageNum);
+    fprintf(f,"<A name=%d></a>",pageNum);
     // Loop over the list of image names on this page
     int listlen=imgList->getLength();
     for (int i = 0; i < listlen; i++) {
@@ -948,7 +948,7 @@
       if (img->xMin > img->xMax) style_index += 1; // xFlip
       if (img->yMin > img->yMax) style_index += 2; // yFlip
 
-      fprintf(f,"<img%s src=\"%s\"/><br/>\n",styles[style_index],img->fName->getCString());
+      fprintf(f,"<IMG%s src=\"%s\"/><br/>\n",styles[style_index],img->fName->getCString());
       delete img;
     }
 
@@ -961,7 +961,7 @@
 		fputs("<br/>\n",f);
       }
     }
-	fputs("<hr/>\n",f);  
+	fputs("<hr>\n",f);  
   }
 }
 
@@ -1026,7 +1026,7 @@
     
 GooString* HtmlMetaVar::toString()	
 {
-    GooString *result = new GooString("<meta name=\"");
+    GooString *result = new GooString("<META name=\"");
     result->append(name);
     result->append("\" content=\"");
     result->append(content);
@@ -1072,22 +1072,22 @@
     
   fName=basename(Docname);
   fputs(DOCTYPE, fContentsFrame);
-  fputs("\n<html>",fContentsFrame);
-  fputs("\n<head>",fContentsFrame);
-  fprintf(fContentsFrame,"\n<title>%s</title>",docTitle->getCString());
+  fputs("\n<HTML>",fContentsFrame);
+  fputs("\n<HEAD>",fContentsFrame);
+  fprintf(fContentsFrame,"\n<TITLE>%s</TITLE>",docTitle->getCString());
   htmlEncoding = mapEncodingToHtml(globalParams->getTextEncodingName());
-  fprintf(fContentsFrame, "\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n", htmlEncoding->getCString());
+  fprintf(fContentsFrame, "\n<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n", htmlEncoding->getCString());
   dumpMetaVars(fContentsFrame);
-  fprintf(fContentsFrame, "</head>\n");
-  fputs("<frameset cols=\"100,*\">\n",fContentsFrame);
-  fprintf(fContentsFrame,"<frame name=\"links\" src=\"%s_ind.html\"/>\n",fName->getCString());
-  fputs("<frame name=\"contents\" src=",fContentsFrame); 
+  fprintf(fContentsFrame, "</HEAD>\n");
+  fputs("<FRAMESET cols=\"100,*\">\n",fContentsFrame);
+  fprintf(fContentsFrame,"<FRAME name=\"links\" src=\"%s_ind.html\">\n",fName->getCString());
+  fputs("<FRAME name=\"contents\" src=",fContentsFrame); 
   if (complexMode) 
       fprintf(fContentsFrame,"\"%s-%d.html\"",fName->getCString(), firstPage);
   else
       fprintf(fContentsFrame,"\"%ss.html\"",fName->getCString());
   
-  fputs("/>\n</frameset>\n</html>\n",fContentsFrame);
+  fputs(">\n</FRAMESET>\n</HTML>\n",fContentsFrame);
  
   delete fName;
   delete htmlEncoding;
@@ -1145,12 +1145,12 @@
          }
          delete left;
          fputs(DOCTYPE, fContentsFrame);
-         fputs("<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<head>\n<title></title>\n</head>\n<body>\n", fContentsFrame);
+         fputs("<HTML xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<HEAD>\n<TITLE></TITLE>\n</HEAD>\n<BODY>\n", fContentsFrame);
 
          if (doOutline)
          {
              GooString *str = basename(Docname);
-             fprintf(fContentsFrame, "<a href=\"%s%s\" target=\"contents\">Outline</a><br/>", str->getCString(), complexMode ? "-outline.html" : "s.html#outline");
+             fprintf(fContentsFrame, "<A href=\"%s%s\" target=\"contents\">Outline</a><br/>", str->getCString(), complexMode ? "-outline.html" : "s.html#outline");
              delete str;
          }
      }
@@ -1167,9 +1167,9 @@
        }
        delete right;
        fputs(DOCTYPE, page);
-       fputs("<html>\n<head>\n<title></title>\n",page);
+       fputs("<HTML>\n<HEAD>\n<TITLE></TITLE>\n",page);
        printCSS(page);
-       fputs("</head>\n<body>\n",page);
+       fputs("</HEAD>\n<BODY>\n",page);
      }
   }
 
@@ -1196,14 +1196,14 @@
     } 
     else 
     {
-      fprintf(page,"%s\n<html xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<head>\n<title>%s</title>\n", DOCTYPE, docTitle->getCString());
+      fprintf(page,"%s\n<HTML xmlns=\"http://www.w3.org/1999/xhtml\" lang=\"\" xml:lang=\"\">\n<HEAD>\n<TITLE>%s</TITLE>\n", DOCTYPE, docTitle->getCString());
       
-      fprintf(page, "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n", htmlEncoding->getCString());
+      fprintf(page, "<META http-equiv=\"Content-Type\" content=\"text/html; charset=%s\"/>\n", htmlEncoding->getCString());
       
       dumpMetaVars(page);
       printCSS(page);
-      fprintf(page,"</head>\n");
-      fprintf(page,"<body bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n");
+      fprintf(page,"</HEAD>\n");
+      fprintf(page,"<BODY bgcolor=\"#A0A0A0\" vlink=\"blue\" link=\"blue\">\n");
     }
     delete htmlEncoding;
   }
@@ -1219,7 +1219,7 @@
     deleteGooList(glMetaVars, HtmlMetaVar);
 
     if (fContentsFrame){
-      fputs("</body>\n</html>\n",fContentsFrame);  
+      fputs("</BODY>\n</HTML>\n",fContentsFrame);  
       fclose(fContentsFrame);
     }
     if (page != NULL) {
@@ -1229,7 +1229,7 @@
       } else
       if ( !complexMode || xml || noframes )
       { 
-        fputs("</body>\n</html>\n",page);  
+        fputs("</BODY>\n</HTML>\n",page);  
         fclose(page);
       }
     }
@@ -1265,9 +1265,9 @@
     if (fContentsFrame)
 	{
       if (complexMode)
-		fprintf(fContentsFrame,"<a href=\"%s-%d.html\"",str->getCString(),pageNum);
+		fprintf(fContentsFrame,"<A href=\"%s-%d.html\"",str->getCString(),pageNum);
       else 
-		fprintf(fContentsFrame,"<a href=\"%ss.html#%d\"",str->getCString(),pageNum);
+		fprintf(fContentsFrame,"<A href=\"%ss.html#%d\"",str->getCString(),pageNum);
       fprintf(fContentsFrame," target=\"contents\" >Page %d</a><br/>\n",pageNum);
     }
   }
@@ -1297,7 +1297,7 @@
   maxPageWidth = pages->pageWidth;
   maxPageHeight = pages->pageHeight;
   
-  //if(!noframes&&!xml) fputs("<br/>\n", fContentsFrame);
+  //if(!noframes&&!xml) fputs("<br>\n", fContentsFrame);
   if(!stout && !globalParams->getErrQuiet()) printf("Page-%d\n",(pageNum));
 }
 
@@ -1700,7 +1700,7 @@
 		if (noframes)
 		{
 			output = page; 
-			fputs("<hr/>\n", output);
+			fputs("<hr>\n", output);
 		}
 		else
 		{
@@ -1715,13 +1715,13 @@
 			GooString *htmlEncoding =
 				HtmlOutputDev::mapEncodingToHtml(globalParams->getTextEncodingName());
 
-			fprintf(output, "<html xmlns=\"http://www.w3.org/1999/xhtml\" " \
+			fprintf(output, "<HTML xmlns=\"http://www.w3.org/1999/xhtml\" " \
                                 "lang=\"\" xml:lang=\"\">\n"            \
-                                "<head>\n"                              \
-                                "<title>Document Outline</title>\n"     \
-                                "<meta http-equiv=\"Content-Type\" content=\"text/html; " \
+                                "<HEAD>\n"                              \
+                                "<TITLE>Document Outline</TITLE>\n"     \
+                                "<META http-equiv=\"Content-Type\" content=\"text/html; " \
                                 "charset=%s\"/>\n"                      \
-                                "</head>\n<body>\n", htmlEncoding->getCString());
+                                "</HEAD>\n<BODY>\n", htmlEncoding->getCString());
 			delete htmlEncoding;
 		}
 	}
@@ -1730,11 +1730,11 @@
 	{
 		GBool done = newHtmlOutlineLevel(output, outlines, catalog);
 		if (done && !complexMode)
-			fputs("<hr/>\n", output);
+			fputs("<hr>\n", output);
 	
 		if (bClose)
 		{
-			fputs("</body>\n</html>\n", output);
+			fputs("</BODY>\n</HTML>\n", output);
 			fclose(output);
 		}
 	}
@@ -1754,7 +1754,7 @@
 
 	if (level == 1)
 	{
-		fputs("<a name=\"outline\"></a>", output);
+		fputs("<A name=\"outline\"></a>", output);
 		fputs("<h1>Document Outline</h1>\n", output);
 	}
 	fputs("<ul>\n",output);
@@ -1793,10 +1793,10 @@
 
 		fputs("<li>",output);
 		if (linkName)
-			fprintf(output,"<a href=\"%s\">", linkName->getCString());
+			fprintf(output,"<A href=\"%s\">", linkName->getCString());
 		fputs(titleStr->getCString(),output);
 		if (linkName) {
-			fputs("</a>",output);
+			fputs("</A>",output);
 			delete linkName;
 		}
 		delete titleStr;