[poppler] 3 commits - qt4/src qt/poppler-page.cc

2009-08-01 Thread Pino Toscano
 qt/poppler-page.cc  |   12 +-
 qt4/src/poppler-document.cc |   52 
 qt4/src/poppler-qt4.h   |   52 
 3 files changed, 106 insertions(+), 10 deletions(-)

New commits:
commit ed5918e16dafebc9ecf6db8ce0186f407ecbf7d5
Author: Pino Toscano 
Date:   Sat Aug 1 20:00:22 2009 +0200

[Qt4 apidox] make example for FontIterator... not leak ;)

diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h
index 7f60494..776ef63 100644
--- a/qt4/src/poppler-qt4.h
+++ b/qt4/src/poppler-qt4.h
@@ -233,6 +233,8 @@ while (it->hasNext()) {
   QList fonts = it->next();
   // do something with the fonts
 }
+// after doing the job, the iterator must be freed
+delete it;
\endcode
 
\since 0.12
commit f3b36d9c992491e614e88dbf1a84b5433a7647f4
Author: Pino Toscano 
Date:   Sat Aug 1 19:54:52 2009 +0200

[Qt4] Add color management API.

Add few wrapper functions to get/set color profiles.
Add a function to know whether the color management functions actually do 
anything (ie support compiled or not).
Add few basic API docs for the new functions.
Based on an initial patch by Hal V. Engel , heavily 
reindented, polished and massaged in its API by me.

diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
index 877db52..4eb1aba 100644
--- a/qt4/src/poppler-document.cc
+++ b/qt4/src/poppler-document.cc
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -36,6 +37,10 @@
 
 #include "poppler-private.h"
 
