--- ../../poppler-0.20.0/utils/HtmlOutputDev.cc 2012-04-16 18:28:21.000000000 +0100 +++ HtmlOutputDev.cc 2012-05-16 13:34:51.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[] = - "" "\n"; + "" "\n"; fwrite( css, sizeof(css)-1, 1, f ); } @@ -835,17 +835,17 @@ } if (!singleHtml) - fprintf(pageFile,"%s\n\n\nPage %d\n\n", DOCTYPE, page); + fprintf(pageFile,"%s\n\n\nPage %d\n\n", DOCTYPE, page); else - fprintf(pageFile,"%s\n\n\n%s\n\n", DOCTYPE, tmp->getCString()); + fprintf(pageFile,"%s\n\n\n%s\n\n", DOCTYPE, tmp->getCString()); delete tmp; GooString *htmlEncoding = HtmlOutputDev::mapEncodingToHtml(globalParams->getTextEncodingName()); if (!singleHtml) - fprintf(pageFile, "\n", htmlEncoding->getCString()); + fprintf(pageFile, "\n", htmlEncoding->getCString()); else - fprintf(pageFile, "\n
\n", htmlEncoding->getCString()); + fprintf(pageFile, "\n
\n", htmlEncoding->getCString()); delete htmlEncoding; } else @@ -868,7 +868,7 @@ tmp=basename(DocName); - fputs("\n",pageFile); + fputs("-->\n\n",pageFile); if( !noframes ) { - fputs("\n\n",pageFile); + fputs("\n\n",pageFile); } - fprintf(pageFile,"
\n", + fprintf(pageFile,"
\n", page, pageWidth, pageHeight); if( !ignore ) { fprintf(pageFile, - "\"background\n", + "\"background\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, - "

yMin), xoutRound(tmp1->xMin)); if (!singleHtml) { @@ -913,15 +913,15 @@ } fprintf(pageFile,"%d\">", tmp1->fontpos); fputs(tmp1->htext->getCString(), pageFile); - fputs("

\n", pageFile); + fputs("

\n", pageFile); } } - fputs("
\n", pageFile); + fputs("
\n", pageFile); if( !noframes ) { - fputs("\n\n",pageFile); + fputs("\n\n",pageFile); fclose(pageFile); } } @@ -936,7 +936,7 @@ } else { - fprintf(f,"",pageNum); + fprintf(f,"",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,"
\n",styles[style_index],img->fName->getCString()); + fprintf(f,"
\n",styles[style_index],img->fName->getCString()); delete img; } @@ -961,7 +961,7 @@ fputs("
\n",f); } } - fputs("
\n",f); + fputs("
\n",f); } } @@ -1026,7 +1026,7 @@ GooString* HtmlMetaVar::toString() { - GooString *result = new GooString("append(name); result->append("\" content=\""); result->append(content); @@ -1072,22 +1072,22 @@ fName=basename(Docname); fputs(DOCTYPE, fContentsFrame); - fputs("\n",fContentsFrame); - fputs("\n",fContentsFrame); - fprintf(fContentsFrame,"\n%s",docTitle->getCString()); + fputs("\n",fContentsFrame); + fputs("\n",fContentsFrame); + fprintf(fContentsFrame,"\n%s",docTitle->getCString()); htmlEncoding = mapEncodingToHtml(globalParams->getTextEncodingName()); - fprintf(fContentsFrame, "\n\n", htmlEncoding->getCString()); + fprintf(fContentsFrame, "\n\n", htmlEncoding->getCString()); dumpMetaVars(fContentsFrame); - fprintf(fContentsFrame, "\n"); - fputs("\n",fContentsFrame); - fprintf(fContentsFrame,"\n",fName->getCString()); - fputs("\n"); + fputs("\n",fContentsFrame); + fprintf(fContentsFrame,"\n",fName->getCString()); + fputs("getCString(), firstPage); else fprintf(fContentsFrame,"\"%ss.html\"",fName->getCString()); - fputs(">\n\n\n",fContentsFrame); + fputs("/>\n\n\n",fContentsFrame); delete fName; delete htmlEncoding; @@ -1145,12 +1145,12 @@ } delete left; fputs(DOCTYPE, fContentsFrame); - fputs("\n\n\n\n\n", fContentsFrame); + fputs("\n\n\n\n\n", fContentsFrame); if (doOutline) { GooString *str = basename(Docname); - fprintf(fContentsFrame, "Outline
", str->getCString(), complexMode ? "-outline.html" : "s.html#outline"); + fprintf(fContentsFrame, "Outline
", str->getCString(), complexMode ? "-outline.html" : "s.html#outline"); delete str; } } @@ -1167,9 +1167,9 @@ } delete right; fputs(DOCTYPE, page); - fputs("\n\n\n",page); + fputs("\n\n\n",page); printCSS(page); - fputs("\n\n",page); + fputs("\n\n",page); } } @@ -1196,14 +1196,14 @@ } else { - fprintf(page,"%s\n\n\n%s\n", DOCTYPE, docTitle->getCString()); + fprintf(page,"%s\n\n\n%s\n", DOCTYPE, docTitle->getCString()); - fprintf(page, "\n", htmlEncoding->getCString()); + fprintf(page, "\n", htmlEncoding->getCString()); dumpMetaVars(page); printCSS(page); - fprintf(page,"\n"); - fprintf(page,"\n"); + fprintf(page,"\n"); + fprintf(page,"\n"); } delete htmlEncoding; } @@ -1219,7 +1219,7 @@ deleteGooList(glMetaVars, HtmlMetaVar); if (fContentsFrame){ - fputs("\n\n",fContentsFrame); + fputs("\n\n",fContentsFrame); fclose(fContentsFrame); } if (page != NULL) { @@ -1229,7 +1229,7 @@ } else if ( !complexMode || xml || noframes ) { - fputs("\n\n",page); + fputs("\n\n",page); fclose(page); } } @@ -1265,9 +1265,9 @@ if (fContentsFrame) { if (complexMode) - fprintf(fContentsFrame,"getCString(),pageNum); + fprintf(fContentsFrame,"getCString(),pageNum); else - fprintf(fContentsFrame,"getCString(),pageNum); + fprintf(fContentsFrame,"getCString(),pageNum); fprintf(fContentsFrame," target=\"contents\" >Page %d
\n",pageNum); } } @@ -1297,7 +1297,7 @@ maxPageWidth = pages->pageWidth; maxPageHeight = pages->pageHeight; - //if(!noframes&&!xml) fputs("
\n", fContentsFrame); + //if(!noframes&&!xml) fputs("
\n", fContentsFrame); if(!stout && !globalParams->getErrQuiet()) printf("Page-%d\n",(pageNum)); } @@ -1700,7 +1700,7 @@ if (noframes) { output = page; - fputs("
\n", output); + fputs("
\n", output); } else { @@ -1715,13 +1715,13 @@ GooString *htmlEncoding = HtmlOutputDev::mapEncodingToHtml(globalParams->getTextEncodingName()); - fprintf(output, "\n" \ - "\n" \ - "Document Outline\n" \ - "\n" \ + "Document Outline\n" \ + "\n" \ - "\n\n", htmlEncoding->getCString()); + "\n\n", htmlEncoding->getCString()); delete htmlEncoding; } } @@ -1730,11 +1730,11 @@ { GBool done = newHtmlOutlineLevel(output, outlines, catalog); if (done && !complexMode) - fputs("
\n", output); + fputs("
\n", output); if (bClose) { - fputs("\n\n", output); + fputs("\n\n", output); fclose(output); } } @@ -1754,7 +1754,7 @@ if (level == 1) { - fputs("", output); + fputs("", output); fputs("

Document Outline

\n", output); } fputs("