1 diff -Nur poppler.0_5_0/ChangeLog poppler.HEAD/ChangeLog
2 --- poppler.0_5_0/ChangeLog 2006-01-11 17:52:58.000000000 +0100
3 +++ poppler.HEAD/ChangeLog 2006-02-23 23:26:05.000000000 +0100
5 +2006-02-23 Albert Astals Cid <aacid@kde.org>
7 + * utils/Makefile.am: Do not build pdftoppm when SplashOutputDev is
8 + disabled as that does not work
10 +2006-02-18 Jeff Muizelaar <jeff@infidigm.net>
12 + * poppler/CairoOutputDev.cc:
13 + * poppler/CairoOutputDev.h:
14 + * poppler/GfxState.cc:
15 + * poppler/GfxState.h: Add support for drawSoftMaskedImage to
16 + CairoOutputDev. Ugly but works.
18 +2006-02-16 Jeff Muizelaar <jeff@infidigm.net>
20 + * poppler/CairoOutputDev.cc: Work around cairo bug when scaling
21 + 1x1 bitmaps. Fixes #3387. Also gives a performance improvement.
23 +2006-02-16 Albert Astals Cid <aacid@kde.org>
25 + * qt4/src/Makefile.am:
27 + * poppler/Makefile.am:
28 + * glib/Makefile.am: Update soname as we are not really compatible
29 + anymore with previous releases that had soname 0.0.0
31 +2006-02-13 Albert Astals Cid <aacid@kde.org>
33 + * poppler/ArthurOutputDev.cc: Make it compile after changing code so
34 + we did not pass files to freetype but buffers
36 +2006-02-13 Albert Astals Cid <aacid@kde.org>
38 + * poppler/PSOutputDev.cc: Commit setupExternalCIDTrueTypeFont patch
39 + kpdf got from Takashi Iwai (SuSe) a long time ago
41 +2006-02-06 Albert Astals Cid <aacid@kde.org>
46 + * splash/SplashTypes.h: Various fixes from Frank Meerkötter to enable
47 + fixedpoint arithmetic
49 +2006-02-06 Albert Astals Cid <aacid@kde.org>
51 + * poppler/Annot.cc: Fix small leaks
52 + * poppler/JBIG2Stream.cc: Remove check improving as really did not
55 +2006-02-05 Albert Astals Cid <aacid@kde.org>
57 + * poppler/Gfx.cc: Fix small leak
58 + * poppler/GfxFont.cc: I needed that guard in kpdf to fix a crash and
59 + it surely does not hurt
60 + * poppler/JBIG2Stream.cc: Improve check (comes from kpdf)
61 + * poppler/SplashOutputDev.cc: Unneeded var--
63 +2006-02-04 Jeff Muizelaar <jeff@infidigm.net>
66 + * poppler/OutputDev.cc:
67 + * poppler/OutputDev.h: Let output devices know about pdf grouping
69 + Patch by Thorkild Stray.
71 +2006-02-04 Jeff Muizelaar <jeff@infidigm.net>
73 + * poppler/GlobalParams.cc: Check all fonts returned by fontconfig.
74 + Discard the ones that are not truetype or type1. Fixes #5758.
77 +2006-02-04 Albert Astals Cid <aacid@kde.org>
79 + * utils/Makefile.am:
80 + * utils/pdftoppm.cc: Actually create pdftoppm patch by Stefan
82 + * utils/pdf2xml.dtd: Added a DTD of the xml pdftohtml creates patch by
84 + * poppler/SplashOutputDev.cc: Remove bug from "do not use an external
85 + file to pass fonts to Freetype" patch, patch by Stefan Schweizer
88 +2006-02-02 Albert Astals Cid <aacid@kde.org>
90 + * splash/SplashXPathScanner.cc: CVE-2006-0301 fix by Derek (xpdf man
91 + itslef) got though Dirk Mueller of KDE security team
93 +2006-02-02 Albert Astals Cid <aacid@kde.org>
95 + * fofi/FoFiTrueType.cc:
96 + * fofi/FoFiTrueType.h:
97 + * fofi/FoFiType1C.h:
99 + * poppler/GfxFont.cc:
100 + * poppler/GfxFont.h:
101 + * poppler/GlobalParams.cc:
102 + * poppler/GlobalParams.h:
103 + * poppler/SplashOutputDev.cc:
104 + * splash/SplashFTFontEngine.cc:
105 + * splash/SplashFTFontEngine.h:
106 + * splash/SplashFTFontFile.cc:
107 + * splash/SplashFTFontFile.h:
108 + * splash/SplashFontEngine.cc:
109 + * splash/SplashFontEngine.h:
110 + * splash/SplashFontFile.cc:
111 + * splash/SplashFontFile.h:
112 + * splash/SplashT1FontEngine.cc:
113 + * splash/SplashT1FontFile.cc:
114 + * splash/SplashT1FontFile.h: Merge patch to not use external file
115 + when passing the font to Freetype, original patch by Takashi Iwai
116 + adapted by me to kpdf rediffed by Stefan Schweizer against poppler
119 +2006-01-31 Jeff Muizelaar <jeff@infidigm.net>
121 + * poppler/GlobalParams.cc (GlobalParams::getDisplayFont):
122 + Allow ttc fonts to be used.
124 +2006-01-28 Jeff Muizelaar <jeff@infidigm.net>
126 + * glib/poppler-attachment.h: fix compile by adding <time.h> include.
127 + Acked-by: Jonathan Blanford <jrb@redhat.com>
129 +2006-01-26 Kristian Høgsberg <krh@redhat.com>
131 + * poppler/CairoOutputDev.cc: Patch from Christian Krause; handle
132 + 0-width lines (#5545).
134 +Tue Jan 24 01:19:40 2006 Jonathan Blandford <jrb@redhat.com>
136 + * glib/Makefile.am:
137 + * glib/poppler-attachment.cc:
138 + * glib/poppler-attachment.h:
139 + * glib/poppler-document.cc:
140 + * glib/poppler-document.h:
141 + * glib/poppler-page.cc:
142 + * glib/poppler-private.h:
144 + * glib/test-poppler-glib.c:
145 + * glib/reference/tmpl/poppler-enums.sgml:
146 + * glib/reference/tmpl/poppler-unused.sgml: glib bindings for the
147 + embedded file support. It doesn't support mtime and ctime yet,
148 + but the rest works.
150 +2006-01-23 Kristian Høgsberg <krh@redhat.com>
153 + * poppler/GlobalParams.cc:
154 + * poppler/poppler-config.h.in:
155 + * utils/pdftohtml.cc:
156 + * utils/pdftops.cc: Respect command line paper size settings (#5641).
157 + Drop the built-in paper sizes.
159 +2006-01-23 Kristian Høgsberg <krh@redhat.com>
161 + * glib/test-poppler-glib.c (print_document_info, print_index):
162 + Move variable declarations to top (#5692).
164 + * utils/*.cc: Move config.h #include to top of #include's (#5693).
166 + * splash/SplashFTFont.cc: Don't use deprecated freetype include
169 +2006-01-21 Jeff Muizelaar <jeff@infidigm.net>
171 + * TODO: Add my todo list.
173 +2006-01-18 Albert Astals Cid <aacid@kde.org>
175 + * glib/poppler-action.cc:
176 + * glib/poppler-document.cc:
177 + * poppler/Annot.cc:
178 + * poppler/Catalog.cc:
179 + * poppler/Catalog.h:
182 + * poppler/FontInfo.cc:
183 + * poppler/Function.cc:
185 + * poppler/GfxFont.cc:
186 + * poppler/GfxState.cc:
189 + * poppler/Makefile.am:
190 + * poppler/Object.h:
191 + * poppler/Outline.cc:
192 + * poppler/PDFDoc.cc:
193 + * poppler/PDFDoc.h:
194 + * poppler/PSOutputDev.cc:
196 + * poppler/PageLabelInfo.cc:
197 + * poppler/Parser.cc:
198 + * poppler/SecurityHandler.cc:
199 + * poppler/Stream.cc:
201 + * qt/poppler-document.cc:
202 + * qt/poppler-page-transition.cc:
203 + * qt4/src/Makefile.am:
204 + * qt4/src/poppler-document.cc:
205 + * qt4/src/poppler-private.h:
206 + * qt4/src/poppler-qt4.h:
207 + * qt4/tests/Makefile.am:
208 + * utils/HtmlOutputDev.cc:
209 + * utils/pdffonts.cc:
210 + * utils/pdfinfo.cc:
211 + * utils/pdftohtml.cc:
212 + * utils/pdftotext.cc: Brad patch for embedded document extraction,
213 + only has Qt4 bindings for now, needs Qt3 and glib work
215 +2006-01-18 Albert Astals Cid <aacid@kde.org>
217 + * qt/poppler-page-transition.h:
218 + * qt4/src/Doxyfile: Add some more documentation to PageTransition,
219 + patch by Stefan Kebekus
221 +2006-01-18 Albert Astals Cid <aacid@kde.org>
223 + * poppler/CharCodeToUnicode.cc: Fix check for length that was not
224 + having into account that there could be \n or \r in tokens an that
225 + those do not have to be took into account. Fixes
226 + http://bugs.kde.org/show_bug.cgi?id=120310
228 +2006-01-17 Albert Astals Cid <aacid@kde.org>
230 + * poppler/Lexer.cc:
232 + * poppler/Parser.cc:
233 + * poppler/Parser.h:
235 + * poppler/XRef.h: When doing the parsing check with XREF we did not
236 + grow too much. Fixes serialata10a.pdf
238 +2006-01-12 Jeff Muizelaar <jeff@infidigm.net>
240 + * poppler/GlobalParams.cc: Make buildFcPattern() static.
242 2006-01-11 Kristian Høgsberg <krh@redhat.com>
244 * poppler/JBIG2Stream.cc:
245 diff -Nur poppler.0_5_0/configure.ac poppler.HEAD/configure.ac
246 --- poppler.0_5_0/configure.ac 2006-01-06 11:05:58.000000000 +0100
247 +++ poppler.HEAD/configure.ac 2006-02-06 21:49:21.000000000 +0100
249 AC_CHECK_FUNC(gettimeofday, AC_DEFINE(HAVE_GETTIMEOFDAY, 1, [Defines if gettimeofday is available on your system]))
251 dnl Enable these unconditionally.
252 -AC_DEFINE([A4_PAPER], [1], [Default to A4 paper.])
253 AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.])
254 AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.])
255 AC_DEFINE([TEXTOUT_WORD_LIST], [1], [Enable word list support.])
258 AC_ARG_ENABLE(fixedpoint,
259 [ --enable-fixedpoint use fixed point (instead of floating point) arithmetic],
260 -AC_DEFINE(USE_FIXEDPOINT, [], [Use fixed point arithmetic]))
261 +AC_DEFINE(USE_FIXEDPOINT, [1], [Use fixed point arithmetic]))
263 dnl ##### Path to xpdfrc.
264 dnl This ugly kludge to get the sysconfdir path is needed because
265 @@ -243,19 +242,13 @@
266 AM_CONDITIONAL(BUILD_POPPLER_QT4, test x$enable_poppler_qt4 = xyes)
268 if test x$enable_poppler_qt4 = xyes; then
269 - POPPLER_FIND_QT4TEST(POPPLER_QTTEST)
270 + POPPLER_FIND_QT4TEST(POPPLER_QTTEST,
271 + [enable_poppler_qt4testlib="yes"],
272 + [enable_poppler_qt4testlib="no"])
273 AC_SUBST(POPPLER_QTTEST_CXXFLAGS)
274 AC_SUBST(POPPLER_QTTEST_LIBS)
277 -if test x$have_qt4testlib = xno ; then
278 - AC_MSG_WARN([QtTestLib libraries not found])
281 -if test x$have_qt4testlib = xyes; then
282 - enable_poppler_qt4testlib="yes"
284 - enable_poppler_qt4testlib="no"
285 + enable_poppler_qt4testlib="no"
288 AM_CONDITIONAL(BUILD_POPPLER_QT4TESTS, test x$enable_poppler_qt4testlib = xyes)
289 diff -Nur poppler.0_5_0/fofi/FoFiTrueType.cc poppler.HEAD/fofi/FoFiTrueType.cc
290 --- poppler.0_5_0/fofi/FoFiTrueType.cc 2005-09-14 23:20:36.000000000 +0200
291 +++ poppler.HEAD/fofi/FoFiTrueType.cc 2006-02-02 23:50:01.000000000 +0100
292 @@ -241,10 +241,10 @@
294 //------------------------------------------------------------------------
296 -FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA) {
297 +FoFiTrueType *FoFiTrueType::make(char *fileA, int lenA, int faceIndexA) {
300 - ff = new FoFiTrueType(fileA, lenA, gFalse);
301 + ff = new FoFiTrueType(fileA, lenA, gFalse, faceIndexA);
309 -FoFiTrueType *FoFiTrueType::load(char *fileName) {
310 +FoFiTrueType *FoFiTrueType::load(char *fileName, int faceIndexA) {
315 if (!(fileA = FoFiBase::readFile(fileName, &lenA))) {
318 - ff = new FoFiTrueType(fileA, lenA, gTrue);
319 + ff = new FoFiTrueType(fileA, lenA, gTrue, faceIndexA);
327 -FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA):
328 +FoFiTrueType::FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA):
329 FoFiBase(fileA, lenA, freeFileDataA)
336 + faceIndex = faceIndexA;
340 @@ -1535,9 +1536,12 @@
344 +#define toTag(a,b,c,d) (((unsigned int)(a)<<24) | ((unsigned int)(b)<<16) | ((unsigned int)(c)<<8) | (d))
346 void FoFiTrueType::parse() {
353 @@ -1556,12 +1560,37 @@
356 // read the table directory
357 - nTables = getU16BE(pos + 4, &parsedOk);
358 + head = getU32BE(pos, &parsedOk);
361 + if (head == toTag('t','t','c','f')) {
363 + unsigned int tableDir;
366 + dircount = getU32BE(8, &parsedOk);
374 + if (faceIndex >= dircount)
376 + pos = getU32BE(12 + faceIndex * 4, &parsedOk);
382 + nTables = getU16BE(pos, &parsedOk);
388 tables = (TrueTypeTable *)gmallocn(nTables, sizeof(TrueTypeTable));
390 for (i = 0; i < nTables; ++i) {
391 tables[i].tag = getU32BE(pos, &parsedOk);
392 tables[i].checksum = getU32BE(pos + 4, &parsedOk);
393 diff -Nur poppler.0_5_0/fofi/FoFiTrueType.h poppler.HEAD/fofi/FoFiTrueType.h
394 --- poppler.0_5_0/fofi/FoFiTrueType.h 2005-09-14 23:20:36.000000000 +0200
395 +++ poppler.HEAD/fofi/FoFiTrueType.h 2006-02-02 23:50:01.000000000 +0100
399 // Create a FoFiTrueType object from a memory buffer.
400 - static FoFiTrueType *make(char *fileA, int lenA);
401 + static FoFiTrueType *make(char *fileA, int lenA, int faceIndexA=0);
403 // Create a FoFiTrueType object from a file on disk.
404 - static FoFiTrueType *load(char *fileName);
405 + static FoFiTrueType *load(char *fileName, int faceIndexA=0);
407 + FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA=0);
408 virtual ~FoFiTrueType();
410 // Return the number of cmaps defined by this font.
415 - FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA);
416 void cvtEncoding(char **encoding,
417 FoFiOutputFunc outputFunc,
427 diff -Nur poppler.0_5_0/fofi/FoFiType1C.h poppler.HEAD/fofi/FoFiType1C.h
428 --- poppler.0_5_0/fofi/FoFiType1C.h 2005-09-14 23:20:36.000000000 +0200
429 +++ poppler.HEAD/fofi/FoFiType1C.h 2006-02-02 23:50:01.000000000 +0100
431 // Create a FoFiType1C object from a file on disk.
432 static FoFiType1C *load(char *fileName);
434 + FoFiType1C(char *fileA, int lenA, GBool freeFileDataA);
435 virtual ~FoFiType1C();
437 // Return the font name.
442 - FoFiType1C(char *fileA, int lenA, GBool freeFileDataA);
443 void eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName,
444 int offset, int nBytes,
445 Type1CIndex *subrIdx,
446 diff -Nur poppler.0_5_0/glib/Makefile.am poppler.HEAD/glib/Makefile.am
447 --- poppler.0_5_0/glib/Makefile.am 2006-01-02 01:06:46.000000000 +0100
448 +++ poppler.HEAD/glib/Makefile.am 2006-02-16 20:28:54.000000000 +0100
453 + poppler-attachment.h \
456 poppler_glib_includedir = $(includedir)/poppler/glib
459 poppler-document.cc \
461 + poppler-attachment.cc \
469 +libpoppler_glib_la_LDFLAGS = -version-info 1:0:0
471 noinst_PROGRAMS = test-poppler-glib
473 test_poppler_glib_SOURCES = \
474 diff -Nur poppler.0_5_0/glib/poppler-action.cc poppler.HEAD/glib/poppler-action.cc
475 --- poppler.0_5_0/glib/poppler-action.cc 2005-12-31 03:10:33.000000000 +0100
476 +++ poppler.HEAD/glib/poppler-action.cc 2006-01-18 23:32:13.000000000 +0100
481 - GooString *named_dest;
482 + UGooString *named_dest;
484 /* Return if it isn't OK */
485 if (! link->isOk ()) {
486 diff -Nur poppler.0_5_0/glib/poppler-attachment.cc poppler.HEAD/glib/poppler-attachment.cc
487 --- poppler.0_5_0/glib/poppler-attachment.cc 1970-01-01 01:00:00.000000000 +0100
488 +++ poppler.HEAD/glib/poppler-attachment.cc 2006-01-24 07:21:39.000000000 +0100
490 +/* poppler-attachment.cc: glib wrapper for poppler
491 + * Copyright (C) 2006, Red Hat, Inc.
493 + * This program is free software; you can redistribute it and/or modify
494 + * it under the terms of the GNU General Public License as published by
495 + * the Free Software Foundation; either version 2, or (at your option)
496 + * any later version.
498 + * This program is distributed in the hope that it will be useful,
499 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
500 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
501 + * GNU General Public License for more details.
503 + * You should have received a copy of the GNU General Public License
504 + * along with this program; if not, write to the Free Software
505 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
510 +#include <glib/gstdio.h>
512 +#include "poppler.h"
513 +#include "poppler-private.h"
514 +#include "poppler-attachment.h"
516 +/* FIXME: We need to add gettext support sometime */
519 +typedef struct _PopplerAttachmentPrivate PopplerAttachmentPrivate;
520 +struct _PopplerAttachmentPrivate
525 +#define POPPLER_ATTACHMENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachmentPrivate))
527 +static void poppler_attachment_finalize (GObject *obj);
529 +G_DEFINE_TYPE (PopplerAttachment, poppler_attachment, G_TYPE_OBJECT);
532 +poppler_attachment_init (PopplerAttachment *attachment)
538 +poppler_attachment_class_init (PopplerAttachmentClass *klass)
540 + G_OBJECT_CLASS (klass)->finalize = poppler_attachment_finalize;
541 + g_type_class_add_private (klass, sizeof (PopplerAttachmentPrivate));
545 +poppler_attachment_finalize (GObject *obj)
547 + PopplerAttachment *attachment;
549 + attachment = (PopplerAttachment *) obj;
550 + POPPLER_ATTACHMENT_GET_PRIVATE (attachment)->obj_stream.free();
553 +/* Public functions */
556 +_poppler_attachment_new (PopplerDocument *document,
559 + PopplerAttachment *attachment;
561 + g_assert (document != NULL);
562 + g_assert (emb_file != NULL);
564 + attachment = (PopplerAttachment *) g_object_new (POPPLER_TYPE_ATTACHMENT, NULL);
566 + if (emb_file->name ())
567 + attachment->name = g_strdup (emb_file->name ()->getCString ());
568 + if (emb_file->description ())
569 + attachment->description = g_strdup (emb_file->description ()->getCString ());
571 + emb_file->streamObject().copy(&POPPLER_ATTACHMENT_GET_PRIVATE (attachment)->obj_stream);
577 +save_helper (const gchar *buf,
582 + FILE *f = (FILE *) data;
585 + n = fwrite (buf, 1, count, f);
588 + g_set_error (error,
590 + g_file_error_from_errno (errno),
591 + _("Error writing to image file: %s"),
592 + g_strerror (errno));
600 + * poppler_attachment_save:
601 + * @attachment: A #PopplerAttachment.
602 + * @filename: name of file to save
603 + * @error: return location for error, or %NULL.
605 + * Saves @attachment to a file indicated by @filename. If @error is set, %FALSE
606 + * will be returned. Possible errors include those in the #G_FILE_ERROR domain
607 + * and whatever the save function generates.
609 + * Return value: %TRUE, if the file successfully saved
612 +poppler_attachment_save (PopplerAttachment *attachment,
613 + const char *filename,
619 + g_return_val_if_fail (POPPLER_IS_ATTACHMENT (attachment), FALSE);
621 + f = g_fopen (filename, "wb");
625 + gchar *display_name = g_filename_display_name (filename);
626 + g_set_error (error,
628 + g_file_error_from_errno (errno),
629 + _("Failed to open '%s' for writing: %s"),
631 + g_strerror (errno));
632 + g_free (display_name);
636 + result = poppler_attachment_save_to_callback (attachment, save_helper, f, error);
638 + if (fclose (f) < 0)
640 + gchar *display_name = g_filename_display_name (filename);
641 + g_set_error (error,
643 + g_file_error_from_errno (errno),
644 + _("Failed to close '%s', all data may not have been saved: %s"),
646 + g_strerror (errno));
647 + g_free (display_name);
654 +#define BUF_SIZE 1024
657 + * poppler_attachment_save_to_callback:
658 + * @attachment: A #GdkPixbuf.
659 + * @save_func: a function that is called to save each block of data that the save routine generates.
660 + * @user_data: user data to pass to the save function.
661 + * @error: return location for error, or %NULL.
663 + * Saves @attachment by feeding the produced data to @save_func. Can be used
664 + * when you want to store the attachment to something other than a file, such as
665 + * an in-memory buffer or a socket. If @error is set, %FALSE will be
666 + * returned. Possible errors include those in the #G_FILE_ERROR domain and
667 + * whatever the save function generates.
669 + * Return value: %TRUE, if the save successfully completed
672 +poppler_attachment_save_to_callback (PopplerAttachment *attachment,
673 + PopplerAttachmentSaveFunc save_func,
674 + gpointer user_data,
678 + gchar buf[BUF_SIZE];
680 + gboolean eof_reached = FALSE;
682 + g_return_val_if_fail (POPPLER_IS_ATTACHMENT (attachment), FALSE);
684 + stream = POPPLER_ATTACHMENT_GET_PRIVATE (attachment)->obj_stream.getStream();
691 + for (i = 0; i < BUF_SIZE; i++)
693 + data = stream->getChar ();
696 + eof_reached = TRUE;
704 + if (! (save_func) (buf, i, user_data, error))
708 + while (! eof_reached);
713 diff -Nur poppler.0_5_0/glib/poppler-attachment.h poppler.HEAD/glib/poppler-attachment.h
714 --- poppler.0_5_0/glib/poppler-attachment.h 1970-01-01 01:00:00.000000000 +0100
715 +++ poppler.HEAD/glib/poppler-attachment.h 2006-01-29 06:16:31.000000000 +0100
717 +/* poppler-attachment.h: glib interface to poppler
718 + * Copyright (C) 2004, Red Hat, Inc.
720 + * This program is free software; you can redistribute it and/or modify
721 + * it under the terms of the GNU General Public License as published by
722 + * the Free Software Foundation; either version 2, or (at your option)
723 + * any later version.
725 + * This program is distributed in the hope that it will be useful,
726 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
727 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
728 + * GNU General Public License for more details.
730 + * You should have received a copy of the GNU General Public License
731 + * along with this program; if not, write to the Free Software
732 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
735 +#ifndef __POPPLER_ATTACHMENT_H__
736 +#define __POPPLER_ATTACHMENT_H__
739 +#include <glib-object.h>
741 +#include "poppler.h"
746 +#define POPPLER_TYPE_ATTACHMENT (poppler_attachment_get_type ())
747 +#define POPPLER_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), POPPLER_TYPE_ATTACHMENT, PopplerAttachment))
748 +#define POPPLER_IS_ATTACHMENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), POPPLER_TYPE_ATTACHMENT))
751 +typedef gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf,
756 +typedef struct _PopplerAttachment
761 + const char *description;
764 +} PopplerAttachment;
766 +typedef struct _PopplerAttachmentClass
768 + GObjectClass parent_class;
769 +} PopplerAttachmentClass;
772 +GType poppler_attachment_get_type (void) G_GNUC_CONST;
773 +gboolean poppler_attachment_save (PopplerAttachment *attachment,
774 + const char *filename,
776 +gboolean poppler_attachment_save_to_callback (PopplerAttachment *attachment,
777 + PopplerAttachmentSaveFunc save_func,
778 + gpointer user_data,
784 +#endif /* __POPPLER_ATTACHMENT_H__ */
785 diff -Nur poppler.0_5_0/glib/poppler-document.cc poppler.HEAD/glib/poppler-document.cc
786 --- poppler.0_5_0/glib/poppler-document.cc 2005-12-31 03:10:33.000000000 +0100
787 +++ poppler.HEAD/glib/poppler-document.cc 2006-01-24 07:21:39.000000000 +0100
790 #include <FontInfo.h>
791 #include <PDFDocEncoding.h>
792 +#include <UGooString.h>
795 #include "poppler-private.h"
796 +#include "poppler-attachment.h"
797 #include "poppler-enums.h"
801 return poppler_document_get_page (document, index);
805 + * poppler_document_has_attachments:
806 + * @document: A #PopplerDocument
808 + * Returns %TRUE of @document has any attachments.
810 + * Return value: %TRUE, if @document has attachments.
813 +poppler_document_has_attachments (PopplerDocument *document)
818 + g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), FALSE);
820 + catalog = document->doc->getCatalog ();
821 + if (catalog && catalog->isOk ())
823 + n_files = catalog->numEmbeddedFiles ();
826 + return (n_files != 0);
830 + * poppler_document_get_attachments:
831 + * @document: A #PopplerDocument
833 + * Returns a #GList containing #PopplerAttachment<!-- -->s. These attachments
834 + * are unowned, and must be unreffed, and the list must be freed with
837 + * Return value: a list of available attachments.
840 +poppler_document_get_attachments (PopplerDocument *document)
844 + GList *retval = NULL;
846 + g_return_val_if_fail (POPPLER_IS_DOCUMENT (document), NULL);
848 + catalog = document->doc->getCatalog ();
849 + if (catalog == NULL || ! catalog->isOk ())
852 + n_files = catalog->numEmbeddedFiles ();
853 + for (i = 0; i < n_files; i++)
855 + PopplerAttachment *attachment;
858 + emb_file = catalog->embeddedFile (i);
859 + attachment = _poppler_attachment_new (document, emb_file);
861 + retval = g_list_prepend (retval, attachment);
863 + return g_list_reverse (retval);
867 has_unicode_marker (GooString *string)
869 diff -Nur poppler.0_5_0/glib/poppler-document.h poppler.HEAD/glib/poppler-document.h
870 --- poppler.0_5_0/glib/poppler-document.h 2005-12-31 03:10:33.000000000 +0100
871 +++ poppler.HEAD/glib/poppler-document.h 2006-01-24 07:21:39.000000000 +0100
874 PopplerPage *poppler_document_get_page_by_label (PopplerDocument *document,
877 +gboolean poppler_document_has_attachments (PopplerDocument *document);
878 +GList *poppler_document_get_attachments (PopplerDocument *document);
882 /* Interface for getting the Index of a poppler_document */
885 void poppler_ps_file_free (PopplerPSFile *ps_file);
891 #endif /* __POPPLER_DOCUMENT_H__ */
892 diff -Nur poppler.0_5_0/glib/poppler.h poppler.HEAD/glib/poppler.h
893 --- poppler.0_5_0/glib/poppler.h 2005-06-20 19:58:38.000000000 +0200
894 +++ poppler.HEAD/glib/poppler.h 2006-01-24 07:21:39.000000000 +0100
896 #include "poppler-page.h"
897 #include "poppler-action.h"
898 #include "poppler-enums.h"
899 +#include "poppler-attachment.h"
901 #endif /* __POPPLER_GLIB_H__ */
902 diff -Nur poppler.0_5_0/glib/poppler-page.cc poppler.HEAD/glib/poppler-page.cc
903 --- poppler.0_5_0/glib/poppler-page.cc 2005-12-31 03:10:33.000000000 +0100
904 +++ poppler.HEAD/glib/poppler-page.cc 2006-01-24 07:21:39.000000000 +0100
906 -/* poppler.h: glib wrapper for poppler
907 +/* poppler-page.cc: glib wrapper for poppler
908 * Copyright (C) 2005, Red Hat, Inc.
910 * This program is free software; you can redistribute it and/or modify
911 diff -Nur poppler.0_5_0/glib/poppler-private.h poppler.HEAD/glib/poppler-private.h
912 --- poppler.0_5_0/glib/poppler-private.h 2005-08-22 20:20:12.000000000 +0200
913 +++ poppler.HEAD/glib/poppler-private.h 2006-01-24 07:21:39.000000000 +0100
916 #include <FontInfo.h>
917 #include <TextOutputDev.h>
918 +#include <Catalog.h>
920 +#include "poppler-attachment.h"
922 #if defined (HAVE_CAIRO)
923 #include <CairoOutputDev.h>
929 +PopplerAttachment *_poppler_attachment_new (PopplerDocument *document,
932 diff -Nur poppler.0_5_0/glib/reference/tmpl/poppler-enums.sgml poppler.HEAD/glib/reference/tmpl/poppler-enums.sgml
933 --- poppler.0_5_0/glib/reference/tmpl/poppler-enums.sgml 2006-01-06 11:05:58.000000000 +0100
934 +++ poppler.HEAD/glib/reference/tmpl/poppler-enums.sgml 2006-01-24 07:21:39.000000000 +0100
936 <!-- ##### SECTION Stability_Level ##### -->
939 +<!-- ##### MACRO POPPLER_TYPE_ACTION_TYPE ##### -->
946 +<!-- ##### FUNCTION poppler_action_type_get_type ##### -->
954 +<!-- ##### MACRO POPPLER_TYPE_DEST_TYPE ##### -->
961 +<!-- ##### FUNCTION poppler_dest_type_get_type ##### -->
969 +<!-- ##### MACRO POPPLER_TYPE_PAGE_LAYOUT ##### -->
976 +<!-- ##### FUNCTION poppler_page_layout_get_type ##### -->
984 +<!-- ##### MACRO POPPLER_TYPE_PAGE_MODE ##### -->
991 +<!-- ##### FUNCTION poppler_page_mode_get_type ##### -->
999 +<!-- ##### MACRO POPPLER_TYPE_FONT_TYPE ##### -->
1006 +<!-- ##### FUNCTION poppler_font_type_get_type ##### -->
1014 +<!-- ##### MACRO POPPLER_TYPE_VIEWER_PREFERENCES ##### -->
1021 +<!-- ##### FUNCTION poppler_viewer_preferences_get_type ##### -->
1029 +<!-- ##### MACRO POPPLER_TYPE_PERMISSIONS ##### -->
1036 +<!-- ##### FUNCTION poppler_permissions_get_type ##### -->
1044 +<!-- ##### MACRO POPPLER_TYPE_ERROR ##### -->
1051 +<!-- ##### FUNCTION poppler_error_get_type ##### -->
1059 +<!-- ##### MACRO POPPLER_TYPE_ORIENTATION ##### -->
1066 +<!-- ##### FUNCTION poppler_orientation_get_type ##### -->
1074 +<!-- ##### MACRO POPPLER_TYPE_BACKEND ##### -->
1081 +<!-- ##### FUNCTION poppler_backend_get_type ##### -->
1089 diff -Nur poppler.0_5_0/glib/reference/tmpl/poppler-unused.sgml poppler.HEAD/glib/reference/tmpl/poppler-unused.sgml
1090 --- poppler.0_5_0/glib/reference/tmpl/poppler-unused.sgml 2006-01-06 11:05:58.000000000 +0100
1091 +++ poppler.HEAD/glib/reference/tmpl/poppler-unused.sgml 2006-01-24 07:21:39.000000000 +0100
1093 -<!-- ##### MACRO POPPLER_TYPE_ACTION_TYPE ##### -->
1099 -<!-- ##### MACRO POPPLER_TYPE_BACKEND ##### -->
1105 -<!-- ##### MACRO POPPLER_TYPE_DEST_TYPE ##### -->
1111 -<!-- ##### MACRO POPPLER_TYPE_ERROR ##### -->
1117 -<!-- ##### MACRO POPPLER_TYPE_FONT_TYPE ##### -->
1123 -<!-- ##### MACRO POPPLER_TYPE_ORIENTATION ##### -->
1129 -<!-- ##### MACRO POPPLER_TYPE_PAGE_LAYOUT ##### -->
1135 -<!-- ##### MACRO POPPLER_TYPE_PAGE_MODE ##### -->
1141 -<!-- ##### MACRO POPPLER_TYPE_PERMISSIONS ##### -->
1147 -<!-- ##### MACRO POPPLER_TYPE_VIEWER_PREFERENCES ##### -->
1153 -<!-- ##### FUNCTION poppler_action_type_get_type ##### -->
1160 -<!-- ##### FUNCTION poppler_backend_get_type ##### -->
1167 -<!-- ##### FUNCTION poppler_dest_type_get_type ##### -->
1174 -<!-- ##### FUNCTION poppler_error_get_type ##### -->
1181 -<!-- ##### FUNCTION poppler_font_type_get_type ##### -->
1188 -<!-- ##### FUNCTION poppler_orientation_get_type ##### -->
1195 -<!-- ##### FUNCTION poppler_page_layout_get_type ##### -->
1202 -<!-- ##### FUNCTION poppler_page_mode_get_type ##### -->
1209 -<!-- ##### FUNCTION poppler_permissions_get_type ##### -->
1216 -<!-- ##### FUNCTION poppler_viewer_preferences_get_type ##### -->
1223 diff -Nur poppler.0_5_0/glib/test-poppler-glib.c poppler.HEAD/glib/test-poppler-glib.c
1224 --- poppler.0_5_0/glib/test-poppler-glib.c 2005-12-31 03:10:33.000000000 +0100
1225 +++ poppler.HEAD/glib/test-poppler-glib.c 2006-01-24 07:21:39.000000000 +0100
1229 PopplerAction *action;
1230 + PopplerIndexIter *child;
1232 action = poppler_index_iter_get_action (iter);
1233 g_print ("Action: %d\n", action->type);
1234 poppler_action_free (action);
1235 - PopplerIndexIter *child = poppler_index_iter_get_child (iter);
1236 + child = poppler_index_iter_get_child (iter);
1238 print_index (child);
1239 poppler_index_iter_free (child);
1241 PopplerViewerPreferences view_prefs;
1242 PopplerFontInfo *font_info;
1243 PopplerFontsIter *fonts_iter;
1244 + PopplerIndexIter *index_iter;
1245 GEnumValue *enum_value;
1247 g_object_get (document,
1250 poppler_font_info_free (font_info);
1252 - PopplerIndexIter *index_iter;
1253 index_iter = poppler_index_iter_new (document);
1256 @@ -197,7 +198,31 @@
1258 printf (" (%f,%f)-(%f,%f)\n", rect->x1, rect->y1, rect->x2, rect->y2);
1262 + if (poppler_document_has_attachments (document))
1266 + g_print ("Attachments found:\n\n");
1268 + list = poppler_document_get_attachments (document);
1269 + for (l = list; l; l = l->next)
1271 + PopplerAttachment *attachment;
1274 + name = g_strdup_printf ("/tmp/attach%d", i);
1275 + attachment = l->data;
1276 + g_print ("\tname: %s\n", attachment->name);
1277 + g_print ("\tdescription: %s\n\n", attachment->description);
1278 + poppler_attachment_save (attachment, name, NULL);
1281 + g_list_foreach (list, g_object_unref, NULL);
1282 + g_list_free (list);
1285 + g_print ("no attachment\n");
1287 g_object_unref (G_OBJECT (page));
1289 diff -Nur poppler.0_5_0/goo/FixedPoint.h poppler.HEAD/goo/FixedPoint.h
1290 --- poppler.0_5_0/goo/FixedPoint.h 2005-09-16 20:29:18.000000000 +0200
1291 +++ poppler.HEAD/goo/FixedPoint.h 2006-02-06 21:49:21.000000000 +0100
1293 #ifndef FIXEDPOINT_H
1294 #define FIXEDPOINT_H
1297 +#include <config.h>
1301 diff -Nur poppler.0_5_0/goo/gfile.cc poppler.HEAD/goo/gfile.cc
1302 --- poppler.0_5_0/goo/gfile.cc 2005-03-03 20:45:58.000000000 +0100
1303 +++ poppler.HEAD/goo/gfile.cc 2006-02-02 23:50:01.000000000 +0100
1304 @@ -489,6 +489,14 @@
1306 (*name)->append("/XXXXXX")->append(ext);
1307 fd = mkstemps((*name)->getCString(), strlen(ext));
1308 +#elif defined(HAVE_MKSTEMP)
1309 + if ((s = getenv("TMPDIR"))) {
1310 + *name = new GooString(s);
1312 + *name = new GooString("/tmp");
1314 + (*name)->append("/XXXXXX")->append(ext);
1315 + fd = mkstemp((*name)->getCString());
1317 if (!(s = tmpnam(NULL))) {
1319 diff -Nur poppler.0_5_0/m4/qt.m4 poppler.HEAD/m4/qt.m4
1320 --- poppler.0_5_0/m4/qt.m4 2006-01-06 11:05:58.000000000 +0100
1321 +++ poppler.HEAD/m4/qt.m4 2006-01-10 22:57:28.000000000 +0100
1322 @@ -156,6 +156,11 @@
1323 qt4_incdirs="/usr/local/qt/include /usr/include/qt4 /usr/include/qt /usr/include /usr/X11R6/include/X11/qt /usr/X11R6/include/qt /usr/lib/qt/include"
1324 qt4_libdirs="/usr/local/qt/lib /usr/lib/qt /usr/lib /usr/X11R6/lib/X11/qt /usr/X11R6/lib/qt /usr/lib/qt/lib"
1326 +if test -n "$QTDIR" ; then
1327 + qt4_incdirs="$QTDIR/include $qt4_incdirs"
1328 + qt4_libdirs="$QTDIR/lib $qt4_libdirs"
1332 qt4test_test_include="QtTest/QtTest"
1333 qt4test_test_la_library="libQtTest.la"
1334 diff -Nur poppler.0_5_0/poppler/Annot.cc poppler.HEAD/poppler/Annot.cc
1335 --- poppler.0_5_0/poppler/Annot.cc 2005-10-16 16:54:17.000000000 +0200
1336 +++ poppler.HEAD/poppler/Annot.cc 2006-02-06 19:50:11.000000000 +0100
1338 #include "Catalog.h"
1341 +#include "UGooString.h"
1344 //------------------------------------------------------------------------
1345 @@ -210,15 +211,14 @@
1347 // build the appearance stream dictionary
1348 appearDict.initDict(xref);
1349 - appearDict.dictAdd(copyString("Length"),
1350 - obj1.initInt(appearBuf->getLength()));
1351 - appearDict.dictAdd(copyString("Subtype"), obj1.initName("Form"));
1352 + appearDict.dictAdd("Length", obj1.initInt(appearBuf->getLength()));
1353 + appearDict.dictAdd("Subtype", obj1.initName("Form"));
1354 obj1.initArray(xref);
1355 obj1.arrayAdd(obj2.initReal(0));
1356 obj1.arrayAdd(obj2.initReal(0));
1357 obj1.arrayAdd(obj2.initReal(xMax - xMin));
1358 obj1.arrayAdd(obj2.initReal(yMax - yMin));
1359 - appearDict.dictAdd(copyString("BBox"), &obj1);
1360 + appearDict.dictAdd("BBox", &obj1);
1362 // find the resource dictionary
1363 dict->lookup("DR", &drObj);
1367 if (drObj.isDict()) {
1368 - appearDict.dictAdd(copyString("Resources"), drObj.copy(&obj1));
1369 + appearDict.dictAdd("Resources", drObj.copy(&obj1));
1373 diff -Nur poppler.0_5_0/poppler/ArthurOutputDev.cc poppler.HEAD/poppler/ArthurOutputDev.cc
1374 --- poppler.0_5_0/poppler/ArthurOutputDev.cc 2005-10-30 21:29:05.000000000 +0100
1375 +++ poppler.HEAD/poppler/ArthurOutputDev.cc 2006-02-14 00:04:54.000000000 +0100
1376 @@ -245,11 +245,13 @@
1377 GfxFontType fontType;
1378 SplashOutFontFileID *id;
1379 SplashFontFile *fontFile;
1380 + SplashFontSrc *fontsrc;
1383 Object refObj, strObj;
1384 - GooString *tmpFileName, *fileName, *substName;
1386 + GooString *fileName, *substName;
1390 DisplayFontParam *dfp;
1391 double m11, m12, m21, m22, w1, w2;
1394 m_needFontUpdate = false;
1396 - tmpFileName = NULL;
1401 if (!(gfxFont = state->getFont())) {
1402 @@ -279,22 +282,9 @@
1404 // if there is an embedded font, write it to disk
1405 if (gfxFont->getEmbeddedFontID(&embRef)) {
1406 - if (!openTempFile(&tmpFileName, &tmpFile, "wb", NULL)) {
1407 - error(-1, "Couldn't create temporary font file");
1408 + tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
1412 - refObj.initRef(embRef.num, embRef.gen);
1413 - refObj.fetch(xref, &strObj);
1415 - strObj.streamReset();
1416 - while ((c = strObj.streamGetChar()) != EOF) {
1417 - fputc(c, tmpFile);
1419 - strObj.streamClose();
1422 - fileName = tmpFileName;
1424 // if there is an external font file, use it
1425 } else if (!(fileName = gfxFont->getExtFontFile())) {
1427 @@ -321,13 +311,18 @@
1431 + fontsrc = new SplashFontSrc;
1433 + fontsrc->setFile(fileName, gFalse);
1435 + fontsrc->setBuf(tmpBuf, tmpBufLen, gFalse);
1437 // load the font file
1440 if (!(fontFile = m_fontEngine->loadType1Font(
1442 - fileName->getCString(),
1443 - fileName == tmpFileName,
1445 ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
1446 error(-1, "Couldn't create a font for '%s'",
1447 gfxFont->getName() ? gfxFont->getName()->getCString()
1450 if (!(fontFile = m_fontEngine->loadType1CFont(
1452 - fileName->getCString(),
1453 - fileName == tmpFileName,
1455 ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
1456 error(-1, "Couldn't create a font for '%s'",
1457 gfxFont->getName() ? gfxFont->getName()->getCString()
1460 if (!(fontFile = m_fontEngine->loadTrueTypeFont(
1462 - fileName->getCString(),
1463 - fileName == tmpFileName,
1466 error(-1, "Couldn't create a font for '%s'",
1467 gfxFont->getName() ? gfxFont->getName()->getCString()
1470 if (!(fontFile = m_fontEngine->loadCIDFont(
1472 - fileName->getCString(),
1473 - fileName == tmpFileName))) {
1475 error(-1, "Couldn't create a font for '%s'",
1476 gfxFont->getName() ? gfxFont->getName()->getCString()
1479 n * sizeof(Gushort));
1480 if (!(fontFile = m_fontEngine->loadTrueTypeFont(
1482 - fileName->getCString(),
1483 - fileName == tmpFileName,
1486 error(-1, "Couldn't create a font for '%s'",
1487 gfxFont->getName() ? gfxFont->getName()->getCString()
1488 @@ -408,17 +399,11 @@
1489 mat[2] = m21; mat[3] = -m22;
1490 m_font = m_fontEngine->getFont(fontFile, mat);
1492 - if (tmpFileName) {
1493 - delete tmpFileName;
1500 - if (tmpFileName) {
1501 - delete tmpFileName;
1506 diff -Nur poppler.0_5_0/poppler/CairoOutputDev.cc poppler.HEAD/poppler/CairoOutputDev.cc
1507 --- poppler.0_5_0/poppler/CairoOutputDev.cc 2006-01-10 18:55:59.000000000 +0100
1508 +++ poppler.HEAD/poppler/CairoOutputDev.cc 2006-02-18 21:17:00.000000000 +0100
1509 @@ -194,7 +194,11 @@
1511 void CairoOutputDev::updateLineWidth(GfxState *state) {
1512 LOG(printf ("line width: %f\n", state->getTransformedLineWidth()));
1513 - cairo_set_line_width (cairo, state->getTransformedLineWidth());
1514 + if (state->getTransformedLineWidth() == 0.0) {
1515 + cairo_set_line_width (cairo, 72.0/300.0);
1517 + cairo_set_line_width (cairo, state->getTransformedLineWidth());
1521 void CairoOutputDev::updateFillColor(GfxState *state) {
1522 @@ -477,6 +481,26 @@
1526 + ctm = state->getCTM();
1527 + LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n",
1528 + width, height, ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]));
1529 + matrix.xx = ctm[0] / width;
1530 + matrix.xy = -ctm[2] / height;
1531 + matrix.yx = ctm[1] / width;
1532 + matrix.yy = -ctm[3] / height;
1533 + matrix.x0 = ctm[2] + ctm[4];
1534 + matrix.y0 = ctm[3] + ctm[5];
1536 + /* work around a cairo bug when scaling 1x1 surfaces */
1537 + if (width == 1 && height == 1) {
1538 + cairo_save (cairo);
1539 + cairo_set_matrix (cairo, &matrix);
1540 + cairo_rectangle (cairo, 0., 0., 1., 1.);
1541 + cairo_fill (cairo);
1542 + cairo_restore (cairo);
1546 row_stride = (width + 3) & ~3;
1547 buffer = (unsigned char *) malloc (height * row_stride);
1548 if (buffer == NULL) {
1549 @@ -510,6 +534,98 @@
1550 if (pattern == NULL)
1553 + cairo_matrix_invert (&matrix);
1554 + cairo_pattern_set_matrix (pattern, &matrix);
1556 + /* we should actually be using CAIRO_FILTER_NEAREST here. However,
1557 + * cairo doesn't yet do minifaction filtering causing scaled down
1558 + * images with CAIRO_FILTER_NEAREST to look really bad */
1559 + cairo_pattern_set_filter (pattern, CAIRO_FILTER_BEST);
1561 + /* FIXME: Doesn't the image mask support any colorspace? */
1562 + cairo_set_source (cairo, fill_pattern);
1563 + cairo_mask (cairo, pattern);
1565 + cairo_pattern_destroy (pattern);
1566 + cairo_surface_destroy (image);
1571 +void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
1572 + int width, int height,
1573 + GfxImageColorMap *colorMap,
1575 + int maskWidth, int maskHeight,
1576 + GfxImageColorMap *maskColorMap)
1578 + ImageStream *maskImgStr;
1579 + maskImgStr = new ImageStream(maskStr, maskWidth,
1580 + maskColorMap->getNumPixelComps(),
1581 + maskColorMap->getBits());
1582 + maskImgStr->reset();
1584 + int row_stride = (maskWidth + 3) & ~3;
1585 + unsigned char *maskBuffer;
1586 + maskBuffer = (unsigned char *)gmalloc (row_stride * maskHeight);
1587 + unsigned char *maskDest;
1588 + cairo_surface_t *maskImage;
1589 + cairo_pattern_t *maskPattern;
1592 + for (y = 0; y < maskHeight; y++) {
1593 + maskDest = (unsigned char *) (maskBuffer + y * row_stride);
1594 + pix = maskImgStr->getLine();
1595 + maskColorMap->getGrayLine (pix, maskDest, maskWidth);
1598 + maskImage = cairo_image_surface_create_for_data (maskBuffer, CAIRO_FORMAT_A8,
1599 + maskWidth, maskHeight, row_stride);
1601 + delete maskImgStr;
1604 + unsigned char *buffer;
1605 + unsigned int *dest;
1606 + cairo_surface_t *image;
1607 + cairo_pattern_t *pattern;
1608 + ImageStream *imgStr;
1612 + cairo_matrix_t matrix;
1613 + int is_identity_transform;
1615 + buffer = (unsigned char *)gmalloc (width * height * 4);
1617 + /* TODO: Do we want to cache these? */
1618 + imgStr = new ImageStream(str, width,
1619 + colorMap->getNumPixelComps(),
1620 + colorMap->getBits());
1623 + /* ICCBased color space doesn't do any color correction
1624 + * so check its underlying color space as well */
1625 + is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
1626 + colorMap->getColorSpace()->getMode() == csICCBased &&
1627 + ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB;
1629 + for (y = 0; y < height; y++) {
1630 + dest = (unsigned int *) (buffer + y * 4 * width);
1631 + pix = imgStr->getLine();
1632 + colorMap->getRGBLine (pix, dest, width);
1635 + image = cairo_image_surface_create_for_data (buffer, CAIRO_FORMAT_RGB24,
1636 + width, height, width * 4);
1638 + if (image == NULL)
1640 + pattern = cairo_pattern_create_for_surface (image);
1641 + maskPattern = cairo_pattern_create_for_surface (maskImage);
1642 + if (pattern == NULL)
1645 ctm = state->getCTM();
1646 LOG (printf ("drawImageMask %dx%d, matrix: %f, %f, %f, %f, %f, %f\n",
1647 width, height, ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]));
1648 @@ -519,20 +635,24 @@
1649 matrix.yy = -ctm[3] / height;
1650 matrix.x0 = ctm[2] + ctm[4];
1651 matrix.y0 = ctm[3] + ctm[5];
1653 cairo_matrix_invert (&matrix);
1655 cairo_pattern_set_matrix (pattern, &matrix);
1656 + cairo_pattern_set_matrix (maskPattern, &matrix);
1658 - cairo_pattern_set_filter (pattern, CAIRO_FILTER_BEST);
1659 - /* FIXME: Doesn't the image mask support any colorspace? */
1660 - cairo_set_source (cairo, fill_pattern);
1661 - cairo_mask (cairo, pattern);
1662 + cairo_pattern_set_filter (pattern, CAIRO_FILTER_BILINEAR);
1663 + cairo_set_source (cairo, pattern);
1664 + cairo_mask (cairo, maskPattern);
1666 + cairo_pattern_destroy (maskPattern);
1667 + cairo_surface_destroy (maskImage);
1668 cairo_pattern_destroy (pattern);
1669 cairo_surface_destroy (image);
1671 + free (maskBuffer);
1675 void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
1676 int width, int height,
1677 GfxImageColorMap *colorMap,
1678 diff -Nur poppler.0_5_0/poppler/CairoOutputDev.h poppler.HEAD/poppler/CairoOutputDev.h
1679 --- poppler.0_5_0/poppler/CairoOutputDev.h 2006-01-10 18:55:59.000000000 +0100
1680 +++ poppler.HEAD/poppler/CairoOutputDev.h 2006-02-18 21:17:00.000000000 +0100
1681 @@ -117,6 +117,12 @@
1682 virtual void drawImage(GfxState *state, Object *ref, Stream *str,
1683 int width, int height, GfxImageColorMap *colorMap,
1684 int *maskColors, GBool inlineImg);
1685 + virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
1686 + int width, int height,
1687 + GfxImageColorMap *colorMap,
1689 + int maskWidth, int maskHeight,
1690 + GfxImageColorMap *maskColorMap);
1692 //----- Type 3 font operators
1693 virtual void type3D0(GfxState *state, double wx, double wy);
1694 diff -Nur poppler.0_5_0/poppler/Catalog.cc poppler.HEAD/poppler/Catalog.cc
1695 --- poppler.0_5_0/poppler/Catalog.cc 2005-09-15 14:52:36.000000000 +0200
1696 +++ poppler.HEAD/poppler/Catalog.cc 2006-01-18 23:32:13.000000000 +0100
1700 #include "PageLabelInfo.h"
1701 +#include "UGooString.h"
1702 #include "Catalog.h"
1704 //------------------------------------------------------------------------
1706 // read named destination dictionary
1707 catDict.dictLookup("Dests", &dests);
1709 - // read root of named destination tree
1710 + // read root of named destination tree - PDF1.6 table 3.28
1711 if (catDict.dictLookup("Names", &obj)->isDict()) {
1712 obj.dictLookup("Dests", &obj2);
1713 destNameTree.init(xref, &obj2);
1715 + obj.dictLookup("EmbeddedFiles", &obj2);
1716 + embeddedFileNameTree.init(xref, &obj2);
1724 destNameTree.free();
1725 + embeddedFileNameTree.free();
1733 -LinkDest *Catalog::findDest(GooString *name) {
1734 +LinkDest *Catalog::findDest(UGooString *name) {
1739 // try named destination dictionary then name tree
1741 if (dests.isDict()) {
1742 - if (!dests.dictLookup(name->getCString(), &obj1)->isNull())
1743 + if (!dests.dictLookup(*name, &obj1)->isNull())
1747 @@ -335,6 +340,97 @@
1751 +EmbFile *Catalog::embeddedFile(int i)
1760 + obj = embeddedFileNameTree.getValue(i);
1761 + GooString *fileName = new GooString();
1762 + char *descString = embeddedFileNameTree.getName(i)->getCString();
1763 + GooString *desc = new GooString(descString);
1764 + delete[] descString;
1765 + GooString *createDate = new GooString();
1766 + GooString *modDate = new GooString();
1768 + if (obj.isRef()) {
1769 + if (obj.fetch(xref, &efDict)->isDict()) {
1770 + // efDict matches Table 3.40 in the PDF1.6 spec
1771 + efDict.dictLookup("F", &fileSpec);
1772 + if (fileSpec.isString()) {
1774 + fileName = new GooString(fileSpec.getString());
1778 + // the logic here is that the description from the name
1779 + // dictionary is used if we don't have a more specific
1780 + // description - see the Note: on page 157 of the PDF1.6 spec
1781 + efDict.dictLookup("Desc", &fileDesc);
1782 + if (fileDesc.isString()) {
1784 + desc = new GooString(fileDesc.getString());
1786 + efDict.dictLookup("Description", &fileDesc);
1787 + if (fileDesc.isString()) {
1789 + desc = new GooString(fileDesc.getString());
1794 + efDict.dictLookup("EF", &obj2);
1795 + if (obj2.isDict()) {
1796 + // This gives us the raw data stream bytes
1798 + obj2.dictLookup("F", &strObj);
1799 + if (strObj.isStream()) {
1800 + efStream = strObj.getStream();
1803 + // dataDict corresponds to Table 3.41 in the PDF1.6 spec.
1804 + Dict *dataDict = efStream->getDict();
1806 + // subtype is normally mimetype. You can extract it with code like this:
1807 + // Object subtypeName;
1808 + // dataDict->lookup( "Subtype", &subtypeName );
1809 + // It is optional, so this will sometimes return a null object
1810 + // if (subtypeName.isName()) {
1811 + // std::cout << "got subtype name: " << subtypeName.getName() << std::endl;
1814 + // paramDict corresponds to Table 3.42 in the PDF1.6 spec
1816 + dataDict->lookup( "Params", ¶mDict );
1817 + if (paramDict.isDict()) {
1818 + paramDict.dictLookup("ModDate", ¶mObj);
1819 + if (paramObj.isString()) {
1821 + modDate = new GooString(paramObj.getString());
1824 + paramDict.dictLookup("CreationDate", ¶mObj);
1825 + if (paramObj.isString()) {
1826 + delete createDate;
1827 + createDate = new GooString(paramObj.getString());
1837 + EmbFile *embeddedFile = new EmbFile(fileName, desc, createDate, modDate, strObj);
1839 + return embeddedFile;
1842 NameTree::NameTree(void)
1845 @@ -343,12 +439,15 @@
1848 NameTree::Entry::Entry(Array *array, int index) {
1849 - if (!array->getString(index, &name) || !array->getNF(index + 1, &value))
1850 - error(-1, "Invalid page tree");
1852 + if (!array->getString(index, &n) || !array->getNF(index + 1, &value))
1853 + error(-1, "Invalid page tree");
1854 + name = new UGooString(n);
1857 NameTree::Entry::~Entry() {
1862 void NameTree::addEntry(Entry *entry)
1863 @@ -402,13 +501,13 @@
1865 int NameTree::Entry::cmp(const void *voidKey, const void *voidEntry)
1867 - GooString *key = (GooString *) voidKey;
1868 + UGooString *key = (UGooString *) voidKey;
1869 Entry *entry = *(NameTree::Entry **) voidEntry;
1871 - return key->cmp(&entry->name);
1872 + return key->cmp(entry->name);
1875 -GBool NameTree::lookup(GooString *name, Object *obj)
1876 +GBool NameTree::lookup(UGooString *name, Object *obj)
1880 @@ -424,6 +523,24 @@
1884 +Object NameTree::getValue(int index)
1886 + if (index < length) {
1887 + return entries[index]->value;
1893 +UGooString *NameTree::getName(int index)
1895 + if (index < length) {
1896 + return entries[index]->name;
1902 void NameTree::free()
1905 diff -Nur poppler.0_5_0/poppler/Catalog.h poppler.HEAD/poppler/Catalog.h
1906 --- poppler.0_5_0/poppler/Catalog.h 2005-09-15 14:52:36.000000000 +0200
1907 +++ poppler.HEAD/poppler/Catalog.h 2006-01-18 23:32:13.000000000 +0100
1913 class PageLabelInfo;
1915 //------------------------------------------------------------------------
1918 void init(XRef *xref, Object *tree);
1919 void parse(Object *tree);
1920 - GBool lookup(GooString *name, Object *obj);
1921 + GBool lookup(UGooString *name, Object *obj);
1923 + int numEntries() { return length; };
1924 + // iterator accessor
1925 + Object getValue(int i);
1926 + UGooString *getName(int i);
1930 Entry(Array *array, int index);
1936 static int cmp(const void *key, const void *entry);
1942 + int size, length; // size is the number of entries in
1943 + // the array of Entry*
1944 + // length is the number of real Entry
1949 + EmbFile(GooString *name, GooString *description,
1950 + GooString *createDate,
1951 + GooString *modDate, Object objStr) :
1953 + m_description(description),
1954 + m_createDate(createDate),
1955 + m_modDate(modDate)
1957 + objStr.copy(&m_objStr);
1963 + delete m_description;
1965 + delete m_createDate;
1969 + GooString *name() { return m_name; }
1970 + GooString *description() { return m_description; }
1971 + GooString *modDate() { return m_modDate; }
1972 + GooString *createDate() { return m_createDate; }
1973 + Object &streamObject() { return m_objStr; }
1976 + GooString *m_name;
1977 + GooString *m_description;
1978 + GooString *m_createDate;
1979 + GooString *m_modDate;
1983 //------------------------------------------------------------------------
1986 // Find a named destination. Returns the link destination, or
1987 // NULL if <name> is not a destination.
1988 - LinkDest *findDest(GooString *name);
1989 + LinkDest *findDest(UGooString *name);
1991 + // Get the number of embedded files
1992 + int numEmbeddedFiles() { return embeddedFileNameTree.numEntries(); }
1994 + // Get the i'th file embedded (at the Document level) in the document
1995 + EmbFile *embeddedFile(int i);
1997 // Convert between page indices and page labels.
1998 GBool labelToIndex(GooString *label, int *index);
2000 int numPages; // number of pages
2001 int pagesSize; // size of pages array
2002 Object dests; // named destination dictionary
2003 - NameTree destNameTree; // name tree
2004 + NameTree destNameTree; // named destination name-tree
2005 + NameTree embeddedFileNameTree; // embedded file name-tree
2006 GooString *baseURI; // base URI for URI-type links
2007 Object metadata; // metadata stream
2008 Object structTreeRoot; // structure tree root dictionary
2009 diff -Nur poppler.0_5_0/poppler/CharCodeToUnicode.cc poppler.HEAD/poppler/CharCodeToUnicode.cc
2010 --- poppler.0_5_0/poppler/CharCodeToUnicode.cc 2005-09-16 20:38:58.000000000 +0200
2011 +++ poppler.HEAD/poppler/CharCodeToUnicode.cc 2006-01-18 19:54:12.000000000 +0100
2012 @@ -243,8 +243,18 @@
2014 if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
2015 tok2[0] == '<' && tok2[n2 - 1] == '>')) {
2016 - error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
2019 + // check there was no line jump inside the token and so the length is
2020 + // longer than it should be
2022 + for (int k = 0; k < n1; k++)
2023 + if (tok1[k] != '\n' && tok1[k] != '\r') countAux++;
2025 + if (!(countAux == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
2026 + tok2[0] == '<' && tok2[n2 - 1] == '>')) {
2027 + error(-1, "Illegal entry in bfchar block in ToUnicode CMap");
2031 tok1[n1 - 1] = tok2[n2 - 1] = '\0';
2032 if (sscanf(tok1 + 1, "%x", &code1) != 1) {
2033 @@ -268,8 +278,21 @@
2035 if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
2036 n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
2037 - error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
2039 + // check there was no line jump inside the token and so the length is
2040 + // longer than it should be
2042 + for (int k = 0; k < n1; k++)
2043 + if (tok1[k] != '\n' && tok1[k] != '\r') countAux++;
2045 + int countAux2 = 0;
2046 + for (int k = 0; k < n1; k++)
2047 + if (tok2[k] != '\n' && tok2[k] != '\r') countAux++;
2049 + if (!(countAux == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' &&
2050 + countAux2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>')) {
2051 + error(-1, "Illegal entry in bfrange block in ToUnicode CMap");
2055 tok1[n1 - 1] = tok2[n2 - 1] = '\0';
2056 if (sscanf(tok1 + 1, "%x", &code1) != 1 ||
2057 diff -Nur poppler.0_5_0/poppler/Dict.cc poppler.HEAD/poppler/Dict.cc
2058 --- poppler.0_5_0/poppler/Dict.cc 2005-08-27 10:43:43.000000000 +0200
2059 +++ poppler.HEAD/poppler/Dict.cc 2006-01-18 23:32:13.000000000 +0100
2062 #include "goo/gmem.h"
2064 +#include "UGooString.h"
2071 for (i = 0; i < length; ++i) {
2072 - gfree(entries[i].key);
2073 + delete entries[i].key;
2074 entries[i].val.free();
2079 -void Dict::add(char *key, Object *val) {
2080 +void Dict::add(const UGooString &key, Object *val) {
2081 if (length == size) {
2086 entries = (DictEntry *)greallocn(entries, size, sizeof(DictEntry));
2088 - entries[length].key = key;
2089 + entries[length].key = new UGooString(key);
2090 entries[length].val = *val;
2094 -inline DictEntry *Dict::find(char *key) {
2095 +inline DictEntry *Dict::find(const UGooString &key) {
2098 for (i = 0; i < length; ++i) {
2099 - if (!strcmp(key, entries[i].key))
2100 + if (!key.cmp(entries[i].key))
2105 return (e = find("Type")) && e->val.isName(type);
2108 -Object *Dict::lookup(char *key, Object *obj) {
2109 +Object *Dict::lookup(const UGooString &key, Object *obj) {
2112 return (e = find(key)) ? e->val.fetch(xref, obj) : obj->initNull();
2115 -Object *Dict::lookupNF(char *key, Object *obj) {
2116 +Object *Dict::lookupNF(const UGooString &key, Object *obj) {
2119 return (e = find(key)) ? e->val.copy(obj) : obj->initNull();
2124 -char *Dict::getKey(int i) {
2125 +UGooString *Dict::getKey(int i) {
2126 return entries[i].key;
2129 diff -Nur poppler.0_5_0/poppler/Dict.h poppler.HEAD/poppler/Dict.h
2130 --- poppler.0_5_0/poppler/Dict.h 2005-03-28 09:49:55.000000000 +0200
2131 +++ poppler.HEAD/poppler/Dict.h 2006-01-18 23:32:13.000000000 +0100
2137 //------------------------------------------------------------------------
2139 //------------------------------------------------------------------------
2148 // Get number of entries.
2149 int getLength() { return length; }
2151 - // Add an entry. NB: does not copy key.
2152 - void add(char *key, Object *val);
2154 + void add(const UGooString &key, Object *val);
2156 // Check if dictionary is of specified type.
2157 GBool is(char *type);
2159 // Look up an entry and return the value. Returns a null object
2160 // if <key> is not in the dictionary.
2161 - Object *lookup(char *key, Object *obj);
2162 - Object *lookupNF(char *key, Object *obj);
2163 + Object *lookup(const UGooString &key, Object *obj);
2164 + Object *lookupNF(const UGooString &key, Object *obj);
2165 GBool lookupInt(const char *key, const char *alt_key, int *value);
2167 // Iterative accessors.
2168 - char *getKey(int i);
2169 + UGooString *getKey(int i);
2170 Object *getVal(int i, Object *obj);
2171 Object *getValNF(int i, Object *obj);
2174 int length; // number of entries in dictionary
2175 int ref; // reference count
2177 - DictEntry *find(char *key);
2178 + DictEntry *find(const UGooString &key);
2182 diff -Nur poppler.0_5_0/poppler/FontInfo.cc poppler.HEAD/poppler/FontInfo.cc
2183 --- poppler.0_5_0/poppler/FontInfo.cc 2005-10-16 16:54:17.000000000 +0200
2184 +++ poppler.HEAD/poppler/FontInfo.cc 2006-01-23 16:40:54.000000000 +0100
2186 +#include "config.h"
2191 #include "GfxFont.h"
2194 -#include "config.h"
2195 #include "FontInfo.h"
2196 +#include "UGooString.h"
2198 FontInfoScanner::FontInfoScanner(PDFDoc *docA) {
2200 diff -Nur poppler.0_5_0/poppler/Function.cc poppler.HEAD/poppler/Function.cc
2201 --- poppler.0_5_0/poppler/Function.cc 2005-10-16 16:58:14.000000000 +0200
2202 +++ poppler.HEAD/poppler/Function.cc 2006-01-18 23:32:13.000000000 +0100
2206 #include "Function.h"
2207 +#include "UGooString.h"
2209 //------------------------------------------------------------------------
2211 diff -Nur poppler.0_5_0/poppler/Gfx.cc poppler.HEAD/poppler/Gfx.cc
2212 --- poppler.0_5_0/poppler/Gfx.cc 2005-12-08 19:17:42.000000000 +0100
2213 +++ poppler.HEAD/poppler/Gfx.cc 2006-02-05 16:46:10.000000000 +0100
2217 #include "ProfileData.h"
2218 +#include "UGooString.h"
2220 // the MSVC math.h doesn't define this
2222 @@ -3525,6 +3526,7 @@
2225 dict.dictAdd(key, &obj);
2228 parser->getObj(&obj);
2230 @@ -3590,9 +3592,16 @@
2235 + if(numArgs == 2) {
2236 + out->beginMarkedContent(args[0].getName(),args[1].getDict());
2238 + out->beginMarkedContent(args[0].getName());
2242 void Gfx::opEndMarkedContent(Object args[], int numArgs) {
2243 + out->endMarkedContent();
2246 void Gfx::opMarkPoint(Object args[], int numArgs) {
2247 @@ -3603,6 +3612,13 @@
2252 + if(numArgs == 2) {
2253 + out->markPoint(args[0].getName(),args[1].getDict());
2255 + out->markPoint(args[0].getName());
2260 //------------------------------------------------------------------------
2261 diff -Nur poppler.0_5_0/poppler/GfxFont.cc poppler.HEAD/poppler/GfxFont.cc
2262 --- poppler.0_5_0/poppler/GfxFont.cc 2005-10-16 17:11:32.000000000 +0200
2263 +++ poppler.HEAD/poppler/GfxFont.cc 2006-02-05 16:46:10.000000000 +0100
2265 #include <fofi/FoFiType1.h>
2266 #include <fofi/FoFiType1C.h>
2267 #include <fofi/FoFiTrueType.h>
2268 +#include "UGooString.h"
2269 #include "GfxFont.h"
2271 //------------------------------------------------------------------------
2274 void GfxFont::findExtFontFile() {
2275 static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL };
2276 - static char *ttExts[] = { ".ttf", NULL };
2277 + static char *ttExts[] = { ".ttf", ".ttc", NULL };
2280 if (type == fontType1) {
2281 @@ -1521,6 +1522,54 @@
2282 return cMap ? cMap->getCollection() : (GooString *)NULL;
2285 +Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) {
2287 + int cmapPlatform, cmapEncoding;
2288 + int unicodeCmap, macRomanCmap, msSymbolCmap, cmap;
2289 + GBool useMacRoman, useUnicode;
2297 + if (!ctu) return NULL;
2299 + /* we use only unicode cmap */
2301 + for (i = 0; i < ff->getNumCmaps(); ++i) {
2302 + cmapPlatform = ff->getCmapPlatform(i);
2303 + cmapEncoding = ff->getCmapEncoding(i);
2304 + if ((cmapPlatform == 3 && cmapEncoding == 1) || cmapPlatform == 0)
2312 + map = (Gushort *)gmalloc(mapsize * sizeof(Gushort));
2314 + while (cidlen < ctu->getLength()) {
2316 + if ((n = ctu->mapToUnicode((CharCode)cidlen, &u, 1)) == 0) {
2320 + if (cidlen >= mapsize) {
2321 + while (cidlen >= mapsize)
2323 + map = (Gushort *)grealloc(map, mapsize * sizeof(Gushort));
2325 + map[cidlen] = ff->mapCodeToGID(cmap, u);
2329 + *mapsizep = cidlen;
2333 //------------------------------------------------------------------------
2335 //------------------------------------------------------------------------
2336 @@ -1549,8 +1598,10 @@
2340 - fonts[i] = GfxFont::makeFont(xref, fontDict->getKey(i),
2341 + char *aux = fontDict->getKey(i)->getCString();
2342 + fonts[i] = GfxFont::makeFont(xref, aux,
2345 if (fonts[i] && !fonts[i]->isOk()) {
2348 diff -Nur poppler.0_5_0/poppler/GfxFont.h poppler.HEAD/poppler/GfxFont.h
2349 --- poppler.0_5_0/poppler/GfxFont.h 2005-07-06 19:12:36.000000000 +0200
2350 +++ poppler.HEAD/poppler/GfxFont.h 2006-02-02 23:50:01.000000000 +0100
2352 Gushort *getCIDToGID() { return cidToGID; }
2353 int getCIDToGIDLen() { return cidToGIDLen; }
2355 + Gushort *getCodeToGIDMap(FoFiTrueType *ff, int *length);
2359 CMap *cMap; // char code --> CID
2360 diff -Nur poppler.0_5_0/poppler/GfxState.cc poppler.HEAD/poppler/GfxState.cc
2361 --- poppler.0_5_0/poppler/GfxState.cc 2005-12-09 21:49:59.000000000 +0100
2362 +++ poppler.HEAD/poppler/GfxState.cc 2006-02-18 21:17:00.000000000 +0100
2366 #include "GfxState.h"
2367 +#include "UGooString.h"
2369 //------------------------------------------------------------------------
2371 @@ -204,6 +205,23 @@
2375 +void GfxColorSpace::getGrayLine(Guchar *in, unsigned char *out, int length) {
2381 + for (i = 0; i < length; i++) {
2383 + for (j = 0; j < n; j++)
2384 + color.c[j] = in[i * n + j] * 256;
2386 + getGray (&color, &gray);
2387 + out[i] = colToByte(gray);
2392 //------------------------------------------------------------------------
2393 // GfxDeviceGrayColorSpace
2394 //------------------------------------------------------------------------
2395 @@ -3433,6 +3451,39 @@
2399 +void GfxImageColorMap::getGrayLine(Guchar *in, Guchar *out, int length) {
2403 + Guchar *inp, *outp, *tmp_line;
2404 + GfxColorSpace *base;
2406 + switch (colorSpace->getMode()) {
2408 + case csSeparation:
2409 + tmp_line = (Guchar *) gmalloc (length * nComps2);
2410 + for (i = 0; i < length; i++) {
2411 + for (j = 0; j < nComps2; j++) {
2412 + tmp_line[i * nComps2 + j] = byte_lookup[in[i] * nComps2 + j];
2415 + colorSpace2->getGrayLine(tmp_line, out, length);
2421 + for (j = 0; j < length; j++)
2422 + for (i = 0; i < nComps; i++) {
2423 + *inp = byte_lookup[*inp * nComps + i];
2426 + colorSpace->getGrayLine(in, out, length);
2432 void GfxImageColorMap::getRGBLine(Guchar *in, unsigned int *out, int length) {
2435 diff -Nur poppler.0_5_0/poppler/GfxState.h poppler.HEAD/poppler/GfxState.h
2436 --- poppler.0_5_0/poppler/GfxState.h 2005-10-30 21:29:05.000000000 +0100
2437 +++ poppler.HEAD/poppler/GfxState.h 2006-02-18 21:17:00.000000000 +0100
2439 virtual void getRGB(GfxColor *color, GfxRGB *rgb) = 0;
2440 virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk) = 0;
2441 virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
2442 + virtual void getGrayLine(Guchar *in, Guchar *out, int length);
2444 // Return the number of color components.
2445 virtual int getNComps() = 0;
2447 void getGray(Guchar *x, GfxGray *gray);
2448 void getRGB(Guchar *x, GfxRGB *rgb);
2449 void getRGBLine(Guchar *in, unsigned int *out, int length);
2450 + void getGrayLine(Guchar *in, Guchar *out, int length);
2451 void getCMYK(Guchar *x, GfxCMYK *cmyk);
2452 void getColor(Guchar *x, GfxColor *color);
2454 diff -Nur poppler.0_5_0/poppler/GlobalParams.cc poppler.HEAD/poppler/GlobalParams.cc
2455 --- poppler.0_5_0/poppler/GlobalParams.cc 2005-12-08 19:17:42.000000000 +0100
2456 +++ poppler.HEAD/poppler/GlobalParams.cc 2006-02-04 21:48:25.000000000 +0100
2459 # include <shlobj.h>
2464 #include <fontconfig/fontconfig.h>
2465 #include "goo/gmem.h"
2466 #include "goo/GooString.h"
2467 @@ -324,24 +321,8 @@
2468 cMapDirs = new GooHash(gTrue);
2469 toUnicodeDirs = new GooList();
2470 displayFonts = new GooHash();
2473 - const struct paper *paperType;
2475 - if ((paperName = systempapername())) {
2476 - paperType = paperinfo(paperName);
2477 - psPaperWidth = (int)paperpswidth(paperType);
2478 - psPaperHeight = (int)paperpsheight(paperType);
2480 - error(-1, "No paper information available - using defaults");
2481 - psPaperWidth = defPaperWidth;
2482 - psPaperHeight = defPaperHeight;
2486 - psPaperWidth = defPaperWidth;
2487 - psPaperHeight = defPaperHeight;
2489 + psPaperWidth = -1;
2490 + psPaperHeight = -1;
2491 psImageableLLX = psImageableLLY = 0;
2492 psImageableURX = psPaperWidth;
2493 psImageableURY = psPaperHeight;
2494 @@ -1122,7 +1103,7 @@
2498 -FcPattern *buildFcPattern(GfxFont *font)
2499 +static FcPattern *buildFcPattern(GfxFont *font)
2501 int weight = FC_WEIGHT_NORMAL,
2502 slant = FC_SLANT_ROMAN,
2503 @@ -1266,7 +1247,7 @@
2505 DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) {
2506 DisplayFontParam *dfp;
2507 - FcPattern *p=0,*m=0;
2510 GooString *fontName = font->getName();
2511 if (!fontName) return NULL;
2512 @@ -1278,38 +1259,44 @@
2518 p = buildFcPattern(font);
2522 FcConfigSubstitute(FCcfg, p, FcMatchPattern);
2523 FcDefaultSubstitute(p);
2524 - m = FcFontMatch(FCcfg,p,&res);
2527 - res = FcPatternGetString(m, FC_FILE, 0, &s);
2528 - if (res != FcResultMatch || !s)
2530 - ext = strrchr((char*)s,'.');
2532 + set = FcFontSort(FCcfg, p, FcFalse, NULL, &res);
2535 - if (!strncasecmp(ext,".ttf",4))
2537 - dfp = new DisplayFontParam(fontName->copy(), displayFontTT);
2538 - dfp->tt.fileName = new GooString((char*)s);
2540 - else if (!strncasecmp(ext,".pfa",4) || !strncasecmp(ext,".pfb",4))
2541 + for (i = 0; i < set->nfont; ++i)
2543 - dfp = new DisplayFontParam(fontName->copy(), displayFontT1);
2544 - dfp->t1.fileName = new GooString((char*)s);
2545 + res = FcPatternGetString(set->fonts[i], FC_FILE, 0, &s);
2546 + if (res != FcResultMatch || !s)
2548 + ext = strrchr((char*)s,'.');
2551 + if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4))
2553 + dfp = new DisplayFontParam(fontName->copy(), displayFontTT);
2554 + dfp->tt.fileName = new GooString((char*)s);
2555 + FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, &(dfp->tt.faceIndex));
2557 + else if (!strncasecmp(ext,".pfa",4) || !strncasecmp(ext,".pfb",4))
2559 + dfp = new DisplayFontParam(fontName->copy(), displayFontT1);
2560 + dfp->t1.fileName = new GooString((char*)s);
2564 + displayFonts->add(dfp->name,dfp);
2569 - displayFonts->add(dfp->name,dfp);
2570 + FcFontSetDestroy(set);
2574 - FcPatternDestroy(m);
2576 FcPatternDestroy(p);
2578 diff -Nur poppler.0_5_0/poppler/GlobalParams.h poppler.HEAD/poppler/GlobalParams.h
2579 --- poppler.0_5_0/poppler/GlobalParams.h 2005-09-20 16:00:43.000000000 +0200
2580 +++ poppler.HEAD/poppler/GlobalParams.h 2006-02-02 23:50:01.000000000 +0100
2583 struct DisplayFontParamTT {
2584 GooString *fileName;
2588 class DisplayFontParam {
2589 diff -Nur poppler.0_5_0/poppler/Lexer.cc poppler.HEAD/poppler/Lexer.cc
2590 --- poppler.0_5_0/poppler/Lexer.cc 2005-08-31 17:28:46.000000000 +0200
2591 +++ poppler.HEAD/poppler/Lexer.cc 2006-01-17 22:35:31.000000000 +0100
2598 //------------------------------------------------------------------------
2602 //------------------------------------------------------------------------
2604 -Lexer::Lexer(XRef *xref, Stream *str) {
2605 +Lexer::Lexer(XRef *xrefA, Stream *str) {
2610 curStr.initStream(str);
2611 streams = new Array(xref);
2612 streams->add(curStr.copy(&obj));
2614 curStr.streamReset();
2617 -Lexer::Lexer(XRef *xref, Object *obj) {
2618 +Lexer::Lexer(XRef *xrefA, Object *obj) {
2623 if (obj->isStream()) {
2624 streams = new Array(xref);
2627 return curStr.streamLookChar();
2630 -Object *Lexer::getObj(Object *obj) {
2631 +Object *Lexer::getObj(Object *obj, int objNum) {
2634 GBool comment, neg, done;
2635 @@ -291,6 +296,17 @@
2636 s->append(tokBuf, tokBufSize);
2640 + // we are growing see if the document is not malformed and we are growing too much
2643 + int newObjNum = xref->getNumEntry(getPos());
2644 + if (newObjNum != objNum)
2646 + error(getPos(), "Unterminated string");
2653 diff -Nur poppler.0_5_0/poppler/Lexer.h poppler.HEAD/poppler/Lexer.h
2654 --- poppler.0_5_0/poppler/Lexer.h 2005-08-31 17:28:46.000000000 +0200
2655 +++ poppler.HEAD/poppler/Lexer.h 2006-01-17 22:35:31.000000000 +0100
2658 // Construct a lexer for a single stream. Deletes the stream when
2659 // lexer is deleted.
2660 - Lexer(XRef *xref, Stream *str);
2661 + Lexer(XRef *xrefA, Stream *str);
2663 // Construct a lexer for a stream or array of streams (assumes obj
2664 // is either a stream or array of streams).
2665 - Lexer(XRef *xref, Object *obj);
2666 + Lexer(XRef *xrefA, Object *obj);
2671 // Get the next object from the input stream.
2672 - Object *getObj(Object *obj);
2673 + Object *getObj(Object *obj, int objNum = -1);
2675 // Skip to the beginning of the next line in the input stream.
2676 void skipToNextLine();
2678 Object curStr; // current stream
2679 GBool freeArray; // should lexer free the streams array?
2680 char tokBuf[tokBufSize]; // temporary token buffer
2686 diff -Nur poppler.0_5_0/poppler/Link.cc poppler.HEAD/poppler/Link.cc
2687 --- poppler.0_5_0/poppler/Link.cc 2005-09-20 16:34:31.000000000 +0200
2688 +++ poppler.HEAD/poppler/Link.cc 2006-01-18 23:32:13.000000000 +0100
2693 +#include "UGooString.h"
2695 //------------------------------------------------------------------------
2699 // named destination
2700 if (destObj->isName()) {
2701 - namedDest = new GooString(destObj->getName());
2702 + namedDest = new UGooString(destObj->getName());
2703 } else if (destObj->isString()) {
2704 - namedDest = destObj->getString()->copy();
2705 + namedDest = new UGooString(*destObj->getString());
2707 // destination dictionary
2708 } else if (destObj->isArray()) {
2711 // named destination
2712 if (destObj->isName()) {
2713 - namedDest = new GooString(destObj->getName());
2714 + namedDest = new UGooString(destObj->getName());
2715 } else if (destObj->isString()) {
2716 - namedDest = destObj->getString()->copy();
2717 + namedDest = new UGooString(*destObj->getString());
2719 // destination dictionary
2720 } else if (destObj->isArray()) {
2721 diff -Nur poppler.0_5_0/poppler/Link.h poppler.HEAD/poppler/Link.h
2722 --- poppler.0_5_0/poppler/Link.h 2005-03-03 20:46:01.000000000 +0100
2723 +++ poppler.HEAD/poppler/Link.h 2006-01-18 23:32:13.000000000 +0100
2732 @@ -134,13 +135,13 @@
2734 virtual LinkActionKind getKind() { return actionGoTo; }
2735 LinkDest *getDest() { return dest; }
2736 - GooString *getNamedDest() { return namedDest; }
2737 + UGooString *getNamedDest() { return namedDest; }
2741 LinkDest *dest; // regular destination (NULL for remote
2742 // link with bad destination)
2743 - GooString *namedDest; // named destination (only one of dest and
2744 + UGooString *namedDest; // named destination (only one of dest and
2745 // and namedDest may be non-NULL)
2748 @@ -165,14 +166,14 @@
2749 virtual LinkActionKind getKind() { return actionGoToR; }
2750 GooString *getFileName() { return fileName; }
2751 LinkDest *getDest() { return dest; }
2752 - GooString *getNamedDest() { return namedDest; }
2753 + UGooString *getNamedDest() { return namedDest; }
2757 GooString *fileName; // file name
2758 LinkDest *dest; // regular destination (NULL for remote
2759 // link with bad destination)
2760 - GooString *namedDest; // named destination (only one of dest and
2761 + UGooString *namedDest; // named destination (only one of dest and
2762 // and namedDest may be non-NULL)
2765 diff -Nur poppler.0_5_0/poppler/Makefile.am poppler.HEAD/poppler/Makefile.am
2766 --- poppler.0_5_0/poppler/Makefile.am 2006-01-06 11:05:58.000000000 +0100
2767 +++ poppler.HEAD/poppler/Makefile.am 2006-02-16 20:28:54.000000000 +0100
2772 +libpoppler_la_LDFLAGS = -version-info 1:0:0
2774 if ENABLE_XPDF_HEADERS
2776 poppler_includedir = $(includedir)/poppler
2788 SecurityHandler.cc \
2791 diff -Nur poppler.0_5_0/poppler/Object.h poppler.HEAD/poppler/Object.h
2792 --- poppler.0_5_0/poppler/Object.h 2005-03-03 20:46:01.000000000 +0100
2793 +++ poppler.HEAD/poppler/Object.h 2006-01-18 23:32:13.000000000 +0100
2800 //------------------------------------------------------------------------
2802 @@ -163,11 +164,11 @@
2805 int dictGetLength();
2806 - void dictAdd(char *key, Object *val);
2807 + void dictAdd(const UGooString &key, Object *val);
2808 GBool dictIs(char *dictType);
2809 - Object *dictLookup(char *key, Object *obj);
2810 - Object *dictLookupNF(char *key, Object *obj);
2811 - char *dictGetKey(int i);
2812 + Object *dictLookup(const UGooString &key, Object *obj);
2813 + Object *dictLookupNF(const UGooString &key, Object *obj);
2814 + UGooString *dictGetKey(int i);
2815 Object *dictGetVal(int i, Object *obj);
2816 Object *dictGetValNF(int i, Object *obj);
2819 inline int Object::dictGetLength()
2820 { return dict->getLength(); }
2822 -inline void Object::dictAdd(char *key, Object *val)
2823 +inline void Object::dictAdd(const UGooString &key, Object *val)
2824 { dict->add(key, val); }
2826 inline GBool Object::dictIs(char *dictType)
2827 @@ -247,13 +248,13 @@
2828 inline GBool Object::isDict(char *dictType)
2829 { return type == objDict && dictIs(dictType); }
2831 -inline Object *Object::dictLookup(char *key, Object *obj)
2832 +inline Object *Object::dictLookup(const UGooString &key, Object *obj)
2833 { return dict->lookup(key, obj); }
2835 -inline Object *Object::dictLookupNF(char *key, Object *obj)
2836 +inline Object *Object::dictLookupNF(const UGooString &key, Object *obj)
2837 { return dict->lookupNF(key, obj); }
2839 -inline char *Object::dictGetKey(int i)
2840 +inline UGooString *Object::dictGetKey(int i)
2841 { return dict->getKey(i); }
2843 inline Object *Object::dictGetVal(int i, Object *obj)
2844 diff -Nur poppler.0_5_0/poppler/Outline.cc poppler.HEAD/poppler/Outline.cc
2845 --- poppler.0_5_0/poppler/Outline.cc 2005-09-15 14:32:25.000000000 +0200
2846 +++ poppler.HEAD/poppler/Outline.cc 2006-01-18 23:32:13.000000000 +0100
2849 #include "PDFDocEncoding.h"
2850 #include "Outline.h"
2851 +#include "UGooString.h"
2853 //------------------------------------------------------------------------
2855 diff -Nur poppler.0_5_0/poppler/OutputDev.cc poppler.HEAD/poppler/OutputDev.cc
2856 --- poppler.0_5_0/poppler/OutputDev.cc 2005-10-30 21:29:05.000000000 +0100
2857 +++ poppler.HEAD/poppler/OutputDev.cc 2006-02-04 22:10:41.000000000 +0100
2858 @@ -121,6 +121,22 @@
2859 drawImage(state, ref, str, width, height, colorMap, NULL, gFalse);
2862 +void OutputDev::endMarkedContent() {
2865 +void OutputDev::beginMarkedContent(char *name) {
2868 +void OutputDev::beginMarkedContent(char *name, Dict *properties) {
2871 +void OutputDev::markPoint(char *name) {
2874 +void OutputDev::markPoint(char *name, Dict *properties) {
2879 void OutputDev::opiBegin(GfxState *state, Dict *opiDict) {
2881 diff -Nur poppler.0_5_0/poppler/OutputDev.h poppler.HEAD/poppler/OutputDev.h
2882 --- poppler.0_5_0/poppler/OutputDev.h 2005-11-01 16:29:32.000000000 +0100
2883 +++ poppler.HEAD/poppler/OutputDev.h 2006-02-04 22:10:41.000000000 +0100
2884 @@ -183,6 +183,16 @@
2885 int maskWidth, int maskHeight,
2886 GfxImageColorMap *maskColorMap);
2888 + //----- grouping operators
2890 + virtual void endMarkedContent();
2891 + virtual void beginMarkedContent(char *name);
2892 + virtual void beginMarkedContent(char *name, Dict *properties);
2893 + virtual void markPoint(char *name);
2894 + virtual void markPoint(char *name, Dict *properties);
2899 //----- OPI functions
2900 virtual void opiBegin(GfxState *state, Dict *opiDict);
2901 diff -Nur poppler.0_5_0/poppler/Page.cc poppler.HEAD/poppler/Page.cc
2902 --- poppler.0_5_0/poppler/Page.cc 2006-01-08 23:51:17.000000000 +0100
2903 +++ poppler.HEAD/poppler/Page.cc 2006-01-18 23:32:13.000000000 +0100
2908 +#include "UGooString.h"
2910 //------------------------------------------------------------------------
2912 diff -Nur poppler.0_5_0/poppler/PageLabelInfo.cc poppler.HEAD/poppler/PageLabelInfo.cc
2913 --- poppler.0_5_0/poppler/PageLabelInfo.cc 2005-07-29 00:56:17.000000000 +0200
2914 +++ poppler.HEAD/poppler/PageLabelInfo.cc 2006-01-18 23:32:13.000000000 +0100
2919 +#include "UGooString.h"
2921 #include "PageLabelInfo.h"
2923 diff -Nur poppler.0_5_0/poppler/Parser.cc poppler.HEAD/poppler/Parser.cc
2924 --- poppler.0_5_0/poppler/Parser.cc 2005-09-20 17:27:31.000000000 +0200
2925 +++ poppler.HEAD/poppler/Parser.cc 2006-01-18 23:32:13.000000000 +0100
2929 #include "Decrypt.h"
2930 +#include "UGooString.h"
2932 Parser::Parser(XRef *xrefA, Lexer *lexerA) {
2936 // dictionary or stream
2937 } else if (buf1.isCmd("<<")) {
2940 obj->initDict(xref);
2941 while (!buf1.isCmd(">>") && !buf1.isEOF()) {
2942 if (!buf1.isName()) {
2946 obj->dictAdd(key, getObj(&obj2, fileKey, keyLength, objNum, objGen));
2955 -void Parser::shift() {
2956 +void Parser::shift(int objNum) {
2957 if (inlineImg > 0) {
2958 if (inlineImg < 2) {
2961 if (inlineImg > 0) // don't buffer inline image data
2964 - lexer->getObj(&buf2);
2965 + lexer->getObj(&buf2, objNum);
2967 diff -Nur poppler.0_5_0/poppler/Parser.h poppler.HEAD/poppler/Parser.h
2968 --- poppler.0_5_0/poppler/Parser.h 2005-09-16 20:29:18.000000000 +0200
2969 +++ poppler.HEAD/poppler/Parser.h 2006-01-17 22:35:31.000000000 +0100
2971 int inlineImg; // set when inline image data is encountered
2973 Stream *makeStream(Object *dict);
2975 + void shift(int objNum = -1);
2979 diff -Nur poppler.0_5_0/poppler/PDFDoc.cc poppler.HEAD/poppler/PDFDoc.cc
2980 --- poppler.0_5_0/poppler/PDFDoc.cc 2005-12-07 09:42:21.000000000 +0100
2981 +++ poppler.HEAD/poppler/PDFDoc.cc 2006-01-18 23:32:13.000000000 +0100
2983 #include "Outline.h"
2986 +#include "UGooString.h"
2988 //------------------------------------------------------------------------
2990 diff -Nur poppler.0_5_0/poppler/PDFDoc.h poppler.HEAD/poppler/PDFDoc.h
2991 --- poppler.0_5_0/poppler/PDFDoc.h 2005-10-30 21:29:05.000000000 +0100
2992 +++ poppler.HEAD/poppler/PDFDoc.h 2006-01-18 23:32:13.000000000 +0100
2995 // Find a named destination. Returns the link destination, or
2996 // NULL if <name> is not a destination.
2997 - LinkDest *findDest(GooString *name)
2998 + LinkDest *findDest(UGooString *name)
2999 { return catalog->findDest(name); }
3001 #ifndef DISABLE_OUTLINE
3002 diff -Nur poppler.0_5_0/poppler/poppler-config.h.in poppler.HEAD/poppler/poppler-config.h.in
3003 --- poppler.0_5_0/poppler/poppler-config.h.in 2005-10-17 04:17:52.000000000 +0200
3004 +++ poppler.HEAD/poppler/poppler-config.h.in 2006-01-23 19:52:48.000000000 +0100
3006 // around #undef look odd, but it's to silence warnings about
3007 // redefining those symbols.
3009 -/* Use A4 paper size instead of Letter for PostScript output. */
3014 /* Enable multithreading support. */
3015 #ifndef MULTITHREADING
3016 #undef MULTITHREADED
3017 diff -Nur poppler.0_5_0/poppler/PSOutputDev.cc poppler.HEAD/poppler/PSOutputDev.cc
3018 --- poppler.0_5_0/poppler/PSOutputDev.cc 2005-10-30 21:29:05.000000000 +0100
3019 +++ poppler.HEAD/poppler/PSOutputDev.cc 2006-02-13 23:38:44.000000000 +0100
3023 #include "PSOutputDev.h"
3024 +#include "UGooString.h"
3027 // needed for setting type/creator of MacOS files
3028 @@ -1039,6 +1040,7 @@
3029 fontFileNameSize = 64;
3030 fontFileNameLen = 0;
3031 fontFileNames = (GooString **)gmallocn(fontFileNameSize, sizeof(GooString *));
3032 + psFileNames = (GooString **)gmallocn(fontFileNameSize, sizeof(GooString *));
3033 nextTrueTypeNum = 0;
3036 @@ -1123,6 +1125,13 @@
3038 gfree(fontFileNames);
3040 + if (psFileNames) {
3041 + for (i = 0; i < fontFileNameLen; ++i) {
3042 + if (psFileNames[i])
3043 + delete psFileNames[i];
3045 + gfree(psFileNames);
3048 for (i = 0; i < font16EncLen; ++i) {
3049 delete font16Enc[i].enc;
3050 @@ -1490,6 +1499,7 @@
3054 + DisplayFontParam *dfp;
3056 // check if font is already set up
3057 for (i = 0; i < fontIDLen; ++i) {
3058 @@ -1547,8 +1557,7 @@
3059 } else if (globalParams->getPSEmbedTrueType() &&
3060 font->getType() == fontTrueType &&
3061 font->getExtFontFile()) {
3062 - psName = filterPSName(font->getName());
3063 - setupExternalTrueTypeFont(font, psName);
3064 + psName = setupExternalTrueTypeFont(font);
3066 // check for embedded CID PostScript font
3067 } else if (globalParams->getPSEmbedCIDPostScript() &&
3068 @@ -1570,6 +1579,12 @@
3069 psName = new GooString(type3Name);
3070 setupType3Font(font, psName, parentResDict);
3072 + // check for external CID TrueType font file
3073 + } else if (globalParams->getPSEmbedCIDTrueType() &&
3074 + font->getType() == fontCIDType2 &&
3075 + font->getExtFontFile()) {
3076 + psName = setupExternalCIDTrueTypeFont(font, font->getExtFontFile());
3078 // do 8-bit font substitution
3079 } else if (!font->isCIDFont()) {
3081 @@ -1651,6 +1666,14 @@
3082 font16Enc[font16EncLen].enc->getCString());
3085 + // try the display font for embedding
3086 + } else if (globalParams->getPSEmbedCIDTrueType() &&
3087 + ((GfxCIDFont *)font)->getCollection() &&
3088 + (dfp = globalParams->
3089 + getDisplayFont(font)) &&
3090 + dfp->kind == displayFontTT) {
3091 + psName = setupExternalCIDTrueTypeFont(font, dfp->tt.fileName, dfp->tt.faceIndex);
3093 // give up - can't do anything with this font
3095 error(-1, "Couldn't find a font to substitute for '%s' ('%s' character collection)",
3096 @@ -1860,8 +1883,12 @@
3097 fontFileNameSize += 64;
3098 fontFileNames = (GooString **)greallocn(fontFileNames,
3099 fontFileNameSize, sizeof(GooString *));
3100 + psFileNames = (GooString **)greallocn(psFileNames,
3101 + fontFileNameSize, sizeof(GooString *));
3103 - fontFileNames[fontFileNameLen++] = fileName->copy();
3104 + fontFileNames[fontFileNameLen] = fileName->copy();
3105 + psFileNames[fontFileNameLen] = psName->copy();
3106 + fontFileNameLen++;
3108 // beginning comment
3109 writePSFmt("%%%%BeginResource: font %s\n", psName->getCString());
3110 @@ -1974,25 +2001,24 @@
3111 writePS("%%EndResource\n");
3114 -void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, GooString *psName) {
3116 +GooString *PSOutputDev::setupExternalTrueTypeFont(GfxFont *font) {
3117 GooString *fileName;
3122 + GooString *psName;
3125 // check if font is already embedded
3126 fileName = font->getExtFontFile();
3127 for (i = 0; i < fontFileNameLen; ++i) {
3128 if (!fontFileNames[i]->cmp(fileName)) {
3129 - sprintf(unique, "_%d", nextTrueTypeNum++);
3130 - psName->append(unique);
3132 + return psFileNames[i]->copy();
3136 + psName = filterPSName(font->getName());
3137 // add entry to fontFileNames list
3138 if (i == fontFileNameLen) {
3139 if (fontFileNameLen >= fontFileNameSize) {
3140 @@ -2000,9 +2026,14 @@
3142 (GooString **)greallocn(fontFileNames,
3143 fontFileNameSize, sizeof(GooString *));
3145 + (GooString **)greallocn(psFileNames,
3146 + fontFileNameSize, sizeof(GooString *));
3149 - fontFileNames[fontFileNameLen++] = fileName->copy();
3150 + fontFileNames[fontFileNameLen] = fileName->copy();
3151 + psFileNames[fontFileNameLen] = psName->copy();
3152 + fontFileNameLen++;
3154 // beginning comment
3155 writePSFmt("%%%%BeginResource: font %s\n", psName->getCString());
3156 @@ -2025,6 +2056,82 @@
3159 writePS("%%EndResource\n");
3163 +GooString *PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex) {
3166 + FoFiTrueType *ffTT;
3167 + Gushort *codeToGID;
3168 + GooString *psName;
3170 + GooString *myFileName;
3172 + myFileName = fileName->copy();
3173 + if (faceIndex > 0) {
3175 + sprintf(tmp, ",%d", faceIndex);
3176 + myFileName->append(tmp);
3178 + // check if font is already embedded
3179 + for (i = 0; i < fontFileNameLen; ++i) {
3180 + if (!fontFileNames[i]->cmp(myFileName)) {
3181 + delete myFileName;
3182 + return psFileNames[i]->copy();
3186 + psName = filterPSName(font->getName());
3187 + // add entry to fontFileNames list
3188 + if (i == fontFileNameLen) {
3189 + if (fontFileNameLen >= fontFileNameSize) {
3190 + fontFileNameSize += 64;
3192 + (GooString **)grealloc(fontFileNames,
3193 + fontFileNameSize * sizeof(GooString *));
3195 + (GooString **)grealloc(psFileNames,
3196 + fontFileNameSize * sizeof(GooString *));
3199 + fontFileNames[fontFileNameLen] = myFileName;
3200 + psFileNames[fontFileNameLen] = psName->copy();
3201 + fontFileNameLen++;
3203 + // beginning comment
3204 + writePSFmt("%%%%BeginResource: font %s\n", psName->getCString());
3205 + embFontList->append("%%+ font ");
3206 + embFontList->append(psName->getCString());
3207 + embFontList->append("\n");
3209 + // convert it to a CID type2 font
3210 + if ((ffTT = FoFiTrueType::load(fileName->getCString(), faceIndex))) {
3211 + int n = ((GfxCIDFont *)font)->getCIDToGIDLen();
3213 + codeToGID = (Gushort *)gmalloc(n * sizeof(Gushort));
3214 + memcpy(codeToGID, ((GfxCIDFont *)font)->getCIDToGID(), n * sizeof(Gushort));
3216 + codeToGID = ((GfxCIDFont *)font)->getCodeToGIDMap(ffTT, &n);
3218 + if (globalParams->getPSLevel() >= psLevel3) {
3219 + // Level 3: use a CID font
3220 + ffTT->convertToCIDType2(psName->getCString(),
3221 + codeToGID, n, gTrue,
3222 + outputFunc, outputStream);
3224 + // otherwise: use a non-CID composite font
3225 + ffTT->convertToType0(psName->getCString(),
3226 + codeToGID, n, gTrue,
3227 + outputFunc, outputStream);
3234 + writePS("%%EndResource\n");
3238 void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id,
3239 @@ -2188,7 +2295,9 @@
3240 t3Cacheable = gFalse;
3241 for (i = 0; i < charProcs->getLength(); ++i) {
3243 - writePSName(charProcs->getKey(i));
3244 + char *aux = charProcs->getKey(i)->getCString();
3248 gfx->display(charProcs->getVal(i, &charProc));
3250 diff -Nur poppler.0_5_0/poppler/PSOutputDev.h poppler.HEAD/poppler/PSOutputDev.h
3251 --- poppler.0_5_0/poppler/PSOutputDev.h 2005-10-30 21:29:05.000000000 +0100
3252 +++ poppler.HEAD/poppler/PSOutputDev.h 2006-02-13 23:38:44.000000000 +0100
3253 @@ -237,10 +237,11 @@
3254 void setupExternalType1Font(GooString *fileName, GooString *psName);
3255 void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GooString *psName);
3256 void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *psName);
3257 - void setupExternalTrueTypeFont(GfxFont *font, GooString *psName);
3258 + GooString *setupExternalTrueTypeFont(GfxFont *font);
3259 void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GooString *psName);
3260 void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GooString *psName,
3261 GBool needVerticalMetrics);
3262 + GooString *setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex = 0);
3263 void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict);
3264 void setupImages(Dict *resDict);
3265 void setupImage(Ref id, Stream *str);
3267 int fontFileIDLen; // number of entries in fontFileIDs array
3268 int fontFileIDSize; // size of fontFileIDs array
3269 GooString **fontFileNames; // list of names of all embedded external fonts
3270 + GooString **psFileNames; // list of names of all embedded external fonts
3271 int fontFileNameLen; // number of entries in fontFileNames array
3272 int fontFileNameSize; // size of fontFileNames array
3273 int nextTrueTypeNum; // next unique number to append to a TrueType
3274 diff -Nur poppler.0_5_0/poppler/SecurityHandler.cc poppler.HEAD/poppler/SecurityHandler.cc
3275 --- poppler.0_5_0/poppler/SecurityHandler.cc 2005-09-16 20:29:18.000000000 +0200
3276 +++ poppler.HEAD/poppler/SecurityHandler.cc 2006-01-18 23:32:13.000000000 +0100
3278 # include "XpdfPluginAPI.h"
3280 #include "SecurityHandler.h"
3281 +#include "UGooString.h"
3283 //------------------------------------------------------------------------
3285 diff -Nur poppler.0_5_0/poppler/SplashOutputDev.cc poppler.HEAD/poppler/SplashOutputDev.cc
3286 --- poppler.0_5_0/poppler/SplashOutputDev.cc 2005-10-30 21:29:05.000000000 +0100
3287 +++ poppler.HEAD/poppler/SplashOutputDev.cc 2006-02-05 16:46:10.000000000 +0100
3288 @@ -941,11 +941,13 @@
3289 GfxFontType fontType;
3290 SplashOutFontFileID *id;
3291 SplashFontFile *fontFile;
3292 + SplashFontSrc *fontsrc;
3295 Object refObj, strObj;
3296 - GooString *tmpFileName, *fileName, *substName;
3298 + GooString *fileName, *substName;
3302 DisplayFontParam *dfp;
3303 CharCodeToUnicode *ctu;
3304 @@ -954,10 +956,12 @@
3307 int c, substIdx, n, code, cmap;
3308 + int faceIndex = 0;
3310 needFontUpdate = gFalse;
3312 - tmpFileName = NULL;
3318 @@ -978,22 +982,9 @@
3320 // if there is an embedded font, write it to disk
3321 if (gfxFont->getEmbeddedFontID(&embRef)) {
3322 - if (!openTempFile(&tmpFileName, &tmpFile, "wb", NULL)) {
3323 - error(-1, "Couldn't create temporary font file");
3324 + tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen);
3328 - refObj.initRef(embRef.num, embRef.gen);
3329 - refObj.fetch(xref, &strObj);
3331 - strObj.streamReset();
3332 - while ((c = strObj.streamGetChar()) != EOF) {
3333 - fputc(c, tmpFile);
3335 - strObj.streamClose();
3338 - fileName = tmpFileName;
3340 // if there is an external font file, use it
3341 } else if (!(fileName = gfxFont->getExtFontFile())) {
3343 @@ -1016,18 +1007,23 @@
3345 fileName = dfp->tt.fileName;
3346 fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType;
3347 + faceIndex = dfp->tt.faceIndex;
3352 + fontsrc = new SplashFontSrc;
3354 + fontsrc->setFile(fileName, gFalse);
3356 + fontsrc->setBuf(tmpBuf, tmpBufLen, gFalse);
3358 // load the font file
3361 - if (!(fontFile = fontEngine->loadType1Font(
3363 - fileName->getCString(),
3364 - fileName == tmpFileName,
3365 - ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
3366 + fontFile = fontEngine->loadType1Font(id, fontsrc,
3367 + ((Gfx8BitFont *)gfxFont)->getEncoding());
3369 error(-1, "Couldn't create a font for '%s'",
3370 gfxFont->getName() ? gfxFont->getName()->getCString()
3372 @@ -1035,11 +1031,9 @@
3376 - if (!(fontFile = fontEngine->loadType1CFont(
3378 - fileName->getCString(),
3379 - fileName == tmpFileName,
3380 - ((Gfx8BitFont *)gfxFont)->getEncoding()))) {
3381 + fontFile = fontEngine->loadType1CFont(id, fontsrc,
3382 + ((Gfx8BitFont *)gfxFont)->getEncoding());
3384 error(-1, "Couldn't create a font for '%s'",
3385 gfxFont->getName() ? gfxFont->getName()->getCString()
3387 @@ -1047,7 +1041,11 @@
3391 - if ((ff = FoFiTrueType::load(fileName->getCString()))) {
3393 + ff = FoFiTrueType::load(fileName->getCString());
3395 + ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse);
3397 codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff);
3400 @@ -1057,8 +1055,7 @@
3402 if (!(fontFile = fontEngine->loadTrueTypeFont(
3404 - fileName->getCString(),
3405 - fileName == tmpFileName,
3408 error(-1, "Couldn't create a font for '%s'",
3409 gfxFont->getName() ? gfxFont->getName()->getCString()
3410 @@ -1068,10 +1065,8 @@
3414 - if (!(fontFile = fontEngine->loadCIDFont(
3416 - fileName->getCString(),
3417 - fileName == tmpFileName))) {
3418 + fontFile = fontEngine->loadCIDFont(id, fontsrc);
3420 error(-1, "Couldn't create a font for '%s'",
3421 gfxFont->getName() ? gfxFont->getName()->getCString()
3423 @@ -1084,7 +1079,11 @@
3425 // create a CID-to-GID mapping, via Unicode
3426 if ((ctu = ((GfxCIDFont *)gfxFont)->getToUnicode())) {
3427 - if ((ff = FoFiTrueType::load(fileName->getCString()))) {
3429 + ff = FoFiTrueType::load(fileName->getCString());
3431 + ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse);
3433 // look for a Unicode cmap
3434 for (cmap = 0; cmap < ff->getNumCmaps(); ++cmap) {
3435 if ((ff->getCmapPlatform(cmap) == 3 &&
3436 @@ -1116,16 +1115,28 @@
3438 if (((GfxCIDFont *)gfxFont)->getCIDToGID()) {
3439 n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
3440 - codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
3441 - memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
3442 - n * sizeof(Gushort));
3444 + codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
3445 + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
3446 + n * sizeof(Gushort));
3449 + ff = FoFiTrueType::load(fileName->getCString());
3451 + ff = new FoFiTrueType(tmpBuf, tmpBufLen, gFalse);
3454 + codeToGID = ((GfxCIDFont *)gfxFont)->getCodeToGIDMap(ff, &n);
3459 if (!(fontFile = fontEngine->loadTrueTypeFont(
3461 - fileName->getCString(),
3462 - fileName == tmpFileName,
3468 error(-1, "Couldn't create a font for '%s'",
3469 gfxFont->getName() ? gfxFont->getName()->getCString()
3471 @@ -1153,17 +1164,11 @@
3473 font = fontEngine->getFont(fontFile, mat);
3475 - if (tmpFileName) {
3476 - delete tmpFileName;
3483 - if (tmpFileName) {
3484 - delete tmpFileName;
3489 diff -Nur poppler.0_5_0/poppler/Stream.cc poppler.HEAD/poppler/Stream.cc
3490 --- poppler.0_5_0/poppler/Stream.cc 2006-01-11 17:52:58.000000000 +0100
3491 +++ poppler.HEAD/poppler/Stream.cc 2006-01-18 23:32:13.000000000 +0100
3493 #include "JBIG2Stream.h"
3494 #include "JPXStream.h"
3495 #include "Stream-CCITT.h"
3496 +#include "UGooString.h"
3498 #ifdef ENABLE_LIBJPEG
3499 #include "DCTStream.h"
3500 diff -Nur poppler.0_5_0/poppler/UGooString.cc poppler.HEAD/poppler/UGooString.cc
3501 --- poppler.0_5_0/poppler/UGooString.cc 1970-01-01 01:00:00.000000000 +0100
3502 +++ poppler.HEAD/poppler/UGooString.cc 2006-01-18 23:36:01.000000000 +0100
3504 +//========================================================================
3510 +// Copyright 2005 Albert Astals Cid <aacid@kde.org>
3512 +//========================================================================
3514 +#include <string.h>
3516 +#include "goo/gmem.h"
3517 +#include "goo/GooString.h"
3518 +#include "PDFDocEncoding.h"
3519 +#include "UGooString.h"
3521 +UGooString::UGooString(Unicode *u, int l)
3527 +UGooString::UGooString(GooString &str)
3529 + if ((str.getChar(0) & 0xff) == 0xfe && (str.getChar(1) & 0xff) == 0xff)
3531 + length = (str.getLength() - 2) / 2;
3532 + s = (Unicode *)gmallocn(length, sizeof(Unicode));
3533 + for (int j = 0; j < length; ++j) {
3534 + s[j] = ((str.getChar(2 + 2*j) & 0xff) << 8) | (str.getChar(3 + 2*j) & 0xff);
3540 +UGooString::UGooString(const UGooString &str)
3542 + length = str.length;
3543 + s = (Unicode *)gmallocn(length, sizeof(Unicode));
3544 + memcpy(s, str.s, length * sizeof(Unicode));
3547 +UGooString::UGooString(const char *str)
3549 + GooString aux(str);
3553 +void UGooString::initChar(GooString &str)
3555 + length = str.getLength();
3556 + s = (Unicode *)gmallocn(length, sizeof(Unicode));
3557 + for (int j = 0; j < length; ++j) {
3558 + s[j] = pdfDocEncoding[str.getChar(j) & 0xff];
3562 +UGooString::~UGooString()
3567 +int UGooString::cmp(UGooString *str) const
3574 + for (i = 0, p1 = s, p2 = str->s; i < n1 && i < n2; ++i, ++p1, ++p2) {
3583 +char *UGooString::getCString() const
3585 + char *res = new char[length + 1];
3586 + for (int i = 0; i < length; i++) res[i] = s[i];
3587 + res[length] = '\0';
3590 diff -Nur poppler.0_5_0/poppler/UGooString.h poppler.HEAD/poppler/UGooString.h
3591 --- poppler.0_5_0/poppler/UGooString.h 1970-01-01 01:00:00.000000000 +0100
3592 +++ poppler.HEAD/poppler/UGooString.h 2006-01-18 23:36:01.000000000 +0100
3594 +//========================================================================
3600 +// Copyright 2005 Albert Astals Cid <aacid@kde.org>
3602 +//========================================================================
3604 +#ifndef UGooString_H
3605 +#define UGooString_H
3607 +#include "CharTypes.h"
3614 + // Create an unicode string
3615 + UGooString(Unicode *u, int l);
3617 + // Create a unicode string from <str>.
3618 + UGooString(GooString &str);
3620 + // Copy the unicode string
3621 + UGooString(const UGooString &str);
3623 + // Create a unicode string from <str>.
3624 + UGooString(const char *str);
3630 + int getLength() const { return length; }
3632 + // Compare two strings: -1:< 0:= +1:>
3633 + int cmp(UGooString *str) const;
3635 + // get the unicode
3636 + Unicode *unicode() const { return s; }
3638 + // get the const char*
3639 + char *getCString() const;
3642 + void initChar(GooString &str);
3649 diff -Nur poppler.0_5_0/poppler/XRef.cc poppler.HEAD/poppler/XRef.cc
3650 --- poppler.0_5_0/poppler/XRef.cc 2005-09-20 16:59:43.000000000 +0200
3651 +++ poppler.HEAD/poppler/XRef.cc 2006-01-18 23:32:13.000000000 +0100
3655 #include "ErrorCodes.h"
3656 +#include "UGooString.h"
3659 //------------------------------------------------------------------------
3660 @@ -934,6 +935,23 @@
3664 +int XRef::getNumEntry(int offset) const
3667 + int resOffset = -1;
3669 + for (int i = 0; i < size; ++i)
3672 + if (e.offset < offset && e.offset > resOffset)
3675 + resOffset = e.offset;
3681 Guint XRef::strToUnsigned(char *s) {
3684 diff -Nur poppler.0_5_0/poppler/XRef.h poppler.HEAD/poppler/XRef.h
3685 --- poppler.0_5_0/poppler/XRef.h 2005-09-20 16:00:43.000000000 +0200
3686 +++ poppler.HEAD/poppler/XRef.h 2006-01-17 22:35:31.000000000 +0100
3688 // Returns false if unknown or file is not damaged.
3689 GBool getStreamEnd(Guint streamStart, Guint *streamEnd);
3691 + // Retuns the entry that belongs to the offset
3692 + int getNumEntry(int offset) const;
3695 int getSize() { return size; }
3696 XRefEntry *getEntry(int i) { return &entries[i]; }
3697 diff -Nur poppler.0_5_0/qt/Makefile.am poppler.HEAD/qt/Makefile.am
3698 --- poppler.0_5_0/qt/Makefile.am 2006-01-06 11:05:59.000000000 +0100
3699 +++ poppler.HEAD/qt/Makefile.am 2006-02-16 20:28:54.000000000 +0100
3701 $(POPPLER_QT_LIBS) \
3704 +libpoppler_qt_la_LDFLAGS = -version-info 1:0:0
3706 if BUILD_SPLASH_OUTPUT
3708 noinst_PROGRAMS = test-poppler-qt
3709 diff -Nur poppler.0_5_0/qt/poppler-document.cc poppler.HEAD/qt/poppler-document.cc
3710 --- poppler.0_5_0/qt/poppler-document.cc 2005-12-03 23:20:54.000000000 +0100
3711 +++ poppler.HEAD/qt/poppler-document.cc 2006-01-18 23:32:13.000000000 +0100
3713 #include <Catalog.h>
3714 #include <ErrorCodes.h>
3715 #include <SplashOutputDev.h>
3716 +#include <UGooString.h>
3717 #include <splash/SplashBitmap.h>
3718 #include "poppler-private.h"
3720 diff -Nur poppler.0_5_0/qt/poppler-page.cc poppler.HEAD/qt/poppler-page.cc
3721 --- poppler.0_5_0/qt/poppler-page.cc 2006-01-06 11:05:59.000000000 +0100
3722 +++ poppler.HEAD/qt/poppler-page.cc 2006-01-10 22:57:28.000000000 +0100
3724 #include <TextOutputDev.h>
3725 #include <splash/SplashBitmap.h>
3726 #include "poppler-private.h"
3727 +#include "poppler-page-transition-private.h"
3731 diff -Nur poppler.0_5_0/qt/poppler-page-transition.cc poppler.HEAD/qt/poppler-page-transition.cc
3732 --- poppler.0_5_0/qt/poppler-page-transition.cc 2006-01-06 11:05:59.000000000 +0100
3733 +++ poppler.HEAD/qt/poppler-page-transition.cc 2006-01-18 23:32:13.000000000 +0100
3738 +#include "UGooString.h"
3739 #include "poppler-page-transition.h"
3740 -#include "poppler-private.h"
3741 +#include "poppler-page-transition-private.h"
3745 diff -Nur poppler.0_5_0/qt/poppler-page-transition.h poppler.HEAD/qt/poppler-page-transition.h
3746 --- poppler.0_5_0/qt/poppler-page-transition.h 2006-01-06 11:05:59.000000000 +0100
3747 +++ poppler.HEAD/qt/poppler-page-transition.h 2006-01-18 22:22:12.000000000 +0100
3749 class PageTransitionParams;
3750 class PageTransitionData;
3753 + \brief Describes how a PDF file viewer shall perform the transition
3754 + from one page to another
3756 + In PDF files there is a way to specify if the viewer shall use
3757 + certain effects to perform the transition from one page to
3758 + another. This feature can be used, e.g., in a PDF-based beamer
3761 + This utility class represents the transition effect, and can be
3762 + used to extract the information from a PDF object.
3766 class PageTransition {
3769 + /** \brief transition effect that shall be used
3778 + /** \brief alignment of the transition effect that shall be used
3785 + /** \brief direction of the transition effect that shall be used
3792 /** \brief Construct a new PageTransition object from a page dictionary.
3794 - In case or error, this method will print an error message to stderr,
3795 + Users of the library will rarely need to construct a
3796 + PageTransition object themselves. Instead, the method
3797 + Poppler::Page::transition() can be used to find out if a certain
3798 + transition effect is specified.
3800 + @warning In case or error, this method will print an error message to stderr,
3801 and construct a default object.
3803 - @param dictObj pointer to an object whose dictionary will be read
3804 - and parsed. The pointer dictObj must point to a valid object, whose
3805 - dictionaries are accessed by the constructor. The dictObj is only
3806 - accessed by this constructor, and may be deleted after the
3807 - constructor returns.
3808 + @param params an object whose dictionary will be read and
3809 + parsed. This must be a valid object, whose dictionaries are
3810 + accessed by the constructor. The object is only accessed by this
3811 + constructor, and may be deleted after the constructor returns.
3813 PageTransition(const PageTransitionParams ¶ms);
3816 + /** \brief copy constructor */
3817 PageTransition(const PageTransition &pt);
3820 diff -Nur poppler.0_5_0/qt/poppler-page-transition-private.h poppler.HEAD/qt/poppler-page-transition-private.h
3821 --- poppler.0_5_0/qt/poppler-page-transition-private.h 1970-01-01 01:00:00.000000000 +0100
3822 +++ poppler.HEAD/qt/poppler-page-transition-private.h 2006-01-17 21:33:08.000000000 +0100
3825 + * Copyright (C) 2005, Albert Astals Cid
3827 + * This program is free software; you can redistribute it and/or modify
3828 + * it under the terms of the GNU General Public License as published by
3829 + * the Free Software Foundation; either version 2, or (at your option)
3830 + * any later version.
3832 + * This program is distributed in the hope that it will be useful,
3833 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
3834 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3835 + * GNU General Public License for more details.
3837 + * You should have received a copy of the GNU General Public License
3838 + * along with this program; if not, write to the Free Software
3839 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3844 +namespace Poppler {
3846 +class PageTransitionParams {
3852 diff -Nur poppler.0_5_0/qt/poppler-private.h poppler.HEAD/qt/poppler-private.h
3853 --- poppler.0_5_0/qt/poppler-private.h 2006-01-06 11:05:59.000000000 +0100
3854 +++ poppler.HEAD/qt/poppler-private.h 2006-01-10 22:57:28.000000000 +0100
3856 SplashOutputDev *m_outputDev;
3859 -class PageTransitionParams {
3865 diff -Nur poppler.0_5_0/qt4/src/Doxyfile poppler.HEAD/qt4/src/Doxyfile
3866 --- poppler.0_5_0/qt4/src/Doxyfile 1970-01-01 01:00:00.000000000 +0100
3867 +++ poppler.HEAD/qt4/src/Doxyfile 2006-01-18 22:22:12.000000000 +0100
3871 +# This file describes the settings to be used by the documentation system
3872 +# doxygen (www.doxygen.org) for a project
3874 +# All text after a hash (#) is considered a comment and will be ignored
3876 +# TAG = value [value, ...]
3877 +# For lists items can also be appended using:
3878 +# TAG += value [value, ...]
3879 +# Values that contain spaces should be placed between quotes (" ")
3881 +#---------------------------------------------------------------------------
3882 +# Project related configuration options
3883 +#---------------------------------------------------------------------------
3885 +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
3886 +# by quotes) that should identify the project.
3890 +# The PROJECT_NUMBER tag can be used to enter a project or revision number.
3891 +# This could be handy for archiving the generated documentation or
3892 +# if some version control system is used.
3896 +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
3897 +# base path where the generated documentation will be put.
3898 +# If a relative path is entered, it will be relative to the location
3899 +# where doxygen was started. If left blank the current directory will be used.
3903 +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
3904 +# 4096 sub-directories (in 2 levels) under the output directory of each output
3905 +# format and will distribute the generated files over these directories.
3906 +# Enabling this option can be useful when feeding doxygen a huge amount of
3907 +# source files, where putting all generated files in the same directory would
3908 +# otherwise cause performance problems for the file system.
3910 +CREATE_SUBDIRS = NO
3912 +# The OUTPUT_LANGUAGE tag is used to specify the language in which all
3913 +# documentation generated by doxygen is written. Doxygen will use this
3914 +# information to generate all constant output in the proper language.
3915 +# The default language is English, other supported languages are:
3916 +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish,
3917 +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese,
3918 +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian,
3919 +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish,
3920 +# Swedish, and Ukrainian.
3922 +OUTPUT_LANGUAGE = English
3924 +# This tag can be used to specify the encoding used in the generated output.
3925 +# The encoding is not always determined by the language that is chosen,
3926 +# but also whether or not the output is meant for Windows or non-Windows users.
3927 +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
3928 +# forces the Windows encoding (this is the default for the Windows binary),
3929 +# whereas setting the tag to NO uses a Unix-style encoding (the default for
3930 +# all platforms other than Windows).
3932 +USE_WINDOWS_ENCODING = NO
3934 +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
3935 +# include brief member descriptions after the members that are listed in
3936 +# the file and class documentation (similar to JavaDoc).
3937 +# Set to NO to disable this.
3939 +BRIEF_MEMBER_DESC = YES
3941 +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
3942 +# the brief description of a member or function before the detailed description.
3943 +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
3944 +# brief descriptions will be completely suppressed.
3948 +# This tag implements a quasi-intelligent brief description abbreviator
3949 +# that is used to form the text in various listings. Each string
3950 +# in this list, if found as the leading text of the brief description, will be
3951 +# stripped from the text and the result after processing the whole list, is
3952 +# used as the annotated text. Otherwise, the brief description is used as-is.
3953 +# If left blank, the following values are used ("$name" is automatically
3954 +# replaced with the name of the entity): "The $name class" "The $name widget"
3955 +# "The $name file" "is" "provides" "specifies" "contains"
3956 +# "represents" "a" "an" "the"
3960 +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
3961 +# Doxygen will generate a detailed section even if there is only a brief
3964 +ALWAYS_DETAILED_SEC = NO
3966 +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
3967 +# inherited members of a class in the documentation of that class as if those
3968 +# members were ordinary class members. Constructors, destructors and assignment
3969 +# operators of the base classes will not be shown.
3971 +INLINE_INHERITED_MEMB = NO
3973 +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
3974 +# path before files name in the file list and in the header files. If set
3975 +# to NO the shortest path that makes the file name unique will be used.
3977 +FULL_PATH_NAMES = YES
3979 +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
3980 +# can be used to strip a user-defined part of the path. Stripping is
3981 +# only done if one of the specified strings matches the left-hand part of
3982 +# the path. The tag can be used to show relative paths in the file list.
3983 +# If left blank the directory from which doxygen is run is used as the
3988 +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
3989 +# the path mentioned in the documentation of a class, which tells
3990 +# the reader which header file to include in order to use a class.
3991 +# If left blank only the name of the header file containing the class
3992 +# definition is used. Otherwise one should specify the include paths that
3993 +# are normally passed to the compiler using the -I flag.
3995 +STRIP_FROM_INC_PATH =
3997 +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
3998 +# (but less readable) file names. This can be useful is your file systems
3999 +# doesn't support long names like on DOS, Mac, or CD-ROM.
4003 +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
4004 +# will interpret the first line (until the first dot) of a JavaDoc-style
4005 +# comment as the brief description. If set to NO, the JavaDoc
4006 +# comments will behave just like the Qt-style comments (thus requiring an
4007 +# explicit @brief command for a brief description.
4009 +JAVADOC_AUTOBRIEF = YES
4011 +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
4012 +# treat a multi-line C++ special comment block (i.e. a block of //! or ///
4013 +# comments) as a brief description. This used to be the default behaviour.
4014 +# The new default is to treat a multi-line C++ comment block as a detailed
4015 +# description. Set this tag to YES if you prefer the old behaviour instead.
4017 +MULTILINE_CPP_IS_BRIEF = NO
4019 +# If the DETAILS_AT_TOP tag is set to YES then Doxygen
4020 +# will output the detailed description near the top, like JavaDoc.
4021 +# If set to NO, the detailed description appears after the member
4024 +DETAILS_AT_TOP = NO
4026 +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
4027 +# member inherits the documentation from any documented member that it
4032 +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
4033 +# tag is set to YES, then doxygen will reuse the documentation of the first
4034 +# member in the group (if any) for the other members of the group. By default
4035 +# all members of a group must be documented explicitly.
4037 +DISTRIBUTE_GROUP_DOC = NO
4039 +# The TAB_SIZE tag can be used to set the number of spaces in a tab.
4040 +# Doxygen uses this value to replace tabs by spaces in code fragments.
4044 +# This tag can be used to specify a number of aliases that acts
4045 +# as commands in the documentation. An alias has the form "name=value".
4046 +# For example adding "sideeffect=\par Side Effects:\n" will allow you to
4047 +# put the command \sideeffect (or @sideeffect) in the documentation, which
4048 +# will result in a user-defined paragraph with heading "Side Effects:".
4049 +# You can put \n's in the value part of an alias to insert newlines.
4053 +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
4054 +# sources only. Doxygen will then generate output that is more tailored for C.
4055 +# For instance, some of the names that are used will be different. The list
4056 +# of all members will be omitted, etc.
4058 +OPTIMIZE_OUTPUT_FOR_C = NO
4060 +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
4061 +# only. Doxygen will then generate output that is more tailored for Java.
4062 +# For instance, namespaces will be presented as packages, qualified scopes
4063 +# will look different, etc.
4065 +OPTIMIZE_OUTPUT_JAVA = NO
4067 +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
4068 +# the same type (for instance a group of public functions) to be put as a
4069 +# subgroup of that type (e.g. under the Public Functions section). Set it to
4070 +# NO to prevent subgrouping. Alternatively, this can be done per class using
4071 +# the \nosubgrouping command.
4075 +#---------------------------------------------------------------------------
4076 +# Build related configuration options
4077 +#---------------------------------------------------------------------------
4079 +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
4080 +# documentation are documented, even if no documentation was available.
4081 +# Private class members and static file members will be hidden unless
4082 +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
4086 +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
4087 +# will be included in the documentation.
4089 +EXTRACT_PRIVATE = NO
4091 +# If the EXTRACT_STATIC tag is set to YES all static members of a file
4092 +# will be included in the documentation.
4094 +EXTRACT_STATIC = NO
4096 +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
4097 +# defined locally in source files will be included in the documentation.
4098 +# If set to NO only classes defined in header files are included.
4100 +EXTRACT_LOCAL_CLASSES = YES
4102 +# This flag is only useful for Objective-C code. When set to YES local
4103 +# methods, which are defined in the implementation section but not in
4104 +# the interface are included in the documentation.
4105 +# If set to NO (the default) only methods in the interface are included.
4107 +EXTRACT_LOCAL_METHODS = NO
4109 +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
4110 +# undocumented members of documented classes, files or namespaces.
4111 +# If set to NO (the default) these members will be included in the
4112 +# various overviews, but no documentation section is generated.
4113 +# This option has no effect if EXTRACT_ALL is enabled.
4115 +HIDE_UNDOC_MEMBERS = NO
4117 +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
4118 +# undocumented classes that are normally visible in the class hierarchy.
4119 +# If set to NO (the default) these classes will be included in the various
4120 +# overviews. This option has no effect if EXTRACT_ALL is enabled.
4122 +HIDE_UNDOC_CLASSES = NO
4124 +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
4125 +# friend (class|struct|union) declarations.
4126 +# If set to NO (the default) these declarations will be included in the
4129 +HIDE_FRIEND_COMPOUNDS = NO
4131 +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
4132 +# documentation blocks found inside the body of a function.
4133 +# If set to NO (the default) these blocks will be appended to the
4134 +# function's detailed documentation block.
4136 +HIDE_IN_BODY_DOCS = NO
4138 +# The INTERNAL_DOCS tag determines if documentation
4139 +# that is typed after a \internal command is included. If the tag is set
4140 +# to NO (the default) then the documentation will be excluded.
4141 +# Set it to YES to include the internal documentation.
4145 +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
4146 +# file names in lower-case letters. If set to YES upper-case letters are also
4147 +# allowed. This is useful if you have classes or files whose names only differ
4148 +# in case and if your file system supports case sensitive file names. Windows
4149 +# and Mac users are advised to set this option to NO.
4151 +CASE_SENSE_NAMES = YES
4153 +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
4154 +# will show members with their full class and namespace scopes in the
4155 +# documentation. If set to YES the scope will be hidden.
4157 +HIDE_SCOPE_NAMES = NO
4159 +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
4160 +# will put a list of the files that are included by a file in the documentation
4163 +SHOW_INCLUDE_FILES = YES
4165 +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
4166 +# is inserted in the documentation for inline members.
4170 +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
4171 +# will sort the (detailed) documentation of file and class members
4172 +# alphabetically by member name. If set to NO the members will appear in
4173 +# declaration order.
4175 +SORT_MEMBER_DOCS = YES
4177 +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
4178 +# brief documentation of file, namespace and class members alphabetically
4179 +# by member name. If set to NO (the default) the members will appear in
4180 +# declaration order.
4182 +SORT_BRIEF_DOCS = NO
4184 +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
4185 +# sorted by fully-qualified names, including namespaces. If set to
4186 +# NO (the default), the class list will be sorted only by class name,
4187 +# not including the namespace part.
4188 +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
4189 +# Note: This option applies only to the class list, not to the
4190 +# alphabetical list.
4192 +SORT_BY_SCOPE_NAME = NO
4194 +# The GENERATE_TODOLIST tag can be used to enable (YES) or
4195 +# disable (NO) the todo list. This list is created by putting \todo
4196 +# commands in the documentation.
4198 +GENERATE_TODOLIST = YES
4200 +# The GENERATE_TESTLIST tag can be used to enable (YES) or
4201 +# disable (NO) the test list. This list is created by putting \test
4202 +# commands in the documentation.
4204 +GENERATE_TESTLIST = YES
4206 +# The GENERATE_BUGLIST tag can be used to enable (YES) or
4207 +# disable (NO) the bug list. This list is created by putting \bug
4208 +# commands in the documentation.
4210 +GENERATE_BUGLIST = YES
4212 +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
4213 +# disable (NO) the deprecated list. This list is created by putting
4214 +# \deprecated commands in the documentation.
4216 +GENERATE_DEPRECATEDLIST= YES
4218 +# The ENABLED_SECTIONS tag can be used to enable conditional
4219 +# documentation sections, marked by \if sectionname ... \endif.
4223 +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
4224 +# the initial value of a variable or define consists of for it to appear in
4225 +# the documentation. If the initializer consists of more lines than specified
4226 +# here it will be hidden. Use a value of 0 to hide initializers completely.
4227 +# The appearance of the initializer of individual variables and defines in the
4228 +# documentation can be controlled using \showinitializer or \hideinitializer
4229 +# command in the documentation regardless of this setting.
4231 +MAX_INITIALIZER_LINES = 30
4233 +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
4234 +# at the bottom of the documentation of classes and structs. If set to YES the
4235 +# list will mention the files that were used to generate the documentation.
4237 +SHOW_USED_FILES = YES
4239 +# If the sources in your project are distributed over multiple directories
4240 +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
4241 +# in the documentation.
4243 +SHOW_DIRECTORIES = YES
4245 +# The FILE_VERSION_FILTER tag can be used to specify a program or script that
4246 +# doxygen should invoke to get the current version for each file (typically from the
4247 +# version control system). Doxygen will invoke the program by executing (via
4248 +# popen()) the command <command> <input-file>, where <command> is the value of
4249 +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
4250 +# provided by doxygen. Whatever the progam writes to standard output
4251 +# is used as the file version. See the manual for examples.
4253 +FILE_VERSION_FILTER =
4255 +#---------------------------------------------------------------------------
4256 +# configuration options related to warning and progress messages
4257 +#---------------------------------------------------------------------------
4259 +# The QUIET tag can be used to turn on/off the messages that are generated
4260 +# by doxygen. Possible values are YES and NO. If left blank NO is used.
4264 +# The WARNINGS tag can be used to turn on/off the warning messages that are
4265 +# generated by doxygen. Possible values are YES and NO. If left blank
4270 +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
4271 +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
4272 +# automatically be disabled.
4274 +WARN_IF_UNDOCUMENTED = YES
4276 +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
4277 +# potential errors in the documentation, such as not documenting some
4278 +# parameters in a documented function, or documenting parameters that
4279 +# don't exist or using markup commands wrongly.
4281 +WARN_IF_DOC_ERROR = YES
4283 +# This WARN_NO_PARAMDOC option can be abled to get warnings for
4284 +# functions that are documented, but have no documentation for their parameters
4285 +# or return value. If set to NO (the default) doxygen will only warn about
4286 +# wrong or incomplete parameter documentation, but not about the absence of
4289 +WARN_NO_PARAMDOC = NO
4291 +# The WARN_FORMAT tag determines the format of the warning messages that
4292 +# doxygen can produce. The string should contain the $file, $line, and $text
4293 +# tags, which will be replaced by the file and line number from which the
4294 +# warning originated and the warning text. Optionally the format may contain
4295 +# $version, which will be replaced by the version of the file (if it could
4296 +# be obtained via FILE_VERSION_FILTER)
4298 +WARN_FORMAT = "$file:$line: $text"
4300 +# The WARN_LOGFILE tag can be used to specify a file to which warning
4301 +# and error messages should be written. If left blank the output is written
4306 +#---------------------------------------------------------------------------
4307 +# configuration options related to the input files
4308 +#---------------------------------------------------------------------------
4310 +# The INPUT tag can be used to specify the files and/or directories that contain
4311 +# documented source files. You may enter file names like "myfile.cpp" or
4312 +# directories like "/usr/src/myproject". Separate the files or directories
4315 +INPUT = . ../../qt/poppler-page-transition.h
4317 +# If the value of the INPUT tag contains directories, you can use the
4318 +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
4319 +# and *.h) to filter out the source-files in the directories. If left
4320 +# blank the following patterns are tested:
4321 +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
4322 +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
4326 +# The RECURSIVE tag can be used to turn specify whether or not subdirectories
4327 +# should be searched for input files as well. Possible values are YES and NO.
4328 +# If left blank NO is used.
4332 +# The EXCLUDE tag can be used to specify files and/or directories that should
4333 +# excluded from the INPUT source files. This way you can easily exclude a
4334 +# subdirectory from a directory tree whose root is specified with the INPUT tag.
4338 +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
4339 +# directories that are symbolic links (a Unix filesystem feature) are excluded
4342 +EXCLUDE_SYMLINKS = NO
4344 +# If the value of the INPUT tag contains directories, you can use the
4345 +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
4346 +# certain files from those directories.
4350 +# The EXAMPLE_PATH tag can be used to specify one or more files or
4351 +# directories that contain example code fragments that are included (see
4352 +# the \include command).
4356 +# If the value of the EXAMPLE_PATH tag contains directories, you can use the
4357 +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
4358 +# and *.h) to filter out the source-files in the directories. If left
4359 +# blank all files are included.
4363 +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
4364 +# searched for input files to be used with the \include or \dontinclude
4365 +# commands irrespective of the value of the RECURSIVE tag.
4366 +# Possible values are YES and NO. If left blank NO is used.
4368 +EXAMPLE_RECURSIVE = NO
4370 +# The IMAGE_PATH tag can be used to specify one or more files or
4371 +# directories that contain image that are included in the documentation (see
4372 +# the \image command).
4376 +# The INPUT_FILTER tag can be used to specify a program that doxygen should
4377 +# invoke to filter for each input file. Doxygen will invoke the filter program
4378 +# by executing (via popen()) the command <filter> <input-file>, where <filter>
4379 +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
4380 +# input file. Doxygen will then use the output that the filter program writes
4381 +# to standard output. If FILTER_PATTERNS is specified, this tag will be
4386 +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
4387 +# basis. Doxygen will compare the file name with each pattern and apply the
4388 +# filter if there is a match. The filters are a list of the form:
4389 +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
4390 +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
4391 +# is applied to all files.
4395 +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
4396 +# INPUT_FILTER) will be used to filter the input files when producing source
4397 +# files to browse (i.e. when SOURCE_BROWSER is set to YES).
4399 +FILTER_SOURCE_FILES = NO
4401 +#---------------------------------------------------------------------------
4402 +# configuration options related to source browsing
4403 +#---------------------------------------------------------------------------
4405 +# If the SOURCE_BROWSER tag is set to YES then a list of source files will
4406 +# be generated. Documented entities will be cross-referenced with these sources.
4407 +# Note: To get rid of all source code in the generated output, make sure also
4408 +# VERBATIM_HEADERS is set to NO.
4410 +SOURCE_BROWSER = NO
4412 +# Setting the INLINE_SOURCES tag to YES will include the body
4413 +# of functions and classes directly in the documentation.
4415 +INLINE_SOURCES = NO
4417 +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
4418 +# doxygen to hide any special comment blocks from generated source code
4419 +# fragments. Normal C and C++ comments will always remain visible.
4421 +STRIP_CODE_COMMENTS = YES
4423 +# If the REFERENCED_BY_RELATION tag is set to YES (the default)
4424 +# then for each documented function all documented
4425 +# functions referencing it will be listed.
4427 +REFERENCED_BY_RELATION = YES
4429 +# If the REFERENCES_RELATION tag is set to YES (the default)
4430 +# then for each documented function all documented entities
4431 +# called/used by that function will be listed.
4433 +REFERENCES_RELATION = YES
4435 +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
4436 +# will generate a verbatim copy of the header file for each class for
4437 +# which an include is specified. Set to NO to disable this.
4439 +VERBATIM_HEADERS = YES
4441 +#---------------------------------------------------------------------------
4442 +# configuration options related to the alphabetical class index
4443 +#---------------------------------------------------------------------------
4445 +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
4446 +# of all compounds will be generated. Enable this if the project
4447 +# contains a lot of classes, structs, unions or interfaces.
4449 +ALPHABETICAL_INDEX = NO
4451 +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
4452 +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
4453 +# in which this list will be split (can be a number in the range [1..20])
4455 +COLS_IN_ALPHA_INDEX = 5
4457 +# In case all classes in a project start with a common prefix, all
4458 +# classes will be put under the same header in the alphabetical index.
4459 +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
4460 +# should be ignored while generating the index headers.
4464 +#---------------------------------------------------------------------------
4465 +# configuration options related to the HTML output
4466 +#---------------------------------------------------------------------------
4468 +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
4469 +# generate HTML output.
4471 +GENERATE_HTML = YES
4473 +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
4474 +# If a relative path is entered the value of OUTPUT_DIRECTORY will be
4475 +# put in front of it. If left blank `html' will be used as the default path.
4477 +HTML_OUTPUT = APIDOCS-html
4479 +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
4480 +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
4481 +# doxygen will generate files with .html extension.
4483 +HTML_FILE_EXTENSION = .html
4485 +# The HTML_HEADER tag can be used to specify a personal HTML header for
4486 +# each generated HTML page. If it is left blank doxygen will generate a
4491 +# The HTML_FOOTER tag can be used to specify a personal HTML footer for
4492 +# each generated HTML page. If it is left blank doxygen will generate a
4497 +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
4498 +# style sheet that is used by each HTML page. It can be used to
4499 +# fine-tune the look of the HTML output. If the tag is left blank doxygen
4500 +# will generate a default style sheet. Note that doxygen will try to copy
4501 +# the style sheet file to the HTML output directory, so don't put your own
4502 +# stylesheet in the HTML output directory as well, or it will be erased!
4506 +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
4507 +# files or namespaces will be aligned in HTML using tables. If set to
4508 +# NO a bullet list will be used.
4510 +HTML_ALIGN_MEMBERS = YES
4512 +# If the GENERATE_HTMLHELP tag is set to YES, additional index files
4513 +# will be generated that can be used as input for tools like the
4514 +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
4515 +# of the generated HTML documentation.
4517 +GENERATE_HTMLHELP = NO
4519 +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
4520 +# be used to specify the file name of the resulting .chm file. You
4521 +# can add a path in front of the file if the result should not be
4522 +# written to the html output directory.
4526 +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
4527 +# be used to specify the location (absolute path including file name) of
4528 +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
4529 +# the HTML help compiler on the generated index.hhp.
4533 +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
4534 +# controls if a separate .chi index file is generated (YES) or that
4535 +# it should be included in the master .chm file (NO).
4539 +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
4540 +# controls whether a binary table of contents is generated (YES) or a
4541 +# normal table of contents (NO) in the .chm file.
4545 +# The TOC_EXPAND flag can be set to YES to add extra items for group members
4546 +# to the contents of the HTML help documentation and to the tree view.
4550 +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
4551 +# top of each HTML page. The value NO (the default) enables the index and
4552 +# the value YES disables it.
4556 +# This tag can be used to set the number of enum values (range [1..20])
4557 +# that doxygen will group on one line in the generated HTML documentation.
4559 +ENUM_VALUES_PER_LINE = 4
4561 +# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
4562 +# generated containing a tree-like index structure (just like the one that
4563 +# is generated for HTML Help). For this to work a browser that supports
4564 +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
4565 +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
4566 +# probably better off using the HTML help feature.
4568 +GENERATE_TREEVIEW = NO
4570 +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
4571 +# used to set the initial width (in pixels) of the frame in which the tree
4574 +TREEVIEW_WIDTH = 250
4576 +#---------------------------------------------------------------------------
4577 +# configuration options related to the LaTeX output
4578 +#---------------------------------------------------------------------------
4580 +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
4581 +# generate Latex output.
4583 +GENERATE_LATEX = YES
4585 +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
4586 +# If a relative path is entered the value of OUTPUT_DIRECTORY will be
4587 +# put in front of it. If left blank `latex' will be used as the default path.
4589 +LATEX_OUTPUT = APIDOCS-latex
4591 +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
4592 +# invoked. If left blank `latex' will be used as the default command name.
4594 +LATEX_CMD_NAME = latex
4596 +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
4597 +# generate index for LaTeX. If left blank `makeindex' will be used as the
4598 +# default command name.
4600 +MAKEINDEX_CMD_NAME = makeindex
4602 +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
4603 +# LaTeX documents. This may be useful for small projects and may help to
4604 +# save some trees in general.
4608 +# The PAPER_TYPE tag can be used to set the paper type that is used
4609 +# by the printer. Possible values are: a4, a4wide, letter, legal and
4610 +# executive. If left blank a4wide will be used.
4612 +PAPER_TYPE = a4wide
4614 +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
4615 +# packages that should be included in the LaTeX output.
4619 +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
4620 +# the generated latex document. The header should contain everything until
4621 +# the first chapter. If it is left blank doxygen will generate a
4622 +# standard header. Notice: only use this tag if you know what you are doing!
4626 +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
4627 +# is prepared for conversion to pdf (using ps2pdf). The pdf file will
4628 +# contain links (just like the HTML output) instead of page references
4629 +# This makes the output suitable for online browsing using a pdf viewer.
4631 +PDF_HYPERLINKS = NO
4633 +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
4634 +# plain latex in the generated Makefile. Set this option to YES to get a
4635 +# higher quality PDF documentation.
4639 +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
4640 +# command to the generated LaTeX files. This will instruct LaTeX to keep
4641 +# running if errors occur, instead of asking the user for help.
4642 +# This option is also used when generating formulas in HTML.
4644 +LATEX_BATCHMODE = NO
4646 +# If LATEX_HIDE_INDICES is set to YES then doxygen will not
4647 +# include the index chapters (such as File Index, Compound Index, etc.)
4650 +LATEX_HIDE_INDICES = NO
4652 +#---------------------------------------------------------------------------
4653 +# configuration options related to the RTF output
4654 +#---------------------------------------------------------------------------
4656 +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
4657 +# The RTF output is optimized for Word 97 and may not look very pretty with
4658 +# other RTF readers or editors.
4662 +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
4663 +# If a relative path is entered the value of OUTPUT_DIRECTORY will be
4664 +# put in front of it. If left blank `rtf' will be used as the default path.
4668 +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
4669 +# RTF documents. This may be useful for small projects and may help to
4670 +# save some trees in general.
4674 +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
4675 +# will contain hyperlink fields. The RTF file will
4676 +# contain links (just like the HTML output) instead of page references.
4677 +# This makes the output suitable for online browsing using WORD or other
4678 +# programs which support those fields.
4679 +# Note: wordpad (write) and others do not support links.
4681 +RTF_HYPERLINKS = NO
4683 +# Load stylesheet definitions from file. Syntax is similar to doxygen's
4684 +# config file, i.e. a series of assignments. You only have to provide
4685 +# replacements, missing definitions are set to their default value.
4687 +RTF_STYLESHEET_FILE =
4689 +# Set optional variables used in the generation of an rtf document.
4690 +# Syntax is similar to doxygen's config file.
4692 +RTF_EXTENSIONS_FILE =
4694 +#---------------------------------------------------------------------------
4695 +# configuration options related to the man page output
4696 +#---------------------------------------------------------------------------
4698 +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
4699 +# generate man pages
4703 +# The MAN_OUTPUT tag is used to specify where the man pages will be put.
4704 +# If a relative path is entered the value of OUTPUT_DIRECTORY will be
4705 +# put in front of it. If left blank `man' will be used as the default path.
4709 +# The MAN_EXTENSION tag determines the extension that is added to
4710 +# the generated man pages (default is the subroutine's section .3)
4714 +# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
4715 +# then it will generate one additional man file for each entity
4716 +# documented in the real man page(s). These additional files
4717 +# only source the real man page, but without them the man command
4718 +# would be unable to find the correct page. The default is NO.
4722 +#---------------------------------------------------------------------------
4723 +# configuration options related to the XML output
4724 +#---------------------------------------------------------------------------
4726 +# If the GENERATE_XML tag is set to YES Doxygen will
4727 +# generate an XML file that captures the structure of
4728 +# the code including all documentation.
4732 +# The XML_OUTPUT tag is used to specify where the XML pages will be put.
4733 +# If a relative path is entered the value of OUTPUT_DIRECTORY will be
4734 +# put in front of it. If left blank `xml' will be used as the default path.
4738 +# The XML_SCHEMA tag can be used to specify an XML schema,
4739 +# which can be used by a validating XML parser to check the
4740 +# syntax of the XML files.
4744 +# The XML_DTD tag can be used to specify an XML DTD,
4745 +# which can be used by a validating XML parser to check the
4746 +# syntax of the XML files.
4750 +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
4751 +# dump the program listings (including syntax highlighting
4752 +# and cross-referencing information) to the XML output. Note that
4753 +# enabling this will significantly increase the size of the XML output.
4755 +XML_PROGRAMLISTING = YES
4757 +#---------------------------------------------------------------------------
4758 +# configuration options for the AutoGen Definitions output
4759 +#---------------------------------------------------------------------------
4761 +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
4762 +# generate an AutoGen Definitions (see autogen.sf.net) file
4763 +# that captures the structure of the code including all
4764 +# documentation. Note that this feature is still experimental
4765 +# and incomplete at the moment.
4767 +GENERATE_AUTOGEN_DEF = NO
4769 +#---------------------------------------------------------------------------
4770 +# configuration options related to the Perl module output
4771 +#---------------------------------------------------------------------------
4773 +# If the GENERATE_PERLMOD tag is set to YES Doxygen will
4774 +# generate a Perl module file that captures the structure of
4775 +# the code including all documentation. Note that this
4776 +# feature is still experimental and incomplete at the
4779 +GENERATE_PERLMOD = NO
4781 +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
4782 +# the necessary Makefile rules, Perl scripts and LaTeX code to be able
4783 +# to generate PDF and DVI output from the Perl module output.
4787 +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
4788 +# nicely formatted so it can be parsed by a human reader. This is useful
4789 +# if you want to understand what is going on. On the other hand, if this
4790 +# tag is set to NO the size of the Perl module output will be much smaller
4791 +# and Perl will parse it just the same.
4793 +PERLMOD_PRETTY = YES
4795 +# The names of the make variables in the generated doxyrules.make file
4796 +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
4797 +# This is useful so different doxyrules.make files included by the same
4798 +# Makefile don't overwrite each other's variables.
4800 +PERLMOD_MAKEVAR_PREFIX =
4802 +#---------------------------------------------------------------------------
4803 +# Configuration options related to the preprocessor
4804 +#---------------------------------------------------------------------------
4806 +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
4807 +# evaluate all C-preprocessor directives found in the sources and include
4810 +ENABLE_PREPROCESSING = YES
4812 +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
4813 +# names in the source code. If set to NO (the default) only conditional
4814 +# compilation will be performed. Macro expansion can be done in a controlled
4815 +# way by setting EXPAND_ONLY_PREDEF to YES.
4817 +MACRO_EXPANSION = NO
4819 +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
4820 +# then the macro expansion is limited to the macros specified with the
4821 +# PREDEFINED and EXPAND_AS_PREDEFINED tags.
4823 +EXPAND_ONLY_PREDEF = NO
4825 +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
4826 +# in the INCLUDE_PATH (see below) will be search if a #include is found.
4828 +SEARCH_INCLUDES = YES
4830 +# The INCLUDE_PATH tag can be used to specify one or more directories that
4831 +# contain include files that are not input files but should be processed by
4832 +# the preprocessor.
4836 +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
4837 +# patterns (like *.h and *.hpp) to filter out the header-files in the
4838 +# directories. If left blank, the patterns specified with FILE_PATTERNS will
4841 +INCLUDE_FILE_PATTERNS =
4843 +# The PREDEFINED tag can be used to specify one or more macro names that
4844 +# are defined before the preprocessor is started (similar to the -D option of
4845 +# gcc). The argument of the tag is a list of macros of the form: name
4846 +# or name=definition (no spaces). If the definition and the = are
4847 +# omitted =1 is assumed. To prevent a macro definition from being
4848 +# undefined via #undef or recursively expanded use the := operator
4849 +# instead of the = operator.
4851 +PREDEFINED = UNSTABLE_POPPLER_QT4
4853 +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
4854 +# this tag can be used to specify a list of macro names that should be expanded.
4855 +# The macro definition that is found in the sources will be used.
4856 +# Use the PREDEFINED tag if you want to use a different macro definition.
4858 +EXPAND_AS_DEFINED =
4860 +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
4861 +# doxygen's preprocessor will remove all function-like macros that are alone
4862 +# on a line, have an all uppercase name, and do not end with a semicolon. Such
4863 +# function macros are typically used for boiler-plate code, and will confuse
4864 +# the parser if not removed.
4866 +SKIP_FUNCTION_MACROS = YES
4868 +#---------------------------------------------------------------------------
4869 +# Configuration::additions related to external references
4870 +#---------------------------------------------------------------------------
4872 +# The TAGFILES option can be used to specify one or more tagfiles.
4873 +# Optionally an initial location of the external documentation
4874 +# can be added for each tagfile. The format of a tag file without
4875 +# this location is as follows:
4876 +# TAGFILES = file1 file2 ...
4877 +# Adding location for the tag files is done as follows:
4878 +# TAGFILES = file1=loc1 "file2 = loc2" ...
4879 +# where "loc1" and "loc2" can be relative or absolute paths or
4880 +# URLs. If a location is present for each tag, the installdox tool
4881 +# does not have to be run to correct the links.
4882 +# Note that each tag file must have a unique name
4883 +# (where the name does NOT include the path)
4884 +# If a tag file is not located in the directory in which doxygen
4885 +# is run, you must also specify the path to the tagfile here.
4889 +# When a file name is specified after GENERATE_TAGFILE, doxygen will create
4890 +# a tag file that is based on the input files it reads.
4894 +# If the ALLEXTERNALS tag is set to YES all external classes will be listed
4895 +# in the class index. If set to NO only the inherited external classes
4900 +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
4901 +# in the modules index. If set to NO, only the current project's groups will
4904 +EXTERNAL_GROUPS = YES
4906 +# The PERL_PATH should be the absolute path and name of the perl script
4907 +# interpreter (i.e. the result of `which perl').
4909 +PERL_PATH = /usr/bin/perl
4911 +#---------------------------------------------------------------------------
4912 +# Configuration options related to the dot tool
4913 +#---------------------------------------------------------------------------
4915 +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
4916 +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
4917 +# or super classes. Setting the tag to NO turns the diagrams off. Note that
4918 +# this option is superseded by the HAVE_DOT option below. This is only a
4919 +# fallback. It is recommended to install and use dot, since it yields more
4922 +CLASS_DIAGRAMS = YES
4924 +# If set to YES, the inheritance and collaboration graphs will hide
4925 +# inheritance and usage relations if the target is undocumented
4926 +# or is not a class.
4928 +HIDE_UNDOC_RELATIONS = YES
4930 +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
4931 +# available from the path. This tool is part of Graphviz, a graph visualization
4932 +# toolkit from AT&T and Lucent Bell Labs. The other options in this section
4933 +# have no effect if this option is set to NO (the default)
4937 +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
4938 +# will generate a graph for each documented class showing the direct and
4939 +# indirect inheritance relations. Setting this tag to YES will force the
4940 +# the CLASS_DIAGRAMS tag to NO.
4944 +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
4945 +# will generate a graph for each documented class showing the direct and
4946 +# indirect implementation dependencies (inheritance, containment, and
4947 +# class references variables) of the class with other documented classes.
4949 +COLLABORATION_GRAPH = YES
4951 +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
4952 +# will generate a graph for groups, showing the direct groups dependencies
4956 +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
4957 +# collaboration diagrams in a style similar to the OMG's Unified Modeling
4962 +# If set to YES, the inheritance and collaboration graphs will show the
4963 +# relations between templates and their instances.
4965 +TEMPLATE_RELATIONS = NO
4967 +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
4968 +# tags are set to YES then doxygen will generate a graph for each documented
4969 +# file showing the direct and indirect include dependencies of the file with
4970 +# other documented files.
4972 +INCLUDE_GRAPH = YES
4974 +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
4975 +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
4976 +# documented header file showing the documented files that directly or
4977 +# indirectly include this file.
4979 +INCLUDED_BY_GRAPH = YES
4981 +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
4982 +# generate a call dependency graph for every global function or class method.
4983 +# Note that enabling this option will significantly increase the time of a run.
4984 +# So in most cases it will be better to enable call graphs for selected
4985 +# functions only using the \callgraph command.
4989 +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
4990 +# will graphical hierarchy of all classes instead of a textual one.
4992 +GRAPHICAL_HIERARCHY = YES
4994 +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
4995 +# then doxygen will show the dependencies a directory has on other directories
4996 +# in a graphical way. The dependency relations are determined by the #include
4997 +# relations between the files in the directories.
4999 +DIRECTORY_GRAPH = YES
5001 +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
5002 +# generated by dot. Possible values are png, jpg, or gif
5003 +# If left blank png will be used.
5005 +DOT_IMAGE_FORMAT = png
5007 +# The tag DOT_PATH can be used to specify the path where the dot tool can be
5008 +# found. If left blank, it is assumed the dot tool can be found in the path.
5012 +# The DOTFILE_DIRS tag can be used to specify one or more directories that
5013 +# contain dot files that are included in the documentation (see the
5014 +# \dotfile command).
5018 +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
5019 +# (in pixels) of the graphs generated by dot. If a graph becomes larger than
5020 +# this value, doxygen will try to truncate the graph, so that it fits within
5021 +# the specified constraint. Beware that most browsers cannot cope with very
5024 +MAX_DOT_GRAPH_WIDTH = 1024
5026 +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
5027 +# (in pixels) of the graphs generated by dot. If a graph becomes larger than
5028 +# this value, doxygen will try to truncate the graph, so that it fits within
5029 +# the specified constraint. Beware that most browsers cannot cope with very
5032 +MAX_DOT_GRAPH_HEIGHT = 1024
5034 +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
5035 +# graphs generated by dot. A depth value of 3 means that only nodes reachable
5036 +# from the root by following a path via at most 3 edges will be shown. Nodes
5037 +# that lay further from the root node will be omitted. Note that setting this
5038 +# option to 1 or 2 may greatly reduce the computation time needed for large
5039 +# code bases. Also note that a graph may be further truncated if the graph's
5040 +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH
5041 +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default),
5042 +# the graph is not depth-constrained.
5044 +MAX_DOT_GRAPH_DEPTH = 0
5046 +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
5047 +# background. This is disabled by default, which results in a white background.
5048 +# Warning: Depending on the platform used, enabling this option may lead to
5049 +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
5052 +DOT_TRANSPARENT = NO
5054 +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
5055 +# files in one run (i.e. multiple -o and -T options on the command line). This
5056 +# makes dot run faster, but since only newer versions of dot (>1.8.10)
5057 +# support this, this feature is disabled by default.
5059 +DOT_MULTI_TARGETS = NO
5061 +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
5062 +# generate a legend page explaining the meaning of the various boxes and
5063 +# arrows in the dot generated graphs.
5065 +GENERATE_LEGEND = YES
5067 +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
5068 +# remove the intermediate dot files that are used to generate
5069 +# the various graphs.
5073 +#---------------------------------------------------------------------------
5074 +# Configuration::additions related to the search engine
5075 +#---------------------------------------------------------------------------
5077 +# The SEARCHENGINE tag specifies whether or not a search engine should be
5078 +# used. If set to NO the values of all tags below this one will be ignored.
5081 diff -Nur poppler.0_5_0/qt4/src/Makefile.am poppler.HEAD/qt4/src/Makefile.am
5082 --- poppler.0_5_0/qt4/src/Makefile.am 2006-01-06 11:05:59.000000000 +0100
5083 +++ poppler.HEAD/qt4/src/Makefile.am 2006-02-16 20:28:54.000000000 +0100
5087 -I$(top_srcdir)/poppler \
5088 + -I$(top_srcdir)/qt \
5089 $(POPPLER_QT4_CXXFLAGS)
5093 poppler-document.cc \
5095 poppler-fontinfo.cc \
5096 + poppler-embeddedfile.cc \
5097 poppler-textbox.cc \
5098 ../../qt/poppler-page-transition.cc \
5101 $(top_builddir)/poppler/libpoppler.la \
5104 +libpoppler_qt4_la_LDFLAGS = -version-info 1:0:0
5106 diff -Nur poppler.0_5_0/qt4/src/poppler-document.cc poppler.HEAD/qt4/src/poppler-document.cc
5107 --- poppler.0_5_0/qt4/src/poppler-document.cc 2006-01-01 23:35:48.000000000 +0100
5108 +++ poppler.HEAD/qt4/src/poppler-document.cc 2006-01-18 23:32:13.000000000 +0100
5110 #include <GlobalParams.h>
5112 #include <Catalog.h>
5113 +#include "UGooString.h"
5114 #include <ErrorCodes.h>
5115 #include <SplashOutputDev.h>
5116 #include <splash/SplashBitmap.h>
5117 #include "poppler-private.h"
5118 +#include <Stream.h>
5119 +#include <QtCore/QDebug>
5125 pdoc->m_doc->locked = false;
5126 pdoc->m_doc->m_fontInfoScanner = new FontInfoScanner(&(doc->doc));
5127 + int numEmb = doc->doc.getCatalog()->numEmbeddedFiles();
5128 + if (!(0 == numEmb)) {
5129 + // we have some embedded documents, build the list
5130 + for (int yalv = 0; yalv < numEmb; ++yalv) {
5131 + EmbFile *ef = doc->doc.getCatalog()->embeddedFile(yalv);
5132 + pdoc->m_doc->m_embeddedFiles.append(new EmbeddedFile(ef));
5139 @@ -150,6 +162,11 @@
5143 + const QList<EmbeddedFile*> &Document::embeddedFiles() const
5145 + return m_doc->m_embeddedFiles;
5148 bool Document::scanForFonts( int numPages, QList<FontInfo> *fontList ) const
5150 GooList *items = m_doc->m_fontInfoScanner->scan( numPages );
5152 Dict *infoDict = info.getDict();
5153 // somehow iterate over keys in infoDict
5154 for( int i=0; i < infoDict->getLength(); ++i ) {
5155 - keys.append( QString::fromAscii(infoDict->getKey(i)) );
5156 + keys.append( QString::fromAscii(infoDict->getKey(i)->getCString()) );
5165 - int year, mon, day, hour, min, sec;
5166 Dict *infoDict = info.getDict();
5169 @@ -364,6 +379,11 @@
5173 + bool Document::hasEmbeddedFiles() const
5175 + return (!(0 == m_doc->doc.getCatalog()->numEmbeddedFiles()));
5178 QDateTime convertDate( char *dateString )
5181 diff -Nur poppler.0_5_0/qt4/src/poppler-embeddedfile.cc poppler.HEAD/qt4/src/poppler-embeddedfile.cc
5182 --- poppler.0_5_0/qt4/src/poppler-embeddedfile.cc 1970-01-01 01:00:00.000000000 +0100
5183 +++ poppler.HEAD/qt4/src/poppler-embeddedfile.cc 2006-01-18 23:38:59.000000000 +0100
5185 +/* poppler-document.cc: qt interface to poppler
5186 + * Copyright (C) 2005, Albert Astals Cid <aacid@kde.org>
5187 + * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
5189 + * This program is free software; you can redistribute it and/or modify
5190 + * it under the terms of the GNU General Public License as published by
5191 + * the Free Software Foundation; either version 2, or (at your option)
5192 + * any later version.
5194 + * This program is distributed in the hope that it will be useful,
5195 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
5196 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5197 + * GNU General Public License for more details.
5199 + * You should have received a copy of the GNU General Public License
5200 + * along with this program; if not, write to the Free Software
5201 + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
5204 +#define UNSTABLE_POPPLER_QT4
5206 +#include <QtCore/QString>
5207 +#include <QtCore/QDateTime>
5209 +#include "Object.h"
5210 +#include "Stream.h"
5211 +#include "Catalog.h"
5213 +#include "poppler-qt4.h"
5218 +class EmbeddedFileData
5222 + QString m_description;
5223 + QDateTime m_modDate;
5224 + QDateTime m_createDate;
5225 + Object m_streamObject;
5228 +EmbeddedFile::EmbeddedFile(EmbFile *embfile)
5230 + m_embeddedFile = new EmbeddedFileData();
5231 + m_embeddedFile->m_label = QString(embfile->name()->getCString());
5232 + m_embeddedFile->m_description = QString(embfile->description()->getCString());
5233 + m_embeddedFile->m_modDate = convertDate(embfile->modDate()->getCString());
5234 + m_embeddedFile->m_createDate = convertDate(embfile->createDate()->getCString());
5235 + embfile->streamObject().copy(&m_embeddedFile->m_streamObject);
5238 +EmbeddedFile::EmbeddedFile(const EmbeddedFile &ef)
5240 + m_embeddedFile = new EmbeddedFileData();
5241 + m_embeddedFile->m_label = ef.m_embeddedFile->m_label;
5242 + m_embeddedFile->m_description = ef.m_embeddedFile->m_description;
5243 + m_embeddedFile->m_modDate = ef.m_embeddedFile->m_modDate;
5244 + m_embeddedFile->m_createDate = ef.m_embeddedFile->m_createDate;
5245 + ef.m_embeddedFile->m_streamObject.copy(&m_embeddedFile->m_streamObject);
5248 +EmbeddedFile::~EmbeddedFile()
5250 + m_embeddedFile->m_streamObject.free();
5251 + delete m_embeddedFile;
5254 +QString EmbeddedFile::name() const
5256 + return m_embeddedFile->m_label;
5259 +QString EmbeddedFile::description() const
5261 + return m_embeddedFile->m_description;
5264 +QDateTime EmbeddedFile::modDate() const
5266 + return m_embeddedFile->m_modDate;
5269 +QDateTime EmbeddedFile::createDate() const
5271 + return m_embeddedFile->m_createDate;
5274 +QByteArray EmbeddedFile::data()
5277 + Stream *stream = m_embeddedFile->m_streamObject.getStream();
5280 + QByteArray fileArray;
5282 + while ( (i = stream->getChar()) != EOF) {
5283 + fileArray[dataLen] = (char)i;
5286 + fileArray.resize(dataLen);
5291 diff -Nur poppler.0_5_0/qt4/src/poppler-page.cc poppler.HEAD/qt4/src/poppler-page.cc
5292 --- poppler.0_5_0/qt4/src/poppler-page.cc 2006-01-05 14:53:58.000000000 +0100
5293 +++ poppler.HEAD/qt4/src/poppler-page.cc 2006-01-10 22:57:28.000000000 +0100
5295 #include <Catalog.h>
5296 #include <ErrorCodes.h>
5297 #include <ArthurOutputDev.h>
5298 -#include <Private.h>
5299 #include <SplashOutputDev.h>
5300 #include <TextOutputDev.h>
5301 #include <splash/SplashBitmap.h>
5303 #include "poppler-private.h"
5304 +#include "poppler-page-transition-private.h"
5308 diff -Nur poppler.0_5_0/qt4/src/poppler-private.h poppler.HEAD/qt4/src/poppler-private.h
5309 --- poppler.0_5_0/qt4/src/poppler-private.h 2006-01-01 23:35:48.000000000 +0100
5310 +++ poppler.HEAD/qt4/src/poppler-private.h 2006-01-18 23:32:13.000000000 +0100
5315 + qDeleteAll(m_embeddedFiles);
5316 delete m_splashOutputDev;
5317 delete m_fontInfoScanner;
5321 FontInfoScanner *m_fontInfoScanner;
5322 SplashOutputDev *m_splashOutputDev;
5323 + QList<EmbeddedFile*> m_embeddedFiles;
5327 diff -Nur poppler.0_5_0/qt4/src/poppler-qt4.h poppler.HEAD/qt4/src/poppler-qt4.h
5328 --- poppler.0_5_0/qt4/src/poppler-qt4.h 2006-01-05 14:53:58.000000000 +0100
5329 +++ poppler.HEAD/qt4/src/poppler-qt4.h 2006-01-18 23:32:13.000000000 +0100
5331 #include <QtCore/QDateTime>
5332 #include <QtGui/QPixmap>
5334 -#include <PageTransition.h>
5335 +#include <poppler-page-transition.h>
5340 The Poppler Qt bindings
5341 @@ -146,6 +148,58 @@
5345 + Container class for an embedded file with a PDF document
5347 + class EmbeddedFileData;
5348 + class EmbeddedFile {
5351 + Create a new embedded file container
5353 + EmbeddedFile(EmbFile *embfile);
5355 + EmbeddedFile(const EmbeddedFile &ef);
5360 + The name associated with the file
5362 + QString name() const;
5365 + The description associated with the file, if any.
5367 + This will return an empty QString if there is no description element
5369 + QString description() const;
5372 + The modification date for the embedded file, if known.
5374 + QDateTime modDate() const;
5377 + The creation date for the embedded file, if known.
5379 + QDateTime createDate() const;
5382 + The data as an array
5384 + QByteArray data();
5387 + A QDataStream for the actual data?
5389 + //QDataStream dataStream() const;
5392 + EmbeddedFileData *m_embeddedFile;
5397 Page within a PDF document
5400 @@ -544,6 +598,20 @@
5402 bool scanForFonts( int numPages, QList<FontInfo> *fontList ) const;
5406 + The documents embedded within the PDF document.
5408 + \note there are two types of embedded document - this call
5409 + only accesses documents that are embedded at the document level.
5411 + const QList<EmbeddedFile*> &embeddedFiles() const;
5414 + Whether there are any documents embedded in this PDF document.
5416 + bool hasEmbeddedFiles() const;
5418 Document::~Document();
5421 diff -Nur poppler.0_5_0/qt4/tests/check_attachments.cpp poppler.HEAD/qt4/tests/check_attachments.cpp
5422 --- poppler.0_5_0/qt4/tests/check_attachments.cpp 1970-01-01 01:00:00.000000000 +0100
5423 +++ poppler.HEAD/qt4/tests/check_attachments.cpp 2006-01-18 23:40:26.000000000 +0100
5425 +#include <QtTest/QtTest>
5427 +#define UNSTABLE_POPPLER_QT4
5428 +#include <poppler-qt4.h>
5430 +#include <QtCore/QFile>
5432 +class TestAttachments: public QObject
5436 + void checkNoAttachments();
5437 + void checkAttach1();
5438 + void checkAttach2();
5439 + void checkAttach3();
5440 + void checkAttach4();
5443 +void TestAttachments::checkNoAttachments()
5445 + Poppler::Document *doc;
5446 + doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf");
5449 + QCOMPARE( doc->hasEmbeddedFiles(), false );
5454 +void TestAttachments::checkAttach1()
5457 + Poppler::Document *doc;
5458 + doc = Poppler::Document::load("../../../test/unittestcases/WithAttachments.pdf");
5461 + QVERIFY( doc->hasEmbeddedFiles() );
5463 + QList<Poppler::EmbeddedFile*> fileList = doc->embeddedFiles();
5464 + QCOMPARE( fileList.size(), 2 );
5466 + Poppler::EmbeddedFile *embfile = fileList.at(0);
5467 + QCOMPARE( embfile->name(), QString( "kroller.png" ) );
5468 + QCOMPARE( embfile->description(), QString("/home/bradh/coding/svn-vers/KDE/kdeartwork/wallpapers/kroller.png") );
5469 + QCOMPARE( embfile->createDate(), QDateTime( QDate(), QTime() ) );
5470 + QCOMPARE( embfile->modDate(), QDateTime( QDate(), QTime() ) );
5472 + QFile file( "../../../test/unittestcases/kroller.png" );
5473 + QVERIFY( file.open( QIODevice::ReadOnly ) );
5474 + QByteArray krollerData = file.readAll();
5475 + QByteArray embdata = embfile->data();
5476 + QCOMPARE( krollerData, embdata );
5479 + Poppler::EmbeddedFile *embfile2 = fileList.at(1);
5480 + QCOMPARE( embfile2->name(), QString("gnome-64.gif") );
5481 + QCOMPARE( embfile2->description(), QString("/usr/share/gnome-about/gnome-64.gif") );
5482 + QCOMPARE( embfile2->modDate(), QDateTime( QDate(), QTime() ) );
5483 + QCOMPARE( embfile2->createDate(), QDateTime( QDate(), QTime() ) );
5485 + QFile file2( "../../../test/unittestcases/gnome-64.gif" );
5486 + QVERIFY( file2.open( QIODevice::ReadOnly ) );
5487 + QByteArray g64Data = file2.readAll();
5488 + QByteArray emb2data = embfile2->data();
5489 + QCOMPARE( g64Data, emb2data );
5495 +void TestAttachments::checkAttach2()
5498 + Poppler::Document *doc;
5499 + doc = Poppler::Document::load("../../../test/unittestcases/A6EmbeddedFiles.pdf");
5502 + QVERIFY( doc->hasEmbeddedFiles() );
5504 + QList<Poppler::EmbeddedFile*> fileList;
5505 + fileList = doc->embeddedFiles();
5506 + QCOMPARE( fileList.size(), 3 );
5508 + Poppler::EmbeddedFile *embfile1 = fileList.at(0);
5509 + QCOMPARE( embfile1->name(), QString("Acro7 thoughts") );
5510 + QCOMPARE( embfile1->description(), QString("Acro7 Thoughts") );
5511 + QCOMPARE( embfile1->createDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 13, 54, 54), Qt::UTC ) );
5512 + QCOMPARE( embfile1->modDate(), QDateTime( QDate( 2003, 8, 4 ), QTime( 14, 15, 27), Qt::UTC ) );
5514 + Poppler::EmbeddedFile *embfile2 = fileList.at(1);
5515 + QCOMPARE( embfile2->name(), QString("acro transitions 1.xls") );
5516 + QCOMPARE( embfile2->description(), QString("AcroTransitions") );
5517 + QCOMPARE( embfile2->createDate(), QDateTime( QDate( 2003, 7, 18 ), QTime( 21, 7, 16), Qt::UTC ) );
5518 + QCOMPARE( embfile2->modDate(), QDateTime( QDate( 2003, 7, 22 ), QTime( 13, 4, 40), Qt::UTC ) );
5520 + Poppler::EmbeddedFile *embfile3 = fileList.at(2);
5521 + QCOMPARE( embfile3->name(), QString("apago_pdfe_wide.gif") );
5522 + QCOMPARE( embfile3->description(), QString("PDFE Animation") );
5523 + QCOMPARE( embfile3->createDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 54, 29), Qt::UTC ) );
5524 + QCOMPARE( embfile3->modDate(), QDateTime( QDate( 2003, 1, 31 ), QTime( 15, 52, 58), Qt::UTC ) );
5529 +void TestAttachments::checkAttach3()
5532 + Poppler::Document *doc;
5533 + doc = Poppler::Document::load("../../../test/unittestcases/shapes+attachments.pdf");
5536 + QVERIFY( doc->hasEmbeddedFiles() );
5538 + QList<Poppler::EmbeddedFile*> fileList;
5539 + fileList = doc->embeddedFiles();
5540 + QCOMPARE( fileList.size(), 1 );
5542 + Poppler::EmbeddedFile *embfile = fileList.at(0);
5543 + QCOMPARE( embfile->name(), QString( "ADEX1.xpdf.pgp" ) );
5544 + QCOMPARE( embfile->description(), QString("encrypted version of document") );
5545 + QCOMPARE( embfile->createDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
5546 + QCOMPARE( embfile->modDate(), QDateTime( QDate( 2004, 3, 29 ), QTime( 19, 37, 16), Qt::UTC ) );
5551 +void TestAttachments::checkAttach4()
5554 + Poppler::Document *doc;
5555 + doc = Poppler::Document::load("../../../test/unittestcases/imageretrieve+attachment.pdf");
5558 + QVERIFY( doc->hasEmbeddedFiles() );
5560 + QList<Poppler::EmbeddedFile*> fileList;
5561 + fileList = doc->embeddedFiles();
5562 + QCOMPARE( fileList.size(), 1 );
5564 + Poppler::EmbeddedFile *embfile = fileList.at(0);
5565 + QCOMPARE( embfile->name(), QString( "export-altona.csv" ) );
5566 + QCOMPARE( embfile->description(), QString("Altona Export") );
5567 + QCOMPARE( embfile->createDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 35), Qt::UTC ) );
5568 + QCOMPARE( embfile->modDate(), QDateTime( QDate( 2005, 8, 30 ), QTime( 20, 49, 52), Qt::UTC ) );
5573 +QTEST_MAIN(TestAttachments)
5574 +#include "check_attachments.moc"
5576 diff -Nur poppler.0_5_0/qt4/tests/Makefile.am poppler.HEAD/qt4/tests/Makefile.am
5577 --- poppler.0_5_0/qt4/tests/Makefile.am 2005-12-27 07:10:02.000000000 +0100
5578 +++ poppler.HEAD/qt4/tests/Makefile.am 2006-01-18 23:32:13.000000000 +0100
5581 -I$(top_srcdir)/poppler \
5582 -I$(top_srcdir)/qt4/src \
5583 + -I$(top_srcdir)/qt \
5584 $(POPPLER_QT4_CXXFLAGS) \
5585 $(POPPLER_QTTEST_CXXFLAGS)
5590 noinst_PROGRAMS = test-poppler-qt4 stress-poppler-qt4 \
5591 - poppler-fonts test-password-qt4
5592 + poppler-fonts test-password-qt4 poppler-attachments
5595 test_poppler_qt4_SOURCES = \
5598 poppler_fonts_LDADD = $(LDADDS)
5600 +poppler_attachments_SOURCES = \
5601 + poppler-attachments.cpp
5603 +poppler_attachments_LDADD = $(LDADDS)
5606 stress_poppler_qt4_SOURCES = \
5607 stress-poppler-qt4.cpp
5610 if BUILD_POPPLER_QT4TESTS
5612 - check_dateConversion \
5613 + check_attachments \
5614 + check_dateConversion \
5620 check_PROGRAMS = $(TESTS)
5622 +check_attachments_SOURCES = check_attachments.cpp
5623 +check_attachments.$(OBJEXT): check_attachments.moc
5624 +check_attachments_LDADD = $(UT_LDADDS)
5626 check_dateConversion_SOURCES = check_dateConversion.cpp
5627 check_dateConversion.$(OBJEXT): check_dateConversion.moc
5628 check_dateConversion_LDADD = $(UT_LDADDS)
5630 check_pagemode_LDADD = $(UT_LDADDS)
5632 check_permissions_SOURCES = check_permissions.cpp
5633 -check_metadata.$(OBJEXT): check_permissions.moc
5634 +check_permissions.$(OBJEXT): check_permissions.moc
5635 check_permissions_LDADD = $(UT_LDADDS)
5637 check_pagelayout_SOURCES = check_pagelayout.cpp
5638 diff -Nur poppler.0_5_0/qt4/tests/poppler-attachments.cpp poppler.HEAD/qt4/tests/poppler-attachments.cpp
5639 --- poppler.0_5_0/qt4/tests/poppler-attachments.cpp 1970-01-01 01:00:00.000000000 +0100
5640 +++ poppler.HEAD/qt4/tests/poppler-attachments.cpp 2006-01-18 23:40:26.000000000 +0100
5642 +#include <QtCore/QtCore>
5643 +#include <iostream>
5645 +#define UNSTABLE_POPPLER_QT4
5646 +#include <poppler-qt4.h>
5648 +int main( int argc, char **argv )
5650 + QCoreApplication a( argc, argv ); // QApplication required!
5652 + if (!( argc == 2 ))
5654 + qWarning() << "usage: poppler-attachments filename";
5658 + Poppler::Document *doc = Poppler::Document::load(argv[1]);
5661 + qWarning() << "doc not loaded";
5665 + if (doc->hasEmbeddedFiles()) {
5666 + std::cout << "Embedded files: " << std::endl;
5667 + foreach(Poppler::EmbeddedFile *file, doc->embeddedFiles()) {
5668 + std::cout << " " << qPrintable(file->name()) << std::endl;
5669 + std::cout << " desc:" << qPrintable(file->description()) << std::endl;
5670 + QByteArray data = file->data();
5671 + std::cout << " data: " << data.constData() << std::endl;
5675 + std::cout << "There are no embedded document at the top level" << std::endl;
5679 diff -Nur poppler.0_5_0/splash/Splash.cc poppler.HEAD/splash/Splash.cc
5680 --- poppler.0_5_0/splash/Splash.cc 2005-10-30 21:29:05.000000000 +0100
5681 +++ poppler.HEAD/splash/Splash.cc 2006-02-06 21:49:21.000000000 +0100
5682 @@ -2020,10 +2020,10 @@
5683 for (xx = 0, x1 = x0 - glyph->x; xx < glyph->w; ++xx, ++x1) {
5686 - alpha = (int)(alpha * state->fillAlpha *
5687 + alpha = (int)(alpha * (float)state->fillAlpha *
5688 softMask->data[y1 * softMask->rowSize + x1]);
5690 - alpha = (int)(alpha * state->fillAlpha);
5691 + alpha = (int)(alpha * (float)state->fillAlpha);
5694 if (noClip || state->clip->test(x1, y1)) {
5695 diff -Nur poppler.0_5_0/splash/SplashFontEngine.cc poppler.HEAD/splash/SplashFontEngine.cc
5696 --- poppler.0_5_0/splash/SplashFontEngine.cc 2005-09-16 19:42:56.000000000 +0200
5697 +++ poppler.HEAD/splash/SplashFontEngine.cc 2006-02-02 23:50:01.000000000 +0100
5698 @@ -105,19 +105,19 @@
5701 SplashFontFile *SplashFontEngine::loadType1Font(SplashFontFileID *idA,
5703 - GBool deleteFile, char **enc) {
5704 + SplashFontSrc *src,
5706 SplashFontFile *fontFile;
5710 if (!fontFile && t1Engine) {
5711 - fontFile = t1Engine->loadType1Font(idA, fileName, deleteFile, enc);
5712 + fontFile = t1Engine->loadType1Font(idA, src, enc);
5715 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
5716 if (!fontFile && ftEngine) {
5717 - fontFile = ftEngine->loadType1Font(idA, fileName, deleteFile, enc);
5718 + fontFile = ftEngine->loadType1Font(idA, src, enc);
5722 @@ -126,29 +126,26 @@
5723 // semantics, this will remove the last link; otherwise it will
5724 // return an error, leaving the file to be deleted later (if
5725 // loadXYZFont failed, the file will always be deleted)
5727 - unlink(fontFile ? fontFile->fileName->getCString() : fileName);
5735 SplashFontFile *SplashFontEngine::loadType1CFont(SplashFontFileID *idA,
5738 + SplashFontSrc *src,
5740 SplashFontFile *fontFile;
5744 if (!fontFile && t1Engine) {
5745 - fontFile = t1Engine->loadType1CFont(idA, fileName, deleteFile, enc);
5746 + fontFile = t1Engine->loadType1CFont(idA, src, enc);
5749 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
5750 if (!fontFile && ftEngine) {
5751 - fontFile = ftEngine->loadType1CFont(idA, fileName, deleteFile, enc);
5752 + fontFile = ftEngine->loadType1CFont(idA, src, enc);
5756 @@ -157,23 +154,20 @@
5757 // semantics, this will remove the last link; otherwise it will
5758 // return an error, leaving the file to be deleted later (if
5759 // loadXYZFont failed, the file will always be deleted)
5761 - unlink(fontFile ? fontFile->fileName->getCString() : fileName);
5769 SplashFontFile *SplashFontEngine::loadCIDFont(SplashFontFileID *idA,
5771 - GBool deleteFile) {
5772 + SplashFontSrc *src) {
5773 SplashFontFile *fontFile;
5776 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
5777 if (!fontFile && ftEngine) {
5778 - fontFile = ftEngine->loadCIDFont(idA, fileName, deleteFile);
5779 + fontFile = ftEngine->loadCIDFont(idA, src);
5783 @@ -182,26 +176,24 @@
5784 // semantics, this will remove the last link; otherwise it will
5785 // return an error, leaving the file to be deleted later (if
5786 // loadXYZFont failed, the file will always be deleted)
5788 - unlink(fontFile ? fontFile->fileName->getCString() : fileName);
5796 SplashFontFile *SplashFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
5799 + SplashFontSrc *src,
5801 - int codeToGIDLen) {
5804 SplashFontFile *fontFile;
5807 #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
5808 if (!fontFile && ftEngine) {
5809 - fontFile = ftEngine->loadTrueTypeFont(idA, fileName, deleteFile,
5810 - codeToGID, codeToGIDLen);
5811 + fontFile = ftEngine->loadTrueTypeFont(idA, src,
5812 + codeToGID, codeToGIDLen, faceIndex);
5817 // semantics, this will remove the last link; otherwise it will
5818 // return an error, leaving the file to be deleted later (if
5819 // loadXYZFont failed, the file will always be deleted)
5821 - unlink(fontFile ? fontFile->fileName->getCString() : fileName);
5827 diff -Nur poppler.0_5_0/splash/SplashFontEngine.h poppler.HEAD/splash/SplashFontEngine.h
5828 --- poppler.0_5_0/splash/SplashFontEngine.h 2005-03-03 20:45:59.000000000 +0100
5829 +++ poppler.HEAD/splash/SplashFontEngine.h 2006-02-02 23:50:01.000000000 +0100
5831 class SplashFontFile;
5832 class SplashFontFileID;
5834 +class SplashFontSrc;
5836 //------------------------------------------------------------------------
5839 SplashFontFile *getFontFile(SplashFontFileID *id);
5841 // Load fonts - these create new SplashFontFile objects.
5842 - SplashFontFile *loadType1Font(SplashFontFileID *idA, char *fileName,
5843 - GBool deleteFile, char **enc);
5844 - SplashFontFile *loadType1CFont(SplashFontFileID *idA, char *fileName,
5845 - GBool deleteFile, char **enc);
5846 - SplashFontFile *loadCIDFont(SplashFontFileID *idA, char *fileName,
5847 - GBool deleteFile);
5848 - SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, char *fileName,
5850 - Gushort *codeToGID, int codeToGIDLen);
5851 + SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
5852 + SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
5853 + SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
5854 + SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src,
5855 + Gushort *codeToGID, int codeToGIDLen,
5858 // Get a font - this does a cache lookup first, and if not found,
5859 // creates a new SplashFont object and adds it to the cache. The
5860 diff -Nur poppler.0_5_0/splash/SplashFontFile.cc poppler.HEAD/splash/SplashFontFile.cc
5861 --- poppler.0_5_0/splash/SplashFontFile.cc 2005-12-08 19:17:42.000000000 +0100
5862 +++ poppler.HEAD/splash/SplashFontFile.cc 2006-02-02 23:50:01.000000000 +0100
5867 +#include "goo/gmem.h"
5868 #include "goo/GooString.h"
5869 #include "SplashFontFile.h"
5870 #include "SplashFontFileID.h"
5873 //------------------------------------------------------------------------
5875 -SplashFontFile::SplashFontFile(SplashFontFileID *idA, char *fileNameA,
5876 - GBool deleteFileA) {
5877 +SplashFontFile::SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA) {
5879 - fileName = new GooString(fileNameA);
5880 - deleteFile = deleteFileA;
5886 SplashFontFile::~SplashFontFile() {
5888 - unlink(fileName->getCString());
5902 +SplashFontSrc::SplashFontSrc() {
5904 + deleteSrc = gFalse;
5910 +SplashFontSrc::~SplashFontSrc() {
5914 + unlink(fileName->getCString());
5921 + if (isFile && fileName)
5925 +void SplashFontSrc::ref() {
5929 +void SplashFontSrc::unref() {
5934 +void SplashFontSrc::setFile(GooString *file, GBool del)
5937 + fileName = file->copy();
5941 +void SplashFontSrc::setFile(const char *file, GBool del)
5944 + fileName = new GooString(file);
5948 +void SplashFontSrc::setBuf(char *bufA, int bufLenA, GBool del)
5956 diff -Nur poppler.0_5_0/splash/SplashFontFile.h poppler.HEAD/splash/SplashFontFile.h
5957 --- poppler.0_5_0/splash/SplashFontFile.h 2005-03-03 20:45:59.000000000 +0100
5958 +++ poppler.HEAD/splash/SplashFontFile.h 2006-02-02 23:50:01.000000000 +0100
5961 //------------------------------------------------------------------------
5963 +struct SplashFontSrc {
5967 + void setFile(GooString *file, GBool del);
5968 + void setFile(const char *file, GBool del);
5969 + void setBuf(char *bufA, int buflenA, GBool del);
5975 + GooString *fileName;
5982 class SplashFontFile {
5989 - SplashFontFile(SplashFontFileID *idA, char *fileNameA,
5990 - GBool deleteFileA);
5991 + SplashFontFile(SplashFontFileID *idA, SplashFontSrc *srcA);
5993 SplashFontFileID *id;
5994 - GooString *fileName;
5996 + SplashFontSrc *src;
5999 friend class SplashFontEngine;
6000 diff -Nur poppler.0_5_0/splash/SplashFTFont.cc poppler.HEAD/splash/SplashFTFont.cc
6001 --- poppler.0_5_0/splash/SplashFTFont.cc 2005-11-17 22:37:34.000000000 +0100
6002 +++ poppler.HEAD/splash/SplashFTFont.cc 2006-01-23 15:45:30.000000000 +0100
6005 #include <ft2build.h>
6006 #include FT_OUTLINE_H
6007 -#include FT_INTERNAL_OBJECTS_H // needed for FT_New_Size decl
6008 +#include FT_SIZES_H
6009 +#include FT_GLYPH_H
6010 #include "goo/gmem.h"
6011 #include "SplashMath.h"
6012 #include "SplashGlyphBitmap.h"
6013 diff -Nur poppler.0_5_0/splash/SplashFTFontEngine.cc poppler.HEAD/splash/SplashFTFontEngine.cc
6014 --- poppler.0_5_0/splash/SplashFTFontEngine.cc 2005-12-08 19:17:42.000000000 +0100
6015 +++ poppler.HEAD/splash/SplashFTFontEngine.cc 2006-02-02 23:50:01.000000000 +0100
6019 SplashFontFile *SplashFTFontEngine::loadType1Font(SplashFontFileID *idA,
6022 + SplashFontSrc *src,
6024 - return SplashFTFontFile::loadType1Font(this, idA, fileName, deleteFile, enc);
6025 + return SplashFTFontFile::loadType1Font(this, idA, src, enc);
6028 SplashFontFile *SplashFTFontEngine::loadType1CFont(SplashFontFileID *idA,
6031 + SplashFontSrc *src,
6033 - return SplashFTFontFile::loadType1Font(this, idA, fileName, deleteFile, enc);
6034 + return SplashFTFontFile::loadType1Font(this, idA, src, enc);
6037 SplashFontFile *SplashFTFontEngine::loadCIDFont(SplashFontFileID *idA,
6039 - GBool deleteFile) {
6040 + SplashFontSrc *src) {
6042 Gushort *cidToGIDMap;
6048 - } else if ((ff = FoFiType1C::load(fileName))) {
6050 + if (src->isFile) {
6051 + ff = FoFiType1C::load(src->fileName->getCString());
6053 + ff = new FoFiType1C(src->buf, src->bufLen, gFalse);
6056 cidToGIDMap = ff->getCIDToGIDMap(&nCIDs);
6062 - ret = SplashFTFontFile::loadCIDFont(this, idA, fileName, deleteFile,
6063 - cidToGIDMap, nCIDs);
6065 + ret = SplashFTFontFile::loadCIDFont(this, idA, src, cidToGIDMap, nCIDs);
6069 @@ -105,16 +108,17 @@
6072 SplashFontFile *SplashFTFontEngine::loadTrueTypeFont(SplashFontFileID *idA,
6075 + SplashFontSrc *src,
6077 - int codeToGIDLen) {
6082 GooString *tmpFileName;
6084 SplashFontFile *ret;
6086 - if (!(ff = FoFiTrueType::load(fileName))) {
6087 + if (!(ff = FoFiTrueType::load(fileName, faceIndex))) {
6093 ret = SplashFTFontFile::loadTrueTypeFont(this, idA,
6094 tmpFileName->getCString(),
6095 - gTrue, codeToGID, codeToGIDLen);
6096 + gTrue, codeToGID, codeToGIDLen,
6101 @@ -137,6 +142,13 @@
6106 + SplashFontFile *ret;
6107 + ret = SplashFTFontFile::loadTrueTypeFont(this, idA, src,
6108 + codeToGID, codeToGIDLen,
6114 #endif // HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
6115 diff -Nur poppler.0_5_0/splash/SplashFTFontEngine.h poppler.HEAD/splash/SplashFTFontEngine.h
6116 --- poppler.0_5_0/splash/SplashFTFontEngine.h 2005-09-16 00:09:50.000000000 +0200
6117 +++ poppler.HEAD/splash/SplashFTFontEngine.h 2006-02-02 23:50:01.000000000 +0100
6120 class SplashFontFile;
6121 class SplashFontFileID;
6122 +class SplashFontSrc;
6124 //------------------------------------------------------------------------
6125 // SplashFTFontEngine
6127 ~SplashFTFontEngine();
6130 - SplashFontFile *loadType1Font(SplashFontFileID *idA, char *fileName,
6131 - GBool deleteFile, char **enc);
6132 - SplashFontFile *loadType1CFont(SplashFontFileID *idA, char *fileName,
6133 - GBool deleteFile, char **enc);
6134 - SplashFontFile *loadCIDFont(SplashFontFileID *idA, char *fileName,
6135 - GBool deleteFile);
6136 - SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, char *fileName,
6138 - Gushort *codeToGID, int codeToGIDLen);
6139 + SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
6140 + SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc);
6141 + SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src);
6142 + SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src,
6143 + Gushort *codeToGID, int codeToGIDLen,
6148 diff -Nur poppler.0_5_0/splash/SplashFTFontFile.cc poppler.HEAD/splash/SplashFTFontFile.cc
6149 --- poppler.0_5_0/splash/SplashFTFontFile.cc 2005-08-27 10:43:43.000000000 +0200
6150 +++ poppler.HEAD/splash/SplashFTFontFile.cc 2006-02-02 23:50:01.000000000 +0100
6154 #include "goo/gmem.h"
6155 +#include "goo/GooString.h"
6156 #include "SplashFTFontEngine.h"
6157 #include "SplashFTFont.h"
6158 #include "SplashFTFontFile.h"
6161 SplashFontFile *SplashFTFontFile::loadType1Font(SplashFTFontEngine *engineA,
6162 SplashFontFileID *idA,
6164 - GBool deleteFileA,
6165 + SplashFontSrc *src,
6168 Gushort *codeToGIDA;
6172 - if (FT_New_Face(engineA->lib, fileNameA, 0, &faceA)) {
6174 + if (src->isFile) {
6175 + if (FT_New_Face(engineA->lib, src->fileName->getCString(), 0, &faceA))
6178 + if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, 0, &faceA))
6181 codeToGIDA = (Gushort *)gmallocn(256, sizeof(int));
6182 for (i = 0; i < 256; ++i) {
6187 - return new SplashFTFontFile(engineA, idA, fileNameA, deleteFileA,
6188 + return new SplashFTFontFile(engineA, idA, src,
6189 faceA, codeToGIDA, 256);
6192 SplashFontFile *SplashFTFontFile::loadCIDFont(SplashFTFontEngine *engineA,
6193 SplashFontFileID *idA,
6195 - GBool deleteFileA,
6196 + SplashFontSrc *src,
6197 Gushort *codeToGIDA,
6198 int codeToGIDLenA) {
6201 - if (FT_New_Face(engineA->lib, fileNameA, 0, &faceA)) {
6203 + if (src->isFile) {
6204 + if (FT_New_Face(engineA->lib, src->fileName->getCString(), 0, &faceA))
6207 + if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, 0, &faceA))
6211 - return new SplashFTFontFile(engineA, idA, fileNameA, deleteFileA,
6212 + return new SplashFTFontFile(engineA, idA, src,
6213 faceA, codeToGIDA, codeToGIDLenA);
6216 SplashFontFile *SplashFTFontFile::loadTrueTypeFont(SplashFTFontEngine *engineA,
6217 SplashFontFileID *idA,
6219 - GBool deleteFileA,
6220 + SplashFontSrc *src,
6221 Gushort *codeToGIDA,
6222 - int codeToGIDLenA) {
6223 + int codeToGIDLenA,
6227 - if (FT_New_Face(engineA->lib, fileNameA, 0, &faceA)) {
6229 + if (src->isFile) {
6230 + if (FT_New_Face(engineA->lib, src->fileName->getCString(), faceIndexA, &faceA))
6233 + if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, faceIndexA, &faceA))
6237 - return new SplashFTFontFile(engineA, idA, fileNameA, deleteFileA,
6238 + return new SplashFTFontFile(engineA, idA, src,
6239 faceA, codeToGIDA, codeToGIDLenA);
6242 SplashFTFontFile::SplashFTFontFile(SplashFTFontEngine *engineA,
6243 SplashFontFileID *idA,
6244 - char *fileNameA, GBool deleteFileA,
6245 + SplashFontSrc *srcA,
6247 Gushort *codeToGIDA, int codeToGIDLenA):
6248 - SplashFontFile(idA, fileNameA, deleteFileA)
6249 + SplashFontFile(idA, srcA)
6253 diff -Nur poppler.0_5_0/splash/SplashFTFontFile.h poppler.HEAD/splash/SplashFTFontFile.h
6254 --- poppler.0_5_0/splash/SplashFTFontFile.h 2005-03-03 20:45:59.000000000 +0100
6255 +++ poppler.HEAD/splash/SplashFTFontFile.h 2006-02-02 23:50:01.000000000 +0100
6259 static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA,
6260 - SplashFontFileID *idA, char *fileNameA,
6261 - GBool deleteFileA, char **encA);
6262 + SplashFontFileID *idA,
6263 + SplashFontSrc *src, char **encA);
6264 static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA,
6265 - SplashFontFileID *idA, char *fileNameA,
6266 - GBool deleteFileA,
6267 - Gushort *codeToCIDA, int codeToGIDLenA);
6268 + SplashFontFileID *idA,
6269 + SplashFontSrc *src,
6270 + Gushort *codeToCIDA, int codeToGIDLenA);
6271 static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA,
6272 SplashFontFileID *idA,
6274 - GBool deleteFileA,
6275 + SplashFontSrc *src,
6276 Gushort *codeToGIDA,
6277 - int codeToGIDLenA);
6278 + int codeToGIDLenA,
6279 + int faceIndexA=0);
6281 virtual ~SplashFTFontFile();
6285 SplashFTFontFile(SplashFTFontEngine *engineA,
6286 SplashFontFileID *idA,
6287 - char *fileNameA, GBool deleteFileA,
6288 + SplashFontSrc *srcA,
6290 Gushort *codeToGIDA, int codeToGIDLenA);
6292 diff -Nur poppler.0_5_0/splash/SplashT1FontEngine.cc poppler.HEAD/splash/SplashT1FontEngine.cc
6293 --- poppler.0_5_0/splash/SplashT1FontEngine.cc 2005-03-03 20:46:00.000000000 +0100
6294 +++ poppler.HEAD/splash/SplashT1FontEngine.cc 2006-02-02 23:50:01.000000000 +0100
6298 SplashFontFile *SplashT1FontEngine::loadType1Font(SplashFontFileID *idA,
6301 + SplashFontSrc *src,
6303 - return SplashT1FontFile::loadType1Font(this, idA, fileName, deleteFile, enc);
6304 + return SplashT1FontFile::loadType1Font(this, idA, src, enc);
6307 SplashFontFile *SplashT1FontEngine::loadType1CFont(SplashFontFileID *idA,
6310 + SplashFontSrc *src,
6313 GooString *tmpFileName;
6315 SplashFontFile *ret;
6317 - if (!(ff = FoFiType1C::load(fileName))) {
6318 + SplashFontSrc *newsrc;
6321 + ff = FoFiType1C::load(src->fileName);
6323 + ff = new FoFiType1C(src->buf, src->bufLen, gFalse);
6328 @@ -108,16 +112,11 @@
6329 ff->convertToType1(NULL, gTrue, &fileWrite, tmpFile);
6332 - ret = SplashT1FontFile::loadType1Font(this, idA, tmpFileName->getCString(),
6339 - unlink(tmpFileName->getCString());
6341 + newsrc = new SplashFontSrc;
6342 + newsrc->setFile(tmpFileName, gTrue);
6344 + ret = SplashT1FontFile::loadType1Font(this, idA, newsrc, enc);
6349 diff -Nur poppler.0_5_0/splash/SplashT1FontFile.cc poppler.HEAD/splash/SplashT1FontFile.cc
6350 --- poppler.0_5_0/splash/SplashT1FontFile.cc 2005-08-27 10:43:43.000000000 +0200
6351 +++ poppler.HEAD/splash/SplashT1FontFile.cc 2006-02-02 23:50:01.000000000 +0100
6354 SplashFontFile *SplashT1FontFile::loadType1Font(SplashT1FontEngine *engineA,
6355 SplashFontFileID *idA,
6357 - GBool deleteFileA,
6358 + SplashFontSrc *src,
6367 + GString *fileNameA;
6368 + SplashFontSrc *newsrc = NULL;
6369 + SplashFontFile *ff;
6371 + if (! src->isFile) {
6372 + GString *tmpFileName;
6374 + if (!openTempFile(&tmpFileName, &tmpFile, "wb", NULL))
6376 + fwrite(src->buf, 1, src->bufLen, tmpFile);
6378 + newsrc = new SplashFontSrc;
6379 + newsrc->setFile(tmpFileName, gTrue);
6381 + delete tmpFileName;
6383 + fileNameA = src->fileName;
6384 // load the font file
6385 if ((t1libIDA = T1_AddFont(fileNameA)) < 0) {
6390 T1_LoadFont(t1libIDA);
6392 encTmp[256] = "custom";
6393 T1_ReencodeFont(t1libIDA, encTmp);
6395 - return new SplashT1FontFile(engineA, idA, fileNameA, deleteFileA,
6396 + ff = new SplashT1FontFile(engineA, idA, src,
6397 t1libIDA, encTmp, encStrTmp);
6403 SplashT1FontFile::SplashT1FontFile(SplashT1FontEngine *engineA,
6404 SplashFontFileID *idA,
6405 - char *fileNameA, GBool deleteFileA,
6406 + SplashFontSrc *srcA,
6407 int t1libIDA, char **encA, char *encStrA):
6408 - SplashFontFile(idA, fileNameA, deleteFileA)
6409 + SplashFontFile(idA, srcA)
6413 diff -Nur poppler.0_5_0/splash/SplashT1FontFile.h poppler.HEAD/splash/SplashT1FontFile.h
6414 --- poppler.0_5_0/splash/SplashT1FontFile.h 2005-03-03 20:45:59.000000000 +0100
6415 +++ poppler.HEAD/splash/SplashT1FontFile.h 2006-02-02 23:50:01.000000000 +0100
6418 static SplashFontFile *loadType1Font(SplashT1FontEngine *engineA,
6419 SplashFontFileID *idA,
6420 - char *fileNameA, GBool deleteFileA,
6421 + SplashFontSrc *src,
6424 virtual ~SplashT1FontFile();
6427 SplashT1FontFile(SplashT1FontEngine *engineA,
6428 SplashFontFileID *idA,
6429 - char *fileNameA, GBool deleteFileA,
6430 + SplashFontSrc *src,
6431 int t1libIDA, char **encA, char *encStrA);
6433 SplashT1FontEngine *engine;
6434 diff -Nur poppler.0_5_0/splash/SplashTypes.h poppler.HEAD/splash/SplashTypes.h
6435 --- poppler.0_5_0/splash/SplashTypes.h 2005-10-30 21:29:05.000000000 +0100
6436 +++ poppler.HEAD/splash/SplashTypes.h 2006-02-06 21:49:21.000000000 +0100
6438 //------------------------------------------------------------------------
6441 -#include "FixedPoint.h"
6442 +#include "goo/FixedPoint.h"
6443 typedef FixedPoint SplashCoord;
6445 typedef double SplashCoord;
6446 diff -Nur poppler.0_5_0/splash/SplashXPathScanner.cc poppler.HEAD/splash/SplashXPathScanner.cc
6447 --- poppler.0_5_0/splash/SplashXPathScanner.cc 2005-10-16 16:19:47.000000000 +0200
6448 +++ poppler.HEAD/splash/SplashXPathScanner.cc 2006-02-03 00:06:20.000000000 +0100
6452 void SplashXPathScanner::computeIntersections(int y) {
6453 - SplashCoord ySegMin, ySegMax, xx0, xx1;
6454 + SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1;
6455 SplashXPathSeg *seg;
6458 @@ -236,19 +236,27 @@
6459 } else if (seg->flags & splashXPathVert) {
6460 xx0 = xx1 = seg->x0;
6462 - if (ySegMin <= y) {
6463 - // intersection with top edge
6464 - xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
6465 + if (seg->x0 < seg->x1) {
6466 + xSegMin = seg->x0;
6467 + xSegMax = seg->x1;
6469 - // x coord of segment endpoint with min y coord
6470 - xx0 = (seg->flags & splashXPathFlip) ? seg->x1 : seg->x0;
6471 + xSegMin = seg->x1;
6472 + xSegMax = seg->x0;
6474 - if (ySegMax >= y + 1) {
6475 - // intersection with bottom edge
6476 - xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
6478 - // x coord of segment endpoint with max y coord
6479 - xx1 = (seg->flags & splashXPathFlip) ? seg->x0 : seg->x1;
6480 + // intersection with top edge
6481 + xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy;
6482 + // intersection with bottom edge
6483 + xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy;
6484 + // the segment may not actually extend to the top and/or bottom edges
6485 + if (xx0 < xSegMin) {
6487 + } else if (xx0 > xSegMax) {
6490 + if (xx1 < xSegMin) {
6492 + } else if (xx1 > xSegMax) {
6497 diff -Nur poppler.0_5_0/TODO poppler.HEAD/TODO
6498 --- poppler.0_5_0/TODO 2005-04-05 04:49:18.000000000 +0200
6499 +++ poppler.HEAD/TODO 2006-01-21 22:56:40.000000000 +0100
6502 [ This will go away again once we get the wrappers done. ]
6504 +Jeff Muizelaar's TODO:
6506 + - factor out some of the color conversion code from CairoOutputDev and ArthurOutputDev.
6507 + - add CairoOutputDev::drawSoftMaskedImage. (done, but too messy)
6508 + - fix CairoOutputDev asking cairo to draw nonexistant glyphs.
6509 + - fix patterned text fills.
6510 + - merge kpdf's ttc support code.
6512 + - use cairo glyph cache for type3 fonts.
6513 + - try to use cairo pattern support.
6514 diff -Nur poppler.0_5_0/utils/HtmlOutputDev.cc poppler.HEAD/utils/HtmlOutputDev.cc
6515 --- poppler.0_5_0/utils/HtmlOutputDev.cc 2005-12-30 22:59:58.000000000 +0100
6516 +++ poppler.HEAD/utils/HtmlOutputDev.cc 2006-01-23 16:40:54.000000000 +0100
6518 #pragma implementation
6521 +#include "config.h"
6526 #include "goo/GooList.h"
6527 #include "UnicodeMap.h"
6528 #include "goo/gmem.h"
6529 -#include "config.h"
6531 #include "GfxState.h"
6532 #ifdef ENABLE_LIBJPEG
6534 #include "GlobalParams.h"
6535 #include "HtmlOutputDev.h"
6536 #include "HtmlFonts.h"
6537 +#include "UGooString.h"
6539 int HtmlPage::pgNum=0;
6540 int HtmlOutputDev::imgNum=1;
6541 diff -Nur poppler.0_5_0/utils/ImageOutputDev.cc poppler.HEAD/utils/ImageOutputDev.cc
6542 --- poppler.0_5_0/utils/ImageOutputDev.cc 2005-12-30 22:59:58.000000000 +0100
6543 +++ poppler.HEAD/utils/ImageOutputDev.cc 2006-01-23 16:40:54.000000000 +0100
6546 //========================================================================
6548 +#include "config.h"
6549 #include <poppler-config.h>
6551 #ifdef USE_GCC_PRAGMAS
6555 #include "goo/gmem.h"
6556 -#include "config.h"
6558 #include "GfxState.h"
6560 diff -Nur poppler.0_5_0/utils/Makefile.am poppler.HEAD/utils/Makefile.am
6561 --- poppler.0_5_0/utils/Makefile.am 2006-01-06 11:05:59.000000000 +0100
6562 +++ poppler.HEAD/utils/Makefile.am 2006-02-23 23:26:05.000000000 +0100
6569 + $(pdftoppm_binary)
6571 +EXTRA_DIST = pdf2xml.dtd
6581 + $(pdftoppm_manpage)
6584 common = parseargs.c parseargs.h
6591 +if BUILD_SPLASH_OUTPUT
6593 +pdftoppm_SOURCES = \
6597 +pdftoppm_binary = pdftoppm
6599 +pdftoppm_manpage =pdftoppm.1
6602 \ No hi ha cap caràcter de salt de línia al final del fitxer
6603 diff -Nur poppler.0_5_0/utils/pdf2xml.dtd poppler.HEAD/utils/pdf2xml.dtd
6604 --- poppler.0_5_0/utils/pdf2xml.dtd 1970-01-01 01:00:00.000000000 +0100
6605 +++ poppler.HEAD/utils/pdf2xml.dtd 2006-02-04 21:31:00.000000000 +0100
6607 +<?xml version="1.0"?>
6608 +<!ELEMENT pdf2xml (page+)>
6609 +<!ELEMENT page (fontspec*, text*)>
6611 + number CDATA #REQUIRED
6612 + position CDATA #REQUIRED
6613 + top CDATA #REQUIRED
6614 + left CDATA #REQUIRED
6615 + height CDATA #REQUIRED
6616 + width CDATA #REQUIRED
6618 +<!ELEMENT fontspec EMPTY>
6620 + id CDATA #REQUIRED
6621 + size CDATA #REQUIRED
6622 + family CDATA #REQUIRED
6623 + color CDATA #REQUIRED
6625 +<!ELEMENT text (#PCDATA | b | i)*>
6627 + top CDATA #REQUIRED
6628 + left CDATA #REQUIRED
6629 + width CDATA #REQUIRED
6630 + height CDATA #REQUIRED
6631 + font CDATA #REQUIRED
6633 +<!ELEMENT b (#PCDATA)>
6634 +<!ELEMENT i (#PCDATA)>
6635 diff -Nur poppler.0_5_0/utils/pdffonts.cc poppler.HEAD/utils/pdffonts.cc
6636 --- poppler.0_5_0/utils/pdffonts.cc 2005-12-12 21:15:11.000000000 +0100
6637 +++ poppler.HEAD/utils/pdffonts.cc 2006-01-23 16:40:54.000000000 +0100
6640 //========================================================================
6642 +#include "config.h"
6643 #include <poppler-config.h>
6647 #include "GfxFont.h"
6650 -#include "config.h"
6651 +#include "UGooString.h"
6653 static char *fontTypeNames[] = {
6655 diff -Nur poppler.0_5_0/utils/pdfimages.cc poppler.HEAD/utils/pdfimages.cc
6656 --- poppler.0_5_0/utils/pdfimages.cc 2005-12-12 21:15:11.000000000 +0100
6657 +++ poppler.HEAD/utils/pdfimages.cc 2006-01-23 16:40:54.000000000 +0100
6660 //========================================================================
6662 +#include "config.h"
6663 #include <poppler-config.h>
6668 #include "ImageOutputDev.h"
6670 -#include "config.h"
6672 static int firstPage = 1;
6673 static int lastPage = 0;
6674 diff -Nur poppler.0_5_0/utils/pdfinfo.cc poppler.HEAD/utils/pdfinfo.cc
6675 --- poppler.0_5_0/utils/pdfinfo.cc 2005-12-12 21:15:11.000000000 +0100
6676 +++ poppler.HEAD/utils/pdfinfo.cc 2006-01-23 16:40:54.000000000 +0100
6679 //========================================================================
6681 +#include "config.h"
6682 #include <poppler-config.h>
6686 #include "CharTypes.h"
6687 #include "UnicodeMap.h"
6689 -#include "config.h"
6690 +#include "UGooString.h"
6692 static void printInfoString(Dict *infoDict, char *key, char *text,
6694 diff -Nur poppler.0_5_0/utils/pdftohtml.cc poppler.HEAD/utils/pdftohtml.cc
6695 --- poppler.0_5_0/utils/pdftohtml.cc 2005-12-12 21:15:11.000000000 +0100
6696 +++ poppler.HEAD/utils/pdftohtml.cc 2006-01-23 19:52:48.000000000 +0100
6698 // Copyright 1999-2000 G. Ovtcharov
6699 //========================================================================
6701 +#include "config.h"
6702 +#include <poppler-config.h>
6708 -#include <poppler-config.h>
6710 #include "parseargs.h"
6711 #include "goo/GooString.h"
6713 #include "PSOutputDev.h"
6714 #include "GlobalParams.h"
6716 -#include "config.h"
6717 +#include "UGooString.h"
6718 #include "goo/gfile.h"
6721 @@ -315,12 +316,10 @@
6722 psFileName = new GooString(htmlFileName->getCString());
6723 psFileName->append(".ps");
6725 - globalParams->setPSPaperWidth(w);
6726 - globalParams->setPSPaperHeight(h);
6728 // globalParams->setPSNoText(gTrue);
6729 psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
6730 - doc->getCatalog(), firstPage, lastPage, psModePS);
6731 + doc->getCatalog(), firstPage, lastPage, psModePS, w, h);
6732 doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0,
6733 gTrue, gFalse, gFalse);
6735 diff -Nur poppler.0_5_0/utils/pdftoppm.1 poppler.HEAD/utils/pdftoppm.1
6736 --- poppler.0_5_0/utils/pdftoppm.1 1970-01-01 01:00:00.000000000 +0100
6737 +++ poppler.HEAD/utils/pdftoppm.1 2005-12-12 21:15:11.000000000 +0100
6739 +.\" Copyright 2004 Glyph & Cog, LLC
6740 +.TH pdftoppm 1 "22 January 2004"
6742 +pdftoppm \- Portable Document Format (PDF) to Portable Pixmap (PPM)
6743 +converter (version 3.00)
6747 +.I PDF-file PPM-root
6750 +converts Portable Document Format (PDF) files to color image files in
6751 +Portable Pixmap (PPM) format, grayscale image files in Portable
6752 +Graymap (PGM) format, or monochrome image files in Portable Bitmap
6755 +Pdftoppm reads the PDF file,
6757 +and writes one PPM file for each page,
6758 +.IR PPM-root - nnnnnn .ppm,
6761 +is the page number.
6762 +.SH CONFIGURATION FILE
6763 +Pdftoppm reads a configuration file at startup. It first tries to
6764 +find the user's private config file, ~/.xpdfrc. If that doesn't
6765 +exist, it looks for a system-wide config file, /etc/xpdf/xpdfrc. See the
6767 +man page for details.
6769 +Many of the following options can be set with configuration file
6770 +commands. These are listed in square brackets with the description of
6771 +the corresponding command line option.
6774 +Specifies the first page to convert.
6777 +Specifies the last page to convert.
6780 +Specifies the resolution, in DPI. The default is 150 DPI.
6783 +Generate a monochrome PBM file (instead of a color PPM file).
6786 +Generate a grayscale PGM file (instead of a color PPM file).
6788 +.BI \-t1lib " yes | no"
6789 +Enable or disable t1lib (a Type 1 font rasterizer). This defaults to
6791 +.RB "[config file: " enableT1lib ]
6793 +.BI \-freetype " yes | no"
6794 +Enable or disable FreeType (a TrueType / Type 1 font rasterizer).
6795 +This defaults to "yes".
6796 +.RB "[config file: " enableFreeType ]
6798 +.BI \-aa " yes | no"
6799 +Enable or disable font anti-aliasing. This defaults to "yes".
6800 +.RB "[config file: " antialias ]
6802 +.BI \-opw " password"
6803 +Specify the owner password for the PDF file. Providing this will
6804 +bypass all security restrictions.
6806 +.BI \-upw " password"
6807 +Specify the user password for the PDF file.
6810 +Don't print any messages or errors.
6811 +.RB "[config file: " errQuiet ]
6814 +Print copyright and version information.
6817 +Print usage information.
6823 +The Xpdf tools use the following exit codes:
6829 +Error opening a PDF file.
6832 +Error opening an output file.
6835 +Error related to PDF permissions.
6840 +The pdftoppm software and documentation are copyright 1996-2004 Glyph
6851 +.B http://www.foolabs.com/xpdf/
6852 diff -Nur poppler.0_5_0/utils/pdftoppm.cc poppler.HEAD/utils/pdftoppm.cc
6853 --- poppler.0_5_0/utils/pdftoppm.cc 1970-01-01 01:00:00.000000000 +0100
6854 +++ poppler.HEAD/utils/pdftoppm.cc 2006-02-04 21:07:08.000000000 +0100
6856 +//========================================================================
6860 +// Copyright 2003 Glyph & Cog, LLC
6862 +//========================================================================
6864 +#include "config.h"
6865 +#include <poppler-config.h>
6867 +#include "parseargs.h"
6868 +#include "goo/gmem.h"
6869 +#include "goo/GooString.h"
6870 +#include "GlobalParams.h"
6871 +#include "Object.h"
6872 +#include "PDFDoc.h"
6873 +#include "splash/SplashBitmap.h"
6874 +#include "splash/Splash.h"
6875 +#include "SplashOutputDev.h"
6877 +static int firstPage = 1;
6878 +static int lastPage = 0;
6879 +static int resolution = 150;
6880 +static GBool mono = gFalse;
6881 +static GBool gray = gFalse;
6882 +static char enableT1libStr[16] = "";
6883 +static char enableFreeTypeStr[16] = "";
6884 +static char antialiasStr[16] = "";
6885 +static char ownerPassword[33] = "";
6886 +static char userPassword[33] = "";
6887 +static GBool quiet = gFalse;
6888 +static char cfgFileName[256] = "";
6889 +static GBool printVersion = gFalse;
6890 +static GBool printHelp = gFalse;
6892 +static ArgDesc argDesc[] = {
6893 + {"-f", argInt, &firstPage, 0,
6894 + "first page to print"},
6895 + {"-l", argInt, &lastPage, 0,
6896 + "last page to print"},
6897 + {"-r", argInt, &resolution, 0,
6898 + "resolution, in DPI (default is 150)"},
6899 + {"-mono", argFlag, &mono, 0,
6900 + "generate a monochrome PBM file"},
6901 + {"-gray", argFlag, &gray, 0,
6902 + "generate a grayscale PGM file"},
6904 + {"-t1lib", argString, enableT1libStr, sizeof(enableT1libStr),
6905 + "enable t1lib font rasterizer: yes, no"},
6907 +#if HAVE_FREETYPE_FREETYPE_H | HAVE_FREETYPE_H
6908 + {"-freetype", argString, enableFreeTypeStr, sizeof(enableFreeTypeStr),
6909 + "enable FreeType font rasterizer: yes, no"},
6911 + {"-aa", argString, antialiasStr, sizeof(antialiasStr),
6912 + "enable font anti-aliasing: yes, no"},
6913 + {"-opw", argString, ownerPassword, sizeof(ownerPassword),
6914 + "owner password (for encrypted files)"},
6915 + {"-upw", argString, userPassword, sizeof(userPassword),
6916 + "user password (for encrypted files)"},
6917 + {"-q", argFlag, &quiet, 0,
6918 + "don't print any messages or errors"},
6919 + {"-cfg", argString, cfgFileName, sizeof(cfgFileName),
6920 + "configuration file to use in place of .xpdfrc"},
6921 + {"-v", argFlag, &printVersion, 0,
6922 + "print copyright and version info"},
6923 + {"-h", argFlag, &printHelp, 0,
6924 + "print usage information"},
6925 + {"-help", argFlag, &printHelp, 0,
6926 + "print usage information"},
6927 + {"--help", argFlag, &printHelp, 0,
6928 + "print usage information"},
6929 + {"-?", argFlag, &printHelp, 0,
6930 + "print usage information"},
6934 +int main(int argc, char *argv[]) {
6936 + GooString *fileName;
6938 + char ppmFile[512];
6939 + GooString *ownerPW, *userPW;
6940 + SplashColor paperColor;
6941 + SplashOutputDev *splashOut;
6949 + ok = parseArgs(argDesc, &argc, argv);
6950 + if (mono && gray) {
6953 + if (!ok || argc != 3 || printVersion || printHelp) {
6954 + fprintf(stderr, "pdftoppm version %s\n", xpdfVersion);
6955 + fprintf(stderr, "%s\n", xpdfCopyright);
6956 + if (!printVersion) {
6957 + printUsage("pdftoppm", "<PDF-file> <PPM-root>", argDesc);
6961 + fileName = new GooString(argv[1]);
6962 + ppmRoot = argv[2];
6964 + // read config file
6965 + globalParams = new GlobalParams(cfgFileName);
6966 + if (enableT1libStr[0]) {
6967 + if (!globalParams->setEnableT1lib(enableT1libStr)) {
6968 + fprintf(stderr, "Bad '-t1lib' value on command line\n");
6971 + if (enableFreeTypeStr[0]) {
6972 + if (!globalParams->setEnableFreeType(enableFreeTypeStr)) {
6973 + fprintf(stderr, "Bad '-freetype' value on command line\n");
6976 + if (antialiasStr[0]) {
6977 + if (!globalParams->setAntialias(antialiasStr)) {
6978 + fprintf(stderr, "Bad '-aa' value on command line\n");
6982 + globalParams->setErrQuiet(quiet);
6986 + if (ownerPassword[0]) {
6987 + ownerPW = new GooString(ownerPassword);
6991 + if (userPassword[0]) {
6992 + userPW = new GooString(userPassword);
6996 + doc = new PDFDoc(fileName, ownerPW, userPW);
7003 + if (!doc->isOk()) {
7009 + if (firstPage < 1)
7011 + if (lastPage < 1 || lastPage > doc->getNumPages())
7012 + lastPage = doc->getNumPages();
7014 + // write PPM files
7015 + paperColor[0] = 255;
7016 + paperColor[1] = 255;
7017 + paperColor[2] = 255;
7018 + splashOut = new SplashOutputDev(mono ? splashModeMono1 :
7019 + gray ? splashModeMono8 :
7020 + splashModeRGB8, 4,
7021 + gFalse, paperColor);
7022 + splashOut->startDoc(doc->getXRef());
7023 + for (pg = firstPage; pg <= lastPage; ++pg) {
7024 + doc->displayPage(splashOut, pg, resolution, resolution, 0, gTrue, gFalse, gFalse);
7025 + sprintf(ppmFile, "%.*s-%06d.%s",
7026 + (int)sizeof(ppmFile) - 32, ppmRoot, pg,
7027 + mono ? "pbm" : gray ? "pgm" : "ppm");
7028 + splashOut->getBitmap()->writePNMFile(ppmFile);
7037 + delete globalParams;
7040 + // check for memory leaks
7041 + Object::memCheck(stderr);
7042 + gMemReport(stderr);
7046 diff -Nur poppler.0_5_0/utils/pdftops.cc poppler.HEAD/utils/pdftops.cc
7047 --- poppler.0_5_0/utils/pdftops.cc 2005-12-12 21:15:11.000000000 +0100
7048 +++ poppler.HEAD/utils/pdftops.cc 2006-01-23 19:52:48.000000000 +0100
7051 //========================================================================
7053 +#include "config.h"
7054 #include <poppler-config.h>
7059 #include "PSOutputDev.h"
7061 -#include "config.h"
7063 static int firstPage = 1;
7064 static int lastPage = 0;
7067 // write PostScript file
7068 psOut = new PSOutputDev(psFileName->getCString(), doc->getXRef(),
7069 - doc->getCatalog(), firstPage, lastPage, mode);
7070 + doc->getCatalog(), firstPage, lastPage, mode,
7071 + globalParams->getPSPaperWidth(),
7072 + globalParams->getPSPaperHeight());
7073 if (psOut->isOk()) {
7074 doc->displayPages(psOut, firstPage, lastPage, 72, 72,
7075 0, globalParams->getPSCrop(), gFalse, gFalse);
7076 diff -Nur poppler.0_5_0/utils/pdftotext.cc poppler.HEAD/utils/pdftotext.cc
7077 --- poppler.0_5_0/utils/pdftotext.cc 2005-12-12 21:15:11.000000000 +0100
7078 +++ poppler.HEAD/utils/pdftotext.cc 2006-01-23 16:40:54.000000000 +0100
7081 //========================================================================
7083 +#include "config.h"
7084 #include <poppler-config.h>
7088 #include "CharTypes.h"
7089 #include "UnicodeMap.h"
7091 -#include "config.h"
7092 +#include "UGooString.h"
7094 static void printInfoString(FILE *f, Dict *infoDict, char *key,
7095 char *text1, char *text2, UnicodeMap *uMap);