+#if defined(USE_CMS)
+#include 
+#endif
+
 namespace Poppler {
 
   int DocumentData::count = 0;
@@ -424,6 +429,44 @@ namespace Poppler {
 m_doc->setPaperColor(color);
 }
 
+void Document::setColorDisplayProfile(void* outputProfileA)
+{
+#if defined(USE_CMS)
+GfxColorSpace::setDisplayProfile((cmsHPROFILE)outputProfileA);
+#else
+Q_UNUSED(outputProfileA);
+#endif
+}
+
+void Document::setColorDisplayProfileName(const QString &name)
+{
+#if defined(USE_CMS)
+GooString *profileName = QStringToGooString( name );
+GfxColorSpace::setDisplayProfileName(profileName);
+delete profileName;
+#else
+Q_UNUSED(name);
+#endif
+}
+
+void* Document::colorRgbProfile() const
+{
+#if defined(USE_CMS)
+return (void*)GfxColorSpace::getRGBProfile();
+#else
+return NULL;
+#endif
+}
+
+void* Document::colorDisplayProfile() const
+{
+#if defined(USE_CMS)
+   return (void*)GfxColorSpace::getDisplayProfile();
+#else
+   return NULL;
+#endif
+}
+
 QColor Document::paperColor() const
 {
return m_doc->paperColor;
@@ -556,4 +599,13 @@ namespace Poppler {
 return QDateTime();
 }
 
+bool isCmsAvailable()
+{
+#if defined(USE_CMS)
+return true;
+#else
+return false;
+#endif
+}
+
 }
diff --git a/qt4/src/poppler-qt4.h b/qt4/src/poppler-qt4.h
index fd384f5..7f60494 100644
--- a/qt4/src/poppler-qt4.h
+++ b/qt4/src/poppler-qt4.h
@@ -612,6 +612,16 @@ while (it->hasNext()) {
The current rendering backend can be changed using setRenderBackend().
Please note that setting a backend not listed in the available ones
will always result in null QImage's.
+
+   \section document-cms Color management support
+
+   %Poppler, if compiled with this support, provides functions to handle color
+   profiles.
+
+   To know whether the %Poppler version you are using has support for color
+   management, you can query Poppler::isCmsAvailable(). In case it is not
+   avilable, all the color management-related functions will either do nothing
+   or return null.
 */
 class POPPLER_QT4_EXPORT Document {
friend class Page;
@@ -665,6 +675,39 @@ while (it->hasNext()) {
Q_DECLARE_FLAGS( RenderHints, RenderHint )
 
/**
+ Set a color display profile for the current document.
+
+ \param outputProfileA is a \c cmsHPROFILE of the LCMS library.
+
+  \since 0.12
+   */
+   void setColorDisplayProfile(void *outputProfileA);
+   /**
+ Set a color display profile for the current document.
+
+ \param name is the name of the display profile to set.
+
+  \since 0.12
+   */
+   void setColorDisplayProfileName(const QString &name);
+   /**
+ Return the current RGB profile.
+
+ \return a \c cmsHPROFILE of the LCMS library.
+
+  \since 0.12
+   */
+   void* colorRgbProfile() const;
+   /**
+ Return the current display profile.
+
+ \return a \c cmsHPROFILE of the LCMS library.
+
+  \since 0.12
+   */
+   void *colorDisplayProfile() const;
+
+   /**
   Load the document from a file on disk
 
   \param filePath the name (and path, if required) of the file to load
@@ -1341,6 +1384,13 @@ height = dummy.height();
 */
 POPPLER_QT4_EXPOR

[poppler] Poppler 0.11.2 (0.12 Beta 2) released

2009-08-01 Thread Albert Astals Cid
Available from
http://poppler.freedesktop.org/poppler-0.11.2.tar.gz

WARNING: This is a unstable release, it is actually 0.12 Beta 2 release, it 
should work like any release from the 0.10 branch, but do not blame us if it 
makes you start thinking GNU/Hurd is the next cool thing.

Changes against the 0.11.1 release:
core:
 * Make DecryptStream return sane values for getPos(). Bug #19706
 * Fix bug when printing pdf with multiple page sizes in duplex mode
 * Initilize AnnotColot properly when the Array is not correct
 * Fix crash on some files with forms. Bug #22485
 * Fix crash in files with invalid embedded files. Bug #22551
 * Improve FileSpec attribute parsing
 * Cairo output device improvements. Bugs #10942, #18017, #14160
 * Implement blend modes in cairo backend
 * Handle fontType1COT fonts in CairoFontEngine
 * Fix generation of PS for some files. Bug #18908
 * Don't use byte_lookup table when color space doesn't support getLine
   methods. Bug #11027
 * Fix rendering of PDF files with malformed patterns. Bug #22835
 * Add the possibility of disabling font substitution in pdftops. Bug #23030
 * Fix some radio buttons not being detected as such

glib:
 * Improvements to the demo

Qt4:
 * Improvements to the demo

build system:
 * Use gtkbuilder rather than libglade for some tests

utils:
 * Fix bug with noCrop parameter in pdftops

Testing, patches and bug reports welcome.

Albert


signature.asc
Description: This is a digitally signed message part.
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] Changes to 'refs/tags/poppler-0.11.2'

2009-08-01 Thread Albert Astals Cid
Tag 'poppler-0.11.2' created by Albert Astals Cid  at 2009-08-01 
16:26 -0700

0.11.2

Changes since poppler-0.11.1-58:
---
 0 files changed
---
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] CMakeLists.txt configure.ac msvc/config.h NEWS qt4/src

2009-08-01 Thread Albert Astals Cid
 CMakeLists.txt   |2 +-
 NEWS |   30 ++
 configure.ac |2 +-
 msvc/config.h|6 +++---
 qt4/src/Doxyfile |2 +-
 5 files changed, 36 insertions(+), 6 deletions(-)

New commits:
commit bddebec0712e92e13b57d3d05d652673fe737866
Author: Albert Astals Cid 
Date:   Sat Aug 1 17:12:22 2009 +0200

0.11.2

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5213705..d83f244 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -13,7 +13,7 @@ include(MacroBoolTo01)
 
 set(POPPLER_MAJOR_VERSION "0")
 set(POPPLER_MINOR_VERSION "11")
-set(POPPLER_MICRO_VERSION "1")
+set(POPPLER_MICRO_VERSION "2")
 set(POPPLER_VERSION 
"${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
 
 # command line switches
diff --git a/NEWS b/NEWS
index aa98555..2abce69 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,33 @@
+Release 0.11.2 (0.12 Beta 2)
+
+   core:
+* Make DecryptStream return sane values for getPos(). Bug #19706
+* Fix bug when printing pdf with multiple page sizes in duplex mode
+* Initilize AnnotColot properly when the Array is not correct
+* Fix crash on some files with forms. Bug #22485
+* Fix crash in files with invalid embedded files. Bug #22551
+* Improve FileSpec attribute parsing
+* Cairo output device improvements. Bugs #10942, #18017, #14160
+* Implement blend modes in cairo backend
+* Handle fontType1COT fonts in CairoFontEngine
+* Fix generation of PS for some files. Bug #18908
+* Don't use byte_lookup table when color space doesn't support getLine 
methods. Bug #11027
+* Fix rendering of PDF files with malformed patterns. Bug #22835
+* Add the possibility of disabling font substitution in pdftops. Bug 
#23030
+* Fix some radio buttons not being detected as such
+   
+   glib:
+* Improvements to the demo
+   
+   Qt4:
+* Improvements to the demo
+   
+   build system:
+* Use gtkbuilder rather than libglade for some tests
+   
+   utils:
+* Fix bug with noCrop parameter in pdftops 
+
 Release 0.11.1 (0.12 Beta 1)
 
core:
diff --git a/configure.ac b/configure.ac
index 4574582..11d16ee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 m4_define([poppler_version_major],[0])
 m4_define([poppler_version_minor],[11])
-m4_define([poppler_version_micro],[1])
+m4_define([poppler_version_micro],[2])
 
m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro])
 
 AC_PREREQ(2.59)
diff --git a/msvc/config.h b/msvc/config.h
index 2a083ec..a3bf753 100644
--- a/msvc/config.h
+++ b/msvc/config.h
@@ -32,13 +32,13 @@
 #define PACKAGE_NAME "poppler"
 
 /* Define to the full name and version of this package. */
-#define PACKAGE_STRING "poppler 0.11.1"
+#define PACKAGE_STRING "poppler 0.11.2"
 
 /* Define to the one symbol short name of this package. */
 #define PACKAGE_TARNAME "poppler"
 
 /* Define to the version of this package. */
-#define PACKAGE_VERSION "0.11.1"
+#define PACKAGE_VERSION "0.11.2"
 
 /* Poppler data dir */
 #define POPPLER_DATADIR "/usr/local/share/poppler"
@@ -53,7 +53,7 @@
 /* #undef USE_EXCEPTIONS */
 
 /* Version number of package */
-#define VERSION "0.11.1"
+#define VERSION "0.11.2"
 
 #define snprintf _snprintf
 #define unlink _unlink
diff --git a/qt4/src/Doxyfile b/qt4/src/Doxyfile
index e75c7e3..3707e06 100644
--- a/qt4/src/Doxyfile
+++ b/qt4/src/Doxyfile
@@ -31,7 +31,7 @@ PROJECT_NAME   = "Poppler Qt4 "
 # This could be handy for archiving the generated documentation or 
 # if some version control system is used.
 
-PROJECT_NUMBER = 0.11.1
+PROJECT_NUMBER = 0.11.2
 
 # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
 # base path where the generated documentation will be put. 
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] Poppler sibling count bug (patch)

