[poppler] poppler/utils: HtmlFonts.cc,1.1,1.2 pdftohtml.cc,1.5,1.6

Albert Astals Cid aacid at kemper.freedesktop.org
Sat Apr 14 16:19:48 PDT 2007


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

Modified Files:
	HtmlFonts.cc pdftohtml.cc 
Log Message:
       * utils/HtmlFonts.cc: Fix rendering of text colors on complex mode.
       * utils/pdftohtml.cc: Fix rendering of links.


Index: HtmlFonts.cc
===================================================================
RCS file: /cvs/poppler/poppler/utils/HtmlFonts.cc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- HtmlFonts.cc	12 Dec 2005 20:15:11 -0000	1.1
+++ HtmlFonts.cc	14 Apr 2007 23:19:46 -0000	1.2
@@ -33,10 +33,10 @@
 GooString* HtmlFont::DefaultFont=new GooString("Times"); // Arial,Helvetica,sans-serif
 
 HtmlFontColor::HtmlFontColor(GfxRGB rgb){
-  r=static_cast<int>(255*rgb.r);
-  g=static_cast<int>(255*rgb.g);
-  b=static_cast<int>(255*rgb.b);
-  if (!(Ok(r)&&Ok(b)&&Ok(g))) {printf("Error : Bad color \n");r=0;g=0;b=0;}
+  r=static_cast<int>(rgb.r/65535.0*255.0);
+  g=static_cast<int>(rgb.g/65535.0*255.0);
+  b=static_cast<int>(rgb.b/65535.0*255.0);
+  if (!(Ok(r)&&Ok(b)&&Ok(g))) {printf("Error : Bad color %d %d %d\n", r, g, b);r=0;g=0;b=0;}
 }
 
 GooString *HtmlFontColor::convtoX(unsigned int xcol) const{

Index: pdftohtml.cc
===================================================================
RCS file: /cvs/poppler/poppler/utils/pdftohtml.cc,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pdftohtml.cc	24 Feb 2007 23:43:35 -0000	1.5
+++ pdftohtml.cc	14 Apr 2007 23:19:46 -0000	1.6
@@ -300,7 +300,7 @@
   if (htmlOut->isOk())
   {
     doc->displayPages(htmlOut, firstPage, lastPage, 72, 72, 0,
-		      gTrue, gFalse, gFalse);
+		      gTrue, gFalse, gTrue);
   	if (!xml)
 	{
 		htmlOut->dumpDocOutline(doc->getCatalog());



More information about the poppler mailing list