Albert Astals Cid | 9 Feb 22:03

Branch 'xpdf303merge' - 2 commits - poppler/GfxState.cc utils/pdftoppm.cc

 poppler/GfxState.cc |    2 +-
 utils/pdftoppm.cc   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit a63128179c65b5d9d6d9d41fa601a593b0a05d94
Author: Thomas Freitag <Thomas.Freitag <at> kabelmail.de>
Date:   Thu Feb 9 22:02:52 2012 +0100

    [xpdf303] Fix merge issue

diff --git a/utils/pdftoppm.cc b/utils/pdftoppm.cc
index a02da29..222c89b 100644
--- a/utils/pdftoppm.cc
+++ b/utils/pdftoppm.cc
@@ -369,7 +369,7 @@ int main(int argc, char *argv[]) {
 #if SPLASH_CMYK
 				    (jpegcmyk || overprint) ? splashModeCMYK8 :
 #endif
-				             splashModeBGR8, 4,
+				             splashModeRGB8, 4,
 				  gFalse, paperColor);
   splashOut->startDoc(doc);
   if (sz != 0) w = h = sz;
commit cd5a6a4d02e579e543067d1847164aff90363f16
Author: Thomas Freitag <Thomas.Freitag <at> kabelmail.de>
Date:   Thu Feb 9 22:01:42 2012 +0100

    [xpdf303] Fix merge bug

(Continue reading)

Albert Astals Cid | 9 Feb 21:57

utils/HtmlOutputDev.cc

 utils/HtmlOutputDev.cc |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 597fa37cacec928c40d0491174ce843fe01f26d9
Author: Igor Slepchin <igor.slepchin <at> gmail.com>
Date:   Wed Feb 8 19:22:13 2012 -0500

    Close li tags in generated outlines.

    Also, add newlines after ul tags for better readability.
    Bug #45807
    (cherry picked from commit bf81250ff7d0968852fc7559fafb6389cd695b91)

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index ee4da7f..43fc21a 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1631,7 +1631,7 @@ GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines,
Catalog* c
 		fputs("<A name=\"outline\"></a>", output);
 		fputs("<h1>Document Outline</h1>\n", output);
 	}
-	fputs("<ul>",output);
+	fputs("<ul>\n",output);

 	for (int i = 0; i < outlines->getLength(); i++)
 	{
@@ -1693,16 +1693,19 @@ GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines,
Catalog* c
(Continue reading)

Albert Astals Cid | 9 Feb 21:56

Branch 'poppler-0.18' - utils/HtmlOutputDev.cc

 utils/HtmlOutputDev.cc |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit bf81250ff7d0968852fc7559fafb6389cd695b91
Author: Igor Slepchin <igor.slepchin <at> gmail.com>
Date:   Wed Feb 8 19:22:13 2012 -0500

    Close li tags in generated outlines.

    Also, add newlines after ul tags for better readability.
    Bug #45807

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 53dd657..c760426 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -1631,7 +1631,7 @@ GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines,
Catalog* c
 		fputs("<A name=\"outline\"></a>", output);
 		fputs("<h1>Document Outline</h1>\n", output);
 	}