2009-08-01 Thread Guillermo Antonio Amaral Bastidas
> 
> Commited, should the copyright line go to you or to KDAB? If to KDAB can i 
> get 
> a mail address?
> 

 Copyright 2009 KDAB and Author: Guillermo Amaral 

 Should do the trick ;)
 Thanks

-- 
gamaral


pgpVks0gxx3yU.pgp
Description: PGP signature
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] CVE-2009-0146/0147/0166

2009-08-01 Thread Albert Astals Cid
A Dissabte, 1 d'agost de 2009, Michael S. Gilbert va escriure:
> On Sat, 1 Aug 2009 11:58:57 +0200 Albert Astals Cid wrote:
> > CVE is the game of people that make money about bugs, most of the time
> > they don't even warn us nor give us PDF to try to reproduce the problems
> > so i mostly ignore CVE.
> >
> > The only CVE i was informed of and we worked to solve was the one that
> > resulted in
> > http://cgit.freedesktop.org/poppler/poppler/commit/?h=poppler-0.10&id=763
> >bfd27a50a9f8176fe112823839549e4498a39 no idea if that's the one you want
> > or not.
>
> Thanks for the quick reply.  I agree, there is not enough info in
> mitre's CVE database to completely triage these particular CVEs.  They
> are all related to the recent JBIG2 problems (that were addressed by
> that patch).  However, my question is whether those specific issues
> were addressed as well or if there are still parts of the code that are
> affected.  It seems that most distros just assume that everything was
> sufficiently addressed, but I want to check to make sure that this is
> the case.  I don't want to leave holes open.

If you ask if there are problems with JBIG2 files, the answer is yes, JBIG2 
decoding is very complex, if you know about how it works i'll be happy to send 
you some files that fail.

Albert

>
> Thanks again,
> Mike
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler

___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] CVE-2009-0146/0147/0166

2009-08-01 Thread Michael S. Gilbert
On Sat, 1 Aug 2009 11:58:57 +0200 Albert Astals Cid wrote:
> CVE is the game of people that make money about bugs, most of the time they 
> don't even warn us nor give us PDF to try to reproduce the problems so i 
> mostly ignore CVE.
> 
> The only CVE i was informed of and we worked to solve was the one that 
> resulted in 
> http://cgit.freedesktop.org/poppler/poppler/commit/?h=poppler-0.10&id=763bfd27a50a9f8176fe112823839549e4498a39
> no idea if that's the one you want or not.

Thanks for the quick reply.  I agree, there is not enough info in
mitre's CVE database to completely triage these particular CVEs.  They
are all related to the recent JBIG2 problems (that were addressed by
that patch).  However, my question is whether those specific issues
were addressed as well or if there are still parts of the code that are
affected.  It seems that most distros just assume that everything was
sufficiently addressed, but I want to check to make sure that this is
the case.  I don't want to leave holes open.  

Thanks again,
Mike
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] 2 commits - glib/demo

2009-08-01 Thread Carlos Garcia Campos
 glib/demo/attachments.c |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 87e2af3454348f5568d155c15af5d85268e47f1b
Author: Carlos Garcia Campos 
Date:   Sat Aug 1 15:48:02 2009 +0200

[glib-demo] Add cast to make sure the comparison is always valid