-	fputs("<ul>",output);
+	fputs("<ul>\n",output);

 	for (int i = 0; i < outlines->getLength(); i++)
 	{
@@ -1695,16 +1695,19 @@ GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines,
Catalog* c
 			fputs("</A>",output);
(Continue reading)

杨辉强 | 9 Feb 08:30
Gravatar

pdftotext convert error!

Hi, all:
    I use the pdftotext in poppler/util/ directory. When it convert the 
following two urls's pdf files,
it seems convert errorly.

      http://www.100ec.cn/b2bimages/dcbg.pdf
      http://sjb.qlwb.com.cn/images/2011-06/16/Q02/qd0216.pdf

Can you give me some advices? Thank you very much.
Ralph | 9 Feb 02:00
Gravatar

Scanned images in PDFs and DPI

Hi Folks, 

This isn't really a poppler issue, but I was hoping that someone on the list might have some experience
dealing with this edge case.

The PDFs that we process with pdftoppm are regularly sized 42" x 30" and often contain scans of rasterized
data.  Once in a while, whomever made the scans screws up and puts in 8.5 x 11, even though it's *actually* 42"
x 30".  Obviously the 150 dpi is far too low and the output quality is horrible.  

There's a slight chance that the PDFs might actually be 8.5" x 11" so doing a brute force DPI increase might
not be a good idea.  Does anyone have any good workflows for these sorts of mess-ups?  Or is scaling the DPI
based on the size difference (544 x 388 -> 3168x2448) the only approach?

Here's the pdfinfo dump of the failure:
----
Tagged: no
Pages: 1
Encrypted: no
Page size: 544.32 x 388.8 pts
Page rot: 0
File size: 881061 bytes
Optimized: no

PDF version: 1.6 
----

Here's a pdf dump of what we expect:
----
Pages: 1
Encrypted: no
(Continue reading)

Albert Astals Cid | 9 Feb 00:15

utils/HtmlOutputDev.cc utils/HtmlOutputDev.h

 utils/HtmlOutputDev.cc |  143 ++++++++++++++++++-------------------------------
 utils/HtmlOutputDev.h  |   15 +++--
 2 files changed, 65 insertions(+), 93 deletions(-)

New commits:
commit 2fc36dba5f63703896722adb5127896e4c2840e7
Author: Igor Slepchin <igor.slepchin <at> gmail.com>
Date:   Thu Feb 9 00:15:13 2012 +0100

    Get rid of static data members; merge duplicated jpeg dumping code.

    HtmlPage::pgNum is never used;
    imgNum is always equal to imgList->getLength()+1
    imgList is now maintained in HtmlPage.

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index c7435fc..ee4da7f 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -85,10 +85,6 @@ public:
 // returns true if x is closer to y than x is to z
 static inline bool IS_CLOSER(float x, float y, float z) { return fabs((x)-(y)) < fabs((x)-(z)); }

-int HtmlPage::pgNum=0;
-int HtmlOutputDev::imgNum=1;
-GooList *HtmlOutputDev::imgList=new GooList();
-
 extern GBool complexMode;
 extern GBool singleHtml;
 extern GBool ignore;
(Continue reading)

Albert Astals Cid | 9 Feb 00:00

2 commits - utils/HtmlOutputDev.cc utils/HtmlOutputDev.h utils/pdftohtml.cc

 utils/HtmlOutputDev.cc |   47 ++++++++++++++++++++++++-----------------------
 utils/HtmlOutputDev.h  |    7 ++++---
 utils/pdftohtml.cc     |    3 +--
 3 files changed, 29 insertions(+), 28 deletions(-)

New commits:
commit f655efe327ddd3b6a68353a62589d4e4f8a318a8
Author: Albert Astals Cid <aacid <at> kde.org>
Date:   Wed Feb 8 23:58:27 2012 +0100

    Fix memory leak when using HtmlOutputDev::mapEncodingToHtml

    Bug #45805
    (cherry picked from commit 53a0c2043dfd56f6da7780f1a049f75af368b84b)

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 50ceefe..c7435fc 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -17,7 +17,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2005-2011 Albert Astals Cid <aacid <at> kde.org>
+// Copyright (C) 2005-2012 Albert Astals Cid <aacid <at> kde.org>
 // Copyright (C) 2008 Kjartan Maraas <kmaraas <at> gnome.org>
 // Copyright (C) 2008 Boris Toloknov <tlknv <at> yandex.ru>
 // Copyright (C) 2008 Haruyuki Kawabe <Haruyuki.Kawabe <at> unisys.co.jp>
@@ -766,7 +766,6 @@ void HtmlPage::dumpAsXML(FILE* f,int page){

(Continue reading)

Albert Astals Cid | 8 Feb 23:59

Branch 'poppler-0.18' - 2 commits - utils/HtmlOutputDev.cc utils/HtmlOutputDev.h utils/pdftohtml.cc

 utils/HtmlOutputDev.cc |   47 ++++++++++++++++++++++++-----------------------
 utils/HtmlOutputDev.h  |    7 ++++---
 utils/pdftohtml.cc     |    3 +--
 3 files changed, 29 insertions(+), 28 deletions(-)

New commits:
commit 53a0c2043dfd56f6da7780f1a049f75af368b84b
Author: Albert Astals Cid <aacid <at> kde.org>
Date:   Wed Feb 8 23:58:27 2012 +0100

    Fix memory leak when using HtmlOutputDev::mapEncodingToHtml

    Bug #45805

diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc
index 5561528..53dd657 100644
--- a/utils/HtmlOutputDev.cc
+++ b/utils/HtmlOutputDev.cc
@@ -17,7 +17,7 @@
 // All changes made under the Poppler project to this file are licensed
 // under GPL version 2 or later
 //
-// Copyright (C) 2005-2011 Albert Astals Cid <aacid <at> kde.org>
+// Copyright (C) 2005-2012 Albert Astals Cid <aacid <at> kde.org>
 // Copyright (C) 2008 Kjartan Maraas <kmaraas <at> gnome.org>
 // Copyright (C) 2008 Boris Toloknov <tlknv <at> yandex.ru>
 // Copyright (C) 2008 Haruyuki Kawabe <Haruyuki.Kawabe <at> unisys.co.jp>
@@ -742,7 +742,6 @@ void HtmlPage::dumpAsXML(FILE* f,int page){

 int HtmlPage::dumpComplexHeaders(FILE * const file, FILE *& pageFile, int page) {
(Continue reading)

Albert Astals Cid | 8 Feb 19:15

Branch 'xpdf303merge' - poppler/GlobalParamsWin.cc poppler/SplashOutputDev.cc

 poppler/GlobalParamsWin.cc |    2 +-
 poppler/SplashOutputDev.cc |   10 ----------
 2 files changed, 1 insertion(+), 11 deletions(-)

New commits:
commit 2b7ba166c28e32653db4ae7acf90e06e0dd5975b
Author: Albert Astals Cid <aacid <at> kde.org>
Date:   Wed Feb 8 19:12:52 2012 +0100

    [xpdf303] Compile fixes

diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index 5ac1c60..c62e2cd 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -394,7 +394,7 @@ static char *findSubstituteName(const char *origName)
 /* Windows implementation of external font matching code */
 GooString *GlobalParams::findSystemFontFile(GfxFont *font,
 					  SysFontType *type,
-					  int *fontNum, , GooString * /*substituteFontName*/) {
+					  int *fontNum, GooString * /*substituteFontName*/) {
   SysFontInfo *fi;
   GooString *path = NULL;
   GooString *fontName = font->getName();
diff --git a/poppler/SplashOutputDev.cc b/poppler/SplashOutputDev.cc
index 69e26a0..246a37d 100644
--- a/poppler/SplashOutputDev.cc
+++ b/poppler/SplashOutputDev.cc
@@ -3018,25 +3018,15 @@ void SplashOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
       break;
(Continue reading)

Gravatar

pdftoppm - Error: Couldn't find a font for 'UMVSUI+ArialNarrow-Bold', subst is 'Helvetica'

Hi guys,

I'm using the poppler powerful libs to create images from pdf pages,
via pdftoppm on windows machines.
It works very well, but some pages of some pdf docs get pdftoppm.exe
going in error.
The error messages are similar to this:

returned 1 , stderr: Error: Couldn't find a font for
'UMVSUI+ArialNarrow-Bold', subst is 'Helvetica'
Error: Couldn't find a font for 'UMVSUI+ArialNarrow-Bold', subst is 'Helvetica'
Error: Couldn't find a font for 'UMVSUI+ArialNarrow-Bold', subst is 'Helvetica'
Error: Couldn't find a font for 'RORAEO+CourierNewPS-BoldMT', subst is
'Helvetica'
Error: Couldn't find a font for 'UMVSUI+ArialNarrow-Bold', subst is 'Helvetica'
Error: Couldn't find a font for 'RORAEO+CourierNewPS-BoldMT', subst is
'Helvetica'

Adobe Reader read it without problems.

Can anyone suggest me a way to solve this ?

Thanks in advance.
Stefano

--

-- 
Tinvention - Ingegneria Informatica -
http://tinvention.net/
ing. Stefano E. Campanini
(Continue reading)

Albert Astals Cid | 6 Feb 19:55

Branch 'xpdf303merge' - poppler/ArthurOutputDev.cc poppler/GlobalParams.cc poppler/GlobalParams.h poppler/SplashOutputDev.cc poppler/SplashOutputDev.h splash/SplashFontEngine.cc splash/SplashFontEngine.h splash/SplashFTFont.cc splash/SplashFTFontEngine.cc splash/SplashFTFontEngine.h splash/SplashFTFont.h utils/pdftoppm.cc

 poppler/ArthurOutputDev.cc   |    1 -
 poppler/GlobalParams.cc      |   10 ----------
 poppler/GlobalParams.h       |    1 -
 poppler/SplashOutputDev.cc   |    3 ---
 poppler/SplashOutputDev.h    |    1 -
 splash/SplashFTFont.cc       |   40 +++++++++++++++++++---------------------
 splash/SplashFTFont.h        |    1 -
 splash/SplashFTFontEngine.cc |    7 +++----
 splash/SplashFTFontEngine.h  |    5 ++---
 splash/SplashFontEngine.cc   |    3 +--
 splash/SplashFontEngine.h    |    1 -
 utils/pdftoppm.cc            |    2 +-
 12 files changed, 26 insertions(+), 49 deletions(-)

New commits:
commit b8c9b179c9491cf6755b07bfdec4174e78b7d241
Author: Albert Astals Cid <aacid <at> kde.org>
Date:   Mon Feb 6 19:55:07 2012 +0100

    [xpdf303] Adapt better to what we did and what xpdf303 does

diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc
index 301232b..d373d0b 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -116,7 +116,6 @@ void ArthurOutputDev::startDoc(XRef *xrefA) {
 #endif
 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
   globalParams->getEnableFreeType(),
-  !globalParams->getDisableFreeTypeHinting(),
(Continue reading)


Gmane