diff --git a/glib/demo/attachments.c b/glib/demo/attachments.c
index bec823b..28eb62e 100644
--- a/glib/demo/attachments.c
+++ b/glib/demo/attachments.c
@@ -252,7 +252,7 @@ pgd_attachments_validate_button_clicked (GtkButton   
*button,
gint i;

for (i = 0; i < digest_len; i++) {
-   if (attachment->checksum->str[i] != digest[i]) {
+   if ((guint8)attachment->checksum->str[i] != digest[i]) {
valid = FALSE;
break;
}
commit 464e95ef451103daddc9a30cd26b986291f02176
Author: Carlos Garcia Campos 
Date:   Sat Aug 1 15:47:25 2009 +0200

[glib-demo] Add missing return

diff --git a/glib/demo/attachments.c b/glib/demo/attachments.c
index c13147b..bec823b 100644
--- a/glib/demo/attachments.c
+++ b/glib/demo/attachments.c
@@ -189,6 +189,8 @@ attachment_save_callback (const gchar  *buf,
GChecksum *cs = (GChecksum *)data;
 
g_checksum_update (cs, buf, count);
+
+   return TRUE;
 }
 
 static void
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] Poppler sibling count bug (patch)

2009-08-01 Thread Albert Astals Cid
A Dissabte, 1 d'agost de 2009, Guillermo Antonio Amaral Bastidas va escriure:
>   Hi guys,
>
>   I found what was going nuts with the sibling count in a few documents I
> have been debugging for KDAB.
>
>   * The Problem: Okular never got an inaccurate sibling count on buttons so
> it treated them all button widgets as separate button groups, breaking
> grouped radio and check-boxes.
>
>   * The Solution: It seems that this affected forms where most fields
> reside as children of a single field and not root.
>
>In short FormField::fillChildrenSiblingsID() was not propagating
>   the fillChildrenSiblingsID call to it's children so it never generated
> the sibling information.
>
>I noticed a call to loadChildrenDefaults() but since it already gets
> called at the end of construction I'm guessing it's a mistake (tsdgeos any
> thoughts?)
>
>This fixes the problem and keeps working forms, well working.
>
>Please review and commit if it gets a green light.

Commited, should the copyright line go to you or to KDAB? If to KDAB can i get 
a mail address?

Albert

>   Cheers,
>   GA
>
>   ATTACHED: patch
>   TESTCASE: http://downloads.guillermoamaral.com/kdab/01_ump_a_2009.pdf

___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] poppler/Form.cc

2009-08-01 Thread Albert Astals Cid
 poppler/Form.cc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7f48369e4d29b2a71abffa9e1966e3a2252de895
Author: Guillermo Antonio Amaral Bastidas 
Date:   Sat Aug 1 15:41:34 2009 +0200

Call fillChildrenSiblingsID in fillChildrenSiblingsID instaed of 
loadChildrenDefaults

diff --git a/poppler/Form.cc b/poppler/Form.cc
index 48c2583..59e82bc 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -806,7 +806,7 @@ void FormField::fillChildrenSiblingsID()
 {
   if(terminal) return;
   for (int i=0; iloadChildrenDefaults();
+children[i]->fillChildrenSiblingsID();
   }
 }
 
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] 2 commits - poppler/GfxState.h poppler/GlobalParams.cc poppler/GlobalParams.h poppler/PSOutputDev.cc poppler/PSOutputDev.h utils/pdftops.1 utils/pdftops.cc

2009-08-01 Thread Albert Astals Cid
 poppler/GfxState.h  |1 
 poppler/GlobalParams.cc |   17 +
 poppler/GlobalParams.h  |4 +++
 poppler/PSOutputDev.cc  |   59 ++--
 poppler/PSOutputDev.h   |2 +
 utils/pdftops.1 |8 +-
 utils/pdftops.cc|7 +
 7 files changed, 71 insertions(+), 27 deletions(-)

New commits:
commit e21a3e40bf6f4365064cea751ae186580d8f81f5
Author: William Bader 
Date:   Sat Aug 1 15:23:03 2009 +0200

Add the possibility of disabling font substitution in pdftops

Bug #23030

diff --git a/poppler/GlobalParams.cc b/poppler/GlobalParams.cc
index 177bc8a..1cf7208 100644
--- a/poppler/GlobalParams.cc
+++ b/poppler/GlobalParams.cc
@@ -20,6 +20,7 @@
 // Copyright (C) 2007 Krzysztof Kowalczyk 
 // Copyright (C) 2007, 2009 Jonathan Kew 
 // Copyright (C) 2009 Petr Gajdos 
+// Copyright (C) 2009 William Bader 
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -602,6 +603,7 @@ GlobalParams::GlobalParams(const char *customPopplerDataDir)
   psEmbedTrueType = gTrue;
   psEmbedCIDPostScript = gTrue;
   psEmbedCIDTrueType = gTrue;
+  psSubstFonts = gTrue;
   psPreload = gFalse;
   psOPI = gFalse;
   psASCIIHex = gFalse;
@@ -1280,6 +1282,15 @@ GBool GlobalParams::getPSEmbedCIDTrueType() {
   return e;
 }
 
+GBool GlobalParams::getPSSubstFonts() {
+  GBool e;
+
+  lockGlobalParams;
+  e = psSubstFonts;
+  unlockGlobalParams;
+  return e;
+}
+
 GBool GlobalParams::getPSPreload() {
   GBool preload;
 
@@ -1649,6 +1660,12 @@ void GlobalParams::setPSEmbedCIDTrueType(GBool embed) {
   unlockGlobalParams;
 }
 
+void GlobalParams::setPSSubstFonts(GBool substFonts) {
+  lockGlobalParams;
+  psSubstFonts = substFonts;
+  unlockGlobalParams;
+}
+
 void GlobalParams::setPSPreload(GBool preload) {
   lockGlobalParams;
   psPreload = preload;
diff --git a/poppler/GlobalParams.h b/poppler/GlobalParams.h
index 5a724af..27a41cc 100644
--- a/poppler/GlobalParams.h
+++ b/poppler/GlobalParams.h
@@ -20,6 +20,7 @@
 // Copyright (C) 2007 Krzysztof Kowalczyk 
 // Copyright (C) 2009 Jonathan Kew 
 // Copyright (C) 2009 Petr Gajdos 
+// Copyright (C) 2009 William Bader 
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -193,6 +194,7 @@ public:
   GBool getPSEmbedTrueType();
   GBool getPSEmbedCIDPostScript();
   GBool getPSEmbedCIDTrueType();
+  GBool getPSSubstFonts();
   GBool getPSPreload();
   GBool getPSOPI();
   GBool getPSASCIIHex();
@@ -238,6 +240,7 @@ public:
   void setPSEmbedTrueType(GBool embed);
   void setPSEmbedCIDPostScript(GBool embed);
   void setPSEmbedCIDTrueType(GBool embed);
+  void setPSSubstFonts(GBool substFonts);
   void setPSPreload(GBool preload);
   void setPSOPI(GBool opi);
   void setPSASCIIHex(GBool hex);
@@ -317,6 +320,7 @@ private:
   GBool psEmbedTrueType;   // embed TrueType fonts?
   GBool psEmbedCIDPostScript;  // embed CID PostScript fonts?
   GBool psEmbedCIDTrueType;// embed CID TrueType fonts?
+  GBool psSubstFonts;  // substitute missing fonts?
   GBool psPreload; // preload PostScript images and forms into
//   memory
   GBool psOPI; // generate PostScript OPI comments?
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 881427f..bebe48a 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -23,6 +23,7 @@
 // Copyright (C) 2009 Thomas Freitag 
 // Copyright (C) 2009 Till Kamppeter 
 // Copyright (C) 2009 Carlos Garcia Campos 
+// Copyright (C) 2009 William Bader 
 //
 // To see a description of the changes please see the Changelog file that
 // came with your tarball or type make ChangeLog if you are building from git
@@ -1106,6 +1107,7 @@ void PSOutputDev::init(PSOutputFunc outputFuncA, void 
*outputStreamA,
   paperHeight = 1;
 }
   }
+  substFonts = globalParams->getPSSubstFonts();
   preload = globalParams->getPSPreload();
   if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) {
 imgLLX = imgLLY = 0;
@@ -1751,34 +1753,39 @@ void PSOutputDev::setupFont(GfxFont *font, Dict 
*parentResDict) {
   }
 }
 if (!psName) {
-  if (font->isFixedWidth()) {
-   i = 8;
-  } else if (font->isSerif()) {
-   i = 4;
-  } else {
-   i = 0;
-  }
-  if (font->isBold()) {
-   i += 2;
-  }
-  if (font->isItalic()) {
-   i += 1;
-  }
-  psName = new GooString(psSubstFonts[i].psName);
-  for (code = 0; code < 256; ++code) {
-   if ((charName = ((Gfx8BitFont *)font)->getCharName(code)) &&
-   charName[0] == 'm' && charName[1] == '\0') {
- break;
+  if (substFonts) {
+   if (font->isFixedWidth()) {
+ i = 8;
+   } else if (font->isSerif()) {
+ i = 4;
+   } else {
+ i =

[poppler] poppler/Gfx.cc poppler/GfxState.h

2009-08-01 Thread Albert Astals Cid
 poppler/Gfx.cc |   13 +
 poppler/GfxState.h |1 +
 2 files changed, 14 insertions(+)

New commits:
commit 173451730948c320f16a0f5924a58302603eca0b
Author: Albert Astals Cid 
Date:   Sat Aug 1 15:13:35 2009 +0200

Try to workaround some incorrect PDF

Fixes rendering of PDF where forms/patterns have more q than Q. Fixes
rendering in splash of pdf in bugs #22835, #21899 and #16402

diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index eeefcac..ccf818a 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -4274,8 +4274,21 @@ void Gfx::doForm1(Object *str, Dict *resDict, double 
*matrix, double *bbox,
 baseMatrix[i] = state->getCTM()[i];
   }
 
+  GfxState *stateBefore = state;
+
   // draw the form
   display(str, gFalse);
+  
+  if (stateBefore != state) {
+if (state->isParentState(stateBefore)) {
+  error(-1, "There's a form with more q than Q, trying to fix");
+  while (stateBefore != state) {
+restoreState();
+  }
+} else {
+  error(-1, "There's a form with more Q than q");
+}
+  }
 
   if (softMask || transpGroup) {
 out->endTransparencyGroup(state);
diff --git a/poppler/GfxState.h b/poppler/GfxState.h
index 536c86a..51a317d 100644
--- a/poppler/GfxState.h
+++ b/poppler/GfxState.h
@@ -1269,6 +1269,7 @@ public:
   GfxState *save();
   GfxState *restore();
   GBool hasSaves() { return saved != NULL; }
+  GBool isParentState(GfxState *state) { return saved == state || (saved && 
saved->isParentState(state)); }
 
   // Misc
   GBool parseBlendMode(Object *obj, GfxBlendMode *mode);
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] CVE-2009-0146/0147/0166

2009-08-01 Thread Albert Astals Cid
A Dissabte, 1 d'agost de 2009, Michael S Gilbert va escriure:
> Hello,
>
> I am triaging the subject CVEs in debian.  Do you have any info or
> links to patches for these CVEs?  Gentoo's [1] and Ubuntu's [2] patch
> sets claim to address these, but it is not entirely clear that this is
> the case (they did not associate the CVE numbers with their code
> changes and there are no patch sets linked from mitre to verify
> against). Thank you for any info you can provide.

CVE is the game of people that make money about bugs, most of the time they 
don't even warn us nor give us PDF to try to reproduce the problems so i 
mostly ignore CVE.

The only CVE i was informed of and we worked to solve was the one that 
resulted in 
http://cgit.freedesktop.org/poppler/poppler/commit/?h=poppler-0.10&id=763bfd27a50a9f8176fe112823839549e4498a39
no idea if that's the one you want or not.

Albert

>
> Mike
>
> [1] http://bugs.gentoo.org/show_bug.cgi?id=263028
> [2]
> http://patches.ubuntu.com/by-release/extracted/intrepid-security/p/poppler/
>0.8.7-1ubuntu0.2/64_security_jbig2.patch
> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler

___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] CVE-2009-0146/0147/0166

2009-08-01 Thread Michael S Gilbert
Hello,

I am triaging the subject CVEs in debian.  Do you have any info or
links to patches for these CVEs?  Gentoo's [1] and Ubuntu's [2] patch
sets claim to address these, but it is not entirely clear that this is
the case (they did not associate the CVE numbers with their code
changes and there are no patch sets linked from mitre to verify
against). Thank you for any info you can provide.

Mike

[1] http://bugs.gentoo.org/show_bug.cgi?id=263028
[2] 
http://patches.ubuntu.com/by-release/extracted/intrepid-security/p/poppler/0.8.7-1ubuntu0.2/64_security_jbig2.patch
___
poppler mailing list
poppler@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/poppler