diff -Nru poppler-0.18.4/CMakeLists.txt poppler-0.20.5/CMakeLists.txt --- poppler-0.18.4/CMakeLists.txt 2012-02-15 17:21:55.000000000 +0000 +++ poppler-0.20.5/CMakeLists.txt 2012-10-10 17:32:57.000000000 +0000 @@ -15,8 +15,8 @@ test_big_endian(WORDS_BIGENDIAN) set(POPPLER_MAJOR_VERSION "0") -set(POPPLER_MINOR_VERSION "18") -set(POPPLER_MICRO_VERSION "4") +set(POPPLER_MINOR_VERSION "20") +set(POPPLER_MICRO_VERSION "5") set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}") # command line switches @@ -41,6 +41,25 @@ set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)") +set(TESTDATADIR "${CMAKE_SOURCE_DIR}/../test" CACHE STRING "Specify test data dir.") +if(NOT (EXISTS ${TESTDATADIR} AND EXISTS ${TESTDATADIR}/test-poppler.c)) + message(WARNING " + No test data found in $testdatadir. + You will not be able to run 'make test' successfully. + + The test data is not included in the source packages + and is also not part of the main git repository. Instead, + you can checkout the test data from its own git + repository with: + + git clone git://git.freedesktop.org/git/poppler/test + + You should checkout the test data as a sibling of your + poppler source folder or specify the location of your + checkout with -DTESTDATADIR=/path/to/checkoutdir/test. + ") +endif() + if(WIN32) set(_default_fontconfiguration "win32") else(WIN32) @@ -118,8 +137,14 @@ set(HAVE_OPENJPEG_H ON) endif(ENABLE_LIBOPENJPEG) if(ENABLE_LCMS) - find_package(LCMS) - set(USE_CMS ${LCMS_FOUND}) + find_package(LCMS2) + if(LCMS2_FOUND) + set(USE_CMS ${LCMS2_FOUND}) + else(LCMS2_FOUND) + find_package(LCMS) + set(USE_CMS ${LCMS_FOUND}) + set(USE_LCMS1 ${LCMS_FOUND}) + endif(LCMS2_FOUND) endif(ENABLE_LCMS) if(ENABLE_LIBCURL) find_package(CURL) @@ -173,6 +198,9 @@ if(LCMS_FOUND) include_directories(${LCMS_INCLUDE_DIR}) endif(LCMS_FOUND) +if(LCMS2_FOUND) + include_directories(${LCMS2_INCLUDE_DIR}) +endif(LCMS2_FOUND) if(DEFINED COMPILE_WARNINGS) else(DEFINED COMPILE_WARNINGS) @@ -214,6 +242,7 @@ fofi/FoFiTrueType.cc fofi/FoFiType1.cc fofi/FoFiType1C.cc + fofi/FoFiIdentifier.cc poppler/Annot.cc poppler/Array.cc poppler/BuiltinFont.cc @@ -332,7 +361,12 @@ ) endif(LIBOPENJPEG_FOUND) if(USE_CMS) - set(poppler_LIBS ${poppler_LIBS} ${LCMS_LIBRARIES}) + if(LCMS_FOUND) + set(poppler_LIBS ${poppler_LIBS} ${LCMS_LIBRARIES}) + endif(LCMS_FOUND) + if(LCMS2_FOUND) + set(poppler_LIBS ${poppler_LIBS} ${LCMS2_LIBRARIES}) + endif(LCMS2_FOUND) endif(USE_CMS) if(WIN32) # gdi32 is needed under win32 @@ -352,7 +386,7 @@ else(MSVC) add_library(poppler SHARED ${poppler_SRCS}) endif(MSVC) -set_target_properties(poppler PROPERTIES VERSION 19.0.0 SOVERSION 19) +set_target_properties(poppler PROPERTIES VERSION 28.0.0 SOVERSION 28) target_link_libraries(poppler ${poppler_LIBS}) target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "") install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) @@ -461,6 +495,7 @@ fofi/FoFiTrueType.h fofi/FoFiType1.h fofi/FoFiType1C.h + fofi/FoFiIdentifier.h DESTINATION include/poppler/fofi) if(ENABLE_LIBCURL) install(FILES @@ -574,7 +609,14 @@ show_end_message_yesno("use curl" ENABLE_LIBCURL) show_end_message_yesno("use libopenjpeg" LIBOPENJPEG_FOUND) show_end_message_yesno("use cms" USE_CMS) +if(LCMS_FOUND) + message(" with lcms1") +endif(LCMS_FOUND) +if(LCMS2_FOUND) + message(" with lcms2") +endif(LCMS2_FOUND) show_end_message_yesno("command line utils" ENABLE_UTILS) +show_end_message("test data dir" ${TESTDATADIR}) if(USE_FIXEDPOINT AND USE_FLOAT) message("Warning: Single precision and fixed point options should not be enabled at the same time") diff -Nru poppler-0.18.4/ChangeLog poppler-0.20.5/ChangeLog --- poppler-0.18.4/ChangeLog 2012-02-15 17:24:13.000000000 +0000 +++ poppler-0.20.5/ChangeLog 2012-10-10 17:42:53.000000000 +0000 @@ -1,1329 +1,7586 @@ -commit f61fa12e5a1ed4a775753aec9bb9e769b55aeb08 +commit 6d6bd660dbb652f2f3e87c81c55a87d1fc11ec70 +Author: Carlos Garcia Campos +Date: Sat Oct 6 10:26:55 2012 +0200 + + glib: chain up finalize to the parent class + + This was missing in some of the classes. + + https://bugs.freedesktop.org/show_bug.cgi?id=55521 + + glib/poppler-document.cc | 6 ++++++ + glib/poppler-page.cc | 2 ++ + 2 files changed, 8 insertions(+) + +commit e044814c0657a6c5b44939a01dcbdc8d83396d43 +Author: Thomas Freitag +Date: Thu Oct 4 00:51:04 2012 +0200 + + Do not render invalid outlines + + Bug #55573 + + splash/SplashFTFont.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 9451b7a61b6dcaa6c4a76f3efda82f1ebd408654 Author: Albert Astals Cid -Date: Wed Feb 15 18:12:59 2012 +0100 +Date: Wed Oct 3 01:21:45 2012 +0200 - New copyrights + Fix crash when parsing some unknown colorspaces - goo/JpegWriter.cc | 2 +- - poppler/CairoFontEngine.cc | 1 + - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/CairoRescaleBox.cc | 14 ++++++++++++++ - poppler/Lexer.cc | 1 + - splash/SplashXPath.cc | 1 + - 7 files changed, 20 insertions(+), 3 deletions(-) + Can't do csObj->getName if csObj is a dict -commit 203cbb1dc317a6d7884d2708e938804ceb4617cb -Author: Hib Eris -Date: Sun Feb 12 23:16:41 2012 +0100 + poppler/GfxState.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - Improve moc detection when cross compiling - (cherry picked from commit 9250449aaa279840d789b3a7cef75d06a0fd88e7) +commit 42908e6e72d95cec0f70b202c4b1c23f7e47c2a4 +Author: Lu Wang +Date: Tue Oct 2 19:31:04 2012 +0200 - configure.ac | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + support automake-1.12 in autogen.sh -commit d7e73dd353fd4c3c24f1f7bb04e7a2760c6b60c2 -Author: Pino Toscano -Date: Sun Feb 12 22:27:58 2012 +0100 + Bug #55541 - qt4: remove non-existing 'qt' include dirs + autogen.sh | 15 ++++++++------- + 1 file changed, 8 insertions(+), 7 deletions(-) - (cherry picked from commit 66cf1fdb3ba6894f61d9078f5c30046b464347ae) +commit 9bb68456de41d24db7acf61204bc3f4e36e98505 +Author: Albert Astals Cid +Date: Wed Sep 26 15:13:47 2012 +0200 - qt4/demos/Makefile.am | 1 - - qt4/src/Makefile.am | 1 - - qt4/tests/Makefile.am | 1 - - 3 files changed, 0 insertions(+), 3 deletions(-) + Initilize rootNum -commit 106c3dffc8d3139d121b7df9dc9fce6f5ba87166 -Author: Pino Toscano -Date: Sun Feb 12 17:36:55 2012 +0100 + Fixes valgrind warnings about uninitialized uses - man pages: fix minor issues with hypens and % + poppler/XRef.cc | 1 + + 1 file changed, 1 insertion(+) - (cherry picked from commit 53d8fc4d2978b70e8926e3df71facd1f39de9348) +commit 2c0f70afff03798165c2b609e115dc7e9c034c57 +Author: Thomas Freitag +Date: Wed Sep 26 14:58:05 2012 +0200 - utils/pdfseparate.1 | 6 +++--- - utils/pdftocairo.1 | 4 ++-- - 2 files changed, 5 insertions(+), 5 deletions(-) + More crash fixes for broken documents -commit bf81250ff7d0968852fc7559fafb6389cd695b91 -Author: Igor Slepchin -Date: Wed Feb 8 19:22:13 2012 -0500 + poppler/JPXStream.cc | 97 + ++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 82 insertions(+), 15 deletions(-) - Close li tags in generated outlines. +commit 78558d24692c68212da35a88deb68069c5a06d81 +Author: Thomas Freitag +Date: Wed Sep 26 14:32:05 2012 +0200 - Also, add newlines after ul tags for better readability. - Bug #45807 + Fix more crashes in broken files - utils/HtmlOutputDev.cc | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) + solves 1258.pdf.SIGSEGV.dee.288 and 1255.pdf.asan.38.285, extends + 1043.pdf.asan.47.50 and 557.pdf.asan.47.894 + + poppler/GfxState.cc | 26 +++++++++++++++++++++++--- + 1 file changed, 23 insertions(+), 3 deletions(-) -commit 53a0c2043dfd56f6da7780f1a049f75af368b84b +commit e8822c0f3a46195ec7c6e55c556dd0c5716be742 Author: Albert Astals Cid -Date: Wed Feb 8 23:58:27 2012 +0100 +Date: Wed Sep 26 14:21:46 2012 +0200 - Fix memory leak when using HtmlOutputDev::mapEncodingToHtml + Add unlikelys - Bug #45805 + poppler/Stream.cc | 32 ++++++++++++++++---------------- + 1 file changed, 16 insertions(+), 16 deletions(-) - utils/HtmlOutputDev.cc | 47 - ++++++++++++++++++++++++----------------------- - utils/HtmlOutputDev.h | 7 ++++--- - 2 files changed, 28 insertions(+), 26 deletions(-) +commit 31874f2e065b0d68f726ef404de98f42489c80c7 +Author: Thomas Freitag +Date: Wed Sep 26 14:17:00 2012 +0200 + + Less crashes in broken files + + rebased patch for 1001.pdf.asan.2a.4, extends patch for + 100.pdf.asan.38.2 -commit 4afe4d827a342a847e8b89aba5b4164ed3b4cc32 + poppler/Stream.cc | 100 + +++++++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 98 insertions(+), 2 deletions(-) + +commit 81b1d9207840ec1e66eef469b29a36a8556b7265 Author: Albert Astals Cid -Date: Wed Feb 8 23:47:46 2012 +0100 +Date: Wed Sep 26 13:38:54 2012 +0200 - Fix leak in pdftohtml getInfoString + Add some unlikelys - Bug #45805 + poppler/JBIG2Stream.cc | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) - utils/pdftohtml.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) +commit 9ae1184e3049cabc695c8645a10eaef748b6e641 +Author: Thomas Freitag +Date: Wed Sep 26 12:32:26 2012 +0200 -commit 40f7289ab04787734b856c53d5c0139445b52635 -Author: Igor Slepchin -Date: Sun Feb 5 15:55:39 2012 +0100 + More fixes against broken files - Proper unicode support when dumping PDF outline. + solves 121.pdf.asan.6f.235, extends 682.pdf.SIGFPE.f3.1033 and + 569.pdf.SIGSEGV.c1.907, extends Patch for 829. and 839. asan and + sigsegv series - Also use of already existing Outline class rather than parsing the - outline anew. + poppler/JBIG2Stream.cc | 105 + ++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 93 insertions(+), 12 deletions(-) - Bug 45572 +commit 1d72c14b3877ae730ac0aa92f36923269e8a2004 +Author: Thomas Freitag +Date: Wed Sep 26 11:48:14 2012 +0200 - utils/HtmlOutputDev.cc | 196 - ++++++++++++++++++++++++++---------------------- - utils/HtmlOutputDev.h | 6 +- - utils/pdftohtml.cc | 3 +- - 3 files changed, 112 insertions(+), 93 deletions(-) + Fix crash in 158.pdf.asan.d.451 -commit fb629ac684a7f05d95d10285807c2cf1602d28ca -Author: Adrian Johnson -Date: Sat Feb 4 17:13:30 2012 +1030 + poppler/SplashOutputDev.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) - Lexer: convert integer to real when overflow occurs +commit 671df5dad0732882ceb9e053c3f947dfe0597f3d +Author: Lu Wang +Date: Wed Sep 26 00:52:32 2012 +0200 - Bug 45605 - (cherry picked from commit 38ec58ed1cb54722aece875287b847643aa2c4b8) + Don't close the stream if it's not a stream - poppler/Lexer.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + poppler/PSOutputDev.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit 24bbe62fa09bd4609bbf59c2b78c3aab20c09cdf -Author: Hib Eris -Date: Tue Jan 31 20:01:30 2012 +0100 +commit f8c116f1e0fbf3516ce228fbb34c33d6b618bed0 +Author: Albert Astals Cid +Date: Tue Sep 25 23:07:55 2012 +0200 - glib: Exclude poppler-private.h from introspection files + Add LCMS_FLAGS - Fixes bug #45455. + Fixes compilation when lcms is on non standard locations + Bug #55326 - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + qt4/src/Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit 19cee7961d01e59adfdd47fb311707e55f4d70c3 -Author: Hib Eris -Date: Wed Feb 1 10:44:17 2012 +0100 +commit 9f51baaf7a86680f2195ecdb978f1eb59a8aa734 +Author: Albert Astals Cid +Date: Sun Sep 16 14:07:45 2012 +0200 - gtk-doc: Fix build when builddir != srcdir + Rework the #ifdef so that i don't get a gcc warning - Bug #45549. + poppler/strtok_r.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) - glib/reference/Makefile.am | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) +commit b63049f97629a93ec346033e0ec56fc11f34c4fe +Author: Albert Astals Cid +Date: Sun Sep 16 14:05:01 2012 +0200 -commit b834425c56eb4e783419351888cf586525d12476 -Author: Hib Eris -Date: Thu Feb 2 13:01:45 2012 +0100 + Forgot to add the new test to autotools - gtk-doc: Fix API documentation for poppler_page_free_annot_mapping() + qt4/tests/Makefile.am | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) - Remove reference to non existent method poppler_annot_free() and use - ref/unref instead of copy/free. +commit c6d7084d316e94b5b042b086f5440f8543ff5947 +Author: Albert Astals Cid +Date: Sun Sep 16 13:48:51 2012 +0200 - Bug #45549. + Fix parsing of numbers - glib/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + -2147483648 is an integer + -2147483649 is a real -commit 283fa96871027719ad40db653a71e7e889f2f67f -Author: Carlos Garcia Campos -Date: Sat Feb 4 11:51:34 2012 +0100 + poppler/Lexer.cc | 14 +++++- + qt4/tests/CMakeLists.txt | 1 + + qt4/tests/check_lexer.cpp | 118 + +++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 131 insertions(+), 2 deletions(-) - gtk-doc: Remove reference to non existent method poppler_layer_free() +commit 365808837080574080b4f8da079124c172fb2123 +Author: Alexey Pavlov +Date: Sat Sep 15 20:38:10 2012 +0200 - Bug #45549. + Fix build using mingw64 with winpthread - glib/poppler-document.cc | 7 +++---- - 1 files changed, 3 insertions(+), 4 deletions(-) + strtok_r in winpthread is declared as a macro, that is why + the error happens. Therefore, it is necessary to check whether + the macro + __WINPTHREADS_VERSION is declared. -commit 1b3e07155fbc627ef13fcb885ebda7644a65ff9a -Author: Hib Eris -Date: Thu Feb 2 15:59:47 2012 +0100 + Bug #54851 - gtk-doc: Add more glib API documentation for poppler-document + poppler/poppler-config.h.cmake | 2 +- + poppler/poppler-config.h.in | 2 +- + poppler/strtok_r.cpp | 16 +++++++++++++++- + 3 files changed, 17 insertions(+), 3 deletions(-) - Fixes several gtk-doc warnings. +commit 3ce4d213480471dfd8e307c24c99bf3c6308cd6f +Author: Albert Astals Cid +Date: Tue Sep 11 19:24:58 2012 +0200 - Bug #45549. + Do not use isnan as it is C99 - glib/poppler-document.h | 26 +++++++++++++------------- - 1 files changed, 13 insertions(+), 13 deletions(-) + poppler/TextOutputDev.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) -commit ff7c42a8c04cf98e8d7e7c23bddb65781a7d9b8c -Author: Hib Eris -Date: Thu Feb 2 15:45:37 2012 +0100 +commit 4d7a64a23fd4b4b5ee0d47ead8677f374aaaf6c9 +Author: Jason Crain +Date: Tue Sep 11 19:24:11 2012 +0200 - gtk-doc: remove references to removed pixbuf functions + Check for NaN in TextPage::addChar - Bug #45549. + poppler/TextOutputDev.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) - glib/poppler-page.cc | 6 ++---- - glib/reference/poppler-sections.txt | 4 ---- - 2 files changed, 2 insertions(+), 8 deletions(-) +commit 5f338ea7d01cabc0f8c50690d0bc262d85baa0ed +Author: Albert Astals Cid +Date: Mon Sep 10 19:47:20 2012 +0200 -commit 5dc10c5564d5cd072e37deffbbfcbf6cea25af98 -Author: Hib Eris -Date: Thu Feb 2 15:43:30 2012 +0100 + Fix typo - gtk-doc: do not build doc for glib-demo + NEWS | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) - Fixes glib-demo symbols in poppler-unused.txt +commit 5fd691dc58aac817bca81c87c4820afcf53989d1 +Author: Albert Astals Cid +Date: Mon Sep 10 19:29:01 2012 +0200 - Bug #45549. + 0.20.40.20.40.20.40.20.4 - glib/reference/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + CMakeLists.txt | 4 ++-- + NEWS | 13 +++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 6 files changed, 19 insertions(+), 6 deletions(-) -commit ecbdea38d4c35935a69e5fbd5268be86ee716a53 -Author: Hib Eris -Date: Sat Feb 4 11:32:50 2012 +0100 +commit b3e86dbdba82956f125e37f69176072e2d0127f2 +Author: Thomas Freitag +Date: Sun Sep 9 23:35:45 2012 +0200 - gtk-doc: Fix typo's + Try to find another rootNum if actual rootNum doesn't point to a dict - Bug #45549. + Bug #14303 - glib/poppler-annot.cc | 6 +++--- - glib/poppler-annot.h | 2 +- - glib/poppler-document.cc | 2 +- - glib/poppler-media.cc | 2 +- - glib/poppler-page.cc | 3 +-- - glib/poppler-page.h | 4 ++-- - glib/reference/poppler-sections.txt | 4 +++- - 7 files changed, 12 insertions(+), 11 deletions(-) + poppler/XRef.cc | 14 ++++++++++++-- + poppler/XRef.h | 4 ++-- + 2 files changed, 14 insertions(+), 4 deletions(-) -commit 01a53a1dcaeaf81fbe5f1630cfe86f0d0b55b24b -Author: Hib Eris -Date: Tue Jan 31 12:49:01 2012 +0100 +commit 558a7d9b046bbbe185dea263b48a3cb2664378fc +Author: Thomas Freitag +Date: Sun Sep 9 23:25:47 2012 +0200 - cairo: Remove unused variable in CairoFontEngine.cc + Fix invalid memory access in solves 1066.pdf.asan.38.75 - Fixes bug #45442. + splash/SplashClip.cc | 23 +++++++++++++++++++++++ + splash/SplashXPathScanner.cc | 3 +++ + 2 files changed, 26 insertions(+) - poppler/CairoFontEngine.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) +commit d0df8e54512f584ca2b3edbae1c19e167948e5c3 +Author: Thomas Freitag +Date: Sun Sep 9 23:21:38 2012 +0200 -commit 7bb42f045abaef2f10fe83b8c04a55ec0a34d55d -Author: Hib Eris -Date: Tue Jan 31 14:42:04 2012 +0100 + Fix invalid memory access in 1106.pdf.asan.30.120.patch - Fix return value of downscale_box_filter() + poppler/Function.cc | 5 +++++ + 1 file changed, 5 insertions(+) - Fixes bug #45441. +commit 86b89864396a1dcf027e5793e6ac75411977bcf9 +Author: Thomas Freitag +Date: Sun Sep 9 23:08:49 2012 +0200 - poppler/CairoRescaleBox.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Fix crash in 1255.pdf.SIGSEGV.56f.285 -commit f6131e05f1e81f062c77377650bcd0746b8fc04f -Author: Hib Eris -Date: Tue Jan 31 13:02:16 2012 +0100 + poppler/XRef.cc | 6 ++++++ + 1 file changed, 6 insertions(+) - Fix return value of poppler_attachment_save +commit 96931732f343d2bbda9af9488b485da031866c3b +Author: Thomas Freitag +Date: Sun Sep 9 22:47:57 2012 +0200 - Fixes bug #45440. + Fix invalid memory access in 61.pdf.asan.13.95 - glib/poppler-attachment.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + fofi/FoFiType1C.cc | 25 +++++++++++++++++-------- + fofi/FoFiType1C.h | 2 ++ + 2 files changed, 19 insertions(+), 8 deletions(-) -commit 5aedb2378b9e4aa438d39ac92e53bac02d3e176a -Author: Hib Eris -Date: Tue Jan 31 12:15:51 2012 +0100 +commit 26917d69c4da6a110db02b120133c36579fbb17c +Author: Albert Astals Cid +Date: Sun Sep 9 22:23:36 2012 +0200 - Fix build for builddir != srcdir + Add unlikely - Fixes bug #45434. + poppler/Gfx.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - glib/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) +commit e6a3c797c01aa343f640f2e6f45de5bf379aa8ad +Author: Thomas Freitag +Date: Sun Sep 9 22:22:59 2012 +0200 -commit 58c17c3a61f18a6808ec9ba37e82734a655090ac -Author: Hib Eris -Date: Mon Jan 30 17:07:28 2012 +0100 + Fix wrong memory access in 68.pdf.asan.7.1030 - Fix build with latest mingw-w64 headers + poppler/Gfx.cc | 4 ++++ + 1 file changed, 4 insertions(+) - Fixes bug #45407. +commit 48fe18cf277cd2a4e665c74b3a594482f762f4b6 +Author: Albert Astals Cid +Date: Sun Sep 9 22:09:44 2012 +0200 - glib/poppler-annot.cc | 1 + - glib/poppler-document.cc | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + Fix memory leak -commit 650644c3ab581f8cde2593ae87c3e408c4ebc57e -Author: Suzuki Toshiya -Date: Mon Jan 30 20:46:04 2012 +1030 + poppler/Gfx.cc | 1 + + 1 file changed, 1 insertion(+) - pdftocairo/automake: link with lcms - (cherry picked from commit acbc63348ce5e279e4d66ed4f240dc8d61df4e57) +commit b87aafc0cdb36c3555053f2684c45f1a9d7b2f94 +Author: Albert Astals Cid +Date: Sun Sep 9 21:42:48 2012 +0200 - utils/Makefile.am | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + Add unlikelys to the ifs -commit dedc68a137aacd5f1641d7478e6c531a7dbd3e30 -Author: Pino Toscano -Date: Mon Jan 30 00:32:52 2012 +0100 + poppler/DCTStream.cc | 4 ++-- + poppler/JBIG2Stream.cc | 2 +- + 2 files changed, 3 insertions(+), 3 deletions(-) - glib/cmake: various minor introspection improvements +commit a019eef2f8ca53addd7ccab7f9c47657f4e52286 +Author: Thomas Freitag +Date: Sun Sep 9 21:41:09 2012 +0200 - "port" to CMake of the automake equivalents of - 5ab46f9881067ce8aa203a330e2ddbe75744c50e + Fix crash in 1162.pdf.SIGSEGV.28e.182 - glib/CMakeLists.txt | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + poppler/DCTStream.cc | 4 ++++ + 1 file changed, 4 insertions(+) -commit 8c3dfa26fdc4587b4a88a769806dcf38b2c5b395 -Author: Pino Toscano -Date: Mon Jan 30 00:21:31 2012 +0100 +commit ad7c6ac88f2315c9ce003308d1b4988592d4434b +Author: William Bader +Date: Sun Sep 9 21:31:58 2012 +0200 - cmake: support $(gir_name)_EXPORT_PACKAGES for g-ir-scanner + Fix crash in 1028.pdf.SIGSEGV.ae6.33 - cmake/modules/GObjectIntrospectionMacros.cmake | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + poppler/JBIG2Stream.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit de6415af1a39ec7dfa4f149c6c5e311b86352cec +commit b861af714daee4125e54b250dddf82106f5a8ce8 Author: Albert Astals Cid -Date: Fri Jan 27 00:36:18 2012 +0100 +Date: Sun Sep 9 21:15:06 2012 +0200 - Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it - - Fixes/workarounds bug 43414 with openjpeg 1.5 (unreleased) + Fix memory leak - cmake/modules/FindLIBOPENJPEG.cmake | 13 +++++++++++++ - config.h.cmake | 3 +++ - configure.ac | 8 ++++++++ - poppler/JPEG2000Stream.cc | 7 ++++++- - 4 files changed, 30 insertions(+), 1 deletions(-) + poppler/Form.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit c6429072f9ce9a934b24d3c42ae03e2b34d35873 -Author: Adrian Johnson -Date: Wed Jan 25 22:44:27 2012 +1030 +commit a4f59113574a8d7460c6ce5000cb09d20fe52b74 +Author: Albert Astals Cid +Date: Sun Sep 9 12:49:43 2012 +0200 - jpeg: set image parameters after jpeg_set_defaults() + Fix memory leak - so the resolution does not get overwritten by the defaults. + poppler/Annot.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) - The libjpeg documentation for jpeg_set_defaults() states: "This - routine sets all JPEG parameters to reasonable defaults, using only - the input image's color space (field in_color_space, which must - already be set in cinfo)" +commit 28240046f8fe37ca96f9a80cb1ea3a59af9c66f3 +Author: Thomas Freitag +Date: Sun Sep 9 12:48:26 2012 +0200 - Bug 45224 + Fix crash in 589.pdf.SIGSEGV.8b1.929 - goo/JpegWriter.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + poppler/Annot.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) -commit c003fd927835f269d42a7c8637d560c5c9c41b8a -Author: Adrian Johnson -Date: Thu Jan 26 11:33:28 2012 +1030 +commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f +Author: Albert Astals Cid +Date: Sat Sep 8 18:10:14 2012 +0200 - glib: add section in docs for new symbols in 0.18 + Only complain when the malloc really failed - glib/reference/poppler-docs.sgml | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + poppler/JBIG2Stream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit e411789041d63ced663981523f73f029e632348d -Author: Alexander Saprykin -Date: Mon Jan 23 22:07:15 2012 +0100 +commit 6356c0bbae47db291a3585d31c7727bc3f8d97a4 +Author: Albert Astals Cid +Date: Thu Aug 30 00:57:51 2012 +0200 - Do not use 50Kb of stack in SplashXPath::addCurve + qt4: unbreak spacing - Bug 44905 + qt4/src/poppler-embeddedfile.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) - splash/SplashXPath.cc | 69 - ++++++++++++++++++++++++++++++++++-------------- - 1 files changed, 49 insertions(+), 20 deletions(-) +commit 46948868dee6d4e68b658c68d7df482590e34da3 +Author: Albert Astals Cid +Date: Thu Aug 30 00:43:45 2012 +0200 -commit 41711a6e1a1d53130d0accc6cdc8f014687db5b2 -Author: Adrian Johnson -Date: Sat Jan 21 09:43:10 2012 +1030 + Accept FileSpec as Dict too and not only as Ref - cairo: Use fabs when comparing the transformed line width + File to try in KDE bug #306008 - as the transform may cause a negative width + poppler/Catalog.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) - Bug 43441 +commit debc8fb497bc22c0f9f34d785852981a87475c30 +Author: Albert Astals Cid +Date: Thu Aug 30 00:35:40 2012 +0200 - poppler/CairoOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Take into account the embFile returned by the core may be NULL -commit 5ab46f9881067ce8aa203a330e2ddbe75744c50e -Author: Evan Nemerson -Date: Sun Jan 15 11:02:50 2012 -0800 + qt4/src/poppler-embeddedfile-private.h | 4 +++- + qt4/src/poppler-embeddedfile.cc | 19 ++++++++++++------- + 2 files changed, 15 insertions(+), 8 deletions(-) - glib: various minor introspection and documentation improvements +commit 3ca67a59fc15782abb1e479eb2b8916de5b1b6ed +Author: Albert Astals Cid +Date: Thu Aug 30 00:34:06 2012 +0200 - Bug 44790 + Return NULL EmbFile if the FileSpec is not ok - glib/Makefile.am | 4 +++- - glib/poppler-annot.cc | 8 ++++---- - glib/poppler-attachment.h | 7 ++++--- - glib/poppler-document.cc | 6 ++++-- - glib/poppler-media.h | 7 ++++--- - glib/poppler-page.cc | 23 +++++++++++++++-------- - 6 files changed, 34 insertions(+), 21 deletions(-) + Otherwise we might end up asserting -commit 8006ed0beb4348e5ad94c547d7bf0d7a59da1b2f -Author: Adrian Johnson -Date: Mon Jan 16 21:25:19 2012 +1030 + poppler/FileSpec.cc | 4 ++++ + 1 file changed, 4 insertions(+) - cairo: ensure paintTransparencyGroup uses same ctm as - beginTransparencyGroup +commit 686ec0cc92e25f74eaa9e09a328724cbdf939bca +Author: Albert Astals Cid +Date: Wed Aug 15 20:02:05 2012 +0200 - Bug 29968 + Remove declared but not implemented function - poppler/CairoOutputDev.cc | 8 ++++++-- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 7 insertions(+), 2 deletions(-) + poppler/XRef.h | 1 - + 1 file changed, 1 deletion(-) -commit a40b398a10b7d8e0af88c23b3706b93656482eff -Author: Adrian Johnson -Date: Sun Jan 15 23:52:28 2012 +1030 +commit e83568065f77ba722b147b3b10faed1ff66f22dc +Author: Pino Toscano +Date: Sat Aug 11 01:38:08 2012 +0200 - cairo: restore temporary clip used in CairoOutputDev::fill when - painting a mask + remove extra execution permissions - The clip is only used to clip the paint to the fill path so it should - be moved inside the save/restore. - (cherry picked from commit 100488ec7db2d1f3e25bfda42c1603ca86696195) + (cherry picked from commit 9a5a19ee2f9cd536c3527b30c0256ca9dce3638c) - poppler/CairoOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 0 files changed -commit be59afb19e83c5040ea0d993cfb238aefc06abb1 +commit 1b2903c104012fdd3c982d57898910945dff9a15 Author: Albert Astals Cid -Date: Sun Jan 15 15:21:06 2012 +0100 +Date: Sat Aug 11 00:05:10 2012 +0200 - 0.18.3 + 0.20.3 - CMakeLists.txt | 2 +- - NEWS | 15 +++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 19 insertions(+), 4 deletions(-) + CMakeLists.txt | 4 ++-- + NEWS | 16 ++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 6 files changed, 22 insertions(+), 6 deletions(-) -commit d4bff411d0d42064a617812d4e1bf2353fd79e1c +commit 40e7b744d32152ab4c6201b8bda7fb7caf6bfd4e Author: Albert Astals Cid -Date: Sun Jan 15 15:13:59 2012 +0100 +Date: Sun Aug 5 15:07:16 2012 +0200 - Add copyrights since last release + If NULL, NULL fails as password try EMPTY, EMPTY before failing - poppler/GfxFont.cc | 1 + - poppler/GlobalParams.cc | 1 + - utils/parseargs.cc | 2 +- - 3 files changed, 3 insertions(+), 1 deletions(-) + Reviewed by Jose Aliste + Bug #3498 -commit 7d171e19257023cda55d0040257e8f0a2008271f -Author: Thomas Freitag -Date: Sun Jan 15 15:07:18 2012 +0100 + poppler/SecurityHandler.cc | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) - Fix stack overflow in PDFDoc::markObject() +commit 3ca2bc0d3abdf92741b7921ea402c9de09e531f6 +Author: Markus Trippelsdorf +Date: Fri Aug 3 00:48:12 2012 +0200 - Bug 44660 + Fix segfault when scaleImage returns NULL - poppler/PDFDoc.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + Bug 52488 -commit 81c989d905b6ba053c87d2a661d71853ddf96b99 + splash/Splash.cc | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 768cf5877f48f8cee80fe96e2ee52f42f230dfdf Author: Thomas Freitag -Date: Sun Jan 15 15:04:51 2012 +0100 +Date: Thu Aug 2 00:22:19 2012 +0200 - Correctly initialize globalParams + PSOutputDev: Fix Bitmaps in level2sep or level3sep - utils/pdfseparate.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + Bug #52384 -commit bd1ed2ea35a653e20f45eebe3dff9ecf98ba4674 -Author: Adrian Johnson -Date: Sun Jan 15 22:18:30 2012 +1030 + poppler/PSOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) - parseargs: don't use arg->size with GooString argument +commit 315447843a368556a8536bc30e579c9bf338682e +Author: Thomas Freitag +Date: Wed Aug 1 22:56:49 2012 +0200 - 40b56994 added GooString arguments but incorrectly used arg->size as - the string length. arg->size is always 0 for GooString arguments. This - worked because the arg->size - 1 string length passed to - GooString::Set() just happened to be the the same value as the - CALC_STRING_LEN default argument indicating the string length is to be - calculated with strlen. - (cherry picked from commit 4e205a6625431dcf95375de009b4354746a4f0b7) + Splash: Blend mode enhancements for CMYK - utils/parseargs.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + poppler/SplashOutputDev.cc | 76 + +++++++++++++++++++++++++++++++------------- + splash/Splash.cc | 22 ------------- + 2 files changed, 54 insertions(+), 44 deletions(-) -commit 310a10b6c6be2fc96b6f549645f38fe8ffae35a3 -Author: Arseny Solokha -Date: Fri Jan 13 18:52:17 2012 +0100 +commit c0c88b3707fc7337e814ae4252d80002641a19ee +Author: Albert Astals Cid +Date: Tue Jul 31 23:32:19 2012 +0200 - Properly initialize globalParams + Replace c++ style includes with c style ones - Bug 44659 + Fixes build in Solaris 10 + Bug #52426 - utils/pdfunite.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + goo/gstrtod.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) -commit fb1ffd2bf8a74e2cd08ee77f7813dfcf594a59ad -Author: Thomas Freitag -Date: Sat Jan 7 11:47:19 2012 +0100 +commit dcbc923bd3592a81876f84005fbaddcea18641cc +Author: Thomas Freitag +Date: Sun Jul 22 18:40:46 2012 +0200 - regtest: read stderr output before calling wait to fix a possible - deadlock + Make sure xScale and yScale are always initialized - In the way the scripts starts it subprocesses, stderr becomes buffered - for the subprocesses. And unforunately, when the buffer limit is - reached, the subprocess suspends it work until it can print again on - stderr. That's why the python script runs into a deadlock when the - subprocess produces a lot of error messages. A small rearrange of the - commands, first read the stderr output and then wait that the - subprocess - ends, will remove this deadlock. + Bug #52215 - regtest/backends/__init__.py | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + poppler/PSOutputDev.cc | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) -commit 12e91b1e25fd6c913c63c4e683dde33b583d6fc5 -Author: Yi Yang -Date: Sat Jan 7 09:44:42 2012 +1030 +commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344 +Author: Thomas Freitag +Date: Sat Jul 21 00:01:49 2012 +0200 - Include .otf fonts when finding substitute fonts + Fix conversion to ps when having multiple strips - Bug 44412 - (cherry picked from commit 9979b1b3e36dc8085d8c684692fece463fa474b1) + Bug 51982 - poppler/GfxFont.cc | 2 +- - poppler/GlobalParams.cc | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) + poppler/PSOutputDev.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) -commit e91e70f5a2084c16d664d49c6d30cfc244710db5 -Author: Adrian Johnson -Date: Fri Dec 23 09:55:20 2011 +1030 +commit 349b21acc249c130fb053bc4a0c75019f75bd35b +Author: Torsten Kasch +Date: Thu Jul 19 00:18:14 2012 +0200 - autoconf: Check for cairo-ft and other cairo backends + Unify poppler-config.h includes in core "installed" headers - so that CAIRO_LIBS includes the freetype dependency and pdftocairo - includes the dependencies for optional cairo backends. + Bug 52193 - Bug 43969 - (cherry picked from commit ebfab832ab4f2642b9ab2ededd25de670a3c7147) + goo/FixedPoint.h | 2 +- + goo/GooTimer.h | 2 +- + goo/JpegWriter.h | 2 +- + goo/PNGWriter.h | 2 +- + goo/TiffWriter.h | 2 +- + goo/gfile.h | 2 +- + goo/gmem.h | 2 +- + splash/SplashFTFont.h | 2 +- + splash/SplashMath.h | 2 +- + 9 files changed, 9 insertions(+), 9 deletions(-) - configure.ac | 14 ++++++++++++-- - utils/Makefile.am | 4 ++-- - 2 files changed, 14 insertions(+), 4 deletions(-) +commit 15c6ae699f083ea6c9716c1098ae9833a56eeb3e +Author: Torsten Kasch +Date: Thu Jul 19 00:06:45 2012 +0200 + + autoconf: Do not assume the shell is bash compatible + + Bug 52197 + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 03544e2f602319f0b381f5f357e14cc2cc77d2c1 +commit f5311da76ec7cd7c1e6cdfc4e18df6dd56e8398b Author: Albert Astals Cid -Date: Tue Dec 6 23:21:15 2011 +0100 +Date: Thu Jul 19 00:01:49 2012 +0200 - include strings.h as we use memcpy + pdfseparate: Return 0 on success - Fixes bug 43558 - (cherry picked from commit 388d72ac27ae98fe3a1ebd21760f2b0fa0249a9b) + utils/pdfseparate.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) - goo/PNGWriter.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) +commit 51f22ca0badfc41c19cba66cabd63184244f81c7 +Author: Thomas Freitag +Date: Mon Jul 16 23:32:23 2012 +0200 -commit 74f4299e8f9e2d204979479f6579dd784db678a4 -Author: Albert Astals Cid -Date: Sun Dec 4 17:29:45 2011 +0100 + PSOutputDev: Fix DeviceN images with alternate Lab colorspace in + level 3 PostScript - Do not fail if we are trying to save a file with Encrypt but that - we have not modified at all + Bug #51822 - Fixes KDE bug #288045 - (cherry picked from commit 63c942a45227ef28fb94ef4765171d9812fffafa) + poppler/PSOutputDev.cc | 54 + +++++++++++++++++++++++++++++++++++++++++------- + poppler/PSOutputDev.h | 2 +- + 2 files changed, 48 insertions(+), 8 deletions(-) - poppler/PDFDoc.cc | 49 - +++++++++++++++++++++++++++++-------------------- - 1 files changed, 29 insertions(+), 20 deletions(-) +commit 950d5f3dec4bff5d3c523d55689d7b70215dc110 +Author: Thomas Freitag +Date: Fri Jul 13 00:56:48 2012 +0200 + + Fix Splash::arbitraryTransformImage causes bogus memory allocation + size + + Bug #49523 + + poppler/SplashOutputDev.cc | 2 +- + splash/Splash.cc | 79 + +++++++++++++++++++++++++------------------- + splash/Splash.h | 4 +-- + 3 files changed, 48 insertions(+), 37 deletions(-) -commit 447a958ce43b697ab99084ba1371b989331c6ccc +commit e09be3bc6ba1290fd31bde0c3d19c4ffcbadbf00 Author: Albert Astals Cid -Date: Sun Dec 4 15:44:52 2011 +0100 +Date: Tue Jul 10 23:06:53 2012 +0200 - 0.18.2 + 0.20.2 CMakeLists.txt | 2 +- - NEWS | 17 +++++++++++++++++ + NEWS | 11 +++++++++++ configure.ac | 2 +- cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- - 5 files changed, 21 insertions(+), 4 deletions(-) + 5 files changed, 15 insertions(+), 4 deletions(-) -commit 22601c2a64f094ede8085a3ccca3de9daaa556e7 -Author: Albert Astals Cid -Date: Sun Dec 4 15:37:20 2011 +0100 - - update name and copyright - - utils/pdftocairo.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) +commit e15fe0e1e6accf779caeb1179a8d62161c0aa650 +Author: Thomas Freitag +Date: Thu Jul 5 17:44:02 2012 +0200 -commit 51e5a67c913c0d6c83f5f6b358b7fca7bb5584e1 -Author: Axel Strübing -Date: Thu Nov 24 22:32:57 2011 +0100 + Fix handling of DeviceN images in level 3 PostScript - Fix typo/regression introduced in - f6d026bfa18624ccd321e102bb39ba744998de1e - (cherry picked from commit bdb439ac5a751d6146204ae0d61fdbf7828c89c3) + bug #51548 - poppler/Gfx.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + poppler/PSOutputDev.cc | 14 -------------- + 1 file changed, 14 deletions(-) -commit a44d572f38ae5994ceeba8272f38cb51eb583da5 +commit 02c4e6bf4cc0f5535946fe31815081a40b1de986 Author: Albert Astals Cid -Date: Thu Nov 24 18:54:27 2011 +0100 +Date: Fri Jun 29 01:56:55 2012 +0200 - Fix typo - (cherry picked from commit 74e11d8c912dd95d235e44e7b34b8ea1be082b9f) + PSOutputDev: Correct %%DocumentCustomColors - qt4/src/poppler-qt4.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + Bug 51479 + + poppler/PSOutputDev.cc | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) -commit f7d79774460697ca5665eb8b711a7bae0d2eacfc +commit f7990386d268a444c297958e9c50ed27a0825a00 Author: Albert Astals Cid -Date: Mon Nov 21 23:40:12 2011 +0100 +Date: Thu Jun 28 00:18:07 2012 +0200 - qt4: Include QFile + Add some security checks to JPXStream decoding - We use it and the include is not there, WAndre reported it did not - compile for him without it + Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk + and Gynvael Coldwind - qt4/src/poppler-private.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/JPXStream.cc | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) -commit 8bd54e8fcb3ef202fb985bca4c2c4a355594e11c +commit c5c6eed1623506e1206e89cee0b7c887d815ba62 Author: Albert Astals Cid -Date: Mon Nov 14 13:22:53 2011 +0100 +Date: Sun Jun 24 23:43:03 2012 +0200 - Make GfxColorSpace::parse accept dicts too - (cherry picked from commit a4c78946bc1fc3d52152af2e319051050ab05e28) + Change SplashBitmap gmallocn to gmallocn_checkoverflow - poppler/GfxState.cc | 14 +++++++++++++- - 1 files changed, 13 insertions(+), 1 deletions(-) + Fixes abort in KDE bug #302372 -commit 8b4d6056e0a56fec31ff648a01d88d5942f36b0b -Author: Albert Astals Cid -Date: Fri Nov 11 16:37:27 2011 +0100 + splash/Splash.cc | 37 +++++++++++++++++++++++-------------- + splash/SplashBitmap.cc | 18 +++++++++++------- + 2 files changed, 34 insertions(+), 21 deletions(-) - Do not crash if failing to parse the colorspace +commit c87738ee234aafc6eda5a263ad789205037020e1 +Author: Thomas Freitag +Date: Sun Jun 24 20:20:38 2012 +0200 - Fixes bug 42793 - (cherry picked from commit f6d026bfa18624ccd321e102bb39ba744998de1e) + copy resources content defined in the pages dict - poppler/Gfx.cc | 52 - +++++++++++++++++++++++++++++----------------------- - 1 files changed, 29 insertions(+), 23 deletions(-) + Fixes bug #51369 -commit 105142ed49d82ab8f3593fcd36769fab29b7a432 -Author: Kenji Uno -Date: Wed Nov 9 12:39:41 2011 +0100 + poppler/PDFDoc.cc | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) - Fix leak in GooString when resizing +commit 6cdf879e389f05abba30b3fad8083b7fff23056e +Author: Fabio D'Urso +Date: Sun Jun 24 11:48:04 2012 +0200 - If resizing from "long" to shorter - (cherry picked from commit e7dbd17ff07afa465636a90f526cd7ac8c731862) + qt4: Do not hang on malformed /Annots objects - goo/GooString.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + Don't recurse infinitely if the /Annots object contains annotation + dictionaries (according to specs, /Annots must contain *references* + to annotation dictionaries). -commit 145c9ae835bd5b0bdc97739c9b096121e3e7d43e -Author: Carlos Garcia Campos -Date: Sun Nov 6 15:44:06 2011 +0100 + Fixes bug #51361 - regtest: Skip tests with results when creating refs + qt4/src/poppler-annotation.cc | 5 +++++ + 1 file changed, 5 insertions(+) - Not only tests that have md5, but also crashed or failed tests. +commit 3575becd60585324bcefc0631b1bac47c1db3c5c +Author: Mark Brand +Date: Thu Jun 14 20:31:26 2012 +0200 - regtest/TestReferences.py | 4 ++-- - regtest/backends/__init__.py | 3 +++ - 2 files changed, 5 insertions(+), 2 deletions(-) + fix typo to compile in Windows + + poppler/GlobalParamsWin.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) -commit d4da0fc45cf36c481570b37bf6c6938a45f70303 +commit 06618065c8a97a5bec125560546b98edfc1210f3 Author: Albert Astals Cid -Date: Wed Nov 2 20:20:41 2011 +0100 +Date: Mon Jun 11 15:17:59 2012 +0200 - Compile with MSVC needed for last change in the qt4 frontend - (cherry picked from commit 955cd0c7bd3a72340deba098f4242a4904adc60f) + Add some security checks to JBIG2Stream decoding - CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk + and Gynvael Coldwind -commit 5294d0b017ce6643207fce5cc9e85ba4e29f4d86 + poppler/JBIG2Stream.cc | 58 + ++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 44 insertions(+), 14 deletions(-) + +commit e3fe88df3646a80945210ba426eb4681a98b55e9 Author: Hib Eris -Date: Tue Nov 1 14:15:09 2011 +0100 +Date: Sun Jun 10 19:44:18 2012 +0200 - qt4: Use PDFDoc(wchar_t *, ...) on Windows + Check value of first page in linearization table - Bug 35378 - (cherry picked from commit e0f5bc1deebaa9861baffd7c9ba31ea31585cd1d) + Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk + and Gynvael Coldwind - qt4/src/poppler-document.cc | 6 +++--- - qt4/src/poppler-private.h | 17 +++++++++++++++-- - 2 files changed, 18 insertions(+), 5 deletions(-) + poppler/Linearization.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) -commit 372dc1ef79983f51c1eac52d211d7569a305a273 -Author: Carlos Garcia Campos -Date: Tue Nov 1 14:13:10 2011 +0100 +commit 1240eee8c0d0d01113443e0fda87721775a76da9 +Author: Albert Astals Cid +Date: Sun Jun 10 20:42:55 2012 +0200 - regtest: Add --update-refs command line option to run-tests command + 0.20.1 - It allows to update the references of failing tests. + CMakeLists.txt | 4 ++-- + NEWS | 25 +++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 6 files changed, 31 insertions(+), 6 deletions(-) - regtest/TestRun.py | 2 +- - regtest/backends/__init__.py | 34 ++++++++++++++++++++++++++++++++-- - regtest/commands/run-tests.py | 4 ++++ - 3 files changed, 37 insertions(+), 3 deletions(-) +commit c783037619e2b4c101e8ecd7e61c94ee077b4be2 +Author: Albert Astals Cid +Date: Sun Jun 10 20:15:01 2012 +0200 -commit ebf7fbc74da10d1bc423d33b26e30166870642e4 -Author: Rex Dieter -Date: Tue Nov 1 09:40:53 2011 +0100 + Update copyrights - Fix pkg-config files + poppler/GlobalParamsWin.cc | 1 + + 1 file changed, 1 insertion(+) - We were using $FOO_REQUIRED instead of @FOO_REQUIRED@ +commit f3f9d8f28a97338da92c842d5668b0ef3495ef13 +Author: Albert Astals Cid +Date: Sun Jun 10 19:09:17 2012 +0200 - configure.ac | 1 + - poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-glib.pc.in | 2 +- - 4 files changed, 4 insertions(+), 3 deletions(-) + Do use NULL function -commit 61b1556d1c62bf090b2eadf93e4e7d0aff7b8015 -Author: Carlos Garcia Campos -Date: Sun Oct 30 16:08:46 2011 +0100 + Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk + and Gynvael Coldwind - pdftocairo: Use fisrtPage instead of uninitialized pg variable + poppler/Gfx.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) - This fixes an error in my previous commit. +commit 92ef16e3699da949c80716c3fd4b438fe79c134d +Author: Thomas Freitag +Date: Sun Jun 10 16:58:54 2012 +0200 - utils/pdftocairo.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + use setoverprintmode only if rip knows it -commit e4a2adb02969e872e37e408ced4c39131c6751ea -Author: Carlos Garcia Campos -Date: Sun Oct 30 16:02:19 2011 +0100 + poppler/PSOutputDev.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) - pdftocairo: Make sure beginDocument() is always called +commit 99aa734ae2d3ba51f840d4c8ef450488fb702a31 +Author: Fabio D'Urso +Date: Thu May 24 23:17:27 2012 +0200 - This fixes a crash when rendering only odd/even pages in a printing - format. + qt4: Keep page rotation into account when normalizing annotation + coords - utils/pdftocairo.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + If the page is rotated by 90 or 270 degrees, width and height need + to be swapped -commit 124a5a471ebae8c268c6b920722be6b22b8c1c2d -Author: Albert Astals Cid -Date: Wed Oct 26 15:30:27 2011 +0200 + qt4/src/poppler-annotation.cc | 16 ++++++++++++++-- + 1 file changed, 14 insertions(+), 2 deletions(-) - 0.18.1 +commit bde31ce7b223abc86d25e06f3d73668b792c70df +Author: Fabio D'Urso +Date: Sat Jun 9 01:31:29 2012 +0200 - CMakeLists.txt | 4 +- - NEWS | 21 ++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - gtk-doc.make | 112 - +++++++++++++++++++++++++++++---------------------- - m4/gtk-doc.m4 | 6 +++ - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 8 files changed, 97 insertions(+), 54 deletions(-) + Fix saving to xml -commit 6d571cc2ce129c4477d394de3ee2c8ad83f18535 -Author: Albert Astals Cid -Date: Wed Oct 26 14:26:38 2011 +0200 + The default icon is Note not comment + + qt4/src/poppler-annotation.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - Add Adrian's (C) +commit 9904b8f10abf068a7816bd90976ccbb320387645 +Author: Adrian Johnson +Date: Thu May 24 18:24:48 2012 +0930 - utils/parseargs.cc | 1 + - utils/parseargs.h | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + glib docs: fix typo -commit d87450db448502ce0c58f7a51e6af18e0865d3ac -Author: Albert Astals Cid -Date: Mon Oct 17 13:42:06 2011 +0200 + glib/poppler-document.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) - remove useless #if - (cherry picked from commit e71088dc5087303b1ae5f3e72af287ec4e0a1342) +commit 028f580056f99719cfb8af7bbe8184ceac02cb16 +Author: Adrian Johnson +Date: Sun May 13 21:36:36 2012 +0930 - poppler/Page.cc | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) + add sustitute font name to GlobalParamsWin32 to fix compilation + + poppler/GlobalParamsWin.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) -commit 080905c3badc7ef2e35688c7020b24c6ea0b8c54 +commit 1916d000a86336213ffd6e9bd44ce873e8955895 Author: Adrian Johnson -Date: Mon Oct 17 20:33:03 2011 +1030 +Date: Sat May 12 16:31:38 2012 +0930 - utils: Add GooString arg to parseargs and use for paths in pdftocairo + Include substitute font name in system font cache - and MAXPATHLEN is not available on windows. Avoid the - need to know the max path length by using GooString for the path. - (cherry picked from commit 40b56994dda79653c902977423f349efa55cf21e) + Bug 49826 - utils/parseargs.cc | 12 ++++++++++++ - utils/parseargs.h | 2 ++ - utils/pdftocairo.cc | 17 ++++++++--------- - 3 files changed, 22 insertions(+), 9 deletions(-) + poppler/FontInfo.cc | 1 + + poppler/GlobalParams.cc | 58 + ++++++++++++++++++++++++++--------------------- + 2 files changed, 33 insertions(+), 26 deletions(-) -commit f2313b772037916ad770a9c4d7e3fb3db0954684 -Author: Adrian Johnson -Date: Mon Sep 19 21:11:44 2011 +0930 +commit 1c6e84555572a6bf3a2e3fbe9a54b40f11c122ad +Author: Fabio D'Urso +Date: Fri May 18 16:22:46 2012 +0200 - cairo: fix setSoftMask bugs + qt4: Make TextAnnotation ctor public - - Getting the clip extents in device space requires transforming all - four corners of the clip extents and translating by the group device - offset other wise the device extents will not be correct for rotated - ctm. + qt4/src/poppler-annotation.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - - Adjust matrix to include translation of the clip extents origin - since the mask surface does not start at (0,0). +commit 8e504bf2543621973fdaddbd29055ce435540146 +Author: Ville Skyttä +Date: Wed May 16 23:49:01 2012 +0300 - - the ctm when called cairo_mask() needs to be the same as the - ctm when - the mask was created. + pdfseparate.1: Syntax fixes. - - implement transfer function in setSoftMask + utils/pdfseparate.1 | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) - Bug 41005 - (cherry picked from commit 4bb34757dbbff780baba053371274c05b29771e1) +commit 9f7d919e68a26bb7dd809986d8394fe20b750bd0 +Author: Anthony Wesley +Date: Thu May 17 19:54:47 2012 +0200 - poppler/CairoOutputDev.cc | 97 - ++++++++++++++++++++++++++++----------------- - poppler/CairoOutputDev.h | 6 ++- - 2 files changed, 65 insertions(+), 38 deletions(-) + Fix logic on SplashBitmap::writeImgFile + + splash/SplashBitmap.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 7e7997e12faccf4c0513811b324a2fd0fa960a96 +Author: Igor Slepchin +Date: Tue May 15 23:16:27 2012 +0200 -commit 185ed4f3c98f162fe3ddb00d4aa0b637988dfad9 + Determine if font is bold or italic based on FontDescriptor. + + Bug #49758 + + utils/HtmlFonts.cc | 24 ++++++++++++++++++------ + utils/HtmlFonts.h | 3 ++- + utils/HtmlOutputDev.cc | 4 +--- + 3 files changed, 21 insertions(+), 10 deletions(-) + +commit 329bb1e2b4f4b58832847bcf805d19ac0fd5ef02 Author: Carlos Garcia Campos -Date: Sun Oct 16 12:40:27 2011 +0200 +Date: Sun May 13 19:45:55 2012 +0200 - Remove poppler-cairo dependency from poppler-glib pkg-config file + glib: Make sure password is always converted to latin1 - poppler-glib links to poppler-cairo statically, so it doesn'tm - depend on - the dynamic library. + Remove the utf8 validation since glib API is supposed to always + receive + utf8 strings. - CMakeLists.txt | 1 - - configure.ac | 2 -- - poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-glib.pc.in | 2 +- - 5 files changed, 3 insertions(+), 6 deletions(-) + glib/poppler-document.cc | 38 +++++++++++++++++++------------------- + 1 file changed, 19 insertions(+), 19 deletions(-) -commit 0339b098f1b00f5ad1bb21bfda14c9c72cb1b058 -Author: Adrian Johnson -Date: Sat Oct 8 15:03:24 2011 +1030 +commit 7714b4e319c48ee915061a172208245ae7c4141b +Author: Carlos Garcia Campos +Date: Sun May 13 19:30:17 2012 +0200 - ps: fix uncolored tiling patterns + glib: Fix memory leak when document fails to load - Uncolored patterns and type 3 chars must not use color setting - operators. When emitting an uncolored pattern: - - disable the update color space functions - - disable the update color functions - - set pdfLastFill and pdfLastStroke to true to ensure the the sCol - and fCol procedures that is used by some of the PS procedures that - emulate PDF operators do not update the color. + glib/poppler-document.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) - Bug 41462 - (cherry picked from commit acd8ecc9121db58851f73764f046a4f54bd80581) +commit 13d2aa303eb1fd900f1045efec14af8002477b02 +Author: Thomas Freitag +Date: Sun May 13 17:25:15 2012 +0200 - poppler/PSOutputDev.cc | 41 +++++++++++++++++++++++++++++++++++++++++ - poppler/PSOutputDev.h | 1 + - 2 files changed, 42 insertions(+), 0 deletions(-) + remove unnecesary transparency group handling in splash -commit e0e1b848aad2232adcd54943cb92b317f02da11d -Author: Adrian Johnson -Date: Fri Oct 7 20:29:36 2011 +1030 + Bug #13487 - ps: emit non repeating patterns in PSOutput with inType3Char = true + poppler/Gfx.cc | 64 + +++++++++++++++++++++++++++++++++++++++++++- + poppler/Gfx.h | 4 ++- + poppler/GfxState.cc | 4 ++- + poppler/OutputDev.h | 1 + + poppler/SplashOutputDev.cc | 11 ++++++++ + poppler/SplashOutputDev.h | 1 + + 6 files changed, 82 insertions(+), 3 deletions(-) - instead of falling back to Gfx. This avoids emitting the image data - twice. - (cherry picked from commit 6e1326b11f98f2b277e53a6cdbcb373ce6c29958) +commit a76867003a7bff5ab03016156c75b4c928788d50 +Author: Albert Astals Cid +Date: Sun May 13 13:10:40 2012 +0200 - poppler/PSOutputDev.cc | 23 +++++++++++++++++++++++ - 1 files changed, 23 insertions(+), 0 deletions(-) + Distribute cmake/modules/FindLCMS2.cmake -commit 2ec41e76624eb7aab0368d76fac99bcbc8bc1879 -Author: Adrian Johnson -Date: Sat Oct 1 20:19:19 2011 +0930 + Bug #49818 - ps: fix tiling pattern fill matrix + Makefile.am | 1 + + 1 file changed, 1 insertion(+) - In PS the pattern matrix maps the pattern space to user space. In PDF - the pattern matrix maps the pattern space to the default ctm of the - content stream (baseMatrix in Gfx). The matrix mat already contains - the - correct pattern->baseMatrix so use it instead of pmat. +commit 4114c928fa2560937e02319f57937f1c267a9817 +Author: Albert Astals Cid +Date: Thu May 10 21:09:14 2012 +0200 - Bug 41374 - (cherry picked from commit ed05fcb8c442b716c5e382c98f2625701926c86a) + 0.20.0 - poppler/PSOutputDev.cc | 9 ++------- - 1 files changed, 2 insertions(+), 7 deletions(-) + CMakeLists.txt | 6 +++--- + NEWS | 16 ++++++++++++++++ + configure.ac | 4 ++-- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 6 files changed, 24 insertions(+), 8 deletions(-) -commit 14f9ff2b149c932b52ac88d7cd3f189e3b98257c -Author: Yury G. Kudryashov -Date: Thu Oct 6 14:49:19 2011 +0200 +commit df05d084cb26807c39695280cd8ea52d13aa1255 +Author: Albert Astals Cid +Date: Thu May 10 20:54:13 2012 +0200 - Okular moved to git, fix docs + Bring back the begin/endMarkedContent virtuals - Fix URLs in poppler-qt4 documentation + For those evil people that keep using poppler internals - qt4/src/Mainpage.dox | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + poppler/Gfx.cc | 8 ++++++++ + poppler/OutputDev.cc | 8 +++++++- + poppler/OutputDev.h | 4 +++- + 3 files changed, 18 insertions(+), 2 deletions(-) -commit d0e4ba50d101c165106e0dc3b08249dba2ea0465 -Author: Yury G. Kudryashov -Date: Thu Oct 6 14:49:08 2011 +0200 +commit b6159fea4a13ecfd1c38b3a666a797c5147dd952 +Author: William Bader +Date: Thu May 10 20:02:19 2012 +0200 - Explicitly include fontconfig include dir + splash uses cmykTransferC for M, Y and K in two places - This fixes cmake-driven build on systems where fontconfig is - installed in - non-standard location. + splash/Splash.cc | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) - CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) +commit c2146219d555cab277906daefd2589f9056f536c +Author: Peter Breitenlohner +Date: Thu May 10 13:26:18 2012 +0200 -commit 17ac6b96aa99213f85006a37d10c927fe2e3f06d -Author: Yury G. Kudryashov -Date: Thu Oct 6 14:48:46 2011 +0200 + Add missing function parameter - Fix typo in cmake option documentation + poppler/GlobalParams.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) - Relocatable build does *not* (was missing in docs) hardcode library - location. +commit 753f6ab9347f972223ec21b7ed4b4f7ebed3d420 +Author: Albert Astals Cid +Date: Thu May 3 15:29:57 2012 -0700 - CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Compile with ENABLE_PLUGINS defined -commit ae22992b13ad3d9a51bcd3e2e1f187a8edd655f7 -Author: Adrian Johnson -Date: Thu Oct 6 14:21:10 2011 +0200 + poppler/SecurityHandler.cc | 4 ++-- + poppler/SecurityHandler.h | 16 ++++++++++++++++ + poppler/XpdfPluginAPI.cc | 35 +---------------------------------- + poppler/XpdfPluginAPI.h | 34 +++++++++++++++------------------- + 4 files changed, 34 insertions(+), 55 deletions(-) - close the file or flush stdout - (cherry picked from commit ab8616dcb637ac1aeb4d5f142c3c4bff9aecd041) +commit 23df93aaf495428b580bafd0fd1f41515828b08d +Author: Albert Astals Cid +Date: Thu May 3 14:50:09 2012 -0700 + + We don't support the keyBinding concept + + remove wrong merge + + poppler/GlobalParams.cc | 1 - + 1 file changed, 1 deletion(-) + +commit e55838b41959acc311e9b00dc390c9816a9afac2 +Author: Jason +Date: Wed May 2 19:35:26 2012 +0200 + + glib: Use delete[] to free array allocated with new[] + + https://bugs.freedesktop.org/show_bug.cgi?id=48447 - utils/pdftocairo.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + glib/poppler-document.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) -commit 8cf3868edf3ef15b4ca3e53e1c3b597e99870070 +commit dec873463b06bfe76ff48e36282877e6ac11b59d Author: Albert Astals Cid -Date: Sat Oct 1 15:33:15 2011 +0200 +Date: Sun Apr 29 23:36:57 2012 +0200 - Another typo fix + Add the objUint type - qt4/src/poppler-qt4.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Object.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit 1346caac6c564035d368617a329b361d0253fbf6 +commit 50c0b294d08114920a5db711876e20d991f474a6 Author: Albert Astals Cid -Date: Sat Oct 1 14:34:50 2011 +0200 +Date: Sun Apr 29 22:33:09 2012 +0200 - Fix typo in documentation + Make sure the index to dcHuffTables and acHuffTables is in bounds - Reported by Glad Deschrijver + Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael + Coldwind - qt4/src/poppler-qt4.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Stream.cc | 3 +++ + 1 file changed, 3 insertions(+) -commit b5fa040666764407fabed32fde09aa0a98308b46 +commit 9e36206465289c96cb189c648a6f5121714c647b Author: Albert Astals Cid -Date: Sat Oct 1 14:27:44 2011 +0200 +Date: Sun Apr 29 22:18:12 2012 +0200 - Remove space after % as it confuses libspectre + include for memcpy - Discussed with Adrian Johnson - Problem found by Glad Deschrijver - (cherry picked from commit 9855529e8e1a83c6d77a9e4221ea2132d44e9fb1) + splash/SplashBitmap.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) - poppler/PSOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) +commit 931051fe0bb445545355027d999515bc3d4b32ef +Author: Albert Astals Cid +Date: Sun Apr 29 22:07:34 2012 +0200 -commit 66ab373365b8f9060ff3d117bb677520e32c7e8e -Author: Adrian Johnson -Date: Wed Sep 28 21:20:23 2011 +0930 + Make sure the index for refLine is in bounds - cairo: fix crash when using poppler_page_get_image() + Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael + Coldwind - poppler/CairoOutputDev.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Stream.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) -commit 0c0591fa23441c54c9443072615273ea65482d76 +commit 53b9c2e2806320d0d0e35134b75da5da72514742 Author: Albert Astals Cid -Date: Tue Sep 27 00:45:59 2011 +0200 +Date: Sun Apr 29 22:00:18 2012 +0200 - 0.18.0 + Just call getNum if isNum is true - CMakeLists.txt | 6 +- - NEWS | 14 +++++++ - configure.ac | 4 +- - cpp/Doxyfile | 2 +- - gtk-doc.make | 102 - +++++++++++++++++++++------------------------------ - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- - 7 files changed, 64 insertions(+), 68 deletions(-) + Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael + Coldwind -commit 19f5db7acd64330d198f18695175df02141794d7 + poppler/Link.cc | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +commit da8d858c4fc610718a5f14b14dc3a4a11564a73d Author: Albert Astals Cid -Date: Tue Sep 27 00:15:15 2011 +0200 +Date: Sun Apr 29 20:28:37 2012 +0200 - Update Carlos (C) year + Do not access args[-1] - poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Found in a fuzzed pdf sent by Mateusz "j00ru" Jurczyk and Gynvael + Coldwind -commit 6d34d4af90b8b41360de4dabb000bbcc894775d0 + poppler/Gfx.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +commit 934b1a7cd502fe5537a350cdfc650989992693f7 Author: Albert Astals Cid -Date: Tue Sep 27 00:09:54 2011 +0200 +Date: Sun Apr 29 19:59:15 2012 +0200 - Rename pdfmerge and pdfextract + Do not access invalid lookup indexes - To pdfunite and pdfseparate, the old names were taken + Found by Mateusz "j00ru" Jurczyk and Gynvael Coldwind - utils/.gitignore | 4 +- - utils/CMakeLists.txt | 28 ++++---- - utils/Makefile.am | 16 ++-- - utils/pdfextract.1 | 49 -------------- - utils/pdfextract.cc | 115 -------------------------------- - utils/pdfmerge.1 | 33 --------- - utils/pdfmerge.cc | 176 - -------------------------------------------------- - utils/pdfseparate.1 | 49 ++++++++++++++ - utils/pdfseparate.cc | 115 ++++++++++++++++++++++++++++++++ - utils/pdfunite.1 | 33 +++++++++ - utils/pdfunite.cc | 176 - ++++++++++++++++++++++++++++++++++++++++++++++++++ - 11 files changed, 397 insertions(+), 397 deletions(-) + poppler/GfxState.cc | 13 ++++++++++--- + 1 file changed, 10 insertions(+), 3 deletions(-) -commit baf54c2876edd476ffc68da6518598847bb7ec8a +commit e80fd082914fe29fad7e60c321a747eb8634e413 Author: Albert Astals Cid -Date: Mon Sep 26 15:54:46 2011 +0200 +Date: Sun Apr 29 18:27:41 2012 +0200 - Remove getRawStream + [qt4] the qualified name may be unicode encoded - Since it does exactly the same as getNextStream + qt4/src/poppler-form.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) - poppler/DCTStream.h | 1 - - poppler/Stream.h | 1 - - utils/HtmlOutputDev.cc | 7 ++----- - utils/ImageOutputDev.cc | 9 +++------ - 4 files changed, 5 insertions(+), 13 deletions(-) +commit 251be1787a2a003862691f5a825eb3468eceb6a2 +Author: Albert Astals Cid +Date: Sun Apr 29 18:26:42 2012 +0200 -commit 69707f0a9b5a94c80817039db943fb4f26e743e3 -Author: Adrian Johnson -Date: Mon Sep 19 22:00:34 2011 +0930 + Fix getFullyQualifiedName with unicode field names + + Based on a patch from Mark Riedesel. + Bug #49256 + + poppler/Form.cc | 71 + +++++++++++++++++++++++++++++++++++++++++++++++-------- + 1 file changed, 61 insertions(+), 10 deletions(-) + +commit be41f1c7905d695d17e19ced83a1018531d00199 +Author: Albert Astals Cid +Date: Sun Apr 29 16:02:45 2012 +0200 + + SplashOutputDev: Fix rendering of knockout groups + + Bug #12185 + + poppler/SplashOutputDev.cc | 31 ++++++++++++++++++++++++++++--- + splash/Splash.cc | 21 ++++++++++++++++++--- + splash/Splash.h | 6 ++++-- + splash/SplashBitmap.cc | 22 +++++++++++++++++++++- + splash/SplashBitmap.h | 2 ++ + 5 files changed, 73 insertions(+), 9 deletions(-) + +commit 800cb9ec7189a539d64b99fa181cd4126496c1ec +Author: Thomas Freitag +Date: Sat Apr 28 17:15:30 2012 +0200 + + Reconstruct xref table if xref needed but missing + + Bug #40719 + + poppler/XRef.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 410822d7013ce1f61325afdb61d75ea64666755e +Author: Albert Astals Cid +Date: Fri Apr 27 01:10:22 2012 +0200 + + 0.19.4 + + CMakeLists.txt | 4 ++-- + NEWS | 17 +++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 6 files changed, 23 insertions(+), 6 deletions(-) + +commit b1d5c6c0a20a4a24b42de66db23e0f63d10ca52d +Author: Fabio D'Urso +Date: Tue Apr 24 21:00:11 2012 +0200 + + Output XRef stream when incrementally updating if there's already + a XRef stream + + poppler/PDFDoc.cc | 45 +++++++++++++++++++++++++++++-- + poppler/XRef.cc | 76 + +++++++++++++++++++++++++++++++++++++++++++++-------- + poppler/XRef.h | 34 ++++++++++++++++++++++++ + 3 files changed, 142 insertions(+), 13 deletions(-) + +commit 2ecf3b2e49a4c35e995d25016b810592260edfeb +Author: Fabio D'Urso +Date: Tue Apr 24 18:10:15 2012 +0200 + + Refactoring of XRef table write support (in preparation for XRef + stream write support) + + - Trailer dictionary creation now lives in its own function + "createTrailerDict" + (that will be used by XRef stream creation too) + - writeXRefTableTrailer (WAS writeTrailer) now takes care of writing + the XRef + table too (previously it was demanded to the caller) + + poppler/PDFDoc.cc | 61 + ++++++++++++++++++++++++++--------------------------- + poppler/PDFDoc.h | 14 +++++++++--- + poppler/XRef.cc | 2 +- + poppler/XRef.h | 2 +- + utils/pdfunite.cc | 10 +++++---- + 5 files changed, 49 insertions(+), 40 deletions(-) + +commit cf7a20adbd15f901d414ce06825459c33eeef3f5 +Author: Thomas Freitag +Date: Wed Apr 25 18:51:23 2012 +0200 + + Fix slow rendering of pdf with a lot of image masks in pattern + colorspace + + Makes it around 8 times faster + + poppler/CairoOutputDev.cc | 6 +++--- + poppler/CairoOutputDev.h | 6 +++--- + poppler/Gfx.cc | 4 ++-- + poppler/OutputDev.cc | 5 +++-- + poppler/OutputDev.h | 6 +++--- + poppler/PSOutputDev.cc | 4 ++-- + poppler/PSOutputDev.h | 4 ++-- + poppler/SplashOutputDev.cc | 35 +++++++++++------------------------ + poppler/SplashOutputDev.h | 4 ++-- + 9 files changed, 31 insertions(+), 43 deletions(-) + +commit 26fd142a3608283fd41e07b54067a51a9db76e93 +Author: Fabio D'Urso +Date: Sat Apr 21 18:16:46 2012 +0200 + + Preserve z-index after annotation removal + + poppler/Annot.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 7b10014c1fe9ef1cba57fd6b01c63129ac31386a +Author: Fabio D'Urso +Date: Sat Apr 21 17:53:22 2012 +0200 + + Do not remove appearance stream if it's shared with other annotations + + poppler/Annot.cc | 78 + +++++++++++++++++++++++++++++++++++++++++++++++++++--- + poppler/Annot.h | 6 +++++ + 2 files changed, 80 insertions(+), 4 deletions(-) + +commit 7684c325929493ad9de01a891de0aef197e176dd +Author: Fabio D'Urso +Date: Sat Apr 21 20:26:49 2012 +0200 + + AnnotText: Always force 24x24 size with custom stamps, not only on + first rendering + + poppler/Annot.cc | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +commit 44cd46a6e04a87bd702dab4a662042f69f16c4ad +Author: Albert Astals Cid +Date: Mon Apr 23 20:02:55 2012 +0200 + + Do not try to access nPatches - 1 if nPatches is 0 + + Found by Mateusz "j00ru" Jurczyk and Gynvael Coldwind + + poppler/GfxState.cc | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +commit a92f87b83e3c6c9078508c644aa09f4f2b14e9cc +Author: Albert Astals Cid +Date: Mon Apr 23 00:06:18 2012 +0200 + + Do not complain if the entry is missing + + Since we are actually looking for non existing entries :D + + poppler/XRef.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 114e113e3278d02baaffd6c0da7fda266283c176 +Author: Fabio D'Urso +Date: Sat Apr 21 21:08:55 2012 +0200 + + Do not allocate XRef entries whose generation number is 65535 + + poppler/XRef.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit ad8785b053aa115b593b2f20073e2989d59a77c9 +Author: Albert Astals Cid +Date: Wed Apr 18 22:51:33 2012 +0200 + + Remove duplicate call + + utils/pdftohtml.cc | 1 - + 1 file changed, 1 deletion(-) + +commit 80d4e1843c56801508f476fed64ecb3201ba18c8 +Author: Fabio D'Urso +Date: Tue Apr 17 20:25:57 2012 +0200 + + Do not draw border in AnnotText::draw + + poppler/Annot.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit a1e3d868ccd7fb84d52d94754d8681c97119fb6e +Author: Fabio D'Urso +Date: Fri Mar 30 21:52:04 2012 +0200 + + Save/restore gfx state when drawing annot border + + poppler/Gfx.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit 7fbeaac5c0d0240564add6c252c1ba7c14639d98 +Author: Albert Astals Cid +Date: Tue Apr 17 20:36:51 2012 +0200 + + Be sure we are checking a non free entry + + poppler/XRef.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d1254c7e8e995302542093968a0c2967f3c0b5ff +Author: Thomas Freitag +Date: Tue Apr 17 20:36:03 2012 +0200 + + Do not complain if the entry does not exist + + XRef::getNumEntry is only trying to find which entry a given stream + pos belongs so no need to cry if the entry is not there + Bug 48679 + + poppler/XRef.cc | 10 ++++++---- + poppler/XRef.h | 2 +- + 2 files changed, 7 insertions(+), 5 deletions(-) + +commit bcbe9497a4fa50b41852abd538ad139c7b6693e5 +Author: suzuki toshiya +Date: Tue Apr 17 20:21:58 2012 +0200 + + Copying graphics library CFLAGS to cpp frontend Makefile.am. + + Because poppler-image.cpp includes PNGWriter.h, JpegWriter.h, + TiffWriter.h, + CFLAGS to include libpng, libjpeg and libtiff headers are expected. + + cpp/Makefile.am | 22 +++++++++++++++++++++- + 1 file changed, 21 insertions(+), 1 deletion(-) + +commit 44c9df8277877ee1021317a3b6c253f80310f826 +Author: suzuki toshiya +Date: Tue Apr 17 20:21:00 2012 +0200 + + Do not clear FREETYPE_CFLAGS, FREETYPE_LIBS before PKG_CHECK_MODULES() + + Although configure --help says as if environmental variables + FREETYPE_CFLAGS and FREETYPE_LIBS will overwrite the values obtained + by pkg-config. But it is not. These help messages are automatically + given + by pkg-config macro (so I guess no poppler developer designed so + intentionally). + + In current configure, FREETYPE_CFLAGS, FREETYPE_LIBS are cleared + before + PKG_CONFIG_MODULES(), like: + + dnl Check for freetype headers + FREETYPE_LIBS= + FREETYPE_CFLAGS= + + PKG_CHECK_MODULES(FREETYPE, freetype2, + [freetype_pkgconfig=yes], + [freetype_pkgconfig=no]) + + if test "x$freetype_pkgconfig" = "xyes"; then + + AC_DEFINE(HAVE_FREETYPE_H, 1, [Have FreeType2 include + files]) + + else + + AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) + [...] + + Checking the history why these values are cleared, it seems that + the initial revision of poppler did not use pkg-config to detect + FREETYPE_CFLAGS, _LIBS. At that time, only freetype-config is used. + In later, when PKG_CHECK_MODULES is introduced, it was accidentally + introduced AFTER the clearning of FREETYPE_CFLAGS,_LIBS. As a result, + the inconsistency between "configure --help" and what configure does + really. I propose to move the clearance of FREETYPE_CFLAGS,_LIBS + just before AC_PATH_PROG, to make PKG_CHECK_MODULES catch the + environmental + values. + + configure.ac | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 9e0f0368e543df46b40cbd7bed6fdc1abf846e7d +Author: suzuki toshiya +Date: Tue Apr 17 20:19:41 2012 +0200 + + Do not append "-ansi" to CXXFLAG, if "-std=XXX" is already specified. + + SplashOutputDev.cc uses isfinite() function (defined by math.h). + isfinite() was standardized in C99, and imported to C++0x in later. + + In QNX header file system, isfinite() is disabled by default, + the definition of __STDC_VERSION__ > 199901 is required to enable it. + In the case of GCC, "-std=c99" (for C) or "-std=gnu++0x" (for C++) + is expected. + + But, current configure of poppler appends "-ansi" flag for CXXFLAGS, + if the compiler is known to be GNU. "-ansi" is C89 or C++98, + so isfinite() + is unavailable. I propose a patch NOT to "-ansi" flag, if CXXFLAGS + includes "-std=XXX" already. + + configure.ac | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 2f1e7ef252b8d1f7ee6004825c2926f0f5e181a5 +Author: Albert Astals Cid +Date: Thu Apr 12 23:11:41 2012 +0200 + + Do not crash in broken documents + + They might trigger an xref reconstruct and then i could not be in + bounds anymore + Crash found by Joel Voss of Leviathan Security Group + + poppler/XRef.cc | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +commit 19fb9caecb1b265a8b8651e9bcf4b779f593fefd +Author: Albert Astals Cid +Date: Thu Apr 12 22:24:50 2012 +0200 + + Fix crash when the destination file does not exist + + Issue found by Joel Voss of Leviathan Security Group + + utils/HtmlOutputDev.cc | 18 ++++++++++-------- + 1 file changed, 10 insertions(+), 8 deletions(-) + +commit fa4848eae370437ab1b9863124e9a340830f66c7 +Author: Adrian Johnson +Date: Fri Apr 13 22:11:01 2012 +0930 + + man pages: add missing section heading + + utils/pdftotext.1 | 1 + + 1 file changed, 1 insertion(+) + +commit 08a14aa37b177bb4586869857ae678cb4bcd4039 +Author: Albert Astals Cid +Date: Thu Apr 12 21:52:30 2012 +0200 + + 0.19.3 + + CMakeLists.txt | 4 ++-- + NEWS | 26 +++++++++++++++++++++++++- + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/CMakeLists.txt | 2 +- + qt4/src/Doxyfile | 2 +- + qt4/src/Makefile.am | 2 +- + 8 files changed, 33 insertions(+), 9 deletions(-) + +commit 52227b59d1fa2a2029bfff2f8a167efd81faebbb +Author: Albert Astals Cid +Date: Thu Apr 12 20:52:55 2012 +0200 + + Update (C) + + poppler/CairoFontEngine.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 40cb3f27f4dcad4fe8c48f0b638eac7913fc3722 +Author: Albert Astals Cid +Date: Thu Apr 12 20:50:38 2012 +0200 + + Do not pass those params to createGfx since they aren't used + + glib/poppler-page.cc | 4 ++-- + poppler/Page.cc | 9 +++------ + poppler/Page.h | 5 ++--- + 3 files changed, 7 insertions(+), 11 deletions(-) + +commit 9a10d31fca7f060f24bae9efe15662f02a9684ca +Author: Fabio D'Urso +Date: Thu Apr 12 20:31:23 2012 +0200 + + qt4: Remove unimplemented revision setters from public API + + qt4/src/poppler-annotation-private.h | 2 ++ + qt4/src/poppler-annotation.cc | 62 + ++++++++-------------------------- + qt4/src/poppler-annotation.h | 13 ------- + 3 files changed, 16 insertions(+), 61 deletions(-) + +commit 0531329aeb8783c48f056929e6e81cebda33500f +Author: Albert Astals Cid +Date: Thu Apr 12 20:07:13 2012 +0200 + + [qt4] Mark the dummy stuff as deprecated + + qt4/src/poppler-annotation.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 67b7b2bdd0943680437d96349c3415aa40082cbb +Author: Albert Astals Cid +Date: Thu Apr 12 20:06:52 2012 +0200 + + [qt4] initialize the dummy members here too + + qt4/src/poppler-annotation.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit bf171382afb6b50284c3855e3a1815a15ec34366 +Author: Albert Astals Cid +Date: Thu Apr 12 19:24:42 2012 +0200 + + Add since markers + + qt4/src/poppler-annotation.h | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +commit e36fd775394ee752c0f62f789359c72b52094975 +Author: Albert Astals Cid +Date: Thu Apr 12 18:58:29 2012 +0200 + + Remove unneeded forward declaration + + qt4/src/poppler-qt4.h | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit c1aa4a8c0aa9d46757e3849776acac42731e02d1 +Author: Fabio D'Urso +Date: Thu Apr 12 00:39:33 2012 +0200 + + qt4: Annotation appearance invalidation + + Call Annot::invalidateAppearance every time the visual aspect + is changed + + qt4/src/poppler-annotation.cc | 34 ++++++++++++++++++++++++++++++++++ + 1 file changed, 34 insertions(+) + +commit 4338ae354c66e4df8d7d70a156517e27b3b80539 +Author: Fabio D'Urso +Date: Sun Mar 25 22:58:33 2012 +0200 + + qt4: Added HideAnnotations option to PSConverter + + qt4/src/poppler-ps-converter.cc | 23 ++++++++++++++++++++++- + qt4/src/poppler-qt4.h | 3 ++- + 2 files changed, 24 insertions(+), 2 deletions(-) + +commit e50993b3b47a759c93ccdeeaef289d6985b05bb1 +Author: Fabio D'Urso +Date: Thu Mar 22 19:58:12 2012 +0100 + + qt4: DOM annotation store - Black color is different than invalid + color + + qt4/src/poppler-annotation.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4739a6a02097f110c37defdfa616351459902806 +Author: Fabio D'Urso +Date: Mon Mar 19 19:17:33 2012 +0100 + + qt4: Annotation removal + + qt4/src/poppler-annotation-private.h | 3 +++ + qt4/src/poppler-annotation.cc | 29 +++++++++++++++++++++++++++++ + qt4/src/poppler-page.cc | 5 +++++ + qt4/src/poppler-qt4.h | 8 ++++++++ + 4 files changed, 45 insertions(+) + +commit 25a64d69aaab61c8cf944107e649e19920244a2b +Author: Fabio D'Urso +Date: Tue Mar 20 01:46:07 2012 +0100 + + qt4: TextAnnotation write support + basic textFont getter + + Also makes inplaceText a synoym for contents + + qt4/src/poppler-annotation.cc | 159 + ++++++++++++++++++++++++++++++++--------- + 1 file changed, 124 insertions(+), 35 deletions(-) + +commit a31a8118ba07aa7f90c69130476fb7d86f8614ad +Author: Fabio D'Urso +Date: Sun Mar 11 23:57:51 2012 +0100 + + qt4: GeomAnnotation, InkAnnotation and CaretAnnotation write support + + qt4/src/poppler-annotation.cc | 103 + +++++++++++++++++++++++++++++++++++++---- + qt4/src/poppler-annotation.h | 6 +-- + 2 files changed, 96 insertions(+), 13 deletions(-) + +commit e4052b52002447772e24571fd13f0f22fd2bfb16 +Author: Fabio D'Urso +Date: Sat Mar 10 17:48:56 2012 +0100 + + qt4: HighlightAnnotation and StampAnnotation write support + + qt4/src/poppler-annotation.cc | 96 + ++++++++++++++++++++++++++++++++++++++--- + qt4/src/poppler-annotation.h | 4 +- + 2 files changed, 91 insertions(+), 9 deletions(-) + +commit b5e948b6130cdb04387a8244179337c7904dcd03 +Author: Fabio D'Urso +Date: Wed Mar 14 17:44:50 2012 +0100 + + qt4: Annotation insertion and LineAnnotation support + + This patch adds Page::addAnnotation to insert new annotations in + a page. + The only annotation type that can be added is LineAnnotation. Support + for other + types will be added in the next patches. + + qt4/src/poppler-annotation-private.h | 12 ++ + qt4/src/poppler-annotation.cc | 297 + ++++++++++++++++++++++++++++++++-- + qt4/src/poppler-annotation.h | 4 +- + qt4/src/poppler-page.cc | 5 + + qt4/src/poppler-qt4.h | 9 ++ + 5 files changed, 316 insertions(+), 11 deletions(-) + +commit 20b4feec612448be8a800173ddadbf257657477e +Author: Fabio D'Urso +Date: Fri Mar 9 19:31:16 2012 +0100 + + qt4: Basic setters to edit annotations + + qt4/src/poppler-annotation-helper.h | 15 ++++ + qt4/src/poppler-annotation-private.h | 1 + + qt4/src/poppler-annotation.cc | 128 + +++++++++++++++++++++++++++++++--- + 3 files changed, 135 insertions(+), 9 deletions(-) + +commit 0e8c35b59f0fba926b30c9a87823c92ae03bf116 +Author: Fabio D'Urso +Date: Fri Mar 9 01:04:28 2012 +0100 + + qt4: Changes to Annotation API (part 2/2) + + 1) Moved annotation data retrieval logic to getters for types of + annotations + that will be made editable in next patches. + Others (Link, FileAttachment, Sound, Movie and Screen) are still + entirely filled + at creation time. + + 2) TextAnnotation's callout points setter now takes an array, not just + individual points. + + 3) AnnotationPrivate::pdfObjectReference replaced with a getter + method that + directly queries the tied Annot object (if any) + + qt4/src/poppler-annotation-helper.h | 31 +- + qt4/src/poppler-annotation-private.h | 23 +- + qt4/src/poppler-annotation.cc | 1254 + +++++++++++++++++++++++++++++++--- + qt4/src/poppler-annotation.h | 58 +- + qt4/src/poppler-link.cc | 2 +- + qt4/src/poppler-page.cc | 778 +-------------------- + qt4/src/poppler-qt4.h | 4 +- + 7 files changed, 1217 insertions(+), 933 deletions(-) + +commit 73b91207649a81740183e2288809d3b84b52f595 +Author: Fabio D'Urso +Date: Wed Mar 7 17:05:50 2012 +0100 + + qt4: Changes to Annotation API (part 1/2) + + This is part 1/2 of a change in annotation API. It breaks both source + and binary + compatibility. + + Note that, even though DOM methods are partially modified by this + patch, their + output is 100% backward compatible. Therefore code relying only on + DOM methods + (i.e. AnnotationUtils methods) will keep working. + + 1) Style and Popup container classes + + Style and Popup (previously known as Window) properties are now + wrapped in + container classes. In both of them, private data is implicitly shared. + The old Window structure is removed, but an undocumented window + field is still + exported to make Okular 4.8.0 compile. It must not be used. + + 2) Revisions + + The Annotation::Revision structure was removed, because it added an + extra layer + of indirection that can be avoided. Now revision scope and type + are stored + directly in the target Annotation, and Annotation::revisions() + returns a list + of pointers to child annotations. + + 3) All constructors are temporarily made private + + This patch hides all constructors from user code. Subsequent + patches will + restore them in the same patch as their type-specific creation + support. + + 4) Minor fixes + - Popup size was incorrectly stored as an integer value, now + it's part of + a QRectF. + - Typo: LinkAnnotation::linkDestionation() --> linkDestination + - Dash array is now exported as QVector instead of + a marks/spaces + integer pair + - GeomAnnotation's geometricalPointWidth removed, because it + was never + referenced and it doesn't exist in PDF specs + + 5) AnnotationPrivate data is now explicitly shared + Annotation private data has been rearranged so that it's now + possible to + uniformly give ownership of all Annotation objects to the caller. + Previously Page::annotations() did leave ownership to user, but + Annotation::revisions() didn't. Now both of them give ownership + to user. + + qt4/src/poppler-annotation-private.h | 19 +- + qt4/src/poppler-annotation.cc | 1022 + ++++++++++++++++++++++++---------- + qt4/src/poppler-annotation.h | 292 +++++++--- + qt4/src/poppler-page.cc | 92 ++- + qt4/src/poppler-qt4.h | 6 + + 5 files changed, 997 insertions(+), 434 deletions(-) + +commit 7f0f080277d35f6f2e426ca2a3ff76c2856daeaf +Author: Adrian Johnson +Date: Tue Apr 10 00:08:49 2012 +0930 + + cairo: fix stroke pattern with transparency group + + Cairo copy path/append path with device offsets is broken. Use GfxPath + instead. + + Bug 48468 + + poppler/CairoOutputDev.cc | 15 ++++++--------- + poppler/CairoOutputDev.h | 4 ++-- + 2 files changed, 8 insertions(+), 11 deletions(-) + +commit 5ea305c3924cead302092378ab67300c3099afd9 +Author: Adrian Johnson +Date: Sun Apr 8 23:11:30 2012 +0930 + + cairo: only align stroke coords for horizontal and vertical lines + + Bug 48318 + + poppler/CairoOutputDev.cc | 80 + ++++++++++++++++++++++++++++++++++----------- + poppler/CairoOutputDev.h | 2 +- + 2 files changed, 62 insertions(+), 20 deletions(-) + +commit 8414d8f621b8abb018e80f2255cfb511a1e558d4 +Author: Adrian Johnson +Date: Mon Apr 9 12:08:20 2012 +0930 + + cairo: ensure 0 width lines with stroke_adjust are aligned + + Previously the code path for 0 width lines ignored the stroke_adjust + setting. Rearrange the code so the code path for stroke_adjust == TRUE + is performed first (this will also set 0 width lines to 1 pixel wide). + + poppler/CairoOutputDev.cc | 42 + +++++++++++++++++++++--------------------- + 1 file changed, 21 insertions(+), 21 deletions(-) + +commit af1a84eb90656de68bb14f2c4ae4f813c51bc3a3 +Author: Adrian Johnson +Date: Mon Apr 9 17:17:29 2012 +0930 + + cairo: fix paintTransparencyGroup when both mask and fill opacity + are required + + Bug 48453 + + poppler/CairoOutputDev.cc | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 46b3a70cae3b37cb4270a83afaddd6734442b752 +Author: Fabio D'Urso +Date: Mon Apr 9 19:32:24 2012 +0200 + + Caption text rendering in AnnotLine + + poppler/Annot.cc | 262 + +++++++++++++++++++++++++++++++++++++----------------- + poppler/Annot.h | 2 + + 2 files changed, 183 insertions(+), 81 deletions(-) + +commit 855607828447ecec2c8444650d015e21bd17d2e2 +Author: Fabio D'Urso +Date: Mon Apr 9 16:45:50 2012 +0200 + + AnnotFreeText rendering improvements (auto word-wrap, quadding, + border style, font/border color) + + poppler/Annot.cc | 146 + ++++++++++++++++++++++++++++++++++++++++++------------ + poppler/Annot.h | 1 + + 2 files changed, 115 insertions(+), 32 deletions(-) + +commit 80f662162698c1ec27771d9cf5e2e6bc3d21c4df +Author: Ihar Filipau +Date: Thu Apr 12 00:19:26 2012 +0200 + + Fix the mask inversion + + utils/HtmlOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 06591d848e53598973f7d5fddac50785a46e8027 +Author: Thomas Freitag +Date: Wed Apr 11 23:49:29 2012 +0200 + + Fix Splash CMYK merge error + + Mail says + ****** + Hi, + + playing around with the attached PDF to get a better CMYK support for + the blend mode soft light, I encountered that I made a big mistake + during merge in the CMYK part of splash. I fixed that. The attached + patch also includes the small enhancement I made in soft light + routine. + ****** + + poppler/SplashOutputDev.cc | 9 +++++++++ + splash/Splash.cc | 2 +- + 2 files changed, 10 insertions(+), 1 deletion(-) + +commit 1f45afde6410f03c79fcf4b66d5834079879d38f +Author: Ihar Filipau +Date: Mon Apr 9 19:17:41 2012 +0200 + + Add producer and version to xml output + + utils/HtmlOutputDev.cc | 2 +- + utils/pdf2xml.dtd | 4 ++++ + 2 files changed, 5 insertions(+), 1 deletion(-) + +commit cef6ac0ebbf8451beaadb3ddb6c991bbb7239432 +Author: Fabio D'Urso +Date: Sun Apr 8 23:15:15 2012 +0200 + + FIX: Do not append a NUL character to Unicode page labels + + poppler/PageLabelInfo.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 3d4985f14e54ddcc64ea654b23e931b7e6acfbdc +Author: Fabio D'Urso +Date: Sat Apr 7 11:28:36 2012 +0200 + + Do not trust the rect of AnnotTextMarkup when drawing + + poppler/Annot.cc | 43 +++++++++++++++++++++++++++++-------------- + 1 file changed, 29 insertions(+), 14 deletions(-) + +commit c6296cd8c1ca398beac20f1e88c87b9082386247 +Author: Fabio D'Urso +Date: Sat Apr 7 00:30:54 2012 +0200 + + Do not trust the rect of AnnotLine, AnnotPolygon and AnnotInk + when drawing + + poppler/Annot.cc | 126 + +++++++++++++++++++++++++++++++++++++++++++----------- + poppler/Annot.h | 27 ++++++++++++ + 2 files changed, 128 insertions(+), 25 deletions(-) + +commit 503620ae74d719da52e3374725e490c62f7be7a3 +Author: Fabio D'Urso +Date: Thu Mar 29 19:07:05 2012 +0200 + + Do not recreate Annots when writing to PS, Export poppler-generated + Annot appearance resource dict + + 1) With previous code each Annot object was reconstructed from the + pdf object when + writing to PS, leading to the fact that writeDocSetup couldn't see the + generated appearance. + This patch makes writeDocSetup use the same Annots object returned by + Page::getAnnots. + + 2) This patch also enables each Annot subtype to control the exported + resources. AnnotFreeText uses this new method to export font + information. + + 3) Comment fixed in Page.h: Page::getAnnots does *not* give away + ownership, in + fact the returned object is destroyed by ~Page. + + poppler/Annot.cc | 28 ++++++++++++++++++++++++++++ + poppler/Annot.h | 5 +++-- + poppler/FontInfo.cc | 11 ++++------- + poppler/PSOutputDev.cc | 12 +++--------- + poppler/Page.h | 2 +- + 5 files changed, 39 insertions(+), 19 deletions(-) + +commit 2733504890333b0925d95e01310726d11fed44d8 +Author: Fabio D'Urso +Date: Fri Mar 23 20:54:58 2012 +0100 + + Basic AnnotFreeText rendering (hardcoded font, WinAnsi characters + only) + + This patch also moves layoutText and writeString from AnnotWidget + to Annot + + poppler/Annot.cc | 137 + +++++++++++++++++++++++++++++++++++++++++++++++++++++- + poppler/Annot.h | 11 +++-- + 2 files changed, 142 insertions(+), 6 deletions(-) + +commit 3023a59c0a1a5974b232f6f8cb629eabb6797616 +Author: Fabio D'Urso +Date: Sun Mar 25 22:04:11 2012 +0200 + + AnnotTextMarkup rendering improvements + + 1) FIX: Wrong coords in typeUnderline and typeStrikeout + 2) Implementation of typeSquiggly + 3) FIX: Form creation is common to all markup types + + poppler/Annot.cc | 92 + +++++++++++++++++++++++++++++++++--------------------- + 1 file changed, 56 insertions(+), 36 deletions(-) + +commit 8927ddc448edc016043107e88e3bc3b2b8b03269 +Author: Fabio D'Urso +Date: Thu Mar 22 17:33:01 2012 +0100 + + Improvements to AnnotLine::draw + + poppler/Annot.cc | 50 + ++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 46 insertions(+), 4 deletions(-) + +commit bd7a40fd0312c753d1871558b566376304f1ff35 +Author: Fabio D'Urso +Date: Wed Mar 21 22:48:05 2012 +0100 + + AnnotInk rendering + + poppler/Annot.cc | 62 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + poppler/Annot.h | 2 ++ + 2 files changed, 64 insertions(+) + +commit 6a8794abe639db8284db079e028cbcd66e138884 +Author: Fabio D'Urso +Date: Wed Mar 21 22:33:13 2012 +0100 + + AnnotPolygon rendering + + poppler/Annot.cc | 87 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + poppler/Annot.h | 2 ++ + 2 files changed, 89 insertions(+) + +commit f389c50458079f24164b1c12b1151c8617485acb +Author: Fabio D'Urso +Date: Wed Mar 21 21:12:59 2012 +0100 + + Do not fill AnnotGeometry with transparent color + + Previously it was filled with black. + + poppler/Annot.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c63cc22dd82f827305ad57f241ad49998f2a1c23 +Author: Albert Astals Cid +Date: Sun Apr 8 12:28:17 2012 +0200 + + Remove extra copy() (memleak) + + poppler/GlobalParams.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit ed0c9640abcbea459e3a276ee0b27631b01c32c4 +Author: Albert Astals Cid +Date: Sun Apr 8 12:24:20 2012 +0200 + + Do not crash if mallocing too much memory + + Fixes crash in + https://ritdml.rit.edu/bitstream/handle/1850/11220/TYehThesis1992.pdf?sequence=1 + even though the page is still unrendered + + poppler/JBIG2Stream.cc | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit f1e621adbbb74ec709022b2a31195331651c83fa +Author: Adrian Johnson +Date: Sun Apr 8 19:42:05 2012 +0930 + + cairo: use correct userfont font bbox + + cairo 1.12 started clipping text to the font bbox + + Bug 48399 + + poppler/CairoFontEngine.cc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit f5b708c3e04ba50756cd9f9530cf82f547443ce9 +Author: Suzuki Toshiya +Date: Fri Apr 6 15:22:36 2012 +0200 + + ttc<->ttf fallback is expected for CJK font list in GlobalParamsWin.cc + + Bug 48046 + + poppler/GlobalParamsWin.cc | 224 + +++++++++++++++++++++++++------------------- + 1 file changed, 128 insertions(+), 96 deletions(-) + +commit 4e940b14a6fddde9a1714976ff8045e26cbf7d40 +Author: Adrian Johnson +Date: Mon Apr 2 20:03:11 2012 +0930 + + cairo: fix regression caused by mesh gradients + + poppler/CairoOutputDev.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 74a7d963de75c0097eedcf4224d13cf275a64757 +Author: Carlos Garcia Campos +Date: Sun Apr 1 19:35:48 2012 +0200 + + regtest: remove debug print to show bisect exit status in Bisect.py + + regtest/Bisect.py | 1 - + 1 file changed, 1 deletion(-) + +commit 2749db77eb8ccdbc4b0771163c8942f882f259f4 +Author: Carlos Garcia Campos +Date: Sun Apr 1 19:20:37 2012 +0200 + + regtest: Fix crash when creating HTML report for a single test + + regtest/commands/create-report.py | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) + +commit 1c8e1bb637347d0d31945f9d265b29e7b49396e2 +Author: Carlos Garcia Campos +Date: Sun Apr 1 19:11:57 2012 +0200 + + regtest: Don't show results for crashed or failed to run tests in + HTML report + + regtest/HTMLReport.py | 2 ++ + 1 file changed, 2 insertions(+) + +commit a5f4936dfb3e60ca37f932cc066aa10765f3cbc9 +Author: Fabio D'Urso +Date: Sat Mar 24 23:13:48 2012 +0100 + + Fix: annotDisplayDecideCbk was not propagated + + poppler/OutputDev.h | 6 +++++- + poppler/PSOutputDev.cc | 11 ++++++++--- + poppler/PSOutputDev.h | 5 ++++- + poppler/Page.cc | 3 ++- + utils/HtmlOutputDev.h | 5 ++++- + 5 files changed, 23 insertions(+), 7 deletions(-) + +commit aab8c9a026f781da47ecedd453e225f906361444 +Author: Albert Astals Cid +Date: Thu Mar 29 21:49:38 2012 +0200 + + Increase version + + CMakeLists.txt | 4 ++-- + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 5 files changed, 6 insertions(+), 6 deletions(-) + +commit f7e65b62480631d0485167a81a588a176630dd8d +Author: Albert Astals Cid +Date: Thu Mar 29 21:48:11 2012 +0200 + + 0.19.2 news + + NEWS | 23 ++++++++++++++++++++++- + 1 file changed, 22 insertions(+), 1 deletion(-) + +commit 627e072eb1edbfabf549656e9abf10100ed7340c +Author: Albert Astals Cid +Date: Thu Mar 29 21:40:13 2012 +0200 + + Update copyrights + + poppler/TextOutputDev.cc | 1 + + 1 file changed, 1 insertion(+) + +commit e9ad888b003d343d8ca60f044c7cf10a8df81cf4 +Author: Albert Astals Cid +Date: Thu Mar 29 19:49:34 2012 +0200 + + Add quotes to the poppler version define + + poppler/poppler-config.h.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 8172bb03b6e8f1c16e1a152fb251b10446f54129 +Author: Peter Breitenlohner +Date: Mon Mar 26 11:13:34 2012 +0200 + + define POPPLER_VERSION as C string + + Signed-off-by: Peter Breitenlohner + + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4a38d933d06d189317b1b9028c3fa4ae2a1551af +Author: Suzuki Toshiya +Date: Thu Mar 29 19:34:25 2012 +0200 + + per-collection fallback for missing CID-keyed fonts on Win32 + + poppler/GlobalParamsWin.cc | 38 ++++++++++++++++++++++++++++++++++---- + 1 file changed, 34 insertions(+), 4 deletions(-) + +commit a0b3e0938e08847d10c5d7b7528c7c5d43a7a3b8 +Author: Hib Eris +Date: Thu Mar 29 07:52:30 2012 +0200 + + Fix help message + + Partial credit goes to suzuki toshiya + + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 631224dc0c721119c91984f1940c9e51edf17eca +Author: Fabio D'Urso +Date: Tue Mar 20 00:56:50 2012 +0100 + + Annotation removal + + poppler/Annot.cc | 17 +++++++++++++++++ + poppler/Annot.h | 1 + + poppler/Page.cc | 36 ++++++++++++++++++++++++++++++++++++ + poppler/Page.h | 3 +++ + 4 files changed, 57 insertions(+) + +commit 20476370a445a26f1fae9db6ad58727ee3c63550 +Author: Fabio D'Urso +Date: Wed Mar 28 23:16:37 2012 +0200 + + Basic support for Annot appearance stream removal and invalidation + + poppler/Annot.cc | 190 + ++++++++++++++++++++++++++++++++++++++++-------------- + poppler/Annot.h | 29 +++++++-- + 2 files changed, 168 insertions(+), 51 deletions(-) + +commit e9a066c3a53cc1cb73dd43a243390ae4e3c76ca3 +Author: Albert Astals Cid +Date: Wed Mar 28 23:33:37 2012 +0200 + + Fix another typo in macGlyphNames + + fofi/FoFiTrueType.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 3d277b230e806a648fcc6d9e7af39370aa89c2ae +Author: Adrian Johnson +Date: Sat Feb 18 09:19:51 2012 +1030 + + Fix typo in "mu" glyph name in truetype 'post' table standard mac + ordering + + The standard mac ordering table is at: + + https://developer.apple.com/fonts/ttrefman/rm06/Chap6post.html + + fofi/FoFiTrueType.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 47b910d35b2cf5914ed4c07f751c5e8c304be7fc +Author: suzuki toshiya +Date: Wed Mar 28 20:21:44 2012 +0200 + + Add quotes + + this is quite small fix. In poppler's configure, basically the shell + variables are not enclosed, and not quoted, aslike + if test x$use_glib = x; then + This syntax make the test command confused when use_glib is multi-word + value, as, "no (required cairo output)". In such case, test cannot + know + how to evaluate the token "no" "(required" "cairo", so some "syntax + error" + messages are given. Thus, quoting of the variable would be safer. + + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 78224609f6c1d87deee72b60a8f8f9f6c36ac75f +Author: Albert Astals Cid +Date: Wed Mar 28 20:21:11 2012 +0200 + + Workaround Windows problem with libjpeg + + In libjpeg6b, there is a type definition conflict issue in jmorecfg.h. + jmorecfg.h typedefs INT16 as short, INT32 as long. The latter conflict + with basetsd.h of Microsoft Windows SDK or MinGW that typedefs INT32 + as int. basetsd.h is included by windows.h, so, if the users work with + ANSI C features only, the conflict does not appear, it would be the + background why such fundamental error has been preserved. + Anyway, jmorecfg.h designer was aware about the conflict with + X11 headers + (Xmd.h defines INT16, INT32, etc), so if we pretend as if Xmd.h were + included (by defining XMD_H), this issue can be bypassed. Attached + patch + checks the conflict, then, if there is a conflict, tries XMD_H + trick, and + uses it if it works. If jmorecfg.h or basetsd.h was manually fixed to + prevent this issue, this trick is not used. + + configure.ac | 42 ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 42 insertions(+) + +commit d8cf31f8c7e190939525ad68cd4617fb48fea60e +Author: suzuki toshiya +Date: Wed Mar 28 20:20:43 2012 +0200 + + update Makefile.am to reflect LIBJPEG_CFLAGS, LIBTIFF_CFLAGS, + LIBPNG_CFLAGS for related sources. + + goo/Makefile.am | 15 +++++++++++++++ + poppler/Makefile.am | 6 ++++++ + splash/Makefile.am | 16 ++++++++++++++++ + utils/Makefile.am | 6 ++++++ + 4 files changed, 43 insertions(+) + +commit f0c13f5efc641c63627b8f0b0815b6b511d8d196 +Author: suzuki toshiya +Date: Wed Mar 28 20:20:06 2012 +0200 + + Configure improvements for libs in non default paths + + evaluate pkg-config-like environmental variables like LIBJPEG_CFLAGS, + LIBJPEG_LIBS, LIBTIFF_CFLAGS and LIBTIFF_LIBS in configuration. + + configure.ac | 50 ++++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 44 insertions(+), 6 deletions(-) + +commit e55f485d803cb1f82e0d8a53d1998e1887c7920f +Author: suzuki toshiya +Date: Wed Mar 28 20:19:08 2012 +0200 + + Improve m4/libjpeg.m4 + + m4/libjpeg.m4 uses USER_INCLUDES and USER_LDFLAGS in it, but + USER_INCLUDES is not reflected when jpeglib.h is searched. + this patch modifies m4/libjpeg.m4 to reflect USER_INCLUDES + when jpeglib.h is searched. + + m4/libjpeg.m4 | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit e88c17d45220eea60a3dd7fab26a067616388c5f +Author: Albert Astals Cid +Date: Wed Mar 28 20:05:45 2012 +0200 + + Fix compile in windows + + poppler/GlobalParamsWin.cc | 35 ++++++++++++++++++++++++++++++----- + 1 file changed, 30 insertions(+), 5 deletions(-) + +commit ee0eaabe24019d2af226ef03e3f456787525e040 +Author: Fabio D'Urso +Date: Mon Mar 19 00:05:49 2012 +0100 + + Added Array::remove (and Object::arrayRemove) + + poppler/Array.cc | 13 +++++++++++++ + poppler/Array.h | 4 ++++ + poppler/Object.h | 5 +++++ + 3 files changed, 22 insertions(+) + +commit d6a1b7dcaeac1e49533519b9f8a279fd64d04c67 +Author: Thomas Freitag +Date: Tue Mar 27 00:00:05 2012 +0200 + + Some regression fixes/improvements + + I just finished the patch for these regressions, they had differents + reasons + 1. In CharCodeToUnicode::mapToUnicode the identity support was missing + 2. The new algorithms for axial and radial shading caused problems in + cairo. I revert these changes but removed the examination of hidden + content (this is already done in the calling function) + 3. The examination of optional hidden content in showing text + was wrong: + of course hidden text should not be shown, but text parameters + like text + position in the state must be changed! + 4. Searching and finding fonts especially with base14 fonts should be + more exact than just looking at the base14 name (i.e. fixed width + and so + on) when using fontconfig. I implement that to find the best font + fitting to the needs. + + poppler/CharCodeToUnicode.cc | 5 + + poppler/Gfx.cc | 329 + +++++++++++++++++++----------------------- + poppler/GfxFont.cc | 3 +- + poppler/GlobalParams.cc | 78 +++++++--- + poppler/GlobalParams.h | 6 +- + 5 files changed, 218 insertions(+), 203 deletions(-) + +commit a5257efe00d0fe850b1abe5c552f7581027ac64c +Author: Fabio D'Urso +Date: Mon Mar 26 19:28:55 2012 +0200 + + Re-added forceRasterize to PSOutputDev (and qt4 fix too)‏ + + The patch restores the forceRasterize argument in PSOutputDev ctors. + Commit 6ee907f291427b8751a872b31210bf32e8d2b722 had removed it, + turning it + into a global param. + As a side effect, this patch also fixes qt4/poppler-ps-converter, + which had + not been updated to the new signature, and thus produced corrupted + output if + forceRasterization was set. + + glib/poppler-page.cc | 2 +- + poppler/GlobalParams.cc | 16 ---------------- + poppler/GlobalParams.h | 3 --- + poppler/PSOutputDev.cc | 6 +++++- + poppler/PSOutputDev.h | 3 +++ + 5 files changed, 9 insertions(+), 21 deletions(-) + +commit 55d039ada063a9427de6dd59846ce1570ab26e9f +Author: Suzuki Toshiya +Date: Mon Mar 26 22:31:29 2012 +0200 + + CJK improvements + + More info in the mailing list threads + * script names for vertical writing mode should be differentiated + for CJK + * 2 workarounds for a Korean font on Microsoft Windows + + fofi/FoFiTrueType.cc | 47 + ++++++++++++++++++++++++++++++++++++----------- + fofi/FoFiTrueType.h | 8 +++++++- + poppler/GfxFont.cc | 14 ++++++++------ + 3 files changed, 51 insertions(+), 18 deletions(-) + +commit a8b0fa4d07480242afba7751995e38eaf3147ac5 +Author: Horst Prote +Date: Mon Mar 26 21:04:32 2012 +1030 + + don't add newline to last line extracted by TextSelectionDumper + + Bug 45955 + + poppler/TextOutputDev.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit c40e2315cd796ba928969d13a761f5f19d8438fc +Author: Adrian Johnson +Date: Fri Mar 23 21:49:42 2012 +1030 + + cairo: use a transparency group with + setSoftMaskFromImageMask/unsetSoftMaskFromImageMask + + Drawing a tiling pattern between setSoftMaskFromImageMask and + unsetSoftMaskFromImageMask clears the softmask. + + Similar to Splash, create a transparency group in + setSoftMaskFromImageMask. Pop and paint the group in + unsetSoftMaskFromImageMask. The saveState/restoreState is to ensure + the softmask is restored before painting the group. + + Bug 47739 + + poppler/CairoOutputDev.cc | 16 ++++++++++++++++ + 1 file changed, 16 insertions(+) + +commit 7b57afea2e433fc7b6f359a62b1289f0e1da3267 +Author: Adrian Johnson +Date: Sat Mar 24 08:27:34 2012 +1030 + + cairo: update cairo mesh pattern to 1.12 api + + Now that a stable version of cairo with mesh gradient support is + released update poppler to use this api. + + poppler/CairoOutputDev.cc | 40 ++++++++++++++++++++-------------------- + poppler/CairoOutputDev.h | 4 ++-- + 2 files changed, 22 insertions(+), 22 deletions(-) + +commit 2f156b34fc8755ddd2a32cac830f3073d6b2c481 +Author: Suzuki Toshiya +Date: Fri Mar 23 20:00:18 2012 +0100 + + Fix compile in mingw-gcc + + poppler/GlobalParamsWin.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 06b6db92dd1ec32f9a55347073f8b533aa074ee1 +Author: Fabio D'Urso +Date: Sun Mar 18 23:58:05 2012 +0100 + + Added XRef::removeIndirectObject + + poppler/PDFDoc.cc | 15 ++++++++++----- + poppler/XRef.cc | 15 +++++++++++++++ + poppler/XRef.h | 2 ++ + 3 files changed, 27 insertions(+), 5 deletions(-) + +commit a2e9b7c02ffa0e5edc4da18cc726993bc92fc684 +Author: Fabio D'Urso +Date: Mon Mar 19 19:17:09 2012 +0100 + + Fix in AnnotMarkup's popup window handling + + AnnotPopup's ref was previously set to the *parent* annot, now + it's correctly + set to the *popup* annot's own. + + poppler/Annot.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 05641304df67beae546a2fe18071f3be52707aa8 +Author: Fabio D'Urso +Date: Mon Mar 19 20:56:45 2012 +0100 + + Basic Annot border editing support + + poppler/Annot.cc | 23 +++++++++++++++++++++++ + poppler/Annot.h | 9 +++++++++ + 2 files changed, 32 insertions(+) + +commit 3e6275a05066c152b265cc27275d9e4107c089e9 +Author: Fabio D'Urso +Date: Fri Mar 16 21:47:02 2012 +0100 + + Yet new setters to AnnotFreeText + + poppler/Annot.cc | 45 +++++++++++++++++++++++++++++++++++++++++++++ + poppler/Annot.h | 2 ++ + 2 files changed, 47 insertions(+) + +commit f69f41056fc8cd8a70b38024f255e9074af20bdc +Author: Pino Toscano +Date: Tue Mar 20 15:18:33 2012 +0100 + + cmake: reset CMAKE_REQUIRED_INCLUDES/CMAKE_REQUIRED_LIBRARIES + + cmake/modules/FindLIBOPENJPEG.cmake | 3 +++ + 1 file changed, 3 insertions(+) + +commit 4a9238441a5317c3304296e4e6430cccefe8322c +Author: Ihar Filipau +Date: Fri Mar 16 00:07:45 2012 +0100 + + Flip images if they need to + + Bug 32340 + + utils/HtmlOutputDev.cc | 50 + ++++++++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 48 insertions(+), 2 deletions(-) + +commit 6d68d0d3acc8c8e0d9d310b2e1ba2b07d6bfe942 +Author: Ihar Filipau +Date: Thu Mar 15 22:56:10 2012 +0100 + + pdftohtml: extract mask images even if they are not JPEG + + Bug #47186 + + utils/HtmlOutputDev.cc | 203 + ++++++++++++++++++++++++++++++------------------ + utils/HtmlOutputDev.h | 3 + + 2 files changed, 131 insertions(+), 75 deletions(-) + +commit 60155e0fc7224a6b479bf62133f72c460fe48078 +Author: Albert Astals Cid +Date: Thu Mar 15 20:46:53 2012 +0100 + + Install poppler-media.h + + qt4/src/Makefile.am | 1 + + 1 file changed, 1 insertion(+) + +commit 6a173844d5ca6f32e188406ab14cae6a7548fc1d +Author: Albert Astals Cid +Date: Thu Mar 15 20:44:12 2012 +0100 + + Add the export + + qt4/src/poppler-media.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit e401f8e6ba3e18d5a3a4920cd111b2174c75f415 +Author: Albert Astals Cid +Date: Thu Mar 15 20:32:12 2012 +0100 + + Increase version and sonames + + CMakeLists.txt | 4 ++-- + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/CMakeLists.txt | 2 +- + qt4/src/Doxyfile | 2 +- + qt4/src/Makefile.am | 2 +- + 9 files changed, 10 insertions(+), 10 deletions(-) + +commit ce059698e8c5097f75e7a0f828af0936aa104af0 +Author: Albert Astals Cid +Date: Thu Mar 15 20:27:45 2012 +0100 + + 0.19.1 news + + Also inclusing 0.18.x ones + + NEWS | 110 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 110 insertions(+) + +commit 2041d5721871adb2a23999c16ecbdc60abb7b1c4 +Author: Albert Astals Cid +Date: Thu Mar 15 20:20:31 2012 +0100 + + Update C years + + poppler/CMap.h | 1 + + poppler/GfxFont.h | 2 +- + poppler/Rendition.cc | 1 + + 3 files changed, 3 insertions(+), 1 deletion(-) + +commit 95d684aa2a87d01296f5e93516f2ac3f54adbec8 +Author: Guillermo Amaral +Date: Thu Mar 15 20:13:20 2012 +0100 + + Remove the QIODevice and go with a not so good but more safer + QByteArray + + Bug #47336 + + qt4/src/CMakeLists.txt | 1 - + qt4/src/Makefile.am | 1 - + qt4/src/poppler-media.cc | 35 +++++++++----- + qt4/src/poppler-media.h | 4 +- + qt4/src/poppler-page.cc | 1 - + qt4/src/poppler-streamsequentialdevice-private.h | 51 + -------------------- + qt4/src/poppler-streamsequentialdevice.cc | 56 + ---------------------- + 7 files changed, 26 insertions(+), 123 deletions(-) + +commit 9fee12f9bee7252db0974ef69870b69ff1452053 +Author: Albert Astals Cid +Date: Thu Mar 15 19:23:47 2012 +0100 + + Compile++ + + qt4/src/Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) + +commit aa1e6d12d063a64a22841f7996101b45aa680ec7 +Author: Guillermo Amaral +Date: Thu Mar 15 00:35:31 2012 +0100 + + Added media rendition support for Qt4 + + qt4/src/CMakeLists.txt | 3 + + qt4/src/poppler-annotation.cc | 66 ++++++++++ + qt4/src/poppler-annotation.h | 47 ++++++- + qt4/src/poppler-link.cc | 44 +++++++ + qt4/src/poppler-link.h | 38 +++++- + qt4/src/poppler-media.cc | 149 + ++++++++++++++++++++++ + qt4/src/poppler-media.h | 94 ++++++++++++++ + qt4/src/poppler-page.cc | 32 ++++- + qt4/src/poppler-qt4.h | 2 + + qt4/src/poppler-streamsequentialdevice-private.h | 51 ++++++++ + qt4/src/poppler-streamsequentialdevice.cc | 56 ++++++++ + 11 files changed, 579 insertions(+), 3 deletions(-) + +commit 258e2197afa49e60b0b13a05408fc8d484dd8147 +Author: Fabio D'Urso +Date: Wed Mar 14 23:25:00 2012 +0100 + + Added some new setters to AnnotFreeText + + poppler/Annot.cc | 39 +++++++++++++++++++++++++++++++++++++++ + poppler/Annot.h | 4 ++++ + 2 files changed, 43 insertions(+) + +commit 84a62ac157e03880c1c1eda60c3927bd4414640e +Author: Fabio D'Urso +Date: Wed Mar 14 23:24:28 2012 +0100 + + Added some new setters to AnnotGeometry, AnnotInk and AnnotCaret + + poppler/Annot.cc | 116 + ++++++++++++++++++++++++++++++++++++++++-------------- + poppler/Annot.h | 10 +++++ + 2 files changed, 96 insertions(+), 30 deletions(-) + +commit 233c9a097bdc382f6a2eb6319ee15528c72e9632 +Author: Fabio D'Urso +Date: Wed Mar 14 23:23:59 2012 +0100 + + Added some new setters to AnnotTextMarkup and AnnotStamp + + poppler/Annot.cc | 61 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++ + poppler/Annot.h | 11 ++++++++-- + 2 files changed, 70 insertions(+), 2 deletions(-) + +commit 8fb3ac6cf66233b80959ba99a2c706111050f5f1 +Author: Fabio D'Urso +Date: Wed Mar 14 23:23:23 2012 +0100 + + Added Page::getDoc() + + poppler/Page.h | 2 ++ + 1 file changed, 2 insertions(+) + +commit dc4cb07c1e735006d5168e0e65f5143d7fc53e12 +Author: Fabio D'Urso +Date: Wed Mar 14 23:22:10 2012 +0100 + + Added some new setters to AnnotLine and AnnotPolygon + + poppler/Annot.cc | 201 + ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + poppler/Annot.h | 16 +++++ + 2 files changed, 211 insertions(+), 6 deletions(-) + +commit 4931018eecc37dbbe0df1a456347ab200f1b057a +Author: Fabio D'Urso +Date: Wed Mar 14 23:21:07 2012 +0100 + + Make Dict::set remove the entry if object is Null + + poppler/Dict.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 13ac2c0bed3fa5515a3c068488cb6a0b17410a97 +Author: Fabio D'Urso +Date: Wed Mar 14 23:20:13 2012 +0100 + + Added some new setters to Annot and AnnotMarkup + + poppler/Annot.cc | 94 + ++++++++++++++++++++++++++++++++++++++++++++++++++---- + poppler/Annot.h | 8 +++++ + 2 files changed, 96 insertions(+), 6 deletions(-) + +commit aa2b5ffa7961aac0aea33ae9a42bf1f38a756b1b +Author: Pino Toscano +Date: Wed Mar 14 16:25:35 2012 +0100 + + qt4: replace ObjectReference with simplier Ref + + instead of roll out a new (still private) version of Ref, just use + it for private annotation and link data; + this needed a couple of explicit initializations of Ref (since it's + a simple struct with no methods) and a private operator== for it + + qt4/src/CMakeLists.txt | 1 - + qt4/src/poppler-annotation-private.h | 4 +- + qt4/src/poppler-annotation.cc | 1 + + qt4/src/poppler-link.cc | 16 +++--- + qt4/src/poppler-link.h | 5 +- + qt4/src/poppler-objectreference.cc | 89 + ---------------------------------- + qt4/src/poppler-objectreference_p.h | 77 ----------------------------- + qt4/src/poppler-page.cc | 7 ++- + 8 files changed, 21 insertions(+), 179 deletions(-) + +commit e5b914b2bfbb5e95ecde5f1ce148374b1d58dadd +Author: Ihar Filipau +Date: Tue Mar 13 23:54:26 2012 +0100 + + Add possibilty of controlling word breaks percentage + + Bug #47022 + + utils/HtmlOutputDev.cc | 7 +++++-- + utils/pdftohtml.1 | 5 +++++ + utils/pdftohtml.cc | 7 +++++++ + 3 files changed, 17 insertions(+), 2 deletions(-) + +commit 4388cb69114e406ec29e8b6976d1a900e4ab1b7d +Author: Albert Astals Cid +Date: Sun Mar 11 23:37:39 2012 +0100 + + Make doUpdateFont protected + + So that people inheriting from SplashOutputDev *yuck* can use it + more easily + Bug 46622 + + poppler/SplashOutputDev.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 448cfc431b7067af38da51e725ac0f1b2a0bc8f8 +Author: Tobias Koenig +Date: Sun Mar 11 23:22:18 2012 +0100 + + support for LinkMovie object in Qt4 frontend + + Bug #40561 + + qt4/src/CMakeLists.txt | 1 + + qt4/src/poppler-annotation-private.h | 4 ++ + qt4/src/poppler-annotation.h | 4 ++ + qt4/src/poppler-link.cc | 42 ++++++++++++---- + qt4/src/poppler-link.h | 43 ++++++++++++++-- + qt4/src/poppler-objectreference.cc | 89 + ++++++++++++++++++++++++++++++++++ + qt4/src/poppler-objectreference_p.h | 77 +++++++++++++++++++++++++++++ + qt4/src/poppler-page.cc | 39 +++++++++++---- + 8 files changed, 276 insertions(+), 23 deletions(-) + +commit a0d151deabf8243c98ff9953f8a43bb56fbf95a9 +Author: Carlos Garcia Campos +Date: Sun Mar 11 16:05:15 2012 +0100 + + regtest: Add find-regression command to run git bisect automatically + + regtest/Bisect.py | 113 + +++++++++++++++++++++++++++++++++++ + regtest/builder/__init__.py | 86 ++++++++++++++++++++++++++ + regtest/builder/autotools.py | 63 +++++++++++++++++++ + regtest/commands/find-regression.py | 77 ++++++++++++++++++++++++ + 4 files changed, 339 insertions(+) + +commit 856768c380ecea30ce9727b81c4c44b4f9489626 +Author: Carlos Garcia Campos +Date: Sat Mar 10 18:15:58 2012 +0100 + + regtest: Add information about skipped tests in the summary + + regtest/TestRun.py | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +commit 508c7c3ef1f22459daa822f8287cab382119e753 +Author: Tobias Koenig +Date: Wed Mar 7 18:35:05 2012 +0100 + + Fix logic error in Rendition parsing code + + Make the rendition object invalid when both P an C entries are not + present or are invalid in Media Rendition dictionary. + + https://bugs.freedesktop.org/show_bug.cgi?id=47063 + + poppler/Rendition.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 68625258ab3cfc3e8e10a727e397f80bed0d1f5c +Author: Adrian Johnson +Date: Sun Mar 4 18:37:53 2012 +1030 + + glib demo: make ctrl-q quit the demo + + glib/demo/main.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +commit 684b47727ba810ad6bf239e2838aa65b6f6cec36 +Author: Adrian Johnson +Date: Sun Mar 4 18:10:49 2012 +1030 + + glib demo: show font encoding in font demo + + glib/demo/fonts.c | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 48c08d28645d82ab9d67433a0150f6e1ba24b7c6 +Author: Adrian Johnson +Date: Sun Mar 4 17:49:56 2012 +1030 + + glib: add poppler_fonts_iter_get_encoding + + glib/poppler-document.cc | 26 ++++++++++++++++++++++++++ + glib/poppler-document.h | 1 + + glib/reference/poppler-sections.txt | 1 + + 3 files changed, 28 insertions(+) + +commit 8d935569a977675afac35cf1bd5f2611b6a771b6 +Author: Albert Astals Cid +Date: Mon Mar 5 21:59:09 2012 +0100 + + Fix regression in some PSOutputDev array sizing + + poppler/PSOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2484bc0f29aef74c45ea39ef1e24804ed736154c +Author: Albert Astals Cid +Date: Sun Mar 4 23:47:24 2012 +0100 + + Fix mismatch in some functions declarations + + goo/GooString.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 35c960d198d2efa97d15e962662114c5c31b8d20 +Author: Even Rouault +Date: Sun Mar 4 20:32:42 2012 +0100 + + Do not crash on malformed files with 0 bits in the color map of + an image + + poppler/Gfx.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit dae29c6c201cd69cbf4f008de865cc19a36f29b3 +Author: Thomas Freitag +Date: Sun Mar 4 15:22:02 2012 +0100 + + CJK substitute implementation on WIndows platforms. + + When You install ghostscript on WIndows You're able to switch on CJK + support. This will create a cidfmap file in the gs-lib directory. The + ps file which creates it (mkcidfm.ps) runs over the windows font + directory and tries to create a suitable substitution table for + missing + CJK fonts. The cidfmap file is more or less PDF like, so it's + quite easy + to parse it with our parser and create a substitution table in + GlobalParamsWin and use that table. But I expect it in the poppler + data + dir instead of searching for ghostscript installation. If it is not + there, it always returns the default CID font of point 2. + You can either copy it from the gs lib directory or create it with the + ghostscript tool calling + + gswin32c -q -dBATCH -sFONTDIR= + -sCIDFMAP=/cidfmap mkcidfm.ps + + poppler/GlobalParams.cc | 5 +++ + poppler/GlobalParams.h | 2 + + poppler/GlobalParamsWin.cc | 106 + +++++++++++++++++++++++++++++++++++++++----- + 3 files changed, 103 insertions(+), 10 deletions(-) + +commit 32e47ee03840cc8f21c00497025864d77edb75f5 +Author: Thomas Freitag +Date: Sun Mar 4 15:21:13 2012 +0100 + + Improve CJK suport in PSOutputDev + + 1. Adapt bug fix for bug 11413 to the postscript device + 2. A small bug fix when locateFont doesn't find a suitable font and + returns a null pointer + + to 1.: + Adapting the implementation of the bug fix for splash and cairo to the + postscript device was quite easy. But my first proofs of the + output with + ghostscript 8.71 shows some regressions where the CJK chars have a + smaller height than the default square of the font. But the "48" + in the + output of bug-poppler11413.pdf which is set in a "normal" font but + rotated was at the right position. Then I stepped to ghostscript 9.04, + and now the CJK chars were shown correctly, but the 48 was positioned + wrong. But because of these different tests I think that it is still a + problem in ghostscript when using a mix of CJK fonts and "normal" + fonts. + BTW, also Acrobat X distiller has problems with the position of the + "48"! + + to 2.: + On my first tests with PDF which uses non embedded CJK fonts on + Windows + I got crashes. Reason for it was that GlobalParamWin returns + Helvetica, + which is not a CID font, but locateFont accepts here only CID + fonts and + therefore returns a NULL pointer. I first fixed that and then + decided to + return as default MS Mincho if a CID font is expected. + + poppler/PSOutputDev.cc | 203 + ++++++++++++++++++++++-------------------------- + 1 file changed, 92 insertions(+), 111 deletions(-) + +commit 61037a6de157e39331ae7a8b12ee5a115fd7e936 +Author: Adrian Johnson +Date: Sun Mar 4 17:40:40 2012 +1030 + + glib demo: fix typo + + glib/demo/selections.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit aff5b0a4f04c12ad7733aedbc9997367f5873aa1 +Author: Carlos Garcia Campos +Date: Sat Mar 3 20:10:17 2012 +0100 + + regtest: Ignore backends with no results when creating html report + + regtest/HTMLReport.py | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 9d28b8db3561845f4ca94c29479a259ceaf78bc5 +Author: Carlos Garcia Campos +Date: Sat Mar 3 14:42:51 2012 +0100 + + regtest: Add --pretty-diff option to create-report command + + It includes a pretty-diff link to make a bit easier to check + differences + in test results. For images it creates a html with javascript that + toggles actual and expected image, using the same code than WebKit + layout test results. For text files it uses HtmlDiff class from python + difflib. It's an option disabled by default because pretty diff + for text + files is very slow. + + regtest/HTMLReport.py | 128 + ++++++++++++++++++++++++++++++++++++- + regtest/commands/create-report.py | 4 ++ + 2 files changed, 129 insertions(+), 3 deletions(-) + +commit 670ea176495b8b580daba061840c914714bf422d +Author: Adrian Johnson +Date: Fri Mar 2 22:22:16 2012 +1030 + + pdffonts: list the encoding of each font + + Bug 46888 + + poppler/CMap.h | 2 ++ + poppler/FontInfo.cc | 3 +++ + poppler/FontInfo.h | 2 ++ + poppler/GfxFont.cc | 26 ++++++++++++++++++++++++++ + poppler/GfxFont.h | 4 ++++ + utils/pdffonts.1 | 3 +++ + utils/pdffonts.cc | 7 ++++--- + 7 files changed, 44 insertions(+), 3 deletions(-) + +commit 3ab6b5ebf3b6c0d59bcb2ec68eae1aa95cab1d0e +Author: William Bader +Date: Fri Mar 2 19:40:44 2012 +0100 + + Fix pdftops -passfonts regression + + This patch fixes pdftops -passfonts by using the new psFontPassthrough + variable + consistently and removing the old psSubstFonts and its setter and + getter in + GlobalParams. + + Bug 46744 + + poppler/GlobalParams.cc | 9 +-------- + poppler/GlobalParams.h | 4 +--- + utils/pdftops.cc | 10 +++++----- + 3 files changed, 7 insertions(+), 16 deletions(-) + +commit 6c1ee34424b1122c0a2222b776d8d475f7c555cd +Author: Adrian Johnson +Date: Fri Mar 2 18:41:58 2012 +1030 + + Update poppler copyright + + poppler/poppler-config.h.cmake | 2 +- + poppler/poppler-config.h.in | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit cdb1350d1e28cf3bceda75736ca91e13d193de84 +Author: Albert Astals Cid +Date: Thu Mar 1 18:58:02 2012 +0100 + + Increase versions + + CMakeLists.txt | 4 ++-- + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/CMakeLists.txt | 2 +- + qt4/src/Doxyfile | 2 +- + qt4/src/Makefile.am | 2 +- + 9 files changed, 10 insertions(+), 10 deletions(-) + +commit 2c9e6fa5b3bc6cd01618c3fb4f46533bfce97466 +Author: Albert Astals Cid +Date: Thu Mar 1 18:48:17 2012 +0100 + + 0.19.0 news file + + NEWS | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 48 insertions(+) + +commit 14f6abfcb83f91755e6de05cd33870934bba3cfb +Author: Albert Astals Cid +Date: Thu Mar 1 17:53:25 2012 +0100 + + Update copyrights + + goo/JpegWriter.cc | 2 +- + poppler/CairoFontEngine.cc | 1 + + poppler/CairoOutputDev.cc | 3 ++- + poppler/CairoOutputDev.h | 2 +- + poppler/CairoRescaleBox.cc | 15 +++++++++++++++ + poppler/FontInfo.cc | 2 +- + poppler/FontInfo.h | 1 + + poppler/Gfx.cc | 2 +- + poppler/GfxFont.cc | 1 + + poppler/GlobalParams.cc | 2 ++ + poppler/GlobalParams.h | 1 + + poppler/Lexer.cc | 1 + + poppler/NameToUnicodeTable.h | 2 +- + utils/ImageOutputDev.cc | 1 + + utils/ImageOutputDev.h | 1 + + utils/parseargs.cc | 1 + + utils/parseargs.h | 1 + + utils/pdffonts.cc | 1 + + utils/pdfimages.cc | 1 + + utils/pdftocairo.cc | 2 +- + utils/pdftoppm.cc | 2 +- + 21 files changed, 37 insertions(+), 8 deletions(-) + +commit e63ca8184168f824575be9bbb64e9b1eac1eff94 +Author: Adrian Johnson +Date: Thu Mar 1 21:46:12 2012 +1030 + + pdftocairo: document that -scale-to will preserve aspect ratio + + based on pdftpppm patch 7ec31b8dc40ec8a3534fbb89964aa011aeb81f5e + + utils/pdftocairo.1 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit fa82a7ce1372e5976ad95624115fcd7a4d9bd22c +Author: Adrian Johnson +Date: Thu Mar 1 21:43:32 2012 +1030 + + pdftocairo: allow one of -scale-to-[xy] = -1 to mean the aspect + ratio is to be preserved + + based on pdftoppm patch 38ace7db5de0b2b247fd520e48a8f26e5d28c9d7 + + utils/pdftocairo.1 | 8 ++++++-- + utils/pdftocairo.cc | 8 ++++++-- + 2 files changed, 12 insertions(+), 4 deletions(-) + +commit a2b008223ad6887f00d76c535f2b0b0f13f52b76 +Author: Adrian Johnson +Date: Tue Feb 28 21:38:19 2012 +1030 + + glib: add copy button to selections demo + + glib/demo/selections.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit b666d19308a043206e405c7e9d4ad709d68d331b +Author: Adrian Johnson +Date: Tue Feb 28 21:07:06 2012 +1030 + + glib: show substitute font name in demo + + glib/demo/fonts.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 18bc59fcf5a59b1fd51a631c02e900790c3a6dc0 +Author: Adrian Johnson +Date: Tue Feb 28 21:06:38 2012 +1030 + + glib: add poppler_fonts_iter_get_substitute_name + + glib/poppler-document.cc | 27 +++++++++++++++++++++++++++ + glib/poppler-document.h | 1 + + glib/reference/poppler-docs.sgml | 4 ++++ + glib/reference/poppler-sections.txt | 1 + + 4 files changed, 33 insertions(+) + +commit 4eaafe67de79fb63ebf61f031a97bbc0ed6a8891 +Author: Albert Astals Cid +Date: Wed Feb 29 23:22:34 2012 +0100 + + Change nnnnnn to number + + This way people won't expect it to be six fixed digits + Bug #46708 + + utils/pdftoppm.1 | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit aec6cb67951e56e4557a11c4fdf301e585268fe4 +Author: William Bader +Date: Wed Feb 29 23:18:16 2012 +0100 + + Fix stuff lost when merging xpdf303 + + restore the implementation of -binary + restore the fix that level2sep and level3sep must write cmyk instead + of rgb + restore the conversion of bitmaps with all gray to mono8 + fixed the CMYK misspelling in Stream. + + poppler/PSOutputDev.cc | 284 + ++++++++++++++++++++++++++++++++++++++++-------- + poppler/Stream.cc | 55 +++++++++- + poppler/Stream.h | 39 ++++++- + 3 files changed, 320 insertions(+), 58 deletions(-) + +commit e977925a1eb15083e6b020b31da77ddef9d5df02 +Author: William Bader +Date: Wed Feb 29 23:12:24 2012 +0100 + + Fix double alloc + + xpdf303 merge glitch + + poppler/PSOutputDev.cc | 1 - + 1 file changed, 1 deletion(-) + +commit e13efe04facdc10f3acffece3b057544f018f40c +Author: William Bader +Date: Wed Feb 29 23:10:43 2012 +0100 + + Fix memory leak + + Wrong merge from xpdf303 + + poppler/GfxState.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit adfc03e441b2a86dab5216dc560fd79343dfbe4f +Author: Hib Eris +Date: Wed Feb 29 21:10:56 2012 +0100 + + Only use Hints table when there are no parse errors + + Fixes bug #46459. + + poppler/Hints.cc | 6 ++++-- + poppler/Parser.cc | 30 ++++++++++++++++++++++++------ + poppler/Parser.h | 7 +++++-- + 3 files changed, 33 insertions(+), 10 deletions(-) + +commit 7ec31b8dc40ec8a3534fbb89964aa011aeb81f5e +Author: Adrian Johnson +Date: Mon Feb 27 21:15:39 2012 +1030 + + pdftoppm: document that -scale-to will preserve aspect ratio + + utils/pdftoppm.1 | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 38ace7db5de0b2b247fd520e48a8f26e5d28c9d7 +Author: Adrian Johnson +Date: Sat Feb 25 20:02:22 2012 +1030 + + pdftoppm: allow one of -scale-to-[xy] = -1 to mean the aspect ratio + is to be preserved + + bug 43393 + + utils/pdftoppm.1 | 8 ++++++-- + utils/pdftoppm.cc | 8 ++++++-- + 2 files changed, 12 insertions(+), 4 deletions(-) + +commit 738b879ebb536cc84d7ec96543d484023b69e6d3 +Author: Carlos Garcia Campos +Date: Sat Feb 25 20:53:58 2012 +0100 + + regtest: Add create-report command to generate html report of + test results + + regtest/HTMLReport.py | 197 + +++++++++++++++++++++++++++++++++++++ + regtest/backends/__init__.py | 20 +++- + regtest/commands/create-report.py | 57 +++++++++++ + 3 files changed, 273 insertions(+), 1 deletion(-) + +commit d5faabd509c2860ab199ee89b8ef9d4c14fa5118 +Author: Carlos Garcia Campos +Date: Sat Feb 25 20:50:53 2012 +0100 + + regtest: Use diff.png extension for image diff files + + So that they are recognized as images + + regtest/backends/__init__.py | 16 ++++++++++++++-- + regtest/backends/cairo.py | 2 +- + regtest/backends/splash.py | 2 +- + regtest/backends/text.py | 2 +- + 4 files changed, 17 insertions(+), 5 deletions(-) + +commit 2a5f1594a23cf521497f904b502fbadf56a9e780 +Author: William Bader +Date: Sat Feb 25 16:32:33 2012 +0100 + + Fix PSOutputDev regression with -level1 + + poppler/PSOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6a5deb0a86ad227cce3f85b1f58a9b86755cd812 +Author: Adrian Johnson +Date: Sat Feb 25 19:39:02 2012 +1030 + + autoconf: PKG_CHECK_EXISTS should not have the variable prefix in + the first argument + + configure.ac | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 8f4566c14a727fb75c4c353989cf5eb96516c2e3 +Author: Adrian Johnson +Date: Wed Feb 22 21:21:52 2012 +1030 + + autoconf: replace openjpeg compile test with a version test + + Now that openjpeg 1.5 is released and supports pkg-config the compile + test can be replaced with a pkg-config version check. + + configure.ac | 11 +++-------- + 1 file changed, 3 insertions(+), 8 deletions(-) + +commit 30f38bf425e2f76b3f6cc4c080137ac7219a9dbe +Author: Adrian Johnson +Date: Wed Feb 22 21:01:59 2012 +1030 + + autoconf: Use pkgconfig to check for libopenjpeg + + and if not found fallback to using AC_CHECK_LIB/AC_CHECK_HEADERS + + openjpeg >= 1.4 installs a pkgconfig file + + Bug 21789 + + configure.ac | 28 +++++++++++++++++----------- + 1 file changed, 17 insertions(+), 11 deletions(-) + +commit 466340d257ff0fe7e3a88a4e013e3feec3f7b70a +Author: Albert Astals Cid +Date: Thu Feb 23 23:47:15 2012 +0100 + + Combine UTF16 surrogate pairs + + Bug 46521 + + utils/HtmlOutputDev.cc | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +commit 675ef2bda3c4e06b39e2ba09b3b19d99cfb001b6 +Author: Oliver Sander +Date: Thu Feb 23 23:22:50 2012 +0100 + + Compile + + poppler/Stream.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 7705e65c231cc3af296bf19f5cba110cabb72e7d +Author: Albert Astals Cid +Date: Thu Feb 23 23:09:23 2012 +0100 + + Generate outlines in pdftohtml in -xml mode. + + Bug 56993 + + utils/HtmlOutputDev.cc | 130 + +++++++++++++++++++++++++++++++++++------------- + utils/HtmlOutputDev.h | 7 ++- + utils/pdf2xml.dtd | 7 ++- + utils/pdftohtml.cc | 5 +- + 4 files changed, 108 insertions(+), 41 deletions(-) + +commit 30446bdd7e202eed88d131e04477c76861fd145c +Author: Albert Astals Cid +Date: Thu Feb 23 22:56:17 2012 +0100 + + Use an Identity CharCodeToUnicode for Adobe-Identity and Adobe-UCS + collections + + Also fix Identity CharCodeToUnicode code + + Bug #35468 + + poppler/CharCodeToUnicode.cc | 18 +++++++++++++----- + poppler/CharCodeToUnicode.h | 7 +++++-- + poppler/GfxFont.cc | 13 +++++++------ + 3 files changed, 25 insertions(+), 13 deletions(-) + +commit 71104f1ec55d3be999afaa1b62405454b31066a9 +Author: Albert Astals Cid +Date: Thu Feb 23 19:34:57 2012 +0100 + + Remove unneded CharCodeToUnicode includes + + poppler/ArthurOutputDev.cc | 3 +-- + poppler/CairoFontEngine.cc | 3 +-- + poppler/CairoOutputDev.cc | 3 +-- + poppler/SplashOutputDev.cc | 3 +-- + 4 files changed, 4 insertions(+), 8 deletions(-) + +commit c0c8cc1592ee6aa13157e34f8083b951d487a413 +Author: Adrian Johnson +Date: Thu Feb 23 21:13:23 2012 +1030 + + glib docs: fix typo + + glib/poppler.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit fde3bed0f400a50f31f1f6bcee44ac1b2c17ddc6 +Author: Albert Astals Cid +Date: Wed Feb 22 00:03:37 2012 +0100 + + pdfinfo: decode utf-16 surrogate pairs + + Based on a patch by Adrian Johnson + Bug 23075 + + utils/pdfinfo.cc | 14 ++++++++++++-- + 1 file changed, 12 insertions(+), 2 deletions(-) + +commit 3361564364a1799fc3d6c6df9f208c5531c407dc +Author: Adrian Johnson +Date: Tue Feb 21 22:20:02 2012 +0100 + + Expand glyph name ligatures such as "ff", "ffi" etc to normal form + + Bug 7002 + + poppler/GfxFont.cc | 14 +++++++++++++- + poppler/UnicodeTypeTable.cc | 9 +++++++++ + poppler/UnicodeTypeTable.h | 3 +++ + 3 files changed, 25 insertions(+), 1 deletion(-) + +commit d0186c558f4a84a9317687ad50b460d34fb5fdf0 +Author: Pino Toscano +Date: Mon Feb 20 22:18:00 2012 +0100 + + cmake: support for lcms2 + + followup of e48c22d3b70412015b9cc07a9a6ce07845274e13 also for the + CMake build system, + importing the FindLCMS2.cmake from kdelibs + + CMakeLists.txt | 26 +++++++++++++-- + cmake/modules/FindLCMS2.cmake | 73 + +++++++++++++++++++++++++++++++++++++++++ + config.h.cmake | 3 ++ + utils/CMakeLists.txt | 3 ++ + 4 files changed, 102 insertions(+), 3 deletions(-) + +commit e48c22d3b70412015b9cc07a9a6ce07845274e13 +Author: Koji Otani +Date: Mon Feb 20 22:04:01 2012 +0100 + + Add support for lcms2 + + configure.ac | 24 ++++++- + poppler/GfxState.cc | 159 + +++++++++++++++++++++++++++---------------- + qt4/src/poppler-document.cc | 5 ++ + utils/pdftocairo.cc | 17 +++++ + 4 files changed, 143 insertions(+), 62 deletions(-) + +commit 1bcae7aa8f87cc85ee6b477bf0abb49452e46505 +Author: Igor Slepchin +Date: Sun Feb 19 23:40:50 2012 +0100 + + Consistently check if pdftohtml needs to generate outlines. + + utils/pdftohtml.cc | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +commit 126bf08105e319f9216654782e5a63f99f1d1825 +Author: Albert Astals Cid +Date: Sun Feb 19 23:18:25 2012 +0100 + + Update glyph names to Unicode values mapping + + Added Zapf Dingbat names and fixed copyrightsans, copyrightserif, + registersans, registerserif, trademarksans, trademarkserif + Kudos to Adrian Johnson for find what was missing :-) + Bug #13131 + + poppler/NameToUnicodeTable.h | 213 + ++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 207 insertions(+), 6 deletions(-) + +commit c0fec84312a37f62bdbfdee7c8e9b520af28330a +Author: Pino Toscano +Date: Sun Feb 19 14:47:24 2012 +0100 + + fix typo, GString -> GooString + + goo/GooString.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit aaae8996766f259dcc329755c7cccde7c916c1fb +Author: Adrian Johnson +Date: Thu Feb 16 22:22:15 2012 +1030 + + cairo: set mask matrix before drawing an image with a mask + + Bug 40828 + + poppler/CairoOutputDev.cc | 1 + + 1 file changed, 1 insertion(+) + +commit fff439f25d9bbd199db5646deccd80733138898e +Author: Adrian Johnson +Date: Sun Feb 19 15:45:31 2012 +1030 + + update .gitignore + + utils/.gitignore | 1 + + 1 file changed, 1 insertion(+) + +commit 1cc3e152d6e879eb13fbdf2964ede3e01d13d097 +Author: Adrian Johnson +Date: Sun Feb 19 15:43:09 2012 +1030 + + glib docs: fix typo + + glib/poppler-page.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 4f4db591276ec156c55b3a3c2020a1cf82f1519b +Author: Adrian Johnson +Date: Sun Feb 19 15:37:04 2012 +1030 + + cairo: fix pdftocairo crash when pdf document uses actualText + + poppler/CairoOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9b72ee4e4c8658b2f7cd542d601a5c3be621d3fc +Author: Thomas Freitag +Date: Sat Feb 18 17:34:12 2012 +0100 + + Make some of the unfilteredResets be really unfiltered + + poppler/Stream.cc | 26 ++++++++++++++++++++------ + poppler/Stream.h | 3 +++ + 2 files changed, 23 insertions(+), 6 deletions(-) + +commit 33aded82fbd98832eaab7cb7487fe6a1c7ef15f5 +Author: Albert Astals Cid +Date: Sat Feb 18 17:21:10 2012 +0100 + + Rework XRef getNumObjects and getSize + + Kill XRef::last since we do not maintain it correctly, now + getNumObjects returns size as it did + Kill getSize as it just returns the same as getNumObjects + + poppler/PDFDoc.cc | 10 +++++----- + poppler/XRef.cc | 12 +----------- + poppler/XRef.h | 6 ++---- + 3 files changed, 8 insertions(+), 20 deletions(-) + +commit 521d3740e9b7d2cfacf29f089a4a8f6c962de807 +Author: Adrian Johnson +Date: Mon Feb 13 22:05:18 2012 +1030 + + pdfimages: add -list option to list all images + + Bug 46066 + + utils/ImageOutputDev.cc | 204 + +++++++++++++++++++++++++++++++++++++++++------ + utils/ImageOutputDev.h | 20 ++++- + utils/pdfimages.1 | 101 +++++++++++++++++++++++ + utils/pdfimages.cc | 12 ++- + 4 files changed, 307 insertions(+), 30 deletions(-) + +commit 119b6b752314c9b13440eddf5bd1d5cef2966e80 +Author: Adrian Johnson +Date: Mon Feb 6 16:50:11 2012 +1030 + + cairo: don't read inline image streams twice + + Bug 45668 + + poppler/CairoOutputDev.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit a76135391555145ec740d49a7141e60da0ea5dee +Author: Hib Eris +Date: Tue Feb 14 20:11:19 2012 +0100 + + Add a configuration option for the test data dir + + This makes 'make distcheck' run succesfully. + + CMakeLists.txt | 20 +++++++++++++++++++ + Makefile.am | 2 +- + configure.ac | 42 + +++++++++++++++++++++++++++++++++++++++ + qt4/tests/CMakeLists.txt | 1 + + qt4/tests/Makefile.am | 1 + + qt4/tests/check_actualtext.cpp | 2 +- + qt4/tests/check_attachments.cpp | 14 ++++++------- + qt4/tests/check_fonts.cpp | 18 ++++++++--------- + qt4/tests/check_links.cpp | 6 +++--- + qt4/tests/check_metadata.cpp | 32 ++++++++++++++--------------- + qt4/tests/check_optcontent.cpp | 12 +++++------ + qt4/tests/check_pagelayout.cpp | 6 +++--- + qt4/tests/check_pagemode.cpp | 10 +++++----- + qt4/tests/check_password.cpp | 12 +++++------ + qt4/tests/check_permissions.cpp | 2 +- + qt4/tests/check_search.cpp | 4 ++-- + 16 files changed, 124 insertions(+), 60 deletions(-) + +commit 59946e0c34e762eb5f5a13b4ae8c9ec7fb21379a +Author: Thomas Freitag +Date: Tue Feb 14 19:37:21 2012 +0100 + + Overprint implementation in postscript and splash device + + It is an enhancement patch, a + merge fix and a bug fix in one: an enhancement, because it now + completes + the implementation overprint mode and devicen in postscript, a merge + fix, because it fixes some bugs in the overprint implementation in + splash of xpdf 3.0.3 and has now the complete functionality (and + more!) + of my implementation back again and a bug fix, because it fixes + the use + of splash cmyk in postscript which never had worked. + + 1. Overprint implementation in postscript + To have a complete overprint implementation in the (pure) postscript + device there were just two things missing: overprint mode and the + implementation of the DeviceN colorspace in PostScript. I double + checked + my implementation with the Ghent Test Suite with GhostScript (device + pdfwrite) and Acrobat X distiller, and all the tests now succeeds, + either in Acrobat X distiller or in GhostScript. As overprint is a + device dependent feature, it is up to the output device if it supports + overprint and what features of overprint are supported, and often You + have various configuration possibilities there. Nearly all PostScript + output of the Ghent tests show now the desired results if converting + it + back to PDF with ghostscript pdfwrite, the implementation in + ghostscript + is complete. On the other hand a few tests failed when using Acrobat X + distiller, all of them with the overprint mode switch. Funny, because + overprint mode 1 is often also called the illustrator overprint mode + because it was introduced by illustrator, but probably the destiller + only handles EPS correctly which comes from illustrator + + 2. Overprint implementation in postscript if using splash + rasterization + Of course the postscript overprint implementation will only work if + pdftops doesn't decide to use splash to rasterize it because of + the use + of transparencies in the PDF. But because overprint is device + dependent + I decided to spend an additional parameter "overprint" to pdftops + (simular to pdftoppm). Switching it on (only available if compiled + with + SPLASH_CMYK, because overprint is only in CMYK colorspace showable) + will + use the overprint implementation in splash also if rasterizing + the PDF. + + 3. Overprint implementation in splash + The overprint implementation in splash now uses the better designed + interface of xpdf and therefore now also works in transparency groups. + Thanks to the developper team of xpdf. I just fixed a small bug in it, + where it defies the technical specification. Of course it is still in + the nature of the splash implementation that it fails if CMYK values + should overprint spot colors, because spot colors are converted + immediately in their CMYK alternates. And in the implementation of + overprinting spot colors over CMYK colors I made a small assumption to + get it running which causes undesired results if this assumption + fails, + but I didn't want to implement more and more configuration switches. I + still plan to implement a DeviceN output in splash and make a complete + implementation there, but this is of course a bigger task (but + doable). + The overprint switch in pdftoppm is still only available if compiled + with the SPLASH_CMYK directive. + + poppler/PSOutputDev.cc | 67 ++++++++++-- + poppler/PSOutputDev.h | 3 +- + poppler/SplashOutputDev.cc | 62 +++++++++-- + poppler/SplashOutputDev.h | 4 +- + splash/Splash.cc | 70 +++++++++---- + splash/Splash.h | 4 +- + splash/SplashState.cc | 5 +- + splash/SplashState.h | 247 + ++++++++++++++++++++++---------------------- + utils/pdftops.cc | 13 +++ + 9 files changed, 308 insertions(+), 167 deletions(-) + +commit b505920db6d3dac58c7e9f4f8917f4c4449b08a0 +Merge: 9250449 a631281 +Author: Albert Astals Cid +Date: Tue Feb 14 19:18:54 2012 +0100 + + Merge remote-tracking branch 'origin/xpdf303merge' + + Conflicts: + utils/HtmlOutputDev.cc + utils/HtmlOutputDev.h + +commit 9250449aaa279840d789b3a7cef75d06a0fd88e7 +Author: Hib Eris +Date: Sun Feb 12 23:16:41 2012 +0100 + + Improve moc detection when cross compiling + + configure.ac | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 66cf1fdb3ba6894f61d9078f5c30046b464347ae +Author: Pino Toscano +Date: Sun Feb 12 22:27:58 2012 +0100 + + qt4: remove non-existing 'qt' include dirs + + qt4/demos/Makefile.am | 1 - + qt4/src/Makefile.am | 1 - + qt4/tests/Makefile.am | 1 - + 3 files changed, 3 deletions(-) + +commit 53d8fc4d2978b70e8926e3df71facd1f39de9348 +Author: Pino Toscano +Date: Sun Feb 12 17:36:55 2012 +0100 + + man pages: fix minor issues with hypens and % + + utils/pdfseparate.1 | 6 +++--- + utils/pdftocairo.1 | 4 ++-- + 2 files changed, 5 insertions(+), 5 deletions(-) + +commit a63128179c65b5d9d6d9d41fa601a593b0a05d94 +Author: Thomas Freitag +Date: Thu Feb 9 22:02:52 2012 +0100 + + [xpdf303] Fix merge issue + + utils/pdftoppm.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit cd5a6a4d02e579e543067d1847164aff90363f16 +Author: Thomas Freitag +Date: Thu Feb 9 22:01:42 2012 +0100 + + [xpdf303] Fix merge bug + + poppler/GfxState.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 597fa37cacec928c40d0491174ce843fe01f26d9 +Author: Igor Slepchin +Date: Wed Feb 8 19:22:13 2012 -0500 + + Close li tags in generated outlines. + + Also, add newlines after ul tags for better readability. + Bug #45807 + (cherry picked from commit bf81250ff7d0968852fc7559fafb6389cd695b91) + + utils/HtmlOutputDev.cc | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit 2fc36dba5f63703896722adb5127896e4c2840e7 +Author: Igor Slepchin +Date: Thu Feb 9 00:15:13 2012 +0100 + + Get rid of static data members; merge duplicated jpeg dumping code. + + HtmlPage::pgNum is never used; + imgNum is always equal to imgList->getLength()+1 + imgList is now maintained in HtmlPage. + + utils/HtmlOutputDev.cc | 143 + +++++++++++++++++++----------------------------- + utils/HtmlOutputDev.h | 15 +++-- + 2 files changed, 65 insertions(+), 93 deletions(-) + +commit f655efe327ddd3b6a68353a62589d4e4f8a318a8 +Author: Albert Astals Cid +Date: Wed Feb 8 23:58:27 2012 +0100 + + Fix memory leak when using HtmlOutputDev::mapEncodingToHtml + + Bug #45805 + (cherry picked from commit 53a0c2043dfd56f6da7780f1a049f75af368b84b) + + utils/HtmlOutputDev.cc | 47 + ++++++++++++++++++++++++----------------------- + utils/HtmlOutputDev.h | 7 ++++--- + 2 files changed, 28 insertions(+), 26 deletions(-) + +commit 68f02d19c571fce956c7f4af6ccd0ff9ba8b1b03 +Author: Albert Astals Cid +Date: Wed Feb 8 23:47:46 2012 +0100 + + Fix leak in pdftohtml getInfoString + + Bug #45805 + (cherry picked from commit 4afe4d827a342a847e8b89aba5b4164ed3b4cc32) + + utils/pdftohtml.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit 2b7ba166c28e32653db4ae7acf90e06e0dd5975b +Author: Albert Astals Cid +Date: Wed Feb 8 19:12:52 2012 +0100 + + [xpdf303] Compile fixes + + poppler/GlobalParamsWin.cc | 2 +- + poppler/SplashOutputDev.cc | 10 ---------- + 2 files changed, 1 insertion(+), 11 deletions(-) + +commit b8c9b179c9491cf6755b07bfdec4174e78b7d241 +Author: Albert Astals Cid +Date: Mon Feb 6 19:55:07 2012 +0100 + + [xpdf303] Adapt better to what we did and what xpdf303 does + + poppler/ArthurOutputDev.cc | 1 - + poppler/GlobalParams.cc | 10 ---------- + poppler/GlobalParams.h | 1 - + poppler/SplashOutputDev.cc | 3 --- + poppler/SplashOutputDev.h | 1 - + splash/SplashFTFont.cc | 40 + +++++++++++++++++++--------------------- + splash/SplashFTFont.h | 1 - + splash/SplashFTFontEngine.cc | 7 +++---- + splash/SplashFTFontEngine.h | 5 ++--- + splash/SplashFontEngine.cc | 3 +-- + splash/SplashFontEngine.h | 1 - + utils/pdftoppm.cc | 2 +- + 12 files changed, 26 insertions(+), 49 deletions(-) + +commit ea6bc19564865e04431d9154802ae7fba975a716 +Merge: e17f095 92ce79f +Author: Albert Astals Cid +Date: Mon Feb 6 01:18:25 2012 +0100 + + Merge branch 'master' into xpdf303merge + + Conflicts: + poppler/CairoOutputDev.cc + poppler/CairoOutputDev.h + poppler/FontInfo.cc + poppler/GfxFont.cc + poppler/GfxState.cc + poppler/GlobalParams.cc + poppler/GlobalParams.h + poppler/Lexer.cc + +commit e17f09563276ee25b6acfc127b6ea360da650030 +Author: Albert Astals Cid +Date: Mon Feb 6 00:25:53 2012 +0100 + + [xpdf303] TextOutputDev and associated changes + + cpp/poppler-page.cpp | 10 +- + glib/poppler-page.cc | 5 +- + poppler/ArthurOutputDev.cc | 1 + + poppler/CairoOutputDev.cc | 2 +- + poppler/Gfx.cc | 6 +- + poppler/PSOutputDev.cc | 6 +- + poppler/TextOutputDev.cc | 360 + +++++++++++++++++++++++++++----------------- + poppler/TextOutputDev.h | 18 ++- + qt4/src/poppler-page.cc | 12 +- + test/perf-test.cc | 2 +- + utils/pdftotext.1 | 4 + + utils/pdftotext.cc | 10 +- + 12 files changed, 270 insertions(+), 166 deletions(-) + +commit 548648bf29dc1551443eb1925814342e7aadee46 +Author: Albert Astals Cid +Date: Sun Feb 5 23:08:44 2012 +0100 + + [xpdf303] Merge PDFDoc encryption related code + + poppler/PDFDoc.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 6ee907f291427b8751a872b31210bf32e8d2b722 +Author: Albert Astals Cid +Date: Sun Feb 5 22:57:25 2012 +0100 + + [xpdf303] More merges from Thomas, basically PSOutputDev and some + other small stuff + + poppler/GfxFont.cc | 4 +- + poppler/GlobalParams.cc | 95 ++- + poppler/GlobalParams.h | 18 +- + poppler/GlobalParamsWin.cc | 16 +- + poppler/Hints.cc | 2 +- + poppler/PSOutputDev.cc | 1814 + ++++++++++++++++++++++--------------------- + poppler/PSOutputDev.h | 51 +- + poppler/Parser.cc | 13 +- + poppler/Parser.h | 7 +- + poppler/PreScanOutputDev.cc | 70 +- + poppler/PreScanOutputDev.h | 16 +- + poppler/XRef.cc | 91 ++- + poppler/XRef.h | 3 +- + utils/pdftops.cc | 2 +- + 14 files changed, 1231 insertions(+), 971 deletions(-) + +commit 92ce79f47f929392f48737612a9690088573f63d +Author: Igor Slepchin +Date: Sun Feb 5 15:55:39 2012 +0100 + + Proper unicode support when dumping PDF outline. + + Also use of already existing Outline class rather than parsing the + outline anew. + + Bug 45572 + (cherry picked from commit 40f7289ab04787734b856c53d5c0139445b52635) + + Conflicts: + + utils/HtmlOutputDev.cc + + utils/HtmlOutputDev.cc | 197 + ++++++++++++++++++++++++++---------------------- + utils/HtmlOutputDev.h | 6 +- + utils/pdftohtml.cc | 3 +- + 3 files changed, 112 insertions(+), 94 deletions(-) + +commit 38ec58ed1cb54722aece875287b847643aa2c4b8 +Author: Adrian Johnson +Date: Sat Feb 4 17:13:30 2012 +1030 + + Lexer: convert integer to real when overflow occurs + + Bug 45605 + + poppler/Lexer.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit df89de61b7d01f0f816e773cdb809faa3053e962 +Author: Hib Eris +Date: Tue Jan 31 20:01:30 2012 +0100 + + glib: Exclude poppler-private.h from introspection files + + Fixes bug #45455. + + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit 88cb6d9360bc943fc2cdda262dc46bf831641541 +Author: Carlos Garcia Campos +Date: Sat Feb 4 12:04:03 2012 +0100 + + glib: Update gtk-doc makefile and m4 file + + gtk-doc.make | 112 + ++++++++++++++++++++++++++++++++------------------------- + m4/gtk-doc.m4 | 6 ++++ + 2 files changed, 70 insertions(+), 48 deletions(-) + +commit 3f4164f84bbf748a2f919741669ef20db0fbda9f +Author: Hib Eris +Date: Wed Feb 1 10:44:17 2012 +0100 + + gtk-doc: Fix build when builddir != srcdir + + Bug #45549. + + glib/reference/Makefile.am | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 8daeb82f982eba25fe8c7d07358f0a6593ddc89a +Author: Hib Eris +Date: Thu Feb 2 13:01:45 2012 +0100 + + gtk-doc: Fix API documentation for poppler_page_free_annot_mapping() + + Remove reference to non existent method poppler_annot_free() and use + ref/unref instead of copy/free. + + Bug #45549. + + glib/poppler-page.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit f8ce9966e4f480949799a26c01bd861f4011b587 +Author: Carlos Garcia Campos +Date: Sat Feb 4 11:51:34 2012 +0100 + + gtk-doc: Remove reference to non existent method poppler_layer_free() + + Bug #45549. + + glib/poppler-document.cc | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +commit f58f3525f135bc47e89c23c33e96e43db10d4853 +Author: Hib Eris +Date: Thu Feb 2 15:59:47 2012 +0100 + + gtk-doc: Add more glib API documentation for poppler-document + + Fixes several gtk-doc warnings. + + Bug #45549. + + glib/poppler-document.h | 26 +++++++++++++------------- + 1 file changed, 13 insertions(+), 13 deletions(-) + +commit 080247f6a47bc929b25f6e000f4474801af74b1f +Author: Hib Eris +Date: Thu Feb 2 15:45:37 2012 +0100 + + gtk-doc: remove references to removed pixbuf functions + + Bug #45549. + + glib/poppler-page.cc | 6 ++---- + glib/reference/poppler-sections.txt | 4 ---- + 2 files changed, 2 insertions(+), 8 deletions(-) + +commit 47780d9ed1fd69068fdb9b9782e2cb37e2a5b217 +Author: Hib Eris +Date: Thu Feb 2 15:43:30 2012 +0100 + + gtk-doc: do not build doc for glib-demo + + Fixes glib-demo symbols in poppler-unused.txt + + Bug #45549. + + glib/reference/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e320f335cc6e54c60bd2436799dd1f05beb060ba +Author: Hib Eris +Date: Sat Feb 4 11:32:50 2012 +0100 + + gtk-doc: Fix typo's + + Bug #45549. + + glib/poppler-annot.cc | 6 +++--- + glib/poppler-annot.h | 2 +- + glib/poppler-document.cc | 2 +- + glib/poppler-media.cc | 2 +- + glib/poppler-page.cc | 3 +-- + glib/poppler-page.h | 4 ++-- + glib/reference/poppler-sections.txt | 4 +++- + 7 files changed, 12 insertions(+), 11 deletions(-) + +commit 1fe27b07975e9a9455708563118fb73cce696f81 +Author: Hib Eris +Date: Tue Jan 31 12:49:01 2012 +0100 + + cairo: Remove unused variable in CairoFontEngine.cc + + Fixes bug #45442. + + poppler/CairoFontEngine.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit e3d80c79815ce46daf3c3f2b944f49eaf19bfea5 +Author: Hib Eris +Date: Tue Jan 31 14:42:04 2012 +0100 + + Fix return value of downscale_box_filter() + + Fixes bug #45441. + + poppler/CairoRescaleBox.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e074e526fa206403b84da5ce0f27d7357223c7ac +Author: Hib Eris +Date: Tue Jan 31 13:02:16 2012 +0100 + + Fix return value of poppler_attachment_save + + Fixes bug #45440. + + glib/poppler-attachment.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit bc389cff91c350d7da186d4cf707c389c77bbc29 +Author: Hib Eris +Date: Tue Jan 31 14:03:08 2012 +0100 + + glib-demo: Do not use deprecated gtk_dialog_set_has_separator() + + Bug #45439 + + glib/demo/main.c | 2 ++ + 1 file changed, 2 insertions(+) + +commit e52e3c24663edaa630d9187e832223b474b74089 +Author: Hib Eris +Date: Tue Jan 31 13:39:05 2012 +0100 + + glib-demo: Do not use deprecated GtkComboBox API + + Bug #45439. + + glib/demo/annots.c | 6 ++++++ + glib/demo/print.c | 9 ++++++++- + glib/demo/render.c | 16 ++++++++++++++++ + glib/demo/selections.c | 8 ++++++++ + 4 files changed, 38 insertions(+), 1 deletion(-) + +commit 165ab4ec122d0e1a6f30dcfba80aefc422cd83b7 +Author: Hib Eris +Date: Tue Jan 31 12:15:51 2012 +0100 + + Fix build for builddir != srcdir + + Fixes bug #45434. + + glib/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit e424a13bb516464d59ad76fd0933e92f3307b21b +Author: Thomas Freitag +Date: Fri Feb 3 00:12:10 2012 +0100 + + pdfseparate fixes by Thomas after his last commit + + poppler/PDFDoc.cc | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 4fcd42cfa4424992cd4b36af38bc6230ce0706c9 +Author: Albert Astals Cid +Date: Wed Feb 1 22:53:03 2012 +0100 + + [xpdf303] More merges from Thomas (with minor fixes from me) + + Basically fonts related and some other small stuff + + poppler/Annot.cc | 6 +- + poppler/ArthurOutputDev.cc | 47 +-- + poppler/CMap.cc | 153 ++++++++ + poppler/CMap.h | 16 + + poppler/CairoFontEngine.cc | 43 +-- + poppler/CharCodeToUnicode.h | 1 + + poppler/FontInfo.cc | 8 +- + poppler/Gfx.cc | 363 +++++++++++-------- + poppler/GfxFont.cc | 831 + +++++++++++++++++++++++++++++-------------- + poppler/GfxFont.h | 34 +- + poppler/GfxState.cc | 81 +++-- + poppler/GfxState.h | 2 + + poppler/GlobalParams.cc | 738 ++++++++++++++++++++++---------------- + poppler/GlobalParams.h | 112 +++--- + poppler/GlobalParamsWin.cc | 180 ++++++++-- + poppler/PSOutputDev.cc | 591 +++++++++++++++--------------- + poppler/PSOutputDev.h | 12 +- + poppler/PreScanOutputDev.cc | 10 +- + poppler/SplashOutputDev.cc | 59 ++- + poppler/XRef.cc | 16 +- + 20 files changed, 2008 insertions(+), 1295 deletions(-) + +commit 0089357de8ea96f3e394ea9cb37e8182ccf15ae2 +Author: Thomas Freitag +Date: Wed Feb 1 19:17:38 2012 +0100 + + pdfseparate: Produce PDF/X conformant pdf pages if the original PDF + was PDF/X conformant. + + poppler/PDFDoc.cc | 63 + +++++++++++++++++++++++++++++++++-------------------- + poppler/XRef.cc | 9 +++++++- + poppler/XRef.h | 5 ++++- + 3 files changed, 51 insertions(+), 26 deletions(-) + +commit be62a4f2e7d5db3b6d85d1b3026979f9561e6e15 +Author: Hib Eris +Date: Mon Jan 30 17:07:28 2012 +0100 + + Fix build with latest mingw-w64 headers + + Fixes bug #45407. + (cherry picked from commit 58c17c3a61f18a6808ec9ba37e82734a655090ac) + + glib/poppler-annot.cc | 1 + + glib/poppler-document.cc | 1 + + 2 files changed, 2 insertions(+) + +commit acbc63348ce5e279e4d66ed4f240dc8d61df4e57 +Author: Suzuki Toshiya +Date: Mon Jan 30 20:46:04 2012 +1030 + + pdftocairo/automake: link with lcms + + utils/Makefile.am | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 9548573a16629fecdbd44c9aac8b626ec6f53b81 +Author: Pino Toscano +Date: Mon Jan 30 00:32:52 2012 +0100 + + glib/cmake: various minor introspection improvements + + "port" to CMake of the automake equivalents of + 4765c3289635fe4fb006e7df4f83d7056eb42855 + + glib/CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) + +commit bf2ffb1cc76bcf569419ac495f524c41bb6f1650 +Author: Pino Toscano +Date: Mon Jan 30 00:21:31 2012 +0100 + + cmake: support $(gir_name)_EXPORT_PACKAGES for g-ir-scanner + + cmake/modules/GObjectIntrospectionMacros.cmake | 2 ++ + 1 file changed, 2 insertions(+) + +commit cbe7131e63c5896010e7e1ad5c0c3aa91611704d +Author: Albert Astals Cid +Date: Fri Jan 27 00:36:18 2012 +0100 + + Set OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG if you have it + + Fixes/workarounds bug 43414 with openjpeg 1.5 (unreleased) + (cherry picked from commit de6415af1a39ec7dfa4f149c6c5e311b86352cec) + + cmake/modules/FindLIBOPENJPEG.cmake | 13 +++++++++++++ + config.h.cmake | 3 +++ + configure.ac | 8 ++++++++ + poppler/JPEG2000Stream.cc | 7 ++++++- + 4 files changed, 30 insertions(+), 1 deletion(-) + +commit 641526d1a7e8032ea8f7b8ac42c5ad8c20448d9b +Author: Adrian Johnson +Date: Wed Jan 25 22:44:27 2012 +1030 + + jpeg: set image parameters after jpeg_set_defaults() + + so the resolution does not get overwritten by the defaults. + + The libjpeg documentation for jpeg_set_defaults() states: "This + routine sets all JPEG parameters to reasonable defaults, using only + the input image's color space (field in_color_space, which must + already be set in cinfo)" + + Bug 45224 + + goo/JpegWriter.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit f7356a88fe983c2ddd7d5a50400768310a26c4d2 +Author: Adrian Johnson +Date: Thu Jan 26 11:33:28 2012 +1030 + + glib: add section in docs for new symbols in 0.18 + + glib/reference/poppler-docs.sgml | 4 ++++ + 1 file changed, 4 insertions(+) + +commit b42c171de93dba56859beb21cfe5312d825fedd6 +Author: Alexander Saprykin +Date: Mon Jan 23 22:07:15 2012 +0100 + + Do not use 50Kb of stack in SplashXPath::addCurve + + Bug 44905 + + splash/SplashXPath.cc | 69 + +++++++++++++++++++++++++++++++++++-------------- + 1 file changed, 49 insertions(+), 20 deletions(-) + +commit a04fca6266bda6d04068f38f16fe492cb6b8677b +Author: Adrian Johnson +Date: Sat Jan 21 09:41:12 2012 +1030 + + cairo: use fabs when comparing the transformed line width + + as the transform may cause a negative width. + + Bug 43441 + + poppler/CairoOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ce1b6c7ca16847f07eeafc29c6503be6fa5a9a3d +Author: Patrick Pfeifer +Date: Thu Jan 19 14:54:48 2012 +0100 + + cairo: Fix test for rotation + + Fixes bug #14619. + + poppler/CairoOutputDev.cc | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 4765c3289635fe4fb006e7df4f83d7056eb42855 +Author: Evan Nemerson +Date: Sun Jan 15 11:02:50 2012 -0800 + + glib: various minor introspection and documentation improvements + + Bug 44790 + + glib/Makefile.am | 4 +++- + glib/poppler-annot.cc | 8 ++++---- + glib/poppler-attachment.h | 7 ++++--- + glib/poppler-document.cc | 6 ++++-- + glib/poppler-media.h | 7 ++++--- + glib/poppler-page.cc | 23 +++++++++++++++-------- + 6 files changed, 34 insertions(+), 21 deletions(-) + +commit e8e42988c5cebab2ffa5fe020f30a3a645e90b5f +Author: Adrian Johnson +Date: Mon Jan 16 21:25:19 2012 +1030 + + cairo: ensure paintTransparencyGroup uses same ctm as + beginTransparencyGroup + + Bug 29968 + + poppler/CairoOutputDev.cc | 8 ++++++-- + poppler/CairoOutputDev.h | 1 + + 2 files changed, 7 insertions(+), 2 deletions(-) + +commit f6c7aa752f9455bba1aa3c72e0998e7911c1d43e +Author: Adrian Johnson +Date: Wed Jan 18 21:19:43 2012 +1030 + + configure.ac: print the glib version required if not found + + configure.ac | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +commit 100488ec7db2d1f3e25bfda42c1603ca86696195 +Author: Adrian Johnson +Date: Sun Jan 15 23:52:28 2012 +1030 + + cairo: restore temporary clip used in CairoOutputDev::fill when + painting a mask + + The clip is only used to clip the paint to the fill path so it should + be moved inside the save/restore. + + poppler/CairoOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9c092e17e8f0cf0335b431a223e6e44bddc27e64 +Author: Albert Astals Cid +Date: Sun Jan 15 23:28:51 2012 +0100 + + [xpdf] More Splash and Gfx changes from Thomas + + 1. merge of blend changes + Here I had not only merged the changed in blend modes, I made also + a few + changes in the SPLASH_CMYK area, so that the already sent PDF now also + be rendered correctly with the -jpegcmyk option + 2. merge of font handling in SplashOutputDev.cc + There were a few changes left in font handling, I took them over + 3. merge of getcolor-changes + The getcolor changes win a price for well defined C++ code. I wouldn't + have merged them, if there were not a lot of other things to merge. + 4. merge of image handling in SplashOutputDev.cc + I merged the left changes in image handling including colorizing masks + in pattern colorspace + 5. cleanup of overprint + I tested the overprint implementation of Derek. They succeed only + in 70 + % percent of the PDF where my solution had success, but Derek's + solution + is much cleaner, and I'm sure that I could also fix the rest in + it. BUT: + as I already considered, when I implemented overprint, there are some + overprint situations, which can not be solved in a CMYK colorspace, we + have to implement a DeviceN colorpace when also overprint from CMYK + colors over spot colors should work. Therefore I decided to remove my + overprint implementation completely from the code and let Derek's + solution in, even if there could be done some enhancements in it. + 6. colorizing text in pattern colorspace + When I saw Derek's implementation with a clean interface only at one + place in Gfx.cc, I first was very surprised. My solution had a lot of + places in Gfx.cc, where I looked if the current colorspace is + a pattern + colorspace. Therefore I first had a look into the PDF specification + again, and really, it can be done in the way of Derek. Therefore I + merged it and removed the fragments of my code. + + On this step I started a regtest against the version after the fourth + patch. There were a lot of enhancements, especially in texts with + symbolic chars like mathematical and so on, but there was one + (and ONLY + one) regression, shown in bug-poppler27482.pdf + I examined that (that is also the reason for the delay) and + encountered + that on merging I removed my solution for this bug, therefore + + 7. insert enhancements for colorizing masks in pattern colorspace + I adapt the bug fix from bug 27482 to the merge. + + poppler/CairoOutputDev.cc | 101 ++-- + poppler/CairoOutputDev.h | 21 +- + poppler/Gfx.cc | 705 +++++++++++++++----------- + poppler/Gfx.h | 22 +- + poppler/GfxState.cc | 208 +++++--- + poppler/GfxState.h | 37 +- + poppler/GlobalParams.cc | 17 + + poppler/GlobalParams.h | 3 + + poppler/OutputDev.cc | 13 +- + poppler/OutputDev.h | 25 +- + poppler/PSOutputDev.cc | 87 ++-- + poppler/PSOutputDev.h | 21 +- + poppler/PreScanOutputDev.cc | 2 +- + poppler/SplashOutputDev.cc | 1179 + +++++++++++++++++++++---------------------- + poppler/SplashOutputDev.h | 80 +-- + poppler/TextOutputDev.cc | 8 + + poppler/TextOutputDev.h | 8 + + splash/Splash.cc | 11 +- + splash/Splash.h | 122 ++--- + splash/SplashPattern.cc | 14 - + splash/SplashPattern.h | 7 - + utils/pdftoppm.cc | 1 + + 22 files changed, 1390 insertions(+), 1302 deletions(-) + +commit 69df13c49cea2390f2c5036f3d450f134f7a2656 +Author: Thomas Freitag +Date: Sun Jan 15 15:07:18 2012 +0100 + + Fix stack overflow in PDFDoc::markObject() + + Bug 44660 + + poppler/PDFDoc.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit cdb56567c60b492ad08befff54f2ff70620b86fe +Author: Thomas Freitag +Date: Sun Jan 15 15:04:51 2012 +0100 + + Correctly initialize globalParams + + utils/pdfseparate.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 4e205a6625431dcf95375de009b4354746a4f0b7 +Author: Adrian Johnson +Date: Sun Jan 15 22:18:30 2012 +1030 + + parseargs: don't use arg->size with GooString argument + + 40b56994 added GooString arguments but incorrectly used arg->size as + the string length. arg->size is always 0 for GooString arguments. This + worked because the arg->size - 1 string length passed to + GooString::Set() just happened to be the the same value as the + CALC_STRING_LEN default argument indicating the string length is to be + calculated with strlen. + + utils/parseargs.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +commit a7210a7ebc3d3ca88643bfbc2f0d660a5553a668 +Author: Arseny Solokha +Date: Fri Jan 13 18:52:17 2012 +0100 + + Properly initialize globalParams + + Bug 44659 + + utils/pdfunite.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit baaf93f0e47a1978f9ea80e9394543a25b763d77 +Author: Adrian Johnson +Date: Thu Jan 12 01:05:07 2012 +1030 + + configure.ac: print the cairo version required if not found + + Bug 44619 + + configure.ac | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit 9b8b4232587831fdada37de033c272a3c5049c34 +Author: Adrian Johnson +Date: Thu Jan 12 00:26:03 2012 +1030 + + cairo: avoid setting huge clip area when printing + + Bug 44002 + + poppler/CairoOutputDev.cc | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +commit efe115f22f8f00a2863ef265ad6f4e7cc2e0336c +Author: Albert Astals Cid +Date: Tue Jan 10 23:41:54 2012 +0100 + + compile + + poppler/ArthurOutputDev.cc | 1 + + 1 file changed, 1 insertion(+) + +commit 52d190d8ff962a57a59218f6871c3a63a443ea53 +Author: Albert Astals Cid +Date: Tue Jan 10 23:33:40 2012 +0100 + + [xpdf303] tiling "merges" from Thomas, using mostly our "old" code + instead of xpdf's + + poppler/CairoOutputDev.cc | 2 +- + poppler/CairoOutputDev.h | 4 ++-- + poppler/Gfx.cc | 45 + +++++++++++++++++++++++++++++++------------ + poppler/Gfx.h | 15 +++++++++------ + poppler/GfxState.cc | 5 ++++- + poppler/GfxState.h | 7 ++++--- + poppler/OutputDev.h | 3 ++- + poppler/PSOutputDev.cc | 2 +- + poppler/PSOutputDev.h | 2 +- + poppler/PreScanOutputDev.cc | 15 +++++++-------- + poppler/PreScanOutputDev.h | 2 +- + poppler/SplashOutputDev.cc | 8 ++++++-- + poppler/SplashOutputDev.h | 3 ++- + splash/Splash.cc | 32 ++++++++++++++++++++++-------- + utils/ImageOutputDev.cc | 2 +- + utils/ImageOutputDev.h | 2 +- + 16 files changed, 99 insertions(+), 50 deletions(-) + +commit bf75a957650dd5208ecf1f6db1555a3d00b7949c +Author: Albert Astals Cid +Date: Tue Jan 10 23:31:27 2012 +0100 + + [xpdf303] Splash::blitTransparent merges from Thomas + + splash/Splash.cc | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +commit 296244ab74e56b2781daae0a664617d1da30527c +Author: Albert Astals Cid +Date: Tue Jan 10 23:30:34 2012 +0100 + + [xpdf303] Merge xpath Splash stuff from Thomas + + splash/SplashXPath.cc | 22 +++++++++++++--------- + 1 file changed, 13 insertions(+), 9 deletions(-) + +commit e1ae7b900b01db7c7703da68ad94aa9bda1938f6 +Author: Albert Astals Cid +Date: Tue Jan 10 23:29:38 2012 +0100 + + [xpdf303] Merge splash font stuff from Thomas + + poppler/GlobalParams.cc | 17 +++++++++++++++++ + poppler/GlobalParams.h | 3 +++ + poppler/SplashOutputDev.cc | 3 +++ + poppler/SplashOutputDev.h | 1 + + splash/SplashFTFont.cc | 34 ++++++++++++++++++++++++++++------ + splash/SplashFTFont.h | 1 + + splash/SplashFTFontEngine.cc | 7 ++++--- + splash/SplashFTFontEngine.h | 5 +++-- + splash/SplashFontEngine.cc | 3 ++- + splash/SplashFontEngine.h | 1 + + 10 files changed, 63 insertions(+), 12 deletions(-) + +commit d46b673c46a72132fb3918b64733be552e35952f +Author: Albert Astals Cid +Date: Tue Jan 10 23:28:43 2012 +0100 + + [xpdf303] More merges from Thomas + + splash/Splash.cc | 2800 + ++++++++++++++++++++++++++++++++++++------------------ + splash/Splash.h | 60 ++ + 2 files changed, 1943 insertions(+), 917 deletions(-) + +commit 2cb40bab3b8c49d54c2a49554b30268ccb32899b +Author: Adrian Johnson +Date: Sun Jan 8 21:35:41 2012 +1030 + + Fix typo in pdffonts man page + + utils/pdffonts.1 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 34ae382915d9d9b2b3c015fee3c24907a6b52b8b +Author: Albert Astals Cid +Date: Sat Jan 7 17:14:05 2012 +0100 + + xpdf303: Merge some stuff in Splash [Thomas Freitag] + + 1. merge the complete pipe changes + a) including the overprint implementation from Derek used by pipe + b) including the transfer function implementation + 2. Two changes (not really a merge) to get it compiled under windows + (in + GlobalParams.cc & PDFDoc.cc) + 3. merge fill and stroke changes + a) including merge of SplashClip.cc + b) including merge of SplashXPathScanner.cc + + poppler/GfxState.cc | 94 ++- + poppler/GfxState.h | 17 +- + poppler/GlobalParams.cc | 7 + + poppler/GlobalParams.h | 3 + + poppler/GlobalParamsWin.cc | 2 +- + poppler/PDFDoc.cc | 2 +- + poppler/SplashOutputDev.cc | 134 +++- + poppler/SplashOutputDev.h | 8 +- + splash/Splash.cc | 1658 + ++++++++++++++++++++++++++++++------------ + splash/Splash.h | 42 +- + splash/SplashClip.cc | 57 +- + splash/SplashState.cc | 49 ++ + splash/SplashState.h | 12 + + splash/SplashXPathScanner.cc | 474 +++++++----- + splash/SplashXPathScanner.h | 24 +- + 15 files changed, 1845 insertions(+), 738 deletions(-) + +commit c2378609ae52523beb64e0f040fc79dce4877e03 +Author: Thomas Freitag +Date: Sat Jan 7 11:47:19 2012 +0100 + + regtest: read stderr output before calling wait to fix a possible + deadlock + + In the way the scripts starts it subprocesses, stderr becomes buffered + for the subprocesses. And unforunately, when the buffer limit is + reached, the subprocess suspends it work until it can print again on + stderr. That's why the python script runs into a deadlock when the + subprocess produces a lot of error messages. A small rearrange of the + commands, first read the stderr output and then wait that the + subprocess + ends, will remove this deadlock. + + regtest/backends/__init__.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit da6bfacb0f858f27bd47f247a25d6bc9ab778411 +Author: Adrian Johnson +Date: Sat Jan 7 10:35:17 2012 +1030 + + Add -subst option to pdffonts to list the substitute font name + and filename + + Bug 44416 + + poppler/FontInfo.cc | 8 ++++-- + poppler/FontInfo.h | 2 ++ + poppler/GlobalParams.cc | 29 ++++++++++++++++++-- + poppler/GlobalParams.h | 3 ++- + utils/pdffonts.1 | 3 +++ + utils/pdffonts.cc | 67 + +++++++++++++++++++++++++++++++++-------------- + 6 files changed, 88 insertions(+), 24 deletions(-) + +commit 9979b1b3e36dc8085d8c684692fece463fa474b1 +Author: Yi Yang +Date: Sat Jan 7 09:44:42 2012 +1030 + + Include .otf fonts when finding substitute fonts + + Bug 44412 + + poppler/GfxFont.cc | 2 +- + poppler/GlobalParams.cc | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +commit ebfab832ab4f2642b9ab2ededd25de670a3c7147 +Author: Adrian Johnson +Date: Fri Dec 23 09:55:20 2011 +1030 + + autoconf: Check for cairo-ft and other cairo backends + + so that CAIRO_LIBS includes the freetype dependency and pdftocairo + includes the dependencies for optional cairo backends. + + Bug 43969 + + configure.ac | 14 ++++++++++++-- + utils/Makefile.am | 4 ++-- + 2 files changed, 14 insertions(+), 4 deletions(-) + +commit 51ca2b7c7dec5430d29860fd887ad5c5d9b3f574 +Author: Albert Astals Cid +Date: Thu Dec 15 00:26:09 2011 +0100 + + [xpdf303] Some more changes in TextOutputDev + + poppler/TextOutputDev.cc | 23 ++++++++++++++++------- + 1 file changed, 16 insertions(+), 7 deletions(-) + +commit c5ce12993a4d2bcd3b3e95b1f08d00dc8960678c +Author: Albert Astals Cid +Date: Wed Dec 14 22:49:33 2011 +0100 + + [xpdf303] Merge some stuff from TextOutputDev + + Yes, this is the best commit log i could think of + + poppler/TextOutputDev.cc | 268 + +++++++++++++++++++++++++++++----------------- + poppler/TextOutputDev.h | 19 ++-- + 2 files changed, 180 insertions(+), 107 deletions(-) + +commit 388d72ac27ae98fe3a1ebd21760f2b0fa0249a9b +Author: Albert Astals Cid +Date: Tue Dec 6 23:21:15 2011 +0100 + + include strings.h as we use memcpy + + Fixes bug 43558 + + goo/PNGWriter.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 743f70f594bf3c9a58d1ff0738b9a2bc3ea03382 +Author: Albert Astals Cid +Date: Tue Dec 6 20:27:03 2011 +0100 + + xpdf303: Use xpdf method against recursion while parsing + + Ours detected loops correctly, but not "valid" files containing lots + of arrays one inside the other [[[[[[[[[[[[[[[[[[[ + So go to this more crude "fix" used in xpdf + + poppler/Dict.cc | 4 ++-- + poppler/Dict.h | 2 +- + poppler/Object.cc | 4 ++-- + poppler/Object.h | 8 ++++---- + poppler/Parser.cc | 32 +++++++++++++++----------------- + poppler/Parser.h | 10 +++------- + poppler/XRef.cc | 33 +++++++-------------------------- + poppler/XRef.h | 2 +- + 8 files changed, 35 insertions(+), 60 deletions(-) + +commit 63c942a45227ef28fb94ef4765171d9812fffafa +Author: Albert Astals Cid +Date: Sun Dec 4 17:29:45 2011 +0100 + + Do not fail if we are trying to save a file with Encrypt but that + we have not modified at all + + Fixes KDE bug #288045 + + poppler/PDFDoc.cc | 49 + +++++++++++++++++++++++++++++-------------------- + 1 file changed, 29 insertions(+), 20 deletions(-) + +commit 0937d775e59a963b72fa7924e0f7be484f8345fc +Author: Albert Astals Cid +Date: Sun Dec 4 15:37:20 2011 +0100 + + update name and copyright + (cherry picked from commit 22601c2a64f094ede8085a3ccca3de9daaa556e7) + + utils/pdftocairo.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit bdb439ac5a751d6146204ae0d61fdbf7828c89c3 +Author: Axel Strübing +Date: Thu Nov 24 22:32:57 2011 +0100 + + Fix typo/regression introduced in + f6d026bfa18624ccd321e102bb39ba744998de1e + + poppler/Gfx.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 74e11d8c912dd95d235e44e7b34b8ea1be082b9f +Author: Albert Astals Cid +Date: Thu Nov 24 18:54:27 2011 +0100 + + Fix typo + + qt4/src/poppler-qt4.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit ec2a1c3fca92a28c56911729927838f7aacf1078 +Author: Albert Astals Cid +Date: Wed Nov 16 23:13:52 2011 +0100 + + xpdf303: Use the correct sizeof() for the greallocn + + poppler/XRef.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 544440b9d19ce99f3a7fcacdea70999b1efc217f +Author: Albert Astals Cid +Date: Wed Nov 16 23:09:23 2011 +0100 + + xpdf303: Add XRef::getPermFlags + + poppler/XRef.h | 1 + + 1 file changed, 1 insertion(+) + +commit b2e43e531edcecaeacf02a627c98cf7ef57f3e3c +Author: Albert Astals Cid +Date: Wed Nov 16 23:04:04 2011 +0100 + + xpdf303: make strToUnsigned "safer" + + poppler/PDFDoc.cc | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) + +commit bd1513742182ed4c80d21401dd30180981879f24 +Author: Albert Astals Cid +Date: Wed Nov 16 22:59:12 2011 +0100 + + xpdf303: Check xrefEntryCompressed entries to be of correct type + and in bounds + + poppler/XRef.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit 3bf3e82d1f3eb19a454239d8c7641fc68ff4e462 +Author: Albert Astals Cid +Date: Wed Nov 16 22:54:17 2011 +0100 + + xpdf303: Adobe apparently ignores the generation number on compressed + objects + + poppler/XRef.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 73e6f19c4e76762eb5131b168e3b24167ba126cb +Author: Albert Astals Cid +Date: Wed Nov 16 22:29:11 2011 +0100 + + xpdf303: Add PDFDoc::fileNameU to windows builds + + poppler/PDFDoc.cc | 43 +++++++++++++++++++++++++++++++++++-------- + poppler/PDFDoc.h | 6 ++++++ + 2 files changed, 41 insertions(+), 8 deletions(-) + +commit 65388b1aaf9a78efcf9486d5e2d4bdce76f11194 +Author: Igor Slepchin +Date: Tue Nov 15 21:53:40 2011 +0100 + + Output images in pdftohtml -xml mode if no -i option is specified. + + Comes with an attached update to pdf2xml.dtd + + utils/HtmlOutputDev.cc | 48 + ++++++++++++++++++++++++++++++++++++++++-------- + utils/pdf2xml.dtd | 22 +++++++++++++++++----- + 2 files changed, 57 insertions(+), 13 deletions(-) + +commit a4c78946bc1fc3d52152af2e319051050ab05e28 +Author: Albert Astals Cid +Date: Mon Nov 14 13:22:53 2011 +0100 + + Make GfxColorSpace::parse accept dicts too + + poppler/GfxState.cc | 14 +++++++++++++- + 1 file changed, 13 insertions(+), 1 deletion(-) + +commit f6d026bfa18624ccd321e102bb39ba744998de1e +Author: Albert Astals Cid +Date: Fri Nov 11 16:37:27 2011 +0100 + + Do not crash if failing to parse the colorspace + + Fixes bug 42793 + + poppler/Gfx.cc | 52 + +++++++++++++++++++++++++++++----------------------- + 1 file changed, 29 insertions(+), 23 deletions(-) + +commit c9da140bb476dcbb3928950ae9b506de82695cd2 +Author: David King +Date: Thu Oct 20 11:31:10 2011 +0200 + + glib-demo: Conditionally initialise threading + + In GLib 2.24.0 and above, threading is enabled by default, and the + thread initialization functions are deprecated since GLib 2.31.0. + + Fixes bug #42036. + + glib/demo/main.c | 3 +++ + 1 file changed, 3 insertions(+) + +commit a0db250bbdefff6361551cf9db344bd5268fea11 +Author: Vittal Aithal +Date: Wed Nov 9 20:07:58 2011 +0100 + + pdfinfo: report page rotation + + utils/pdfinfo.cc | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit e7dbd17ff07afa465636a90f526cd7ac8c731862 +Author: Kenji Uno +Date: Wed Nov 9 12:39:41 2011 +0100 + + Fix leak in GooString when resizing + + If resizing from "long" to shorter + + goo/GooString.cc | 3 +++ + 1 file changed, 3 insertions(+) + +commit 6a4f0c32b6723b127034d59a34bf076942e9935f +Author: Carlos Garcia Campos +Date: Sun Nov 6 15:44:06 2011 +0100 + + regtest: Skip tests with results when creating refs + + Not only tests that have md5, but also crashed or failed tests. + + regtest/TestReferences.py | 4 ++-- + regtest/backends/__init__.py | 3 +++ + 2 files changed, 5 insertions(+), 2 deletions(-) + +commit eab952d121c7ab88a0d41587cfa449c0978bea04 +Author: Pino Toscano +Date: Thu Nov 3 21:58:11 2011 +0100 + + qt4: remove unused variable + + qt4/src/poppler-embeddedfile.cc | 1 - + 1 file changed, 1 deletion(-) + +commit 85615f04e040dd38792533a4522e437644e97548 +Author: Pino Toscano +Date: Thu Nov 3 16:15:40 2011 +0100 + + qt4: get rid of the own F and Ff flags reading + + no more useful now, as they are available either directly or as + parsed values in both Annot and FormField + + qt4/src/poppler-form.cc | 16 ---------------- + qt4/src/poppler-private.h | 4 +--- + 2 files changed, 1 insertion(+), 19 deletions(-) + +commit 43347b43eeb66b5c8dc9637c36436baacc626bc4 +Author: Pino Toscano +Date: Thu Nov 3 16:10:57 2011 +0100 + + qt4: use the flags of the associated Annot object + + qt4/src/poppler-form.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6c9492202de9b3b43da9eac3e40dc7fe218f21da +Author: Pino Toscano +Date: Thu Nov 3 16:03:11 2011 +0100 + + qt4: remove old commented code + + qt4/src/poppler-form.cc | 1 - + 1 file changed, 1 deletion(-) + +commit f0eca54131f7cdf6c1e0e78a18be0bf642567af4 +Author: Pino Toscano +Date: Thu Nov 3 15:46:33 2011 +0100 + + qt4: use the quadding read already in FormField + + ... instead of reading it again + + qt4/src/poppler-form.cc | 24 ++++++++---------------- + 1 file changed, 8 insertions(+), 16 deletions(-) + +commit d92bce1ae87d2f351bb1b972c64466502fb212aa +Author: Pino Toscano +Date: Thu Nov 3 15:30:45 2011 +0100 + + qt4: include + + qt4/src/poppler-private.h | 1 + + 1 file changed, 1 insertion(+) + +commit 955cd0c7bd3a72340deba098f4242a4904adc60f +Author: Albert Astals Cid +Date: Wed Nov 2 20:20:41 2011 +0100 + + Compile with MSVC needed for last change in the qt4 frontend + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit e0f5bc1deebaa9861baffd7c9ba31ea31585cd1d +Author: Hib Eris +Date: Tue Nov 1 14:15:09 2011 +0100 + + qt4: Use PDFDoc(wchar_t *, ...) on Windows + + Bug 35378 + + qt4/src/poppler-document.cc | 6 +++--- + qt4/src/poppler-private.h | 17 +++++++++++++++-- + 2 files changed, 18 insertions(+), 5 deletions(-) + +commit 52c1e9c5109299255d13b5b1e7d3eedaab512084 +Author: Carlos Garcia Campos +Date: Tue Nov 1 14:13:10 2011 +0100 + + regtest: Add --update-refs command line option to run-tests command + + It allows to update the references of failing tests. + + regtest/TestRun.py | 2 +- + regtest/backends/__init__.py | 34 ++++++++++++++++++++++++++++++++-- + regtest/commands/run-tests.py | 4 ++++ + 3 files changed, 37 insertions(+), 3 deletions(-) + +commit b4896a416b1df14a81b944b3c577fec85c9c7f7d +Author: Rex Dieter +Date: Tue Nov 1 09:40:53 2011 +0100 + + Fix pkg-config files + + We were using $FOO_REQUIRED instead of @FOO_REQUIRED@ + + configure.ac | 1 + + poppler-glib-uninstalled.pc.in | 2 +- + poppler-glib.pc.cmake | 2 +- + poppler-glib.pc.in | 2 +- + 4 files changed, 4 insertions(+), 3 deletions(-) + +commit 53f1b0c5edfdbef817bff31566893ac4e111516a +Author: Carlos Garcia Campos +Date: Sun Oct 30 16:02:19 2011 +0100 + + pdftocairo: Make sure beginDocument() is always called + + This fixes a crash when rendering only odd/even pages in a printing + format. + + utils/pdftocairo.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 8b0dfe9537082eaccd982530f1eddc2fcfc92f8e +Author: Albert Astals Cid +Date: Thu Oct 27 19:58:31 2011 +0200 + + xpdf303: Use splashDist instead of splashSqrt and USE_FIXEDPOINT + enhacements + + splash/SplashFTFont.cc | 70 + +++++++++++++++++++++++++++++++++++++++++++----- + splash/SplashFTFont.h | 2 +- + 2 files changed, 65 insertions(+), 7 deletions(-) + +commit b021bce2583c8e1e3a4c129106d80e7a4e223600 +Author: Albert Astals Cid +Date: Thu Oct 27 19:54:22 2011 +0200 + + xpdf303: wops, make it compile + + poppler/Lexer.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 76295f4d401c36bdef3b2a20d18ac57a3b976410 +Author: Albert Astals Cid +Date: Thu Oct 27 19:42:42 2011 +0200 + + xpdf303: Adopt xpdf solution for the name too long problem + + poppler/Lexer.cc | 37 +++++++++++++++++-------------------- + 1 file changed, 17 insertions(+), 20 deletions(-) + +commit be6d4c19b8ce1515ce995eee408dc5752012c649 +Author: Albert Astals Cid +Date: Thu Oct 27 19:34:38 2011 +0200 + + xpdf303: Add brackets + + poppler/Lexer.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit 904ae1385e93155a55008977c89aa664b7c8cb9b +Author: Albert Astals Cid +Date: Wed Oct 26 14:22:28 2011 +0200 + + Expose POPPLER_VERSION in poppler-config.h + + configure.ac | 3 +++ + poppler/poppler-config.h.cmake | 5 +++++ + poppler/poppler-config.h.in | 5 +++++ + 3 files changed, 13 insertions(+) + +commit aa83d4fe942ef0685c5990ddf3eccc2fbdf82292 +Author: Albert Astals Cid +Date: Thu Oct 20 00:59:57 2011 +0200 + + xpdf303: Add readFromStream + + poppler/GfxFont.cc | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 74d771d58a4d1868669117709eb6811ec28bf840 +Author: Albert Astals Cid +Date: Thu Oct 20 00:56:58 2011 +0200 + + xpdf303: Add base14SubstFonts + + poppler/GfxFont.cc | 24 ++++++++++++++++++++++++ + 1 file changed, 24 insertions(+) + +commit 71260f987161d5b122caced6af14e9d64be46e4d +Author: Albert Astals Cid +Date: Thu Oct 20 00:55:42 2011 +0200 + + xpdf303: GfxFontLoc implementation + + poppler/GfxFont.cc | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +commit 586430137985fd303ce87bdb9b902ee9a01341e8 +Author: Albert Astals Cid +Date: Thu Oct 20 00:54:09 2011 +0200 + + xpdf303: More stuff into base14FontMap + + poppler/GfxFont.cc | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) + +commit c0affb1845c339f89ca67608cb9fd9134ff902f5 +Author: Albert Astals Cid +Date: Thu Oct 20 00:51:31 2011 +0200 + + xpdf303: GfxFont::getOrignName/getName rework + + poppler/FontInfo.cc | 4 ++-- + poppler/GfxFont.cc | 4 ---- + poppler/GfxFont.h | 6 +----- + poppler/PSOutputDev.cc | 8 ++++---- + poppler/TextOutputDev.cc | 5 ++--- + 5 files changed, 9 insertions(+), 18 deletions(-) + +commit c5c513b5b72e03f6f0a94d04f7d8a22fe9bdaa80 +Author: Albert Astals Cid +Date: Thu Oct 20 00:45:30 2011 +0200 + + xpdf303: GfxFontLoc + + poppler/GfxFont.h | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +commit 4ec5e5e6d4785eb7a60744ae7e33c7ba3f603e8e +Author: Albert Astals Cid +Date: Thu Oct 20 00:34:10 2011 +0200 + + xpdf303: StdFontMapEntry renaming + + poppler/GfxFont.cc | 26 +++++++++++--------------- + poppler/GfxFont.h | 2 ++ + 2 files changed, 13 insertions(+), 15 deletions(-) + +commit e71088dc5087303b1ae5f3e72af287ec4e0a1342 +Author: Albert Astals Cid +Date: Mon Oct 17 13:42:06 2011 +0200 + + remove useless #if + + poppler/Page.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +commit 40b56994dda79653c902977423f349efa55cf21e +Author: Adrian Johnson +Date: Mon Oct 17 20:33:03 2011 +1030 + + utils: Add GooString arg to parseargs and use for paths in pdftocairo + + and MAXPATHLEN is not available on windows. Avoid the + need to know the max path length by using GooString for the path. + + utils/parseargs.cc | 12 ++++++++++++ + utils/parseargs.h | 2 ++ + utils/pdftocairo.cc | 17 ++++++++--------- + 3 files changed, 22 insertions(+), 9 deletions(-) + +commit 4bb34757dbbff780baba053371274c05b29771e1 +Author: Adrian Johnson +Date: Mon Sep 19 21:11:44 2011 +0930 + + cairo: fix setSoftMask bugs + + - Getting the clip extents in device space requires transforming all + four corners of the clip extents and translating by the group device + offset other wise the device extents will not be correct for rotated + ctm. + + - Adjust matrix to include translation of the clip extents origin + since the mask surface does not start at (0,0). + + - the ctm when called cairo_mask() needs to be the same as the + ctm when + the mask was created. + + - implement transfer function in setSoftMask + + Bug 41005 + + poppler/CairoOutputDev.cc | 97 + ++++++++++++++++++++++++++++----------------- + poppler/CairoOutputDev.h | 6 ++- + 2 files changed, 65 insertions(+), 38 deletions(-) + +commit 50adbed183e9bf70eb4c41e8858cf464c3042e45 +Author: Carlos Garcia Campos +Date: Sun Oct 16 12:40:27 2011 +0200 + + Remove poppler-cairo dependency from poppler-glib pkg-config file + + poppler-glib links to poppler-cairo statically, so it doesn'tm + depend on + the dynamic library. + + CMakeLists.txt | 1 - + configure.ac | 2 -- + poppler-glib-uninstalled.pc.in | 2 +- + poppler-glib.pc.cmake | 2 +- + poppler-glib.pc.in | 2 +- + 5 files changed, 3 insertions(+), 6 deletions(-) + +commit acd8ecc9121db58851f73764f046a4f54bd80581 +Author: Adrian Johnson +Date: Sat Oct 8 15:03:24 2011 +1030 + + ps: fix uncolored tiling patterns + + Uncolored patterns and type 3 chars must not use color setting + operators. When emitting an uncolored pattern: + - disable the update color space functions + - disable the update color functions + - set pdfLastFill and pdfLastStroke to true to ensure the the sCol + and fCol procedures that is used by some of the PS procedures that + emulate PDF operators do not update the color. + + Bug 41462 + + poppler/PSOutputDev.cc | 41 +++++++++++++++++++++++++++++++++++++++++ + poppler/PSOutputDev.h | 1 + + 2 files changed, 42 insertions(+) + +commit 6e1326b11f98f2b277e53a6cdbcb373ce6c29958 +Author: Adrian Johnson +Date: Fri Oct 7 20:29:36 2011 +1030 + + ps: emit non repeating patterns in PSOutput with inType3Char = true + + instead of falling back to Gfx. This avoids emitting the image data + twice. + + poppler/PSOutputDev.cc | 23 +++++++++++++++++++++++ + 1 file changed, 23 insertions(+) + +commit ed05fcb8c442b716c5e382c98f2625701926c86a +Author: Adrian Johnson +Date: Sat Oct 1 20:19:19 2011 +0930 + + ps: fix tiling pattern fill matrix + + In PS the pattern matrix maps the pattern space to user space. In PDF + the pattern matrix maps the pattern space to the default ctm of the + content stream (baseMatrix in Gfx). The matrix mat already contains + the + correct pattern->baseMatrix so use it instead of pmat. + + Bug 41374 + + poppler/PSOutputDev.cc | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +commit 087757866de13b6164967a1d241d3c0e47065f1a +Author: Albert Astals Cid +Date: Thu Oct 13 12:18:52 2011 +0200 + + xpdf303: Merge SplashT1Font::getGlyphPath changes + + splash/SplashT1Font.cc | 39 +++++++++++++++++++++------------------ + 1 file changed, 21 insertions(+), 18 deletions(-) + +commit c84f46ee16a8dcc6e2cad2359df621cc6cdb8fa5 +Author: Albert Astals Cid +Date: Thu Oct 13 12:16:14 2011 +0200 + + xpdf303: Add GBool type1 to SplashFTFontFile + + splash/SplashFTFontFile.cc | 9 +++++---- + splash/SplashFTFontFile.h | 3 ++- + 2 files changed, 7 insertions(+), 5 deletions(-) + +commit d845da2c3c1acbeaa4b9bb3125f9143e785210ff +Author: Yury G. Kudryashov +Date: Thu Oct 6 14:49:19 2011 +0200 + + Okular moved to git, fix docs + + Fix URLs in poppler-qt4 documentation + + qt4/src/Mainpage.dox | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit bb40c980f7ab7a6eb9735af17103f87bc65893d6 +Author: Yury G. Kudryashov +Date: Thu Oct 6 14:49:08 2011 +0200 + + Explicitly include fontconfig include dir + + This fixes cmake-driven build on systems where fontconfig is + installed in + non-standard location. + + CMakeLists.txt | 1 + + 1 file changed, 1 insertion(+) + +commit 776ca137984556530ba938265714934bdc3d6443 +Author: Yury G. Kudryashov +Date: Thu Oct 6 14:48:46 2011 +0200 + + Fix typo in cmake option documentation + + Relocatable build does *not* (was missing in docs) hardcode library + location. + + CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit ab8616dcb637ac1aeb4d5f142c3c4bff9aecd041 +Author: Adrian Johnson +Date: Thu Oct 6 14:21:10 2011 +0200 + + close the file or flush stdout + + utils/pdftocairo.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 72c2d563684ab6937a98a0c1c79be3639d29c9ce +Author: Albert Astals Cid +Date: Tue Oct 4 17:46:11 2011 +0200 + + xpdf303: Make sure array length is > 0 + + This is not scritcly necessary since Array::get already returns a + null object in case + the index is out of range but let's merge it for the sake of being + more closer to xpdf + + poppler/GfxState.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c814c2452c7f60623fdd0fee6f915adeaf5b49e3 +Author: Albert Astals Cid +Date: Tue Oct 4 17:40:27 2011 +0200 + + xpdf303: Limit recursion in GfxColorSpace parsing + + I think we could do it better, but it'd take more time and it's not + what we are doing in this branch anyway + + poppler/GfxState.cc | 43 +++++++++++++++++++++++++++---------------- + poppler/GfxState.h | 14 +++++++------- + 2 files changed, 34 insertions(+), 23 deletions(-) + +commit 0e53ba5709296dc2ba1399f885af200d2041f0cd +Author: Glad Deschrijver +Date: Sat Oct 1 15:41:51 2011 +0200 + + qt4: Add the option of PSConverter creating EPS + + qt4/src/poppler-ps-converter.cc | 3 ++- + qt4/src/poppler-qt4.h | 6 ++++-- + 2 files changed, 6 insertions(+), 3 deletions(-) + +commit 04e271a0c10807c9c3967daa1f656e87b97b9901 +Author: Albert Astals Cid +Date: Sat Oct 1 14:34:50 2011 +0200 + + Fix typo in documentation + + Reported by Glad Deschrijver + (cherry picked from commit 1346caac6c564035d368617a329b361d0253fbf6) + + qt4/src/poppler-qt4.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 9855529e8e1a83c6d77a9e4221ea2132d44e9fb1 +Author: Albert Astals Cid +Date: Sat Oct 1 14:27:44 2011 +0200 + + Remove space after % as it confuses libspectre + + Discussed with Adrian Johnson + Problem found by Glad Deschrijver + + poppler/PSOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 8e8cde6f374b59222d834e2e7f08fb4a6a4d55a5 +Author: Albert Astals Cid +Date: Wed Sep 28 23:32:24 2011 +0200 + + xpdf303: More manpage merging + + utils/pdftotext.1 | 9 +++++---- + 1 file changed, 5 insertions(+), 4 deletions(-) + +commit f798f00c9ec55bff2eb93938424c436ba2663e7a +Author: Albert Astals Cid +Date: Wed Sep 28 23:30:55 2011 +0200 + + xpdf303: mention pdfdetach in non xpdf tools + + utils/pdftocairo.1 | 1 + + utils/pdftohtml.1 | 1 + + 2 files changed, 2 insertions(+) + +commit 3fc46ac1c046460ccf46ba4b8a92f728e775694a +Author: Albert Astals Cid +Date: Wed Sep 28 23:30:00 2011 +0200 + + xpdf303: Fix pdfdetach man page references + + utils/pdfdetach.1 | 14 ++++++-------- + 1 file changed, 6 insertions(+), 8 deletions(-) + +commit 79e1d77fb00a7c7f0bda4ae76328c4211c7f16e6 +Author: Albert Astals Cid +Date: Wed Sep 28 23:27:53 2011 +0200 + + xpdf303: Merge some more manpages + + utils/pdfinfo.1 | 15 +++++++++++---- + utils/pdftoppm.1 | 9 +++++---- + 2 files changed, 16 insertions(+), 8 deletions(-) + +commit 841c96be59ddad32f51d4d114ba1dcc42285ab55 +Author: Albert Astals Cid +Date: Wed Sep 28 23:23:25 2011 +0200 + + xpdf303: Merge some man pages + + utils/pdffonts.1 | 9 +++++---- + utils/pdfimages.1 | 9 +++++---- + utils/pdftops.1 | 9 +++++---- + 3 files changed, 15 insertions(+), 12 deletions(-) + +commit d2706a05513134f961e2500e0e596f2769707ce5 +Author: Adrian Johnson +Date: Wed Sep 28 21:20:23 2011 +0930 + + cairo: fix crash when using poppler_page_get_image() + + poppler/CairoOutputDev.h | 1 + + 1 file changed, 1 insertion(+) + +commit 0c0591fa23441c54c9443072615273ea65482d76 +Author: Albert Astals Cid +Date: Tue Sep 27 00:45:59 2011 +0200 + + 0.18.0 + + CMakeLists.txt | 6 +-- + NEWS | 14 +++++++ + configure.ac | 4 +- + cpp/Doxyfile | 2 +- + gtk-doc.make | 102 + +++++++++++++++++++++------------------------------ + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + 7 files changed, 64 insertions(+), 68 deletions(-) + +commit 19f5db7acd64330d198f18695175df02141794d7 +Author: Albert Astals Cid +Date: Tue Sep 27 00:15:15 2011 +0200 + + Update Carlos (C) year + + poppler/Gfx.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6d34d4af90b8b41360de4dabb000bbcc894775d0 +Author: Albert Astals Cid +Date: Tue Sep 27 00:09:54 2011 +0200 + + Rename pdfmerge and pdfextract + + To pdfunite and pdfseparate, the old names were taken + + utils/.gitignore | 4 +- + utils/CMakeLists.txt | 28 ++++---- + utils/Makefile.am | 16 ++--- + utils/pdfextract.1 | 49 -------------- + utils/pdfextract.cc | 115 --------------------------------- + utils/pdfmerge.1 | 33 ---------- + utils/pdfmerge.cc | 176 + -------------------------------------------------- + utils/pdfseparate.1 | 49 ++++++++++++++ + utils/pdfseparate.cc | 115 +++++++++++++++++++++++++++++++++ + utils/pdfunite.1 | 33 ++++++++++ + utils/pdfunite.cc | 176 + ++++++++++++++++++++++++++++++++++++++++++++++++++ + 11 files changed, 397 insertions(+), 397 deletions(-) + +commit baf54c2876edd476ffc68da6518598847bb7ec8a +Author: Albert Astals Cid +Date: Mon Sep 26 15:54:46 2011 +0200 + + Remove getRawStream + + Since it does exactly the same as getNextStream + + poppler/DCTStream.h | 1 - + poppler/Stream.h | 1 - + utils/HtmlOutputDev.cc | 7 ++----- + utils/ImageOutputDev.cc | 9 +++------ + 4 files changed, 5 insertions(+), 13 deletions(-) + +commit bba57e588fd1ee3a61f18405d1d1bf89fceb5b96 +Author: Carlos Garcia Campos +Date: Sun Sep 25 12:21:02 2011 +0200 + + xpdf303: Added the pdfdetach tool + + I haven't merged xpdf code for embedded files, I think our + implementation is better and more complete. I've adapated pdfdetach + code to use our code and return also embedded files of file attachment + annotations to match what xpdf does. + + poppler/FileSpec.cc | 22 ++++ + poppler/FileSpec.h | 3 + + utils/CMakeLists.txt | 9 ++ + utils/Makefile.am | 6 + + utils/pdfdetach.1 | 105 +++++++++++++++++ + utils/pdfdetach.cc | 318 + ++++++++++++++++++++++++++++++++++++++++++++++++++ + 6 files changed, 463 insertions(+) + +commit f62c2f002c782d3a7887525f031d266aca6eb582 +Author: Carlos Garcia Campos +Date: Sat Sep 24 11:20:13 2011 +0200 + + xpdf303: Parse ActualText in Gfx instead of output devices + + Remove beginMarkedContent and endMarkedcontent and add beginActualText + and endActualText. ActualText is parsed in Gfx, that already + handles the + marked content stack, so that text output dev doesn't need to + handle it + too. The text string is passed to beginActualText(). This change + is not + an exact merge of xpdf code, I've tried to keep our implementation. + + poppler/CairoOutputDev.cc | 8 +-- + poppler/CairoOutputDev.h | 6 +- + poppler/Gfx.cc | 40 +++++++++---- + poppler/OutputDev.cc | 6 -- + poppler/OutputDev.h | 4 +- + poppler/TextOutputDev.cc | 145 + +++++++++++++++++++-------------------------- + poppler/TextOutputDev.h | 21 ++++--- + 7 files changed, 108 insertions(+), 122 deletions(-) + +commit a097447ed13cb021003425f85597e2628935feb2 +Author: Carlos Garcia Campos +Date: Sat Sep 24 09:43:05 2011 +0200 + + Use new error syntax in pdfextract + + utils/pdfextract.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 718c735aed540aa49b8dde250ca886c6ad93f5b6 +Merge: 6721916 69707f0 +Author: Carlos Garcia Campos +Date: Sat Sep 24 09:38:52 2011 +0200 + + Merge branch 'master' into xpdf303merge + +commit 69707f0a9b5a94c80817039db943fb4f26e743e3 +Author: Adrian Johnson +Date: Mon Sep 19 22:00:34 2011 +0930 Update .gitignore - regtest/.gitignore | 1 + - utils/.gitignore | 2 ++ - 2 files changed, 3 insertions(+), 0 deletions(-) + regtest/.gitignore | 1 + + utils/.gitignore | 2 ++ + 2 files changed, 3 insertions(+) + +commit 0de477817e424078cfcfcae114e7745809f0848d +Author: Adrian Johnson +Date: Mon Sep 19 21:57:07 2011 +0930 + + utils: Add Glyph & Cog copyright to pdfmerge and pdfextract man pages + + utils/pdfextract.1 | 3 ++- + utils/pdfmerge.1 | 3 ++- + 2 files changed, 4 insertions(+), 2 deletions(-) + +commit ce7372db64ee807dc2b491e121fbe557dbf697e8 +Author: Adrian Johnson +Date: Mon Sep 19 22:04:27 2011 +0930 + + regtest: render cairo at 72ppi + + For consistency with splash. It is faster and easier to compare with + splash results. + + regtest/backends/cairo.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 6cf7330089c4dcc1099906d9c37c3607a2a1eeba +Author: Carlos Garcia Campos +Date: Mon Sep 19 18:42:35 2011 +0200 + + regtest: Ignore checksums of crashed, failed and stderr files + + They shouldn't have a checksum, but it might happen with md5 files + generated with previous versions. + + regtest/backends/__init__.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 6512bf1c5dab37058460882fec3407b396830981 +Author: Albert Astals Cid +Date: Sun Sep 18 18:38:32 2011 +0200 + + Render at 72 instead of 150, it's faster :D + + regtest/backends/splash.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b828f63ed3896a22f3fe7ddbe2ec2f549d7a2c62 +Author: Albert Astals Cid +Date: Sun Sep 18 18:20:47 2011 +0200 + + install pdfextract and pdfmerge manpages + + utils/CMakeLists.txt | 2 ++ + 1 file changed, 2 insertions(+) + +commit 986759dfbe85998c85ee9b0825c7522395567531 +Author: Thomas Freitag +Date: Sun Sep 18 18:19:30 2011 +0200 + + pdfextract and pdfmerge man pages + + utils/Makefile.am | 2 ++ + utils/pdfextract.1 | 48 + ++++++++++++++++++++++++++++++++++++++++++++++++ + utils/pdfmerge.1 | 32 ++++++++++++++++++++++++++++++++ + 3 files changed, 82 insertions(+) + +commit 90da1af542fd7f3cecef31b15da6971345b38209 +Author: Thomas Freitag +Date: Sun Sep 18 18:19:04 2011 +0200 + + Complain if %d is not present and it should + + utils/pdfextract.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 40e066a84ddb3a5c41805c095659af5f5704d6d8 +Author: suzuki toshiya +Date: Sun Sep 18 18:16:14 2011 +0200 + + qt_subdir is unneeded + + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 6721916c92d720947b3285c85fdbe6610c6bf013 +Merge: 8456a6e e23f6b9 +Author: Carlos Garcia Campos +Date: Sun Sep 18 16:31:10 2011 +0200 + + Merge branch 'master' into xpdf303merge + + Conflicts: + poppler/Gfx.cc + +commit e23f6b9cade804136bd4bb58182f4fe0b072fbf2 +Author: Carlos Garcia Campos +Date: Sun Sep 18 16:27:50 2011 +0200 + + regtest: Do not create checksums for crashed, failed and stderr files + + regtest/backends/__init__.py | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +commit 110b8be1d9f2694b42bd12dcb6af02bfca9866dd +Author: Carlos Garcia Campos +Date: Sun Sep 18 16:26:58 2011 +0200 + + Fix memory leak + + poppler/Gfx.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 8456a6e1354126dc98357fb806595bd3bc198522 +Author: Carlos Garcia Campos +Date: Sun Sep 18 16:07:54 2011 +0200 + + xpdf303: Add OCDisplayNode + + It's not used by poppler yet, but we might want to use it from the + frontends after the merge. + + poppler/OptionalContent.cc | 127 + ++++++++++++++++++++++++++++++++++++++++++++ + poppler/OptionalContent.h | 36 ++++++++++++- + 2 files changed, 162 insertions(+), 1 deletion(-) + +commit 06c6660dc9fe326f185ff323e643af6714b32ec8 +Author: Carlos Garcia Campos +Date: Sun Sep 18 15:08:44 2011 +0200 + + xpdf303: Parse usage dictionary of optional content groups + + poppler/OptionalContent.cc | 28 ++++++++++++++++++++++++++++ + poppler/OptionalContent.h | 14 +++++++++++++- + 2 files changed, 41 insertions(+), 1 deletion(-) + +commit 528d5b0d40302b3fee3aec69b85bdd1daa4db568 +Author: Carlos Garcia Campos +Date: Sun Sep 18 14:03:36 2011 +0200 + + xpdf303: Image XObjects can have a OC entry too + + poppler/Gfx.cc | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) + +commit c40353d3bb761f5be8ddbd2bf5341e83901fb132 +Author: Carlos Garcia Campos +Date: Sun Sep 18 13:32:07 2011 +0200 + + xpdf303: OC entry is specific to form XObjects + + poppler/Gfx.cc | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +commit 6ddb51d81b064346dc85d2ae72570a956a184d74 +Author: Carlos Garcia Campos +Date: Sun Sep 18 12:59:28 2011 +0200 + + xpdf303: The spec doesn't say OC must be null or ref + + poppler/Annot.cc | 5 +---- + poppler/Gfx.cc | 22 +++++++--------------- + 2 files changed, 8 insertions(+), 19 deletions(-) + +commit 434bb9b38319edc7282be22044bd7761403a38a6 +Author: Carlos Garcia Campos +Date: Sun Sep 18 12:45:12 2011 +0200 + + xpdf303: OC entry can be an optional content group too + + Not only an optional content membership dictionary. + + poppler/OptionalContent.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 56410b80fdabb99e2de0c6589de6ee745936c523 +Author: Carlos Garcia Campos +Date: Sun Sep 18 12:44:02 2011 +0200 + + xpdf303: Not finding an oc group is not necessarily a syntax error + + poppler/OptionalContent.cc | 2 -- + 1 file changed, 2 deletions(-) + +commit 4bb4439450e342479375cb56d10561457475bd13 +Author: Carlos Garcia Campos +Date: Sun Sep 18 12:42:15 2011 +0200 + + xpdf303: Fix check of OptionalContentGroup::getState() + + We use an enum, not a boolean. + + poppler/OptionalContent.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit d737e3098e02e46525c0edf2165462e03ac7a0e6 +Author: Carlos Garcia Campos +Date: Sun Sep 18 11:36:11 2011 +0200 + + xpdf303: Add support for visibility expressions in OptContent + + poppler/OptionalContent.cc | 113 + ++++++++++++++++++++++++++++++++++---------- + poppler/OptionalContent.h | 3 +- + 2 files changed, 91 insertions(+), 25 deletions(-) + +commit 258d56ba85902a8ab50eec3fe66dd6425226fa59 +Merge: 72a7736 12c6239 +Author: Carlos Garcia Campos +Date: Sun Sep 18 11:12:38 2011 +0200 + + Merge branch 'master' into xpdf303merge + +commit 12c6239ca4f1f6a5de72aebd755f9d1354ea5837 +Author: Carlos Garcia Campos +Date: Sun Sep 18 11:08:06 2011 +0200 + + regtest: Fix checksum check for tests containing spaces in filename + + regtest/backends/__init__.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 72a7736389cbe36c1f8a526f1a659cae1a3f85a3 +Author: Carlos Garcia Campos +Date: Sun Sep 18 10:47:51 2011 +0200 + + xpdf303: No need to cache optContentConfig object in Annot + + poppler/Annot.cc | 2 +- + poppler/Annot.h | 2 -- + 2 files changed, 1 insertion(+), 3 deletions(-) + +commit 93ba92db0a3af35f197a4faa5a528af98ea0f624 +Author: Albert Astals Cid +Date: Wed Sep 14 00:58:44 2011 +0200 + + Make it work with Python3 + + regtest/Config.py | 4 ++-- + regtest/TestReferences.py | 8 ++++---- + regtest/TestRun.py | 32 ++++++++++++++++---------------- + regtest/Timer.py | 8 ++++---- + regtest/backends/__init__.py | 12 ++++++------ + regtest/commands/__init__.py | 6 +++--- + regtest/commands/create-refs.py | 2 +- + regtest/commands/run-tests.py | 2 +- + regtest/main.py | 2 +- + 9 files changed, 38 insertions(+), 38 deletions(-) + +commit da1b5437148e1e6317246b16f7235c8bc280be97 +Author: Carlos Garcia Campos +Date: Tue Sep 13 20:09:56 2011 +0200 + + regtest: Add a way to skip files + + A new command line option --skip has been added to give a file + with the + list of test to skip. When --skip is not used, it look for a file + named + Skipped in the tests dir. Lines starting with '#' are considered + comments and are ignored. + + regtest/TestReferences.py | 9 +++++++-- + regtest/TestRun.py | 9 +++++++-- + regtest/Utils.py | 20 ++++++++++++++++++++ + regtest/main.py | 6 +++++- + 4 files changed, 39 insertions(+), 5 deletions(-) + +commit b730b2c1d9666f62f940762663c8318e64049d61 +Author: Carlos Garcia Campos +Date: Tue Sep 13 19:04:04 2011 +0200 + + regtest: Limit the number of arguments to 1 + + It's easier to run poppler-regtest more than once if you need to run + different tests. + + regtest/commands/create-refs.py | 24 ++++++++++++------------ + regtest/commands/run-tests.py | 26 +++++++++++++------------- + regtest/main.py | 2 +- + 3 files changed, 26 insertions(+), 26 deletions(-) + +commit 5ce045d0358318859c844340c639483485b69c58 +Author: Carlos Garcia Campos +Date: Tue Sep 13 18:18:21 2011 +0200 + + regtest: Sort tests before create-refs/run-tests and show progress + + regtest/TestReferences.py | 20 ++++++++------------ + regtest/TestRun.py | 21 ++++++++++----------- + regtest/Utils.py | 35 +++++++++++++++++++++++++++++++++++ + 3 files changed, 53 insertions(+), 23 deletions(-) + +commit 10801b6faee9037af054fe74cc4a03620ea41d45 +Author: Carlos Garcia Campos +Date: Mon Sep 12 20:13:17 2011 +0200 + + Add initial poppler regressions test program + + regtest/Config.py | 32 ++++++ + regtest/TestReferences.py | 73 +++++++++++++ + regtest/TestRun.py | 156 +++++++++++++++++++++++++++ + regtest/Timer.py | 73 +++++++++++++ + regtest/backends/__init__.py | 220 + +++++++++++++++++++++++++++++++++++++++ + regtest/backends/cairo.py | 39 +++++++ + regtest/backends/postscript.py | 35 +++++++ + regtest/backends/splash.py | 39 +++++++ + regtest/backends/text.py | 48 +++++++++ + regtest/commands/__init__.py | 93 +++++++++++++++++ + regtest/commands/create-refs.py | 65 ++++++++++++ + regtest/commands/run-tests.py | 69 ++++++++++++ + regtest/main.py | 77 ++++++++++++++ + regtest/poppler-regtest | 6 ++ + 14 files changed, 1025 insertions(+) + +commit 245e331a14e11a615bf47abbeb34a3561e393b41 +Author: Albert Astals Cid +Date: Mon Sep 12 13:43:49 2011 +0200 + + 0.17.4 + + CMakeLists.txt | 2 +- + NEWS | 5 +++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + qt4/src/Doxyfile | 2 +- + 5 files changed, 9 insertions(+), 4 deletions(-) + +commit 194b2413eb2c6a1641508aec63336aaf89ec3b51 +Author: Albert Astals Cid +Date: Mon Sep 12 13:43:35 2011 +0200 + + gir 0.18 + + glib/CMakeLists.txt | 12 ++++++------ + glib/Makefile.am | 12 ++++++------ + 2 files changed, 12 insertions(+), 12 deletions(-) + +commit 61c06d2efad20880e1e0b399cf797dd55f6c8dab +Author: Albert Astals Cid +Date: Mon Sep 12 00:32:38 2011 +0200 + + xpdf303: Useless NULL assignments + + poppler/SplashOutputDev.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 4fbcbf1ffb8a98fe8c12643fdab2cbd90b4e60f9 +Author: Albert Astals Cid +Date: Mon Sep 12 00:30:52 2011 +0200 + + xpdf303: Set size to 64 instead of 100 + + poppler/SplashOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 1c7203e57e9c7c264f5cada6362a6b449dd8689c +Author: Albert Astals Cid +Date: Mon Sep 12 00:21:03 2011 +0200 + + xpdf303: Avoid calling a "slow" function + + poppler/PSOutputDev.cc | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) + +commit db4c5789bf95af9f45a7911153acc20a26a447f1 +Author: Albert Astals Cid +Date: Mon Sep 12 00:19:49 2011 +0200 + + xpdf303: fix spacing + + poppler/PSOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 10c3d15f841865929d2f66353cb01d0d321e8b82 +Author: Albert Astals Cid +Date: Mon Sep 12 00:03:13 2011 +0200 + + xpdf303: make limit smaller + + poppler/PSOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 1d4e6e739701ba817576752ced169b24c5e95156 +Author: Albert Astals Cid +Date: Sun Sep 11 23:57:22 2011 +0200 + + xpdf303: Remove 512 limit in pdftoppm + + utils/pdftoppm.cc | 13 ++++++------- + 1 file changed, 6 insertions(+), 7 deletions(-) + +commit e4e843f1115d95c54967f0386bfb28f685d6c88d +Author: Albert Astals Cid +Date: Sun Sep 11 22:49:34 2011 +0200 + + xpdf303: Rework nComps != colorSpace->getNComps() handling + + poppler/GfxState.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +commit dda45b6a67f3f97705e5d806eaf7d37171789e66 +Author: Albert Astals Cid +Date: Sun Sep 11 22:46:51 2011 +0200 + + xpdf303: NULL GfxICCBasedColorSpace if array does not have 2 elements + + poppler/GfxState.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 760e814a6d26db8eba567520aad771002e11357a +Author: Albert Astals Cid +Date: Sun Sep 11 22:21:40 2011 +0200 + + xpdf303: increase formDepth limit + + poppler/Gfx.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 59442e5994f3b94d5221cbc90f79fad235fe2611 +Author: Albert Astals Cid +Date: Sun Sep 11 22:10:41 2011 +0200 + + xpdf303: Remove flags that were never used + + splash/Splash.cc | 6 +----- + splash/SplashXPath.cc | 34 ++++------------------------------ + splash/SplashXPath.h | 13 ++++--------- + 3 files changed, 9 insertions(+), 44 deletions(-) + +commit 41a620ef60507ceda42a14d06d6587ed10016468 +Author: Albert Astals Cid +Date: Thu Sep 8 16:18:01 2011 +0200 + + xpdf303: Adapt use of getBlock to our use of getChars + + poppler/Stream.cc | 58 + ++++++++++++++++++++++++++++++++--------------------- + poppler/Stream.h | 2 ++ + 2 files changed, 37 insertions(+), 23 deletions(-) + +commit 2f7701fe730a648d0a1d181c5b20e4802640dc52 +Author: Albert Astals Cid +Date: Thu Sep 8 15:59:27 2011 +0200 + + xpdf303: Adapt xpdf getBlock to our getChars + + poppler/JBIG2Stream.cc | 17 ++++++++ + poppler/JBIG2Stream.h | 2 + + poppler/Stream.cc | 113 + +++++++++++++++++++++++++++++++++++++++++++----- + poppler/Stream.h | 55 ++++++++++++----------- + 4 files changed, 152 insertions(+), 35 deletions(-) + +commit 3a1988db40def1655ec638cd521ed40eadc0acca +Author: Carlos Garcia Campos +Date: Thu Sep 8 15:40:12 2011 +0200 + + xpdf303: empty pages need to call dump to do any setup required by + the OutputDev + + poppler/Page.cc | 4 ++++ + 1 file changed, 4 insertions(+) + +commit 4cddaed21592ac491519a81a003035bc4e618705 +Author: Carlos Garcia Campos +Date: Thu Sep 8 15:35:33 2011 +0200 + + xpdf303: Don't clip the other page boxes to the MediaBox at the + intermediate nodes + + only do it at the leaf (Page) nodes - the other boxes can be specified + before the MediaBox is specified. + I think we already had that change, we checked isPage before clipping, + I've merged this way just to make future merges a bit easier. + + poppler/Page.cc | 16 ++++++++-------- + poppler/Page.h | 3 +++ + 2 files changed, 11 insertions(+), 8 deletions(-) + +commit 3538ac89bfea750de8907847d1d5e3515d0b8be7 +Author: Albert Astals Cid +Date: Thu Sep 8 15:07:21 2011 +0200 + + xpdf303: compile + + poppler/ArthurOutputDev.cc | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) + +commit 89d95d0f254a828d28d943b698eeaec51f03686f +Author: Carlos Garcia Campos +Date: Thu Sep 8 12:38:36 2011 +0200 + + xpdf303: Add codeToGID and codeToGIDLen params to + loadOpenTypeCFFFont() + + poppler/SplashOutputDev.cc | 12 +++++++++++- + splash/SplashFTFontEngine.cc | 29 +++++++++++++++++------------ + splash/SplashFTFontEngine.h | 3 ++- + splash/SplashFontEngine.cc | 6 ++++-- + splash/SplashFontEngine.h | 3 ++- + 5 files changed, 36 insertions(+), 17 deletions(-) + +commit d768204e51e6bdbcac4d6b43537297616cbedbf3 +Author: Albert Astals Cid +Date: Tue Sep 6 21:56:43 2011 +0200 + + xpdf303: Revert b36d150931cd555b84ee996d505e8b91e2afde19 + + Breaks bug164568-2.pdf so our fix was better :-) + + poppler/JBIG2Stream.cc | 91 + +++++++++++++++++++++--------------------------- + poppler/JBIG2Stream.h | 1 - + 2 files changed, 40 insertions(+), 52 deletions(-) + +commit 2230b8f2128edf4994d8a742f562e1b5acf96b74 +Author: Albert Astals Cid +Date: Tue Sep 6 00:05:53 2011 +0200 + + xpdf303: Merge JPXStream changes + + poppler/JPXStream.cc | 1000 + +++++++++++++++++++++++++++++++------------------- + poppler/JPXStream.h | 43 +-- + 2 files changed, 632 insertions(+), 411 deletions(-) + +commit 35bb53feaa2e469253368f03a9835d73aeb1a240 +Author: Albert Astals Cid +Date: Mon Sep 5 23:20:09 2011 +0200 + + xpdf303: Add BufStream + + poppler/Stream.cc | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + poppler/Stream.h | 25 +++++++++++++++++++++++++ + 2 files changed, 71 insertions(+) + +commit 8a9d92fcf05285c1f06bc153aa79d0200d05bbd9 +Author: Albert Astals Cid +Date: Mon Sep 5 22:57:02 2011 +0200 + + xpdf303: CCITTFaxStream header misc fixes + + poppler/Stream.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 22d370c0a1f8c016ebc5a6d8320fe55bfd31c8a7 +Author: Albert Astals Cid +Date: Mon Sep 5 22:53:45 2011 +0200 + + xpdf303: DCTStream misc fixes + + poppler/Stream.cc | 32 ++++++++++++++++++++++++++------ + 1 file changed, 26 insertions(+), 6 deletions(-) + +commit 36d3057546b5a1d717c71b8dcb9773f91e3b5960 +Author: Albert Astals Cid +Date: Mon Sep 5 22:46:59 2011 +0200 + + xpdf303: Add some {} + + poppler/Stream.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +commit 308654eb5dfbb783f29bd645f60c79d5b5fe42c9 +Author: Albert Astals Cid +Date: Mon Sep 5 22:45:50 2011 +0200 + + xpdf303: code1 changed to int in CCITTFaxStream::reset + + poppler/Stream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit f097dc1f9d580eb1cdc8180d3920fe795493cf89 +Author: Albert Astals Cid +Date: Mon Sep 5 22:43:16 2011 +0200 + + xpdf303: Use 32 bits in CCITTFaxStream::lookBits + + poppler/Stream.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit b5417659042c95891aa549cae396ba4cc6604030 +Author: Albert Astals Cid +Date: Mon Sep 5 22:40:02 2011 +0200 + + xpdf303: Check against lookBits returning EOF + + poppler/Stream.cc | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +commit eaf9d31c97a3cc06f4ce94d9190ae1a337634749 +Author: Albert Astals Cid +Date: Mon Sep 5 22:38:05 2011 +0200 + + xpdf303: Set endOfLine to true if code1 is 1 + + poppler/Stream.cc | 1 + + 1 file changed, 1 insertion(+) + +commit a654a77e26a6c7d76c318636303f8c636a3d2495 +Author: Albert Astals Cid +Date: Mon Sep 5 22:36:58 2011 +0200 + + xpdf303: Tweaks to CCITTFaxStream::lookChar + + poppler/Stream.cc | 55 + +++++++++++++++++++++++++++++++++++++++++------------ + 1 file changed, 43 insertions(+), 12 deletions(-) + +commit abdf828449cd543e66f326ba862efcb3ca6d342d +Author: Albert Astals Cid +Date: Mon Sep 5 22:19:30 2011 +0200 + + xpdf303: Remove cygwin workaround + + poppler/Stream.cc | 4 ---- + 1 file changed, 4 deletions(-) + +commit 05ef4227d09381e3a9e8050e447770f44d532386 +Author: Albert Astals Cid +Date: Mon Sep 5 22:18:33 2011 +0200 + + xpdf303: Return false if getLine fails + + poppler/Stream.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit c2d6158bd56328754d77ab8f1bf84d46e6ede773 +Author: Albert Astals Cid +Date: Mon Sep 5 22:14:39 2011 +0200 + + xpdf303: Return NULL if size < 0 + + poppler/Stream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 04947e1dca858b890302a5a1005b84b34255d670 +Author: Albert Astals Cid +Date: Mon Sep 5 22:11:24 2011 +0200 + + xpdf303: Add -rawdates and print Form information + + utils/pdfinfo.cc | 30 +++++++++++++++++++++++++++--- + 1 file changed, 27 insertions(+), 3 deletions(-) + +commit 9529e776e53e71069ba4215cdb8b84592d37b555 +Author: Carlos Garcia Campos +Date: Mon Sep 5 21:19:58 2011 +0200 + + xpdf303: Other fixes in PostScriptFunction + + poppler/Function.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit 071f983f461ba0b872dd93d7f1a24d325312799d +Author: Carlos Garcia Campos +Date: Mon Sep 5 21:19:13 2011 +0200 + + xpdf303: Fixed a bug in the PostScript-type function parser + + Real numbers that start with a decimal point weren't being handled + correctly. + + poppler/Function.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit da0eff1aaa31c2bf357a64b6275645100c9629d4 +Author: Carlos Garcia Campos +Date: Mon Sep 5 21:12:02 2011 +0200 + + xpdf303: Fixes in StitchingFunction + + poppler/Function.cc | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +commit b655316706ec394fa6c8ad076d9d9d96ac8ed563 +Author: Albert Astals Cid +Date: Mon Sep 5 21:05:55 2011 +0200 + + xpdf303: Rework LinkURI decoding + + poppler/Link.cc | 35 +++++++++++++++++++---------------- + 1 file changed, 19 insertions(+), 16 deletions(-) + +commit abad9b4e44d81a206bccff8a109ceb9a7effa2ad +Author: Carlos Garcia Campos +Date: Mon Sep 5 21:00:31 2011 +0200 + + xpdf303: Cache the last transform for PostScript-type functions + + poppler/Function.cc | 37 ++++++++++++++++++++++++++++++++++--- + poppler/Function.h | 2 ++ + 2 files changed, 36 insertions(+), 3 deletions(-) + +commit e1c6b4c6e6df0854b040c9af9ef2d3f6789e24b2 +Author: Albert Astals Cid +Date: Mon Sep 5 21:02:31 2011 +0200 + + xpdf303: Only call getNum if isNum + + poppler/Link.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +commit e5661e1a08c38d4c8d69976a8c1c02c1102bc88c +Author: Carlos Garcia Campos +Date: Mon Sep 5 20:49:13 2011 +0200 + + Optimize SampledFunction + + Pull index computation code out of the transform function; cache the + last transform. + + poppler/Function.cc | 87 + ++++++++++++++++++++++++++++++++++++++++++--------- + poppler/Function.h | 4 ++- + 2 files changed, 75 insertions(+), 16 deletions(-) + +commit b36d150931cd555b84ee996d505e8b91e2afde19 +Author: Albert Astals Cid +Date: Mon Sep 5 20:52:05 2011 +0200 + + xpdf303: Take xpdf way of handling bug 6500 + + poppler/JBIG2Stream.cc | 91 + +++++++++++++++++++++++++++--------------------- + poppler/JBIG2Stream.h | 1 + + 2 files changed, 52 insertions(+), 40 deletions(-) + +commit 065565a67c7826b64d89fac9719049d0a57da721 +Author: Albert Astals Cid +Date: Mon Sep 5 20:39:50 2011 +0200 + + xpdf303: Merge ¿speed? improvements in JBIG2Stream::readGenericBitmap + + poppler/JBIG2Stream.cc | 586 + ++++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 471 insertions(+), 115 deletions(-) + +commit 28adb3884dafcf1d36aae1ec05855b10b22aa4ae +Author: Albert Astals Cid +Date: Mon Sep 5 20:26:57 2011 +0200 + + xpdf303: Change bpp calculation + + poppler/JBIG2Stream.cc | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +commit c163a82f45d869b7c35a1a7141ab237507671f82 +Author: Albert Astals Cid +Date: Mon Sep 5 20:25:04 2011 +0200 + + xpdf303: Change symCodeLen calculation + + poppler/JBIG2Stream.cc | 16 +++++++++++----- + 1 file changed, 11 insertions(+), 5 deletions(-) + +commit 1d1a985101c26f90bde8340dcfae3d6a1e0a08ba +Author: Albert Astals Cid +Date: Mon Sep 5 20:20:03 2011 +0200 + + xpdf303: symCodeLen calculation fix + + poppler/JBIG2Stream.cc | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +commit 5c0274572c65972434293a30f3ba5afd3905005f +Author: Albert Astals Cid +Date: Mon Sep 5 20:07:54 2011 +0200 + + xpdf303: add line accessor + + poppler/JBIG2Stream.cc | 1 + + 1 file changed, 1 insertion(+) + +commit 7b77a264b5c21ba693677b1249a2122743e4e395 +Author: Albert Astals Cid +Date: Mon Sep 5 19:46:16 2011 +0200 + + xpdf303: segments with unspecified length + + poppler/JBIG2Stream.cc | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +commit 23066e8e8309babd61ade9f50ef7d82c9e275055 +Author: Albert Astals Cid +Date: Mon Sep 5 19:41:16 2011 +0200 + + xpdf303: More EOF detection + + poppler/JBIG2Stream.cc | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +commit bc6eded798d6e5dc7a58f88afbe4ab2904698db5 +Author: Albert Astals Cid +Date: Mon Sep 5 19:38:29 2011 +0200 + + xpdf303: Comment++ + + poppler/JBIG2Stream.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit adb98856a745340b4ffb34ffd2ed701600cfc82f +Author: Albert Astals Cid +Date: Mon Sep 5 19:38:02 2011 +0200 + + xpdf303: Exit loop in case of EOF + + poppler/JBIG2Stream.cc | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +commit 112154567ebcab63959294533b00075d6ca6ea65 +Author: Albert Astals Cid +Date: Mon Sep 5 19:33:27 2011 +0200 + + xpdf303: Initialize to NULL + + poppler/JBIG2Stream.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit b9ecfdf4cb27a19e65817af51c048e8030825035 +Author: Albert Astals Cid +Date: Mon Sep 5 19:27:36 2011 +0200 + + xpdf303: Delay memory allocation up to when it is really needed + + poppler/CMap.cc | 58 + ++++++++----------------------------------------------- + poppler/CMap.h | 2 -- + 2 files changed, 8 insertions(+), 52 deletions(-) + +commit 7af7b4b2d1941ee9dcd575535d4fc31f29026d8d +Author: Carlos Garcia Campos +Date: Mon Sep 5 19:05:31 2011 +0200 + + xpdf303: Rework initialization of appearance state + + Merged a slightly different patch, adding an error when the AS + entry is + missing and the AP contains one or more subdictionaries. + + poppler/Annot.cc | 62 + ++++++++++++++++++++++++++++++------------------------ + 1 file changed, 34 insertions(+), 28 deletions(-) + +commit f7d307b818bca9553a05b5d43deb429abbf04824 +Author: Carlos Garcia Campos +Date: Sun Sep 4 13:56:35 2011 +0200 + + xpdf303: Rewrote the code that handles annotation transforms + + It was not handling non-rectangular transforms correctly. + + poppler/Gfx.cc | 143 + +++++++++++++++++++++++++++++--------------------------- + 1 file changed, 75 insertions(+), 68 deletions(-) + +commit 4609f9feeca22620c6e143962a3717784a843a68 +Author: Carlos Garcia Campos +Date: Sun Sep 4 13:09:50 2011 +0200 + + xpdf303: Implement rotation in the form field appearance regeneration + + poppler/Annot.cc | 51 + ++++++++++++++++++++++++++++++++++++++------------- + 1 file changed, 38 insertions(+), 13 deletions(-) + +commit ca7d77a27e2f3a692842968f08dcb9fa5379bf0f +Author: Carlos Garcia Campos +Date: Sun Sep 4 11:53:40 2011 +0200 + + Create forms with a PDFDoc instead of XRef too + + poppler/Form.cc | 79 + ++++++++++++++++++++++++++++--------------------------- + poppler/Form.h | 28 +++++++++++--------- + 2 files changed, 55 insertions(+), 52 deletions(-) + +commit ec52e46e309a0307fdf12113a1b7d41a760f9d6c +Author: Carlos Garcia Campos +Date: Sun Sep 4 11:32:38 2011 +0200 + + xpdf303: Create annots with a doc instead of xref + catalog + + glib/poppler-action.cc | 2 +- + glib/poppler-annot.cc | 4 +- + poppler/Annot.cc | 364 + ++++++++++++++++++++++++------------------------ + poppler/Annot.h | 128 ++++++++--------- + poppler/Catalog.cc | 9 +- + poppler/Form.cc | 22 +-- + poppler/Form.h | 11 +- + poppler/PSOutputDev.cc | 2 +- + poppler/Page.cc | 2 +- + 9 files changed, 274 insertions(+), 270 deletions(-) + +commit ce5e620f07e984927610866467705bb526f9ad8d +Author: Carlos Garcia Campos +Date: Sat Sep 3 11:05:42 2011 +0200 + + xpdf303: Handle the case where sid < 0 + + fofi/FoFiType1C.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 9d77f999de973f3c547245bca0568f8984faa5d7 +Author: Carlos Garcia Campos +Date: Sat Sep 3 11:02:55 2011 +0200 + + xpdf303: Initialize nFDs in FoFiType1C::parse() + + fofi/FoFiType1C.cc | 1 + + 1 file changed, 1 insertion(+) + +commit d9594c95713ac79b46e313ecf2875196ea076ef4 +Author: Carlos Garcia Campos +Date: Sat Sep 3 11:01:28 2011 +0200 + + xpdf303: Check whether fdSelect is NULL before using it + + fofi/FoFiType1C.cc | 10 ++++++---- + 1 file changed, 6 insertions(+), 4 deletions(-) + +commit 4e4a8ec52c5662e21036f219636a39fc97a32353 +Author: Carlos Garcia Campos +Date: Sat Sep 3 10:52:14 2011 +0200 + + xpdf303: Add writePSString() helper function to FoFiType1C + + fofi/FoFiType1C.cc | 68 + ++++++++++++++++++++++++++++++++++++++-------------- + fofi/FoFiType1C.h | 1 + + 2 files changed, 51 insertions(+), 18 deletions(-) + +commit ff03811db1ef833df4bab12fe3bf3a8c1534c174 +Author: Carlos Garcia Campos +Date: Sat Sep 3 10:40:15 2011 +0200 + + xpdf303: More checks in GooString + + goo/GooString.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 0029efbe2a8a97ff34353f8028ac649b2fd07013 +Author: Carlos Garcia Campos +Date: Sat Sep 3 10:32:14 2011 +0200 + + xpdf303: Use a double instead of an int with a cast + + goo/GooString.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 419ee8c30ba0df02e9f0281b321fbe38387e5a21 +Author: Carlos Garcia Campos +Date: Fri Sep 2 18:44:04 2011 +0200 + + xpdf303: Add more formats to GooString + + goo/GooString.cc | 102 + +++++++++++++++++++++++++++++++++++++++++++++++++----- + goo/GooString.h | 21 +++++++++-- + 2 files changed, 111 insertions(+), 12 deletions(-) + +commit 738a6954da01fd3fc8c1cd5baa49fc7b8c959169 +Author: Carlos Garcia Campos +Date: Fri Sep 2 18:24:04 2011 +0200 + + xpdf303: Add getGlyphName() to FoFiType1C + + fofi/FoFiType1C.cc | 12 ++++++++++++ + fofi/FoFiType1C.h | 4 ++++ + 2 files changed, 16 insertions(+) + +commit 39b77a193996b0916690a246f4a9874dad596b2f +Author: Carlos Garcia Campos +Date: Fri Sep 2 18:17:51 2011 +0200 + + xpdf303: Improvements in FoFiType1 parser + + fofi/FoFiType1.cc | 75 + +++++++++++++++++++++++++---------------------------- + 1 file changed, 35 insertions(+), 40 deletions(-) + +commit 44dbb28a07125f92a0835aea7ad3403310bc451d +Author: Carlos Garcia Campos +Date: Fri Sep 2 18:08:39 2011 +0200 + + xpdf303: Handle PFB headers in Type 1 font files + + fofi/FoFiType1.cc | 36 ++++++++++++++++++++++++++++++++++++ + fofi/FoFiType1.h | 1 + + 2 files changed, 37 insertions(+) + +commit 9531a52b227a994ab8e0d66aeaff2b21358ca73e +Author: Carlos Garcia Campos +Date: Fri Sep 2 18:01:35 2011 +0200 + + xpdf303: New signature of methods convertToCIDType0() and + convertToType0() + + fofi/FoFiTrueType.cc | 8 ++--- + fofi/FoFiTrueType.h | 4 +-- + fofi/FoFiType1C.cc | 84 + ++++++++++++++++++++++++++++++++++-------------- + fofi/FoFiType1C.h | 19 ++++++++--- + poppler/PSOutputDev.cc | 13 ++++++-- + 5 files changed, 91 insertions(+), 37 deletions(-) + +commit 830d2b40770333489a08f23a3b16a372770a8d19 +Author: Albert Astals Cid +Date: Thu Sep 1 23:23:57 2011 +0200 + + xpdf303: Use openFile + + poppler/CharCodeToUnicode.cc | 4 ++-- + poppler/GlobalParams.cc | 10 +++++----- + 2 files changed, 7 insertions(+), 7 deletions(-) + +commit ddf9d6e35b40b902519cbaa8cb664ba6dfdfd510 +Author: Albert Astals Cid +Date: Thu Sep 1 23:21:26 2011 +0200 + + xpdf303: openFile + minor fixes for openTempFile in Windows + + goo/gfile.cc | 108 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++-- + goo/gfile.h | 13 +++++++ + 2 files changed, 118 insertions(+), 3 deletions(-) + +commit 68e8fa9ff4f13b6703148b3eb6ea628418211243 +Author: Albert Astals Cid +Date: Thu Sep 1 23:17:59 2011 +0200 + + xpdf303: make gcc happy + + fofi/FoFiType1C.cc | 2 ++ + 1 file changed, 2 insertions(+) + +commit 876021b1aa16ad38767a91e1be31c392f368fde2 +Author: Carlos Garcia Campos +Date: Thu Sep 1 19:07:01 2011 +0200 + + xpdf303: Add getFontMatrix() + + fofi/FoFiTrueType.cc | 76 + ++++++++++++++++++++++++++++++-------------------- + fofi/FoFiTrueType.h | 9 ++++++ + fofi/FoFiType1.cc | 37 ++++++++++++++++++++++++ + fofi/FoFiType1.h | 4 +++ + fofi/FoFiType1C.cc | 29 +++++++++++++++++++ + fofi/FoFiType1C.h | 3 ++ + 6 files changed, 127 insertions(+), 31 deletions(-) + +commit 1369862ed61ef8b0f81c52fce36f6c1602d82ddb +Author: Carlos Garcia Campos +Date: Thu Sep 1 18:27:51 2011 +0200 + + xpdf303: Ignore entries that have an invalid tag too + + fofi/FoFiTrueType.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +commit 0fe7cc82e84dc2a3b79248b111656e5e7df9fdc2 +Author: Carlos Garcia Campos +Date: Thu Sep 1 18:21:33 2011 +0200 + + xpdf303: Update cmap, name, post and os2 tables in FoFiTrueType + + fofi/FoFiTrueType.cc | 29 ++++++++++++++++------------- + 1 file changed, 16 insertions(+), 13 deletions(-) + +commit 0feebf5f3c9da8d7a1154456a00492a623340cec +Author: Carlos Garcia Campos +Date: Thu Sep 1 18:16:59 2011 +0200 + + xpdf303: Ignore any bogus entries in the table directory + + It's a different approach to fix the same issue we had already fixed, + added just to make future merge easier. We were also reallocating the + tables array, I've kept that but doing it only when the size actually + changes. + + fofi/FoFiTrueType.cc | 25 +++++++++++++------------ + 1 file changed, 13 insertions(+), 12 deletions(-) + +commit 68c6ebc78b89eec94a9c3538fe6e27561a21b680 +Author: Carlos Garcia Campos +Date: Thu Sep 1 17:49:46 2011 +0200 + + xpdf303: codeToGID items can be < 0 now + + fofi/FoFiTrueType.cc | 12 ++++++++++-- + poppler/PSOutputDev.cc | 2 +- + splash/SplashFTFont.cc | 2 +- + 3 files changed, 12 insertions(+), 4 deletions(-) + +commit 19204ed5cd5cb64809f1a1f51dd5ffdef2b9417a +Author: Albert Astals Cid +Date: Thu Sep 1 17:28:39 2011 +0200 + + xpdf303: CMap::getCID signature change + + poppler/CMap.cc | 47 +++++++++++++++++++++++++++++++---------------- + poppler/CMap.h | 8 +++++--- + poppler/GfxFont.cc | 6 ++++-- + 3 files changed, 40 insertions(+), 21 deletions(-) + +commit 9c74bef77e7e1d7a8464dff43cae16bb1206665e +Author: Albert Astals Cid +Date: Thu Sep 1 17:04:04 2011 +0200 + + xpdf303: Use splashDist instead of splashSqrt + + splash/SplashT1Font.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 0568d0dc3c42b68b715226e5ce0ff98d73a94ac7 +Author: Albert Astals Cid +Date: Thu Sep 1 17:01:30 2011 +0200 + + xpdf303: Do the multiplication the other way around + + No idea why :-D + + splash/SplashFTFont.cc | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +commit 3c0da502aa1d5b1acae01cf1e43fb96f5ecc11da +Author: Albert Astals Cid +Date: Thu Sep 1 17:00:31 2011 +0200 + + xpdf303: Use splashCheckDet isntead of splashAbs + + splash/SplashFontEngine.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 2b4303c66f8de9a267413465898897fd6b0ebb17 +Author: Albert Astals Cid +Date: Thu Sep 1 16:51:53 2011 +0200 + + xpdf303: Bigger fileKey + + poppler/XRef.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 53060857e31a01413936fbe33b7032a0a325b384 +Author: Albert Astals Cid +Date: Thu Sep 1 16:50:08 2011 +0200 + + xpdf303: Merge JArithmeticDecoder.* + + poppler/JArithmeticDecoder.cc | 47 + +++++++++++++++++++++++++++++++++++------ + poppler/JArithmeticDecoder.h | 4 ++++ + 2 files changed, 44 insertions(+), 7 deletions(-) + +commit 0722960b4cf4ce40b6bd278ac7287d64a1d70bf2 +Author: Albert Astals Cid +Date: Thu Sep 1 16:48:31 2011 +0200 + + xpdf303: Do not crash if imgStr->getLine() is NULL + + utils/ImageOutputDev.cc | 21 ++++++++++++++------- + 1 file changed, 14 insertions(+), 7 deletions(-) + +commit f848edab849910b8291c7974e484ef5d02b2234c +Author: Albert Astals Cid +Date: Thu Sep 1 16:42:30 2011 +0200 + + xpdf303: Do not extract the million tiles of a pattern + + utils/ImageOutputDev.cc | 9 +++++++++ + utils/ImageOutputDev.h | 12 ++++++++++++ + 2 files changed, 21 insertions(+) + +commit 01adb7ef6a524d7313a45e7c5f441da4fd0250bd +Author: Albert Astals Cid +Date: Thu Sep 1 16:31:50 2011 +0200 + + xpdf303: Assembler for some functions + + splash/SplashMath.h | 110 + +++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 110 insertions(+) + +commit 4f87a3163f133565e8774ef416e67d05f906723d +Author: Albert Astals Cid +Date: Thu Sep 1 16:25:19 2011 +0200 + + xpdf303: Add splashAvg + + splash/SplashMath.h | 8 ++++++++ + 1 file changed, 8 insertions(+) + +commit 64cf42f89939763d105be4948a20e9ecb81a64c1 +Author: Albert Astals Cid +Date: Thu Sep 1 16:23:08 2011 +0200 + + xpdf303: Add getters to SplashClip + + splash/SplashClip.h | 6 ++++++ + 1 file changed, 6 insertions(+) + +commit 28c6a55742f55a719ef63b8e0eff7c242653cf36 +Author: Albert Astals Cid +Date: Thu Sep 1 16:17:56 2011 +0200 + + xpdf303: unneeded forward declare + + poppler/Page.h | 1 - + 1 file changed, 1 deletion(-) + +commit 38ebe8c568aafbe5f248f9e0a654f46829e0b659 +Author: Albert Astals Cid +Date: Thu Sep 1 16:13:53 2011 +0200 + + xpdf303: Page functions do not need Catalog * anymore + + glib/poppler-document.cc | 2 +- + glib/poppler-page.cc | 11 ++++----- + poppler/FontInfo.cc | 2 +- + poppler/OutputDev.h | 4 ++-- + poppler/PDFDoc.cc | 8 +++---- + poppler/PSOutputDev.cc | 6 ++--- + poppler/PSOutputDev.h | 2 +- + poppler/Page.cc | 36 + +++++++++++++++--------------- + poppler/Page.h | 16 ++++++------- + poppler/TextOutputDev.cc | 2 +- + poppler/TextOutputDev.h | 2 +- + qt4/src/poppler-link-extractor-private.h | 2 +- + qt4/src/poppler-link-extractor.cc | 4 ++-- + qt4/src/poppler-page.cc | 4 ++-- + utils/HtmlOutputDev.cc | 9 ++++---- + utils/HtmlOutputDev.h | 7 +++--- + utils/pdftohtml.cc | 2 +- + 17 files changed, 58 insertions(+), 61 deletions(-) + +commit 7d794f6411499fb8f26778bf2b54cb9734d004af +Author: Albert Astals Cid +Date: Thu Sep 1 15:47:32 2011 +0200 + + xpdf303: API rework, Gfx wants a PDFDoc instead of an XRef + + cpp/poppler-page-renderer.cpp | 2 +- + glib/poppler-document.cc | 2 +- + glib/poppler-page.cc | 2 -- + poppler/CairoFontEngine.cc | 28 ++++++++++++---------------- + poppler/CairoFontEngine.h | 13 ++++++------- + poppler/CairoOutputDev.cc | 12 +++++------- + poppler/CairoOutputDev.h | 6 +++--- + poppler/Catalog.cc | 8 +++++--- + poppler/Catalog.h | 4 +++- + poppler/Gfx.cc | 15 +++++++++------ + poppler/Gfx.h | 6 ++++-- + poppler/PDFDoc.cc | 6 +++--- + poppler/PSOutputDev.cc | 29 +++++++++++++++-------------- + poppler/PSOutputDev.h | 9 ++++----- + poppler/Page.cc | 8 +++++--- + poppler/Page.h | 4 +++- + poppler/PreScanOutputDev.cc | 6 +++--- + poppler/PreScanOutputDev.h | 4 ++-- + poppler/SplashOutputDev.cc | 13 +++++++------ + poppler/SplashOutputDev.h | 5 +++-- + qt4/src/poppler-private.h | 2 +- + qt4/src/poppler-ps-converter.cc | 2 -- + test/gtk-test.cc | 2 +- + test/pdf-inspector.cc | 2 +- + test/perf-test.cc | 2 +- + utils/pdftocairo.cc | 2 +- + utils/pdftohtml.cc | 6 +++--- + utils/pdftoppm.cc | 2 +- + utils/pdftops.cc | 4 ++-- + 29 files changed, 105 insertions(+), 101 deletions(-) + +commit 52fb80a7b3f98eb8322a7ba84e2900f044b3a18a +Author: Albert Astals Cid +Date: Thu Sep 1 13:27:01 2011 +0200 + + xpdf303: compile++ + + poppler/ArthurOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 37ca8dc4215693ec657d165ebdb6c315a0ae92c9 +Author: Carlos Garcia Campos +Date: Thu Sep 1 12:34:32 2011 +0200 + + xpdf303: Use int instead of Gushort for gid/cid maps + + fofi/FoFiTrueType.cc | 18 +++++++++--------- + fofi/FoFiTrueType.h | 14 +++++++------- + fofi/FoFiType1C.cc | 8 ++++---- + fofi/FoFiType1C.h | 2 +- + poppler/CairoFontEngine.cc | 22 +++++++++++----------- + poppler/CairoFontEngine.h | 8 ++++---- + poppler/GfxFont.cc | 22 +++++++++++----------- + poppler/GfxFont.h | 10 +++++----- + poppler/PSOutputDev.cc | 14 +++++++------- + poppler/SplashOutputDev.cc | 6 +++--- + splash/SplashFTFontEngine.cc | 6 +++--- + splash/SplashFTFontEngine.h | 2 +- + splash/SplashFTFontFile.cc | 12 ++++++------ + splash/SplashFTFontFile.h | 8 ++++---- + splash/SplashFontEngine.cc | 2 +- + splash/SplashFontEngine.h | 2 +- + 16 files changed, 78 insertions(+), 78 deletions(-) + +commit df942e25bff9b014bde0ff69c8a01fa3c1963015 +Author: Albert Astals Cid +Date: Thu Sep 1 01:08:10 2011 +0200 + + xpdf303: More parsing flexibility + + poppler/CharCodeToUnicode.cc | 18 ++++++------------ + 1 file changed, 6 insertions(+), 12 deletions(-) + +commit 5305dfc5702e8004e5ae35697c6aebd0b1a5c96e +Author: Albert Astals Cid +Date: Thu Sep 1 01:05:02 2011 +0200 + + xpdf303: Make sure codes are inside the range + + poppler/CharCodeToUnicode.cc | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +commit 45212483572c68abd612b5c62b21cbb545e10143 +Author: Albert Astals Cid +Date: Thu Sep 1 01:01:13 2011 +0200 + + xpdf303: change mapLen growing stragegy + + poppler/CharCodeToUnicode.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 75d70f190e97f69047cdbe97a872a936788392d9 +Author: Albert Astals Cid +Date: Thu Sep 1 01:00:23 2011 +0200 + + xpdf303: Limit code to 0xffffff + + poppler/CharCodeToUnicode.cc | 5 +++++ + 1 file changed, 5 insertions(+) + +commit b4180a187f9246b6390df112e5536ead9ef9bcbe +Author: Albert Astals Cid +Date: Thu Sep 1 00:59:09 2011 +0200 + + xpdf303: Use parseHex instead of sscanf + + poppler/CharCodeToUnicode.cc | 18 ++++++++---------- + 1 file changed, 8 insertions(+), 10 deletions(-) + +commit 121f648f233adcdc631c7e29d67b60baa922e29a +Author: Albert Astals Cid +Date: Thu Sep 1 00:28:40 2011 +0200 + + Add helper parseHex function + + poppler/CharCodeToUnicode.cc | 35 +++++++++++++++++++++++++++++++++++ + 1 file changed, 35 insertions(+) + +commit be0436ace671070bab4304efee607f40c959bc55 +Author: Albert Astals Cid +Date: Thu Sep 1 00:26:57 2011 +0200 + + xpdf303: CharCodeToUnicode::makeIdentityMapping & friends + + poppler/CharCodeToUnicode.cc | 25 +++++++++++++++++++++++++ + poppler/CharCodeToUnicode.h | 4 ++++ + 2 files changed, 29 insertions(+) + +commit 5dd94447b14db1894f06ad0590187dae7575e33a +Author: Albert Astals Cid +Date: Thu Sep 1 00:15:59 2011 +0200 + + xpdf303: Remove unused constructor + + splash/SplashXPath.cc | 5 ----- + splash/SplashXPath.h | 1 - + 2 files changed, 6 deletions(-) + +commit d00d56e4a46e8534378534de0d94ce0551d75d84 +Author: Albert Astals Cid +Date: Thu Sep 1 00:11:49 2011 +0200 + + xpdf303: Speedup SplashScreen + + By using << instead of * and by putting some functions on the header + so they can be inlined + + splash/SplashScreen.cc | 89 + ++++++++++++++++-------------------------------- + splash/SplashScreen.h | 14 ++++++-- + 2 files changed, 42 insertions(+), 61 deletions(-) + +commit 5e8debf96ab1bb9db31a0332a482d08c181d52ea +Author: Albert Astals Cid +Date: Wed Aug 31 23:56:52 2011 +0200 + + xpdf303: Add splashCheckDet helper + + splash/SplashMath.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +commit 4cef5a52b33b1afba28d890bbe48000b734ac357 +Author: Albert Astals Cid +Date: Wed Aug 31 21:09:50 2011 +0200 + + xpdf303: Protect against NULL from lexer->getStream() + + poppler/Parser.cc | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +commit 2547ec60db6d954e5c8318e30fcc54f70bcfa95c +Author: Albert Astals Cid +Date: Wed Aug 31 21:05:11 2011 +0200 + + xpdf303: Add GBool force = gFalse to SplashPath::close + + splash/SplashPath.cc | 5 +++-- + splash/SplashPath.h | 6 ++++-- + 2 files changed, 7 insertions(+), 4 deletions(-) + +commit 9370f9640a24c7b944f3da7c10e070a960bdd8f9 +Author: Albert Astals Cid +Date: Wed Aug 31 21:01:32 2011 +0200 + + xpdf303: Add guards to the header + + poppler/Stream-CCITT.h | 5 +++++ + 1 file changed, 5 insertions(+) + +commit ab9dea663a4df5af8f54c1ff5149254adfd72ce9 +Author: Albert Astals Cid +Date: Wed Aug 31 20:34:17 2011 +0200 + + xpdf303: Add SplashBitmap::writeAlphaPGMFile and + SplashBitmap::takeData + + splash/SplashBitmap.cc | 22 ++++++++++++++++++++++ + splash/SplashBitmap.h | 6 ++++++ + 2 files changed, 28 insertions(+) + +commit 6558d735c65a3dca9b9e16de5588c8b8c482f04f +Author: Albert Astals Cid +Date: Wed Aug 31 20:30:27 2011 +0200 + + xpdf303: Write faster + + splash/SplashBitmap.cc | 14 ++------------ + 1 file changed, 2 insertions(+), 12 deletions(-) + +commit a9b26d9c35fccc7b46a96acdb2064a9976bd49bd +Author: Albert Astals Cid +Date: Wed Aug 31 20:29:58 2011 +0200 + + xpdf303: Only free data if there is data to free + + splash/SplashBitmap.cc | 11 ++++++----- + 1 file changed, 6 insertions(+), 5 deletions(-) + +commit 8f6e0285d7e80d8c1a8defaad9d0f87a2e054151 +Author: Albert Astals Cid +Date: Wed Aug 31 20:20:47 2011 +0200 + + xpdf303: PDFDocEncoding changes + + This overwrites Michael Vrable's changes of using U+FFFD to actually + using the order, i'm taking Derek's change here + + poppler/PDFDocEncoding.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit 9c8f30fb4a2a0dd2cf359610e33749e1682921c7 +Author: Albert Astals Cid +Date: Wed Aug 31 20:17:38 2011 +0200 + + xpdf303: comment changes + + poppler/Link.h | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +commit b78046057657b44c5cc9353d9e3dde356eb7fcbd +Author: Albert Astals Cid +Date: Wed Aug 31 19:32:03 2011 +0200 + + xpdf303: Introduce unicodeTypeNum and unicodeTypeAlphaNum + + poppler/UnicodeTypeTable.cc | 11 +++++++++++ + poppler/UnicodeTypeTable.h | 4 ++++ + 2 files changed, 15 insertions(+) + +commit 0ec4b390ddb7fa7d028b8f0515ecd3e61c488c9f +Author: Albert Astals Cid +Date: Wed Aug 31 19:30:55 2011 +0200 + + xpdf303: UnicodeTypeTable tables changes + + poppler/UnicodeTypeTable.cc | 28 ++++++++++++++-------------- + 1 file changed, 14 insertions(+), 14 deletions(-) + +commit f331c009f94703d6007fce9570ee19c6e4822339 +Author: Albert Astals Cid +Date: Wed Aug 31 19:20:12 2011 +0200 + + xpdf303: Remove warning() from Error.h + + poppler/CairoOutputDev.cc | 6 +++--- + poppler/Error.cc | 7 ------- + poppler/Error.h | 1 - + 3 files changed, 3 insertions(+), 11 deletions(-) + +commit 53f94df2ce21793914ccc153ba6b2fe5cbeb8371 +Author: Albert Astals Cid +Date: Wed Aug 31 19:17:13 2011 +0200 + + Port to setErrorCallback + + cpp/poppler-document.cpp | 2 +- + cpp/poppler-private.cpp | 6 ++---- + cpp/poppler-private.h | 3 ++- + qt4/src/poppler-private.cc | 8 +++----- + test/perf-test.cc | 4 ++-- + 5 files changed, 10 insertions(+), 13 deletions(-) + +commit 95a52f06a98f49f7c8f2b92634b75af96b4eee1d +Author: Albert Astals Cid +Date: Wed Aug 31 19:07:22 2011 +0200 + + xpdf303: Forgot this when doing the char * -> const char * + + poppler/JPXStream.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 00549400f155d8e36b4ac718603fc945858fe50d +Author: Albert Astals Cid +Date: Wed Aug 31 19:04:14 2011 +0200 + + xpdf303: error() changes, new param and formatting + + fofi/FoFiBase.cc | 8 +-- + fofi/FoFiTrueType.cc | 2 +- + fofi/FoFiType1.cc | 4 +- + goo/JpegWriter.cc | 2 +- + goo/PNGWriter.cc | 16 ++--- + poppler/Annot.cc | 40 +++++------ + poppler/ArthurOutputDev.cc | 16 ++--- + poppler/CMap.cc | 26 +++---- + poppler/CachedFile.cc | 2 +- + poppler/CairoFontEngine.cc | 10 +-- + poppler/Catalog.cc | 50 ++++++------- + poppler/CharCodeToUnicode.cc | 54 +++++++------- + poppler/CurlCachedFile.cc | 2 +- + poppler/DCTStream.cc | 2 +- + poppler/Decrypt.cc | 2 +- + poppler/Error.cc | 55 +++++++++----- + poppler/Error.h | 23 +++++- + poppler/FileSpec.cc | 8 +-- + poppler/Form.cc | 44 ++++++------ + poppler/Function.cc | 107 ++++++++++++++------------- + poppler/Gfx.cc | 161 + ++++++++++++++++++++--------------------- + poppler/GfxFont.cc | 102 +++++++++++++------------- + poppler/GfxState.cc | 128 ++++++++++++++++----------------- + poppler/GfxState.h | 8 +-- + poppler/GlobalParams.cc | 38 +++++----- + poppler/GlobalParamsWin.cc | 4 +- + poppler/Hints.cc | 22 +++--- + poppler/JBIG2Stream.cc | 88 +++++++++++------------ + poppler/JPEG2000Stream.cc | 10 +-- + poppler/JPXStream.cc | 164 + +++++++++++++++++++++--------------------- + poppler/Lexer.cc | 24 +++---- + poppler/Linearization.cc | 20 +++--- + poppler/Link.cc | 77 ++++++++++---------- + poppler/Movie.cc | 2 +- + poppler/Object.h | 8 +-- + poppler/OptionalContent.cc | 14 ++-- + poppler/PDFDoc.cc | 43 ++++++----- + poppler/PDFDocFactory.cc | 2 +- + poppler/PSOutputDev.cc | 45 ++++++------ + poppler/Page.cc | 12 ++-- + poppler/Parser.cc | 10 +-- + poppler/Rendition.cc | 6 +- + poppler/SecurityHandler.cc | 12 ++-- + poppler/SplashOutputDev.cc | 28 ++++---- + poppler/Stream.cc | 116 +++++++++++++++++------------- + poppler/TextOutputDev.cc | 2 +- + poppler/UnicodeMap.cc | 15 ++-- + poppler/XRef.cc | 32 ++++----- + splash/Splash.cc | 2 +- + splash/SplashBitmap.cc | 6 +- + test/perf-test.cc | 4 +- + utils/HtmlOutputDev.cc | 18 ++--- + utils/ImageOutputDev.cc | 10 +-- + utils/pdfextract.cc | 4 +- + utils/pdfimages.cc | 2 +- + utils/pdfinfo.cc | 6 +- + utils/pdfmerge.cc | 6 +- + utils/pdftocairo.cc | 6 +- + utils/pdftohtml.cc | 6 +- + utils/pdftops.cc | 6 +- + utils/pdftotext.cc | 12 ++-- + 61 files changed, 912 insertions(+), 842 deletions(-) + +commit cd0764921064bfd455e9df52dc9bda6fbd2c2db2 +Author: Carlos Garcia Campos +Date: Wed Aug 31 17:23:28 2011 +0200 + + xpdf303: Always define at least 256 glyphs for Type 0 fonts + + fofi/FoFiTrueType.cc | 41 ++++++++++++++++++++++++++++++++++------- + fofi/FoFiTrueType.h | 3 ++- + 2 files changed, 36 insertions(+), 8 deletions(-) + +commit 4d4318e258fb68704b1a51a14fa89134606e2aa7 +Author: Carlos Garcia Campos +Date: Wed Aug 31 17:07:25 2011 +0200 + + xpdf303: Different growing strategy for vmtxTab in FoFiTrueType + + fofi/FoFiTrueType.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit c8c7fcef9bc8f802be2d376c9d2099971f159317 +Author: Carlos Garcia Campos +Date: Wed Aug 31 17:05:16 2011 +0200 + + xpdf303: Fix memory leak in FoFiTrueType + + fofi/FoFiTrueType.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +commit 655b1a97db5449c009e5b63fc7c12233e6fae450 +Author: Carlos Garcia Campos +Date: Wed Aug 31 16:54:05 2011 +0200 + + xpdf303: Check for an invalid loca format field in the head table + in FoFiTrueType + + fofi/FoFiTrueType.cc | 7 +++++++ + 1 file changed, 7 insertions(+) + +commit 9710ab96f1cf26394cc473952a3331d60c149451 +Author: Carlos Garcia Campos +Date: Wed Aug 31 16:49:54 2011 +0200 + + Fix the build + + fofi/FoFiIdentifier.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +commit 36b733a3165fd26aa8c25ba57faa5d2277aa31ec +Author: Carlos Garcia Campos +Date: Tue Aug 30 16:31:52 2011 +0200 + + xpdf303: Handle bogus loca table entries in FoFiTrueType + + where the offset is past the end of the glyf table. This part was + missing in previous commit. + + fofi/FoFiTrueType.cc | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +commit a288bdb417582f07a5a0cb13d5218946a1d0ccc8 +Author: Albert Astals Cid +Date: Tue Aug 30 21:55:43 2011 +0200 + + xpdf303: Increase max keyLength to 32 + + poppler/XRef.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +commit 12e0acd9d393df76e297bb3fde323092c428be21 +Author: Albert Astals Cid +Date: Tue Aug 30 21:03:05 2011 +0200 + + xpdf303: GfxXXXpath different growing strategy + + poppler/GfxState.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +commit 7c5e496715f56498fb1aa08371d2b8d4d0e73d25 +Author: Albert Astals Cid +Date: Tue Aug 30 20:59:36 2011 +0200 + + xpdf303: No need for 4 Guint when 1 is enough + + poppler/GfxState.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +commit e7e8082901e108130d5c98cc7648f143978c9562 +Author: Albert Astals Cid +Date: Tue Aug 30 20:50:17 2011 +0200 -commit 0de477817e424078cfcfcae114e7745809f0848d -Author: Adrian Johnson -Date: Mon Sep 19 21:57:07 2011 +0930 + xpdf303: GooList::copy, GooList::reverse and GooList::put - utils: Add Glyph & Cog copyright to pdfmerge and pdfextract man pages + goo/GooList.cc | 22 ++++++++++++++++++++++ + goo/GooList.h | 10 ++++++++++ + 2 files changed, 32 insertions(+) - utils/pdfextract.1 | 3 ++- - utils/pdfmerge.1 | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) +commit 8a119cf205467c20269e7beffde9497ffd277c15 +Author: Albert Astals Cid +Date: Tue Aug 30 20:48:40 2011 +0200 -commit ce7372db64ee807dc2b491e121fbe557dbf697e8 -Author: Adrian Johnson -Date: Mon Sep 19 22:04:27 2011 +0930 + xpdf303: Inserting with a negative i means prepending - regtest: render cairo at 72ppi + goo/GooList.cc | 3 +++ + 1 file changed, 3 insertions(+) - For consistency with splash. It is faster and easier to compare with - splash results. +commit 95142a8e63e476324e368785001a23d4f1d462b9 +Author: Albert Astals Cid +Date: Tue Aug 30 20:47:12 2011 +0200 - regtest/backends/cairo.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + xpdf303: If size is 0 reserve 8 anyway -commit 6cf7330089c4dcc1099906d9c37c3607a2a1eeba -Author: Carlos Garcia Campos -Date: Mon Sep 19 18:42:35 2011 +0200 + goo/GooList.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - regtest: Ignore checksums of crashed, failed and stderr files +commit bd1076da03f76fb62998a9409d366412f4aa5d13 +Author: Albert Astals Cid +Date: Tue Aug 30 20:45:36 2011 +0200 - They shouldn't have a checksum, but it might happen with md5 files - generated with previous versions. + xpdf303: Complain for gmalloc and grealloc < 0 - regtest/backends/__init__.py | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + goo/gmem.cc | 28 ++++++++++++++++++++++++---- + 1 file changed, 24 insertions(+), 4 deletions(-) -commit 6512bf1c5dab37058460882fec3407b396830981 +commit 5a42b3693a9e501a27d790d4aeafcb68f63cb950 Author: Albert Astals Cid -Date: Sun Sep 18 18:38:32 2011 +0200 +Date: Tue Aug 30 20:38:39 2011 +0200 - Render at 72 instead of 150, it's faster :D + xpdf303: Honor the deleteKeys setting - regtest/backends/splash.py | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + goo/GooHash.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) -commit b828f63ed3896a22f3fe7ddbe2ec2f549d7a2c62 +commit d584b54eff52c47f983947b2aff0967dfed0ccf9 Author: Albert Astals Cid -Date: Sun Sep 18 18:20:47 2011 +0200 +Date: Tue Aug 30 20:36:03 2011 +0200 - install pdfextract and pdfmerge manpages + xpdf303: set to NULL on failure - utils/CMakeLists.txt | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + goo/gfile.cc | 2 ++ + 1 file changed, 2 insertions(+) -commit 986759dfbe85998c85ee9b0825c7522395567531 -Author: Thomas Freitag -Date: Sun Sep 18 18:19:30 2011 +0200 +commit bf2cb5c9c47b4a61192101f0a48771657228e383 +Author: Adrian Johnson +Date: Tue Aug 30 19:08:40 2011 +0930 - pdfextract and pdfmerge man pages + Fix compile error with libpng >= 1.5.0 - utils/Makefile.am | 2 ++ - utils/pdfextract.1 | 48 - ++++++++++++++++++++++++++++++++++++++++++++++++ - utils/pdfmerge.1 | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 82 insertions(+), 0 deletions(-) + libpng 1.5.0 changed one of the types in the png_set_iCCP() function + prototype. -commit 90da1af542fd7f3cecef31b15da6971345b38209 -Author: Thomas Freitag -Date: Sun Sep 18 18:19:04 2011 +0200 + goo/PNGWriter.cc | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) - Complain if %d is not present and it should +commit 6364c50ffb4053cc30cecbefff7a3142cab8c50b +Author: Albert Astals Cid +Date: Tue Aug 30 18:27:09 2011 +0200 - utils/pdfextract.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + xpdf303: Support for aes256 et all in Decrypt/SecurityHandler -commit 40e066a84ddb3a5c41805c095659af5f5704d6d8 -Author: suzuki toshiya -Date: Sun Sep 18 18:16:14 2011 +0200 + poppler/Decrypt.cc | 488 + ++++++++++++++++++++++++++++++++++++++------ + poppler/Decrypt.h | 19 +- + poppler/PDFDoc.cc | 2 +- + poppler/SecurityHandler.cc | 238 ++++++++++++--------- + poppler/SecurityHandler.h | 7 +- + poppler/Stream.h | 3 +- + 6 files changed, 595 insertions(+), 162 deletions(-) - qt_subdir is unneeded +commit 39ce4575f96953b499d09074e847d492d18379fa +Author: Albert Astals Cid +Date: Tue Aug 30 17:39:30 2011 +0200 - Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + xpdf303: Add FoFiIdentifier -commit e23f6b9cade804136bd4bb58182f4fe0b072fbf2 -Author: Carlos Garcia Campos -Date: Sun Sep 18 16:27:50 2011 +0200 + CMakeLists.txt | 2 + + fofi/FoFiIdentifier.cc | 630 + ++++++++++++++++++++++++++++++++++++++++++++++++ + fofi/FoFiIdentifier.h | 42 ++++ + fofi/Makefile.am | 2 + + 4 files changed, 676 insertions(+) - regtest: Do not create checksums for crashed, failed and stderr files +commit 33e7d54b4a29d297108ef3dc6008190625125ec8 +Author: Albert Astals Cid +Date: Tue Aug 30 17:36:22 2011 +0200 - regtest/backends/__init__.py | 12 +++++++++++- - 1 files changed, 11 insertions(+), 1 deletions(-) + xpdf303: Also check against INT_MAX in FoFiBase -commit 110b8be1d9f2694b42bd12dcb6af02bfca9866dd -Author: Carlos Garcia Campos -Date: Sun Sep 18 16:26:58 2011 +0200 + fofi/FoFiBase.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) - Fix memory leak +commit fb1f56f091e5329b30279916b182f64134f3b2e6 +Author: Albert Astals Cid +Date: Tue Aug 30 17:34:50 2011 +0200 - poppler/Gfx.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + xpdf303: Introduce FoFiBase::getU32LE -commit 12c6239ca4f1f6a5de72aebd755f9d1354ea5837 + fofi/FoFiBase.cc | 15 +++++++++++++++ + fofi/FoFiBase.h | 1 + + 2 files changed, 16 insertions(+) + +commit a79bc3359586cbc2c235d20dfa934dab1f475561 Author: Carlos Garcia Campos -Date: Sun Sep 18 11:08:06 2011 +0200 +Date: Tue Aug 30 16:59:08 2011 +0200 - regtest: Fix checksum check for tests containing spaces in filename + xpdf303: Check for a zero-entry cmap table in FoFiTrueType - regtest/backends/__init__.py | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + fofi/FoFiTrueType.cc | 28 +++++++++++++++++----------- + 1 file changed, 17 insertions(+), 11 deletions(-) -commit 93ba92db0a3af35f197a4faa5a528af98ea0f624 +commit efce014e39d0d13157b21a10ff8d483b5cfc561a Author: Albert Astals Cid -Date: Wed Sep 14 00:58:44 2011 +0200 +Date: Tue Aug 30 17:02:16 2011 +0200 - Make it work with Python3 + xpdf303: upddate xpdfCopyright - regtest/Config.py | 4 ++-- - regtest/TestReferences.py | 8 ++++---- - regtest/TestRun.py | 32 ++++++++++++++++---------------- - regtest/Timer.py | 8 ++++---- - regtest/backends/__init__.py | 12 ++++++------ - regtest/commands/__init__.py | 6 +++--- - regtest/commands/create-refs.py | 2 +- - regtest/commands/run-tests.py | 2 +- - regtest/main.py | 2 +- - 9 files changed, 38 insertions(+), 38 deletions(-) + poppler/poppler-config.h.cmake | 4 ++-- + poppler/poppler-config.h.in | 4 ++-- + 2 files changed, 4 insertions(+), 4 deletions(-) -commit da1b5437148e1e6317246b16f7235c8bc280be97 +commit 2eb388ccc6c7526e66da804d9d800cf29a027914 +Author: Albert Astals Cid +Date: Tue Aug 30 16:50:39 2011 +0200 + + xpdf303: Merge README + + README | 2 +- + README-XPDF | 153 + ++++++++++++++++++++++++++++++++++++++--------------------- + 2 files changed, 101 insertions(+), 54 deletions(-) + +commit 331b0f1c16c4f636fc616569bab030969aa848f2 Author: Carlos Garcia Campos -Date: Tue Sep 13 20:09:56 2011 +0200 +Date: Tue Aug 30 16:42:33 2011 +0200 - regtest: Add a way to skip files + xpdf303: Check for entries in the table directory with bogus tags + in FoFiTrueType - A new command line option --skip has been added to give a file - with the - list of test to skip. When --skip is not used, it look for a file - named - Skipped in the tests dir. Lines starting with '#' are considered - comments and are ignored. + This handles the case where the number of tables given in the + header is + too high. - regtest/TestReferences.py | 9 +++++++-- - regtest/TestRun.py | 9 +++++++-- - regtest/Utils.py | 20 ++++++++++++++++++++ - regtest/main.py | 6 +++++- - 4 files changed, 39 insertions(+), 5 deletions(-) + fofi/FoFiTrueType.cc | 30 +++++++++++++++++++++++++----- + 1 file changed, 25 insertions(+), 5 deletions(-) -commit b730b2c1d9666f62f940762663c8318e64049d61 +commit faaba717046ba87ef5ded614e2bcab6260a9f7c2 +Author: Albert Astals Cid +Date: Tue Aug 30 16:36:24 2011 +0200 + + xpdf303: FixedPoint improvements + + goo/FixedPoint.cc | 51 + +++++++++++++++++++++++++++++++----------------- + goo/FixedPoint.h | 15 ++++++++++++-- + splash/Splash.cc | 12 ++++++++++++ + splash/SplashFTFont.cc | 16 +++++++-------- + splash/SplashMath.h | 8 +++++--- + splash/SplashXPath.cc | 9 +++++++++ + 6 files changed, 80 insertions(+), 31 deletions(-) + +commit 73efc96eef6bd32a7c058b7dda8101f4f23c454f Author: Carlos Garcia Campos -Date: Tue Sep 13 19:04:04 2011 +0200 +Date: Tue Aug 30 16:31:52 2011 +0200 - regtest: Limit the number of arguments to 1 + xpdf303: Handle bogus loca table entries in FoFiTrueType - It's easier to run poppler-regtest more than once if you need to run - different tests. + where the offset is past the end of the glyf table. - regtest/commands/create-refs.py | 24 ++++++++++++------------ - regtest/commands/run-tests.py | 26 +++++++++++++------------- - regtest/main.py | 2 +- - 3 files changed, 26 insertions(+), 26 deletions(-) + fofi/FoFiTrueType.cc | 4 ++++ + 1 file changed, 4 insertions(+) -commit 5ce045d0358318859c844340c639483485b69c58 +commit 1df3489392a77e2b75adbafcc2fa10de829c172e Author: Carlos Garcia Campos -Date: Tue Sep 13 18:18:21 2011 +0200 +Date: Tue Aug 30 16:21:40 2011 +0200 - regtest: Sort tests before create-refs/run-tests and show progress + xpdf303: Use std::sort (with functors) in place of qsort - regtest/TestReferences.py | 20 ++++++++------------ - regtest/TestRun.py | 21 ++++++++++----------- - regtest/Utils.py | 35 +++++++++++++++++++++++++++++++++++ - 3 files changed, 53 insertions(+), 23 deletions(-) + It can be significantly faster. Not included changes in + SplashXPathScanner.cc since they depend on other changes not yet + merged. -commit 10801b6faee9037af054fe74cc4a03620ea41d45 -Author: Carlos Garcia Campos -Date: Mon Sep 12 20:13:17 2011 +0200 + fofi/FoFiTrueType.cc | 55 + ++++++++++++++++++++++-------------------------- + poppler/GfxFont.cc | 24 ++++++++++++++------- + splash/SplashScreen.cc | 12 +++++++---- + splash/SplashXPath.cc | 44 ++++++++++++++++++-------------------- + 4 files changed, 69 insertions(+), 66 deletions(-) - Add initial poppler regressions test program +commit f298e7f844105f2d9a36144e59be86c341e37507 +Merge: 2a6bd7a 0ca5453 +Author: Albert Astals Cid +Date: Tue Aug 30 16:21:58 2011 +0200 - regtest/Config.py | 32 ++++++ - regtest/TestReferences.py | 73 +++++++++++++ - regtest/TestRun.py | 156 +++++++++++++++++++++++++++ - regtest/Timer.py | 73 +++++++++++++ - regtest/backends/__init__.py | 220 - +++++++++++++++++++++++++++++++++++++++ - regtest/backends/cairo.py | 39 +++++++ - regtest/backends/postscript.py | 35 ++++++ - regtest/backends/splash.py | 39 +++++++ - regtest/backends/text.py | 48 +++++++++ - regtest/commands/__init__.py | 93 ++++++++++++++++ - regtest/commands/create-refs.py | 65 ++++++++++++ - regtest/commands/run-tests.py | 69 ++++++++++++ - regtest/main.py | 77 ++++++++++++++ - regtest/poppler-regtest | 6 + - 14 files changed, 1025 insertions(+), 0 deletions(-) + Merge branch 'master' into xpdf303merge -commit 245e331a14e11a615bf47abbeb34a3561e393b41 +commit 0ca5453fea9e5342188f772acd6f31af1778f236 Author: Albert Astals Cid -Date: Mon Sep 12 13:43:49 2011 +0200 +Date: Tue Aug 30 16:20:17 2011 +0200 - 0.17.4 + Compile when defining USE_FIXEDPOINT - CMakeLists.txt | 2 +- - NEWS | 5 +++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - qt4/src/Doxyfile | 2 +- - 5 files changed, 9 insertions(+), 4 deletions(-) + splash/Splash.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) -commit 194b2413eb2c6a1641508aec63336aaf89ec3b51 +commit bd7a53bc2f27fc3979f8de306e2dcaca53d4570a Author: Albert Astals Cid -Date: Mon Sep 12 13:43:35 2011 +0200 - - gir 0.18 +Date: Tue Aug 30 16:20:08 2011 +0200 - glib/CMakeLists.txt | 12 ++++++------ - glib/Makefile.am | 12 ++++++------ - 2 files changed, 12 insertions(+), 12 deletions(-) + match function definition -commit bf2cb5c9c47b4a61192101f0a48771657228e383 -Author: Adrian Johnson -Date: Tue Aug 30 19:08:40 2011 +0930 + poppler/SplashOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) - Fix compile error with libpng >= 1.5.0 +commit 2a6bd7aae37f73a94bf1a84f699f310177661611 +Author: Albert Astals Cid +Date: Tue Aug 30 15:13:17 2011 +0200 - libpng 1.5.0 changed one of the types in the png_set_iCCP() function - prototype. + xpdf303: Expand latin1UnicodeMapRanges and ascii7UnicodeMapRanges - goo/PNGWriter.cc | 9 ++++++++- - 1 files changed, 8 insertions(+), 1 deletions(-) + poppler/UnicodeMapTables.h | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) -commit 0ca5453fea9e5342188f772acd6f31af1778f236 +commit 4d31785409e464d0e96dcf11167ecdffd64026d1 Author: Albert Astals Cid -Date: Tue Aug 30 16:20:17 2011 +0200 +Date: Tue Aug 30 15:09:01 2011 +0200 - Compile when defining USE_FIXEDPOINT + xpdf303: More entries for nameToUnicodeTab - splash/Splash.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + poppler/NameToUnicodeTable.h | 3159 + ++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 3159 insertions(+) -commit bd7a53bc2f27fc3979f8de306e2dcaca53d4570a +commit 2658030836f3a15dadadd7f1989dfaa858bf876f Author: Albert Astals Cid -Date: Tue Aug 30 16:20:08 2011 +0200 +Date: Tue Aug 30 14:49:23 2011 +0200 - match function definition + xpdf303: char * -> const char * - poppler/SplashOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + cmake/modules/PopplerMacros.cmake | 2 +- + configure.ac | 2 +- + cpp/poppler-private.cpp | 2 +- + cpp/poppler-private.h | 2 +- + fofi/FoFiBase.h | 2 +- + fofi/FoFiEncodings.cc | 6 ++--- + fofi/FoFiEncodings.h | 6 ++--- + fofi/FoFiTrueType.cc | 10 ++++---- + fofi/FoFiTrueType.h | 4 ++-- + fofi/FoFiType1.cc | 4 ++-- + fofi/FoFiType1.h | 2 +- + fofi/FoFiType1C.cc | 14 +++++------ + fofi/FoFiType1C.h | 6 ++--- + goo/GooHash.cc | 16 ++++++------- + goo/GooHash.h | 12 +++++----- + goo/GooString.cc | 22 +++++++++--------- + goo/GooString.h | 16 ++++++------- + goo/gfile.cc | 4 ++-- + goo/gfile.h | 4 ++-- + goo/gmem.cc | 2 +- + goo/gmem.h | 2 +- + poppler/Annot.cc | 8 +++---- + poppler/Annot.h | 6 ++--- + poppler/ArthurOutputDev.cc | 6 ++--- + poppler/BuiltinFont.cc | 6 ++--- + poppler/BuiltinFont.h | 10 ++++---- + poppler/DCTStream.cc | 2 +- + poppler/DCTStream.h | 2 +- + poppler/Dict.cc | 14 +++++------ + poppler/Dict.h | 14 +++++------ + poppler/Error.cc | 10 ++++---- + poppler/Error.h | 6 ++--- + poppler/FileSpec.cc | 2 +- + poppler/FlateStream.cc | 2 +- + poppler/FlateStream.h | 2 +- + poppler/FontEncodingTables.cc | 14 +++++------ + poppler/FontEncodingTables.h | 14 +++++------ + poppler/FontInfo.cc | 2 +- + poppler/Form.cc | 6 ++--- + poppler/Form.h | 4 ++-- + poppler/Gfx.cc | 2 +- + poppler/Gfx.h | 2 +- + poppler/GfxFont.cc | 46 + ++++++++++++++++++------------------- + poppler/GfxFont.h | 8 +++---- + poppler/GfxState.cc | 6 ++--- + poppler/GfxState.h | 2 +- + poppler/GlobalParams.cc | 21 ++++++++--------- + poppler/GlobalParams.h | 8 +++---- + poppler/GlobalParamsWin.cc | 6 ++--- + poppler/JBIG2Stream.cc | 2 +- + poppler/JBIG2Stream.h | 2 +- + poppler/JPEG2000Stream.cc | 2 +- + poppler/JPEG2000Stream.h | 2 +- + poppler/JPXStream.h | 2 +- + poppler/NameToCharCode.cc | 8 +++---- + poppler/NameToCharCode.h | 6 ++--- + poppler/NameToUnicodeTable.h | 2 +- + poppler/Object.cc | 4 ++-- + poppler/Object.h | 28 +++++++++++----------- + poppler/PDFDoc.cc | 2 +- + poppler/PSOutputDev.cc | 24 +++++++++---------- + poppler/PSOutputDev.h | 8 +++---- + poppler/Page.cc | 2 +- + poppler/Page.h | 2 +- + poppler/SplashOutputDev.cc | 6 ++--- + poppler/Stream.cc | 16 ++++++------- + poppler/Stream.h | 28 +++++++++++----------- + poppler/TextOutputDev.cc | 2 +- + poppler/TextOutputDev.h | 2 +- + poppler/UnicodeMap.cc | 4 ++-- + poppler/UnicodeMap.h | 4 ++-- + poppler/UnicodeTypeTable.cc | 4 ++-- + qt4/src/poppler-private.cc | 2 +- + qt4/src/poppler-ps-converter.cc | 2 +- + splash/SplashFTFontEngine.cc | 8 +++---- + splash/SplashFTFontEngine.h | 6 ++--- + splash/SplashFTFontFile.cc | 6 ++--- + splash/SplashFTFontFile.h | 2 +- + splash/SplashFontEngine.cc | 6 ++--- + splash/SplashFontEngine.h | 6 ++--- + splash/SplashT1FontEngine.cc | 6 ++--- + splash/SplashT1FontEngine.h | 4 ++-- + splash/SplashT1FontFile.cc | 10 ++++---- + splash/SplashT1FontFile.h | 6 ++--- + test/pdf-operators.c | 4 ++-- + test/perf-test.cc | 4 ++-- + utils/HtmlFonts.cc | 4 ++-- + utils/HtmlOutputDev.cc | 12 +++++----- + utils/HtmlOutputDev.h | 4 ++-- + utils/parseargs.cc | 4 ++-- + utils/parseargs.h | 6 ++--- + utils/pdffonts.cc | 2 +- + utils/pdfinfo.cc | 12 +++++----- + utils/pdftocairo.cc | 4 ++-- + utils/pdftohtml.cc | 10 ++++---- + utils/pdftotext.cc | 12 +++++----- + 96 files changed, 337 insertions(+), 338 deletions(-) + +commit c899d26e0f7a61db99925179330c28df015a676b +Author: Albert Astals Cid +Date: Tue Aug 30 00:31:00 2011 +0200 + + Add COPYING3 from xpdf3.03 + + COPYING3 | 674 + ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + 1 file changed, 674 insertions(+) commit 508517a35cb3bc5195682a9cd89fb50a801eddc2 Author: Albert Astals Cid -Date: Mon Aug 29 23:55:42 2011 +0200 +Date: Mon Aug 29 23:55:42 2011 +0200 0.17.3 - CMakeLists.txt | 4 ++-- - NEWS | 32 ++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- + CMakeLists.txt | 4 ++-- + NEWS | 32 ++++++++++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- + poppler/Makefile.am | 2 +- qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- + qt4/src/Makefile.am | 2 +- 10 files changed, 42 insertions(+), 10 deletions(-) commit 1431564f3363a63a8669c8dd15970db814f4969f Author: Thomas Freitag -Date: Mon Aug 29 22:22:02 2011 +0200 +Date: Mon Aug 29 22:22:02 2011 +0200 Add pdfextract and pdfmerge See "Creating PDF with poppler ?" thread for more info - utils/CMakeLists.txt | 15 ++++ + utils/CMakeLists.txt | 15 +++++ utils/Makefile.am | 10 +++ utils/pdfextract.cc | 111 +++++++++++++++++++++++++++++++ utils/pdfmerge.cc | 176 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 312 insertions(+), 0 deletions(-) + 4 files changed, 312 insertions(+) commit 8ca2f41089bc6402baf9b24428af04314c037b54 Author: Thomas Freitag -Date: Mon Aug 29 22:20:52 2011 +0200 +Date: Mon Aug 29 22:20:52 2011 +0200 Rework writing of PDF files @@ -1338,16 +7595,16 @@ commit 33da7e270431e8e4c500e7573b3ca0dddd9f237e Author: suzuki toshiya -Date: Sun Aug 28 22:07:38 2011 +0200 +Date: Sun Aug 28 22:07:38 2011 +0200 Fix building static-linked pdftocairo - utils/Makefile.am | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + utils/Makefile.am | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) commit 91fafce028ca6620c0eb22e370fb4c6fd3404e3c Author: Adrian Johnson -Date: Tue Aug 23 21:02:02 2011 +0930 +Date: Tue Aug 23 21:02:02 2011 +0930 cairo: align strokes when Stroke Adjust is true and line width <= 1 @@ -1367,12 +7624,12 @@ Fixes bug #4536. poppler/CairoOutputDev.cc | 40 +++++++++++++++++++++++++++++++++++----- - poppler/CairoOutputDev.h | 3 +++ + poppler/CairoOutputDev.h | 3 +++ 2 files changed, 38 insertions(+), 5 deletions(-) commit cfc67afe80b963ba662018674cadf3085466bb9f Author: Adrian Johnson -Date: Tue Aug 23 20:46:24 2011 +0930 +Date: Tue Aug 23 20:46:24 2011 +0930 cairo: fix stroking of very thin lines @@ -1393,12 +7650,12 @@ pixels wide which looks too fat. poppler/CairoOutputDev.cc | 20 +++++++++++++++++++- - poppler/CairoOutputDev.h | 1 + - 2 files changed, 20 insertions(+), 1 deletions(-) + poppler/CairoOutputDev.h | 1 + + 2 files changed, 20 insertions(+), 1 deletion(-) commit 7a7c932e09796b944dda69df1b339c889ee1d63a Author: Albert Astals Cid -Date: Thu Aug 25 00:23:40 2011 +0200 +Date: Thu Aug 25 00:23:40 2011 +0200 Add a way to get the fully qualified name @@ -1408,65 +7665,65 @@ commit e001871d927f9cc86b4327d64e4c66ad00172ad0 Author: Albert Astals Cid -Date: Wed Aug 24 23:44:18 2011 +0200 +Date: Wed Aug 24 23:44:18 2011 +0200 Clarify ownership qt4/src/poppler-qt4.h | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 87c48fdc175be4d852b953778f915ea93cd50194 Author: Adrian Johnson -Date: Wed Aug 24 19:53:48 2011 +0930 +Date: Wed Aug 24 19:53:48 2011 +0930 cairo: fix unique id mime data The unique id string was copied before the object number was appended resulting in all images in pdf output being the same. - poppler/CairoOutputDev.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + poppler/CairoOutputDev.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) commit 08a2ba6f1603246651f0d5e697b88d38363d7df2 Author: Pino Toscano -Date: Tue Aug 23 20:20:32 2011 +0200 +Date: Tue Aug 23 20:20:32 2011 +0200 pdftocairo/cmake: need to link to freetype utils/CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 82496b18dc4aff66cc29f2b6607c8f894afe8b49 Author: Albert Astals Cid -Date: Mon Aug 22 16:42:28 2011 +0200 +Date: Mon Aug 22 16:42:28 2011 +0200 Update Adrian (C) - poppler/GfxFont.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/GfxFont.h | 1 + + 1 file changed, 1 insertion(+) commit 2576e3a6d9746e2272c620a775e11295932eb5f2 Author: Adrian Johnson -Date: Mon Aug 22 21:41:36 2011 +0930 +Date: Mon Aug 22 21:41:36 2011 +0930 update SEE ALSO section of man pages - ensure each man page references all other utils - sort list of utils in alphabetical order - utils/pdffonts.1 | 8 +++++--- - utils/pdfimages.1 | 8 +++++--- - utils/pdfinfo.1 | 8 +++++--- - utils/pdftocairo.1 | 2 +- - utils/pdftohtml.1 | 8 ++++++++ - utils/pdftoppm.1 | 8 +++++--- - utils/pdftops.1 | 8 +++++--- - utils/pdftotext.1 | 9 +++++---- + utils/pdffonts.1 | 8 +++++--- + utils/pdfimages.1 | 8 +++++--- + utils/pdfinfo.1 | 8 +++++--- + utils/pdftocairo.1 | 2 +- + utils/pdftohtml.1 | 8 ++++++++ + utils/pdftoppm.1 | 8 +++++--- + utils/pdftops.1 | 8 +++++--- + utils/pdftotext.1 | 9 +++++---- 8 files changed, 39 insertions(+), 20 deletions(-) commit 23ec5c8d394beb632ee45f6308215646cd1a0195 Author: Adrian Johnson -Date: Mon Aug 22 21:26:24 2011 +0930 +Date: Mon Aug 22 21:26:24 2011 +0930 cairo: only use show_text_glyphs if the surface supports it and the font has toUnicode @@ -1476,13 +7733,13 @@ glyphs that do not have have a mapping. poppler/CairoOutputDev.cc | 12 ++++++++---- - poppler/CairoOutputDev.h | 1 + - poppler/GfxFont.h | 3 +++ + poppler/CairoOutputDev.h | 1 + + poppler/GfxFont.h | 3 +++ 3 files changed, 12 insertions(+), 4 deletions(-) commit 3a574f13fa22b7c31eda0d0437f4094a5a39ff34 Author: Adrian Johnson -Date: Fri Aug 19 23:23:24 2011 +0930 +Date: Fri Aug 19 23:23:24 2011 +0930 cairo: fix stroke patterns @@ -1496,35 +7753,35 @@ poppler/CairoOutputDev.cc | 52 ++++++++++++++++++++++++++++++++++++++++++++- - poppler/CairoOutputDev.h | 17 +++++++++++++- + poppler/CairoOutputDev.h | 17 +++++++++++++-- 2 files changed, 66 insertions(+), 3 deletions(-) commit eb740dac838d2a1e32899327ca6d25c3dca641df Author: Carlos Garcia Campos -Date: Mon Aug 22 13:41:56 2011 +0200 +Date: Mon Aug 22 13:41:56 2011 +0200 glib-demo: Add text attributes information to text demo glib/demo/text.c | 103 - ++++++++++++++++++++++++++++++++++++++++++++++++++--- - 1 files changed, 97 insertions(+), 6 deletions(-) + ++++++++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 97 insertions(+), 6 deletions(-) commit cda4aefaa136ae07778de3b1593808a5aaa2db5b Author: Carlos Garcia Campos -Date: Mon Aug 22 13:40:49 2011 +0200 +Date: Mon Aug 22 13:40:49 2011 +0200 glib-demo: Add pgd_pixbuf_new_for_color() to utils To get a pixbuf for a given poppler color. - glib/demo/annots.c | 22 +--------------------- - glib/demo/utils.c | 27 +++++++++++++++++++++++++++ - glib/demo/utils.h | 1 + + glib/demo/annots.c | 22 +--------------------- + glib/demo/utils.c | 27 +++++++++++++++++++++++++++ + glib/demo/utils.h | 1 + 3 files changed, 29 insertions(+), 21 deletions(-) commit 2a11b2963a548186654722a393db1e19d57828f1 Author: danigm -Date: Mon Aug 22 12:51:50 2011 +0200 +Date: Mon Aug 22 12:51:50 2011 +0200 glib: Add poppler_page_get_text_attributes() @@ -1535,16 +7792,16 @@ whether text is undrlined and foreground color for a range of text. Fixes bug #33269. - glib/poppler-page.cc | 202 + glib/poppler-page.cc | 202 +++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 33 ++++++ - glib/poppler.h | 1 + - glib/reference/poppler-sections.txt | 7 ++ - 4 files changed, 243 insertions(+), 0 deletions(-) + glib/poppler-page.h | 33 ++++++ + glib/poppler.h | 1 + + glib/reference/poppler-sections.txt | 7 ++ + 4 files changed, 243 insertions(+) commit 15f99157cf3900bf20cf619e204ae53085af497d Author: Carlos Garcia Campos -Date: Mon Aug 22 12:43:12 2011 +0200 +Date: Mon Aug 22 12:43:12 2011 +0200 textoutputdev: Add TextFontInfo::matches() @@ -1552,29 +7809,29 @@ poppler/TextOutputDev.cc | 4 ++++ poppler/TextOutputDev.h | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 5b554b39fca634c8ba58915c14522cb2920fe280 Author: Pino Toscano -Date: Mon Aug 22 13:16:23 2011 +0200 +Date: Mon Aug 22 13:16:23 2011 +0200 pdftocairo/cmake: link to lcms library if available utils/CMakeLists.txt | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit f7cd236fea8740ef05635d1fd7917a778cc373f0 Author: Albert Astals Cid -Date: Mon Aug 22 00:00:32 2011 +0200 +Date: Mon Aug 22 00:00:32 2011 +0200 Ship HtmlUtils.h - utils/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + utils/Makefile.am | 1 + + 1 file changed, 1 insertion(+) commit a128a858c50287cfba74c69996276ea44370dc26 Author: Albert Astals Cid -Date: Sun Aug 21 23:52:06 2011 +0200 +Date: Sun Aug 21 23:52:06 2011 +0200 Update Adrian's (C) @@ -1584,62 +7841,62 @@ commit b78134314107d8344360c3313478115ed291630d Author: Albert Astals Cid -Date: Sun Aug 21 23:46:09 2011 +0200 +Date: Sun Aug 21 23:46:09 2011 +0200 Fix copyright c&p is evil goo/gtypes_p.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ade53277546cef4ba19d982518c0cd83a4bb9c12 Author: Albert Astals Cid -Date: Sun Aug 21 23:42:53 2011 +0200 +Date: Sun Aug 21 23:42:53 2011 +0200 Move HAVE_STDINT_H use to a private header This way we do not need to expose it in poppler-config.h since gtypes.h is a half public header - goo/Makefile.am | 1 + - goo/gtypes.h | 18 ------------------ - goo/gtypes_p.h | 30 ++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.cc | 1 + - poppler/CairoRescaleBox.cc | 1 + - utils/pdftocairo.cc | 1 + + goo/Makefile.am | 1 + + goo/gtypes.h | 18 ------------------ + goo/gtypes_p.h | 30 ++++++++++++++++++++++++++++++ + poppler/CairoOutputDev.cc | 1 + + poppler/CairoRescaleBox.cc | 1 + + utils/pdftocairo.cc | 1 + 6 files changed, 34 insertions(+), 18 deletions(-) commit 6166c3a37a4d6307d4f23ee272ea07c95bbba74a Author: Albert Astals Cid -Date: Sun Aug 21 23:31:30 2011 +0200 +Date: Sun Aug 21 23:31:30 2011 +0200 Silence silly gcc goo/PNGWriter.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit eb5b228c4c24152e632c931b63c64ffb1e10d45d Author: Adrian Johnson -Date: Sat Aug 20 21:13:18 2011 +0930 +Date: Sat Aug 20 21:13:18 2011 +0930 pdftocairo: fix writing to stdout for ps/pdf/svg - utils/pdftocairo.cc | 23 ++++++++++++++++++++--- - 1 files changed, 20 insertions(+), 3 deletions(-) + utils/pdftocairo.cc | 23 ++++++++++++++++++++--- + 1 file changed, 20 insertions(+), 3 deletions(-) commit 1beac5896a301be68de22240017fef11e7d27d40 Author: Adrian Johnson -Date: Sat Aug 13 00:23:23 2011 +0930 +Date: Sat Aug 13 00:23:23 2011 +0930 Add poppler version to PSOutputDev ouput poppler/PSOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b35fd3651fd3dbaa876fc64b8c5cfe77ae67335f Author: Adrian Johnson -Date: Fri Aug 5 23:01:51 2011 +0930 +Date: Fri Aug 5 23:01:51 2011 +0930 cairo: use cairo_show_text_glyphs() when printing @@ -1648,55 +7905,55 @@ poppler/CairoOutputDev.cc | 41 ++++++++++++++++++++++++++++++++++++++--- - poppler/CairoOutputDev.h | 5 +++++ + poppler/CairoOutputDev.h | 5 +++++ 2 files changed, 43 insertions(+), 3 deletions(-) commit 51ade078bc1fa737e20120ae4cb3bf693a219823 Author: Stefan Thomas -Date: Thu Jul 15 16:24:55 2010 +0100 +Date: Thu Jul 15 16:24:55 2010 +0100 pdftocairo: Added to CMake build system. utils/CMakeLists.txt | 20 ++++++++++++++++++++ - 1 files changed, 20 insertions(+), 0 deletions(-) + 1 file changed, 20 insertions(+) commit 5a8745cdf428e22641937977eedfc1d605f6ff07 Author: Adrian Johnson -Date: Fri Aug 12 23:57:01 2011 +0930 +Date: Fri Aug 12 23:57:01 2011 +0930 Add pdftocairo man page - utils/Makefile.am | 5 +- + utils/Makefile.am | 5 +- utils/pdftocairo.1 | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 258 insertions(+), 1 deletions(-) + 2 files changed, 258 insertions(+), 1 deletion(-) commit b67a12b2b26692e2ccec7ff2e6df18fee05be535 Author: Adrian Johnson -Date: Thu Aug 11 21:34:11 2011 +0930 +Date: Thu Aug 11 21:34:11 2011 +0930 pdftocairo - utility for creating png/jpeg/ps/eps/pdf/svg using CairoOutputDev - utils/.gitignore | 2 +- - utils/Makefile.am | 20 +- - utils/pdftocairo.cc | 970 + utils/.gitignore | 2 +- + utils/Makefile.am | 20 +- + utils/pdftocairo.cc | 970 +++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 989 insertions(+), 3 deletions(-) commit 4f2d774826bf7bb7b3825e02c5ca4c2928643950 Author: Adrian Johnson -Date: Thu Aug 11 21:32:53 2011 +0930 +Date: Thu Aug 11 21:32:53 2011 +0930 png: add support for embedding ICC profile goo/PNGWriter.cc | 28 ++++++++++++++++++++++++++++ goo/PNGWriter.h | 8 ++++++++ - 2 files changed, 36 insertions(+), 0 deletions(-) + 2 files changed, 36 insertions(+) commit 1091f47310bf0fc71bac5dd4ec81dad50b2f2537 Author: Adrian Johnson -Date: Wed Aug 10 18:48:15 2011 +0930 +Date: Wed Aug 10 18:48:15 2011 +0930 png: Add additional pixel formats @@ -1710,7 +7967,7 @@ commit c6f26915db568f12892d48005746ad2922c19000 Author: Adrian Johnson -Date: Wed Aug 10 18:45:24 2011 +0930 +Date: Wed Aug 10 18:45:24 2011 +0930 png: use PNG_RESOLUTION_METER instead of PNG_RESOLUTION_UNKNOWN to set resolution @@ -1719,85 +7976,85 @@ is used goo/PNGWriter.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit 2667d2a5b34e1bbf322aea42876e7e81aa06dc29 Author: Adrian Johnson -Date: Tue Aug 9 22:05:53 2011 +0930 +Date: Tue Aug 9 22:05:53 2011 +0930 Use stdint.h instead of assuming the size of types - configure.ac | 1 + - goo/gtypes.h | 18 ++++++++++++++++++ - poppler/CairoOutputDev.cc | 2 -- - poppler/CairoRescaleBox.cc | 2 -- + configure.ac | 1 + + goo/gtypes.h | 18 ++++++++++++++++++ + poppler/CairoOutputDev.cc | 2 -- + poppler/CairoRescaleBox.cc | 2 -- 4 files changed, 19 insertions(+), 4 deletions(-) commit c043f298e68bdfffcb7505ec354ec7487b5bd7b2 Author: Adrian Johnson -Date: Fri Jul 8 21:13:36 2011 +0930 +Date: Fri Jul 8 21:13:36 2011 +0930 cairo: assume printer pixel size is 1/600" when stroking 0 width lines Fixes bug #39067. - poppler/CairoOutputDev.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.cc | 5 +++++ + 1 file changed, 5 insertions(+) commit 961adf0b767be78d3556b7315de3761d3d46b107 Author: Adrian Johnson -Date: Thu Aug 18 17:44:35 2011 +0930 +Date: Thu Aug 18 17:44:35 2011 +0930 cairo: set mime data for soft masked images Fixes bug #40192. - poppler/CairoOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.cc | 3 +++ + 1 file changed, 3 insertions(+) commit 86271e4810f714d4ba7a2a6651a9b1d04f653262 Author: Joshua Richardson -Date: Thu Aug 18 18:48:40 2011 +0200 +Date: Thu Aug 18 18:48:40 2011 +0200 pdftohtml: Support text rotation Includes a few other fixlets. See bug 38586 for more info - utils/HtmlFonts.cc | 64 ++++++++++-------- - utils/HtmlFonts.h | 10 ++- + utils/HtmlFonts.cc | 64 +++++++++--------- + utils/HtmlFonts.h | 10 ++- utils/HtmlOutputDev.cc | 170 +++++++++++++++++++++++++++++++++--------------- - utils/HtmlOutputDev.h | 8 ++- - utils/HtmlUtils.h | 51 ++++++++++++++ + utils/HtmlOutputDev.h | 8 ++- + utils/HtmlUtils.h | 51 +++++++++++++++ 5 files changed, 218 insertions(+), 85 deletions(-) commit 56248b84e2185483dd54704c13838e8f78029d49 Author: Albert Astals Cid -Date: Thu Aug 18 12:40:51 2011 +0200 +Date: Thu Aug 18 12:40:51 2011 +0200 Only declare overprint if we are going to use it - utils/pdftoppm.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + utils/pdftoppm.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) commit a1093aae9f64cb6768164551d50cafaef52876c1 Author: Albert Astals Cid -Date: Thu Aug 18 12:30:29 2011 +0200 +Date: Thu Aug 18 12:30:29 2011 +0200 Fix Adrian's (C) - poppler/PSOutputDev.cc | 2 +- - poppler/PSOutputDev.h | 3 ++- - poppler/PreScanOutputDev.cc | 1 + - poppler/PreScanOutputDev.h | 1 + - poppler/SplashOutputDev.cc | 1 + - poppler/SplashOutputDev.h | 1 + + poppler/PSOutputDev.cc | 2 +- + poppler/PSOutputDev.h | 3 ++- + poppler/PreScanOutputDev.cc | 1 + + poppler/PreScanOutputDev.h | 1 + + poppler/SplashOutputDev.cc | 1 + + poppler/SplashOutputDev.h | 1 + 6 files changed, 7 insertions(+), 2 deletions(-) commit 7741b24d05f50c134cf15361d52f5df7ae3c3115 Author: Adrian Johnson -Date: Sun Aug 14 22:06:22 2011 +0930 +Date: Sun Aug 14 22:06:22 2011 +0930 ps: Avoid using /PatternType if only one instance of the pattern is used @@ -1805,100 +8062,100 @@ this optimization makes pages print faster on my LaserJet poppler/PSOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit a60e61ac64634dc59c80d8e6b0288c1269fc0154 Author: Adrian Johnson -Date: Sun Aug 14 21:55:24 2011 +0930 +Date: Sun Aug 14 21:55:24 2011 +0930 ps: use PS Patterns for tiling fill when PS level >= 2 - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 4 +- - poppler/Gfx.cc | 4 +- - poppler/OutputDev.h | 2 +- - poppler/PSOutputDev.cc | 59 - +++++++++++++++++++++++++++++++++++++++--- - poppler/PSOutputDev.h | 13 ++++++++- - poppler/PreScanOutputDev.cc | 2 +- - poppler/PreScanOutputDev.h | 2 +- - poppler/SplashOutputDev.cc | 2 +- - poppler/SplashOutputDev.h | 2 +- + poppler/CairoOutputDev.cc | 2 +- + poppler/CairoOutputDev.h | 4 +-- + poppler/Gfx.cc | 4 +-- + poppler/OutputDev.h | 2 +- + poppler/PSOutputDev.cc | 59 + +++++++++++++++++++++++++++++++++++++++---- + poppler/PSOutputDev.h | 13 +++++++++- + poppler/PreScanOutputDev.cc | 2 +- + poppler/PreScanOutputDev.h | 2 +- + poppler/SplashOutputDev.cc | 2 +- + poppler/SplashOutputDev.h | 2 +- 10 files changed, 76 insertions(+), 16 deletions(-) commit 9938770e737b2fcec8269147e70663517f848925 Author: Albert Astals Cid -Date: Mon Aug 15 13:17:24 2011 +0200 +Date: Mon Aug 15 13:17:24 2011 +0200 0.17.2 - CMakeLists.txt | 4 ++-- - NEWS | 37 +++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- + CMakeLists.txt | 4 ++-- + NEWS | 37 +++++++++++++++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- + poppler/Makefile.am | 2 +- qt4/src/CMakeLists.txt | 2 +- - qt4/src/Doxyfile | 2 +- - qt4/src/Makefile.am | 5 +++-- + qt4/src/Doxyfile | 2 +- + qt4/src/Makefile.am | 5 +++-- 10 files changed, 49 insertions(+), 11 deletions(-) commit 378fc06c574b85b5c003ca842aa743f0ffe5587e Author: Albert Astals Cid -Date: Mon Aug 1 22:14:12 2011 +0200 +Date: Mon Aug 1 22:14:12 2011 +0200 Only assume the OC is not visible if it exists and is set to no Similar to commit e2def20a45c1d8307fd62fabb9769121af975abf but in the other branch of the if, fixes bug 39637 - poppler/OptionalContent.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + poppler/OptionalContent.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit 861a7bfb9431609e1e148240447f23c8e83b9d0f Author: Thomas Freitag -Date: Fri Jul 29 00:30:58 2011 +0200 +Date: Fri Jul 29 00:30:58 2011 +0200 Implement overprint in Splash See the "Implementing overprint in Splash" thread in the mailing list for more info - goo/ImgWriter.h | 2 + - goo/JpegWriter.cc | 54 +++++++- - goo/JpegWriter.h | 7 +- - poppler/Gfx.cc | 98 +++++++++++++-- - poppler/GfxState.cc | 1 + - poppler/GfxState.h | 4 + - poppler/OutputDev.h | 1 + + goo/ImgWriter.h | 2 + + goo/JpegWriter.cc | 54 ++++++-- + goo/JpegWriter.h | 7 +- + poppler/Gfx.cc | 98 ++++++++++++-- + poppler/GfxState.cc | 1 + + poppler/GfxState.h | 4 + + poppler/OutputDev.h | 1 + poppler/SplashOutputDev.cc | 307 ++++++++++++++++++++++++++++++++++++++------ - poppler/SplashOutputDev.h | 51 +++++++- - splash/Splash.cc | 86 +++++++++--- - splash/Splash.h | 9 +- - splash/SplashBitmap.cc | 64 +++++++++- - splash/SplashBitmap.h | 1 + - splash/SplashPattern.cc | 16 ++- - splash/SplashPattern.h | 7 + - splash/SplashState.cc | 11 ++- - splash/SplashState.h | 22 +++ - splash/SplashTypes.h | 5 +- - utils/pdftoppm.cc | 36 +++++- + poppler/SplashOutputDev.h | 51 +++++++- + splash/Splash.cc | 86 ++++++++++--- + splash/Splash.h | 9 +- + splash/SplashBitmap.cc | 64 ++++++++- + splash/SplashBitmap.h | 1 + + splash/SplashPattern.cc | 16 ++- + splash/SplashPattern.h | 7 + + splash/SplashState.cc | 11 +- + splash/SplashState.h | 22 ++++ + splash/SplashTypes.h | 5 +- + utils/pdftoppm.cc | 36 +++++- 19 files changed, 686 insertions(+), 96 deletions(-) commit e2fa8a2ca8459d19c0f9dca445a2399b9a3d483d Author: Koji Otani -Date: Thu Jul 28 12:43:57 2011 +0200 +Date: Thu Jul 28 12:43:57 2011 +0200 Parse the "Medium" modifier when asking fontconfig for a font poppler/GlobalParams.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 0a677dd8dc9c55936530ea1fee901cab831c52af Author: Koji Otani -Date: Thu Jul 28 12:42:16 2011 +0200 +Date: Thu Jul 28 12:42:16 2011 +0200 Improve selection of CJK fonts @@ -1907,12 +8164,12 @@ More info at bug 36474 poppler/GlobalParams.cc | 137 - ++++++++++++++++++++++++++++++---------------- - 1 files changed, 89 insertions(+), 48 deletions(-) + ++++++++++++++++++++++++++++++----------------- + 1 file changed, 89 insertions(+), 48 deletions(-) commit e78aff6796a5d5a0a4f2fe8c7ceb33c506e2c8f5 Author: William Bader -Date: Tue Jul 26 00:10:34 2011 +0200 +Date: Tue Jul 26 00:10:34 2011 +0200 make -level1sep write gray instead of cmyk @@ -1920,32 +8177,32 @@ Bug 39012 poppler/PSOutputDev.cc | 63 - +++++++++++++++++++++++++++++++++++++++++++++-- - 1 files changed, 60 insertions(+), 3 deletions(-) + +++++++++++++++++++++++++++++++++++++++++++++--- + 1 file changed, 60 insertions(+), 3 deletions(-) commit ea31309487aab6ed407a086dff1f350b6e4bdbc9 Author: Albert Astals Cid -Date: Tue Jul 26 00:09:27 2011 +0200 +Date: Tue Jul 26 00:09:27 2011 +0200 Update (C) - poppler/PDFDoc.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/PDFDoc.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit a945641497946a825dc880f94200ea1d5409332b Author: Hib Eris -Date: Sat Jul 23 08:44:06 2011 +0200 +Date: Sat Jul 23 08:44:06 2011 +0200 Handle missing startxref properly Bug 38209 - poppler/PDFDoc.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + poppler/PDFDoc.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) commit 2c1b25ef2592367f4c18e204ab5d102f15cf272f Author: William Bader -Date: Mon Jul 25 23:43:27 2011 +0200 +Date: Mon Jul 25 23:43:27 2011 +0200 Fix a bad memory access @@ -1954,11 +8211,11 @@ Bug 37189 splash/Splash.cc | 14 ++++++++++---- - 1 files changed, 10 insertions(+), 4 deletions(-) + 1 file changed, 10 insertions(+), 4 deletions(-) commit 300900afa2140141748a7571270be5d850274072 Author: Daniel Glöckner -Date: Sat Jul 23 19:49:15 2011 +0200 +Date: Sat Jul 23 19:49:15 2011 +0200 Fix numerical overflow in libopenjpeg JPXStream::doLookChar() @@ -1970,7 +8227,7 @@ commit ec6ea621b066a3b332a8099341664889d2ff3743 Author: Axel Struebing -Date: Thu Jul 21 23:12:36 2011 +0200 +Date: Thu Jul 21 23:12:36 2011 +0200 Fix calculation of startXRefPos @@ -1978,75 +8235,75 @@ See "another problem with saving linearized files" in the mailing list for more info - poppler/PDFDoc.cc | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) + poppler/PDFDoc.cc | 9 ++++++--- + 1 file changed, 6 insertions(+), 3 deletions(-) commit ce97cfcd6373c98fb8c63e9b3ef6c51738f22a50 Author: Albert Astals Cid -Date: Wed Jul 20 00:24:52 2011 +0200 +Date: Wed Jul 20 00:24:52 2011 +0200 Render dots for 0 length dashed lines Bug 34150 splash/Splash.cc | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) + 1 file changed, 13 insertions(+) commit 42c1b1c4af6b07f488d1b2b02a4700f19b0ab0ef Author: Tomas Hoger -Date: Wed Jul 20 00:23:15 2011 +0200 +Date: Wed Jul 20 00:23:15 2011 +0200 Fix crash on truncated JPEG/DCT stream Bug 36693 poppler/DCTStream.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 091b570c63694e475c24bb8805638ac70c654892 Author: Albert Astals Cid -Date: Wed Jul 20 00:19:43 2011 +0200 +Date: Wed Jul 20 00:19:43 2011 +0200 Make sure the dict is a page dict Fixes second part of 35925 and 39072 - poppler/PDFDoc.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/PDFDoc.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit ac566c887ffae9d384587f7587609642aef7a016 Author: Albert Astals Cid -Date: Wed Jul 20 00:17:49 2011 +0200 +Date: Wed Jul 20 00:17:49 2011 +0200 Do not crash if can not get page 0 for some reason qt4/tests/test-poppler-qt4.cpp | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) commit 6ad95e7b8b9766aa19f01f06f02eb430e4a4a899 Author: Albert Astals Cid -Date: Mon Jul 11 15:04:49 2011 +0100 +Date: Mon Jul 11 15:04:49 2011 +0100 Complete the list of preprocessor defines that we never define When using any of the two sanctioned build systems poppler/poppler-config.h.cmake | 6 ++++-- - poppler/poppler-config.h.in | 6 ++++-- + poppler/poppler-config.h.in | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) commit edcc84ef0137a733cf3fab79b919af309d87325c Author: Albert Astals Cid -Date: Mon Jul 11 15:00:39 2011 +0100 +Date: Mon Jul 11 15:00:39 2011 +0100 Harmonize all SPLASH_CMYK to use #if - poppler/SplashOutputDev.cc | 24 ++++++++++++------------ - 1 files changed, 12 insertions(+), 12 deletions(-) + poppler/SplashOutputDev.cc | 24 ++++++++++++------------ + 1 file changed, 12 insertions(+), 12 deletions(-) commit a8fca630d592941c033ca6a380bf46b6e733a748 Author: Albert Astals Cid -Date: Mon Jul 11 14:57:33 2011 +0100 +Date: Mon Jul 11 14:57:33 2011 +0100 Sanitize headers a big @@ -2055,44 +8312,44 @@ configure/cmake process and are used in headers * Include poppker-config.h where needed - goo/GooTimer.h | 2 + - goo/ImgWriter.h | 3 +- - goo/JpegWriter.h | 3 +- - goo/PNGWriter.h | 4 +- - goo/TiffWriter.h | 3 +- - goo/gfile.h | 3 +- - poppler/DCTStream.h | 5 +-- - poppler/FlateStream.h | 5 +-- - poppler/Gfx.h | 3 +- - poppler/GfxState.h | 2 + - poppler/Stream.h | 3 +- + goo/GooTimer.h | 2 ++ + goo/ImgWriter.h | 3 +- + goo/JpegWriter.h | 3 +- + goo/PNGWriter.h | 4 +-- + goo/TiffWriter.h | 3 +- + goo/gfile.h | 3 +- + poppler/DCTStream.h | 5 ++-- + poppler/FlateStream.h | 5 ++-- + poppler/Gfx.h | 3 +- + poppler/GfxState.h | 2 ++ + poppler/Stream.h | 3 +- poppler/poppler-config.h.cmake | 63 ++++++++++++++++++++++++++++++++++++++++ - poppler/poppler-config.h.in | 63 + poppler/poppler-config.h.in | 63 ++++++++++++++++++++++++++++++++++++++++ - splash/SplashFTFont.h | 4 ++- - splash/SplashMath.h | 4 ++- + splash/SplashFTFont.h | 4 ++- + splash/SplashMath.h | 4 ++- 15 files changed, 153 insertions(+), 17 deletions(-) commit 214322f3c66a9aad4e2a46f6e305a3dacaa4f8b1 Author: Albert Astals Cid -Date: Sun Jul 10 01:20:21 2011 +0100 +Date: Sun Jul 10 01:20:21 2011 +0100 And 3 years later, Ed has answered :-) Now all our changes are GPLv2+ - poppler/GfxFont.cc | 3 +++ - poppler/GlobalParams.cc | 3 +++ - poppler/TextOutputDev.cc | 3 +++ - poppler/TextOutputDev.h | 3 +++ - poppler/UnicodeTypeTable.cc | 3 +++ - poppler/UnicodeTypeTable.h | 3 +++ - 6 files changed, 18 insertions(+), 0 deletions(-) + poppler/GfxFont.cc | 3 +++ + poppler/GlobalParams.cc | 3 +++ + poppler/TextOutputDev.cc | 3 +++ + poppler/TextOutputDev.h | 3 +++ + poppler/UnicodeTypeTable.cc | 3 +++ + poppler/UnicodeTypeTable.h | 3 +++ + 6 files changed, 18 insertions(+) commit 37cc1344672f480d4062aafbd2f3245ca1392279 Author: Albert Astals Cid -Date: Sun Jul 10 01:15:44 2011 +0100 +Date: Sun Jul 10 01:15:44 2011 +0100 Fix header @@ -2100,46 +8357,46 @@ everything is GPLv2+ is from 2008 poppler/XpdfPluginAPI.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 230ab66f52a992557464e325d18f88573ec52423 Author: Albert Astals Cid -Date: Sun Jul 10 01:06:41 2011 +0100 +Date: Sun Jul 10 01:06:41 2011 +0100 make files easier to include by themselves - fofi/FoFiTrueType.h | 2 ++ - splash/Splash.h | 3 ++- - splash/SplashFontEngine.h | 3 ++- + fofi/FoFiTrueType.h | 2 ++ + splash/Splash.h | 3 ++- + splash/SplashFontEngine.h | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) commit 866c6d1b0daa8b28f259e1faba075026cf9007e0 Author: Albert Astals Cid -Date: Sun Jul 10 00:55:25 2011 +0100 +Date: Sun Jul 10 00:55:25 2011 +0100 Name most of the classes in poppler/ includable by themselves - poppler/Annot.h | 4 +++- - poppler/Catalog.h | 2 ++ + poppler/Annot.h | 4 +++- + poppler/Catalog.h | 2 ++ poppler/CharCodeToUnicode.h | 4 +++- poppler/CompactFontTables.h | 16 ++++++++++++++++ - poppler/FontInfo.h | 6 +++++- + poppler/FontInfo.h | 6 +++++- poppler/GfxState_helpers.h | 4 +++- poppler/NameToUnicodeTable.h | 18 ++++++++++++++++++ 7 files changed, 50 insertions(+), 4 deletions(-) commit 6b62fb7e9bd7de7f79b9b9a6fe36a5f5da099133 Author: William Bader -Date: Mon Jun 27 19:38:52 2011 +0100 +Date: Mon Jun 27 19:38:52 2011 +0100 Remove unused variable poppler/PSOutputDev.cc | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) + 1 file changed, 1 insertion(+), 4 deletions(-) commit 4bc6c5bd3a001bb4eb9f61488e3d4f356638e391 Author: Adrian Bunk -Date: Tue Jul 5 15:21:06 2011 +0300 +Date: Tue Jul 5 15:21:06 2011 +0300 .gitignore tests additions @@ -2151,64 +8408,64 @@ cpp/tests/.gitignore | 1 + qt4/tests/.gitignore | 1 + test/.gitignore | 1 + - 3 files changed, 3 insertions(+), 0 deletions(-) + 3 files changed, 3 insertions(+) commit 00076bc308ae320244c47777fe351c1c2bef2da8 Author: Albert Astals Cid -Date: Fri Jun 24 22:51:55 2011 +0100 +Date: Fri Jun 24 22:51:55 2011 +0100 Forgot William's (C) here - poppler/Stream.cc | 1 + - poppler/Stream.h | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + poppler/Stream.cc | 1 + + poppler/Stream.h | 1 + + 2 files changed, 2 insertions(+) commit 7e244fde4ec03da08d81af3402b21646c803bd31 Author: William Bader -Date: Fri Jun 24 22:39:13 2011 +0100 +Date: Fri Jun 24 22:39:13 2011 +0100 patch to make -level2sep and -level3sep write gray instead of cmyk If they are only gray of course :D poppler/PSOutputDev.cc | 34 ++++++++++++++++++++++++++++++---- - poppler/Stream.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ - poppler/Stream.h | 29 +++++++++++++++++++++++++++++ + poppler/Stream.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ + poppler/Stream.h | 29 +++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+), 4 deletions(-) commit abba8140a9972197faaca96ec590af7dc9408fb0 Author: William Bader -Date: Fri Jun 24 22:38:33 2011 +0100 +Date: Fri Jun 24 22:38:33 2011 +0100 patch to make -level2sep and -level3sep write cmyk instead of rgb poppler/PSOutputDev.cc | 59 - +++++++++++++++++++++++++++++++++++++++++++---- - 1 files changed, 54 insertions(+), 5 deletions(-) + ++++++++++++++++++++++++++++++++++++++++++++---- + 1 file changed, 54 insertions(+), 5 deletions(-) commit 706007431325b1e8c9bf4cba35c89511b10ebf0c Author: Albert Astals Cid -Date: Mon Jun 20 23:30:50 2011 +0100 +Date: Mon Jun 20 23:30:50 2011 +0100 (C) for Jim fofi/FoFiBase.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit e23384fbb3542941d2cf59ce6560913255ca2b01 Author: Jim Meyering -Date: Mon Jun 20 11:09:01 2011 +0200 +Date: Mon Jun 20 11:09:01 2011 +0200 don't gmalloc(-1) upon ftell failure * fofi/FoFiBase.cc: Diagnose ftell failure. fofi/FoFiBase.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit c5601bde9d8f3f56e558a6f63e563c9d337810eb Author: Steven Murdoch -Date: Mon Jun 20 23:25:43 2011 +0100 +Date: Mon Jun 20 23:25:43 2011 +0100 Fix encoding of PDF document metadata in output of pdftohtml @@ -2223,63 +8480,63 @@ and character set encoding. This static method had to be made public to call it from pdftohtml. See bug #37900. - utils/HtmlFonts.h | 3 ++- - utils/pdftohtml.cc | 41 ++++++++++++++++++++++++++++++++++++++--- + utils/HtmlFonts.h | 3 ++- + utils/pdftohtml.cc | 41 ++++++++++++++++++++++++++++++++++++++--- 2 files changed, 40 insertions(+), 4 deletions(-) commit d4af1c4ef46abf1f11b7215c7b144ce7bb7912eb Author: Joshua Richardson -Date: Sat Jun 18 13:39:54 2011 +0100 +Date: Sat Jun 18 13:39:54 2011 +0100 Fix vertical spacing issues in pdftohtml output. Bug 38019 - utils/HtmlFonts.cc | 3 ++- + utils/HtmlFonts.cc | 3 ++- utils/HtmlOutputDev.cc | 21 +++++++++++++++++++-- 2 files changed, 21 insertions(+), 3 deletions(-) commit 589933ef105b60e8d48854cce15a7548c2850116 Author: Albert Astals Cid -Date: Mon Jun 13 21:24:39 2011 +0100 +Date: Mon Jun 13 21:24:39 2011 +0100 Forgot my (C) - poppler/PreScanOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/PreScanOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit f5d2ddd13d27078355dee63207671885bf9b0926 Author: Albert Astals Cid -Date: Mon Jun 13 18:57:29 2011 +0100 +Date: Mon Jun 13 18:57:29 2011 +0100 We need to include config.h here Fixes crash after patch to fix bug 13518 - poppler/PreScanOutputDev.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + poppler/PreScanOutputDev.cc | 2 ++ + 1 file changed, 2 insertions(+) commit 147ae4bf76a85768c9ed729ca10ee3dae93b8876 Author: Albert Astals Cid -Date: Wed Jun 8 23:36:14 2011 +0100 +Date: Wed Jun 8 23:36:14 2011 +0100 Do not crash if link does not have an action utils/HtmlOutputDev.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 5d9489bf566b700ef38e5e33665a2648b535e1e7 Author: Albert Astals Cid -Date: Sat Jun 4 21:46:10 2011 +0100 +Date: Sat Jun 4 21:46:10 2011 +0100 forgot to update the C - utils/pdftotext.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + utils/pdftotext.cc | 1 + + 1 file changed, 1 insertion(+) commit 7b123bf2b11ac81f24a966186a06de739d3c8f02 Author: Steven Murdoch -Date: Sat Jun 4 20:22:52 2011 +0100 +Date: Sat Jun 4 20:22:52 2011 +0100 Fix pdftotext -htmlmeta to correctly output U+2019 in PDF metadata @@ -2302,61 +8559,61 @@ Bug 37900 - utils/pdftotext.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + utils/pdftotext.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) commit db2ae1bdbb7fcb64ba4c91dfc574d9f970bebdf6 Author: Albert Astals Cid -Date: Sat Jun 4 13:23:11 2011 +0100 +Date: Sat Jun 4 13:23:11 2011 +0100 Make sure catDict is a dict - poppler/Catalog.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + poppler/Catalog.cc | 5 +++++ + 1 file changed, 5 insertions(+) commit 58915affbdf1b5780f25d172a582c69fb2413230 Author: Albert Astals Cid -Date: Sat Jun 4 13:20:02 2011 +0100 +Date: Sat Jun 4 13:20:02 2011 +0100 Make sure catDict is a dict before using it KDE Bug 274888 shows it's possible to get aborts because of that - poppler/Catalog.cc | 26 ++++++++++++++++---------- - 1 files changed, 16 insertions(+), 10 deletions(-) + poppler/Catalog.cc | 26 ++++++++++++++++---------- + 1 file changed, 16 insertions(+), 10 deletions(-) commit 4ebc7e364409fe303e7a5729b568913e3c92e7d4 Author: Albert Astals Cid -Date: Sat Jun 4 13:19:34 2011 +0100 +Date: Sat Jun 4 13:19:34 2011 +0100 We need to free catDict on failure - poppler/Catalog.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Catalog.cc | 1 + + 1 file changed, 1 insertion(+) commit 335a7fc6d98f5facc1ff098a91ac968387473cb3 Author: Albert Astals Cid -Date: Tue May 31 23:18:26 2011 +0100 +Date: Tue May 31 23:18:26 2011 +0100 Make parse() private - poppler/Catalog.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + poppler/Catalog.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit 311d69ef2222409859817737c44b8e741289d897 Author: Axel Strübing -Date: Sun May 29 16:12:29 2011 +0100 +Date: Sun May 29 16:12:29 2011 +0100 Needs to be freed As i said in my last commit comment :D - poppler/PDFDoc.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + poppler/PDFDoc.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) commit 66c7d0199b45bc7c81c88a9989c9515398d30d43 Author: Albert Astals Cid -Date: Sat May 28 17:32:02 2011 +0100 +Date: Sat May 28 17:32:02 2011 +0100 No need to check for NULL @@ -2364,81 +8621,81 @@ test it poppler/PDFDoc.cc | 21 ++++++++++----------- - 1 files changed, 10 insertions(+), 11 deletions(-) + 1 file changed, 10 insertions(+), 11 deletions(-) commit 450934619a1c5b2a58f65649f567274af8d24ea7 Author: Albert Astals Cid -Date: Sat May 28 12:37:08 2011 +0100 +Date: Sat May 28 12:37:08 2011 +0100 Parse that as unicode Fixes KDE Bug #274055 qt4/src/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 04dfb2c984b3c9949466e2b70e26b58029c5a7d3 Author: Carlos Garcia Campos -Date: Sat May 7 12:55:34 2011 +0200 +Date: Sat May 7 12:55:34 2011 +0200 Make FileSpec a class and move EmbFile from Catalog to FileSpec Qt and cpp frontends adapted by Pino Toscano - cpp/poppler-document.cpp | 4 +- - cpp/poppler-embedded-file-private.h | 10 +- - cpp/poppler-embedded-file.cpp | 42 +++++++---- - glib/poppler-annot.cc | 6 +- - glib/poppler-attachment.cc | 33 +++++---- - glib/poppler-document.cc | 5 +- - glib/poppler-private.h | 3 +- - poppler/Catalog.cc | 118 + cpp/poppler-document.cpp | 4 +- + cpp/poppler-embedded-file-private.h | 10 +-- + cpp/poppler-embedded-file.cpp | 42 +++++++---- + glib/poppler-annot.cc | 6 +- + glib/poppler-attachment.cc | 33 ++++---- + glib/poppler-document.cc | 5 +- + glib/poppler-private.h | 3 +- + poppler/Catalog.cc | 118 ++--------------------------- - poppler/Catalog.h | 55 +------------- - poppler/FileSpec.cc | 128 + poppler/Catalog.h | 55 +------------- + poppler/FileSpec.cc | 128 ++++++++++++++++++++++++++++++++ - poppler/FileSpec.h | 51 ++++++++++++- + poppler/FileSpec.h | 51 ++++++++++++- qt4/src/poppler-embeddedfile-private.h | 6 +- - qt4/src/poppler-embeddedfile.cc | 34 +++++--- - qt4/src/poppler-page.cc | 5 +- - qt4/src/poppler-private.h | 4 +- - qt4/tests/check_attachments.cpp | 12 ++-- + qt4/src/poppler-embeddedfile.cc | 34 +++++---- + qt4/src/poppler-page.cc | 5 +- + qt4/src/poppler-private.h | 4 +- + qt4/tests/check_attachments.cpp | 12 +-- 16 files changed, 284 insertions(+), 232 deletions(-) commit 74f9befddd4b5848c4af0c1b2848a1322f8cd0a2 Author: Pino Toscano -Date: Wed May 25 16:46:15 2011 +0200 +Date: Wed May 25 16:46:15 2011 +0200 [qt4] Page needs to be a friend of EmbeddedFile, too qt4/src/poppler-qt4.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 74853614d617486b7b62e9c08be39a6e58bc7d9b Author: Pino Toscano -Date: Wed May 25 16:40:49 2011 +0200 +Date: Wed May 25 16:40:49 2011 +0200 update copyrights qt4/src/poppler-embeddedfile-private.h | 2 +- - qt4/src/poppler-embeddedfile.cc | 2 +- - qt4/src/poppler-qt4.h | 2 +- + qt4/src/poppler-embeddedfile.cc | 2 +- + qt4/src/poppler-qt4.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit e6b2dec502c02f9fbaed480f227cf7145249a98e Author: Pino Toscano -Date: Wed May 25 16:39:09 2011 +0200 +Date: Wed May 25 16:39:09 2011 +0200 [qt4] one more usage of the new EmbeddedFile ctor followup of a264e5385b2d0fee5126b3d0e57d42d34cafa45d qt4/src/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a264e5385b2d0fee5126b3d0e57d42d34cafa45d Author: Pino Toscano -Date: Wed May 25 16:12:02 2011 +0200 +Date: Wed May 25 16:12:02 2011 +0200 [qt4] create EmbeddedFile by EmbeddedFileData only @@ -2447,25 +8704,25 @@ - turn the old private EmbeddedFile(EmbFile*) ctor in a death machine qt4/src/poppler-embeddedfile-private.h | 3 +++ - qt4/src/poppler-embeddedfile.cc | 21 ++++++++++++++++++--- - qt4/src/poppler-private.h | 3 ++- - qt4/src/poppler-qt4.h | 2 ++ + qt4/src/poppler-embeddedfile.cc | 21 ++++++++++++++++++--- + qt4/src/poppler-private.h | 3 ++- + qt4/src/poppler-qt4.h | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) commit 232bfa1c59013637fd7e858e22194becb636ad21 Author: Pino Toscano -Date: Wed May 25 15:55:48 2011 +0200 +Date: Wed May 25 15:55:48 2011 +0200 [Qt4] split EmbeddedFileData in an own file qt4/src/poppler-embeddedfile-private.h | 37 ++++++++++++++++++++++++++++++++ - qt4/src/poppler-embeddedfile.cc | 7 +----- + qt4/src/poppler-embeddedfile.cc | 7 +----- 2 files changed, 38 insertions(+), 6 deletions(-) commit a7242b78b3c9a64cf38ac150e6a914d7abce3355 Author: Albert Astals Cid -Date: Sat May 7 11:10:11 2011 +0100 +Date: Sat May 7 11:10:11 2011 +0100 Do not free a shallow copy of an object we'll free later @@ -2473,177 +8730,177 @@ Fixes KDE BUG #268816 (cherry picked from commit dab9cdf795d6caead555326958e86e844ace067b) - poppler/Catalog.cc | 12 +++++------- - poppler/Catalog.h | 2 +- + poppler/Catalog.cc | 12 +++++------- + poppler/Catalog.h | 2 +- 2 files changed, 6 insertions(+), 8 deletions(-) commit 4db2452b3d345d9531987998e6b5532a59137e1d Author: Carlos Garcia Campos -Date: Fri May 6 14:57:51 2011 +0200 +Date: Fri May 6 14:57:51 2011 +0200 glib: Add poppler_document_get_n_attachments() - glib/poppler-document.cc | 34 + glib/poppler-document.cc | 34 ++++++++++++++++++++++++---------- - glib/poppler-document.h | 1 + - glib/reference/poppler-sections.txt | 1 + + glib/poppler-document.h | 1 + + glib/reference/poppler-sections.txt | 1 + 3 files changed, 26 insertions(+), 10 deletions(-) commit 3e3284de3fe1916d7f8161ede7bf49c76d01f303 Author: Carlos Garcia Campos -Date: Fri May 6 14:49:05 2011 +0200 +Date: Fri May 6 14:49:05 2011 +0200 glib: Update gtk-doc.make gtk-doc.make | 151 - +++++++++++++++++++++++++++++++++++++-------------------- - 1 files changed, 98 insertions(+), 53 deletions(-) + +++++++++++++++++++++++++++++++++++++--------------------- + 1 file changed, 98 insertions(+), 53 deletions(-) commit 9a77bd7706a08d9aeabe600e3500c14493ac8519 Author: Carlos Garcia Campos -Date: Fri May 6 14:48:38 2011 +0200 +Date: Fri May 6 14:48:38 2011 +0200 glib-demo: Add missing permission flags to info demo glib/demo/info.cc | 39 ++++++++++++++++++++++++++++++++++++--- - 1 files changed, 36 insertions(+), 3 deletions(-) + 1 file changed, 36 insertions(+), 3 deletions(-) commit 091c155f8a7bc79da84cd21877be389de1f2b1a3 Author: Carlos Garcia Campos -Date: Fri May 6 14:47:36 2011 +0200 +Date: Fri May 6 14:47:36 2011 +0200 glib: Add missing permissions flags to PopplerPermissions glib/poppler-document.cc | 6 ++++++ glib/poppler-document.h | 10 +++++++++- - 2 files changed, 15 insertions(+), 1 deletions(-) + 2 files changed, 15 insertions(+), 1 deletion(-) commit 632d6a40ce3a5d3d8e10bf7e93e8eb578beae907 Author: Albert Astals Cid -Date: Tue May 3 21:54:59 2011 +0100 +Date: Tue May 3 21:54:59 2011 +0100 0.17.1 - CMakeLists.txt | 4 ++-- - NEWS | 12 ++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- + CMakeLists.txt | 4 ++-- + NEWS | 12 ++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- 6 files changed, 18 insertions(+), 6 deletions(-) commit ecb136b9927a454df9360a307ccd741eaea3ca93 Author: Albert Astals Cid -Date: Tue May 3 21:42:45 2011 +0100 +Date: Tue May 3 21:42:45 2011 +0100 remove unused vars - poppler/Annot.cc | 9 ++------- - poppler/ArthurOutputDev.cc | 12 ++---------- + poppler/Annot.cc | 9 ++------- + poppler/ArthurOutputDev.cc | 12 ++---------- 2 files changed, 4 insertions(+), 17 deletions(-) commit ad131763640b2e27dde75c42b514386284b6a60d Author: Pino Toscano -Date: Wed Apr 27 22:36:13 2011 +0200 +Date: Wed Apr 27 22:36:13 2011 +0200 [qt4/tests] turn some assignments to bool into QVERIFY checks qt4/tests/check_optcontent.cpp | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit be08dd69d9dd4fcb22400f2f0aea331222e88e4a Author: Albert Astals Cid -Date: Wed Apr 27 20:45:36 2011 +0100 +Date: Wed Apr 27 20:45:36 2011 +0100 update copyright years (cherry picked from commit 2fbd493197309de5700f71f09967c9d23add88d3) - poppler/Annot.cc | 1 + - utils/pdftotext.cc | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + poppler/Annot.cc | 1 + + utils/pdftotext.cc | 1 + + 2 files changed, 2 insertions(+) commit 39bcce0c8ed378aafb1019ffd1ae40330f6bb63f Author: Albert Astals Cid -Date: Wed Apr 27 19:39:01 2011 +0100 +Date: Wed Apr 27 19:39:01 2011 +0100 Remove more variables that are set but then unused - poppler/SplashOutputDev.cc | 11 +------ - utils/HtmlOutputDev.cc | 75 + poppler/SplashOutputDev.cc | 11 +------ + utils/HtmlOutputDev.cc | 75 +------------------------------------------- 2 files changed, 2 insertions(+), 84 deletions(-) commit 6656cf657b62d626910a02dfae9b6a1eb77772dd Author: Albert Astals Cid -Date: Wed Apr 27 08:46:37 2011 +0100 +Date: Wed Apr 27 08:46:37 2011 +0100 Remove unused vars poppler/TextOutputDev.cc | 6 +----- - 1 files changed, 1 insertions(+), 5 deletions(-) + 1 file changed, 1 insertion(+), 5 deletions(-) commit ce55510f4dd10dfec2fc5b1c211c4a546c6ebc98 Author: Albert Astals Cid -Date: Wed Apr 27 08:42:34 2011 +0100 +Date: Wed Apr 27 08:42:34 2011 +0100 Remove unused vars - splash/Splash.cc | 5 ++--- + splash/Splash.cc | 5 ++--- splash/SplashFTFontEngine.cc | 4 +--- - splash/SplashXPath.cc | 6 ++---- + splash/SplashXPath.cc | 6 ++---- 3 files changed, 5 insertions(+), 10 deletions(-) commit 49d199fd1ea14383638739d95d019adb33b17768 Author: Albert Astals Cid -Date: Wed Apr 27 08:38:17 2011 +0100 +Date: Wed Apr 27 08:38:17 2011 +0100 Fix page_transition::operator= cpp/poppler-page-transition.cpp | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 807c1df2bf79c7c6378390b41dc230d80533ae3f Author: Tom Gleason -Date: Tue Apr 26 17:06:07 2011 +0100 +Date: Tue Apr 26 17:06:07 2011 +0100 bbox coordinates are relative to MediaBox size, not CropBox size - utils/pdftotext.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + utils/pdftotext.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 813f41367a681702ae7a155d5c2f3195124a9096 Author: Carlos Garcia Campos -Date: Sun Apr 3 20:40:15 2011 +0200 +Date: Sun Apr 3 20:40:15 2011 +0200 forms: fix mem leak in case of error poppler/Form.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 722baf8baf42e2c7a49e1560aae5235677d1ddee Author: Carlos Garcia Campos -Date: Sun Apr 3 20:17:57 2011 +0200 +Date: Sun Apr 3 20:17:57 2011 +0200 forms: check form field is actually terminal before creating the widget poppler/Form.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 5f6f7fc569d1c891956a3c37b3e328504635ab33 Author: Albert Astals Cid -Date: Sun Apr 3 15:06:45 2011 +0100 +Date: Sun Apr 3 15:06:45 2011 +0100 Properly initialize pageObjectNum to 0 Bug 35925 poppler/Hints.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit d6786edc2549164214342a50782b72c2fd904b63 Author: Carlos Garcia Campos -Date: Sun Apr 3 13:11:18 2011 +0200 +Date: Sun Apr 3 13:11:18 2011 +0200 forms: Remove unused parameter @@ -2653,7 +8910,7 @@ commit 62692ff381f3b7907b330bfc2019416ed058ea46 Author: Carlos Garcia Campos -Date: Sun Apr 3 13:01:42 2011 +0200 +Date: Sun Apr 3 13:01:42 2011 +0200 forms: rework the way form fields tree is built @@ -2668,188 +8925,188 @@ poppler/Annot.cc | 4 +- poppler/Form.cc | 237 +++++++++++++++++++++++++++++------------------------- - poppler/Form.h | 17 +++-- + poppler/Form.h | 17 ++-- 3 files changed, 137 insertions(+), 121 deletions(-) commit a6802301d9c3ab8bf68bd8821f562f8ecced8491 Author: Carlos Garcia Campos -Date: Mon Mar 28 17:42:37 2011 +0200 +Date: Mon Mar 28 17:42:37 2011 +0200 forms: Add debug methods to print the forms tree poppler/Form.cc | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Form.h | 25 +++++++++++++++++ - 2 files changed, 103 insertions(+), 0 deletions(-) + poppler/Form.h | 25 ++++++++++++++++++ + 2 files changed, 103 insertions(+) commit 46f87da04700cdd1afa634f9c554e376f6f6f752 Author: José Aliste -Date: Thu Mar 31 08:09:41 2011 -0400 +Date: Thu Mar 31 08:09:41 2011 -0400 Fix a memleak in AnnotScreen::initialize poppler/Annot.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b64178eaa5dd01f914649d6faa870fa140ddaf9b Author: Carlos Garcia Campos -Date: Wed Mar 30 15:17:54 2011 +0200 +Date: Wed Mar 30 15:17:54 2011 +0200 glib: docs: Add PopplerActionJavascript to poppler-sections.txt - glib/reference/poppler-sections.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + glib/reference/poppler-sections.txt | 1 + + 1 file changed, 1 insertion(+) commit 3d777181ddee8f7ab2cc9e4684879cb5b52b065c Author: Carlos Garcia Campos -Date: Wed Mar 30 15:16:04 2011 +0200 +Date: Wed Mar 30 15:16:04 2011 +0200 glib: Use Javascript instead of JavaScript for consistency glib/poppler-action.h | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit c4774fecfe3d523f32d5980f50e31daa798c9692 Author: Carlos Garcia Campos -Date: Wed Mar 30 15:08:59 2011 +0200 +Date: Wed Mar 30 15:08:59 2011 +0200 glib-demo: show javascript actions in actions view glib/demo/utils.c | 25 +++++++++++++++++++++++++ - 1 files changed, 25 insertions(+), 0 deletions(-) + 1 file changed, 25 insertions(+) commit 68bbbe1a3f68d242b35027ae41f5751b02a2a700 Author: José Aliste -Date: Tue Mar 29 04:56:37 2011 -0400 +Date: Tue Mar 29 04:56:37 2011 -0400 glib: add JavaScript actions glib/poppler-action.cc | 24 ++++++++++++++++++++++++ - glib/poppler-action.h | 14 +++++++++++++- - 2 files changed, 37 insertions(+), 1 deletions(-) + glib/poppler-action.h | 14 +++++++++++++- + 2 files changed, 37 insertions(+), 1 deletion(-) commit 3dd934088a06f246718382601030c9b093d04160 Author: Albert Astals Cid -Date: Wed Mar 30 00:03:58 2011 +0100 +Date: Wed Mar 30 00:03:58 2011 +0100 Need to create the globalParams qt4/tests/check_optcontent.cpp | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit ce0d4278a32b3ba19c2002ed0c481c58b1854d59 Author: Albert Astals Cid -Date: Tue Mar 29 23:47:33 2011 +0100 +Date: Tue Mar 29 23:47:33 2011 +0100 Long gone - Makefile.am | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + Makefile.am | 2 -- + 1 file changed, 2 deletions(-) commit 12337026533aa59bb66022ce8a119f37aafd4fad Author: Albert Astals Cid -Date: Tue Mar 29 23:40:57 2011 +0100 +Date: Tue Mar 29 23:40:57 2011 +0100 increase sonames - CMakeLists.txt | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- - poppler/Makefile.am | 2 +- + CMakeLists.txt | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- + poppler/Makefile.am | 2 +- qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- + qt4/src/Makefile.am | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) commit a6e613b01698c6b38deff5248fcf7c0b17d041c3 Author: Albert Astals Cid -Date: Tue Mar 29 23:40:38 2011 +0100 +Date: Tue Mar 29 23:40:38 2011 +0100 more typos NEWS | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit e3ee037ede67212836be158b935deb7ea974b7f7 Author: Albert Astals Cid -Date: Tue Mar 29 23:38:24 2011 +0100 +Date: Tue Mar 29 23:38:24 2011 +0100 typo NEWS | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 8bcd94964f0af17a3f5b6edf71127df3daa00b1a Author: Albert Astals Cid -Date: Tue Mar 29 23:30:30 2011 +0100 +Date: Tue Mar 29 23:30:30 2011 +0100 typo NEWS | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a05b9dacbe5dbd4337fdbb3e7d7d364ad5fbaeab Author: Albert Astals Cid -Date: Tue Mar 29 23:28:49 2011 +0100 +Date: Tue Mar 29 23:28:49 2011 +0100 0.17.0 version number CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- + configure.ac | 2 +- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4637b737b4735c70017b46a3ed6c0ee069c02c9b Author: Albert Astals Cid -Date: Tue Mar 29 23:28:41 2011 +0100 +Date: Tue Mar 29 23:28:41 2011 +0100 0.17.0 news NEWS | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 108 insertions(+), 0 deletions(-) + 1 file changed, 108 insertions(+) commit a55cc5d9c67ede1d96f6e5a58179ddd9f563c53f Author: Albert Astals Cid -Date: Tue Mar 29 22:51:40 2011 +0100 +Date: Tue Mar 29 22:51:40 2011 +0100 Update years - poppler/Catalog.cc | 2 +- - poppler/Catalog.h | 2 +- + poppler/Catalog.cc | 2 +- + poppler/Catalog.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit d96efb6c1af621be78e998ba1a228022c3c076fc Author: Pino Toscano -Date: Tue Mar 29 11:13:03 2011 +0200 +Date: Tue Mar 29 11:13:03 2011 +0200 fix comment - poppler/ViewerPreferences.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/ViewerPreferences.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 74ec81d66d4d5bc45cccc4aa8794df1c517f2d74 Author: Pino Toscano -Date: Tue Mar 29 11:07:36 2011 +0200 +Date: Tue Mar 29 11:07:36 2011 +0200 viewer preferences: read PrintScaling and Duplex poppler/ViewerPreferences.cc | 24 ++++++++++++++++++++++++ poppler/ViewerPreferences.h | 14 ++++++++++++++ - 2 files changed, 38 insertions(+), 0 deletions(-) + 2 files changed, 38 insertions(+) commit b41bcd484dd7a93a339270926c57caa524059d8f Author: Pino Toscano -Date: Tue Mar 29 10:58:46 2011 +0200 +Date: Tue Mar 29 10:58:46 2011 +0200 free the viewerPreferences Object - poppler/Catalog.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Catalog.cc | 1 + + 1 file changed, 1 insertion(+) commit 1dd88d0b6b7cbfda76e81902a351c89457a061a8 Author: Pino Toscano -Date: Tue Mar 29 09:58:10 2011 +0200 +Date: Tue Mar 29 09:58:10 2011 +0200 read the ViewerPreferences dict once, and construct ViewerPreferences on demand @@ -2857,41 +9114,41 @@ this way it is possible to know whether the ViewerPreferences dictionary is present in the Catalog - poppler/Catalog.cc | 24 +++++++++--------------- - poppler/Catalog.h | 3 ++- + poppler/Catalog.cc | 24 +++++++++--------------- + poppler/Catalog.h | 3 ++- 2 files changed, 11 insertions(+), 16 deletions(-) commit f10b0b8c88a7df83ada09f32b6cb6fd930fcb748 Author: Pino Toscano -Date: Tue Mar 29 09:57:46 2011 +0200 +Date: Tue Mar 29 09:57:46 2011 +0200 assume the prefDict is not null poppler/ViewerPreferences.cc | 4 ---- - 1 files changed, 0 insertions(+), 4 deletions(-) + 1 file changed, 4 deletions(-) commit d4a5ea45057cad531a8979cf9861ac05cdd56613 Author: Pino Toscano -Date: Tue Mar 29 09:54:22 2011 +0200 +Date: Tue Mar 29 09:54:22 2011 +0200 fix variable name for DisplayDocTitle poppler/ViewerPreferences.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit cf84a05ae524aa9b266463cc23cccc3860ff1ba3 Author: Pino Toscano -Date: Mon Mar 28 23:18:02 2011 +0200 +Date: Mon Mar 28 23:18:02 2011 +0200 viewer preferences: read NonFullScreenPageMode and Direction poppler/ViewerPreferences.cc | 26 ++++++++++++++++++++++++++ poppler/ViewerPreferences.h | 15 +++++++++++++++ - 2 files changed, 41 insertions(+), 0 deletions(-) + 2 files changed, 41 insertions(+) commit 460253a6705a227ff7c36e9c31cceb93cce4d78b Author: Pino Toscano -Date: Mon Mar 28 22:37:54 2011 +0200 +Date: Mon Mar 28 22:37:54 2011 +0200 read some boolean viewer preferences @@ -2905,11 +9162,11 @@ poppler/ViewerPreferences.cc | 41 +++++++++++++++++++++++++++++++++++++++++ poppler/ViewerPreferences.h | 13 +++++++++++++ - 2 files changed, 54 insertions(+), 0 deletions(-) + 2 files changed, 54 insertions(+) commit 9fa9ac3546674120532bb512b82af6471cbebf01 Author: Pino Toscano -Date: Mon Mar 28 19:58:16 2011 +0200 +Date: Mon Mar 28 19:58:16 2011 +0200 add skeleton for ViewerPreferences @@ -2918,50 +9175,50 @@ created on demand and in any occasion (so defaults are in one place only) - CMakeLists.txt | 2 ++ - poppler/Catalog.cc | 23 +++++++++++++++++++++++ - poppler/Catalog.h | 4 ++++ - poppler/Makefile.am | 2 ++ + CMakeLists.txt | 2 ++ + poppler/Catalog.cc | 23 +++++++++++++++++++++++ + poppler/Catalog.h | 4 ++++ + poppler/Makefile.am | 2 ++ poppler/ViewerPreferences.cc | 30 ++++++++++++++++++++++++++++++ poppler/ViewerPreferences.h | 34 ++++++++++++++++++++++++++++++++++ - 6 files changed, 95 insertions(+), 0 deletions(-) + 6 files changed, 95 insertions(+) commit c6081f0bf00d7dcdfa1d09e91e4c9a1fe5a54ad6 Author: Pino Toscano -Date: Mon Mar 28 19:55:00 2011 +0200 +Date: Mon Mar 28 19:55:00 2011 +0200 delete the temporary buffers created by pdfDocEncodingToUTF16() poppler/Form.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit d94d5056d5570e2f5cb578736eba12317ea63fa4 Author: Carlos Garcia Campos -Date: Mon Mar 28 18:20:31 2011 +0200 +Date: Mon Mar 28 18:20:31 2011 +0200 glib-demo: show the activation action of form fields if there's one glib/demo/forms.c | 21 ++++++++++++++++----- - 1 files changed, 16 insertions(+), 5 deletions(-) + 1 file changed, 16 insertions(+), 5 deletions(-) commit ba0f36b76d0c2fd4ef39f3013fc125a53747c03f Author: Carlos Garcia Campos -Date: Mon Mar 28 18:17:52 2011 +0200 +Date: Mon Mar 28 18:17:52 2011 +0200 glib: Add poppler_form_field_get_action() Fixes bug #33174. - glib/poppler-form-field.cc | 34 + glib/poppler-form-field.cc | 34 ++++++++++++++++++++++++++++++++++ - glib/poppler-form-field.h | 1 + - glib/poppler-private.h | 1 + - glib/reference/poppler-sections.txt | 1 + - 4 files changed, 37 insertions(+), 0 deletions(-) + glib/poppler-form-field.h | 1 + + glib/poppler-private.h | 1 + + glib/reference/poppler-sections.txt | 1 + + 4 files changed, 37 insertions(+) commit ae5b9cf884ce38dde409c3e5b0f6c46f7d6327d2 Author: Carlos Garcia Campos -Date: Mon Mar 28 17:43:53 2011 +0200 +Date: Mon Mar 28 17:43:53 2011 +0200 Revert "Patch for embedding videos in to the pdf" @@ -2975,102 +9232,102 @@ poppler/Annot.cc | 377 ------------------------------------------------- poppler/Annot.h | 2 - - 4 files changed, 0 insertions(+), 417 deletions(-) + 4 files changed, 417 deletions(-) commit b7edd4c93539585652961ecf2db9c4462415c8bc Author: Carlos Garcia Campos -Date: Sun Mar 27 12:31:19 2011 +0200 +Date: Sun Mar 27 12:31:19 2011 +0200 annot: Always create appearance streams when NeedAppearances is true Fixes regression in document example_054.pdf poppler/Annot.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit e9350899e77c28452c48b56349ad7758b3fd47ba Author: Albert Astals Cid -Date: Thu Mar 24 20:09:18 2011 +0000 +Date: Thu Mar 24 20:09:18 2011 +0000 Introduce splash-friendly getRGBLine functions So it does not need to pack and unpack the color again and again - poppler/GfxState.cc | 248 - +++++++++++++++++++++++++++++++++++++++++-- - poppler/GfxState.h | 22 +++- - poppler/SplashOutputDev.cc | 43 ++------ + poppler/GfxState.cc | 248 + +++++++++++++++++++++++++++++++++++++++++--- + poppler/GfxState.h | 22 +++- + poppler/SplashOutputDev.cc | 43 ++------ 3 files changed, 265 insertions(+), 48 deletions(-) commit 7b08795a9541e9fa01836b4c7fd63f6fe295ad80 Author: Carlos Garcia Campos -Date: Thu Mar 24 12:16:07 2011 +0100 +Date: Thu Mar 24 12:16:07 2011 +0100 glib: Add g_return macros to make sure index is correct in form field choice methods - glib/poppler-form-field.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + glib/poppler-form-field.cc | 4 ++++ + 1 file changed, 4 insertions(+) commit f1102fccd2899bc7f97414b1e2a295c59f03da22 Author: Carlos Garcia Campos -Date: Thu Mar 24 12:15:30 2011 +0100 +Date: Thu Mar 24 12:15:30 2011 +0100 glib-demo: Fix a crash when a choice form field has no items selected - glib/demo/forms.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + glib/demo/forms.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit b3971ee6bca6b14b75f046c831a31ac1e5e3241e Author: Albert Astals Cid -Date: Tue Mar 22 22:08:27 2011 +0000 +Date: Tue Mar 22 22:08:27 2011 +0000 kill this TODO, n is too small - poppler/SplashOutputDev.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + poppler/SplashOutputDev.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) commit 1064d75817401fe24f728c189b450e9e906beb56 Author: Albert Astals Cid -Date: Tue Mar 22 20:43:05 2011 +0000 +Date: Tue Mar 22 20:43:05 2011 +0000 kill unmaintained abiword backend - CMakeLists.txt | 16 - - configure.ac | 16 - + CMakeLists.txt | 16 - + configure.ac | 16 - poppler/ABWOutputDev.cc | 1179 ----------------------------------------------- poppler/ABWOutputDev.h | 141 ------ - poppler/Makefile.am | 17 - - utils/CMakeLists.txt | 10 - - utils/Makefile.am | 18 +- - utils/pdftoabw.cc | 201 -------- + poppler/Makefile.am | 17 - + utils/CMakeLists.txt | 10 - + utils/Makefile.am | 18 +- + utils/pdftoabw.cc | 201 -------- 8 files changed, 2 insertions(+), 1596 deletions(-) commit abf167af8b15e5f3b510275ce619e6fdb42edd40 Author: Thomas Freitag -Date: Mon Mar 21 21:34:46 2011 +0000 +Date: Mon Mar 21 21:34:46 2011 +0000 Implement tiling/patterns in SplashOutputDev Fixes bug 13518 - poppler/CairoOutputDev.cc | 5 +- - poppler/CairoOutputDev.h | 10 +- - poppler/Gfx.cc | 6 +- - poppler/OutputDev.h | 6 +- - poppler/PSOutputDev.cc | 8 +- - poppler/PSOutputDev.h | 6 +- - poppler/PreScanOutputDev.cc | 22 ++++- - poppler/PreScanOutputDev.h | 16 +++- - poppler/SplashOutputDev.cc | 265 + poppler/CairoOutputDev.cc | 5 +- + poppler/CairoOutputDev.h | 10 +- + poppler/Gfx.cc | 6 +- + poppler/OutputDev.h | 6 +- + poppler/PSOutputDev.cc | 8 +- + poppler/PSOutputDev.h | 6 +- + poppler/PreScanOutputDev.cc | 22 +++- + poppler/PreScanOutputDev.h | 16 ++- + poppler/SplashOutputDev.cc | 265 +++++++++++++++++++++++++++++++++++++++++++ - poppler/SplashOutputDev.h | 12 ++ + poppler/SplashOutputDev.h | 12 ++ 10 files changed, 334 insertions(+), 22 deletions(-) commit 66575c990f379871e4b796befc899de178332670 Author: Srinivas Adicherla -Date: Thu Mar 17 20:14:05 2011 +0000 +Date: Thu Mar 17 20:14:05 2011 +0000 Patch for embedding videos in to the pdf @@ -3079,148 +9336,148 @@ poppler/Annot.cc | 377 +++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 2 + - 4 files changed, 417 insertions(+), 0 deletions(-) + 4 files changed, 417 insertions(+) commit ec1917968d2f1c7a00772a0829b3fcc6957d8f3c Author: Albert Astals Cid -Date: Mon Mar 14 00:13:26 2011 +0000 +Date: Mon Mar 14 00:13:26 2011 +0000 Only build gtk-test if we have to build gtk-test test/Makefile.am | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 1acbb01e72a22f70f00dc058ff206e3bc05bc0ab Author: Albert Astals Cid -Date: Sun Mar 13 14:49:48 2011 +0000 +Date: Sun Mar 13 14:49:48 2011 +0000 (C) years - poppler/CachedFile.cc | 2 +- - poppler/CurlCachedFile.cc | 2 +- + poppler/CachedFile.cc | 2 +- + poppler/CurlCachedFile.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit bc8aeb269aa92406081f749064ceff75bb3145e7 Author: Hib Eris -Date: Sat Mar 12 23:17:59 2011 +0100 +Date: Sat Mar 12 23:17:59 2011 +0100 Check response code of libcurl call - poppler/CachedFile.cc | 8 +++++++- + poppler/CachedFile.cc | 8 +++++++- poppler/CurlCachedFile.cc | 12 +++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) commit 0268cedee5b460835a4747d0ea41bbe12269310d Author: Carlos Garcia Campos -Date: Sat Mar 12 15:24:30 2011 +0100 +Date: Sat Mar 12 15:24:30 2011 +0100 cairo: Fix typo - poppler/CairoFontEngine.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/CairoFontEngine.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5aa369e68e5c9f14efc888c7b26da06aa8bd2a78 Author: Albert Astals Cid -Date: Sat Mar 12 13:47:34 2011 +0000 +Date: Sat Mar 12 13:47:34 2011 +0000 Remove unused variable - poppler/CurlCachedFile.cc | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + poppler/CurlCachedFile.cc | 2 -- + 1 file changed, 2 deletions(-) commit c0dffbe28f91b30b36310ab0b9a9b948610550ae Author: Pino Toscano -Date: Sat Mar 12 12:15:58 2011 +0100 +Date: Sat Mar 12 12:15:58 2011 +0100 update copyright years cpp/poppler-document-private.h | 2 +- - cpp/poppler-document.cpp | 2 +- + cpp/poppler-document.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b8fab173ffdd1e62a34b530228d08bc5ec6725ac Author: Pino Toscano -Date: Sat Mar 12 12:13:05 2011 +0100 +Date: Sat Mar 12 12:13:05 2011 +0100 [cpp] init the globalParams early in the document loading introduce a small RAII class to init/deinit the globalParams, and make document_private inherit from it - cpp/poppler-document-private.h | 17 ++++++++---- - cpp/poppler-document.cpp | 52 - +++++++++++++++++++++------------------ + cpp/poppler-document-private.h | 17 ++++++++----- + cpp/poppler-document.cpp | 52 + +++++++++++++++++++++------------------- 2 files changed, 39 insertions(+), 30 deletions(-) commit a97a54cb22def2a9fc381fb81842dad9e5c3931f Author: Pino Toscano -Date: Sat Mar 12 12:12:11 2011 +0100 +Date: Sat Mar 12 12:12:11 2011 +0100 forms: delete tmp_str after being converted to GooString poppler/Form.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 9671fe07f8c9ade956742cb141b99518c3b12bad Author: Albert Astals Cid -Date: Fri Mar 11 00:05:52 2011 +0000 +Date: Fri Mar 11 00:05:52 2011 +0000 getForm can return NULL, do not crash if that happens poppler/Annot.cc | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) + 1 file changed, 6 insertions(+), 4 deletions(-) commit bd32672899f5ca4509ec9311de8092d14bec8ab1 Author: Albert Astals Cid -Date: Thu Mar 10 23:33:15 2011 +0000 +Date: Thu Mar 10 23:33:15 2011 +0000 update copyright years - poppler/Catalog.cc | 2 +- + poppler/Catalog.cc | 2 +- qt4/src/poppler-form.cc | 1 + - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit 841f3bbca37015ec2c58d7b85a73cef5681294f8 Author: Albert Astals Cid -Date: Thu Mar 10 23:30:51 2011 +0000 +Date: Thu Mar 10 23:30:51 2011 +0000 Do not infinite loop poppler/Form.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit f2fcafdc2b982d9bbed3c01bc7d45c8bd0603f19 Author: Albert Astals Cid -Date: Thu Mar 10 23:27:41 2011 +0000 +Date: Thu Mar 10 23:27:41 2011 +0000 Create the globalParams before the pdfdoc - qt4/src/poppler-private.cc | 5 +---- - qt4/src/poppler-private.h | 12 ++++++++---- + qt4/src/poppler-private.cc | 5 +---- + qt4/src/poppler-private.h | 12 ++++++++---- 2 files changed, 9 insertions(+), 8 deletions(-) commit f956b03604b195623ab034a06942a39547adf905 Author: Albert Astals Cid -Date: Thu Mar 10 00:01:18 2011 +0000 +Date: Thu Mar 10 00:01:18 2011 +0000 compile qt4/src/poppler-form.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit f0ec3bedc5490aa35e54563019fcf2c3f8b7647d Author: Carlos Garcia Campos -Date: Wed Mar 9 20:54:15 2011 +0100 +Date: Wed Mar 9 20:54:15 2011 +0100 forms: Remove unused method FormWidget::updateField() poppler/Form.cc | 22 ---------------------- poppler/Form.h | 2 -- - 2 files changed, 0 insertions(+), 24 deletions(-) + 2 files changed, 24 deletions(-) commit 93c25e100ae2564b9a866b95bed16d2fac619bd7 Author: Carlos Garcia Campos -Date: Wed Mar 9 20:49:32 2011 +0100 +Date: Wed Mar 9 20:49:32 2011 +0100 forms: Rename FormField::createActivationAction() to FormField::getActivationAction() @@ -3228,14 +9485,14 @@ And use the existing action from the AnnotWidget instead of creating a new one. - poppler/Form.cc | 11 ++--------- - poppler/Form.h | 2 +- + poppler/Form.cc | 11 ++--------- + poppler/Form.h | 2 +- qt4/src/poppler-form.cc | 3 +-- 3 files changed, 4 insertions(+), 12 deletions(-) commit 59fb0489bfabfd8acccafdcd0361ce005664962a Author: Carlos Garcia Campos -Date: Wed Mar 9 20:19:24 2011 +0100 +Date: Wed Mar 9 20:19:24 2011 +0100 annots: Check whether we need to create an appearance stream in AnnotWidget::draw() @@ -3250,7 +9507,7 @@ commit f3b00ef51ceef6d9b7a1aa7e0f19249abf8ca6f3 Author: Carlos Garcia Campos -Date: Wed Mar 9 18:19:12 2011 +0100 +Date: Wed Mar 9 18:19:12 2011 +0100 annots: Add Annot::setAppearanceState() and use it from FormWidget @@ -3265,7 +9522,7 @@ commit d59561212253302d4dcb23392bb8306b8e5c68d1 Author: Carlos Garcia Campos -Date: Wed Mar 9 17:35:28 2011 +0100 +Date: Wed Mar 9 17:35:28 2011 +0100 forms: Make FormWidget use a real widget annotation instead of duplicating code @@ -3275,17 +9532,17 @@ it instead of duplicating it. - poppler/Annot.cc | 42 +++++++++++++-------- - poppler/Annot.h | 2 +- - poppler/Catalog.cc | 2 +- + poppler/Annot.cc | 42 +++++++++++++-------- + poppler/Annot.h | 2 +- + poppler/Catalog.cc | 2 +- poppler/Form.cc | 107 - ++++++++++++++++++++++++--------------------------- - poppler/Form.h | 23 +++++------ + ++++++++++++++++++++++++---------------------------- + poppler/Form.h | 23 ++++++----- 5 files changed, 89 insertions(+), 87 deletions(-) commit 2dd7e1ba09d4501adf9d10ab4cb8ee003cace74a Author: Carlos Garcia Campos -Date: Wed Mar 9 10:25:00 2011 +0100 +Date: Wed Mar 9 10:25:00 2011 +0100 forms: Move modified flag from FormWidget to FormField @@ -3295,7 +9552,7 @@ commit b04f03be7e43e309af5f164ef71788e7b8915841 Author: Carlos Garcia Campos -Date: Wed Mar 9 10:17:57 2011 +0100 +Date: Wed Mar 9 10:17:57 2011 +0100 forms: Move field names handling from FormWidget to FormField @@ -3306,7 +9563,7 @@ commit abe1e0d5a37bcdb4376901306d3adccfb33ff3b4 Author: Carlos Garcia Campos -Date: Tue Mar 8 21:39:00 2011 +0100 +Date: Tue Mar 8 21:39:00 2011 +0100 annots: Make sure no border is drawn for invalid border arrays @@ -3318,7 +9575,7 @@ commit 14d145371e86ccb92f09b1ca750ced52171b2885 Author: Carlos Garcia Campos -Date: Tue Mar 8 20:14:57 2011 +0100 +Date: Tue Mar 8 20:14:57 2011 +0100 forms: Remove loadDefaults method @@ -3328,52 +9585,52 @@ poppler/Form.cc | 227 +++++++++++++++++++++---------------------------------- - poppler/Form.h | 21 +---- + poppler/Form.h | 21 ++--- 2 files changed, 91 insertions(+), 157 deletions(-) commit 0585d7820455c93fe5b732b7a9a20d423df47075 Author: Carlos Garcia Campos -Date: Tue Mar 8 15:36:45 2011 +0100 +Date: Tue Mar 8 15:36:45 2011 +0100 forms: Handle field values (V entry) by field objects Rather than AnnotWidget or FormWidget, and use the form field object from AnnotWidget to get the values. - poppler/Annot.cc | 52 ++++---- + poppler/Annot.cc | 52 ++++--- poppler/Form.cc | 400 ++++++++++++++++++++++++++---------------------------- - poppler/Form.h | 21 ++-- + poppler/Form.h | 21 +-- 3 files changed, 230 insertions(+), 243 deletions(-) commit dc100eb9080fb58164fc94c86bfb1728cecd21c3 Author: Carlos Garcia Campos -Date: Mon Mar 7 20:14:27 2011 +0100 +Date: Mon Mar 7 20:14:27 2011 +0100 annots: Use the field object to get MaxLen instead of parsing the field dict poppler/Annot.cc | 10 ++++------ - 1 files changed, 4 insertions(+), 6 deletions(-) + 1 file changed, 4 insertions(+), 6 deletions(-) commit 7149634f184dc3f07f2a70c296aac207ef24952c Author: Carlos Garcia Campos -Date: Mon Mar 7 19:55:45 2011 +0100 +Date: Mon Mar 7 19:55:45 2011 +0100 forms: Parse the default resources dictionary in Form And use it in AnnotWidget instead of parsing the dictionary again. poppler/Annot.cc | 65 - ++++++++++++++++++++--------------------------------- + +++++++++++++++++++++--------------------------------- poppler/Annot.h | 12 +++++----- - poppler/Form.cc | 16 +++++++++++++ - poppler/Form.h | 5 ++++ + poppler/Form.cc | 16 ++++++++++++++ + poppler/Form.h | 5 +++++ 4 files changed, 52 insertions(+), 46 deletions(-) commit 2e73f17975811177c0b3c16b8bd97c7eb912bc44 Author: Carlos Garcia Campos -Date: Mon Mar 7 18:41:48 2011 +0100 +Date: Mon Mar 7 18:41:48 2011 +0100 forms: Parse field variable text entries (DA, Q) in FormField() @@ -3387,7 +9644,7 @@ commit 8677a34911563a712b2dcf0b6e411cee0bad9c44 Author: Carlos Garcia Campos -Date: Mon Mar 7 18:24:07 2011 +0100 +Date: Mon Mar 7 18:24:07 2011 +0100 forms: Parse default variable text entries (DA, Q) on Form construction @@ -3397,23 +9654,23 @@ again. poppler/Annot.cc | 99 - +++++++++++++++++++++++++---------------------------- + ++++++++++++++++++++++++++---------------------------- poppler/Form.cc | 11 ++++++ - poppler/Form.h | 12 ++++++ + poppler/Form.h | 12 +++++++ 3 files changed, 70 insertions(+), 52 deletions(-) commit 41420bfd88685d9b1ac44dc7444ea3abee92097c Author: Carlos Garcia Campos -Date: Mon Mar 7 09:18:25 2011 +0100 +Date: Mon Mar 7 09:18:25 2011 +0100 annots: Only parse the dash array for dashed borders poppler/Annot.cc | 16 +++++++++------- - 1 files changed, 9 insertions(+), 7 deletions(-) + 1 file changed, 9 insertions(+), 7 deletions(-) commit c198a3f83d8508ddaf84564871d9202ffba8096c Author: Carlos Garcia Campos -Date: Sun Mar 6 17:52:01 2011 +0100 +Date: Sun Mar 6 17:52:01 2011 +0100 annots: Use the field object to get the top index of a form field choice @@ -3426,17 +9683,17 @@ commit 5cf803ec181dbf1112f67b4f4a9c77b88d102e3b Author: Carlos Garcia Campos -Date: Sun Mar 6 17:47:18 2011 +0100 +Date: Sun Mar 6 17:47:18 2011 +0100 forms: Add FormFieldChoice::getTopIndex() poppler/Form.cc | 5 +++++ poppler/Form.h | 5 ++++- - 2 files changed, 9 insertions(+), 1 deletions(-) + 2 files changed, 9 insertions(+), 1 deletion(-) commit 1248f59e2045749ece1f5a5e579b866b8330a752 Author: Carlos Garcia Campos -Date: Sun Mar 6 17:41:33 2011 +0100 +Date: Sun Mar 6 17:41:33 2011 +0100 annots: Draw widget background using the existing appearance characteristics @@ -3444,11 +9701,11 @@ Instead of parsing the appearance characteristics dictionary again poppler/Annot.cc | 23 +++++++---------------- - 1 files changed, 7 insertions(+), 16 deletions(-) + 1 file changed, 7 insertions(+), 16 deletions(-) commit dc249ad4529997001ae1f96dcfd7351766ca8e8d Author: Carlos Garcia Campos -Date: Sun Mar 6 17:34:33 2011 +0100 +Date: Sun Mar 6 17:34:33 2011 +0100 annots: Factor out generateFieldAppearance() @@ -3462,7 +9719,7 @@ commit f98b3540db731026e0febf1f010548f0f0ef9142 Author: Carlos Garcia Campos -Date: Sun Mar 6 15:57:22 2011 +0100 +Date: Sun Mar 6 15:57:22 2011 +0100 annots: Move code to draw the border of an AnnotWidget to a new method @@ -3476,83 +9733,83 @@ commit 9854f3173f994bbe3f57d33bd1d0e045833859c2 Author: Carlos Garcia Campos -Date: Sun Mar 6 15:56:06 2011 +0100 +Date: Sun Mar 6 15:56:06 2011 +0100 annots: Add AnnotColor::adjustColor() to be able to adjust an existing AnnotColor poppler/Annot.cc | 7 +++++++ poppler/Annot.h | 2 ++ - 2 files changed, 9 insertions(+), 0 deletions(-) + 2 files changed, 9 insertions(+) commit 2bf82f27bd9c8f97e5484ea97be661f65221163d Author: Carlos Garcia Campos -Date: Sat Mar 5 15:30:01 2011 +0100 +Date: Sat Mar 5 15:30:01 2011 +0100 annots: Remove unused class AnnotBorderStyle poppler/Annot.cc | 22 ---------------------- poppler/Annot.h | 36 ------------------------------------ - 2 files changed, 0 insertions(+), 58 deletions(-) + 2 files changed, 58 deletions(-) commit 128dcaf282f418d8c45cea4df6ad4d3167b3e39c Author: Carlos Garcia Campos -Date: Sat Mar 5 13:12:49 2011 +0100 +Date: Sat Mar 5 13:12:49 2011 +0100 annots: Add AnnotBorder::parseDashArray() to parse dash arrays The code was duplicated in AnnotBorderArray and AnnotBorderBS poppler/Annot.cc | 91 - ++++++++++++++++++----------------------------------- + +++++++++++++++++++----------------------------------- poppler/Annot.h | 4 ++- 2 files changed, 34 insertions(+), 61 deletions(-) commit ec2643d311e0ce55f0ff5309c0c420140d053a50 Author: Albert Astals Cid -Date: Tue Mar 1 19:50:55 2011 +0000 +Date: Tue Mar 1 19:50:55 2011 +0000 fix copyright years - poppler/Annot.cc | 2 +- - poppler/Annot.h | 2 +- - poppler/ArthurOutputDev.cc | 2 +- - poppler/ArthurOutputDev.h | 2 +- - poppler/FontInfo.cc | 1 + - poppler/Form.cc | 4 ++-- - poppler/Form.h | 3 ++- - poppler/GlobalParams.cc | 1 + - poppler/GlobalParams.h | 1 + - poppler/Link.cc | 2 +- - poppler/Link.h | 2 +- - poppler/OutputDev.h | 2 +- - poppler/PDFDoc.cc | 2 +- - poppler/Page.cc | 2 +- - poppler/Page.h | 2 +- - poppler/TextOutputDev.cc | 2 +- - poppler/TextOutputDev.h | 2 +- - qt4/src/poppler-form.cc | 2 +- + poppler/Annot.cc | 2 +- + poppler/Annot.h | 2 +- + poppler/ArthurOutputDev.cc | 2 +- + poppler/ArthurOutputDev.h | 2 +- + poppler/FontInfo.cc | 1 + + poppler/Form.cc | 4 ++-- + poppler/Form.h | 3 ++- + poppler/GlobalParams.cc | 1 + + poppler/GlobalParams.h | 1 + + poppler/Link.cc | 2 +- + poppler/Link.h | 2 +- + poppler/OutputDev.h | 2 +- + poppler/PDFDoc.cc | 2 +- + poppler/Page.cc | 2 +- + poppler/Page.h | 2 +- + poppler/TextOutputDev.cc | 2 +- + poppler/TextOutputDev.h | 2 +- + qt4/src/poppler-form.cc | 2 +- qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 2 +- - qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-private.h | 2 +- - utils/HtmlOutputDev.cc | 2 +- - utils/HtmlOutputDev.h | 4 ++-- + qt4/src/poppler-link-extractor.cc | 2 +- + qt4/src/poppler-page.cc | 2 +- + qt4/src/poppler-private.h | 2 +- + utils/HtmlOutputDev.cc | 2 +- + utils/HtmlOutputDev.h | 4 ++-- 24 files changed, 27 insertions(+), 23 deletions(-) commit 900974ebfbe6ab7ae21ed151ff79f9578d2bdae2 Author: Albert Astals Cid -Date: Tue Mar 1 19:42:22 2011 +0000 +Date: Tue Mar 1 19:42:22 2011 +0000 Fix years poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- + poppler/poppler-config.h.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c804db4d8261274b013f8c340abfc921c77bb3cf Author: Pino Toscano -Date: Tue Mar 1 19:22:31 2011 +0100 +Date: Tue Mar 1 19:22:31 2011 +0100 move the fontconfig.h inclusion from GlobalParams.h to GlobalParams.cc @@ -3565,7 +9822,7 @@ commit 2d77c7f9c41f1121354413bcdc3beded35a247f9 Author: Pino Toscano -Date: Tue Mar 1 16:51:04 2011 +0100 +Date: Tue Mar 1 16:51:04 2011 +0100 create the GooString on stack, not in heap @@ -3575,7 +9832,7 @@ commit 5dc2ef0e27ac48c81739cdfe8e8070ebbc410c87 Author: Pino Toscano -Date: Tue Mar 1 16:39:36 2011 +0100 +Date: Tue Mar 1 16:39:36 2011 +0100 annots: avoid temporary GooString's just for comparisons, just use strcmp @@ -3584,12 +9841,12 @@ faster than GooString::cmp poppler/Annot.cc | 128 - +++++++++++++++++++++++------------------------------ - 1 files changed, 56 insertions(+), 72 deletions(-) + ++++++++++++++++++++++++------------------------------ + 1 file changed, 56 insertions(+), 72 deletions(-) commit 535e48ab764ee4e377451ddd032044b51b842c4a Author: Pino Toscano -Date: Tue Mar 1 16:07:34 2011 +0100 +Date: Tue Mar 1 16:07:34 2011 +0100 [qt4] ignore "Widget" annotations @@ -3597,11 +9854,11 @@ not complain about them for now qt4/src/poppler-page.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit f0e5c36e7f1c5d0f0f51e3a6a6acd6c423f86df7 Author: Pino Toscano -Date: Tue Mar 1 16:02:54 2011 +0100 +Date: Tue Mar 1 16:02:54 2011 +0100 annots: avoid a temporary GooString just for comparisons, just use strcmp @@ -3611,11 +9868,11 @@ poppler/Annot.cc | 54 ++++++++++++++++++++++++++---------------------------- - 1 files changed, 26 insertions(+), 28 deletions(-) + 1 file changed, 26 insertions(+), 28 deletions(-) commit 58a3b83a8fbd8b13eb98c4f677f4ed19b6ae44cd Author: Pino Toscano -Date: Tue Mar 1 15:35:45 2011 +0100 +Date: Tue Mar 1 15:35:45 2011 +0100 fix appendAnnot() invocation on annotations reading @@ -3626,11 +9883,11 @@ (so valid annotation will have it at 1, while invalid will be deleted) poppler/Annot.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit 664865a2ddca9c20ac36a41aef52ebf12eab838d Author: Carlos Garcia Campos -Date: Tue Mar 1 10:56:40 2011 +0100 +Date: Tue Mar 1 10:56:40 2011 +0100 Merge Link and AnnotLink code @@ -3642,37 +9899,37 @@ Link and frontends APIs are not affected. Qt4 changes made by Pino Toscano. - glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 29 +++---- - glib/poppler-private.h | 1 - - poppler/Annot.cc | 79 +++++++++++++------ - poppler/Annot.h | 24 ++++-- - poppler/ArthurOutputDev.cc | 4 - - poppler/ArthurOutputDev.h | 3 - - poppler/CairoOutputDev.cc | 3 - - poppler/CairoOutputDev.h | 6 -- - poppler/FontInfo.cc | 4 +- - poppler/Form.cc | 36 +++------ - poppler/Form.h | 5 +- - poppler/Link.cc | 124 + glib/poppler-document.cc | 2 +- + glib/poppler-page.cc | 29 ++++--- + glib/poppler-private.h | 1 - + poppler/Annot.cc | 79 ++++++++++++------- + poppler/Annot.h | 24 ++++-- + poppler/ArthurOutputDev.cc | 4 - + poppler/ArthurOutputDev.h | 3 - + poppler/CairoOutputDev.cc | 3 - + poppler/CairoOutputDev.h | 6 -- + poppler/FontInfo.cc | 4 +- + poppler/Form.cc | 36 ++++----- + poppler/Form.h | 5 +- + poppler/Link.cc | 124 +++++------------------------- - poppler/Link.h | 43 +--------- - poppler/OutputDev.h | 4 +- - poppler/PDFDoc.cc | 4 +- - poppler/Page.cc | 63 ++++++++-------- - poppler/Page.h | 11 ++- - poppler/TextOutputDev.cc | 9 +- - poppler/TextOutputDev.h | 10 +- + poppler/Link.h | 43 ++--------- + poppler/OutputDev.h | 4 +- + poppler/PDFDoc.cc | 4 +- + poppler/Page.cc | 63 +++++++-------- + poppler/Page.h | 11 +-- + poppler/TextOutputDev.cc | 9 ++- + poppler/TextOutputDev.h | 10 +-- qt4/src/poppler-link-extractor-private.h | 2 +- - qt4/src/poppler-link-extractor.cc | 3 +- - qt4/src/poppler-page.cc | 12 +-- - utils/HtmlOutputDev.cc | 7 +- - utils/HtmlOutputDev.h | 4 +- + qt4/src/poppler-link-extractor.cc | 3 +- + qt4/src/poppler-page.cc | 12 ++- + utils/HtmlOutputDev.cc | 7 +- + utils/HtmlOutputDev.h | 4 +- 25 files changed, 188 insertions(+), 304 deletions(-) commit 1f6573e949aaba0eb0a4c2f9cd73d7ad45ba67be Author: Pino Toscano -Date: Sun Feb 27 21:53:32 2011 +0100 +Date: Sun Feb 27 21:53:32 2011 +0100 small fixes to the pdftohtml manpage @@ -3682,11 +9939,11 @@ - fix hypens used as minus utils/pdftohtml.1 | 18 +++++++++--------- - 1 files changed, 9 insertions(+), 9 deletions(-) + 1 file changed, 9 insertions(+), 9 deletions(-) commit e927384897595f1bda5f7e41b552602f9cc8ed95 Author: Pino Toscano -Date: Sun Feb 27 16:39:59 2011 +0100 +Date: Sun Feb 27 16:39:59 2011 +0100 [qt4] fix caption of push button fields @@ -3696,20 +9953,20 @@ and use the normal caption of that qt4/src/poppler-form.cc | 25 +++++++++++++++++++++++-- - 1 files changed, 23 insertions(+), 2 deletions(-) + 1 file changed, 23 insertions(+), 2 deletions(-) commit 5b24ee2c934feea1b7d46c8ec423d1c547258be2 Author: Pino Toscano -Date: Sun Feb 27 16:24:22 2011 +0100 +Date: Sun Feb 27 16:24:22 2011 +0100 annots: 'CA', 'RC' and 'AC' are strings, not names poppler/Annot.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 6 insertions(+), 6 deletions(-) commit e64f6cb23e9a564b3f80daea9abcfe8bb29189eb Author: Pino Toscano -Date: Sun Feb 27 15:22:32 2011 +0100 +Date: Sun Feb 27 15:22:32 2011 +0100 make getOnStr() return the GooString* instead of its char* @@ -3717,23 +9974,23 @@ this way it is easier to check for a numm onStr, without the risk of dereferencing a NULL pointer - poppler/Form.cc | 6 +++--- - poppler/Form.h | 2 +- + poppler/Form.cc | 6 +++--- + poppler/Form.h | 2 +- qt4/src/poppler-form.cc | 7 ++----- 3 files changed, 6 insertions(+), 9 deletions(-) commit f9c978fc2ab8a1f901f2136ae95deb9d41076155 Author: Pino Toscano -Date: Sun Feb 27 14:39:52 2011 +0100 +Date: Sun Feb 27 14:39:52 2011 +0100 [qt4] directly use the dict qt4/src/poppler-form.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 071966e48577c515b17a424baeae85ae4fc80a20 Author: Pino Toscano -Date: Sun Feb 27 14:21:11 2011 +0100 +Date: Sun Feb 27 14:21:11 2011 +0100 [qt4] move textAlignment() as a private function @@ -3743,48 +10000,48 @@ commit adc236771f11eeb4197064747836e8ed3fbfeba9 Author: Pino Toscano -Date: Sun Feb 27 14:13:50 2011 +0100 +Date: Sun Feb 27 14:13:50 2011 +0100 [qt4] use FormWidget::getAlternateUiName() ... instead of read the value on our own qt4/src/poppler-form.cc | 9 ++------- - 1 files changed, 2 insertions(+), 7 deletions(-) + 1 file changed, 2 insertions(+), 7 deletions(-) commit 9f111483cf6196dedf3cee380c3e5224776203ea Author: Pino Toscano -Date: Sun Feb 27 14:12:16 2011 +0100 +Date: Sun Feb 27 14:12:16 2011 +0100 forms: read the TU field as alternateUiName poppler/Form.cc | 8 ++++++++ poppler/Form.h | 2 ++ - 2 files changed, 10 insertions(+), 0 deletions(-) + 2 files changed, 10 insertions(+) commit cfaadaa9e4a857fcea3b5a2cadacd352de6c469d Author: Pino Toscano -Date: Sun Feb 27 14:07:35 2011 +0100 +Date: Sun Feb 27 14:07:35 2011 +0100 [qt4] use FormWidget::getPartialName() ... instead of read the value on our own qt4/src/poppler-form.cc | 9 ++------- - 1 files changed, 2 insertions(+), 7 deletions(-) + 1 file changed, 2 insertions(+), 7 deletions(-) commit 2478896a0c1f6e5842f3d8b172e4cc7e6bd58cd8 Author: Pino Toscano -Date: Sun Feb 27 13:24:09 2011 +0100 +Date: Sun Feb 27 13:24:09 2011 +0100 [qt4] use the new FormWidget::createActivationAction() qt4/src/poppler-form.cc | 13 +++---------- - 1 files changed, 3 insertions(+), 10 deletions(-) + 1 file changed, 3 insertions(+), 10 deletions(-) commit 1dcb683a5c2dd6a1de654e90a4394f65d63dc296 Author: Pino Toscano -Date: Sun Feb 27 13:22:48 2011 +0100 +Date: Sun Feb 27 13:22:48 2011 +0100 add FormWidget::createActivationAction() @@ -3792,174 +10049,174 @@ poppler/Form.cc | 12 ++++++++++++ poppler/Form.h | 3 +++ - 2 files changed, 15 insertions(+), 0 deletions(-) + 2 files changed, 15 insertions(+) commit bd4cc73e438a7d4d4a10c50c69e65b5bdc63ddf2 Author: Albert Astals Cid -Date: Sun Feb 27 11:04:45 2011 +0000 +Date: Sun Feb 27 11:04:45 2011 +0000 Some more missing copyrights - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - poppler/Gfx.cc | 2 +- - poppler/OutputDev.h | 2 +- - poppler/TextOutputDev.cc | 1 + + poppler/CairoOutputDev.cc | 2 +- + poppler/CairoOutputDev.h | 2 +- + poppler/Gfx.cc | 2 +- + poppler/OutputDev.h | 2 +- + poppler/TextOutputDev.cc | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) commit 6c2ed4781d8ecfffdf24e1459aafd554b3527686 Author: Albert Astals Cid -Date: Sun Feb 27 10:55:22 2011 +0000 +Date: Sun Feb 27 10:55:22 2011 +0000 Add 2011 years - poppler/Annot.cc | 2 +- - poppler/CairoFontEngine.cc | 2 +- + poppler/Annot.cc | 2 +- + poppler/CairoFontEngine.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit b297fb9de0779ac84d5b7ef68c792afefe598320 Author: William Bader -Date: Sun Feb 27 01:48:55 2011 +0000 +Date: Sun Feb 27 01:48:55 2011 +0000 access the pixels directly Faster, bug 34005 splash/Splash.cc | 21 +++++++++++---------- - 1 files changed, 11 insertions(+), 10 deletions(-) + 1 file changed, 11 insertions(+), 10 deletions(-) commit de77e26759f1c33698abe248ad29b75c329a043c Author: Albert Astals Cid -Date: Sun Feb 27 01:39:23 2011 +0000 +Date: Sun Feb 27 01:39:23 2011 +0000 Fix crash in some pdf Has to be 3 and not nComps since it's a output buffer, a the input one Bug 34357 - poppler/GfxState.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/GfxState.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f82a2e08cb2c930956c6b38030fa7b015a0de5a Author: Albert Astals Cid -Date: Sun Feb 27 01:38:33 2011 +0000 +Date: Sun Feb 27 01:38:33 2011 +0000 Implement GfxDeviceCMYKColorSpace::getRGBLine - poppler/GfxState.cc | 22 +++++++++++++++++++++- - poppler/GfxState.h | 12 +++++++++++- + poppler/GfxState.cc | 22 +++++++++++++++++++++- + poppler/GfxState.h | 12 +++++++++++- 2 files changed, 32 insertions(+), 2 deletions(-) commit 4980b99214281dcab8f82b5b618aadc24de371f4 Author: Carlos Garcia Campos -Date: Sat Feb 26 14:00:33 2011 +0100 +Date: Sat Feb 26 14:00:33 2011 +0100 annots: Don't assume y1 > y3 for quad points of a highlight annotation Fixes https://bugzilla.gnome.org/show_bug.cgi?id=643028 poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e6ae0f8609cd66e9e124af59adefdff9d610dcd4 Author: Carlos Garcia Campos -Date: Sat Feb 26 13:23:47 2011 +0100 +Date: Sat Feb 26 13:23:47 2011 +0100 cairo: Handle font type fontCIDType2OT when creating freetype font Fixes https://bugzilla.gnome.org/show_bug.cgi?id=643273 - poppler/CairoFontEngine.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/CairoFontEngine.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 22eb01d305ea2560d26417ca8df9c0465d4e9a82 Author: Carlos Garcia Campos -Date: Sat Feb 26 12:17:49 2011 +0100 +Date: Sat Feb 26 12:17:49 2011 +0100 cairo: Fix a crash when rendering a document with inline images poppler/CairoOutputDev.cc | 28 ++++++++++++++++------------ - poppler/CairoOutputDev.h | 2 +- + poppler/CairoOutputDev.h | 2 +- 2 files changed, 17 insertions(+), 13 deletions(-) commit a6599dd1fda37186b876b5b2de80be1731dd5946 Author: Carlos Garcia Campos -Date: Sat Feb 26 11:59:03 2011 +0100 +Date: Sat Feb 26 11:59:03 2011 +0100 glib: Add some more introspection annotations - glib/poppler-attachment.cc | 2 +- - glib/poppler-document.cc | 4 ++-- - glib/poppler-media.cc | 2 +- - glib/poppler-page.cc | 6 +++--- + glib/poppler-attachment.cc | 2 +- + glib/poppler-document.cc | 4 ++-- + glib/poppler-media.cc | 2 +- + glib/poppler-page.cc | 6 +++--- 4 files changed, 7 insertions(+), 7 deletions(-) commit 89c66f236c85ac5a53ae12b01cdebc30e27b78d3 Author: Peter Ward -Date: Sat Feb 26 11:39:58 2011 +0100 +Date: Sat Feb 26 11:39:58 2011 +0100 glib: Add missing "out" annotation to poppler_page_get_size() glib/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a68199b342eb3f33733f7d7446ede8f94130fba Author: Carlos Garcia Campos -Date: Sat Feb 26 11:09:27 2011 +0100 +Date: Sat Feb 26 11:09:27 2011 +0100 cairo: Check if cairo version is == 1.11.2 to use mesh gradients api Cairo API has changed in 1.11.3. - poppler/CairoOutputDev.cc | 4 ++-- - poppler/CairoOutputDev.h | 4 ++-- + poppler/CairoOutputDev.cc | 4 ++-- + poppler/CairoOutputDev.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 97e7ab1a4eea2160f3f0847d10f6c16f2d66ef11 Author: Albert Astals Cid -Date: Fri Feb 25 20:33:39 2011 +0000 +Date: Fri Feb 25 20:33:39 2011 +0000 Do not ask freetype for a font of size 0x0 Fixes rendering bug at 34602 splash/SplashFTFont.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 3590a2d38082fc705040cdb31bf0b22ff12dd3e4 Author: Adrian Johnson -Date: Thu Feb 24 18:47:35 2011 +0000 +Date: Thu Feb 24 18:47:35 2011 +0000 Fix rendering of some substituted fonts More info in bug 34522 - poppler/GfxFont.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + poppler/GfxFont.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) commit 384753f1f9f780687bdead99a6548ef8598b898a Author: Albert Astals Cid -Date: Mon Feb 21 19:19:48 2011 +0000 +Date: Mon Feb 21 19:19:48 2011 +0000 Use gfree since we allocate with gmalloc Bug 34512 goo/GooString.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit d775420c3c6cb5a29ff74712d3fc210fcb4b4627 Author: Albert Astals Cid -Date: Sat Feb 19 11:19:57 2011 +0000 +Date: Sat Feb 19 11:19:57 2011 +0000 Do not delete textOut twice when using -bbox - utils/pdftotext.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + utils/pdftotext.cc | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) commit e1a56d73b066e7152ccf6ccf36206def7956cb00 Author: Albert Astals Cid -Date: Wed Feb 16 00:06:45 2011 +0000 +Date: Wed Feb 16 00:06:45 2011 +0000 Lots of rendering improvements by Thomas and Andrea @@ -3978,134 +10235,134 @@ Followup Bug 32349 & Poppler: More shading fun ;-) thread for more info - poppler/Function.cc | 122 +-------- - poppler/Function.h | 3 +- - poppler/GfxState.cc | 638 - ++++++++++++++++++++++++++++++++++++++----- - poppler/GfxState.h | 90 +++++-- - poppler/SplashOutputDev.cc | 253 +++++++++++++++-- - poppler/SplashOutputDev.h | 67 ++++- - splash/Splash.cc | 126 +++++++--- - splash/SplashPattern.h | 7 +- - 8 files changed, 1008 insertions(+), 298 deletions(-) + poppler/Function.cc | 122 +-------- + poppler/Function.h | 3 +- + poppler/GfxState.cc | 634 + +++++++++++++++++++++++++++++++++++++++----- + poppler/GfxState.h | 90 +++++-- + poppler/SplashOutputDev.cc | 253 +++++++++++++++--- + poppler/SplashOutputDev.h | 67 ++++- + splash/Splash.cc | 126 ++++++--- + splash/SplashPattern.h | 7 +- + 8 files changed, 1006 insertions(+), 296 deletions(-) commit 675b3505f963a0110dac7f865654232cbb865ef5 Author: Carlos Garcia Campos -Date: Sun Feb 13 16:21:52 2011 +0100 +Date: Sun Feb 13 16:21:52 2011 +0100 tests: Merge splash and cairo tests into a single gtk-test tool With a command line option to use cairo or splash backends. - test/CMakeLists.txt | 20 +-- - test/Makefile.am | 29 ++--- - test/gtk-cairo-test.cc | 190 ---------------------- + test/CMakeLists.txt | 20 +-- + test/Makefile.am | 29 ++-- + test/gtk-cairo-test.cc | 190 ----------------------- test/gtk-splash-test.cc | 311 ------------------------------------- - test/gtk-test.cc | 397 + test/gtk-test.cc | 397 +++++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 412 insertions(+), 535 deletions(-) commit 728c022cdc1ea12aa54077d44276f9d7714930d4 Author: Pino Toscano -Date: Sun Feb 13 13:25:51 2011 +0100 +Date: Sun Feb 13 13:25:51 2011 +0100 remove more references to the qt3 frontend followup of d82f98a274bfa008c218e265a080c4af7ce95131 - Makefile.am | 3 --- - 1 files changed, 0 insertions(+), 3 deletions(-) + Makefile.am | 3 --- + 1 file changed, 3 deletions(-) commit 15e5b3f16015361754fdc14da4a0dde5af887568 Author: Pino Toscano -Date: Sun Feb 13 13:23:06 2011 +0100 +Date: Sun Feb 13 13:23:06 2011 +0100 remove more GDK-related stuff followup of 149b7fec472beda9d1538e0f26607c9498d504c2 - Makefile.am | 1 - - cmake/modules/FindGDK.cmake | 22 ---------------------- - config.h.cmake | 3 --- - glib/reference/Makefile.am | 1 - - glib/reference/poppler-sections.txt | 1 - - 5 files changed, 0 insertions(+), 28 deletions(-) + Makefile.am | 1 - + cmake/modules/FindGDK.cmake | 22 ---------------------- + config.h.cmake | 3 --- + glib/reference/Makefile.am | 1 - + glib/reference/poppler-sections.txt | 1 - + 5 files changed, 28 deletions(-) commit 50aa15a0bd7100fc9b9243de1d6e6f4b59df1488 Author: Pino Toscano -Date: Sun Feb 13 13:07:19 2011 +0100 +Date: Sun Feb 13 13:07:19 2011 +0100 remove GDK API here too followup of 149b7fec472beda9d1538e0f26607c9498d504c2 glib/poppler-features.h.cmake | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit f410cd11268254b9d0422201c9860d775f73fdd8 Author: Carlos Garcia Campos -Date: Sun Feb 13 12:55:37 2011 +0100 +Date: Sun Feb 13 12:55:37 2011 +0100 gtk-splash-test: Don't use GDK deprecated API test/gtk-splash-test.cc | 28 +++++++++++++++------------- - 1 files changed, 15 insertions(+), 13 deletions(-) + 1 file changed, 15 insertions(+), 13 deletions(-) commit a0568e449061d6b6af5485e340cd6f9d3e54ef7c Author: Carlos Garcia Campos -Date: Sun Feb 13 12:27:22 2011 +0100 +Date: Sun Feb 13 12:27:22 2011 +0100 glib: remove gdk referenes from pkg-config files poppler-glib-uninstalled.pc.in | 2 +- - poppler-glib.pc.cmake | 2 +- - poppler-glib.pc.in | 2 +- + poppler-glib.pc.cmake | 2 +- + poppler-glib.pc.in | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) commit 149b7fec472beda9d1538e0f26607c9498d504c2 Author: Carlos Garcia Campos -Date: Sun Feb 13 11:51:57 2011 +0100 +Date: Sun Feb 13 11:51:57 2011 +0100 glib: Remove deprecated GDK API It removes the GDK dependency so that poppler-glib now only depends on glib and cairo. - CMakeLists.txt | 9 -- - configure.ac | 44 +------ - glib/CMakeLists.txt | 14 +-- - glib/Makefile.am | 8 +- - glib/poppler-features.h.in | 6 - - glib/poppler-page.cc | 296 + CMakeLists.txt | 9 -- + configure.ac | 44 +------ + glib/CMakeLists.txt | 14 +-- + glib/Makefile.am | 8 +- + glib/poppler-features.h.in | 6 - + glib/poppler-page.cc | 296 -------------------------------------------- - glib/poppler-page.h | 34 ----- + glib/poppler-page.h | 34 ----- 7 files changed, 4 insertions(+), 407 deletions(-) commit a5482d64472a81206dd8d0c5bb80007f6d5bb893 Author: Carlos Garcia Campos -Date: Sun Feb 13 11:40:23 2011 +0100 +Date: Sun Feb 13 11:40:23 2011 +0100 glib: Remove test-poppler-glib, poppler-glib-demo does the same and more - glib/CMakeLists.txt | 8 - - glib/Makefile.am | 14 - + glib/CMakeLists.txt | 8 - + glib/Makefile.am | 14 - glib/test-poppler-glib.cc | 657 --------------------------------------------- - 3 files changed, 0 insertions(+), 679 deletions(-) + 3 files changed, 679 deletions(-) commit cab0cf028a192772dcb5c3f4aefa0a421e73e9e7 Author: Albert Astals Cid -Date: Fri Feb 11 19:42:34 2011 +0000 +Date: Fri Feb 11 19:42:34 2011 +0000 Do not infinite loop in some broken files poppler/JBIG2Stream.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 1125cc8ccf386d8e0a0679aa73614bc2cb8037b0 Author: William Bader -Date: Tue Feb 8 20:27:16 2011 +0000 +Date: Tue Feb 8 20:27:16 2011 +0000 Allow setting the rasterization resolution @@ -4114,43 +10371,43 @@ poppler/GlobalParams.cc | 15 +++++++++++++++ poppler/GlobalParams.h | 3 +++ poppler/PSOutputDev.cc | 7 ++++++- - utils/pdftops.1 | 6 ++++++ - utils/pdftops.cc | 6 ++++++ - 5 files changed, 36 insertions(+), 1 deletions(-) + utils/pdftops.1 | 6 ++++++ + utils/pdftops.cc | 6 ++++++ + 5 files changed, 36 insertions(+), 1 deletion(-) commit 96e169b0eca31891f3cd564365d4a2a5c6e2a2c0 Author: Albert Astals Cid -Date: Tue Feb 8 19:58:31 2011 +0000 +Date: Tue Feb 8 19:58:31 2011 +0000 Make really sure the uMap static pointer is valid It might happen you are extremely unlucky and get the same globalParams after a new delete/creation - qt4/src/poppler-private.cc | 51 - +++++++++++++++++++++++++++++++++++++------ - qt4/src/poppler-private.h | 34 ++-------------------------- + qt4/src/poppler-private.cc | 51 + ++++++++++++++++++++++++++++++++++++++------ + qt4/src/poppler-private.h | 34 +++-------------------------- 2 files changed, 47 insertions(+), 38 deletions(-) commit c3470145f95791167c19a438934a923eab8a93cf Author: William Bader -Date: Tue Feb 8 19:54:48 2011 +0000 +Date: Tue Feb 8 19:54:48 2011 +0000 Add PS level1 non standard binary output option More info at bug 34003 - poppler/GlobalParams.cc | 18 ++++- + poppler/GlobalParams.cc | 18 +++- poppler/GlobalParams.h | 5 +- poppler/PSOutputDev.cc | 227 - +++++++++++++++++++++++++++++++++------------- - utils/pdftops.1 | 7 ++ - utils/pdftops.cc | 8 ++- + ++++++++++++++++++++++++++++++++++------------- + utils/pdftops.1 | 7 ++ + utils/pdftops.cc | 8 +- 5 files changed, 198 insertions(+), 67 deletions(-) commit 37077aa475d2dee81f87daa05297b201eeb99c87 Author: Albert Astals Cid -Date: Mon Feb 7 19:48:28 2011 +0000 +Date: Mon Feb 7 19:48:28 2011 +0000 Make sure tx is inside the bitmap @@ -4158,12 +10415,12 @@ depending on the resolution you render it - poppler/SplashOutputDev.cc | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) + poppler/SplashOutputDev.cc | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) commit 5aa854f70c8f563efe56dafa8bd6b3cdd5c95451 Author: Carlos Garcia Campos -Date: Sun Feb 6 13:24:35 2011 +0100 +Date: Sun Feb 6 13:24:35 2011 +0100 cairo: Use the new cairo unique id to set the surface id when printing @@ -4173,25 +10430,25 @@ printing. poppler/CairoOutputDev.cc | 18 ++++++++++++++++-- - poppler/CairoOutputDev.h | 2 +- + poppler/CairoOutputDev.h | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) commit fe7b8aa4fc78aacf3226d019db74146ceaebd63c Author: Albert Astals Cid -Date: Wed Feb 2 22:35:40 2011 +0000 +Date: Wed Feb 2 22:35:40 2011 +0000 Workaround bug when converting pdf to ps with level1 See bug 31926 for more info - poppler/PSOutputDev.cc | 2 +- - poppler/PreScanOutputDev.cc | 7 +++++++ - poppler/PreScanOutputDev.h | 7 +++++++ - 3 files changed, 15 insertions(+), 1 deletions(-) + poppler/PSOutputDev.cc | 2 +- + poppler/PreScanOutputDev.cc | 7 +++++++ + poppler/PreScanOutputDev.h | 7 +++++++ + 3 files changed, 15 insertions(+), 1 deletion(-) commit 5984ad081cd609f3146e0da5e22097ef073eb519 Author: William Bader -Date: Sun Jan 30 17:02:02 2011 +0000 +Date: Sun Jan 30 17:02:02 2011 +0000 Increase precision @@ -4199,11 +10456,11 @@ poppler/PSOutputDev.cc | 200 ++++++++++++++++++++++++------------------------ - 1 files changed, 100 insertions(+), 100 deletions(-) + 1 file changed, 100 insertions(+), 100 deletions(-) commit c60d5afbeb986c1b335357202c5f551a3c146a76 Author: Jim Meyering -Date: Mon Jan 24 15:51:20 2011 +0100 +Date: Mon Jan 24 15:51:20 2011 +0100 demo: don't use an uninitialized local variable @@ -4211,11 +10468,11 @@ poppler_page_get_text returned NULL, we'd use "n_recs" uninitialized. glib/demo/text.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit a3bdc56e2f086444419eddfcda5d2010a9a6b5c0 Author: Carlos Garcia Campos -Date: Sat Jan 29 11:23:33 2011 +0100 +Date: Sat Jan 29 11:23:33 2011 +0100 glib-demo: Add a tooltip with current selected character in text demo @@ -4225,35 +10482,35 @@ glib/demo/text.c | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 60 insertions(+), 0 deletions(-) + 1 file changed, 60 insertions(+) commit bf2d86c8db430595fb3c55edd3f6c8d289bdaeb5 Author: Albert Astals Cid -Date: Fri Jan 28 20:34:08 2011 +0000 +Date: Fri Jan 28 20:34:08 2011 +0000 Make sure uMap is still valid before using it Fixes KDE bug 264667 - qt4/src/poppler-private.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + qt4/src/poppler-private.cc | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) commit e6fb20d7b3bf8ea8aedc1bcd910e035059835b5f Author: Axel Strübing -Date: Fri Jan 28 19:20:15 2011 +0000 +Date: Fri Jan 28 19:20:15 2011 +0000 Extract text of a pdf correctly See "[poppler] text extraction does not work" in the mailing list for more info - poppler/GfxFont.cc | 14 +++++++++++++- - poppler/GfxFont.h | 2 ++ - 2 files changed, 15 insertions(+), 1 deletions(-) + poppler/GfxFont.cc | 14 +++++++++++++- + poppler/GfxFont.h | 2 ++ + 2 files changed, 15 insertions(+), 1 deletion(-) commit 4829d36a3b005585db8c8115f7ee81a4e2384780 Author: Simon Kellner -Date: Wed Jan 26 22:59:49 2011 +0000 +Date: Wed Jan 26 22:59:49 2011 +0000 fix labelToIndex on multiple prefixes @@ -4264,11 +10521,11 @@ match the given prefix. poppler/PageLabelInfo.cc | 7 +++---- - 1 files changed, 3 insertions(+), 4 deletions(-) + 1 file changed, 3 insertions(+), 4 deletions(-) commit e57c75fbd95ef8399b0785500f6893465bc808c3 Author: Adrian Johnson -Date: Mon Jan 24 19:48:09 2011 +1030 +Date: Mon Jan 24 19:48:09 2011 +1030 cairo: Implement Type 4,5,6,7 shadings using cairo mesh gradients @@ -4277,31 +10534,31 @@ poppler/CairoOutputDev.cc | 139 +++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoOutputDev.h | 12 ++++ - poppler/Gfx.cc | 10 +++- - poppler/OutputDev.h | 2 + + poppler/Gfx.cc | 10 +++- + poppler/OutputDev.h | 2 + 4 files changed, 161 insertions(+), 2 deletions(-) commit 5081356fcc69012e9df95dbf1e3c36e7c1e751c4 Author: Albert Astals Cid -Date: Tue Jan 25 20:26:25 2011 +0000 +Date: Tue Jan 25 20:26:25 2011 +0000 Fix leak in SplashOutputDev::axialShadedFill - poppler/SplashOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + poppler/SplashOutputDev.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) commit 19dc283c3af597deab297341a37495c06988948b Author: Thomas Klausner -Date: Mon Jan 24 19:05:08 2011 +0000 +Date: Mon Jan 24 19:05:08 2011 +0000 Include zlib header since we use things defined there goo/PNGWriter.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 5056e33e01ce0f7db1a5401b7b38d30e84eedf69 Author: Sam Liao -Date: Mon Jan 17 13:07:22 2011 +0800 +Date: Mon Jan 17 13:07:22 2011 +0800 Poppler: Fix line selection, dont check y for Line selection @@ -4313,21 +10570,21 @@ also displayed when line is selected. poppler/TextOutputDev.cc | 16 ++++++++-------- - 1 files changed, 8 insertions(+), 8 deletions(-) + 1 file changed, 8 insertions(+), 8 deletions(-) commit 88812e716c1a0c87a504118d47eb4cc6f52962fa Author: Andreas Hartmetz -Date: Fri Jan 21 23:33:47 2011 +0000 +Date: Fri Jan 21 23:33:47 2011 +0000 Add Hinting API to ArthurOutputDev - poppler/ArthurOutputDev.cc | 11 +++++++++-- - poppler/ArthurOutputDev.h | 15 ++++++++++++++- + poppler/ArthurOutputDev.cc | 11 +++++++++-- + poppler/ArthurOutputDev.h | 15 ++++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) commit dc5ec4668bdfe3b6ba41f0a2e551bbc07f8839ba Author: Andreas Hartmetz -Date: Fri Jan 21 23:32:50 2011 +0000 +Date: Fri Jan 21 23:32:50 2011 +0000 support slight hinting in Splash backend @@ -4335,9 +10592,9 @@ poppler/SplashOutputDev.cc | 6 +++++- poppler/SplashOutputDev.h | 4 +++- qt4/src/poppler-private.h | 3 ++- - qt4/src/poppler-qt4.h | 4 +++- + qt4/src/poppler-qt4.h | 4 +++- splash/SplashFTFont.cc | 27 ++++++++++++++++++--------- - splash/SplashFTFont.h | 2 ++ + splash/SplashFTFont.h | 2 ++ splash/SplashFTFontEngine.cc | 10 +++++++--- splash/SplashFTFontEngine.h | 6 ++++-- splash/SplashFontEngine.cc | 4 +++- @@ -4346,7 +10603,7 @@ commit 0c5b1bef9f3f98001cee20061b1eaf20b965c5a9 Author: William Bader -Date: Fri Jan 21 19:01:45 2011 +0000 +Date: Fri Jan 21 19:01:45 2011 +0000 Fix rendering for some pdf with -level1sep @@ -4354,35 +10611,35 @@ poppler/PSOutputDev.cc | 207 +++++++++++++++++++++++++++++++++++++----------- - poppler/PSOutputDev.h | 13 ++- + poppler/PSOutputDev.h | 13 ++- 2 files changed, 170 insertions(+), 50 deletions(-) commit 6cb8965fb8bce6da2a4460e86f592c1ea3a84a5c Author: Albert Astals Cid -Date: Fri Jan 21 18:43:21 2011 +0000 +Date: Fri Jan 21 18:43:21 2011 +0000 fix (C) years - poppler/CairoOutputDev.cc | 2 +- - poppler/CairoOutputDev.h | 2 +- - qt4/src/poppler-private.cc | 2 +- - qt4/tests/check_strings.cpp | 2 +- + poppler/CairoOutputDev.cc | 2 +- + poppler/CairoOutputDev.h | 2 +- + qt4/src/poppler-private.cc | 2 +- + qt4/tests/check_strings.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 24f9c8924b2135da616386d0fa691fe790b4e7a4 Author: Albert Astals Cid -Date: Fri Jan 21 08:43:34 2011 +0000 +Date: Fri Jan 21 08:43:34 2011 +0000 Access the correct variable Fixes asert on bug 33063 poppler/Annot.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 07a8808c22445c421f3064da7e5227dcbf40358b Author: Pino Toscano -Date: Mon Jan 17 21:34:23 2011 +0100 +Date: Mon Jan 17 21:34:23 2011 +0100 fix unicodeToQString() to correctly decode the Unicode sequence @@ -4392,92 +10649,92 @@ Add a couple of testcases for it. - qt4/src/poppler-private.cc | 30 ++++++++++++++++++++++++------ - qt4/tests/check_strings.cpp | 21 +++++++++++++++++++++ + qt4/src/poppler-private.cc | 30 ++++++++++++++++++++++++------ + qt4/tests/check_strings.cpp | 21 +++++++++++++++++++++ 2 files changed, 45 insertions(+), 6 deletions(-) commit ed367c08d788c88c49de770019bf826cfebb3e2c Author: Albert Astals Cid -Date: Sun Jan 16 17:25:02 2011 +0000 +Date: Sun Jan 16 17:25:02 2011 +0000 Don't need this either configure.ac | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 76ab657dc81ed0af7d9f2efaca2e68d570063001 Author: Albert Astals Cid -Date: Sun Jan 16 17:22:56 2011 +0000 +Date: Sun Jan 16 17:22:56 2011 +0000 And this is the last bit of qt3 cleaning? configure.ac | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 9a02856c2762e65b8f03e443e728e05e5a86f65b Author: Albert Astals Cid -Date: Sun Jan 16 17:21:00 2011 +0000 +Date: Sun Jan 16 17:21:00 2011 +0000 Another qt3 unused file m4/qt.m4 | 16 ---------------- - 1 files changed, 0 insertions(+), 16 deletions(-) + 1 file changed, 16 deletions(-) commit 26da7a52d31eb677ab6399de2c07140aa272b35e Author: Albert Astals Cid -Date: Sun Jan 16 17:17:59 2011 +0000 +Date: Sun Jan 16 17:17:59 2011 +0000 Yet more qt3 cleaning configure.ac | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + 1 file changed, 2 deletions(-) commit 8dc9c693abb0033247a338d0f7d1f3f7a57c1a55 Author: Albert Astals Cid -Date: Sun Jan 16 17:14:34 2011 +0000 +Date: Sun Jan 16 17:14:34 2011 +0000 Some more qt3 thigs i forgot to kill - CMakeLists.txt | 5 - - Makefile.am | 1 - - cmake/modules/FindQt3.cmake | 319 + CMakeLists.txt | 5 - + Makefile.am | 1 - + cmake/modules/FindQt3.cmake | 319 ------------------------------------------- - 3 files changed, 0 insertions(+), 325 deletions(-) + 3 files changed, 325 deletions(-) commit d82f98a274bfa008c218e265a080c4af7ce95131 Author: Albert Astals Cid -Date: Sun Jan 16 17:13:06 2011 +0000 +Date: Sun Jan 16 17:13:06 2011 +0000 Kill qt3 frontend - CMakeLists.txt | 5 - - Makefile.am | 5 - - configure.ac | 18 -- - poppler-qt-uninstalled.pc.in | 7 - - poppler-qt.pc.cmake | 13 -- - poppler-qt.pc.in | 13 -- - qt/.gitignore | 7 - - qt/CMakeLists.txt | 34 ---- - qt/Makefile.am | 48 ----- - qt/poppler-document.cc | 344 + CMakeLists.txt | 5 - + Makefile.am | 5 - + configure.ac | 18 -- + poppler-qt-uninstalled.pc.in | 7 - + poppler-qt.pc.cmake | 13 -- + poppler-qt.pc.in | 13 -- + qt/.gitignore | 7 - + qt/CMakeLists.txt | 34 ---- + qt/Makefile.am | 48 ----- + qt/poppler-document.cc | 344 -------------------------------- - qt/poppler-fontinfo.cc | 83 -------- - qt/poppler-link-qt3.h | 188 ------------------ - qt/poppler-link.cc | 267 ------------------------- + qt/poppler-fontinfo.cc | 83 -------- + qt/poppler-link-qt3.h | 188 ------------------ + qt/poppler-link.cc | 267 ------------------------- qt/poppler-page-transition-private.h | 28 --- - qt/poppler-page-transition.cc | 95 --------- - qt/poppler-page-transition.h | 146 -------------- - qt/poppler-page.cc | 357 + qt/poppler-page-transition.cc | 95 --------- + qt/poppler-page-transition.h | 146 -------------- + qt/poppler-page.cc | 357 ---------------------------------- - qt/poppler-private.cc | 147 -------------- - qt/poppler-private.h | 102 ---------- - qt/poppler-qt.h | 311 ----------------------------- - qt/test-poppler-qt.cpp | 122 ------------ - 21 files changed, 0 insertions(+), 2340 deletions(-) + qt/poppler-private.cc | 147 -------------- + qt/poppler-private.h | 102 ---------- + qt/poppler-qt.h | 311 ----------------------------- + qt/test-poppler-qt.cpp | 122 ------------ + 21 files changed, 2340 deletions(-) commit 301352e5585d4ab6e7b609b4ab79b4d8b8656092 Author: Daiki Ueno -Date: Sun Jan 9 18:48:50 2011 +0000 +Date: Sun Jan 9 18:48:50 2011 +0000 Do not crash in case jpeg_create_decompress fails @@ -4489,45 +10746,45 @@ commit 17baf0498485720b4ea5952bb46287f533139d0a Author: Albert Astals Cid -Date: Sat Jan 8 13:03:31 2011 +0000 +Date: Sat Jan 8 13:03:31 2011 +0000 Remove declaration of function without implementation poppler/XRef.h | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit a9e280508f5d669c8b6e1a6bb888b9369d868ab3 Author: Carlos Garcia Campos -Date: Sat Jan 8 10:39:41 2011 +0100 +Date: Sat Jan 8 10:39:41 2011 +0100 glib: Fix memory leak when calling poppler_page_get_text_layout() for pages with no text glib/poppler-page.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 5d62d18941810ef7d668eafa8b001085133fb169 Author: Carlos Garcia Campos -Date: Sat Jan 8 10:33:32 2011 +0100 +Date: Sat Jan 8 10:33:32 2011 +0100 glib: Use NULL instead of FALSE in g_return_val_if_fail() for functions returning a pointer glib/poppler-page.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 6 insertions(+), 6 deletions(-) commit 1324ae13f1fc2fa28951c2c7f7d63d4756537229 Author: Pino Toscano -Date: Thu Jan 6 01:15:30 2011 +0100 +Date: Thu Jan 6 01:15:30 2011 +0100 [cpp/apidox] advertize the 'pnm' image format cpp/poppler-image.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b192363960c26111167b1b08db9910e5f39dcf8b Author: Pino Toscano -Date: Thu Jan 6 01:09:09 2011 +0100 +Date: Thu Jan 6 01:09:09 2011 +0100 [cpp] Add PNM (PBM/PGM/PPM) exporting to 'image'. @@ -4541,12 +10798,12 @@ cpp/PNMWriter.cc | 119 +++++++++++++++++++++++++++++++++++++++++++++++++ cpp/PNMWriter.h | 43 ++++++++++++++++++ - cpp/poppler-image.cpp | 22 +++++++++- - 5 files changed, 186 insertions(+), 1 deletions(-) + cpp/poppler-image.cpp | 22 ++++++++- + 5 files changed, 186 insertions(+), 1 deletion(-) commit bebc530cbde7898759e1bd3629d2836ce0fb1d08 Author: Adrian Johnson -Date: Fri Dec 31 12:11:40 2010 +1030 +Date: Fri Dec 31 12:11:40 2010 +1030 cairo: Don't set JPX mime data if the stream specifies a colorspace @@ -4556,205 +10813,205 @@ https://bugs.freedesktop.org/show_bug.cgi?id=32746 poppler/CairoOutputDev.cc | 46 - ++++++++++++++++++++++++++++++-------------- - poppler/CairoOutputDev.h | 1 + + ++++++++++++++++++++++++++++++--------------- + poppler/CairoOutputDev.h | 1 + 2 files changed, 32 insertions(+), 15 deletions(-) commit 1399b9ab14b19f25583c75af2b36f63a6a01129a Author: Pino Toscano -Date: Wed Dec 29 15:56:45 2010 +0100 +Date: Wed Dec 29 15:56:45 2010 +0100 [cpp] add TIFF output to 'image' cpp/poppler-image.cpp | 12 ++++++++++++ - 1 files changed, 12 insertions(+), 0 deletions(-) + 1 file changed, 12 insertions(+) commit 1c7937dbc3c577ffc12cacc8de33d320e2f30ce9 Author: William Bader -Date: Wed Dec 29 14:47:06 2010 +0000 +Date: Wed Dec 29 14:47:06 2010 +0000 Make pdftoppm be able of writing tif files BUG 32027 - CMakeLists.txt | 15 ++++ - config.h.cmake | 3 + - configure.ac | 32 ++++++++ - goo/Makefile.am | 2 + - goo/TiffWriter.cc | 202 + CMakeLists.txt | 15 ++++ + config.h.cmake | 3 + + configure.ac | 32 ++++++++ + goo/Makefile.am | 2 + + goo/TiffWriter.cc | 202 ++++++++++++++++++++++++++++++++++++++++++++++++ - goo/TiffWriter.h | 53 +++++++++++++ - poppler/Makefile.am | 11 +++ + goo/TiffWriter.h | 53 +++++++++++++ + poppler/Makefile.am | 11 +++ splash/SplashBitmap.cc | 18 ++++- - splash/SplashBitmap.h | 5 +- - splash/SplashTypes.h | 4 +- - utils/pdftoppm.1 | 6 ++ - utils/pdftoppm.cc | 14 +++- + splash/SplashBitmap.h | 5 +- + splash/SplashTypes.h | 4 +- + utils/pdftoppm.1 | 6 ++ + utils/pdftoppm.cc | 14 +++- 12 files changed, 358 insertions(+), 7 deletions(-) commit bae91ecb638fcfee001e5c9a86a754610da796e4 Author: William Bader -Date: Tue Dec 28 11:53:54 2010 +0000 +Date: Tue Dec 28 11:53:54 2010 +0000 Add -singlefile option to pdftoppm Bug 32025 - utils/pdftoppm.1 | 3 +++ + utils/pdftoppm.1 | 3 +++ utils/pdftoppm.cc | 26 +++++++++++++++++++++++--- 2 files changed, 26 insertions(+), 3 deletions(-) commit ff58ee66c27da09a370a3000ab55eb1a24921852 Author: Albert Astals Cid -Date: Mon Dec 27 20:07:21 2010 +0000 +Date: Mon Dec 27 20:07:21 2010 +0000 bump soname just in case the getPage change is not BC - qt/CMakeLists.txt | 2 +- - qt/Makefile.am | 2 +- + qt/CMakeLists.txt | 2 +- + qt/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 453df02e195a96d0210f297c21c8ffba646659da Author: Albert Astals Cid -Date: Mon Dec 27 19:51:13 2010 +0000 +Date: Mon Dec 27 19:51:13 2010 +0000 Make distcheck work glib/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 6a34cec72c1a1b6576858a7836aae4a902fb5ed7 Author: Albert Astals Cid -Date: Mon Dec 27 19:29:52 2010 +0000 +Date: Mon Dec 27 19:29:52 2010 +0000 increase core soname - CMakeLists.txt | 2 +- - poppler/Makefile.am | 2 +- + CMakeLists.txt | 2 +- + poppler/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 8c11e9d68dceb609d04b3b383d22c307b5981d86 Author: Albert Astals Cid -Date: Mon Dec 27 19:23:29 2010 +0000 +Date: Mon Dec 27 19:23:29 2010 +0000 0.16.0 project version increase CMakeLists.txt | 4 ++-- - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- + configure.ac | 4 ++-- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) commit 8c1fd83c6061279af00c1172fe41cee61f19d917 Author: Albert Astals Cid -Date: Mon Dec 27 19:22:22 2010 +0000 +Date: Mon Dec 27 19:22:22 2010 +0000 0.16.0 NEWS NEWS | 24 ++++++++++++++++++++++++ - 1 files changed, 24 insertions(+), 0 deletions(-) + 1 file changed, 24 insertions(+) commit 0294d6e50691a3e40fad0d6e4fa9056944a91efd Author: Thomas Freitag -Date: Thu Dec 23 15:56:32 2010 +0000 +Date: Thu Dec 23 15:56:32 2010 +0000 Be more correct when drawing radial shadings Fixes 32349 poppler/Gfx.cc | 25 ++++++++++++++++--------- - 1 files changed, 16 insertions(+), 9 deletions(-) + 1 file changed, 16 insertions(+), 9 deletions(-) commit 3aa08e378927889b35b6fa858d6da568250ba6ec Author: Albert Astals Cid -Date: Sun Dec 19 22:36:47 2010 +0000 +Date: Sun Dec 19 22:36:47 2010 +0000 Seems to work with this version, so enable it CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 93cf184b7573980bf2e56342e64f9b99c5d0b415 Author: Albert Astals Cid -Date: Sun Dec 19 14:16:25 2010 +0000 +Date: Sun Dec 19 14:16:25 2010 +0000 Fix last commit Applying patches by hand is bad - poppler/PDFDoc.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + poppler/PDFDoc.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit ebb580d756a8321de87814f05ab572564732c15e Author: Philip Lorenz -Date: Sun Dec 19 14:08:31 2010 +0000 +Date: Sun Dec 19 14:08:31 2010 +0000 Windows fixes - poppler/PDFDoc.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + poppler/PDFDoc.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) commit 88a4154420e016d93c5ce05b5b8e09b6bddcadc9 Author: Philip Lorenz -Date: Sun Dec 19 13:03:01 2010 +0000 +Date: Sun Dec 19 13:03:01 2010 +0000 build on newer MSVC qt4/src/poppler-annotation.h | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit 18cd9f6aeb48266c551952c395eb9cd662bc27f5 Author: Thomas Freitag -Date: Sat Dec 18 17:59:54 2010 +0000 +Date: Sat Dec 18 17:59:54 2010 +0000 compile in windows - poppler/FontInfo.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + poppler/FontInfo.cc | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) commit 471102ef68b439dfa13e20e3b0f2e143f8d0dc85 Author: Albert Astals Cid -Date: Fri Dec 17 00:36:36 2010 +0000 +Date: Fri Dec 17 00:36:36 2010 +0000 Remove -resolution Actually use -zoom that is there for a reason - utils/pdftohtml.1 | 3 --- - utils/pdftohtml.cc | 15 ++++++--------- + utils/pdftohtml.1 | 3 --- + utils/pdftohtml.cc | 15 ++++++--------- 2 files changed, 6 insertions(+), 12 deletions(-) commit edf6c47feb5b7658e585bcce196e465245e1dc98 Author: Albert Astals Cid -Date: Thu Dec 16 22:56:40 2010 +0000 +Date: Thu Dec 16 22:56:40 2010 +0000 kill useless code - utils/pdftohtml.cc | 8 -------- - 1 files changed, 0 insertions(+), 8 deletions(-) + utils/pdftohtml.cc | 8 -------- + 1 file changed, 8 deletions(-) commit 185a2f81485e19f96393a431be5523a277747b94 Author: Albert Astals Cid -Date: Thu Dec 16 22:56:15 2010 +0000 +Date: Thu Dec 16 22:56:15 2010 +0000 static-ify some vars utils/HtmlOutputDev.cc | 9 --------- - utils/pdftohtml.cc | 8 ++++---- + utils/pdftohtml.cc | 8 ++++---- 2 files changed, 4 insertions(+), 13 deletions(-) commit e4dfc548c57b690db9122d1db3342ed0a785c8bb Author: Albert Astals Cid -Date: Tue Dec 14 19:45:46 2010 +0000 +Date: Tue Dec 14 19:45:46 2010 +0000 We need this to make the define really be defined config.h.cmake | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 06da4b46c442778c67b788b747f04b386b5247ac Author: Adrian Johnson -Date: Tue Dec 14 09:06:57 2010 +1030 +Date: Tue Dec 14 09:06:57 2010 +1030 cairo: Use A1 instead of A8 for imagemask @@ -4765,14 +11022,14 @@ where a 65K PDF printed to PDF using poppler-cairo turns into an 8MB PDF. - CMakeLists.txt | 2 ++ - configure.ac | 1 + + CMakeLists.txt | 2 ++ + configure.ac | 1 + poppler/CairoOutputDev.cc | 25 ++++++++++++++++++------- 3 files changed, 21 insertions(+), 7 deletions(-) commit 6ef457dc818e7e241e5d2e264bc2d78b132ae638 Author: Albert Astals Cid -Date: Mon Dec 13 14:08:29 2010 +0000 +Date: Mon Dec 13 14:08:29 2010 +0000 Move -fno-exceptions -fno-check-new to default flags @@ -4780,52 +11037,52 @@ gmem a while ago - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- + cmake/modules/PopplerMacros.cmake | 2 +- + configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 86e469600b58ae05cb6ede1b4017fbdac99cc556 Author: Albert Astals Cid -Date: Mon Dec 13 14:04:00 2010 +0000 +Date: Mon Dec 13 14:04:00 2010 +0000 More gcc flags movement -Wchar-subscripts is part of -Wall so remove it Move -fno-common to default options since it makes sense to use it - cmake/modules/PopplerMacros.cmake | 4 ++-- - configure.ac | 4 ++-- + cmake/modules/PopplerMacros.cmake | 4 ++-- + configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 2b74241d8b1fd1ec9fab4f6f673bbaaa1cb3d949 Author: Albert Astals Cid -Date: Mon Dec 13 13:56:52 2010 +0000 +Date: Mon Dec 13 13:56:52 2010 +0000 Promote -Wcast-align to the general warnings we ask gcc to give - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- + cmake/modules/PopplerMacros.cmake | 2 +- + configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 7313e0a4de6f2146c1dcb3d235f18a3c844d12d5 Author: Albert Astals Cid -Date: Sun Dec 12 23:28:18 2010 +0000 +Date: Sun Dec 12 23:28:18 2010 +0000 Do not return 99 (or 1) with -h, -v and -printenc Bug 32149 - utils/pdffonts.cc | 2 ++ - utils/pdfimages.cc | 2 ++ - utils/pdfinfo.cc | 3 +++ - utils/pdftoppm.cc | 2 ++ - utils/pdftops.cc | 5 ++++- - utils/pdftotext.cc | 3 +++ - 6 files changed, 16 insertions(+), 1 deletions(-) + utils/pdffonts.cc | 2 ++ + utils/pdfimages.cc | 2 ++ + utils/pdfinfo.cc | 3 +++ + utils/pdftoppm.cc | 2 ++ + utils/pdftops.cc | 5 ++++- + utils/pdftotext.cc | 3 +++ + 6 files changed, 16 insertions(+), 1 deletion(-) commit 669cbfc9fd78a22d4f14b0af43143e1f5dc28cd5 Author: Albert Astals Cid -Date: Sat Dec 11 19:04:22 2010 +0000 +Date: Sat Dec 11 19:04:22 2010 +0000 Fix the preliminary bbox/clip calculation @@ -4833,124 +11090,124 @@ list splash/SplashFTFont.cc | 15 +++++++++------ - 1 files changed, 9 insertions(+), 6 deletions(-) + 1 file changed, 9 insertions(+), 6 deletions(-) commit 2984002a64acca7014edeadd900dd52cdf7d9eac Author: Albert Astals Cid -Date: Sat Dec 11 18:57:52 2010 +0000 +Date: Sat Dec 11 18:57:52 2010 +0000 Remove the * we just need to increase the pointer Gives a warning with newer gcc's splash/Splash.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 9b45fa072198da4a5032004ac943cf2227aa97ea Author: Albert Astals Cid -Date: Fri Dec 10 12:05:58 2010 +0000 +Date: Fri Dec 10 12:05:58 2010 +0000 Make PreScanOutputDev be less agressive when deciding to rasterize BUG 30107 - poppler/PreScanOutputDev.cc | 14 +++++++++++++- - poppler/PreScanOutputDev.h | 4 ++++ - 2 files changed, 17 insertions(+), 1 deletions(-) + poppler/PreScanOutputDev.cc | 14 +++++++++++++- + poppler/PreScanOutputDev.h | 4 ++++ + 2 files changed, 17 insertions(+), 1 deletion(-) commit f96f6a06cdc33b4654669ac74d5abd0d546a127d Author: Albert Astals Cid -Date: Sun Dec 5 12:06:21 2010 +0000 +Date: Sun Dec 5 12:06:21 2010 +0000 Adapt the zlib-base FlateStream code to API changes Bug 32065 poppler/FlateStream.cc | 9 ++++++--- - poppler/FlateStream.h | 9 +++++++++ + poppler/FlateStream.h | 9 +++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) commit 7b1f83990a1f68306daf5f7dbeabcd38f4382e3b Author: Albert Astals Cid -Date: Mon Nov 29 22:27:46 2010 +0000 +Date: Mon Nov 29 22:27:46 2010 +0000 0.15.3 - CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- + CMakeLists.txt | 4 ++-- + NEWS | 18 ++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- 6 files changed, 24 insertions(+), 6 deletions(-) commit 7c23a993193aaaa4d4b5b6d1161a0455d1e2a8c0 Author: Albert Astals Cid -Date: Mon Nov 29 21:33:31 2010 +0000 +Date: Mon Nov 29 21:33:31 2010 +0000 Add some more isNum before calling getNum - poppler/GfxState.cc | 48 + poppler/GfxState.cc | 48 ++++++++++++++++++++++++++++++++---------------- - 1 files changed, 32 insertions(+), 16 deletions(-) + 1 file changed, 32 insertions(+), 16 deletions(-) commit 62ec4f591c258e702ee79b519919a931517220bf Author: Albert Astals Cid -Date: Mon Nov 29 20:50:43 2010 +0000 +Date: Mon Nov 29 20:50:43 2010 +0000 pass fetchOriginatorNums in some more calls Fixes some more crashes in broken files - poppler/Parser.cc | 7 ++++++- - poppler/Parser.h | 1 + - poppler/XRef.cc | 6 +++--- + poppler/Parser.cc | 7 ++++++- + poppler/Parser.h | 1 + + poppler/XRef.cc | 6 +++--- 3 files changed, 10 insertions(+), 4 deletions(-) commit d2a0e2ca723142478858f7edfb7c98807d554578 Author: Hib Eris -Date: Thu Nov 25 10:36:38 2010 +0000 +Date: Thu Nov 25 10:36:38 2010 +0000 Skip over loops in Pages tree - poppler/Catalog.cc | 15 ++++++++++----- - 1 files changed, 10 insertions(+), 5 deletions(-) + poppler/Catalog.cc | 15 ++++++++++----- + 1 file changed, 10 insertions(+), 5 deletions(-) commit 7abd371364e6e4aaef932f26b0664f7f9d760c42 Author: Albert Astals Cid -Date: Sun Nov 28 13:57:50 2010 +0000 +Date: Sun Nov 28 13:57:50 2010 +0000 this var is not about xobjects only anymroe - poppler/FontInfo.cc | 6 +++--- - poppler/FontInfo.h | 2 +- + poppler/FontInfo.cc | 6 +++--- + poppler/FontInfo.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) commit 1ac14df61d711097837e44d80a9332f0a854b95e Author: Adrian Johnson -Date: Sun Nov 28 13:49:41 2010 +0000 +Date: Sun Nov 28 13:49:41 2010 +0000 find fonts inside patterns Bug 31948 - poppler/FontInfo.cc | 50 + poppler/FontInfo.cc | 50 +++++++++++++++++++++++++++----------------------- - 1 files changed, 27 insertions(+), 23 deletions(-) + 1 file changed, 27 insertions(+), 23 deletions(-) commit d30dd8c6f6491beac9750447126930168394cd9f Author: Albert Astals Cid -Date: Sun Nov 28 13:25:39 2010 +0000 +Date: Sun Nov 28 13:25:39 2010 +0000 Use sets instead of arrays - poppler/FontInfo.cc | 46 ++++++++-------------------------------------- - poppler/FontInfo.h | 11 +++-------- + poppler/FontInfo.cc | 46 ++++++++-------------------------------------- + poppler/FontInfo.h | 11 +++-------- 2 files changed, 11 insertions(+), 46 deletions(-) commit 4c20bf14c0b1d7f1d5e530ded890186487da32b5 Author: Albert Astals Cid -Date: Sun Nov 28 12:50:24 2010 +0000 +Date: Sun Nov 28 12:50:24 2010 +0000 Use FontInfoScanner @@ -4959,215 +11216,215 @@ utils/pdffonts.cc | 185 ++++++++--------------------------------------------- - 1 files changed, 26 insertions(+), 159 deletions(-) + 1 file changed, 26 insertions(+), 159 deletions(-) commit d915f3d5a9e9e2e5dcd6be4cf8fac1b5849a13e9 Author: Albert Astals Cid -Date: Wed Nov 24 21:51:46 2010 +0000 +Date: Wed Nov 24 21:51:46 2010 +0000 protect against null ref here - poppler/Catalog.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Catalog.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit cf32faaa16d763561fb9dfc4469345e4b3ba2369 Author: Albert Astals Cid -Date: Wed Nov 24 21:48:54 2010 +0000 +Date: Wed Nov 24 21:48:54 2010 +0000 Protect against NULL values here poppler/JPEG2000Stream.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 46a6cc5952c59504863baed3ad2870093c462f12 Author: Albert Astals Cid -Date: Wed Nov 24 19:42:59 2010 +0000 +Date: Wed Nov 24 19:42:59 2010 +0000 Check the objects are numbers before using them Bug 31895 - poppler/GfxState.cc | 26 ++++++++++++++++++-------- - 1 files changed, 18 insertions(+), 8 deletions(-) + poppler/GfxState.cc | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) commit 52e25cca7e75a8b8eac95a3cec258f1cd9f8ecaa Author: Albert Astals Cid -Date: Tue Nov 23 20:31:14 2010 +0000 +Date: Tue Nov 23 20:31:14 2010 +0000 If it is not a Page but has no Kids either let's just pretend it's a page Fixes broken PDF at bug 31861 - poppler/Catalog.cc | 2 +- - poppler/Dict.cc | 4 ++++ - poppler/Dict.h | 2 ++ - 3 files changed, 7 insertions(+), 1 deletions(-) + poppler/Catalog.cc | 2 +- + poppler/Dict.cc | 4 ++++ + poppler/Dict.h | 2 ++ + 3 files changed, 7 insertions(+), 1 deletion(-) commit c6127898b13311197971b1c6b1b306b91e28cf0e Author: Hib Eris -Date: Mon Nov 22 13:08:48 2010 +0000 +Date: Mon Nov 22 13:08:48 2010 +0000 Use gmallocn_checkoverflow when parsing Hints table Prevents running out of memory with malicious documents. poppler/Hints.cc | 26 +++++++++++++------------- - 1 files changed, 13 insertions(+), 13 deletions(-) + 1 file changed, 13 insertions(+), 13 deletions(-) commit 6a17cc89eda52f08cbacbf9bfaaeda22cf041e82 Author: Thomas Freitag -Date: Mon Nov 22 19:20:56 2010 +0000 +Date: Mon Nov 22 19:20:56 2010 +0000 Improve rendering of radial shadings Improves the duck rendering in bug 22098 poppler/Gfx.cc | 71 - ++++++++++++++++++++++++++----------------------------- - 1 files changed, 34 insertions(+), 37 deletions(-) + +++++++++++++++++++++++++++----------------------------- + 1 file changed, 34 insertions(+), 37 deletions(-) commit 9093adede4f9ad6fb2962dcefcb09c1d8c357715 Author: Albert Astals Cid -Date: Sun Nov 21 23:49:12 2010 +0000 +Date: Sun Nov 21 23:49:12 2010 +0000 pedantic ; poppler/CurlPDFDocBuilder.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 61445f5af749510fb647059af01abf1faf664195 Author: Albert Astals Cid -Date: Sat Nov 20 22:19:35 2010 +0000 +Date: Sat Nov 20 22:19:35 2010 +0000 forgot to upadte year here poppler/Parser.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3628837febb21bcd1b54f3fb737628ea59e5d95d Author: Albert Astals Cid -Date: Sat Nov 20 22:15:08 2010 +0000 +Date: Sat Nov 20 22:15:08 2010 +0000 And now generalize the previous fix Works for loops of more than one item as in bug 28784 - poppler/Dict.cc | 4 ++-- - poppler/Dict.h | 2 +- - poppler/Object.cc | 4 ++-- - poppler/Object.h | 9 +++++---- + poppler/Dict.cc | 4 ++-- + poppler/Dict.h | 2 +- + poppler/Object.cc | 4 ++-- + poppler/Object.h | 9 +++++---- poppler/Parser.cc | 19 +++++++++++++------ - poppler/Parser.h | 7 ++++++- + poppler/Parser.h | 7 ++++++- poppler/XRef.cc | 30 +++++++++++++++++++++++++----- - poppler/XRef.h | 2 +- + poppler/XRef.h | 2 +- 8 files changed, 55 insertions(+), 22 deletions(-) commit b0555189a7fbd7f6a899e582783b9e0df44d5d6a Author: Albert Astals Cid -Date: Sat Nov 20 21:32:24 2010 +0000 +Date: Sat Nov 20 21:32:24 2010 +0000 Protect against more loops when parsing - poppler/Dict.cc | 4 ++-- - poppler/Dict.h | 2 +- - poppler/Object.cc | 4 ++-- - poppler/Object.h | 8 ++++---- - poppler/Parser.cc | 2 +- - poppler/XRef.cc | 4 ++-- - poppler/XRef.h | 2 +- + poppler/Dict.cc | 4 ++-- + poppler/Dict.h | 2 +- + poppler/Object.cc | 4 ++-- + poppler/Object.h | 8 ++++---- + poppler/Parser.cc | 2 +- + poppler/XRef.cc | 4 ++-- + poppler/XRef.h | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) commit 555fa897b275ca7195f22a727b049c8c4f2d74cd Author: Albert Astals Cid -Date: Sat Nov 20 19:14:38 2010 +0000 +Date: Sat Nov 20 19:14:38 2010 +0000 Detect loops in FormField creation poppler/Form.cc | 88 - +++++++++++++++++++++++++++++++----------------------- + +++++++++++++++++++++++++++++++------------------------ poppler/Form.h | 14 +++++---- 2 files changed, 58 insertions(+), 44 deletions(-) commit 1802ddef374cb1451975480b2427e5d23ee2c737 Author: Albert Astals Cid -Date: Sat Nov 20 18:58:17 2010 +0000 +Date: Sat Nov 20 18:58:17 2010 +0000 Forgot to port this away from GooVector :-S - poppler/CurlCachedFile.cc | 3 +-- - poppler/CurlCachedFile.h | 2 +- + poppler/CurlCachedFile.cc | 3 +-- + poppler/CurlCachedFile.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) commit 32e53c5436b8c3654e7043f1d86596a79511a4cf Author: Albert Astals Cid -Date: Sat Nov 20 18:54:59 2010 +0000 +Date: Sat Nov 20 18:54:59 2010 +0000 fix spacing poppler/Form.cc | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 1cb3d5d94a1d89ccded96d977bcabfbe438fb81f Author: Albert Astals Cid -Date: Sat Nov 20 18:08:45 2010 +0000 +Date: Sat Nov 20 18:08:45 2010 +0000 fix the memset Fixes crash in broken pdf poppler/Hints.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 22e8cebaa15adb4b19c9556cdca43cc3e77832b7 Author: Albert Astals Cid -Date: Sat Nov 20 17:20:34 2010 +0000 +Date: Sat Nov 20 17:20:34 2010 +0000 Ensure the obj are num before reading them - poppler/GfxState.cc | 32 ++++++++++++++++++++++---------- - 1 files changed, 22 insertions(+), 10 deletions(-) + poppler/GfxState.cc | 32 ++++++++++++++++++++++---------- + 1 file changed, 22 insertions(+), 10 deletions(-) commit 08b2db36db4e011ebe36d2d945cb1a0498f1c5fb Author: Pino Toscano -Date: Sat Nov 20 14:00:36 2010 +0100 +Date: Sat Nov 20 14:00:36 2010 +0100 add my copyright here poppler/Hints.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 91aa4b02aa93ffe3828479194067de42d52be465 Author: Pino Toscano -Date: Sat Nov 20 13:13:46 2010 +0100 +Date: Sat Nov 20 13:13:46 2010 +0100 [cpp] include for std::hex() and std::left() - cpp/poppler-global.cpp | 1 + - cpp/tests/poppler-dump.cpp | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + cpp/poppler-global.cpp | 1 + + cpp/tests/poppler-dump.cpp | 1 + + 2 files changed, 2 insertions(+) commit 1c924412923cb01f2cb95b0943cb7bbaf7e8cfb6 Author: Pino Toscano -Date: Sat Nov 20 13:02:36 2010 +0100 +Date: Sat Nov 20 13:02:36 2010 +0100 [cpp] include for std::back_inserter() cpp/poppler-document.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 95b551025a34f3a7bcff2852eac6d186bc8a7cb0 Author: Pino Toscano -Date: Sat Nov 20 12:54:21 2010 +0100 +Date: Sat Nov 20 12:54:21 2010 +0100 use a std::vector instead of a var-length-array of char's poppler/Hints.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 4faaff893515c80cb69b02e431a0f8483274a497 Author: Hib Eris -Date: Fri Nov 19 23:53:35 2010 +0000 +Date: Fri Nov 19 23:53:35 2010 +0000 [win32] Simplify strtok_r implementation @@ -5175,45 +11432,45 @@ poppler/strtok_r.cpp | 137 +------------------------------------------------- - 1 files changed, 1 insertions(+), 136 deletions(-) + 1 file changed, 1 insertion(+), 136 deletions(-) commit 255f84927a649d980f047fe755c9c308535a3779 Author: Hib Eris -Date: Fri Nov 19 23:45:33 2010 +0000 +Date: Fri Nov 19 23:45:33 2010 +0000 Correct parsing of linearization table Fixes bug #31627 poppler/Linearization.cc | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) + 1 file changed, 1 insertion(+), 3 deletions(-) commit 9d05138f0b7d15945f546564036bc67815593db0 Author: Albert Astals Cid -Date: Sun Nov 14 16:05:28 2010 +0000 +Date: Sun Nov 14 16:05:28 2010 +0000 0.15.2 - CMakeLists.txt | 4 ++-- - NEWS | 22 ++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- + CMakeLists.txt | 4 ++-- + NEWS | 22 ++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- 6 files changed, 28 insertions(+), 6 deletions(-) commit 2d18543bd6b3a5a9ff2dfab63339d5bfcccd0b2f Author: Albert Astals Cid -Date: Sun Nov 14 15:41:56 2010 +0000 +Date: Sun Nov 14 15:41:56 2010 +0000 This does actually work now :D qt4/tests/check_metadata.cpp | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit d772364b8a5858cbd98e256547d319260fa9d084 Author: Pino Toscano -Date: Thu Nov 11 21:52:25 2010 +0100 +Date: Thu Nov 11 21:52:25 2010 +0100 [Qt4] New function setDebugErrorFunction(). @@ -5223,13 +11480,13 @@ Base on an idea of Albert, added closure and polish by me. - qt4/src/poppler-private.cc | 20 +++++++++++++++++++- - qt4/src/poppler-qt4.h | 24 ++++++++++++++++++++++++ - 2 files changed, 43 insertions(+), 1 deletions(-) + qt4/src/poppler-private.cc | 20 +++++++++++++++++++- + qt4/src/poppler-qt4.h | 24 ++++++++++++++++++++++++ + 2 files changed, 43 insertions(+), 1 deletion(-) commit ce929cf33f4b6b6421f9d327b4bb792816d47aac Author: Jakob Voss -Date: Wed Nov 10 23:41:44 2010 +0000 +Date: Wed Nov 10 23:41:44 2010 +0000 Add -p flag to pdfimages @@ -5237,13 +11494,13 @@ utils/ImageOutputDev.cc | 25 ++++++++++++++++++------- utils/ImageOutputDev.h | 19 +++++++++++++++---- - utils/pdfimages.1 | 3 +++ - utils/pdfimages.cc | 6 +++++- + utils/pdfimages.1 | 3 +++ + utils/pdfimages.cc | 6 +++++- 4 files changed, 41 insertions(+), 12 deletions(-) commit 6296c28968613aadb7ea084092945a54005eca9b Author: Albert Astals Cid -Date: Wed Nov 10 23:28:45 2010 +0000 +Date: Wed Nov 10 23:28:45 2010 +0000 Kill GooVector @@ -5252,32 +11509,32 @@ need to maintain it in case we ever get a new xpdf release we want to merge with - CMakeLists.txt | 1 - - goo/GooVector.h | 159 + CMakeLists.txt | 1 - + goo/GooVector.h | 159 -------------------------------------------- - goo/Makefile.am | 1 - - poppler/CachedFile.cc | 19 +++--- - poppler/CachedFile.h | 15 ++-- - poppler/Catalog.cc | 12 ++-- - poppler/Catalog.h | 10 ++- - poppler/Form.h | 3 +- - poppler/Gfx.h | 7 +- - poppler/Hints.cc | 5 +- - poppler/Hints.h | 6 +- - poppler/StdinCachedFile.cc | 2 +- - poppler/StdinCachedFile.h | 2 +- - poppler/Stream.h | 1 - - poppler/XRef.cc | 10 ++-- - poppler/XRef.h | 7 +- - utils/HtmlFonts.cc | 8 +- - utils/HtmlFonts.h | 12 ++-- - utils/HtmlLinks.cc | 8 +-- - utils/HtmlLinks.h | 4 +- + goo/Makefile.am | 1 - + poppler/CachedFile.cc | 19 +++--- + poppler/CachedFile.h | 15 +++-- + poppler/Catalog.cc | 12 ++-- + poppler/Catalog.h | 10 +-- + poppler/Form.h | 3 +- + poppler/Gfx.h | 7 +- + poppler/Hints.cc | 5 +- + poppler/Hints.h | 6 +- + poppler/StdinCachedFile.cc | 2 +- + poppler/StdinCachedFile.h | 2 +- + poppler/Stream.h | 1 - + poppler/XRef.cc | 10 +-- + poppler/XRef.h | 7 +- + utils/HtmlFonts.cc | 8 +-- + utils/HtmlFonts.h | 12 ++-- + utils/HtmlLinks.cc | 8 +-- + utils/HtmlLinks.h | 4 +- 20 files changed, 66 insertions(+), 226 deletions(-) commit 5934c320aa136c1a6e97fb9bf54bdfdccfcab521 Author: Hib Eris -Date: Wed Nov 10 22:50:36 2010 +0000 +Date: Wed Nov 10 22:50:36 2010 +0000 Linearization improvements @@ -5285,78 +11542,78 @@ http://lists.freedesktop.org/archives/poppler/2010-November/006642.html for the detailed patch description - CMakeLists.txt | 4 + - glib/poppler-action.cc | 4 +- - glib/poppler-document.cc | 17 +- - glib/poppler-page.cc | 1 + - poppler/CachedFile.h | 2 +- - poppler/Catalog.cc | 352 +++++++++++++++++++++----------- - poppler/Catalog.h | 14 +- - poppler/FontInfo.cc | 5 +- - poppler/Hints.cc | 439 + CMakeLists.txt | 4 + + glib/poppler-action.cc | 4 +- + glib/poppler-document.cc | 17 +- + glib/poppler-page.cc | 1 + + poppler/CachedFile.h | 2 +- + poppler/Catalog.cc | 352 ++++++++++++++++++++----------- + poppler/Catalog.h | 14 +- + poppler/FontInfo.cc | 5 +- + poppler/Hints.cc | 439 +++++++++++++++++++++++++++++++++++++++ - poppler/Hints.h | 95 +++++++++ - poppler/Linearization.cc | 224 ++++++++++++++++++++ - poppler/Linearization.h | 45 ++++ - poppler/Makefile.am | 4 + - poppler/PDFDoc.cc | 284 +++++++++++++++++++++---- - poppler/PDFDoc.h | 38 +++- - poppler/PSOutputDev.cc | 39 ++-- - poppler/PSOutputDev.h | 14 +- - poppler/Stream.cc | 13 +- - poppler/Stream.h | 11 +- - poppler/XRef.cc | 351 ++++++++++++++++++------------- - poppler/XRef.h | 25 ++- - qt/poppler-document.cc | 14 ++- - qt/poppler-page.cc | 19 +- - qt/poppler-private.h | 14 +- - qt/poppler-qt.h | 3 +- - qt4/src/poppler-document.cc | 12 +- - qt4/src/poppler-link.cc | 7 +- - qt4/src/poppler-page.cc | 3 +- + poppler/Hints.h | 95 +++++++++ + poppler/Linearization.cc | 224 ++++++++++++++++++++ + poppler/Linearization.h | 45 ++++ + poppler/Makefile.am | 4 + + poppler/PDFDoc.cc | 284 +++++++++++++++++++++---- + poppler/PDFDoc.h | 38 +++- + poppler/PSOutputDev.cc | 39 ++-- + poppler/PSOutputDev.h | 14 +- + poppler/Stream.cc | 13 +- + poppler/Stream.h | 11 +- + poppler/XRef.cc | 351 ++++++++++++++++++------------- + poppler/XRef.h | 25 ++- + qt/poppler-document.cc | 14 +- + qt/poppler-page.cc | 19 +- + qt/poppler-private.h | 14 +- + qt/poppler-qt.h | 3 +- + qt4/src/poppler-document.cc | 12 +- + qt4/src/poppler-link.cc | 7 +- + qt4/src/poppler-page.cc | 3 +- qt4/src/poppler-ps-converter.cc | 2 + - utils/HtmlOutputDev.cc | 2 +- - utils/HtmlOutputDev.h | 3 + - utils/pdffonts.cc | 6 +- - utils/pdfinfo.cc | 22 ++- - utils/pdftohtml.cc | 2 +- - utils/pdftops.cc | 3 +- + utils/HtmlOutputDev.cc | 2 +- + utils/HtmlOutputDev.h | 3 + + utils/pdffonts.cc | 6 +- + utils/pdfinfo.cc | 22 +- + utils/pdftohtml.cc | 2 +- + utils/pdftops.cc | 3 +- 35 files changed, 1690 insertions(+), 403 deletions(-) commit abb1313ae40ab7efb073406f47fa53bf7afe0b88 Author: Pino Toscano -Date: Mon Nov 8 01:54:03 2010 +0100 +Date: Mon Nov 8 01:54:03 2010 +0100 [cpp/apidox] add the minimum version of 'image' cpp/poppler-image.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit f559e77cb7d76c5fe6a79be9086667a29613c912 Author: Pino Toscano -Date: Mon Nov 8 01:52:48 2010 +0100 +Date: Mon Nov 8 01:52:48 2010 +0100 [cpp] add image::bytes_per_row() cpp/poppler-image.cpp | 8 ++++++++ cpp/poppler-image.h | 1 + - 2 files changed, 9 insertions(+), 0 deletions(-) + 2 files changed, 9 insertions(+) commit 14dea4d74698d5d7d994e687f8176652d790dba7 Author: Pino Toscano -Date: Sun Nov 7 22:57:31 2010 +0100 +Date: Sun Nov 7 22:57:31 2010 +0100 [arthur] use the untransformed line width, not the transformed one ... as the painter will do the transformation itself already; seems to product better results - poppler/ArthurOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/ArthurOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit f077e82af0724be88d28c896a3c208f1d50ccff9 Author: Pino Toscano -Date: Sun Nov 7 21:50:48 2010 +0100 +Date: Sun Nov 7 21:50:48 2010 +0100 [qt4] New Page::renderToPainter() @@ -5369,24 +11626,24 @@ (matthias.fauconneau@gmail.com), thanks! qt4/src/poppler-page.cc | 62 - +++++++++++++++++++++++++++++++------------- - qt4/src/poppler-qt4.h | 65 + ++++++++++++++++++++++++++++++-------------- + qt4/src/poppler-qt4.h | 65 ++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 107 insertions(+), 20 deletions(-) commit df02d1fc9e65422121e5e8f493c13229552ec0e7 Author: Pino Toscano -Date: Sun Nov 7 19:47:56 2010 +0100 +Date: Sun Nov 7 19:47:56 2010 +0100 [arthur] remove unused 'm_image' attribute - poppler/ArthurOutputDev.cc | 1 - - poppler/ArthurOutputDev.h | 2 +- - 2 files changed, 1 insertions(+), 2 deletions(-) + poppler/ArthurOutputDev.cc | 1 - + poppler/ArthurOutputDev.h | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) commit b29582cd0d542a3e70dbca3fb75770daa4cc91ca Author: Matthias Fauconneau -Date: Sun Nov 7 19:44:11 2010 +0100 +Date: Sun Nov 7 19:44:11 2010 +0100 [arthur] small fixes and memory leaks @@ -5395,27 +11652,27 @@ - fix image rendering (alpha was set to zero) poppler/ArthurOutputDev.cc | 122 - +++++++++++++++++++------------------------ - 1 files changed, 54 insertions(+), 68 deletions(-) + ++++++++++++++++++++------------------------ + 1 file changed, 54 insertions(+), 68 deletions(-) commit 970f075569bf9be5e5ddc3a9ad1fabec5435dfaf Author: Pino Toscano -Date: Sun Nov 7 16:31:02 2010 +0100 +Date: Sun Nov 7 16:31:02 2010 +0100 [cpp/tests] add a simple poppler-render test ... to ease testing the render capabilities of poppler-cpp. quite minimal at the moment. - cpp/tests/CMakeLists.txt | 3 + - cpp/tests/Makefile.am | 9 +++- + cpp/tests/CMakeLists.txt | 3 ++ + cpp/tests/Makefile.am | 9 +++- cpp/tests/poppler-render.cpp | 113 ++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 124 insertions(+), 1 deletions(-) + 3 files changed, 124 insertions(+), 1 deletion(-) commit bfe4139c742cb0a669f5504df7e22e3e57243d9a Author: Pino Toscano -Date: Sun Nov 7 16:23:26 2010 +0100 +Date: Sun Nov 7 16:23:26 2010 +0100 [cpp] Add page_renderer, to render pages over images. @@ -5425,16 +11682,16 @@ It can hold a color for the "paper" of the pages, and some hints for the actual rendering. - cpp/CMakeLists.txt | 2 + - cpp/Makefile.am | 2 + + cpp/CMakeLists.txt | 2 + + cpp/Makefile.am | 2 + cpp/poppler-page-renderer.cpp | 212 +++++++++++++++++++++++++++++++++++++++++ cpp/poppler-page-renderer.h | 66 +++++++++++++ - 4 files changed, 282 insertions(+), 0 deletions(-) + 4 files changed, 282 insertions(+) commit 91e3f7b4ea42a5821fd78e1edf55e95250c9bc68 Author: Pino Toscano -Date: Sun Nov 7 16:19:34 2010 +0100 +Date: Sun Nov 7 16:19:34 2010 +0100 [cpp] add an internal way to get a 'page_private' of a 'page' @@ -5442,12 +11699,12 @@ cpp classes without the need to add friends to 'page' - cpp/poppler-page-private.h | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + cpp/poppler-page-private.h | 5 +++++ + 1 file changed, 5 insertions(+) commit fa7c41cb9c52ecd3d7c574455b1258a3021b8c75 Author: Albert Astals Cid -Date: Thu Nov 4 20:55:34 2010 +0000 +Date: Thu Nov 4 20:55:34 2010 +0000 Improvements to the splash backend @@ -5456,50 +11713,50 @@ Feuersänger More info at bug 30436 - poppler/CairoOutputDev.h | 5 +- - poppler/Function.cc | 4 +- - poppler/Function.h | 2 + - poppler/Gfx.cc | 12 +- - poppler/OutputDev.h | 16 ++- - poppler/PSOutputDev.h | 4 +- - poppler/SplashOutputDev.cc | 182 ++++++++++++++++++++- - poppler/SplashOutputDev.h | 68 ++++++++- - splash/Splash.cc | 395 + poppler/CairoOutputDev.h | 5 +- + poppler/Function.cc | 4 +- + poppler/Function.h | 2 + + poppler/Gfx.cc | 12 +- + poppler/OutputDev.h | 16 +- + poppler/PSOutputDev.h | 4 +- + poppler/SplashOutputDev.cc | 182 +++++++++++++++++++- + poppler/SplashOutputDev.h | 68 +++++++- + splash/Splash.cc | 395 +++++++++++++++++++++++++++++++++++++++++++- - splash/Splash.h | 11 +- - splash/SplashBitmap.cc | 4 +- - splash/SplashBitmap.h | 3 + - splash/SplashPattern.cc | 17 ++- - splash/SplashPattern.h | 36 ++++- + splash/Splash.h | 11 +- + splash/SplashBitmap.cc | 4 +- + splash/SplashBitmap.h | 3 + + splash/SplashPattern.cc | 17 +- + splash/SplashPattern.h | 36 +++- 14 files changed, 735 insertions(+), 24 deletions(-) commit 0aa040163741ab8ba093a742e556bba2a5ab7edf Author: Albert Astals Cid -Date: Wed Nov 3 20:40:24 2010 +0000 +Date: Wed Nov 3 20:40:24 2010 +0000 Do not add sibling children as parents Fixes c2ff94b1600b8a5841a5e4627f014560ac460f1a - poppler/Function.cc | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + poppler/Function.cc | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) commit c2ff94b1600b8a5841a5e4627f014560ac460f1a Author: Albert Astals Cid -Date: Wed Nov 3 00:02:02 2010 +0000 +Date: Wed Nov 3 00:02:02 2010 +0000 Do not loop forever in broken documents StitchingFunctions that have themselves up in the parent chain are wrong - poppler/Function.cc | 22 +++++++++++++++++++--- - poppler/Function.h | 6 ++++-- + poppler/Function.cc | 22 +++++++++++++++++++--- + poppler/Function.h | 6 ++++-- 2 files changed, 23 insertions(+), 5 deletions(-) commit cad66a7d25abdb6aa15f3aa94a35737b119b2659 Author: Albert Astals Cid -Date: Tue Nov 2 19:14:34 2010 +0000 +Date: Tue Nov 2 19:14:34 2010 +0000 Fix crash in broken documents @@ -5508,206 +11765,206 @@ that is not what you wanted poppler/CharCodeToUnicode.cc | 16 +++++++++++----- - 1 files changed, 11 insertions(+), 5 deletions(-) + 1 file changed, 11 insertions(+), 5 deletions(-) commit 7e5f31c1c41193c6e49355970e6d027b91d45825 Author: Albert Astals Cid -Date: Tue Nov 2 00:32:01 2010 +0000 +Date: Tue Nov 2 00:32:01 2010 +0000 make some more fields private splash/SplashFontFile.h | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 6751eb48dc49890f7ad8b732b3fc29a2db746ec4 Author: Albert Astals Cid -Date: Tue Nov 2 00:26:08 2010 +0000 +Date: Tue Nov 2 00:26:08 2010 +0000 Make the destructor private You are not supposed to call it, you should call unref splash/SplashFontFile.h | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit b718e821d5f21ea5b0c44c6c2b59769c9b94892a Author: Albert Astals Cid -Date: Thu Oct 28 08:46:09 2010 +0100 +Date: Thu Oct 28 08:46:09 2010 +0100 Revert fdfffc9c68314d3f64dee7e0ef8617105e3198dd It is not a leak and makes things crash :D - poppler/SplashOutputDev.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + poppler/SplashOutputDev.cc | 1 - + 1 file changed, 1 deletion(-) commit 15b9aeac5a20c544db1aebe00113ebc2f7ba52c7 Author: Albert Astals Cid -Date: Thu Oct 28 00:37:29 2010 +0100 +Date: Thu Oct 28 00:37:29 2010 +0100 if reallocn fails, free p - goo/gmem.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + goo/gmem.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) commit 561c0567a5741d7c49903c51c8020187dccaa0d9 Author: Albert Astals Cid -Date: Wed Oct 27 22:43:51 2010 +0100 +Date: Wed Oct 27 22:43:51 2010 +0100 fix comment - poppler/SplashOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + poppler/SplashOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit 4ef38cc99a879202e717447a422272cf85eeccfc Author: Albert Astals Cid -Date: Wed Oct 27 22:36:07 2010 +0100 +Date: Wed Oct 27 22:36:07 2010 +0100 Fix memory leaks that can happen with broken documents - poppler/SplashOutputDev.cc | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + poppler/SplashOutputDev.cc | 10 ++++++++++ + 1 file changed, 10 insertions(+) commit fdfffc9c68314d3f64dee7e0ef8617105e3198dd Author: Albert Astals Cid -Date: Wed Oct 27 20:40:19 2010 +0100 +Date: Wed Oct 27 20:40:19 2010 +0100 Fix memory leak - poppler/SplashOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/SplashOutputDev.cc | 1 + + 1 file changed, 1 insertion(+) commit 90d479d9d5c947175e60ab689f440ae9c24f0b2b Author: Albert Astals Cid -Date: Wed Oct 27 20:39:48 2010 +0100 +Date: Wed Oct 27 20:39:48 2010 +0100 Do not crash if bitmap->alpha == NULL Happens in broken files splash/Splash.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 6ad36277971ec46d4a4ef0c45625e60f8c5f1247 Author: Albert Astals Cid -Date: Mon Oct 25 18:59:49 2010 +0100 +Date: Mon Oct 25 18:59:49 2010 +0100 Initialze movie to NULL on broken pdf files poppler/Annot.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 2d0b6e2956a81164bca6adc9aacad0e620480957 Author: Albert Astals Cid -Date: Sun Oct 24 00:23:21 2010 +0100 +Date: Sun Oct 24 00:23:21 2010 +0100 Here the chars to read is the increment size not the initialSize Fixes crash in file provided by Robert Święcki poppler/Stream.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit dcb02d2100136b6035485be3be214ce3d9f1c102 Author: Vincent Torri -Date: Sat Oct 23 23:45:05 2010 +0100 +Date: Sat Oct 23 23:45:05 2010 +0100 remove -ansi flag for cywin and mingw configure.ac | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit 17cdc81224c72f7b58de61734c9ead337ff7b42b Author: Albert Astals Cid -Date: Sat Oct 23 23:37:59 2010 +0100 +Date: Sat Oct 23 23:37:59 2010 +0100 update my C year - poppler/SplashOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/SplashOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit e09ddce7e21bbd62b384d9d59fbd1e0f14f7d05f Author: Albert Astals Cid -Date: Sat Oct 23 23:33:00 2010 +0100 +Date: Sat Oct 23 23:33:00 2010 +0100 Fix crash in malformed documents - poppler/SplashOutputDev.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + poppler/SplashOutputDev.cc | 5 +++++ + 1 file changed, 5 insertions(+) commit 906e4e15421d8f3f0a825ca767e5eac3169853d6 Author: Albert Astals Cid -Date: Sat Oct 23 23:12:44 2010 +0100 +Date: Sat Oct 23 23:12:44 2010 +0100 Do not leak attrs1 - poppler/Catalog.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Catalog.cc | 1 + + 1 file changed, 1 insertion(+) commit ec32bb45a57a8a839156c946fcde1270aa6019d9 Author: Albert Astals Cid -Date: Sat Oct 23 23:00:03 2010 +0100 +Date: Sat Oct 23 23:00:03 2010 +0100 Do not crash if n is 0 - poppler/Function.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + poppler/Function.cc | 3 +++ + 1 file changed, 3 insertions(+) commit 9edf7e4fefb37989af9a2558aaa83d7cd4694ec6 Author: Albert Astals Cid -Date: Sat Oct 23 22:59:50 2010 +0100 +Date: Sat Oct 23 22:59:50 2010 +0100 add unlikely marker - poppler/Decrypt.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Decrypt.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit c46e863b7b94dc2f83a7d89f4afb8fe3bc8ec35c Author: Albert Astals Cid -Date: Sat Oct 23 22:55:49 2010 +0100 +Date: Sat Oct 23 22:55:49 2010 +0100 Do not divide by 0 in rc4InitKey - poppler/Decrypt.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + poppler/Decrypt.cc | 4 ++++ + 1 file changed, 4 insertions(+) commit bcb13ed5828e2a855efd5e38b2acd15ca37a9991 Author: Albert Astals Cid -Date: Sat Oct 23 22:40:17 2010 +0100 +Date: Sat Oct 23 22:40:17 2010 +0100 Check obj2 is a num before reading it poppler/Gfx.cc | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit c64a49307782299cb7a950a66419f9d59707f38b Author: Albert Astals Cid -Date: Wed Oct 20 22:29:29 2010 +0100 +Date: Wed Oct 20 22:29:29 2010 +0100 0.15.1 - CMakeLists.txt | 4 ++-- - NEWS | 46 ++++++++++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- - poppler/Makefile.am | 2 +- - qt4/src/Doxyfile | 2 +- + CMakeLists.txt | 4 ++-- + NEWS | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- + poppler/Makefile.am | 2 +- + qt4/src/Doxyfile | 2 +- 6 files changed, 52 insertions(+), 6 deletions(-) commit 3b45c66de91243d7419657512cf726c9e1c26dfb Author: Kenneth Berland -Date: Sun Oct 17 14:24:16 2010 +0100 +Date: Sun Oct 17 14:24:16 2010 +0100 Add -bbox option to pdftotext - utils/pdftotext.1 | 4 ++ + utils/pdftotext.1 | 4 ++ utils/pdftotext.cc | 125 +++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 103 insertions(+), 26 deletions(-) commit 71ec4c7a6715a40d536d1e4b911dae48d1bba7b9 Author: Pino Toscano -Date: Sun Oct 17 14:57:43 2010 +0200 +Date: Sun Oct 17 14:57:43 2010 +0200 [CMake] update MacroOptionalFindPackage.cmake from KDE SVN @@ -5715,89 +11972,89 @@ disabled" case cmake/modules/MacroOptionalFindPackage.cmake | 40 - +++++++++++++++++++------ - 1 files changed, 30 insertions(+), 10 deletions(-) + +++++++++++++++++++------- + 1 file changed, 30 insertions(+), 10 deletions(-) commit ab0049d8be5dfe1989c4aa33c2732915c62fecb2 Author: Pino Toscano -Date: Sun Oct 17 14:29:22 2010 +0200 +Date: Sun Oct 17 14:29:22 2010 +0200 [CMake] Cairo package: make the version check really working cmake/modules/FindCairo.cmake | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 1cea33717c92631ee9c417d9f89e32b03695c75a Author: Pino Toscano -Date: Sun Oct 17 13:55:58 2010 +0200 +Date: Sun Oct 17 13:55:58 2010 +0200 [CMake] Bump cairo dependency to 1.10 followup of fc9b85894754d175af916eaf6cb127efd601df7e CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit d6f49aa2da15cd2e9cf775d6b1d2d04a005c8cdd Author: Carlos Garcia Campos -Date: Sun Oct 17 14:22:57 2010 +0200 +Date: Sun Oct 17 14:22:57 2010 +0200 [cairo] Fix a crash when redering documents with invalid type 3 fonts - poppler/CairoFontEngine.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/CairoFontEngine.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit e2fad550c3cbf86541730582151e1bb6470ed9c1 Author: Carlos Garcia Campos -Date: Sun Oct 17 13:47:33 2010 +0200 +Date: Sun Oct 17 13:47:33 2010 +0200 [glib-demo] Use poppler_page_get_selected_region() in selections demo glib/demo/selections.c | 73 - ++++++++++++++--------------------------------- - 1 files changed, 22 insertions(+), 51 deletions(-) + +++++++++++++++--------------------------------- + 1 file changed, 22 insertions(+), 51 deletions(-) commit 88013458e141de58ed801480707ae0dfe92b9aa2 Author: Carlos Garcia Campos -Date: Sun Oct 17 13:46:26 2010 +0200 +Date: Sun Oct 17 13:46:26 2010 +0200 [glib] Add poppler_page_get_selected_region() that returns a cairo_region_t, and deprecate poppler_page_get_selection_region(). - glib/poppler-page.cc | 81 + glib/poppler-page.cc | 81 +++++++++++++++++++++++++++++++++++ - glib/poppler-page.h | 4 ++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 86 insertions(+), 0 deletions(-) + glib/poppler-page.h | 4 ++ + glib/reference/poppler-sections.txt | 1 + + 3 files changed, 86 insertions(+) commit fc9b85894754d175af916eaf6cb127efd601df7e Author: Carlos Garcia Campos -Date: Sun Oct 17 12:54:18 2010 +0200 +Date: Sun Oct 17 12:54:18 2010 +0200 [configure] Bump cairo dependency to 1.10 - configure.ac | 2 +- - poppler/CairoOutputDev.cc | 4 ---- - 2 files changed, 1 insertions(+), 5 deletions(-) + configure.ac | 2 +- + poppler/CairoOutputDev.cc | 4 ---- + 2 files changed, 1 insertion(+), 5 deletions(-) commit dd14ef6b211ac1c8a4f16bb6094dbfd6a09cbef9 Author: Albert Astals Cid -Date: Sun Oct 17 12:46:55 2010 +0100 +Date: Sun Oct 17 12:46:55 2010 +0100 Improve dict lookup speed for big dicts Based on a patch by Paweł Wiejacha poppler/Dict.cc | 98 - +++++++++++++++++++++++++++++++++++++++++++----------- - poppler/Dict.h | 2 + + +++++++++++++++++++++++++++++++++++++++++++------------ + poppler/Dict.h | 2 ++ 2 files changed, 80 insertions(+), 20 deletions(-) commit bb38a0c71434413f2728109c73278de1b8a58571 Author: Carlos Garcia Campos -Date: Sun Oct 17 12:52:01 2010 +0200 +Date: Sun Oct 17 12:52:01 2010 +0200 [glib-demo] Make glib demo program installable @@ -5805,21 +12062,21 @@ install from sources. glib/demo/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit d26d0fab2ddfff853f6681a3518813a2d65a4112 Author: Carlos Garcia Campos -Date: Sun Oct 17 12:36:46 2010 +0200 +Date: Sun Oct 17 12:36:46 2010 +0200 [glib-demo] Use printing options in print demo glib/demo/print.c | 96 +++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 files changed, 93 insertions(+), 3 deletions(-) + 1 file changed, 93 insertions(+), 3 deletions(-) commit 4a71dcdd350d0c0515ca349f0b875b33289d25ee Author: Carlos Garcia Campos -Date: Sun Oct 17 12:31:41 2010 +0200 +Date: Sun Oct 17 12:31:41 2010 +0200 [glib] Add poppler_page_render_for_printing_with_options() @@ -5829,81 +12086,81 @@ - Print document and markup - Print document and stamps - glib/poppler-page.cc | 77 - ++++++++++++++++++++++++++++++---- - glib/poppler-page.h | 3 + - glib/poppler.h | 19 +++++++++ - glib/reference/poppler-sections.txt | 4 ++ + glib/poppler-page.cc | 77 + +++++++++++++++++++++++++++++++---- + glib/poppler-page.h | 3 ++ + glib/poppler.h | 19 +++++++++ + glib/reference/poppler-sections.txt | 4 ++ 4 files changed, 94 insertions(+), 9 deletions(-) commit 0b3b2ebc3930bd46fb13fb2158fc695b0962f7c5 Author: Albert Astals Cid -Date: Sat Oct 16 15:09:05 2010 +0100 +Date: Sat Oct 16 15:09:05 2010 +0100 Add a callback to know which page has been printed qt4/src/poppler-ps-converter.cc | 16 ++++++++++++++-- - qt4/src/poppler-qt4.h | 10 ++++++++++ + qt4/src/poppler-qt4.h | 10 ++++++++++ 2 files changed, 24 insertions(+), 2 deletions(-) commit 4bd25223c4d15dfa91965a6e86eaa444a5a81f71 Author: Albert Astals Cid -Date: Sat Oct 16 15:08:05 2010 +0100 +Date: Sat Oct 16 15:08:05 2010 +0100 Do not omit this character Mimics Cairo backend and Adode Reader behaviour splash/SplashFTFont.cc | 4 ---- - 1 files changed, 0 insertions(+), 4 deletions(-) + 1 file changed, 4 deletions(-) commit b604a008a2a379a21e5fdfa0799886f80d893a08 Author: Christian Feuersänger -Date: Thu Oct 14 23:56:36 2010 +0100 +Date: Thu Oct 14 23:56:36 2010 +0100 Improve rendering of Shading Type 6 and 7 - poppler/Gfx.cc | 212 - +++++++++++++++++++++++++++++++++++++++++---------- - poppler/Gfx.h | 9 ++- - poppler/GfxState.cc | 96 +++++++++++++++++++++++- - poppler/GfxState.h | 127 ++++++++++++++++++++++++++++++- - 4 files changed, 397 insertions(+), 47 deletions(-) + poppler/Gfx.cc | 214 + ++++++++++++++++++++++++++++++++++++++++----------- + poppler/Gfx.h | 9 ++- + poppler/GfxState.cc | 96 ++++++++++++++++++++++- + poppler/GfxState.h | 127 +++++++++++++++++++++++++++++- + 4 files changed, 398 insertions(+), 48 deletions(-) commit c6bb63b31c268e4e842532e6839b15edb31cf25c Author: Albert Astals Cid -Date: Thu Oct 14 23:33:13 2010 +0100 +Date: Thu Oct 14 23:33:13 2010 +0100 Only clip boxes to mediabox if we are at the page level Fixes bug 30784 poppler/Page.cc | 19 +++++++++++-------- - 1 files changed, 11 insertions(+), 8 deletions(-) + 1 file changed, 11 insertions(+), 8 deletions(-) commit 4a248b3f523209ec16ace587229412653b2276d0 Author: Pino Toscano -Date: Thu Oct 14 18:32:05 2010 +0200 +Date: Thu Oct 14 18:32:05 2010 +0200 [cpp] make it compile also when there are no image formats available including the ImgWirter.h is enough to get the definition of ImgWriter cpp/poppler-image.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit de1501d87549269f9214c9e3fba4cbf39960826e Author: Albert Astals Cid -Date: Wed Oct 13 19:18:36 2010 +0100 +Date: Wed Oct 13 19:18:36 2010 +0100 remove windows eol poppler/Gfx.cc | 38 +++++++++++++++++++------------------- - 1 files changed, 19 insertions(+), 19 deletions(-) + 1 file changed, 19 insertions(+), 19 deletions(-) commit 12e68b49feef10b654944dd71eab0852cfeceb89 Author: Pino Toscano -Date: Sun Oct 10 23:04:57 2010 +0200 +Date: Sun Oct 10 23:04:57 2010 +0200 [cpp] Add a new 'image' class. @@ -5915,26 +12172,26 @@ Still a FIXME in the copy() method and in the save() (for mono images only). - cpp/CMakeLists.txt | 2 + - cpp/Makefile.am | 3 + - cpp/poppler-image-private.h | 48 +++++ - cpp/poppler-image.cpp | 431 + cpp/CMakeLists.txt | 2 + + cpp/Makefile.am | 3 + + cpp/poppler-image-private.h | 48 +++++ + cpp/poppler-image.cpp | 431 +++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-image.h | 70 +++++++ - 5 files changed, 554 insertions(+), 0 deletions(-) + cpp/poppler-image.h | 70 +++++++ + 5 files changed, 554 insertions(+) commit db31687ba476e272b72625a8a78b50780522ee7d Author: Carlos Garcia Campos -Date: Sat Oct 9 10:33:06 2010 +0200 +Date: Sat Oct 9 10:33:06 2010 +0200 [glib] docs: Document poppler_annot_markup_get_date() glib/poppler-annot.cc | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit a7cf8d322a4a687c9810a577cc92ff6b9725ecdc Author: Fernando Herrera -Date: Thu Oct 7 17:28:31 2010 +0200 +Date: Thu Oct 7 17:28:31 2010 +0200 [glib] Fix introspection annotations for poppler_document_get_page*() @@ -5942,11 +12199,11 @@ reference. glib/poppler-document.cc | 6 ++---- - 1 files changed, 2 insertions(+), 4 deletions(-) + 1 file changed, 2 insertions(+), 4 deletions(-) commit d690bea929553d1a4392d42d949843e9467ba8cb Author: Albert Astals Cid -Date: Tue Oct 5 22:18:22 2010 +0100 +Date: Tue Oct 5 22:18:22 2010 +0100 Make sure obj is a num before reading it @@ -5955,11 +12212,11 @@ cares. Bug #30590 poppler/Gfx.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + 1 file changed, 4 insertions(+), 2 deletions(-) commit b17be2bc32cf71bac0473bf4ac16359e3027b4fc Author: Carlos Garcia Campos -Date: Sun Oct 3 12:14:11 2010 +0200 +Date: Sun Oct 3 12:14:11 2010 +0200 [annots] Fix a crash when drawing square/circle annots without a border @@ -5968,91 +12225,91 @@ poppler/Annot.cc | 121 +++++++++++++++++++++++++++--------------------------- - 1 files changed, 61 insertions(+), 60 deletions(-) + 1 file changed, 61 insertions(+), 60 deletions(-) commit e3d3944c1988343704e3ba3a5d60609719466afb Author: Tomas Hoger -Date: Wed Sep 29 20:03:45 2010 +0100 +Date: Wed Sep 29 20:03:45 2010 +0100 Fix uninitialized uses on DCTScanInfo - poppler/Stream.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + poppler/Stream.cc | 3 +++ + 1 file changed, 3 insertions(+) commit f380647f09d88339c936184bbe86c70c0d47de4b Author: Albert Astals Cid -Date: Wed Sep 29 20:02:10 2010 +0100 +Date: Wed Sep 29 20:02:10 2010 +0100 Free names - poppler/Catalog.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Catalog.cc | 1 + + 1 file changed, 1 insertion(+) commit aa0fd32a8501473832bce1b8b804dd3f9a45735b Author: Albert Astals Cid -Date: Mon Sep 27 22:39:09 2010 +0100 +Date: Mon Sep 27 22:39:09 2010 +0100 Consider render value when colorizing text Fixes bug 2807 - poppler/CairoOutputDev.cc | 18 +++--------------- - poppler/CairoOutputDev.h | 2 -- - poppler/Gfx.cc | 21 +++++++++++++++++---- - poppler/PSOutputDev.cc | 26 ++++++++++---------------- - poppler/PSOutputDev.h | 3 +-- - poppler/SplashOutputDev.cc | 18 +++--------------- - poppler/SplashOutputDev.h | 4 +--- + poppler/CairoOutputDev.cc | 18 +++--------------- + poppler/CairoOutputDev.h | 2 -- + poppler/Gfx.cc | 21 +++++++++++++++++---- + poppler/PSOutputDev.cc | 26 ++++++++++---------------- + poppler/PSOutputDev.h | 3 +-- + poppler/SplashOutputDev.cc | 18 +++--------------- + poppler/SplashOutputDev.h | 4 +--- 7 files changed, 35 insertions(+), 57 deletions(-) commit cf710b999b510203e9348ea9f04360be1fe957b8 Author: Pino Toscano -Date: Fri Sep 24 00:50:37 2010 +0200 +Date: Fri Sep 24 00:50:37 2010 +0200 [Qt4] enable the generation of the QCH file ... usable in Qt Assistant qt4/src/Doxyfile | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) + 1 file changed, 7 insertions(+), 7 deletions(-) commit be6d933071c9ab043f01f374a884472c4ce3007e Author: Pino Toscano -Date: Thu Sep 23 15:55:45 2010 +0200 +Date: Thu Sep 23 15:55:45 2010 +0200 update Doxyfile's for qt4 and cpp no changes in the actual configuration values - cpp/Doxyfile | 155 +++++-- + cpp/Doxyfile | 155 ++++-- qt4/src/Doxyfile | 1469 +++++++++++++++++++++++++++++++++--------------------- 2 files changed, 1018 insertions(+), 606 deletions(-) commit 721da3d542ab9b234b058f3c14ea9303d748107e Author: Carlos Garcia Campos -Date: Thu Sep 23 14:09:11 2010 +0200 +Date: Thu Sep 23 14:09:11 2010 +0200 [glib] Use g_memdup instead of g_strdup in poppler_document_get_id() Ids are not null-terminated strings, but fixed size byte arrays. - glib/demo/info.cc | 8 ++++++-- + glib/demo/info.cc | 8 ++++++-- glib/poppler-document.cc | 33 ++++++++++++++------------------- 2 files changed, 20 insertions(+), 21 deletions(-) commit 4ffc0ed73397e4e58f04c3577b093a3fd39c22bd Author: Pino Toscano -Date: Thu Sep 23 02:21:12 2010 +0200 +Date: Thu Sep 23 02:21:12 2010 +0200 [cpp] small clarification in document::load_from_data() apidox cpp/poppler-document.cpp | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 9491dc4a10706109d0f2b4d15f21b9a1db51d8c9 Author: Pino Toscano -Date: Thu Sep 23 02:18:07 2010 +0200 +Date: Thu Sep 23 02:18:07 2010 +0200 [cpp] add document::load_from_raw_data() @@ -6064,45 +12321,45 @@ and make sure to properly use the raw data when unlocking the document cpp/poppler-document-private.h | 5 ++++ - cpp/poppler-document.cpp | 53 + cpp/poppler-document.cpp | 53 ++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-document.h | 4 +++ - 3 files changed, 62 insertions(+), 0 deletions(-) + cpp/poppler-document.h | 4 +++ + 3 files changed, 62 insertions(+) commit a3c1f2d5ea1de969e9aaaa84ee38866938b4ce0c Author: Albert Astals Cid -Date: Wed Sep 22 20:14:27 2010 +0100 +Date: Wed Sep 22 20:14:27 2010 +0100 fix copyright poppler/Form.cc | 1 + poppler/Form.h | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 1aad013e353a9e59bdab8a1b4ce93f2ad7aaf4f2 Author: Pino Toscano -Date: Wed Sep 22 17:07:38 2010 +0200 +Date: Wed Sep 22 17:07:38 2010 +0200 update copyrights - cpp/poppler-document.h | 2 +- + cpp/poppler-document.h | 2 +- cpp/poppler-page-transition.cpp | 2 +- - cpp/poppler-private.cpp | 2 +- - cpp/poppler-rectangle.cpp | 2 +- + cpp/poppler-private.cpp | 2 +- + cpp/poppler-rectangle.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 2d6d66ebe0215df66e33cb5974c58c324fab50b6 Author: Pino Toscano -Date: Wed Sep 22 17:07:13 2010 +0200 +Date: Wed Sep 22 17:07:13 2010 +0200 [cpp/tests] poppler-dump: show the PDF IDs, if available - cpp/tests/poppler-dump.cpp | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + cpp/tests/poppler-dump.cpp | 6 ++++++ + 1 file changed, 6 insertions(+) commit e39fde1b62544b90e73a2fc3609a260991db3a47 Author: Pino Toscano -Date: Wed Sep 22 16:52:08 2010 +0200 +Date: Wed Sep 22 16:52:08 2010 +0200 [cpp] add document::get_pdf_id() @@ -6110,11 +12367,11 @@ cpp/poppler-document.cpp | 29 +++++++++++++++++++++++++++++ cpp/poppler-document.h | 1 + - 2 files changed, 30 insertions(+), 0 deletions(-) + 2 files changed, 30 insertions(+) commit 299a1849a148fa0a7b3171c45ec68b9901aa93bb Author: Pino Toscano -Date: Wed Sep 22 16:36:30 2010 +0200 +Date: Wed Sep 22 16:36:30 2010 +0200 [Qt4] add Document::getPdfId() @@ -6122,15 +12379,15 @@ also, add two test cases for it in the metadata unit test - qt4/src/poppler-document.cc | 16 +++++++++++++ - qt4/src/poppler-qt4.h | 14 +++++++++++ + qt4/src/poppler-document.cc | 16 ++++++++++++++ + qt4/src/poppler-qt4.h | 14 ++++++++++++ qt4/tests/check_metadata.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 80 insertions(+), 0 deletions(-) + 3 files changed, 80 insertions(+) commit dd9bcdb720ac1bf8a022635bcbb3b56e4b75bb15 Author: Pino Toscano -Date: Wed Sep 22 16:29:46 2010 +0200 +Date: Wed Sep 22 16:29:46 2010 +0200 Make the internal get_id() not fail because of null bytes in the ID. @@ -6143,35 +12400,35 @@ as used elsewhere in get_id() function. poppler/PDFDoc.cc | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit 9554cbc3cb4fc0cd7ad2295f5d27a18e030c6aee Author: Carlos Garcia Campos -Date: Wed Sep 22 12:54:25 2010 +0200 +Date: Wed Sep 22 12:54:25 2010 +0200 [glib-demo] Show form field names in forms demo glib/demo/forms.c | 26 ++++++++++++++++++++------ - 1 files changed, 20 insertions(+), 6 deletions(-) + 1 file changed, 20 insertions(+), 6 deletions(-) commit 257634b26b682628dba5ee5f94cb0bad030bcb4f Author: Mark Riedesel -Date: Wed Sep 22 12:52:49 2010 +0200 +Date: Wed Sep 22 12:52:49 2010 +0200 [glib] Add methods to get mapping, partial an fully qualified form field names See bug #28780. - glib/poppler-form-field.cc | 68 + glib/poppler-form-field.cc | 68 +++++++++++++++++++++++++++++++++++ - glib/poppler-form-field.h | 3 ++ - glib/reference/poppler-sections.txt | 3 ++ - 3 files changed, 74 insertions(+), 0 deletions(-) + glib/poppler-form-field.h | 3 ++ + glib/reference/poppler-sections.txt | 3 ++ + 3 files changed, 74 insertions(+) commit 6db98abc59c154dcb18d69fc37e44ce804c3ccc9 Author: Mark Riedesel -Date: Wed Sep 22 12:41:16 2010 +0200 +Date: Wed Sep 22 12:41:16 2010 +0200 Add getLabel method to FormWidget @@ -6180,22 +12437,22 @@ poppler/Form.cc | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Form.h | 8 +++++++ - 2 files changed, 72 insertions(+), 0 deletions(-) + 2 files changed, 72 insertions(+) commit bcdca66fd57439735e0b9aa182ab7cfce29e9ed0 Author: Carlos Garcia Campos -Date: Tue Sep 21 11:49:37 2010 +0200 +Date: Tue Sep 21 11:49:37 2010 +0200 [glib] Fix minimum value of creation and modification date properties It should be -1 which means there's no date specified glib/poppler-document.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit d2578bd66129466b2dd114b6407c147598e09d2b Author: Albert Astals Cid -Date: Tue Sep 21 19:19:27 2010 +0100 +Date: Tue Sep 21 19:19:27 2010 +0100 Avoid loops in Form::fieldLookup @@ -6208,7 +12465,7 @@ commit 2fe825deac055be82b220d0127169cb3d61387a8 Author: Albert Astals Cid -Date: Tue Sep 21 19:15:25 2010 +0100 +Date: Tue Sep 21 19:15:25 2010 +0100 Make sure obj1 is a num before reading it @@ -6216,45 +12473,45 @@ Security Group poppler/Gfx.cc | 20 ++++++++++++++++---- - 1 files changed, 16 insertions(+), 4 deletions(-) + 1 file changed, 16 insertions(+), 4 deletions(-) commit 473de6f88a055bb03470b4af5fa584be8cb5fda4 Author: Albert Astals Cid -Date: Tue Sep 21 19:11:42 2010 +0100 +Date: Tue Sep 21 19:11:42 2010 +0100 Fix memory leak if obj2 is not a dict Found thanks to PDF provided by Joel Voss of Leviathan Security Group poppler/Form.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 9706e28657ff7ea52aa69d9efb3f91d0cfaee70b Author: Albert Astals Cid -Date: Tue Sep 21 19:09:37 2010 +0100 +Date: Tue Sep 21 19:09:37 2010 +0100 Fix crash when idx is out of range Found thanks to PDF provided by Joel Voss of Leviathan Security Group - poppler/Function.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Function.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 26a5817ffec9f05ac63db6c5cd5b1f0871d271c7 Author: Albert Astals Cid -Date: Tue Sep 21 19:08:54 2010 +0100 +Date: Tue Sep 21 19:08:54 2010 +0100 Fix crash when idx is out of range Fixes crash in broken pdf provided by Joel Voss of Leviathan Security Group - poppler/Function.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + poppler/Function.cc | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) commit dfdf3602bde47d1be7788a44722c258bfa0c6d6e Author: Albert Astals Cid -Date: Tue Sep 21 19:07:12 2010 +0100 +Date: Tue Sep 21 19:07:12 2010 +0100 Give a value to color.c[i] @@ -6264,32 +12521,32 @@ Found thanks to PDF provided by Joel Voss of Leviathan Security Group poppler/Gfx.cc | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) + 1 file changed, 8 insertions(+) commit 01c85c08305bae16242f5979ab107fa5bb5f5100 Author: Albert Astals Cid -Date: Tue Sep 21 19:04:37 2010 +0100 +Date: Tue Sep 21 19:04:37 2010 +0100 Forgot my (C) here - poppler/Decrypt.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Decrypt.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit bf2055088a3a2d3bb3d3c37d464954ec1a25771f Author: Albert Astals Cid -Date: Tue Sep 21 19:03:19 2010 +0100 +Date: Tue Sep 21 19:03:19 2010 +0100 Properly initialize stack Fixes crash in broken pdf provided by Joel Voss of Leviathan Security Group - poppler/Function.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Function.cc | 1 + + 1 file changed, 1 insertion(+) commit e853106b58d6b4b0467dbd6436c9bb1cfbd372cf Author: Albert Astals Cid -Date: Tue Sep 21 19:01:36 2010 +0100 +Date: Tue Sep 21 19:01:36 2010 +0100 Properly initialize parser @@ -6297,111 +12554,111 @@ Security Group poppler/Gfx.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 3422638b2a39cbdd33a114a7d7debc0a5f688501 Author: Albert Astals Cid -Date: Tue Sep 21 18:58:43 2010 +0100 +Date: Tue Sep 21 18:58:43 2010 +0100 Fix crash in broken pdf (parser->getStream() is 0) Found thanks to PDF provided by Joel Voss of Leviathan Security Group poppler/Gfx.cc | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + 1 file changed, 7 insertions(+), 2 deletions(-) commit a2dab0238a69240dad08eca2083110b52ce488b7 Author: Albert Astals Cid -Date: Tue Sep 21 18:55:51 2010 +0100 +Date: Tue Sep 21 18:55:51 2010 +0100 Initialize properly charactersRead It is possible that there are calls to getPos before reset Found thanks to PDF provided by Joel Voss of Leviathan Security Group - poppler/Decrypt.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + poppler/Decrypt.cc | 2 ++ + 1 file changed, 2 insertions(+) commit 39d140bfc0b8239bdd96d6a55842034ae5c05473 Author: Albert Astals Cid -Date: Tue Sep 21 18:54:31 2010 +0100 +Date: Tue Sep 21 18:54:31 2010 +0100 Fix crash in broken pdf (code < 0) Found thanks to PDF provided by Joel Voss of Leviathan Security Group - fofi/FoFiType1.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + fofi/FoFiType1.cc | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) commit c6a091512745771894b54a71613fd6b5ca1adcb3 Author: Albert Astals Cid -Date: Tue Sep 21 18:50:25 2010 +0100 +Date: Tue Sep 21 18:50:25 2010 +0100 Fix memory leak Found thanks to PDF provided by Joel Voss of Leviathan Security Group - poppler/Stream.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/Stream.cc | 1 + + 1 file changed, 1 insertion(+) commit 9b6ddb68b80ef19cd2615900bd24da76374003d9 Author: Albert Astals Cid -Date: Mon Sep 20 19:47:47 2010 +0100 +Date: Mon Sep 20 19:47:47 2010 +0100 Fix copyright - poppler/PDFDoc.cc | 1 + - poppler/PDFDoc.h | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + poppler/PDFDoc.cc | 1 + + poppler/PDFDoc.h | 1 + + 2 files changed, 2 insertions(+) commit fa3abc23656204eedd022ee1c73d9e5af758cdac Author: Pino Toscano -Date: Fri Sep 17 22:20:09 2010 +0200 +Date: Fri Sep 17 22:20:09 2010 +0200 [cpp] More bits of API documentation. - cpp/poppler-global.cpp | 124 + cpp/poppler-global.cpp | 124 +++++++++++++++++++++++++++++++++++++++ cpp/poppler-page-transition.cpp | 32 ++++++++++ - cpp/poppler-rectangle.cpp | 19 ++++++ - 3 files changed, 175 insertions(+), 0 deletions(-) + cpp/poppler-rectangle.cpp | 19 ++++++ + 3 files changed, 175 insertions(+) commit c5f7b5becc9993c05b67a470d5a1e431806b98d6 Author: Pino Toscano -Date: Fri Sep 17 20:26:37 2010 +0200 +Date: Fri Sep 17 20:26:37 2010 +0200 update copyrights - qt4/src/poppler-private.cc | 2 +- - qt4/tests/check_strings.cpp | 18 ++++++++++++++++++ - 2 files changed, 19 insertions(+), 1 deletions(-) + qt4/src/poppler-private.cc | 2 +- + qt4/tests/check_strings.cpp | 18 ++++++++++++++++++ + 2 files changed, 19 insertions(+), 1 deletion(-) commit ae517042570327b860c1db6b68f9697d5c104657 Author: Pino Toscano -Date: Fri Sep 17 19:39:10 2010 +0200 +Date: Fri Sep 17 19:39:10 2010 +0200 [cpp] improve a bit the Unicode* -> ustring conversion (although IMHO not yet solved) cpp/poppler-private.cpp | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit f4c6ef88f01f6763943a3e6e006e52dbea0b149c Author: Pino Toscano -Date: Fri Sep 17 16:07:05 2010 +0200 +Date: Fri Sep 17 16:07:05 2010 +0200 [Qt4/tests] check_strings: add a new test case for QStringToUnicodeGooString not much test data at the moment though - qt4/tests/check_strings.cpp | 37 +++++++++++++++++++++++++++++++++++++ - 1 files changed, 37 insertions(+), 0 deletions(-) + qt4/tests/check_strings.cpp | 37 +++++++++++++++++++++++++++++++++++++ + 1 file changed, 37 insertions(+) commit ffd227b7669895325d752009d5185973cf86ce5b Author: Pino Toscano -Date: Fri Sep 17 14:25:57 2010 +0200 +Date: Fri Sep 17 14:25:57 2010 +0200 [Qt4] optimize UnicodeParsedString using less memory from QString @@ -6415,24 +12672,24 @@ this should reduce of a very little bit the memory usage, while give a sensible speedup of UnicodeParsedString invocations - qt4/src/poppler-private.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + qt4/src/poppler-private.cc | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) commit 6180890008f2b1814f092f50b8f75376399905ba Author: Pino Toscano -Date: Fri Sep 17 13:23:25 2010 +0200 +Date: Fri Sep 17 13:23:25 2010 +0200 [Qt4/tests] check_strings: add a test case for UnicodeParsedString very simple test data for it, at the moment - qt4/tests/check_strings.cpp | 48 + qt4/tests/check_strings.cpp | 48 +++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 48 insertions(+), 0 deletions(-) + 1 file changed, 48 insertions(+) commit c5f78d7d3953d62a746c6f5a90085ea020fe5ec7 Author: Pino Toscano -Date: Fri Sep 17 12:54:32 2010 +0200 +Date: Fri Sep 17 12:54:32 2010 +0200 [Qt4/tests] check_string: use a pool of GooString @@ -6440,12 +12697,12 @@ run (eg in benchmarks), making sure they all are properly freed - qt4/tests/check_strings.cpp | 35 ++++++++++++++++++++++++++++++----- - 1 files changed, 30 insertions(+), 5 deletions(-) + qt4/tests/check_strings.cpp | 35 ++++++++++++++++++++++++++++++----- + 1 file changed, 30 insertions(+), 5 deletions(-) commit 0cd5a256bdf7778c0c720941a611ad8ab56fa2e9 Author: Pino Toscano -Date: Fri Sep 17 00:27:53 2010 +0200 +Date: Fri Sep 17 00:27:53 2010 +0200 [Qt4/tests] first version of a unit test for strings @@ -6459,73 +12716,73 @@ given private symbols are used, this unit test is not compiled on windows (at least, it supposed to be so) - qt4/tests/CMakeLists.txt | 3 + - qt4/tests/Makefile.am | 7 +++- - qt4/tests/check_strings.cpp | 101 + qt4/tests/CMakeLists.txt | 3 ++ + qt4/tests/Makefile.am | 7 ++- + qt4/tests/check_strings.cpp | 101 +++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 110 insertions(+), 1 deletions(-) + 3 files changed, 110 insertions(+), 1 deletion(-) commit c6e8b21c9829672e6ca42e6cdc0ca631a06af73f Author: Carlos Garcia Campos -Date: Fri Sep 17 13:44:38 2010 +0200 +Date: Fri Sep 17 13:44:38 2010 +0200 [glib] docs: Document PopplerDocument properties glib/poppler-document.cc | 380 +++++++++++++++++++++++++++------------------- - 1 files changed, 223 insertions(+), 157 deletions(-) + 1 file changed, 223 insertions(+), 157 deletions(-) commit d4a6c17255821925906c17b79b88eebed9edfee1 Author: Carlos Garcia Campos -Date: Fri Sep 17 13:04:33 2010 +0200 +Date: Fri Sep 17 13:04:33 2010 +0200 [glib] Add accessor for all PopplerDocument properties PopplerDocument:linearized is now a boolean value rather than string, so this commit breaks the API again. - glib/demo/info.cc | 8 +- - glib/poppler-document.cc | 532 + glib/demo/info.cc | 8 +- + glib/poppler-document.cc | 532 ++++++++++++++++++++++++++++------- - glib/poppler-document.h | 74 +++-- - glib/reference/poppler-sections.txt | 16 + + glib/poppler-document.h | 74 +++-- + glib/reference/poppler-sections.txt | 16 ++ 4 files changed, 498 insertions(+), 132 deletions(-) commit a5fec843dbb40fdd2007b926405b96789b21496d Author: Carlos Garcia Campos -Date: Fri Sep 17 10:38:14 2010 +0200 +Date: Fri Sep 17 10:38:14 2010 +0200 [glib-demo] Show permanent/update ID in document info demo - glib/demo/info.cc | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + glib/demo/info.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) commit bfaf8f3cc62f28c6255d42680b9464ab9973737e Author: Carlos Garcia Campos -Date: Fri Sep 17 10:37:32 2010 +0200 +Date: Fri Sep 17 10:37:32 2010 +0200 [glib] Add poppler_document_get_id() to get the PDF file identifier - glib/poppler-document.cc | 52 + glib/poppler-document.cc | 52 +++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 3 ++ - glib/reference/poppler-sections.txt | 1 + - 3 files changed, 56 insertions(+), 0 deletions(-) + glib/poppler-document.h | 3 ++ + glib/reference/poppler-sections.txt | 1 + + 3 files changed, 56 insertions(+) commit b15641677447b2e89853a667fc34bcca1383a97a Author: srinivas adicherla -Date: Fri Sep 17 10:36:22 2010 +0200 +Date: Fri Sep 17 10:36:22 2010 +0200 Add a method to get the PDF file identifier poppler/PDFDoc.cc | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PDFDoc.h | 3 ++ - 2 files changed, 68 insertions(+), 0 deletions(-) + poppler/PDFDoc.h | 3 +++ + 2 files changed, 68 insertions(+) commit 3b4a901a4431814590449b6cd5ea418f4d6c1172 Author: Albert Astals Cid -Date: Thu Sep 16 23:23:03 2010 +0100 +Date: Thu Sep 16 23:23:03 2010 +0100 Add -s option @@ -6534,55 +12791,55 @@ OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar Potdar (onkar@cdacmumbai.in) - utils/HtmlFonts.cc | 11 +++++- - utils/HtmlFonts.h | 18 +++++++++- + utils/HtmlFonts.cc | 11 +++++-- + utils/HtmlFonts.h | 18 +++++++++-- utils/HtmlOutputDev.cc | 84 - ++++++++++++++++++++++++++++++----------------- - utils/pdftohtml.1 | 3 ++ - utils/pdftohtml.cc | 15 +++++++-- + ++++++++++++++++++++++++++++++------------------ + utils/pdftohtml.1 | 3 ++ + utils/pdftohtml.cc | 15 +++++++-- 5 files changed, 93 insertions(+), 38 deletions(-) commit 2792330f6caeeb42e2996271456b562489215c4c Author: Albert Astals Cid -Date: Wed Sep 15 22:42:09 2010 +0100 +Date: Wed Sep 15 22:42:09 2010 +0100 new soversions - CMakeLists.txt | 2 +- - cpp/CMakeLists.txt | 2 +- - cpp/Makefile.am | 2 +- - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 4 ++-- - poppler/Makefile.am | 2 +- + CMakeLists.txt | 2 +- + cpp/CMakeLists.txt | 2 +- + cpp/Makefile.am | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 4 ++-- + poppler/Makefile.am | 2 +- qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- + qt4/src/Makefile.am | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) commit 1cf56c732b63d0a310bc45b8e4b3f3f357a42cb1 Author: Albert Astals Cid -Date: Wed Sep 15 20:56:42 2010 +0100 +Date: Wed Sep 15 20:56:42 2010 +0100 0.15.0 in the versions CMakeLists.txt | 2 +- - configure.ac | 2 +- - cpp/Doxyfile | 2 +- + configure.ac | 2 +- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) commit 4ec0be498b557c3cf631e43823c6d7004304dff3 Author: Albert Astals Cid -Date: Wed Sep 15 20:56:34 2010 +0100 +Date: Wed Sep 15 20:56:34 2010 +0100 0.15.0 NEWS NEWS | 90 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 90 insertions(+), 0 deletions(-) + 1 file changed, 90 insertions(+) commit c01a17745c04aef3e6f2225679c867a03e731e83 Author: Pino Toscano -Date: Thu Sep 16 20:55:56 2010 +0200 +Date: Thu Sep 16 20:55:56 2010 +0200 [CMake] disable the GObject introspection system @@ -6590,20 +12847,20 @@ it seems CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 9be7d3143b12f291409f88f3d725a239934b205e Author: Albert Astals Cid -Date: Wed Sep 15 19:19:30 2010 +0100 +Date: Wed Sep 15 19:19:30 2010 +0100 update copyright - poppler/OptionalContent.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/OptionalContent.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit b9333529bba43a71655fdbf1919ba515f7df9ca3 Author: Pino Toscano -Date: Wed Sep 15 17:23:54 2010 +0200 +Date: Wed Sep 15 17:23:54 2010 +0200 [cpp/tests] poppler-dump: convert out_ustring() to an operator<<(std::ostream&) @@ -6611,23 +12868,23 @@ so we have a chance to better output the bytearray of a string to the stream - cpp/tests/poppler-dump.cpp | 26 ++++++++++++++++++-------- - 1 files changed, 18 insertions(+), 8 deletions(-) + cpp/tests/poppler-dump.cpp | 26 ++++++++++++++++++-------- + 1 file changed, 18 insertions(+), 8 deletions(-) commit a44f711b4412332875337e9fb7509f18db806ddc Author: Pino Toscano -Date: Wed Sep 15 16:44:30 2010 +0200 +Date: Wed Sep 15 16:44:30 2010 +0200 [cpp/tests] poppler-dump: add a "--show-text " option ... to show the text of a page in the specified layout - cpp/tests/poppler-dump.cpp | 29 +++++++++++++++++++++++++++++ - 1 files changed, 29 insertions(+), 0 deletions(-) + cpp/tests/poppler-dump.cpp | 29 +++++++++++++++++++++++++++++ + 1 file changed, 29 insertions(+) commit 0094c9372b5b439af2564d83d6fb7439f4bdba88 Author: Pino Toscano -Date: Wed Sep 15 13:19:13 2010 +0200 +Date: Wed Sep 15 13:19:13 2010 +0200 [cpp] add a new page::text() for specifying a layout mode @@ -6643,45 +12900,45 @@ commit 4ec3e7784cdba5c0720b1992ba500e97a7e0ed2b Author: Carlos Garcia Campos -Date: Wed Sep 15 11:24:07 2010 +0200 +Date: Wed Sep 15 11:24:07 2010 +0200 Set initial state of optional content groups based on BaseState field There's a test case using BaseState attached to bug #30106 - poppler/OptionalContent.cc | 14 +++++++++----- - 1 files changed, 9 insertions(+), 5 deletions(-) + poppler/OptionalContent.cc | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) commit f49aa86812ed8ad91d41c675bc670b3d88d3444a Author: Carlos Garcia Campos -Date: Mon Sep 13 14:37:10 2010 +0200 +Date: Mon Sep 13 14:37:10 2010 +0200 [glib] doc: Document PopplerPage:label property glib/poppler-page.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit f41fe7ae6e374100574c49d1bb7a3ddc646786c8 Author: Carlos Garcia Campos -Date: Mon Sep 13 14:36:43 2010 +0200 +Date: Mon Sep 13 14:36:43 2010 +0200 [glib] doc: Add poppler_page_get_label to poppler-sections.txt - glib/reference/poppler-sections.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + glib/reference/poppler-sections.txt | 1 + + 1 file changed, 1 insertion(+) commit 91b8246766a8e5d9cca385b5854667d7967a9d71 Author: Carlos Garcia Campos -Date: Mon Sep 13 14:22:56 2010 +0200 +Date: Mon Sep 13 14:22:56 2010 +0200 [glib-demo] Use poppler_page_get_label() instead of g_object_get() glib/demo/page.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit b82412ef86091f4d249c818cebf00e4c59bae311 Author: Carlos Garcia Campos -Date: Mon Sep 13 14:22:03 2010 +0200 +Date: Mon Sep 13 14:22:03 2010 +0200 [glib] Add poppler_page_get_label() @@ -6694,18 +12951,18 @@ commit ff88abf61f4bf90ad276a8593be1818d39c8ecac Author: Carlos Garcia Campos -Date: Mon Sep 13 10:05:45 2010 +0200 +Date: Mon Sep 13 10:05:45 2010 +0200 [glib] Avoid core headers to be parsed by the g-i scanner glib/poppler-document.cc | 2 ++ - glib/poppler-page.cc | 2 ++ + glib/poppler-page.cc | 2 ++ glib/poppler-private.h | 3 +++ - 3 files changed, 7 insertions(+), 0 deletions(-) + 3 files changed, 7 insertions(+) commit 53324502898ae5fbbb21a4fb819e4a84acdc1a64 Author: Carlos Garcia Campos -Date: Sun Sep 12 11:42:03 2010 +0200 +Date: Sun Sep 12 11:42:03 2010 +0200 [glib] Fix a crash when building layer actions @@ -6713,34 +12970,34 @@ they don't have an optional content object. Fixes bug #30106. glib/poppler-action.cc | 15 +++++++++------ - 1 files changed, 9 insertions(+), 6 deletions(-) + 1 file changed, 9 insertions(+), 6 deletions(-) commit dfc6ea7877635212aa7c5f7ade07af4aa9467e96 Author: Carlos Garcia Campos -Date: Sun Sep 12 11:36:58 2010 +0200 +Date: Sun Sep 12 11:36:58 2010 +0200 [glib] Fix layers array generation when it contains multiple arrays Fixes layers for document attached to bug #30106. glib/poppler-document.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 7574912b6c0ff0421c69b6e8c6835957d5126d7d Author: Jonathan Liu -Date: Thu Sep 9 20:34:03 2010 +0100 +Date: Thu Sep 9 20:34:03 2010 +0100 Fix checking whether _WIN32 is defined Bug 29329 - poppler/StdinCachedFile.cc | 2 +- - utils/pdftoppm.cc | 2 +- + poppler/StdinCachedFile.cc | 2 +- + utils/pdftoppm.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 2fc83068c32e09fa3de03a157a420490431ea706 Author: Albert Astals Cid -Date: Sun Sep 5 14:26:27 2010 +0100 +Date: Sun Sep 5 14:26:27 2010 +0100 Increase the number of cached glyphs for small sizes @@ -6749,11 +13006,11 @@ in the firefox nytimes advertisment pdf splash/SplashFont.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit 0d96f74f31171c58a55e4ac36d492ce36dd5e7c5 Author: Albert Astals Cid -Date: Sun Sep 5 12:31:57 2010 +0100 +Date: Sun Sep 5 12:31:57 2010 +0100 Use std::sort instead of qsort @@ -6761,57 +13018,57 @@ Passes regression tests Based on Paweł Wiejacha patches - poppler/GfxFont.cc | 17 ++++++-------- - splash/SplashXPath.cc | 48 - +++++++++++++++++++++++++++-------------- - splash/SplashXPathScanner.cc | 10 +++++--- + poppler/GfxFont.cc | 17 ++++++--------- + splash/SplashXPath.cc | 48 + +++++++++++++++++++++++++++--------------- + splash/SplashXPathScanner.cc | 10 +++++---- 3 files changed, 44 insertions(+), 31 deletions(-) commit 3b4816b2b8caa0e2baafbe4c0eb1e45e452d01ce Author: Albert Astals Cid -Date: Wed Sep 1 20:43:35 2010 +0100 +Date: Wed Sep 1 20:43:35 2010 +0100 forgot the file - qt4/tests/poppler-texts.cpp | 40 + qt4/tests/poppler-texts.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 40 insertions(+), 0 deletions(-) + 1 file changed, 40 insertions(+) commit b0db93c71a83946aa3e02bae6b396223dcca19d1 Author: Albert Astals Cid -Date: Wed Sep 1 20:43:14 2010 +0100 +Date: Wed Sep 1 20:43:14 2010 +0100 add since and rename enum qt4/src/poppler-page.cc | 2 +- - qt4/src/poppler-qt4.h | 5 ++++- + qt4/src/poppler-qt4.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) commit a86f9d90be99a36c41c6932fb4d9a202c4ff6d05 Author: Albert Astals Cid -Date: Wed Sep 1 20:20:48 2010 +0100 +Date: Wed Sep 1 20:20:48 2010 +0100 Clarify the ownership qt4/src/poppler-qt4.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 33ad3a17ac26879fcd6a7fad2023dd219bc5919f Author: Suzuki Toshiya -Date: Wed Sep 1 20:19:54 2010 +0100 +Date: Wed Sep 1 20:19:54 2010 +0100 Add a way to access the raw text poppler/TextOutputDev.cc | 23 ++++++++++++++++++++--- qt4/src/poppler-page.cc | 11 +++++++++-- - qt4/src/poppler-qt4.h | 19 +++++++++++++++++++ + qt4/src/poppler-qt4.h | 19 +++++++++++++++++++ qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 7 ++++++- + qt4/tests/Makefile.am | 7 ++++++- 5 files changed, 55 insertions(+), 6 deletions(-) commit 46e89248b3c5b1789baa3bd9bfa012570720ddb5 Author: Albert Astals Cid -Date: Wed Sep 1 19:54:02 2010 +0100 +Date: Wed Sep 1 19:54:02 2010 +0100 quadding is not a GBool but an int @@ -6821,7 +13078,7 @@ commit ae79fc504c5424be2fa21dbc5498ced4db6e5dd3 Author: Albert Astals Cid -Date: Tue Aug 31 22:14:57 2010 +0100 +Date: Tue Aug 31 22:14:57 2010 +0100 Make GBool a bool instead of an int @@ -6829,167 +13086,167 @@ less memory cpp/tests/CMakeLists.txt | 2 +- - cpp/tests/Makefile.am | 2 +- - goo/gtypes.h | 7 +- - utils/CMakeLists.txt | 2 +- - utils/Makefile.am | 2 +- - utils/parseargs.c | 208 + cpp/tests/Makefile.am | 2 +- + goo/gtypes.h | 7 +- + utils/CMakeLists.txt | 2 +- + utils/Makefile.am | 2 +- + utils/parseargs.c | 208 ---------------------------------------------- - utils/parseargs.cc | 208 + utils/parseargs.cc | 208 ++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 216 insertions(+), 215 deletions(-) commit d3f32f2c4f9f46620c0287c44bef686f340461f3 Author: Albert Astals Cid -Date: Tue Aug 31 18:51:17 2010 +0100 +Date: Tue Aug 31 18:51:17 2010 +0100 Read from the correct variable Fixes crash on KDE bug 249586 poppler/Movie.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 681bb38eafc720b309172ed7c650439c559663a0 Author: Albert Astals Cid -Date: Thu Aug 26 23:55:58 2010 +0100 +Date: Thu Aug 26 23:55:58 2010 +0100 Make declaration match what there is in the .cc file poppler/TextOutputDev.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit c91e869304fc263c52f21ee484a57a6f1900f6b2 Author: Suzuki Toshiya -Date: Thu Aug 26 19:40:46 2010 +0100 +Date: Thu Aug 26 19:40:46 2010 +0100 Add -r option to pdftohtml Fixes bug 29551 - utils/pdftohtml.1 | 3 +++ - utils/pdftohtml.cc | 18 +++++++++++++----- + utils/pdftohtml.1 | 3 +++ + utils/pdftohtml.cc | 18 +++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) commit 9b4be586640b4ad344b1b3ed4c9cda8351257f0c Author: Albert Astals Cid -Date: Wed Aug 25 19:26:30 2010 +0100 +Date: Wed Aug 25 19:26:30 2010 +0100 Use 3 not nComps - poppler/GfxState.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/GfxState.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 218f67c527fb41babf2703ba068d072f8326e37b Author: Paweł Wiejacha -Date: Tue Aug 24 23:47:06 2010 +0100 +Date: Tue Aug 24 23:47:06 2010 +0100 Make SplashOutputDev::imageSrc faster By using getRGBLine when possible - poppler/SplashOutputDev.cc | 39 ++++++++++++++++++++++++++++++--------- - 1 files changed, 30 insertions(+), 9 deletions(-) + poppler/SplashOutputDev.cc | 39 ++++++++++++++++++++++++++++++--------- + 1 file changed, 30 insertions(+), 9 deletions(-) commit 868f4a1f22051b7978f47a0614f23fd66dbb7ca8 Author: Paweł Wiejacha -Date: Tue Aug 24 23:35:21 2010 +0100 +Date: Tue Aug 24 23:35:21 2010 +0100 Make GfxICCBasedColorSpace::getRGBLine faster By calling doTransform less - poppler/GfxState.cc | 15 +++++++-------- - poppler/GfxState.h | 4 +++- + poppler/GfxState.cc | 15 +++++++-------- + poppler/GfxState.h | 4 +++- 2 files changed, 10 insertions(+), 9 deletions(-) commit 46e37c54c6365cf37dc1e223a3c146e7b96a56af Author: Paweł Wiejacha -Date: Tue Aug 24 21:23:34 2010 +0100 +Date: Tue Aug 24 21:23:34 2010 +0100 Do not call pow three times when one is enough - poppler/GfxState.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + poppler/GfxState.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) commit 8591c804598576556c6d24a66b6648de8ed1c4eb Author: Mike Slegeir -Date: Sun Aug 22 22:01:03 2010 +0100 +Date: Sun Aug 22 22:01:03 2010 +0100 Use splash instead of external gs invocation to render the background Patch in bug 19404, should fix 9746 too - utils/pdftohtml.1 | 8 ++- + utils/pdftohtml.1 | 8 +- utils/pdftohtml.cc | 210 +++++++++++++++++++++++++++++++++++++--------------- 2 files changed, 158 insertions(+), 60 deletions(-) commit 7fc3c21a8c5d6cf8517100427b182887a9569ed0 Author: Ilya Gorenbein -Date: Fri Aug 20 20:24:31 2010 +0100 +Date: Fri Aug 20 20:24:31 2010 +0100 Fix failure to parse PDF with damaged internal structure Patch in bug 29189, fixes bug 3870 - poppler/PDFDoc.cc | 24 ++++++++++++--- + poppler/PDFDoc.cc | 24 ++++++++++++---- poppler/XRef.cc | 80 - ++++++++++++++++++++++++++++++---------------------- - poppler/XRef.h | 5 ++- + ++++++++++++++++++++++++++++++----------------------- + poppler/XRef.h | 5 ++-- 3 files changed, 68 insertions(+), 41 deletions(-) commit bedf48d4397ae412a6d28fc8fea16cc23a29f07c Author: Albert Astals Cid -Date: Tue Aug 17 22:02:59 2010 +0100 +Date: Tue Aug 17 22:02:59 2010 +0100 use memset instead of a for splash/Splash.cc | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) + 1 file changed, 1 insertion(+), 3 deletions(-) commit 03ca5b4a5c9964d9c0e9913eb2061692848c4b95 Author: Albert Astals Cid -Date: Tue Aug 10 19:55:31 2010 +0100 +Date: Tue Aug 10 19:55:31 2010 +0100 Update copyrights - goo/GooTimer.cc | 1 + - goo/GooTimer.h | 1 + - goo/gfile.cc | 2 +- - poppler/DCTStream.cc | 1 + - poppler/DCTStream.h | 1 + - poppler/GfxState.cc | 2 +- - poppler/Page.cc | 2 +- + goo/GooTimer.cc | 1 + + goo/GooTimer.h | 1 + + goo/gfile.cc | 2 +- + poppler/DCTStream.cc | 1 + + poppler/DCTStream.h | 1 + + poppler/GfxState.cc | 2 +- + poppler/Page.cc | 2 +- qt4/src/poppler-annotation.cc | 2 +- 8 files changed, 8 insertions(+), 4 deletions(-) commit 3bca8ddc10bf4291bf0c0e39c67341a05953e949 Author: Jonathan Liu -Date: Tue Aug 10 19:42:40 2010 +0100 +Date: Tue Aug 10 19:42:40 2010 +0100 Tell windows we are writing/reading binary data Bug #29329 - poppler/StdinCachedFile.cc | 9 +++++++++ - utils/pdftoppm.cc | 9 +++++++++ - 2 files changed, 18 insertions(+), 0 deletions(-) + poppler/StdinCachedFile.cc | 9 +++++++++ + utils/pdftoppm.cc | 9 +++++++++ + 2 files changed, 18 insertions(+) commit bdd617f2177a7836f6b6686fde892664513a32a7 Author: Carlos Garcia Campos -Date: Tue Aug 3 13:05:26 2010 +0200 +Date: Tue Aug 3 13:05:26 2010 +0200 [glib] Fix a crash when a layer doesn't have a name Fixes bug #28842. glib/poppler-layer.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit e9f0646ca664cc27825f7e084f8419fe0de1fcfc Author: Carlos Garcia Campos -Date: Tue Aug 3 13:02:52 2010 +0200 +Date: Tue Aug 3 13:02:52 2010 +0200 Catalog page array might contain NULL for some pages in invalid documents @@ -6998,35 +13255,35 @@ attached to bug #28842. poppler/PDFDoc.cc | 27 +++++++++++++++------------ - 1 files changed, 15 insertions(+), 12 deletions(-) + 1 file changed, 15 insertions(+), 12 deletions(-) commit 842209782ca3ba8c1c783cccf565372a18b3fda5 Author: Albert Astals Cid -Date: Fri Jul 30 19:29:12 2010 +0100 +Date: Fri Jul 30 19:29:12 2010 +0100 Do not crash when using pdftops in some files Fixes crash in file in kde bug 246269. The output is still wrong though - fofi/FoFiType1C.cc | 12 +++++++----- - 1 files changed, 7 insertions(+), 5 deletions(-) + fofi/FoFiType1C.cc | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) commit 0dd7c80b7baf2622eb4780a867c4dc6291773f3b Author: Albert Astals Cid -Date: Mon Jul 26 23:58:26 2010 +0100 +Date: Mon Jul 26 23:58:26 2010 +0100 Do not overwrite the rgb values Recommended by Koji Otani in Re: [poppler] Question about code Passed the regression testing in my files - poppler/GfxState.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + poppler/GfxState.cc | 1 - + 1 file changed, 1 deletion(-) commit 627edf88c8f5c073a68bd05990df56e1af547292 Author: Carlos Garcia Campos -Date: Sun Jul 25 13:56:03 2010 +0200 +Date: Sun Jul 25 13:56:03 2010 +0200 [annots] Fix a crash when adding a new annotation and annots object is an array @@ -7036,20 +13293,20 @@ actually de page object. poppler/Page.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 5d86f9b600b1e10de93bcaf1b925fadbc2a47522 Author: mpsuzuki -Date: Sat Jul 24 15:12:05 2010 +0100 +Date: Sat Jul 24 15:12:05 2010 +0100 reindent correctly poppler/TextOutputDev.cc | 34 +++++++++++++++++----------------- - 1 files changed, 17 insertions(+), 17 deletions(-) + 1 file changed, 17 insertions(+), 17 deletions(-) commit d0a6f9abdab88ec43004b6766337db304cbf6a25 Author: Pino Toscano -Date: Thu Jul 22 21:28:55 2010 +0200 +Date: Thu Jul 22 21:28:55 2010 +0200 [CMake] improve the way include dirs and cflags for gdk and gtk are set @@ -7057,65 +13314,65 @@ correctly include_directories() for the include dirs, while add the cflags which are not include dirs as definitions - glib/CMakeLists.txt | 5 +++-- + glib/CMakeLists.txt | 5 +++-- glib/demo/CMakeLists.txt | 5 ++++- 2 files changed, 7 insertions(+), 3 deletions(-) commit 02d85dd2cc154dbb6caa04a349532033d833edd1 Author: Carlos Garcia Campos -Date: Tue Jul 20 13:53:56 2010 +0200 +Date: Tue Jul 20 13:53:56 2010 +0200 [glib-demo] Add support for adding annots in annot demo glib/demo/annots.c | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 114 insertions(+), 0 deletions(-) + 1 file changed, 114 insertions(+) commit 969cb850f5c2bc31de82c591b2b3210b5cfabf5f Author: Carlos Garcia Campos -Date: Tue Jul 20 13:53:29 2010 +0200 +Date: Tue Jul 20 13:53:29 2010 +0200 [glib] docs: Add new symbols to poppler-sections.txt - glib/reference/poppler-sections.txt | 18 ++++++++++++++++++ - 1 files changed, 18 insertions(+), 0 deletions(-) + glib/reference/poppler-sections.txt | 18 ++++++++++++++++++ + 1 file changed, 18 insertions(+) commit 251959438b6257fe71ed58e79eec60cda68a66cf Author: Carlos Garcia Campos -Date: Tue Jul 20 13:53:00 2010 +0200 +Date: Tue Jul 20 13:53:00 2010 +0200 [glib] Add poppler_page_add_annot() glib/poppler-document.cc | 7 ++++--- - glib/poppler-page.cc | 19 +++++++++++++++++++ - glib/poppler-page.h | 2 ++ + glib/poppler-page.cc | 19 +++++++++++++++++++ + glib/poppler-page.h | 2 ++ 3 files changed, 25 insertions(+), 3 deletions(-) commit 78a4f6976e708f2cc23aac49fbff0faf00e74bc3 Author: Carlos Garcia Campos -Date: Tue Jul 20 13:51:16 2010 +0200 +Date: Tue Jul 20 13:51:16 2010 +0200 [glib] annots: Add several setter methods - glib/poppler-annot.cc | 278 + glib/poppler-annot.cc | 278 +++++++++++++++++++++++++++++++++++++++++++----- - glib/poppler-annot.h | 26 +++++ - glib/poppler-private.h | 6 + + glib/poppler-annot.h | 26 +++++ + glib/poppler-private.h | 6 ++ 3 files changed, 285 insertions(+), 25 deletions(-) commit fee488c9db60ab691ce9ff5eef284be2af897aee Author: Carlos Garcia Campos -Date: Sun Jul 18 11:26:59 2010 +0200 +Date: Sun Jul 18 11:26:59 2010 +0200 [annots] Add AnnotMarkup::setOpacity poppler/Annot.cc | 8 ++++++++ poppler/Annot.h | 1 + - 2 files changed, 9 insertions(+), 0 deletions(-) + 2 files changed, 9 insertions(+) commit d15a355ede2d8510c4df847ea0b92b5357b29914 Author: Carlos Garcia Campos -Date: Sun Jul 18 09:57:35 2010 +0200 +Date: Sun Jul 18 09:57:35 2010 +0200 Set the page reference (P in annot dict) when adding a new annot to a page @@ -7123,48 +13380,48 @@ poppler/Annot.cc | 9 +++++++++ poppler/Annot.h | 3 +++ poppler/Page.cc | 2 ++ - 3 files changed, 14 insertions(+), 0 deletions(-) + 3 files changed, 14 insertions(+) commit 49ffb46db3118db874d2d9830bb034762d625c61 Author: Albert Astals Cid -Date: Mon Jul 19 16:31:54 2010 +0100 +Date: Mon Jul 19 16:31:54 2010 +0100 Remove exception support We don't use it and don't even support it properly - CMakeLists.txt | 1 - - config.h.cmake | 3 -- - configure.ac | 4 --- - goo/gmem.cc | 56 - +++++++++++---------------------------- - goo/gmem.h | 38 ++++++++------------------- - poppler/poppler-config.h.cmake | 5 --- - poppler/poppler-config.h.in | 5 --- + CMakeLists.txt | 1 - + config.h.cmake | 3 --- + configure.ac | 4 --- + goo/gmem.cc | 56 + ++++++++++++---------------------------- + goo/gmem.h | 38 ++++++++------------------- + poppler/poppler-config.h.cmake | 5 ---- + poppler/poppler-config.h.in | 5 ---- 7 files changed, 27 insertions(+), 85 deletions(-) commit dd2e9399868e3dbf2fa4ede050f8d74d29ebbbb4 Author: Albert Astals Cid -Date: Mon Jul 19 16:31:43 2010 +0100 +Date: Mon Jul 19 16:31:43 2010 +0100 add uninstalled.pc to ignore - .gitignore | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + .gitignore | 7 +++++++ + 1 file changed, 7 insertions(+) commit d1033006aae381a0f075e02d54638a1af997caf3 Author: Pino Toscano -Date: Sat Jul 17 21:46:14 2010 +0200 +Date: Sat Jul 17 21:46:14 2010 +0200 add FindGObjectIntrospection.cmake and GObjectIntrospectionMacros.cmake to the dist - Makefile.am | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) commit ce8d03950736cc35d035a44a7d88e5f2a9defa74 Author: Pino Toscano -Date: Sat Jul 17 21:39:08 2010 +0200 +Date: Sat Jul 17 21:39:08 2010 +0200 [CMake/glib] add support for gobject-introspection @@ -7179,16 +13436,16 @@ by ALL, which have the gir and the typelib files as dependencies, to make them build with the usual `make all'. - CMakeLists.txt | 5 +- - cmake/modules/FindGObjectIntrospection.cmake | 61 +++++++++++++++ + CMakeLists.txt | 5 +- + cmake/modules/FindGObjectIntrospection.cmake | 61 +++++++++++++++ cmake/modules/GObjectIntrospectionMacros.cmake | 94 ++++++++++++++++++++++++ - glib/CMakeLists.txt | 36 +++++++++ + glib/CMakeLists.txt | 36 +++++++++ 4 files changed, 194 insertions(+), 2 deletions(-) commit 78bf43d8e11aa52db9862af118c597e117d31083 Author: Pino Toscano -Date: Sat Jul 17 20:28:58 2010 +0200 +Date: Sat Jul 17 20:28:58 2010 +0200 [CMake] properly use the glib2 include dirs @@ -7197,59 +13454,59 @@ while turn GLIB2_CFLAGS into GLIB2_CFLAGS_OTHERS to add the remaining CFLAGS as definitions - glib/CMakeLists.txt | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + glib/CMakeLists.txt | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) commit 6f3082d677bc62aa3f8124132e3e337c01be2629 Author: Pino Toscano -Date: Sat Jul 17 19:28:09 2010 +0200 +Date: Sat Jul 17 19:28:09 2010 +0200 [CMake] split the generated sources of poppler_glib_SRCS in an own poppler_glib_generated_SRCS - glib/CMakeLists.txt | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + glib/CMakeLists.txt | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) commit 2a252dd9b05857bbd10dee235e873886fc74ec17 Author: Pino Toscano -Date: Sat Jul 17 14:57:38 2010 +0200 +Date: Sat Jul 17 14:57:38 2010 +0200 [CMake] add stub message and TODO for the gobject-introspection support CMakeLists.txt | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 8a3d1794a8ef5d525bb454755fec018e3fcb3816 Author: Albert Astals Cid -Date: Fri Jul 16 14:00:32 2010 +0100 +Date: Fri Jul 16 14:00:32 2010 +0100 update TODO | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 31ac578942b82cbd16b064abca586ccb89dfa7ce Author: Carlos Garcia Campos -Date: Thu Jul 15 15:05:10 2010 +0200 +Date: Thu Jul 15 15:05:10 2010 +0200 Rework ChangeLog generation to fix make distcheck - Makefile.am | 22 +++++++++++++++++++--- - 1 files changed, 19 insertions(+), 3 deletions(-) + Makefile.am | 22 +++++++++++++++++++--- + 1 file changed, 19 insertions(+), 3 deletions(-) commit 5da5825ecab63089a19aac694826271019a94e6d Author: Carlos Garcia Campos -Date: Thu Jul 15 15:03:20 2010 +0200 +Date: Thu Jul 15 15:03:20 2010 +0200 [glib] docs: Add version.xml to content_files var - glib/reference/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + glib/reference/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit fe69b474ae63c9d5d2538db9e51e666dd6ea9fb3 Author: Albert Astals Cid -Date: Thu Jul 15 10:51:21 2010 +0100 +Date: Thu Jul 15 10:51:21 2010 +0100 Fix padding of names @@ -7258,28 +13515,28 @@ characters, not 2 utils/pdftoppm.cc | 14 +++++++++++++- - 1 files changed, 13 insertions(+), 1 deletions(-) + 1 file changed, 13 insertions(+), 1 deletion(-) commit e265ae2d8a46df00ab1bbd863f01f652068d265f Author: Brian Cameron -Date: Wed Jul 14 20:26:25 2010 +0100 +Date: Wed Jul 14 20:26:25 2010 +0100 Add uninstalled .pc file for poppler when using autoconf - Makefile.am | 9 ++++++++- - configure.ac | 9 ++++++++- + Makefile.am | 9 ++++++++- + configure.ac | 9 ++++++++- poppler-cairo-uninstalled.pc.in | 6 ++++++ - poppler-cpp-uninstalled.pc.in | 7 +++++++ + poppler-cpp-uninstalled.pc.in | 7 +++++++ poppler-glib-uninstalled.pc.in | 7 +++++++ - poppler-qt-uninstalled.pc.in | 7 +++++++ - poppler-qt4-uninstalled.pc.in | 7 +++++++ + poppler-qt-uninstalled.pc.in | 7 +++++++ + poppler-qt4-uninstalled.pc.in | 7 +++++++ poppler-splash-uninstalled.pc.in | 7 +++++++ - poppler-uninstalled.pc.in | 6 ++++++ + poppler-uninstalled.pc.in | 6 ++++++ 9 files changed, 63 insertions(+), 2 deletions(-) commit 552ab99e60fe4068be8e4e415924e4be289e47cd Author: Carlos Garcia Campos -Date: Tue Jul 13 10:18:01 2010 +0200 +Date: Tue Jul 13 10:18:01 2010 +0200 Handle ColorTransform in DCT streams when using libjpeg @@ -7287,22 +13544,22 @@ poppler/DCTStream.cc | 30 ++++++++++++++++++++++++++++++ poppler/DCTStream.h | 1 + - 2 files changed, 31 insertions(+), 0 deletions(-) + 2 files changed, 31 insertions(+) commit 8a6697f89625106f3c373dbc7b4dc521e22502f7 Author: Hib Eris -Date: Sat Jul 3 16:42:04 2010 +0200 +Date: Sat Jul 3 16:42:04 2010 +0200 Only define findModifier() when used Prevents a warning when building with win32 font backend. poppler/GlobalParams.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit b1fdb87a4ebb5079c731256cce1870de8c54c65d Author: Hib Eris -Date: Fri Jul 2 10:53:20 2010 +0200 +Date: Fri Jul 2 10:53:20 2010 +0200 Fix compile warnings on auto imports for mingw compiler @@ -7317,7 +13574,7 @@ commit 9e577110134eb1e093e697b7504efca759000086 Author: Hib Eris -Date: Fri Jul 2 10:51:24 2010 +0200 +Date: Fri Jul 2 10:51:24 2010 +0200 Check for declaration of gettimeofday() @@ -7330,11 +13587,11 @@ gettimeofday() is used. configure.ac | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit 58c8430ac584f3ba5e97aceb148e6287bfc45f95 Author: Hib Eris -Date: Wed Jun 30 15:06:44 2010 +0200 +Date: Wed Jun 30 15:06:44 2010 +0200 Set -ansi compiler flag early in configure.ac @@ -7347,11 +13604,11 @@ flag is set. configure.ac | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) commit e3663a855a9c86f0a3988a7a50fa40d37d0ea069 Author: Hib Eris -Date: Fri Jul 2 14:45:15 2010 +0200 +Date: Fri Jul 2 14:45:15 2010 +0200 Use MAX_PATH instead of _MAX_PATH everywhere @@ -7360,14 +13617,14 @@ in ansi mode. MAX_PATH is in the Windows api and thus always available when windows.h is included. - goo/gfile.cc | 4 ++-- + goo/gfile.cc | 4 ++-- poppler/GlobalParams.cc | 2 +- - poppler/PDFDoc.cc | 4 ++-- + poppler/PDFDoc.cc | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) commit 7227c407d23a37f5d95e6c01cb7411be2f82ca85 Author: Hib Eris -Date: Wed Jun 30 16:15:06 2010 +0200 +Date: Wed Jun 30 16:15:06 2010 +0200 Check for _WIN32 instead of _MSC_VER @@ -7377,7 +13634,7 @@ commit 34e727e011529be312313a1f4d4fa1ba9c545888 Author: Hib Eris -Date: Tue Jun 29 16:43:31 2010 +0200 +Date: Tue Jun 29 16:43:31 2010 +0200 Fix cross compiling for Windows with autotools @@ -7386,41 +13643,41 @@ poppler-optcontent.lo. Thus, explicitly using poppler-optcontent.lo to create poppler-optcontent.moc does not work well. - qt4/src/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + qt4/src/Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1bc2f4501ea4e56ca99ae4d94d6cf34cf33c2c7a Author: Hib Eris -Date: Tue Jun 29 15:34:22 2010 +0200 +Date: Tue Jun 29 15:34:22 2010 +0200 define poppler_qt4_EXPORTS when building with autotools Lets you build the qt4 bindings for Windows with automake/autoconf. - qt4/src/Makefile.am | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + qt4/src/Makefile.am | 3 +++ + 1 file changed, 3 insertions(+) commit 5825114a26cc6eece2e556063f640dda53ea1e11 Author: Albert Astals Cid -Date: Sun Jul 11 12:24:20 2010 +0100 +Date: Sun Jul 11 12:24:20 2010 +0100 Compile++ glib/demo/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 5e4d8eeea0b9dba68420c164975418c76a53be85 Author: Carlos Garcia Campos -Date: Sat Jul 10 15:54:28 2010 +0200 +Date: Sat Jul 10 15:54:28 2010 +0200 [pdf-inspector] Do not render for printing test/pdf-inspector.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit e6824972a213a888ca0185b7ae0a75fc23f75797 Author: Carlos Garcia Campos -Date: Sat Jul 10 15:52:15 2010 +0200 +Date: Sat Jul 10 15:52:15 2010 +0200 [annots] Use a transparency group for markup annots without AP and opacity != 1 @@ -7430,13 +13687,13 @@ poppler/Annot.cc | 346 +++++++++++++++++++++++++----------------------------- poppler/Annot.h | 3 + - poppler/Gfx.cc | 9 +-- - poppler/Gfx.h | 2 +- + poppler/Gfx.cc | 9 +- + poppler/Gfx.h | 2 +- 4 files changed, 165 insertions(+), 195 deletions(-) commit 70ce0b6ea1a0d61f5048d2ae49c639d74a643b29 Author: Carlos Garcia Campos -Date: Fri Jul 9 17:04:00 2010 +0200 +Date: Fri Jul 9 17:04:00 2010 +0200 [annots] Clamp QuadPoints coords to annot rectangle instead of ignore points @@ -7445,20 +13702,20 @@ #623616. poppler/Annot.cc | 38 +++++++++++++++++++++----------------- - 1 files changed, 21 insertions(+), 17 deletions(-) + 1 file changed, 21 insertions(+), 17 deletions(-) commit 8a9e561bfe64f71e9f38c43e5c6be7e5069b2349 Author: Hib Eris -Date: Fri Jul 2 21:07:53 2010 +0200 +Date: Fri Jul 2 21:07:53 2010 +0200 Nicer autogen.sh output - autogen.sh | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + autogen.sh | 1 + + 1 file changed, 1 insertion(+) commit ce4d328294cea73f4b7368691dc1fed6bd45d569 Author: Hib Eris -Date: Fri Jul 2 20:51:47 2010 +0200 +Date: Fri Jul 2 20:51:47 2010 +0200 Add option for autogen.sh to skip configure @@ -7469,75 +13726,75 @@ This feature is modeled after gnome-autogen.sh behaviour. - autogen.sh | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + autogen.sh | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) commit d7ee87c5d0a35c8d4fcc88bde4b8496c49f397c6 Author: Hib Eris -Date: Tue Jul 6 15:16:08 2010 +0100 +Date: Tue Jul 6 15:16:08 2010 +0100 warnings-=2 - poppler/GfxFont.cc | 3 ++- + poppler/GfxFont.cc | 3 ++- utils/HtmlOutputDev.cc | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) commit 1e7f457ca1617fd8c958feef8dd7e694476dedd9 Author: Carlos Garcia Campos -Date: Fri Jul 9 12:29:14 2010 +0200 +Date: Fri Jul 9 12:29:14 2010 +0200 [cairo] Use ceil to convert double to int in tilingPatternFill() Fixes rendering of page 2 of document attached to bug #28954. - poppler/CairoOutputDev.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + poppler/CairoOutputDev.cc | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) commit 91a7605eb51144f2e7dea69aa9454fff47c49bd2 Author: Carlos Garcia Campos -Date: Fri Jul 9 11:42:56 2010 +0200 +Date: Fri Jul 9 11:42:56 2010 +0200 [glib] Fix build when GDK is enabled - glib/test-poppler-glib.cc | 8 +------- - 1 files changed, 1 insertions(+), 7 deletions(-) + glib/test-poppler-glib.cc | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) commit 09e3e0e9c5134688c4ed2af5cd3a12aa2986474c Author: Carlos Garcia Campos -Date: Thu Jul 8 18:56:38 2010 +0200 +Date: Thu Jul 8 18:56:38 2010 +0200 [glib] Fix poppler_page_find_tex() when called more than once Fixes bug #27927 glib/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 25427bdecb219ffe6f0592d2ac36de60c247bfd9 Author: Carlos Garcia Campos -Date: Thu Jul 8 17:46:22 2010 +0200 +Date: Thu Jul 8 17:46:22 2010 +0200 Fix build when compiling without glib frontend configure.ac | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 550684731356a66753ec19f5a8ca4b572db6d2d5 Author: Carlos Garcia Campos -Date: Thu Jul 8 17:16:02 2010 +0200 +Date: Thu Jul 8 17:16:02 2010 +0200 [glib-demo] Add selections demo - glib/demo/Makefile.am | 2 + - glib/demo/main.c | 4 +- + glib/demo/Makefile.am | 2 + + glib/demo/main.c | 4 +- glib/demo/selections.c | 687 ++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/selections.h | 31 +++ - 4 files changed, 723 insertions(+), 1 deletions(-) + 4 files changed, 723 insertions(+), 1 deletion(-) commit b257428150e2c13dcc24fd8f75e4ee2c679ab414 Author: Carlos Garcia Campos -Date: Thu Jul 8 14:45:29 2010 +0200 +Date: Thu Jul 8 14:45:29 2010 +0200 [glib] Add poppler_page_get_selected_text() @@ -7555,135 +13812,135 @@ anymore before calling the method. - glib/demo/text.c | 9 +------ - glib/poppler-page.cc | 43 + glib/demo/text.c | 9 +------- + glib/poppler-page.cc | 43 ++++++++++++++++++++++++++--------- - glib/poppler-page.h | 3 +- - glib/reference/poppler-sections.txt | 1 + + glib/poppler-page.h | 3 ++- + glib/reference/poppler-sections.txt | 1 + 4 files changed, 36 insertions(+), 20 deletions(-) commit bedc88225c948ad1288b69c6c106adce36233442 Author: Carlos Garcia Campos -Date: Wed Jul 7 11:55:47 2010 +0200 +Date: Wed Jul 7 11:55:47 2010 +0200 [cairo] Fix warning on signed/unsigned comparison - poppler/CairoFontEngine.cc | 12 ++++++------ - poppler/CairoFontEngine.h | 8 ++++---- + poppler/CairoFontEngine.cc | 12 ++++++------ + poppler/CairoFontEngine.h | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) commit 092aa901b9ec35a48bc1fb229ad16a3b00eef5f2 Author: Carlos Garcia Campos -Date: Mon Jul 5 11:16:49 2010 +0200 +Date: Mon Jul 5 11:16:49 2010 +0200 [glib] docs: add some more introspection annotations - glib/poppler-attachment.cc | 4 ++-- - glib/poppler-document.cc | 12 ++++++------ - glib/poppler-media.cc | 4 ++-- - glib/poppler-page.cc | 4 ++-- + glib/poppler-attachment.cc | 4 ++-- + glib/poppler-document.cc | 12 ++++++------ + glib/poppler-media.cc | 4 ++-- + glib/poppler-page.cc | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) commit 6c4e14fd90d5ef2d6670a980ab2476b6fab58df7 Author: Carlos Garcia Campos -Date: Mon Jul 5 10:49:59 2010 +0200 +Date: Mon Jul 5 10:49:59 2010 +0200 [glib] docs: fix POPPLER_CHECK_VERSION() docs - glib/poppler-features.h.in | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + glib/poppler-features.h.in | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) commit ed324a867ecf1f616c4b2dc575f01d5cf1b67c38 Author: Carlos Garcia Campos -Date: Fri Jul 2 18:28:45 2010 +0200 +Date: Fri Jul 2 18:28:45 2010 +0200 [glib] Rename instrospection files as 0.16 instead of 0.14 glib/Makefile.am | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) + 1 file changed, 7 insertions(+), 7 deletions(-) commit a55f567ff1ea0858eda13a024ed765a016f3bff0 Author: Carlos Garcia Campos -Date: Fri Jul 2 18:23:03 2010 +0200 +Date: Fri Jul 2 18:23:03 2010 +0200 [glib] docs: Remove unneeded empty line in doc comment - glib/poppler-features.h.in | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + glib/poppler-features.h.in | 1 - + 1 file changed, 1 deletion(-) commit f16015303422280eaa21c3144eca0f1a330dce8a Author: Carlos Garcia Campos -Date: Fri Jul 2 18:19:13 2010 +0200 +Date: Fri Jul 2 18:19:13 2010 +0200 [glib] docs: Add GObject introspection annotations - glib/poppler-annot.cc | 45 - ++++++++++++++++++------------------- - glib/poppler-document.cc | 8 +++--- - glib/poppler-page.cc | 23 ++++++++++++------ - glib/reference/poppler-docs.sgml | 2 + + glib/poppler-annot.cc | 45 + +++++++++++++++++++------------------- + glib/poppler-document.cc | 8 +++---- + glib/poppler-page.cc | 23 ++++++++++++------- + glib/reference/poppler-docs.sgml | 2 ++ 4 files changed, 43 insertions(+), 35 deletions(-) commit 60242038e4dce7f0c90f2bfa0e771120247dbc9d Author: Carlos Garcia Campos -Date: Wed Jun 30 09:35:29 2010 +0200 +Date: Wed Jun 30 09:35:29 2010 +0200 [glib] Add GObject introspection support - configure.ac | 5 +++ - glib/Makefile.am | 29 ++++++++++++++++ - m4/introspection.m4 | 94 + configure.ac | 5 +++ + glib/Makefile.am | 29 ++++++++++++++++ + m4/introspection.m4 | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 128 insertions(+), 0 deletions(-) + 3 files changed, 128 insertions(+) commit 3160950a7d7161457405c9084c31af230329b3f0 Author: Carlos Garcia Campos -Date: Fri Jul 2 12:47:04 2010 +0200 +Date: Fri Jul 2 12:47:04 2010 +0200 [glib] docs: Add index of deprecated symbols glib/reference/poppler-docs.sgml | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 593db7acf6edce1267f69d12310bf4098ff24c97 Author: Carlos Garcia Campos -Date: Fri Jul 2 12:44:39 2010 +0200 +Date: Fri Jul 2 12:44:39 2010 +0200 [glib] docs: deprecate GDK API glib/poppler-page.cc | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) + 1 file changed, 8 insertions(+) commit 6facefb3fa8f97a9d330545308fb2d89c7f57fa0 Author: Carlos Garcia Campos -Date: Thu Jul 1 18:01:45 2010 +0200 +Date: Thu Jul 1 18:01:45 2010 +0200 [glib] docs: Add index of new symbols for versions 0.12, 0.14 and 0.16 - glib/poppler-action.h | 10 +++++++--- - glib/poppler-annot.cc | 17 +++++++++++++++++ - glib/poppler-date.cc | 2 ++ - glib/poppler-document.cc | 16 +++++++++++++++- - glib/poppler-layer.cc | 12 ++++++++++++ - glib/poppler-media.cc | 14 ++++++++++++-- - glib/poppler-media.h | 3 +++ - glib/poppler-movie.cc | 6 ++++++ - glib/poppler-page.cc | 2 ++ + glib/poppler-action.h | 10 +++++++--- + glib/poppler-annot.cc | 17 +++++++++++++++++ + glib/poppler-date.cc | 2 ++ + glib/poppler-document.cc | 16 +++++++++++++++- + glib/poppler-layer.cc | 12 ++++++++++++ + glib/poppler-media.cc | 14 ++++++++++++-- + glib/poppler-media.h | 3 +++ + glib/poppler-movie.cc | 6 ++++++ + glib/poppler-page.cc | 2 ++ glib/reference/poppler-docs.sgml | 12 ++++++++++++ 10 files changed, 88 insertions(+), 6 deletions(-) commit 166b78c0ce8a4536873c4f60b392c24c8a68e7aa Author: Carlos Garcia Campos -Date: Thu Jul 1 17:25:03 2010 +0200 +Date: Thu Jul 1 17:25:03 2010 +0200 [glib] docs: document PopplerMediaSaveFunc glib/poppler-media.h | 18 +++++++++++++++++- - 1 files changed, 17 insertions(+), 1 deletions(-) + 1 file changed, 17 insertions(+), 1 deletion(-) commit 5cc0a51f88580c65ac2d5c6ff02b8cf14697b70c Author: Carlos Garcia Campos -Date: Thu Jul 1 17:20:13 2010 +0200 +Date: Thu Jul 1 17:20:13 2010 +0200 [glib] Use the same name for parameter in function prototype @@ -7693,132 +13950,132 @@ commit 6793fd8fd2d33d3d58c6556b5dbe6d0497e56646 Author: Carlos Garcia Campos -Date: Thu Jul 1 15:49:49 2010 +0200 +Date: Thu Jul 1 15:49:49 2010 +0200 [glib] docs: document some enums in poppler-action glib/poppler-action.h | 92 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 92 insertions(+), 0 deletions(-) + 1 file changed, 92 insertions(+) commit 8e139696dbe19f54ad54364a711b929146f11080 Author: Carlos Garcia Campos -Date: Thu Jul 1 15:02:58 2010 +0200 +Date: Thu Jul 1 15:02:58 2010 +0200 [glib] docs: mark structures in poppler-private.h as private glib/poppler-private.h | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit ccae7e574047d66c638003cc36fa1edeef4d35ed Author: Carlos Garcia Campos -Date: Thu Jul 1 14:59:50 2010 +0200 +Date: Thu Jul 1 14:59:50 2010 +0200 [glib] docs: document PopplerDocument enums glib/poppler-document.h | 65 +++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 65 insertions(+), 0 deletions(-) + 1 file changed, 65 insertions(+) commit 4fbff172693c38cdc4ae8070a55ceb706aa213cd Author: Carlos Garcia Campos -Date: Thu Jul 1 14:26:53 2010 +0200 +Date: Thu Jul 1 14:26:53 2010 +0200 [glib] docs: document PopplerFontInfo glib/poppler-document.cc | 106 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 106 insertions(+), 0 deletions(-) + 1 file changed, 106 insertions(+) commit 465dd4897ff603a6fd96503cf4746fc808b0f827 Author: Carlos Garcia Campos -Date: Thu Jul 1 12:59:39 2010 +0200 +Date: Thu Jul 1 12:59:39 2010 +0200 [glib] docs: document some enums glib/poppler.h | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 55 insertions(+), 0 deletions(-) + 1 file changed, 55 insertions(+) commit de3d599ea9e948867cfe395f42ed659670110c4c Author: Carlos Garcia Campos -Date: Thu Jul 1 12:31:10 2010 +0200 +Date: Thu Jul 1 12:31:10 2010 +0200 [glib] docs: document boxed types defined in poppler-page glib/poppler-page.cc | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++ glib/poppler-page.h | 79 +++++++++++++++++++++++++++ - 2 files changed, 226 insertions(+), 0 deletions(-) + 2 files changed, 226 insertions(+) commit 34c52190e1dbf4d3effa44b4408faa1fbae0d12d Author: Carlos Garcia Campos -Date: Thu Jul 1 09:33:08 2010 +0200 +Date: Thu Jul 1 09:33:08 2010 +0200 [glib] Remove splash header file glib/poppler-page.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 6910545a487f206ccd059bb295d2312228dbf2ba Author: Carlos Garcia Campos -Date: Wed Jun 30 19:03:04 2010 +0200 +Date: Wed Jun 30 19:03:04 2010 +0200 [glib] docs: Remove invalid symbol from poppler-sections.txt - glib/reference/poppler-sections.txt | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + glib/reference/poppler-sections.txt | 1 - + 1 file changed, 1 deletion(-) commit 65ea3b636cb5a38660e526a483a4d95f5acdf8db Author: Carlos Garcia Campos -Date: Wed Jun 30 19:02:32 2010 +0200 +Date: Wed Jun 30 19:02:32 2010 +0200 [glib] docs: fix typo - glib/poppler-form-field.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + glib/poppler-form-field.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 689bfec40b5b3030c2819cb4aac42c3ab6279278 Author: Carlos Garcia Campos -Date: Wed Jun 30 19:01:47 2010 +0200 +Date: Wed Jun 30 19:01:47 2010 +0200 [glib] docs: Add missing doc for parameter glib/poppler-document.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 0b3d77627f255a4bf3da6ee875ad8d9eb931c96e Author: Carlos Garcia Campos -Date: Wed Jun 30 19:00:59 2010 +0200 +Date: Wed Jun 30 19:00:59 2010 +0200 [glib] Use the same name for parameter in function prototype - glib/poppler-page.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + glib/poppler-page.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 19e1944c00ac2da6b18b015721fc3a8d1898a23a Author: Carlos Garcia Campos -Date: Wed Jun 30 18:01:52 2010 +0200 +Date: Wed Jun 30 18:01:52 2010 +0200 [glib] docs: Add media and movie to docs - glib/poppler-media.cc | 6 ++++++ - glib/poppler-movie.cc | 6 ++++++ + glib/poppler-media.cc | 6 ++++++ + glib/poppler-movie.cc | 6 ++++++ glib/reference/poppler-docs.sgml | 3 ++- - 3 files changed, 14 insertions(+), 1 deletions(-) + 3 files changed, 14 insertions(+), 1 deletion(-) commit ca48bee07e6b4a20ea7b40b472a335e75feb4739 Author: Carlos Garcia Campos -Date: Wed Jun 30 17:56:50 2010 +0200 +Date: Wed Jun 30 17:56:50 2010 +0200 [glib] docs: Add missing types to poppler.types glib/reference/poppler.types | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 613ccf81317a007ed5017ee788466613a6699bb5 Author: Carlos Garcia Campos -Date: Wed Jun 30 17:54:22 2010 +0200 +Date: Wed Jun 30 17:54:22 2010 +0200 [glib] docs: rework poppler-sections.txt @@ -7827,47 +14084,47 @@ - Add missing sections - Remove enums section - glib/reference/poppler-sections.txt | 424 + glib/reference/poppler-sections.txt | 424 ++++++++++++++++++++++++----------- - 1 files changed, 295 insertions(+), 129 deletions(-) + 1 file changed, 295 insertions(+), 129 deletions(-) commit b37556a32b79f8711ed7eca24abf19511872a70a Author: Carlos Garcia Campos -Date: Wed Jun 30 12:01:44 2010 +0200 +Date: Wed Jun 30 12:01:44 2010 +0200 [glib] docs: Add index of symbols glib/reference/poppler-docs.sgml | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 7f5fa4e19b4e324a396d64261b9125c1a557ac84 Author: Carlos Garcia Campos -Date: Wed Jun 30 12:00:35 2010 +0200 +Date: Wed Jun 30 12:00:35 2010 +0200 [glib] docs: Add version information - configure.ac | 1 + - glib/reference/Makefile.am | 2 +- + configure.ac | 1 + + glib/reference/Makefile.am | 2 +- glib/reference/poppler-docs.sgml | 7 ++++++- - glib/reference/version.xml.in | 1 + + glib/reference/version.xml.in | 1 + 4 files changed, 9 insertions(+), 2 deletions(-) commit 848d5e158fa9eadd19a658db314ba3fff9d026e8 Author: Carlos Garcia Campos -Date: Wed Jun 30 11:30:41 2010 +0200 +Date: Wed Jun 30 11:30:41 2010 +0200 [glib] docs: do not use gtk-doc templates - configure.ac | 2 +- - glib/poppler-action.cc | 6 + - glib/poppler-annot.cc | 6 + - glib/poppler-attachment.cc | 6 + - glib/poppler-attachment.h | 16 + - glib/poppler-document.cc | 8 + - glib/poppler-features.h.in | 59 ++++ - glib/poppler-form-field.cc | 6 + - glib/poppler-layer.cc | 6 + - glib/poppler-page.cc | 6 + + configure.ac | 2 +- + glib/poppler-action.cc | 6 + + glib/poppler-annot.cc | 6 + + glib/poppler-attachment.cc | 6 + + glib/poppler-attachment.h | 16 + + glib/poppler-document.cc | 8 + + glib/poppler-features.h.in | 59 ++++ + glib/poppler-form-field.cc | 6 + + glib/poppler-layer.cc | 6 + + glib/poppler-page.cc | 6 + glib/reference/tmpl/poppler-action.sgml | 216 ------------ glib/reference/tmpl/poppler-annot.sgml | 377 -------------------- glib/reference/tmpl/poppler-attachment.sgml | 68 ---- @@ -7877,80 +14134,80 @@ glib/reference/tmpl/poppler-features.sgml | 83 ----- glib/reference/tmpl/poppler-form-field.sgml | 318 ----------------- glib/reference/tmpl/poppler-layer.sgml | 83 ----- - glib/reference/tmpl/poppler-page.sgml | 483 + glib/reference/tmpl/poppler-page.sgml | 483 -------------------------- glib/reference/tmpl/poppler-private.sgml | 148 -------- glib/reference/tmpl/poppler-unused.sgml | 8 - - glib/reference/tmpl/poppler.sgml | 285 --------------- + glib/reference/tmpl/poppler.sgml | 285 --------------- glib/reference/tmpl/stamp-poppler-enums.sgml | 22 -- - gtk-doc.make | 78 +++-- - m4/gtk-doc.m4 | 2 +- + gtk-doc.make | 78 +++-- + m4/gtk-doc.m4 | 2 +- 25 files changed, 171 insertions(+), 2777 deletions(-) commit 16e15ac845206217086e2adac9f220e75c0c630d Author: Albert Astals Cid -Date: Tue Jun 29 21:44:02 2010 +0100 +Date: Tue Jun 29 21:44:02 2010 +0100 bitmap can be null at this stage, check it isn't poppler/JBIG2Stream.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 38e5d28a184d0ca8df71a7ea910ce85d7a225e4e Author: Albert Astals Cid -Date: Mon Jun 21 20:38:00 2010 +0100 +Date: Mon Jun 21 20:38:00 2010 +0100 more pow 0.5 -> sqrt - poppler/GfxState.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + poppler/GfxState.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) commit 58a53ca0a4e8434e8478f8fe121067dcf05c017d Author: Albert Astals Cid -Date: Mon Jun 21 19:24:20 2010 +0100 +Date: Mon Jun 21 19:24:20 2010 +0100 sqrt is much faster than pow 0.5 - poppler/GfxState.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + poppler/GfxState.cc | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) commit bf86a9fc464aca57ebec207a213dcc2cc6031940 Author: Albert Astals Cid -Date: Mon Jun 21 19:20:47 2010 +0100 +Date: Mon Jun 21 19:20:47 2010 +0100 introduce getChars to save some method calls Can give us a decent speedup when we go a lot though this methods - poppler/Catalog.cc | 12 +---- - poppler/DCTStream.cc | 51 ++++++++++++++------ - poppler/DCTStream.h | 3 + - poppler/GfxFont.cc | 22 +------- - poppler/GfxState.cc | 30 +++-------- - poppler/JPEG2000Stream.cc | 67 +++++++------------------- + poppler/Catalog.cc | 12 +---- + poppler/DCTStream.cc | 51 ++++++++++++++------ + poppler/DCTStream.h | 3 ++ + poppler/GfxFont.cc | 22 ++------- + poppler/GfxState.cc | 30 +++--------- + poppler/JPEG2000Stream.cc | 67 +++++++------------------ poppler/JPEG2000Stream.h | 38 ++++++++++++++- - poppler/Link.cc | 14 +---- - poppler/Object.h | 4 ++ - poppler/Stream.cc | 90 +++++++++++++++++++---------------- - poppler/Stream.h | 118 + poppler/Link.cc | 14 ++---- + poppler/Object.h | 4 ++ + poppler/Stream.cc | 90 ++++++++++++++++++---------------- + poppler/Stream.h | 118 ++++++++++++++++++++++++++++++++++++++++++++- 11 files changed, 279 insertions(+), 170 deletions(-) commit 65c14073a3b1035ca5fe3bd6667abd315272841e Author: Carlos Garcia Campos -Date: Mon Jun 21 17:19:22 2010 +0200 +Date: Mon Jun 21 17:19:22 2010 +0200 Reduce pow operations in GfxCalRGBColorSpace::getXYZ() We were doing the same pow operation 3 times!. It makes document attached to bug #28591 render a little faster. - poppler/GfxState.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + poppler/GfxState.cc | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) commit 9365c05c1f66b3000febf32c45cef2ffe79e041a Author: Carlos Garcia Campos -Date: Sat Jun 19 10:36:39 2010 +0200 +Date: Sat Jun 19 10:36:39 2010 +0200 [glib] Fix links/annots area for rotated documents with page CropBox not starting at 0,0 @@ -7958,11 +14215,11 @@ Fixes bug #28588. glib/poppler-page.cc | 25 ++++++++++--------------- - 1 files changed, 10 insertions(+), 15 deletions(-) + 1 file changed, 10 insertions(+), 15 deletions(-) commit d9504c0a288c84b68a516f715505d6bc94b911f5 Author: Pino Toscano -Date: Fri Jun 18 23:59:04 2010 +0200 +Date: Fri Jun 18 23:59:04 2010 +0200 [autotools] link the 'cpp' tests against libpoppler as well @@ -7970,22 +14227,22 @@ should fix bug #28605 cpp/tests/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 62975737bcaa6e0a2ecab981aa3e0c8f2ff10571 Author: Brian Cameron -Date: Fri Jun 18 19:22:17 2010 +0100 +Date: Fri Jun 18 19:22:17 2010 +0100 Compile with Sun Studio - goo/ImgWriter.h | 3 ++- - goo/JpegWriter.h | 3 ++- - poppler/SplashOutputDev.cc | 6 ++++++ + goo/ImgWriter.h | 3 ++- + goo/JpegWriter.h | 3 ++- + poppler/SplashOutputDev.cc | 6 ++++++ 3 files changed, 10 insertions(+), 2 deletions(-) commit 7cbe3d1521aea8b484efb8663e75684e05b6fb61 Author: Albert Astals Cid -Date: Thu Jun 17 23:01:21 2010 +0100 +Date: Thu Jun 17 23:01:21 2010 +0100 Optimize Splash::compositeBackground @@ -7995,32 +14252,32 @@ and the pixel being opage meaning we have to do nothing splash/Splash.cc | 34 ++++++++++++++++++++++++++-------- - 1 files changed, 26 insertions(+), 8 deletions(-) + 1 file changed, 26 insertions(+), 8 deletions(-) commit f323e5e4cdcc20075ee7c722f7adc088c0772249 Author: Albert Astals Cid -Date: Thu Jun 17 22:59:37 2010 +0100 +Date: Thu Jun 17 22:59:37 2010 +0100 Check the objects are num before reading them Might have caused the kde bug #241995 - poppler/GfxState.cc | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) + poppler/GfxState.cc | 11 +++++++---- + 1 file changed, 7 insertions(+), 4 deletions(-) commit 35e87d2062b1d82db0d765de5a6187122a0fa99c Author: Carlos Garcia Campos -Date: Wed Jun 16 11:52:25 2010 +0200 +Date: Wed Jun 16 11:52:25 2010 +0200 [gib-demo] Add demo for poppler_page_get_text_layout() glib/demo/text.c | 182 - ++++++++++++++++++++++++++++++++++++++++++++++++----- - 1 files changed, 164 insertions(+), 18 deletions(-) + ++++++++++++++++++++++++++++++++++++++++++++++++------ + 1 file changed, 164 insertions(+), 18 deletions(-) commit ddcea568b3a7334e062d6214f43d0a2c2ec95be4 Author: Daniel Garcia -Date: Tue Jun 15 16:57:32 2010 +0200 +Date: Tue Jun 15 16:57:32 2010 +0200 [glib] Add poppler_page_get_text_layout() @@ -8033,39 +14290,39 @@ glib/poppler-page.cc | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++ glib/poppler-page.h | 4 ++- - 2 files changed, 94 insertions(+), 1 deletions(-) + 2 files changed, 94 insertions(+), 1 deletion(-) commit 6e9fe8832c37b560ac4d0b0e32d618bde70ee117 Author: Pino Toscano -Date: Wed Jun 16 00:22:59 2010 +0200 +Date: Wed Jun 16 00:22:59 2010 +0200 [Qt4] and support 'Print' named action here too... qt4/src/poppler-annotation.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 53c003f36af5d77f50fe238eaec4c5f7c3a485c7 Author: Pino Toscano -Date: Wed Jun 16 00:18:13 2010 +0200 +Date: Wed Jun 16 00:18:13 2010 +0200 [CMake] install the new goo/GooLikely.h CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 2ba752aabc8dad4bb35a351697b1590795c54ca4 Author: Pino Toscano -Date: Wed Jun 16 00:06:30 2010 +0200 +Date: Wed Jun 16 00:06:30 2010 +0200 update copyrights qt4/src/poppler-link.h | 3 ++- qt4/src/poppler-page.cc | 1 + - 2 files changed, 3 insertions(+), 1 deletions(-) + 2 files changed, 3 insertions(+), 1 deletion(-) commit 38bf54bbad40288be763c6a1a89d90477c9ef89d Author: Albert Astals Cid -Date: Tue Jun 15 23:05:43 2010 +0100 +Date: Tue Jun 15 23:05:43 2010 +0100 move the declaration of likely/unlikely to an own file in goo/ @@ -8077,130 +14334,130 @@ commit 9838edf8c7497858e3bac2743784a3259f61cfdd Author: Albert Astals Cid -Date: Tue Jun 15 22:54:34 2010 +0100 +Date: Tue Jun 15 22:54:34 2010 +0100 Protect us against negative y coordinates Happens very rarely, like in bug 28480 splash/Splash.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 8b32c3e9826d4462fd9d16fab4200ebb23251046 Author: Pino Toscano -Date: Tue Jun 15 23:55:01 2010 +0200 +Date: Tue Jun 15 23:55:01 2010 +0200 [Qt4/apidox] ok, now the *proper* version for 'Print'... qt4/src/poppler-link.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit b54e5ac49f69bd1c906e517edcb436e042199cd5 Author: Pino Toscano -Date: Tue Jun 15 23:53:50 2010 +0200 +Date: Tue Jun 15 23:53:50 2010 +0200 [Qt4/apidox] add the proper version for the new 'Print' qt4/src/poppler-link.h | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 71ad18c3b6b73e23d71600d07ce00bdfaf0bef60 Author: Pino Toscano -Date: Tue Jun 15 23:51:01 2010 +0200 +Date: Tue Jun 15 23:51:01 2010 +0200 [Qt4] recognize the 'Print' named action here too qt4/src/poppler-annotation.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 96f60f2748ba76de0d296a9838dbd7181f506e36 Author: Guillermo Amaral -Date: Tue Jun 15 23:47:46 2010 +0200 +Date: Tue Jun 15 23:47:46 2010 +0200 [Qt4] recognize 'Print' as name in named actions qt4/src/poppler-link.h | 3 ++- qt4/src/poppler-page.cc | 2 ++ - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit 25494311c5b8eb88d43df420ec91a1aedad20d05 Author: Carlos Garcia Campos -Date: Tue Jun 15 17:44:23 2010 +0200 +Date: Tue Jun 15 17:44:23 2010 +0200 [glib] Add some G_UNLIKELY() glib/poppler-document.cc | 12 ++++++------ - glib/poppler-page.cc | 17 ++++++++++------- + glib/poppler-page.cc | 17 ++++++++++------- 2 files changed, 16 insertions(+), 13 deletions(-) commit 52f133fb962256edb577b7f639c5c13221c6365d Author: Carlos Garcia Campos -Date: Tue Jun 15 14:20:49 2010 +0200 +Date: Tue Jun 15 14:20:49 2010 +0200 [glib] Use g_slice for actions and destinations glib/poppler-action.cc | 21 +++++++++------------ - 1 files changed, 9 insertions(+), 12 deletions(-) + 1 file changed, 9 insertions(+), 12 deletions(-) commit f035c94d8b5b34c0c3bb47b8cfc2f9c720a4fc71 Author: Carlos Garcia Campos -Date: Tue Jun 15 14:01:07 2010 +0200 +Date: Tue Jun 15 14:01:07 2010 +0200 [glib] Use g_slice_dup in _copy() function for iterators glib/poppler-document.cc | 9 +++------ - 1 files changed, 3 insertions(+), 6 deletions(-) + 1 file changed, 3 insertions(+), 6 deletions(-) commit c84f69681828c7e3b969f666f9b84f1531976c6f Author: Carlos Garcia Campos -Date: Tue Jun 15 13:57:18 2010 +0200 +Date: Tue Jun 15 13:57:18 2010 +0200 [glib] Use g_slice for mappings and PopplerRectangle glib/poppler-page.cc | 50 ++++++++++++++++++-------------------------------- - 1 files changed, 18 insertions(+), 32 deletions(-) + 1 file changed, 18 insertions(+), 32 deletions(-) commit e12b9ab105f3b56b47ded871693b939ed421c853 Author: Carlos Garcia Campos -Date: Tue Jun 15 13:49:27 2010 +0200 +Date: Tue Jun 15 13:49:27 2010 +0200 [glib] Use poppler_image_mapping_free() instead of g_free() glib/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit fb791a15f7472042fb2174e6f5df6924dd4eeb9b Author: Carlos Garcia Campos -Date: Tue Jun 15 13:37:52 2010 +0200 +Date: Tue Jun 15 13:37:52 2010 +0200 [glib] Remove poppler_mapping_free and use poppler_link_mapping_free instead glib/poppler-page.cc | 9 +-------- - 1 files changed, 1 insertions(+), 8 deletions(-) + 1 file changed, 1 insertion(+), 8 deletions(-) commit 6186d7220e545eb89597626933a10acd0cd25173 Author: Carlos Garcia Campos -Date: Tue Jun 15 13:16:59 2010 +0200 +Date: Tue Jun 15 13:16:59 2010 +0200 [glib] Use _new() methods instead of g_new() to create boxed structs glib/poppler-page.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 44639cb7b10ab6d66122ae2b6b7f3e5745f933bd Author: Carlos Garcia Campos -Date: Tue Jun 15 10:39:00 2010 +0200 +Date: Tue Jun 15 10:39:00 2010 +0200 [glib-demo] Use poppler_rectangle_free() instead of g_free() glib/demo/find.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3ca304f3837af27ae49541a5f441d8729264a945 Author: Albert Astals Cid -Date: Mon Jun 14 19:16:41 2010 +0100 +Date: Mon Jun 14 19:16:41 2010 +0100 Add more caching to ObjectStreams @@ -8208,127 +14465,127 @@ poppler/XRef.cc | 62 +++++++++++++++++++++++++++++++++++++++++++++++-------- - poppler/XRef.h | 4 +- + poppler/XRef.h | 4 ++-- 2 files changed, 55 insertions(+), 11 deletions(-) commit cc2e5f190e19ee8169f67df2541302a2816873d3 Author: Carlos Garcia Campos -Date: Mon Jun 14 18:17:01 2010 +0200 +Date: Mon Jun 14 18:17:01 2010 +0200 [glib-demo] Support password protected documents glib/demo/main.c | 175 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- - 1 files changed, 170 insertions(+), 5 deletions(-) + 1 file changed, 170 insertions(+), 5 deletions(-) commit 34b2dbb6bbaf0189c92eea6b7924999ab2b6ad11 Author: Carlos Garcia Campos -Date: Mon Jun 14 17:41:51 2010 +0200 +Date: Mon Jun 14 17:41:51 2010 +0200 [glib-demo] Remove GLIB_CHECK_VERSION(), we already depend on glib 2.18 glib/demo/attachments.c | 5 ----- - glib/demo/main.c | 32 +------------------------------- - 2 files changed, 1 insertions(+), 36 deletions(-) + glib/demo/main.c | 32 +------------------------------- + 2 files changed, 1 insertion(+), 36 deletions(-) commit a52670a46c0561025d8b86cd2865603f0720c695 Author: Albert Astals Cid -Date: Sun Jun 13 15:31:15 2010 +0100 +Date: Sun Jun 13 15:31:15 2010 +0100 do not distribute these two files they are generated on configure/cmake time and depend on the machine - glib/Makefile.am | 7 +++---- - poppler/Makefile.am | 4 ++-- + glib/Makefile.am | 7 +++---- + poppler/Makefile.am | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) commit eb0206ba8458f1dba004ac7bef856dcbb2ccbba5 Author: Albert Astals Cid -Date: Wed Jun 9 18:56:16 2010 +0100 +Date: Wed Jun 9 18:56:16 2010 +0100 we need to ship these two files Bug 28458 - Makefile.am | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + Makefile.am | 2 ++ + 1 file changed, 2 insertions(+) commit 7dfdf1ee293b7d36a049a90d8a17462ed0e50f2c Author: Albert Astals Cid -Date: Tue Jun 8 21:54:52 2010 +0100 +Date: Tue Jun 8 21:54:52 2010 +0100 Typo-- utils/pdftoppm.1 | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 57cc04ee1a122794b338c0d9818dbdaea46a42d6 Author: Albert Astals Cid -Date: Tue Jun 8 21:49:40 2010 +0100 +Date: Tue Jun 8 21:49:40 2010 +0100 Add cropbox to the manpage utils/pdftoppm.1 | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit f9e6cb9647981f7afbb20261b3ccedaf003657d2 Author: Albert Astals Cid -Date: Tue Jun 8 20:43:11 2010 +0100 +Date: Tue Jun 8 20:43:11 2010 +0100 0.14.0 CMakeLists.txt | 4 ++-- - NEWS | 18 ++++++++++++++++++ - configure.ac | 4 ++-- - cpp/Doxyfile | 2 +- + NEWS | 18 ++++++++++++++++++ + configure.ac | 4 ++-- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 5 files changed, 24 insertions(+), 6 deletions(-) commit 963afdc39153fee69ecb939c98deeef4f64638de Author: Albert Astals Cid -Date: Tue Jun 8 20:29:58 2010 +0100 +Date: Tue Jun 8 20:29:58 2010 +0100 libpoppler-qt4.so.3.2.0 -> libpoppler-qt4.so.3.3.0 qt4/src/CMakeLists.txt | 2 +- - qt4/src/Makefile.am | 2 +- + qt4/src/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit c1629be8011f3bddbf619246090640d62136d521 Author: Albert Astals Cid -Date: Tue Jun 8 20:23:00 2010 +0100 +Date: Tue Jun 8 20:23:00 2010 +0100 Increase soname as _PopplerActionMovie struct grew - glib/CMakeLists.txt | 2 +- - glib/Makefile.am | 2 +- + glib/CMakeLists.txt | 2 +- + glib/Makefile.am | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 5ef45b1e72aed88ece0905b1204edee641f3c8fc Author: Albert Astals Cid -Date: Tue Jun 8 19:35:20 2010 +0100 +Date: Tue Jun 8 19:35:20 2010 +0100 Do not exit when trying to allocate memory for the XRef fails See bug 28406 poppler/XRef.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit e7a5e9f70ee1283a2ca6734552d905279c97989b Author: Albert Astals Cid -Date: Fri Jun 4 08:46:33 2010 +0100 +Date: Fri Jun 4 08:46:33 2010 +0100 a bit of docu poppler/Object.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9ff4dab2558f7c2700fd7fcaccacdad9619dbdda Author: Albert Astals Cid -Date: Fri Jun 4 08:44:34 2010 +0100 +Date: Fri Jun 4 08:44:34 2010 +0100 Add support for unsigned integer numbers @@ -8339,24 +14596,24 @@ in a 32 bit unsigned integer - poppler/Lexer.cc | 32 +++++++++++++++++++++++++------- - poppler/Object.cc | 5 ++++- - poppler/Object.h | 14 +++++++++++--- - poppler/SecurityHandler.cc | 22 ++++++++++++++++++++++ + poppler/Lexer.cc | 32 +++++++++++++++++++++++++------- + poppler/Object.cc | 5 ++++- + poppler/Object.h | 14 +++++++++++--- + poppler/SecurityHandler.cc | 22 ++++++++++++++++++++++ 4 files changed, 62 insertions(+), 11 deletions(-) commit 41e9af7f505dbfbda36f6ac97df90f2a42ab3160 Author: Albert Astals Cid -Date: Tue Jun 1 21:40:07 2010 +0100 +Date: Tue Jun 1 21:40:07 2010 +0100 If the document is not encrypted it is ok to print poppler/XRef.cc | 16 ++++++++++------ - 1 files changed, 10 insertions(+), 6 deletions(-) + 1 file changed, 10 insertions(+), 6 deletions(-) commit b15c793a8a58b17a7fe7b32c1037726e1e0e1bf0 Author: Albert Astals Cid -Date: Tue Jun 1 20:57:16 2010 +0100 +Date: Tue Jun 1 20:57:16 2010 +0100 Check it is a stream, not that it is not none @@ -8365,41 +14622,41 @@ document poppler/Lexer.h | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit a72c68117ba05f3934e2df227cdcaf53a375f0ce Author: Pino Toscano -Date: Fri May 28 18:11:02 2010 +0200 +Date: Fri May 28 18:11:02 2010 +0200 [cpp apidox] add a start of API documentation for the 'page' class cpp/poppler-page.cpp | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 68 insertions(+), 0 deletions(-) + 1 file changed, 68 insertions(+) commit acf7729e8e270e1b4b2a552272dc280ae6d7b352 Author: Pino Toscano -Date: Fri May 28 17:38:35 2010 +0200 +Date: Fri May 28 17:38:35 2010 +0200 [cpp] fix the font_iterator current page status cpp/poppler-font.cpp | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit 4e017ff24a01cbbf1b39eedc3d7697f8b180fdd9 Author: Pino Toscano -Date: Fri May 28 17:15:28 2010 +0200 +Date: Fri May 28 17:15:28 2010 +0200 [cpp apidox] add API documentation for the 'font_info' and 'font_iterator' classes cpp/poppler-font.cpp | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 71 insertions(+), 0 deletions(-) + 1 file changed, 71 insertions(+) commit 2ff840b62e41e2fc98e9fcff7330f40216de58a5 Author: Pino Toscano -Date: Fri May 28 14:34:37 2010 +0200 +Date: Fri May 28 14:34:37 2010 +0200 [cpp] move the actual convert_date(const char*) implementation in the detail @@ -8411,12 +14668,12 @@ cpp/poppler-embedded-file.cpp | 4 ++-- cpp/poppler-global.cpp | 23 ++--------------------- cpp/poppler-private.cpp | 25 +++++++++++++++++++++++++ - cpp/poppler-private.h | 2 ++ + cpp/poppler-private.h | 2 ++ 5 files changed, 32 insertions(+), 24 deletions(-) commit 8112e9111313eaded4cd2e89d0e67efb0f3e29db Author: Pino Toscano -Date: Fri May 28 13:13:50 2010 +0200 +Date: Fri May 28 13:13:50 2010 +0200 [cpp] add a time_type typedef @@ -8428,42 +14685,42 @@ cpp/poppler-embedded-file.cpp | 4 ++-- cpp/poppler-embedded-file.h | 4 ++-- cpp/poppler-global.cpp | 4 ++-- - cpp/poppler-global.h | 4 +++- + cpp/poppler-global.h | 4 +++- 6 files changed, 14 insertions(+), 12 deletions(-) commit bc5bdb43b12437e00aaddc27a74b9ac4b6498446 Author: Pino Toscano -Date: Fri May 28 13:01:53 2010 +0200 +Date: Fri May 28 13:01:53 2010 +0200 use the proper type for iterating on a GooVector poppler/XRef.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 87128ab0dfec6be1a034361512ee41301b078831 Author: Maciej Mrozowski -Date: Thu May 27 17:31:00 2010 +0200 +Date: Thu May 27 17:31:00 2010 +0200 [CMake] Do not force -O2, preserve compiler flags instead. - cmake/modules/PopplerMacros.cmake | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + cmake/modules/PopplerMacros.cmake | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit 241c338facb45641ef1a271c904355a014bbf28d Author: Albert Astals Cid -Date: Thu May 27 20:37:55 2010 +0100 +Date: Thu May 27 20:37:55 2010 +0100 Allow quality & progressive mode to be utilised in JpegWriter - goo/JpegWriter.cc | 15 +++++++++++++-- - goo/JpegWriter.h | 4 ++++ + goo/JpegWriter.cc | 15 +++++++++++++-- + goo/JpegWriter.h | 4 ++++ splash/SplashBitmap.cc | 18 +++++++++--------- - splash/SplashBitmap.h | 4 ++++ + splash/SplashBitmap.h | 4 ++++ 4 files changed, 30 insertions(+), 11 deletions(-) commit 9eda6e8aaae412a9882141d1b5b8c7bf0c823c68 Author: Albert Astals Cid -Date: Tue May 25 23:44:30 2010 +0100 +Date: Tue May 25 23:44:30 2010 +0100 Do not follow loops blindly @@ -8475,45 +14732,45 @@ commit bbee6e0c8c9b181f8d19c167c867d74a765685fb Author: Albert Astals Cid -Date: Tue May 25 23:13:38 2010 +0100 +Date: Tue May 25 23:13:38 2010 +0100 update copyright poppler/JBIG2Stream.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 80b72b9f2fd70395580205b8b176e0576e132cf5 Author: Hib Eris -Date: Wed May 26 13:07:57 2010 +0200 +Date: Wed May 26 13:07:57 2010 +0200 [autotools] sync autotool build with cmake build In addition to commit 69c2cf76cef9c190ac07726f60f1dccd3df5cb6d - poppler/poppler-config.h.in | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + poppler/poppler-config.h.in | 4 ++++ + 1 file changed, 4 insertions(+) commit 30ea3ab8a1eecafb3366aef193910098fdb7ccc8 Author: Albert Astals Cid -Date: Tue May 25 23:07:56 2010 +0100 +Date: Tue May 25 23:07:56 2010 +0100 Fix crash when parsing pdf in bug 28170 This code is a can of crashing worms :-7 poppler/JBIG2Stream.cc | 23 ++++++++++++++++------- - 1 files changed, 16 insertions(+), 7 deletions(-) + 1 file changed, 16 insertions(+), 7 deletions(-) commit b5a9021037c4e6cbbfd622433f3de693d1f47671 Author: Albert Astals Cid -Date: Tue May 25 20:00:57 2010 +0100 +Date: Tue May 25 20:00:57 2010 +0100 0.13.4 - CMakeLists.txt | 2 +- - NEWS | 16 ++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- + CMakeLists.txt | 2 +- + NEWS | 16 ++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- glib/reference/tmpl/poppler-action.sgml | 5 +++++ glib/reference/tmpl/poppler-annot.sgml | 18 ++++++++++++++++++ glib/reference/tmpl/poppler-attachment.sgml | 3 +++ @@ -8522,40 +14779,40 @@ glib/reference/tmpl/poppler-features.sgml | 3 +++ glib/reference/tmpl/poppler-form-field.sgml | 3 +++ glib/reference/tmpl/poppler-layer.sgml | 4 ++++ - glib/reference/tmpl/poppler-page.sgml | 13 +++++++++++++ + glib/reference/tmpl/poppler-page.sgml | 13 +++++++++++++ glib/reference/tmpl/poppler-private.sgml | 3 +++ - glib/reference/tmpl/poppler.sgml | 6 ++++++ + glib/reference/tmpl/poppler.sgml | 6 ++++++ glib/reference/tmpl/stamp-poppler-enums.sgml | 3 +++ - qt4/src/Doxyfile | 2 +- + qt4/src/Doxyfile | 2 +- 17 files changed, 103 insertions(+), 4 deletions(-) commit 57ab0ebe993d79fe551bba58e0a70d55d32828f8 Author: Albert Astals Cid -Date: Wed May 12 20:49:31 2010 +0100 +Date: Wed May 12 20:49:31 2010 +0100 better copyright poppler/strtok_r.cpp | 23 +++++++++++++++++++++++ - 1 files changed, 23 insertions(+), 0 deletions(-) + 1 file changed, 23 insertions(+) commit 69c2cf76cef9c190ac07726f60f1dccd3df5cb6d Author: Albert Astals Cid -Date: Wed May 12 20:47:25 2010 +0100 +Date: Wed May 12 20:47:25 2010 +0100 mingw does not provide strtok_r Copy the glibc implementation - CMakeLists.txt | 1 + - poppler/Makefile.am | 1 + + CMakeLists.txt | 1 + + poppler/Makefile.am | 1 + poppler/poppler-config.h.cmake | 4 + - poppler/strtok_r.cpp | 189 + poppler/strtok_r.cpp | 189 ++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 195 insertions(+), 0 deletions(-) + 4 files changed, 195 insertions(+) commit 9e9b5e0d87a7450bd2223538673321ecec720c36 Author: Marek Kasik -Date: Tue May 11 12:06:17 2010 +0200 +Date: Tue May 11 12:06:17 2010 +0200 Better check of overlapping of table cells when selecting text @@ -8563,11 +14820,11 @@ of assumed table (related to #3188). poppler/TextOutputDev.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit a3e40b460b7690ef73ccf143b10da07e91d9ee7f Author: Carlos Garcia Campos -Date: Mon May 10 17:41:04 2010 +0200 +Date: Mon May 10 17:41:04 2010 +0200 [annots] Adjust bbox for line annots when y1 = y2 @@ -8577,20 +14834,20 @@ annot bbox is empty. poppler/Annot.cc | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + 1 file changed, 10 insertions(+) commit e30d24c506a9ff742f8af5d6c71273abeddaa265 Author: Pino Toscano -Date: Tue May 4 15:19:26 2010 +0200 +Date: Tue May 4 15:19:26 2010 +0200 [cpp] ustring::{from,to}_utf8(): fix in/out buffer sizes cpp/poppler-global.cpp | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit aaa19a673020e12dbfceb4d25ade0ece7875fd83 Author: Pino Toscano -Date: Tue May 4 12:07:43 2010 +0200 +Date: Tue May 4 12:07:43 2010 +0200 [cpp] make the pkg-config files really working @@ -8600,42 +14857,42 @@ commit 8f963ccde41ef1faa719254fccc5bdfe75e9fa87 Author: Patrick Spendrin -Date: Sun May 2 18:42:10 2010 +0200 +Date: Sun May 2 18:42:10 2010 +0200 Windows: define strtok_r as strtok_s poppler/poppler-config.h.cmake | 4 ++++ - poppler/poppler-config.h.in | 4 ++++ - 2 files changed, 8 insertions(+), 0 deletions(-) + poppler/poppler-config.h.in | 4 ++++ + 2 files changed, 8 insertions(+) commit c9d8df51c96e50ad72f7954baba2254259fc894c Author: Albert Astals Cid -Date: Sat May 1 19:52:51 2010 +0100 +Date: Sat May 1 19:52:51 2010 +0100 2010 in these copyrights poppler/poppler-config.h.cmake | 2 +- - poppler/poppler-config.h.in | 2 +- + poppler/poppler-config.h.in | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 9ce71fb35fdd66c55872956432160a5c76a62080 Author: Jakub Wilk -Date: Sat May 1 19:50:54 2010 +0100 +Date: Sat May 1 19:50:54 2010 +0100 Use strtok_r instead strtok strtok is not thread safe - fofi/FoFiType1.cc | 8 +++++--- + fofi/FoFiType1.cc | 8 +++++--- poppler/CharCodeToUnicode.cc | 6 ++++-- poppler/GlobalParams.cc | 6 ++++-- - poppler/PDFDoc.cc | 4 +++- - poppler/UnicodeMap.cc | 21 ++++++++++++++++++--- + poppler/PDFDoc.cc | 4 +++- + poppler/UnicodeMap.cc | 21 ++++++++++++++++++--- 5 files changed, 34 insertions(+), 11 deletions(-) commit 6b2983f89e87792a393880dab6dc1fedb748db2c Author: Carlos Garcia Campos -Date: Fri Apr 30 14:48:50 2010 +0200 +Date: Fri Apr 30 14:48:50 2010 +0200 [cairo] Set device offset and matrix to smask depending on the group target @@ -8643,20 +14900,20 @@ It seems to fix all of my test cases. Fixes bug #27208. poppler/CairoOutputDev.cc | 21 +++++++++++++++------ - 1 files changed, 15 insertions(+), 6 deletions(-) + 1 file changed, 15 insertions(+), 6 deletions(-) commit ac32021704178721ee007a6b6831283e323e500f Author: Pino Toscano -Date: Fri Apr 30 01:14:14 2010 +0200 +Date: Fri Apr 30 01:14:14 2010 +0200 demote the #warning to a simple FIXME comment - poppler/ArthurOutputDev.cc | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) + poppler/ArthurOutputDev.cc | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) commit 8c1bc17552c989c15f318d9d109607a9a594ca6b Author: Pino Toscano -Date: Fri Apr 30 01:12:19 2010 +0200 +Date: Fri Apr 30 01:12:19 2010 +0200 MSVC: define fmax() and fmin() @@ -8665,23 +14922,23 @@ Thanks to Patrick Spendrin for the hint! poppler/poppler-config.h.cmake | 5 +++++ - poppler/poppler-config.h.in | 5 +++++ - 2 files changed, 10 insertions(+), 0 deletions(-) + poppler/poppler-config.h.in | 5 +++++ + 2 files changed, 10 insertions(+) commit 71063d51a45835b0267a7e3f823ef49689cfd06f Author: Carlos Garcia Campos -Date: Thu Apr 29 20:28:07 2010 +0200 +Date: Thu Apr 29 20:28:07 2010 +0200 Make sure we are drawing text before calling endTextObject() This is actually the right fix for the previous commit. poppler/Gfx.cc | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) + 1 file changed, 5 insertions(+), 5 deletions(-) commit e909219d8e92994bd52976f9676015fa6ca9fc91 Author: Carlos Garcia Campos -Date: Thu Apr 29 18:34:22 2010 +0200 +Date: Thu Apr 29 18:34:22 2010 +0200 Set textHaveCSPattern=false again before filling the pattern in opEndText() @@ -8690,110 +14947,110 @@ ccf238b32e236f69c0507a5421ac2649dfa8d865. poppler/Gfx.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 29572d6ac7829b60efce2d8e489473c55e370f26 Author: Albert Astals Cid -Date: Tue Apr 27 23:39:23 2010 +0100 +Date: Tue Apr 27 23:39:23 2010 +0100 fabs for doubles poppler/TextOutputDev.cc | 24 ++++++++++++------------ - 1 files changed, 12 insertions(+), 12 deletions(-) + 1 file changed, 12 insertions(+), 12 deletions(-) commit 4905e2bd764ea601e3bf9c5195c740e5bf186af5 Author: Albert Astals Cid -Date: Tue Apr 27 23:34:34 2010 +0100 +Date: Tue Apr 27 23:34:34 2010 +0100 fix include splash/SplashBitmap.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit f9f0e4b747a1527bd6354897cdba7954d58651de Author: Carlos Garcia Campos -Date: Tue Apr 27 14:26:23 2010 +0200 +Date: Tue Apr 27 14:26:23 2010 +0200 Fix first color stop offset of linear gradients Fixes bug #27837. poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b822011029f3721fbafd4a7bf01b9d6fee35d25 Author: Pino Toscano -Date: Sat Apr 24 18:18:08 2010 +0200 +Date: Sat Apr 24 18:18:08 2010 +0200 include standard float.h instead of unportable values.h poppler/TextOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit dee7cb8691528293bb5b8f266970cdb6771e301b Author: Albert Astals Cid -Date: Sat Apr 24 15:39:23 2010 +0100 +Date: Sat Apr 24 15:39:23 2010 +0100 0.13.3 CMakeLists.txt | 2 +- - NEWS | 31 +++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- + NEWS | 31 +++++++++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 5 files changed, 35 insertions(+), 4 deletions(-) commit 07864c9e2a7a32b48bdbab92c8b2f79bce1d9f5b Author: Albert Astals Cid -Date: Sat Apr 24 13:07:02 2010 +0100 +Date: Sat Apr 24 13:07:02 2010 +0100 minor cleanups - utils/HtmlLinks.cc | 15 ++------------- - utils/HtmlLinks.h | 16 ++++++++++++++-- + utils/HtmlLinks.cc | 15 ++------------- + utils/HtmlLinks.h | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 15 deletions(-) commit e501eabb2f0775444a2bf64005a3a3f1ffa281b4 Author: Albert Astals Cid -Date: Sat Apr 24 13:06:12 2010 +0100 +Date: Sat Apr 24 13:06:12 2010 +0100 Do not assume the parameter will have more than 5 chars - utils/pdftohtml.cc | 30 ++++++++++++++++++------------ - 1 files changed, 18 insertions(+), 12 deletions(-) + utils/pdftohtml.cc | 30 ++++++++++++++++++------------ + 1 file changed, 18 insertions(+), 12 deletions(-) commit 6cc4d571339214e9eeeb682ba48fb220cef905f9 Author: Albert Astals Cid -Date: Sat Apr 24 13:04:05 2010 +0100 +Date: Sat Apr 24 13:04:05 2010 +0100 Fix end() to return the correct last valid value goo/GooVector.h | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 4ed53e30e735b79c46eab9d54883531c6e187b17 Author: William Bader -Date: Fri Apr 23 22:52:24 2010 +0100 +Date: Fri Apr 23 22:52:24 2010 +0100 Silence some Illegal entry in bfrange block in ToUnicode CMap Fixes #27728 poppler/CharCodeToUnicode.cc | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) commit 16a004784043e2a8587c0c3c6d23889df8a80470 Author: Albert Astals Cid -Date: Thu Apr 22 19:39:01 2010 +0100 +Date: Thu Apr 22 19:39:01 2010 +0100 Avoid the usage of std:: poppler/TextOutputDev.cc | 25 +++++++++++-------------- - 1 files changed, 11 insertions(+), 14 deletions(-) + 1 file changed, 11 insertions(+), 14 deletions(-) commit a7dcb2b4ffee57b7f78529cbaeaab647ab93de86 Author: Pino Toscano -Date: Thu Apr 22 13:31:41 2010 +0200 +Date: Thu Apr 22 13:31:41 2010 +0200 Windows: include config.h in GlobalParamsWin.cc only if not included already @@ -8804,12 +15061,12 @@ as safety check, check for PACKAGE_NAME (#define'd in config.h) before #include'ing it again - poppler/GlobalParamsWin.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + poppler/GlobalParamsWin.cc | 2 ++ + 1 file changed, 2 insertions(+) commit fba076e17af24a9c9883504282316bba119a908c Author: Pino Toscano -Date: Thu Apr 22 13:24:04 2010 +0200 +Date: Thu Apr 22 13:24:04 2010 +0200 avoid accidental max() macro replacement with some compilers (eg MSVC) @@ -8818,49 +15075,49 @@ case, empty spaces are just fine poppler/TextOutputDev.cc | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) + 1 file changed, 7 insertions(+), 4 deletions(-) commit ccf238b32e236f69c0507a5421ac2649dfa8d865 Author: Thomas Freitag -Date: Wed Apr 21 19:21:37 2010 +0100 +Date: Wed Apr 21 19:21:37 2010 +0100 Improve colorizing text and masks in pattern colorspace Bug #27482 - poppler/Gfx.cc | 137 + poppler/Gfx.cc | 137 +++++++++++++++++++++----------------------- - poppler/Gfx.h | 4 +- - poppler/SplashOutputDev.cc | 41 ++++++++++++- - poppler/SplashOutputDev.h | 3 +- + poppler/Gfx.h | 4 +- + poppler/SplashOutputDev.cc | 41 +++++++++++-- + poppler/SplashOutputDev.h | 3 +- 4 files changed, 106 insertions(+), 79 deletions(-) commit 8e86dfb328d94939ecf390d34af533b831b2837b Author: Albert Astals Cid -Date: Wed Apr 21 19:19:53 2010 +0100 +Date: Wed Apr 21 19:19:53 2010 +0100 Add copyright poppler/TextOutputDev.cc | 1 + poppler/TextOutputDev.h | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 6f9f3d33ff8058e28243ba45b8547e21ad0d088a Author: Andre Klapper -Date: Wed Apr 21 19:57:15 2010 +0200 +Date: Wed Apr 21 19:57:15 2010 +0200 [glib-demo] Compile with -DGSEAL_ENABLE Fixes bug #27579. - glib/demo/images.c | 2 +- - glib/demo/layers.c | 4 ++-- - glib/demo/render.c | 8 ++++---- + glib/demo/images.c | 2 +- + glib/demo/layers.c | 4 ++-- + glib/demo/render.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) commit 6b14c18d60cae130869f9a5c7688dfe880602224 Author: Carlos Garcia Campos -Date: Wed Apr 21 19:56:49 2010 +0200 +Date: Wed Apr 21 19:56:49 2010 +0200 [cairo] Make sure we always use a new path in doPath() @@ -8868,21 +15125,21 @@ http://acroeng.adobe.com/Test_Files/images/transparency/Untitled-2.pdf when rendering with cairo backend. - poppler/CairoOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.cc | 1 + + 1 file changed, 1 insertion(+) commit 4f71d64c69500ed78daf4d797c8af6cfbd3d970e Author: Carlos Garcia Campos -Date: Wed Apr 21 11:44:49 2010 +0200 +Date: Wed Apr 21 11:44:49 2010 +0200 [cairo] Fix pattern size when bbox is not at 0,0 poppler/CairoOutputDev.cc | 11 +++++++++-- - 1 files changed, 9 insertions(+), 2 deletions(-) + 1 file changed, 9 insertions(+), 2 deletions(-) commit 9c5612f6e013a8698eff6531ec388a7e6c1fb89a Author: Marek Kasik -Date: Fri Feb 12 14:31:01 2010 +0100 +Date: Fri Feb 12 14:31:01 2010 +0100 Distinguish between columns and tables when selecting text @@ -8907,7 +15164,7 @@ commit db014ffb357e760d9397544c5a8fe747cdb497ab Author: Brian Ewins -Date: Mon Nov 23 08:58:19 2009 +0000 +Date: Mon Nov 23 08:58:19 2009 +0000 Select top right to bottom left in RTL mode @@ -8916,12 +15173,12 @@ to still be in reverse order to me. poppler/TextOutputDev.cc | 57 - ++++++++++++++++++++++++++++++++++----------- - 1 files changed, 43 insertions(+), 14 deletions(-) + ++++++++++++++++++++++++++++++++++------------ + 1 file changed, 43 insertions(+), 14 deletions(-) commit b1d43fa052d9160c4f319a67415ecf3ebf2cf9b3 Author: Brian Ewins -Date: Sun Nov 22 09:47:40 2009 +0000 +Date: Sun Nov 22 09:47:40 2009 +0000 Make pdftotext newlines match copy and paste @@ -8932,11 +15189,11 @@ newline at the end of each flow. poppler/TextOutputDev.cc | 17 +++-------------- - 1 files changed, 3 insertions(+), 14 deletions(-) + 1 file changed, 3 insertions(+), 14 deletions(-) commit f83b677a8eb44d65698b77edb13a5c7de3a72c0f Author: Brian Ewins -Date: Thu Nov 12 02:50:29 2009 +0000 +Date: Thu Nov 12 02:50:29 2009 +0000 Use a reading-order sort to order blocks @@ -8948,12 +15205,12 @@ poppler/TextOutputDev.cc | 164 ++++++++++++++++++++++++++++++++++++++++++++-- - poppler/TextOutputDev.h | 8 ++ + poppler/TextOutputDev.h | 8 +++ 2 files changed, 167 insertions(+), 5 deletions(-) commit a2191a4d45e0abaec97c19aacae37c4c5824bd36 Author: Brian Ewins -Date: Mon Nov 9 06:24:51 2009 +0000 +Date: Mon Nov 9 06:24:51 2009 +0000 Separate flow construction from reading order @@ -8966,12 +15223,12 @@ Signed-off-by: Brian Ewins poppler/TextOutputDev.cc | 96 - ++++++++------------------------------------- - 1 files changed, 17 insertions(+), 79 deletions(-) + ++++++++-------------------------------------- + 1 file changed, 17 insertions(+), 79 deletions(-) commit 345ed51af9b9e7ea53af42727b91ed68dcc52370 Author: Brian Ewins -Date: Thu Oct 29 01:46:29 2009 +0000 +Date: Thu Oct 29 01:46:29 2009 +0000 Fix bug 3188, text selection across table cells @@ -8986,12 +15243,12 @@ Signed-off-by: Brian Ewins poppler/TextOutputDev.cc | 334 - ++++++++++++++++++++++++--------------------- - 1 files changed, 178 insertions(+), 156 deletions(-) + ++++++++++++++++++++++++---------------------- + 1 file changed, 178 insertions(+), 156 deletions(-) commit 12d83931ae1b899b70c7ea5c01f03f123b1bb9a8 Author: Carlos Garcia Campos -Date: Sun Apr 18 17:53:48 2010 +0200 +Date: Sun Apr 18 17:53:48 2010 +0200 [cairo] Check pattern status after setting matrix when rendering images @@ -9000,101 +15257,101 @@ http://bugs.kde.org/show_bug.cgi?id=135417. poppler/CairoOutputDev.cc | 34 ++++++++++++++++++++++++++++++++++ - 1 files changed, 34 insertions(+), 0 deletions(-) + 1 file changed, 34 insertions(+) commit ff6d501a2fc887fd49a985161f756d6d6b8e6c0d Author: Carlos Garcia Campos -Date: Sun Apr 18 17:51:42 2010 +0200 +Date: Sun Apr 18 17:51:42 2010 +0200 [cairo] Fix a crash when rendering 0x0 images See kde bug http://bugs.kde.org/show_bug.cgi?id=135417 - poppler/CairoOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.cc | 3 +++ + 1 file changed, 3 insertions(+) commit 84cd2186861436fbaa7c29aa691e69fcd543a1c2 Author: Hib Eris -Date: Tue Apr 13 23:42:28 2010 +0200 +Date: Tue Apr 13 23:42:28 2010 +0200 Properly initialize variable poppler/CachedFile.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 24f244f486f332b0bd76c6525c5d9d03168a76e6 Author: Hib Eris -Date: Tue Apr 13 23:54:28 2010 +0200 +Date: Tue Apr 13 23:54:28 2010 +0200 pdftops: require output filename when reading from stdin utils/pdftops.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 955f9f53ff225f6794a494fdd0f0fe5ee1a41d88 Author: Hib Eris -Date: Tue Apr 13 23:47:40 2010 +0200 +Date: Tue Apr 13 23:47:40 2010 +0200 pdftotext: require output filename when reading from stdin - utils/pdftotext.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + utils/pdftotext.cc | 3 +++ + 1 file changed, 3 insertions(+) commit 31388aa8b5117619878431b7fed2d033000af541 Author: Hib Eris -Date: Tue Apr 13 23:27:20 2010 +0200 +Date: Tue Apr 13 23:27:20 2010 +0200 pdftohtml: require output filename when reading from stdin - utils/pdftohtml.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + utils/pdftohtml.cc | 3 +++ + 1 file changed, 3 insertions(+) commit a8d43ec1c7f5448a7f63d9bbd9062d56ee1c7c58 Author: Albert Astals Cid -Date: Wed Apr 14 19:21:33 2010 +0100 +Date: Wed Apr 14 19:21:33 2010 +0100 update XOPEN_SOURCE to 600 in non standard compile options it seems helps compiling on some BSD - cmake/modules/PopplerMacros.cmake | 2 +- - configure.ac | 2 +- + cmake/modules/PopplerMacros.cmake | 2 +- + configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 4cce1f14e964edf1bf2d9fb8286ee002a67dc212 Author: Albert Astals Cid -Date: Tue Apr 13 21:57:16 2010 +0100 +Date: Tue Apr 13 21:57:16 2010 +0100 include strings.h on non windows platforms poppler/GlobalParams.cc | 2 ++ - test/perf-test.cc | 2 ++ - 2 files changed, 4 insertions(+), 0 deletions(-) + test/perf-test.cc | 2 ++ + 2 files changed, 4 insertions(+) commit 55c76069c52f9f51c6b8c60fe1aa8de499012ea8 Author: Carlos Garcia Campos -Date: Mon Apr 12 19:32:46 2010 +0200 +Date: Mon Apr 12 19:32:46 2010 +0200 [glib] Use existing cairo api when rendering to a pixbuf I should fix bug #5589 for the GDK api too. glib/poppler-page.cc | 227 - ++++++++++++++++++++----------------------------- - 1 files changed, 93 insertions(+), 134 deletions(-) + +++++++++++++++++++++----------------------------- + 1 file changed, 93 insertions(+), 134 deletions(-) commit 51aefe1423a068e8c119c21a8791d265aecbeaf5 Author: Carlos Garcia Campos -Date: Fri Apr 9 12:50:00 2010 +0200 +Date: Fri Apr 9 12:50:00 2010 +0200 [cairo] Implement colorizing image masks with pattern colorspace - poppler/CairoOutputDev.cc | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.cc | 9 +++++++++ + 1 file changed, 9 insertions(+) commit bd8f44289770175a17ac45e4788b0d374cc93d5a Author: Carlos Garcia Campos -Date: Fri Apr 9 12:02:38 2010 +0200 +Date: Fri Apr 9 12:02:38 2010 +0200 Partially revert "[cairo] Do not change device offset of mask surface" @@ -9103,123 +15360,123 @@ It fixed bug #27208, but it's causing regressions on other documents. poppler/CairoOutputDev.cc | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) + 1 file changed, 10 insertions(+), 1 deletion(-) commit bcb405c43fb7140f5d601d00de4d30913a0050ef Author: Carlos Garcia Campos -Date: Thu Apr 8 12:02:48 2010 +0200 +Date: Thu Apr 8 12:02:48 2010 +0200 Pages were always created without forms by Catalog Use getForm() instead of form when creating a page object. - poppler/Catalog.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/Catalog.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit d46581c574b3088a82555cbc3b76e95e2571b9c0 Author: Albert Astals Cid -Date: Wed Apr 7 20:25:23 2010 +0100 +Date: Wed Apr 7 20:25:23 2010 +0100 Fix destructor - poppler/Catalog.cc | 19 +++++++------------ - poppler/Catalog.h | 3 +-- + poppler/Catalog.cc | 19 +++++++------------ + poppler/Catalog.h | 3 +-- 2 files changed, 8 insertions(+), 14 deletions(-) commit ab14433f8b3d7c67f279cece65dfdd40c6675ac0 Author: Hib Eris -Date: Thu Mar 25 15:33:33 2010 +0100 +Date: Thu Mar 25 15:33:33 2010 +0100 Parse Form on demand - poppler/Catalog.cc | 21 +++++++++++++-------- - poppler/Catalog.h | 2 +- + poppler/Catalog.cc | 21 +++++++++++++-------- + poppler/Catalog.h | 2 +- 2 files changed, 14 insertions(+), 9 deletions(-) commit c72a2c7f70b13a7b7b531b3c983d9a9bc104bac7 Author: Hib Eris -Date: Thu Mar 25 17:33:11 2010 +0100 +Date: Thu Mar 25 17:33:11 2010 +0100 Parse Names on demand poppler/Catalog.cc | 112 ++++++++++++++++++++++++++++++++++++++++++---------- - poppler/Catalog.h | 18 ++++++-- + poppler/Catalog.h | 18 ++++++--- 2 files changed, 104 insertions(+), 26 deletions(-) commit 32053360c93607cf9bdc092257cefad5d4df9ec5 Author: Hib Eris -Date: Thu Mar 25 16:32:22 2010 +0100 +Date: Thu Mar 25 16:32:22 2010 +0100 Parse Dests on demand - poppler/Catalog.cc | 27 +++++++++++++++++++++------ - poppler/Catalog.h | 2 +- + poppler/Catalog.cc | 27 +++++++++++++++++++++------ + poppler/Catalog.h | 2 +- 2 files changed, 22 insertions(+), 7 deletions(-) commit da0f8e69eecb944e128474f62829f729eeabd189 Author: Hib Eris -Date: Thu Mar 25 16:48:07 2010 +0100 +Date: Thu Mar 25 16:48:07 2010 +0100 Parse Outline on demand in PDFDoc poppler/PDFDoc.cc | 17 ++++++++++++----- - poppler/PDFDoc.h | 2 +- + poppler/PDFDoc.h | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) commit d7a69c8cad112cb6616d0192d8a4028fdaee2f73 Author: Hib Eris -Date: Thu Mar 25 16:05:02 2010 +0100 +Date: Thu Mar 25 16:05:02 2010 +0100 Parse Outline on demand - poppler/Catalog.cc | 23 ++++++++++++++++++++--- - poppler/Catalog.h | 2 +- + poppler/Catalog.cc | 23 ++++++++++++++++++++--- + poppler/Catalog.h | 2 +- 2 files changed, 21 insertions(+), 4 deletions(-) commit c149e027fa76824221a78fe6d3bf9bfe953491d4 Author: Hib Eris -Date: Thu Mar 25 15:51:51 2010 +0100 +Date: Thu Mar 25 15:51:51 2010 +0100 Parse StructTreeRoot on demand - poppler/Catalog.cc | 22 +++++++++++++++++++--- - poppler/Catalog.h | 2 +- + poppler/Catalog.cc | 22 +++++++++++++++++++--- + poppler/Catalog.h | 2 +- 2 files changed, 20 insertions(+), 4 deletions(-) commit 3c6effe44d6d97f175c2ee7f3913d8c4ba34d612 Author: Hib Eris -Date: Thu Mar 25 14:55:22 2010 +0100 +Date: Thu Mar 25 14:55:22 2010 +0100 Parse Metadata on demand - poppler/Catalog.cc | 16 +++++++++++++--- - 1 files changed, 13 insertions(+), 3 deletions(-) + poppler/Catalog.cc | 16 +++++++++++++--- + 1 file changed, 13 insertions(+), 3 deletions(-) commit 749d67ea2346a3453ef41dc37ba59d419ad900b0 Author: Hib Eris -Date: Thu Mar 25 15:09:58 2010 +0100 +Date: Thu Mar 25 15:09:58 2010 +0100 Parse PageLabelInfo on demand - poppler/Catalog.cc | 37 +++++++++++++++++++++++++++++-------- - poppler/Catalog.h | 3 +++ + poppler/Catalog.cc | 37 +++++++++++++++++++++++++++++-------- + poppler/Catalog.h | 3 +++ 2 files changed, 32 insertions(+), 8 deletions(-) commit 78f7d106714fa489a66c39410163a6902ba24856 Author: Hib Eris -Date: Sat Mar 27 14:43:57 2010 +0100 +Date: Sat Mar 27 14:43:57 2010 +0100 Parse PageMode and PageLayout on demand poppler/Catalog.cc | 109 +++++++++++++++++++++++++++++++++++----------------- - poppler/Catalog.h | 11 +++-- + poppler/Catalog.h | 11 ++++-- 2 files changed, 81 insertions(+), 39 deletions(-) commit f5dd5be64d09186ee289632c1a61979d15edd605 Author: Carlos Garcia Campos -Date: Wed Apr 7 19:48:39 2010 +0200 +Date: Wed Apr 7 19:48:39 2010 +0200 Fix saving update docs that have a compressed xref table @@ -9232,96 +15489,96 @@ Fixes bug #27450. - poppler/PDFDoc.cc | 9 ++++----- - 1 files changed, 4 insertions(+), 5 deletions(-) + poppler/PDFDoc.cc | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) commit 3f302fdd78cd78873bf5376af84e83741a8daadb Author: Pino Toscano -Date: Tue Apr 6 23:58:46 2010 +0200 +Date: Tue Apr 6 23:58:46 2010 +0200 use a GooVector instead of a non-standard variable-length-array poppler/CachedFile.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 425a62b5fa8e4e69bfc1c64ed126b5baac06d78a Author: Hib Eris -Date: Tue Apr 6 10:57:30 2010 +0200 +Date: Tue Apr 6 10:57:30 2010 +0200 pdfutils: fix deleting fileName - utils/pdfinfo.cc | 2 +- - utils/pdftoabw.cc | 2 +- + utils/pdfinfo.cc | 2 +- + utils/pdftoabw.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) commit 198c9d61ba93ba62ea2da44a23cd948d43556c3e Author: Albert Astals Cid -Date: Tue Apr 6 22:00:14 2010 +0100 +Date: Tue Apr 6 22:00:14 2010 +0100 Use the topleft of the Rect of text annots to draw Not use the full rect when we are drawing "our" notes poppler/Annot.cc | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + 1 file changed, 7 insertions(+), 2 deletions(-) commit 1422802f029483ad3e62a3a13e66b2d3990ac58f Author: Carlos Garcia Campos -Date: Tue Apr 6 12:32:12 2010 +0200 +Date: Tue Apr 6 12:32:12 2010 +0200 [cairo] Use current fill_opacity when drawing soft masked images Fixes GNOME Bug https://bugzilla.gnome.org/show_bug.cgi?id=614915 poppler/CairoOutputDev.cc | 27 ++++++++++++++++++++------- - 1 files changed, 20 insertions(+), 7 deletions(-) + 1 file changed, 20 insertions(+), 7 deletions(-) commit c152d30f879e6cde45de58bb9249035e127e84e7 Author: Hib Eris -Date: Mon Apr 5 18:55:29 2010 +0200 +Date: Mon Apr 5 18:55:29 2010 +0200 delete fileName in utils - utils/pdftohtml.cc | 1 + - utils/pdftops.cc | 1 + - utils/pdftotext.cc | 1 + - 3 files changed, 3 insertions(+), 0 deletions(-) + utils/pdftohtml.cc | 1 + + utils/pdftops.cc | 1 + + utils/pdftotext.cc | 1 + + 3 files changed, 3 insertions(+) commit f091c83414ab32a4ecf1fa2bd15f13a3cf113a86 Author: Hib Eris -Date: Mon Apr 5 20:12:01 2010 +0100 +Date: Mon Apr 5 20:12:01 2010 +0100 add some docu - poppler/CachedFile.h | 30 ++++++++++++++++++++++++++++++ + poppler/CachedFile.h | 30 ++++++++++++++++++++++++++++++ poppler/CurlPDFDocBuilder.h | 2 ++ poppler/LocalPDFDocBuilder.h | 2 ++ poppler/PDFDocBuilder.h | 9 +++++++++ poppler/PDFDocFactory.h | 12 ++++++++++++ poppler/StdinPDFDocBuilder.h | 2 ++ - 6 files changed, 57 insertions(+), 0 deletions(-) + 6 files changed, 57 insertions(+) commit fc071d800cb4329a3ccf898d7bf16b4db7323ad8 Author: Albert Astals Cid -Date: Mon Apr 5 19:11:26 2010 +0100 +Date: Mon Apr 5 19:11:26 2010 +0100 Rework DCTStream error handling, should work better now Fixes bug 26280 - poppler/DCTStream.cc | 35 ++++++++++++++--------------------- - poppler/DCTStream.h | 5 +++-- + poppler/DCTStream.cc | 35 ++++++++++++++--------------------- + poppler/DCTStream.h | 5 +++-- utils/HtmlOutputDev.cc | 4 ++-- 3 files changed, 19 insertions(+), 25 deletions(-) commit a9d801b2db20ecb08734ee5cdb703abf11994b6e Author: Albert Astals Cid -Date: Mon Apr 5 16:55:02 2010 +0100 +Date: Mon Apr 5 16:55:02 2010 +0100 Make some paremeters const & to clearly show we just read them - poppler/CachedFile.cc | 18 ++++++++++-------- - poppler/CachedFile.h | 8 +++++--- + poppler/CachedFile.cc | 18 ++++++++++-------- + poppler/CachedFile.h | 8 +++++--- poppler/CurlCachedFile.cc | 9 +++++---- poppler/CurlCachedFile.h | 3 ++- poppler/CurlPDFDocBuilder.cc | 9 +++++---- @@ -9335,37 +15592,37 @@ poppler/StdinCachedFile.h | 3 ++- poppler/StdinPDFDocBuilder.cc | 7 ++++--- poppler/StdinPDFDocBuilder.h | 5 +++-- - utils/pdffonts.cc | 4 ++-- - utils/pdfimages.cc | 4 ++-- - utils/pdfinfo.cc | 4 ++-- - utils/pdftoabw.cc | 4 ++-- - utils/pdftohtml.cc | 4 ++-- - utils/pdftoppm.cc | 2 +- - utils/pdftops.cc | 4 ++-- - utils/pdftotext.cc | 4 ++-- + utils/pdffonts.cc | 4 ++-- + utils/pdfimages.cc | 4 ++-- + utils/pdfinfo.cc | 4 ++-- + utils/pdftoabw.cc | 4 ++-- + utils/pdftohtml.cc | 4 ++-- + utils/pdftoppm.cc | 2 +- + utils/pdftops.cc | 4 ++-- + utils/pdftotext.cc | 4 ++-- 23 files changed, 76 insertions(+), 59 deletions(-) commit a04ee3ea6066c97d41fc40d5d97c600a1870855a Author: Albert Astals Cid -Date: Mon Apr 5 16:50:58 2010 +0100 +Date: Mon Apr 5 16:50:58 2010 +0100 forgot my (C) poppler/Form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ed723c8ac4a21a50d7d236cdcf7a635defd8dffb Author: Albert Astals Cid -Date: Mon Apr 5 16:50:15 2010 +0100 +Date: Mon Apr 5 16:50:15 2010 +0100 The copy constructor of GooString never worked, so do not use it poppler/Form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a28be8e4009b86fdfd92da928def194225a736c6 Author: Albert Astals Cid -Date: Mon Apr 5 16:49:06 2010 +0100 +Date: Mon Apr 5 16:49:06 2010 +0100 Add some const correctnes to GooString @@ -9375,165 +15632,165 @@ commit 46aee9e4d225b88a3dfd4afbe57259f337bb15d3 Author: Hib Eris -Date: Mon Apr 5 14:36:09 2010 +0200 +Date: Mon Apr 5 14:36:09 2010 +0200 Use PDFDocFactory in utils - utils/pdffonts.cc | 16 ++++++++-------- - utils/pdfimages.cc | 11 ++++++++++- - utils/pdfinfo.cc | 31 +++++++------------------------ - utils/pdftoabw.cc | 10 +++++++++- - utils/pdftohtml.cc | 10 +++++++++- - utils/pdftoppm.cc | 17 +++++++++++------ - utils/pdftops.cc | 9 ++++++++- - utils/pdftotext.cc | 14 +++++++------- + utils/pdffonts.cc | 16 ++++++++-------- + utils/pdfimages.cc | 11 ++++++++++- + utils/pdfinfo.cc | 31 +++++++------------------------ + utils/pdftoabw.cc | 10 +++++++++- + utils/pdftohtml.cc | 10 +++++++++- + utils/pdftoppm.cc | 17 +++++++++++------ + utils/pdftops.cc | 9 ++++++++- + utils/pdftotext.cc | 14 +++++++------- 8 files changed, 69 insertions(+), 49 deletions(-) commit d487a90688c4431075c9e4db040b3b02625e208f Author: Hib Eris -Date: Mon Apr 5 14:35:52 2010 +0200 +Date: Mon Apr 5 14:35:52 2010 +0200 Add PDFDocFactory - CMakeLists.txt | 2 + - poppler/Makefile.am | 2 + + CMakeLists.txt | 2 ++ + poppler/Makefile.am | 2 ++ poppler/PDFDocFactory.cc | 71 ++++++++++++++++++++++++++++++++++++++++++++++ poppler/PDFDocFactory.h | 42 +++++++++++++++++++++++++++ - 4 files changed, 117 insertions(+), 0 deletions(-) + 4 files changed, 117 insertions(+) commit 869135920831fb0d15db734f3dcd7a67146cc241 Author: Hib Eris -Date: Wed Feb 24 15:24:26 2010 +0100 +Date: Wed Feb 24 15:24:26 2010 +0100 Add CurlPDFDocBuilder - CMakeLists.txt | 2 + + CMakeLists.txt | 2 ++ poppler/CurlPDFDocBuilder.cc | 46 ++++++++++++++++++++++++++++++++++++++++++ poppler/CurlPDFDocBuilder.h | 30 +++++++++++++++++++++++++++ - poppler/Makefile.am | 6 +++- + poppler/Makefile.am | 6 ++++-- 4 files changed, 82 insertions(+), 2 deletions(-) commit ec5c6117a64f9cb03560091c4d7948d4287b6975 Author: Hib Eris -Date: Thu Feb 25 11:23:28 2010 +0100 +Date: Thu Feb 25 11:23:28 2010 +0100 Add LocalPDFDocBuilder and StdinPDFDocBuilder - CMakeLists.txt | 4 +++ + CMakeLists.txt | 4 ++++ poppler/LocalPDFDocBuilder.cc | 45 +++++++++++++++++++++++++++++++++++++++++ poppler/LocalPDFDocBuilder.h | 30 +++++++++++++++++++++++++++ - poppler/Makefile.am | 4 +++ + poppler/Makefile.am | 4 ++++ poppler/StdinPDFDocBuilder.cc | 42 ++++++++++++++++++++++++++++++++++++++ poppler/StdinPDFDocBuilder.h | 30 +++++++++++++++++++++++++++ - 6 files changed, 155 insertions(+), 0 deletions(-) + 6 files changed, 155 insertions(+) commit 919b735d1c0b99bf72280aff8db87ba503954498 Author: Hib Eris -Date: Sun Apr 4 11:05:35 2010 +0200 +Date: Sun Apr 4 11:05:35 2010 +0200 Add PDFDocBuilder - CMakeLists.txt | 1 + - poppler/Makefile.am | 1 + + CMakeLists.txt | 1 + + poppler/Makefile.am | 1 + poppler/PDFDocBuilder.h | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 34 insertions(+), 0 deletions(-) + 3 files changed, 34 insertions(+) commit 1ab07faf05661d6d92186974c4b1c279b6178747 Author: Hib Eris -Date: Sun Apr 4 11:29:53 2010 +0200 +Date: Sun Apr 4 11:29:53 2010 +0200 Add PDFDoc::ErrorPDFDoc poppler/PDFDoc.cc | 14 ++++++++++++++ - poppler/PDFDoc.h | 3 +++ - 2 files changed, 17 insertions(+), 0 deletions(-) + poppler/PDFDoc.h | 3 +++ + 2 files changed, 17 insertions(+) commit efc7e5efeddd8f70b7c74573d3194aba0a7d4631 Author: Hib Eris -Date: Sun Apr 4 11:17:37 2010 +0200 +Date: Sun Apr 4 11:17:37 2010 +0200 Cleanup PDFDoc poppler/PDFDoc.cc | 40 +++++++++++++++------------------------- - poppler/PDFDoc.h | 3 ++- + poppler/PDFDoc.h | 3 ++- 2 files changed, 17 insertions(+), 26 deletions(-) commit 08a3435e67ebf21beac2fefcbd21ad65f9293fd1 Author: Hib Eris -Date: Tue Feb 23 02:29:26 2010 +0100 +Date: Tue Feb 23 02:29:26 2010 +0100 Add HTTP support using libcurl With libcurl, poppler can handle documents over http. - CMakeLists.txt | 18 ++++++++ - config.h.cmake | 6 +++ - configure.ac | 16 +++++++ - poppler/CurlCachedFile.cc | 95 + CMakeLists.txt | 18 ++++++++ + config.h.cmake | 6 +++ + configure.ac | 16 +++++++ + poppler/CurlCachedFile.cc | 95 ++++++++++++++++++++++++++++++++++++++++ - poppler/CurlCachedFile.h | 39 ++++++++++++++++ - poppler/Makefile.am | 20 ++++++++ - poppler/poppler-config.h.cmake | 5 ++ - poppler/poppler-config.h.in | 5 ++ - utils/pdfinfo.cc | 16 ++++++- - 9 files changed, 219 insertions(+), 1 deletions(-) + poppler/CurlCachedFile.h | 39 +++++++++++++++++ + poppler/Makefile.am | 20 +++++++++ + poppler/poppler-config.h.cmake | 5 +++ + poppler/poppler-config.h.in | 5 +++ + utils/pdfinfo.cc | 16 ++++++- + 9 files changed, 219 insertions(+), 1 deletion(-) commit a87abf6ad9fb66d35a70c9412adc5d8ba2889b96 Author: Hib Eris -Date: Wed Feb 24 14:46:59 2010 +0100 +Date: Wed Feb 24 14:46:59 2010 +0100 Use cached files to read from stdin in pdfinfo This fixes reading from stdin. utils/pdfinfo.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit 958b04b14baf03c07492fa1cbd225d9968b9efc1 Author: Hib Eris -Date: Tue Feb 23 02:02:10 2010 +0100 +Date: Tue Feb 23 02:02:10 2010 +0100 Add support for reading a cached file from stdin - CMakeLists.txt | 2 ++ - poppler/Makefile.am | 2 ++ - poppler/StdinCachedFile.cc | 37 +++++++++++++++++++++++++++++++++++++ - poppler/StdinCachedFile.h | 26 ++++++++++++++++++++++++++ - 4 files changed, 67 insertions(+), 0 deletions(-) + CMakeLists.txt | 2 ++ + poppler/Makefile.am | 2 ++ + poppler/StdinCachedFile.cc | 37 +++++++++++++++++++++++++++++++++++++ + poppler/StdinCachedFile.h | 26 ++++++++++++++++++++++++++ + 4 files changed, 67 insertions(+) commit 9539f75bd06150a3868209c5b04a75f5253722cc Author: Hib Eris -Date: Sat Apr 3 15:08:20 2010 +0200 +Date: Sat Apr 3 15:08:20 2010 +0200 Add support for cached files CMakeLists.txt | 2 + poppler/CachedFile.cc | 246 +++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/CachedFile.h | 113 ++++++++++++++++++++++ + poppler/CachedFile.h | 113 +++++++++++++++++++++++ poppler/Makefile.am | 2 + poppler/Stream.cc | 102 ++++++++++++++++++++ poppler/Stream.h | 58 ++++++++++++ - 6 files changed, 523 insertions(+), 0 deletions(-) + 6 files changed, 523 insertions(+) commit 8c6aefb8aa8929b9c47791d3062ed3ac8512626f Author: Carlos Garcia Campos -Date: Sun Apr 4 16:08:12 2010 +0200 +Date: Sun Apr 4 16:08:12 2010 +0200 [lexer] Correctly parse numbers with '+' sign See GNOME Bug: https://bugzilla.gnome.org/show_bug.cgi?id=614549 poppler/Lexer.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit ab5044e451e3714d385295f0b4ce9a15c8f2562c Author: Albert Astals Cid -Date: Sun Apr 4 12:32:42 2010 +0100 +Date: Sun Apr 4 12:32:42 2010 +0100 Add the -o[dd] and -e[ven] options to pdftoppm @@ -9541,24 +15798,24 @@ unapply it each time - utils/pdftoppm.1 | 6 ++++++ - utils/pdftoppm.cc | 8 ++++++++ - 2 files changed, 14 insertions(+), 0 deletions(-) + utils/pdftoppm.1 | 6 ++++++ + utils/pdftoppm.cc | 8 ++++++++ + 2 files changed, 14 insertions(+) commit 0e371fb628a7e7d0cc1656e6405af4c97dbebf5d Author: Albert Astals Cid -Date: Sun Apr 4 12:30:34 2010 +0100 +Date: Sun Apr 4 12:30:34 2010 +0100 Fix my roll optimization Thanks Carlos for noticing - poppler/Function.cc | 12 +++++++----- - 1 files changed, 7 insertions(+), 5 deletions(-) + poppler/Function.cc | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) commit a32f6f9ebaed3e4827b9dc6cb37e307c2798f521 Author: Carlos Garcia Campos -Date: Sun Mar 28 18:43:14 2010 +0200 +Date: Sun Mar 28 18:43:14 2010 +0200 [cairo] Do not change device offset of mask surface @@ -9567,33 +15824,33 @@ Fixes bug #27208. poppler/CairoOutputDev.cc | 13 ++----------- - 1 files changed, 2 insertions(+), 11 deletions(-) + 1 file changed, 2 insertions(+), 11 deletions(-) commit efa5d9544d29252e3df36cc4e65c3d880b3c5172 Author: Albert Astals Cid -Date: Sat Mar 27 22:11:49 2010 +0000 +Date: Sat Mar 27 22:11:49 2010 +0000 remove empty section NEWS | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + 1 file changed, 2 deletions(-) commit 5722df7a5387e43ec73f659ca58d2d07b9c4be3b Author: Albert Astals Cid -Date: Sat Mar 27 22:04:43 2010 +0000 +Date: Sat Mar 27 22:04:43 2010 +0000 poppler 0.13.2 CMakeLists.txt | 2 +- - NEWS | 39 +++++++++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- + NEWS | 39 +++++++++++++++++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 5 files changed, 43 insertions(+), 4 deletions(-) commit b82fd707747b9d87ebf3c8f7ce5ab70ccdf82809 Author: Albert Astals Cid -Date: Sat Mar 27 22:00:58 2010 +0000 +Date: Sat Mar 27 22:00:58 2010 +0000 gtk-doc changes @@ -9601,44 +15858,44 @@ glib/reference/tmpl/poppler-annot.sgml | 9 --------- glib/reference/tmpl/poppler-private.sgml | 10 ++++++++++ glib/reference/tmpl/poppler-unused.sgml | 8 ++++++++ - glib/reference/tmpl/poppler.sgml | 10 ++++++++++ + glib/reference/tmpl/poppler.sgml | 10 ++++++++++ 5 files changed, 31 insertions(+), 13 deletions(-) commit ed0354be4eac615b80e7a868984cc527853788b4 Author: Albert Astals Cid -Date: Sat Mar 27 21:44:59 2010 +0000 +Date: Sat Mar 27 21:44:59 2010 +0000 some forgotten copyrights - qt/poppler-page.cc | 2 +- - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-movie.cc | 3 ++- - qt4/src/poppler-page.cc | 2 +- + qt/poppler-page.cc | 2 +- + qt4/src/poppler-document.cc | 2 +- + qt4/src/poppler-movie.cc | 3 ++- + qt4/src/poppler-page.cc | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) commit 2aedeedf9ef2e2d3eb17bc36d728e68c2f7af762 Author: Hib Eris -Date: Sat Mar 27 14:38:27 2010 +0000 +Date: Sat Mar 27 14:38:27 2010 +0000 Correctly initialize actualText poppler/TextOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit b53f9b203598555d6d706c3804aba013b8566921 Author: Jan Engelhardt -Date: Sat Mar 27 13:23:42 2010 +0000 +Date: Sat Mar 27 13:23:42 2010 +0000 make qt3 detection use pkgconfig - m4/qt.m4 | 101 - ++++--------------------------------------------------- - qt/Makefile.am | 4 +- + m4/qt.m4 | 101 + +++++--------------------------------------------------- + qt/Makefile.am | 4 +-- 2 files changed, 10 insertions(+), 95 deletions(-) commit 320d4cee46e108498440179d8f9eab22cd5383d9 Author: Pino Toscano -Date: Wed Mar 24 21:51:58 2010 +0100 +Date: Wed Mar 24 21:51:58 2010 +0100 Revert "no more needed" @@ -9646,11 +15903,11 @@ It is actually needed. cpp/tests/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit af21b5ab366bfdda203c26a77f4ae6ed0e70f64e Author: Pino Toscano -Date: Tue Mar 23 00:13:21 2010 +0100 +Date: Tue Mar 23 00:13:21 2010 +0100 [CMake] remove the (now) unneeded stuff from Find{GLIB,GDK,GTK}.cmake, and search for them @@ -9658,7 +15915,7 @@ this way each bit (GLIB, GDK, and GTK) can be enabled/disabled independently from the others - CMakeLists.txt | 4 +++- + CMakeLists.txt | 4 +++- cmake/modules/FindGDK.cmake | 14 +------------- cmake/modules/FindGLIB.cmake | 14 +------------- cmake/modules/FindGTK.cmake | 14 +------------- @@ -9666,7 +15923,7 @@ commit 9b93ed5ce6712ec4cdf58148628e95685c289ef5 Author: Pino Toscano -Date: Tue Mar 23 00:02:27 2010 +0100 +Date: Tue Mar 23 00:02:27 2010 +0100 [CMake] copy FindGTK.cmake as FindGLIB.cmake and FindGDK.cmake @@ -9674,67 +15931,67 @@ cmake/modules/FindGDK.cmake | 34 ++++++++++++++++++++++++++++++++++ cmake/modules/FindGLIB.cmake | 34 ++++++++++++++++++++++++++++++++++ - 2 files changed, 68 insertions(+), 0 deletions(-) + 2 files changed, 68 insertions(+) commit 0ec21cae0b4623644c3efca1d2836a9f38f25737 Author: Pino Toscano -Date: Mon Mar 22 22:11:04 2010 +0100 +Date: Mon Mar 22 22:11:04 2010 +0100 [Qt] add the unhandled cases for 'actionOCGState' - qt/poppler-page.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + qt/poppler-page.cc | 1 + + 1 file changed, 1 insertion(+) commit 5211e09595135b8e6c68efd1b8b689b518092b84 Author: Pino Toscano -Date: Mon Mar 22 22:07:44 2010 +0100 +Date: Mon Mar 22 22:07:44 2010 +0100 [CMake/cpp] move the BUILD_CPP_TESTS option to the main CMakeLists.txt - CMakeLists.txt | 1 + + CMakeLists.txt | 1 + cpp/tests/CMakeLists.txt | 3 --- - 2 files changed, 1 insertions(+), 3 deletions(-) + 2 files changed, 1 insertion(+), 3 deletions(-) commit 24d6bc8c78cb3148db2098ae4d69bd744340cf52 Author: Pino Toscano -Date: Mon Mar 22 22:00:55 2010 +0100 +Date: Mon Mar 22 22:00:55 2010 +0100 no more needed cpp/tests/CMakeLists.txt | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit a07ef8f703ab896f89ed211a5780e4a669b04fc7 Author: Pino Toscano -Date: Mon Mar 22 22:00:15 2010 +0100 +Date: Mon Mar 22 22:00:15 2010 +0100 [CMake] revert addition of "-Wl,--no-add-needed" to the link flags, if available for now it is safer without it - cmake/modules/PopplerMacros.cmake | 6 ------ - 1 files changed, 0 insertions(+), 6 deletions(-) + cmake/modules/PopplerMacros.cmake | 6 ------ + 1 file changed, 6 deletions(-) commit 86debcc9bba28a7c86f01ca9e63bde5fcd541846 Author: Pino Toscano -Date: Mon Mar 22 21:49:22 2010 +0100 +Date: Mon Mar 22 21:49:22 2010 +0100 [CMake] add "-ansi" to the CXXFLAGS only on Linux - cmake/modules/PopplerMacros.cmake | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + cmake/modules/PopplerMacros.cmake | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) commit 0819acd52a2ce74f0e176626d7b2233e10232d53 Merge: c4ddbe8 92738eb Author: Pino Toscano -Date: Mon Mar 22 21:43:01 2010 +0100 +Date: Mon Mar 22 21:43:01 2010 +0100 Merge branch 'master' of ssh://git.freedesktop.org/git/poppler/poppler commit 92738ebb8a9c7cfc879aae59c2cbdf3159f03cd3 Author: Albert Astals Cid -Date: Mon Mar 22 20:28:15 2010 +0000 +Date: Mon Mar 22 20:28:15 2010 +0000 Add a search overload that takes doubles @@ -9742,23 +15999,23 @@ infinitely because of double->float conversion qt4/src/poppler-page.cc | 22 +++++++++++++++------- - qt4/src/poppler-qt4.h | 16 ++++++++++++++-- + qt4/src/poppler-qt4.h | 16 ++++++++++++++-- 2 files changed, 29 insertions(+), 9 deletions(-) commit 0a895f14c8125c5de7b97e8e799459c431eb51cb Author: Thomas Freitag -Date: Mon Mar 22 19:03:54 2010 +0000 +Date: Mon Mar 22 19:03:54 2010 +0000 correctly initialize the grayscale softmask color Fixes file with sha1sum e6e1576803a1bd74ad822eebbd750ee7b8357d25 - poppler/SplashOutputDev.cc | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + poppler/SplashOutputDev.cc | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) commit c4ddbe89df9e48343a9606728b7c182080d87ece Author: Patrick Spendrin -Date: Sat Mar 20 21:55:17 2010 +0100 +Date: Sat Mar 20 21:55:17 2010 +0100 [CMake] when the conf configuration backend is "win32", set the required Internet Explorer version to 5.0 @@ -9766,11 +16023,11 @@ ... as done with autotools as well CMakeLists.txt | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 97da1f9d060493d9fb54a20e980c3f6e2b82c97e Author: Pino Toscano -Date: Sat Mar 20 17:51:07 2010 +0100 +Date: Sat Mar 20 17:51:07 2010 +0100 [CMake] check whether a link flag is supported before adding it to the link flags @@ -9779,11 +16036,11 @@ the current GCC/LD supports them cmake/modules/PopplerMacros.cmake | 23 ++++++++++++++++++++--- - 1 files changed, 20 insertions(+), 3 deletions(-) + 1 file changed, 20 insertions(+), 3 deletions(-) commit 223bce6d14e632f457a81b2ec091fe16369d2eb6 Author: Pino Toscano -Date: Sat Mar 20 14:08:58 2010 +0100 +Date: Sat Mar 20 14:08:58 2010 +0100 [CMake] with GCC, pass --as-needed and --no-add-needed to the linker @@ -9793,52 +16050,52 @@ automatically, so we have to always make sure we specify all the libraries actually used in a exe/lib - cmake/modules/PopplerMacros.cmake | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + cmake/modules/PopplerMacros.cmake | 4 ++++ + 1 file changed, 4 insertions(+) commit fc761f0d385708daaef1b95968532795b04f11b0 Author: Pino Toscano -Date: Sat Mar 20 14:05:59 2010 +0100 +Date: Sat Mar 20 14:05:59 2010 +0100 [CMake] poppler-dump uses parseargs.c which uses the poppler core API, so it must link to it cpp/tests/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit a210440b05d14efc53224a10e8b3ac7d508043b5 Author: Pino Toscano -Date: Sat Mar 20 14:04:02 2010 +0100 +Date: Sat Mar 20 14:04:02 2010 +0100 [CMake] poppler-glib uses the freetype API, so it must explicitly link to it - glib/CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + glib/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit f5d352666b92cee0390470d7b892ec8dcbf046a5 Author: Pino Toscano -Date: Sat Mar 20 14:03:19 2010 +0100 +Date: Sat Mar 20 14:03:19 2010 +0100 [CMake] pdftoabw uses the libxml2 API, so it must explicitly link to it utils/CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3fc2c4affe825f4aabcee161ec794338bd359403 Author: Carlos Garcia Campos -Date: Thu Mar 18 13:52:52 2010 +0100 +Date: Thu Mar 18 13:52:52 2010 +0100 [glib] Use g_slice_new/free instead of g_new/free to alloc/free iterators glib/poppler-document.cc | 27 +++++++++++++-------------- - 1 files changed, 13 insertions(+), 14 deletions(-) + 1 file changed, 13 insertions(+), 14 deletions(-) commit 7bd6a8558646983669ce699f83d5ed42d7fce476 Author: Carlos Garcia Campos -Date: Thu Mar 18 13:34:03 2010 +0100 +Date: Thu Mar 18 13:34:03 2010 +0100 [glib] Move find_annot_movie_for_action() from page to action @@ -9846,45 +16103,45 @@ glib/poppler-action.cc | 93 ++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.cc | 79 ---------------------------------------- - glib/poppler-private.h | 2 - + glib/poppler-page.cc | 79 ---------------------------------------- + glib/poppler-private.h | 2 -- 3 files changed, 82 insertions(+), 92 deletions(-) commit e5e3d310aa488638431dd85ac3383a12056674bf Author: Carlos Garcia Campos -Date: Thu Mar 18 12:20:26 2010 +0100 +Date: Thu Mar 18 12:20:26 2010 +0100 Update copyright header poppler/Link.cc | 2 +- poppler/Link.h | 1 + - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit c76870178a031e437de3f9ed7baa64efb96955d6 Author: Carlos Garcia Campos -Date: Thu Mar 18 12:13:36 2010 +0100 +Date: Thu Mar 18 12:13:36 2010 +0100 [glib-demo] OCG State Actions demo glib/demo/utils.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 64 insertions(+), 0 deletions(-) + 1 file changed, 64 insertions(+) commit 456e42f91dfbf73b71a5dbdde13d7ccdb5637d79 Author: Carlos Garcia Campos -Date: Thu Mar 18 12:12:51 2010 +0100 +Date: Thu Mar 18 12:12:51 2010 +0100 [glib] Add support for OCG State actions glib/poppler-action.cc | 125 ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-action.h | 25 +++++++++- - glib/poppler.h | 1 + - 3 files changed, 150 insertions(+), 1 deletions(-) + glib/poppler-action.h | 25 +++++++++- + glib/poppler.h | 1 + + 3 files changed, 150 insertions(+), 1 deletion(-) commit 4b109899e0732bbf65cacd875829e869e61eda48 Author: Carlos Garcia Campos -Date: Thu Mar 18 12:10:19 2010 +0100 +Date: Thu Mar 18 12:10:19 2010 +0100 [glib] Make get_layer_rbgroup() and get_layers() doc funcs public for internal use @@ -9895,7 +16152,7 @@ commit 38a55f6118debf994ce1fc41e987b0e3766047ba Author: Carlos Garcia Campos -Date: Thu Mar 18 12:08:30 2010 +0100 +Date: Thu Mar 18 12:08:30 2010 +0100 Add support for Set-OCG-State actions @@ -9904,40 +16161,40 @@ poppler/Link.cc | 80 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Link.h | 31 +++++++++++++++++++++ - 2 files changed, 111 insertions(+), 0 deletions(-) + 2 files changed, 111 insertions(+) commit bf398e53b0823d0a6272679858b67c5ffd704425 Author: Pino Toscano -Date: Wed Mar 17 23:06:44 2010 +0100 +Date: Wed Mar 17 23:06:44 2010 +0100 [CMake] fix pkg-config executable variable name CMakeLists.txt | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit ab1a37666704d6b15c19b694ee191327847c23da Author: Pino Toscano -Date: Wed Mar 17 23:04:01 2010 +0100 +Date: Wed Mar 17 23:04:01 2010 +0100 [CMake] proper way of looking for pkg-config - cmake/modules/FindGTK.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + cmake/modules/FindGTK.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit 7f07a7dcea031f99a9a6d7c424184a2e69ee0062 Author: Pino Toscano -Date: Wed Mar 17 22:58:08 2010 +0100 +Date: Wed Mar 17 22:58:08 2010 +0100 [CMake] update FindFontconfig.cmake with a more recent version ... present in KDE (as before) - cmake/modules/FindFontconfig.cmake | 15 +++++++++------ - 1 files changed, 9 insertions(+), 6 deletions(-) + cmake/modules/FindFontconfig.cmake | 15 +++++++++------ + 1 file changed, 9 insertions(+), 6 deletions(-) commit beee143ffbdc699ab19f10a01e5747200ea1927a Author: Pino Toscano -Date: Wed Mar 17 18:36:32 2010 +0100 +Date: Wed Mar 17 18:36:32 2010 +0100 [CMake] set the LINK_INTERFACE_LIBRARIES for the poppler and poppler-cpp libraries @@ -9945,13 +16202,13 @@ this should reduce the libraries linked by frontends and utility applications - CMakeLists.txt | 1 + - cpp/CMakeLists.txt | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + CMakeLists.txt | 1 + + cpp/CMakeLists.txt | 1 + + 2 files changed, 2 insertions(+) commit 5ab791cb2a029edcde84b00a47165adfe4d98a98 Author: Pino Toscano -Date: Wed Mar 17 16:39:38 2010 +0100 +Date: Wed Mar 17 16:39:38 2010 +0100 [CMake] small cleanups in FindGTK.cmake @@ -9959,157 +16216,157 @@ - add my copyright for this year - remove no more useful UsePkgConfig inclusion - cmake/modules/FindGTK.cmake | 17 ++++++++++++----- - 1 files changed, 12 insertions(+), 5 deletions(-) + cmake/modules/FindGTK.cmake | 17 ++++++++++++----- + 1 file changed, 12 insertions(+), 5 deletions(-) commit fcbc76d82e3059c8288fbdc8da117ac9b38a70f2 Author: Pino Toscano -Date: Wed Mar 17 16:36:41 2010 +0100 +Date: Wed Mar 17 16:36:41 2010 +0100 [CMake] switch gtk2 (gtk+, gdk-pixbuf, gthread, gio) search to use the new pkg_check_modules() way - cmake/modules/FindGTK.cmake | 27 ++------------------------- - 1 files changed, 2 insertions(+), 25 deletions(-) + cmake/modules/FindGTK.cmake | 27 ++------------------------- + 1 file changed, 2 insertions(+), 25 deletions(-) commit 5b8135e0899aa3578045eca40940a3495c48d895 Author: Pino Toscano -Date: Wed Mar 17 16:27:40 2010 +0100 +Date: Wed Mar 17 16:27:40 2010 +0100 [CMake] link poppler-glib to the gdk2 libraries, if gdk2 was found - glib/CMakeLists.txt | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + glib/CMakeLists.txt | 3 +++ + 1 file changed, 3 insertions(+) commit 3dc4979d72048e81ae3b2d60dab11e791ac95696 Author: Pino Toscano -Date: Wed Mar 17 16:26:04 2010 +0100 +Date: Wed Mar 17 16:26:04 2010 +0100 [CMake] switch gdk2 search to use the new pkg_check_modules() way - cmake/modules/FindGTK.cmake | 13 +------------ - 1 files changed, 1 insertions(+), 12 deletions(-) + cmake/modules/FindGTK.cmake | 13 +------------ + 1 file changed, 1 insertion(+), 12 deletions(-) commit 0ef3d899cb8dea75c97ae1038cac5006f97bc0d2 Author: Pino Toscano -Date: Wed Mar 17 16:05:07 2010 +0100 +Date: Wed Mar 17 16:05:07 2010 +0100 [CMake] switch glib2 search to use the new pkg_check_modules() way - cmake/modules/FindGTK.cmake | 18 ++---------------- - 1 files changed, 2 insertions(+), 16 deletions(-) + cmake/modules/FindGTK.cmake | 18 ++---------------- + 1 file changed, 2 insertions(+), 16 deletions(-) commit d2dc83cb8de481e44ea584eee77881978af920fa Author: Pino Toscano -Date: Wed Mar 17 15:56:16 2010 +0100 +Date: Wed Mar 17 15:56:16 2010 +0100 [CMake] rename GLIB_VERSION to GLIB_REQUIRED this way it matches autotools, and it is going to not conflict with my next changes - CMakeLists.txt | 4 ++-- - cmake/modules/FindGTK.cmake | 2 +- + CMakeLists.txt | 4 ++-- + cmake/modules/FindGTK.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) commit 34accfe27305cae18e09243ab2a607287b86fa47 Author: Pino Toscano -Date: Wed Mar 17 13:55:09 2010 +0100 +Date: Wed Mar 17 13:55:09 2010 +0100 [CMake] set all the definitions for poppler-glib in a single place - glib/CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + glib/CMakeLists.txt | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit 3d93daf50c61019ca70f42e7ccf33897800b262a Author: Pino Toscano -Date: Wed Mar 17 13:49:22 2010 +0100 +Date: Wed Mar 17 13:49:22 2010 +0100 [CMake] no need to check for BUILD_GTK_TESTS for single tests poppler_add_test(... BUILD_GTK_TESTS ...) takes care of that already - glib/CMakeLists.txt | 4 ++-- - test/CMakeLists.txt | 4 ++-- + glib/CMakeLists.txt | 4 ++-- + test/CMakeLists.txt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) commit 946a11345d01d39538d22114e50aa3e179059883 Author: Carlos Garcia Campos -Date: Mon Mar 15 20:24:25 2010 +0100 +Date: Mon Mar 15 20:24:25 2010 +0100 [build] Update cmake files - CMakeLists.txt | 2 ++ - glib/CMakeLists.txt | 4 ++++ - 2 files changed, 6 insertions(+), 0 deletions(-) + CMakeLists.txt | 2 ++ + glib/CMakeLists.txt | 4 ++++ + 2 files changed, 6 insertions(+) commit 922c0fe392ba439453edb5b2e88b74f0caa586b3 Author: Carlos Garcia Campos -Date: Mon Mar 15 20:08:23 2010 +0100 +Date: Mon Mar 15 20:08:23 2010 +0100 [glib-demo] Rendition actions demo glib/demo/utils.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 112 insertions(+), 0 deletions(-) + 1 file changed, 112 insertions(+) commit 163b3f79d67543bc37b64875e30dcc9b7053e1d5 Author: Carlos Garcia Campos -Date: Mon Mar 15 20:08:00 2010 +0100 +Date: Mon Mar 15 20:08:00 2010 +0100 [glib] Add support for rendition actions glib/poppler-action.cc | 22 ++++++++++++++++++++++ - glib/poppler-action.h | 14 +++++++++++++- - 2 files changed, 35 insertions(+), 1 deletions(-) + glib/poppler-action.h | 14 +++++++++++++- + 2 files changed, 35 insertions(+), 1 deletion(-) commit d9b1e40751beddf48a8694b20bfcc4b4cb41060a Author: Carlos Garcia Campos -Date: Mon Mar 15 20:06:45 2010 +0100 +Date: Mon Mar 15 20:06:45 2010 +0100 [glib] Add PopplerMedia representing a Rendition Media Clip - glib/Makefile.am | 2 + - glib/poppler-media.cc | 302 + glib/Makefile.am | 2 + + glib/poppler-media.cc | 302 ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-media.h | 53 +++++++++ + glib/poppler-media.h | 53 +++++++++ glib/poppler-private.h | 2 + - glib/poppler.h | 2 + - 5 files changed, 361 insertions(+), 0 deletions(-) + glib/poppler.h | 2 + + 5 files changed, 361 insertions(+) commit 0224b81c4729a98a56b7a68054422ea655018d6a Author: Carlos Garcia Campos -Date: Mon Mar 15 17:54:03 2010 +0100 +Date: Mon Mar 15 17:54:03 2010 +0100 [glib-demo] Add page number to annots demo - glib/demo/annots.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + glib/demo/annots.c | 4 ++++ + 1 file changed, 4 insertions(+) commit 0153b892c63e4fccd0819150cf7b4213857a11c5 Author: Carlos Garcia Campos -Date: Mon Mar 15 17:49:51 2010 +0100 +Date: Mon Mar 15 17:49:51 2010 +0100 [glib] Add poppler_annot_get_page_index() to get the page associated to annot glib/poppler-annot.cc | 19 +++++++++++++++++++ glib/poppler-annot.h | 1 + - 2 files changed, 20 insertions(+), 0 deletions(-) + 2 files changed, 20 insertions(+) commit b47337ea91696fea8f42a68a6fa160681ab284b2 Author: Carlos Garcia Campos -Date: Mon Mar 15 17:49:17 2010 +0100 +Date: Mon Mar 15 17:49:17 2010 +0100 [annots] Checks screen annots associated with a rendition action have a valid page ref poppler/Annot.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 9417fd793ec8d806822669aa614193073e7dfe50 Author: Carlos Garcia Campos -Date: Mon Mar 15 16:52:30 2010 +0100 +Date: Mon Mar 15 16:52:30 2010 +0100 [annots] Save page index of the page associated with the annot @@ -10119,43 +16376,43 @@ commit 36b76a5d01b74c6381433b6f6f7ffb9f02696a60 Author: Carlos Garcia Campos -Date: Mon Mar 15 14:12:11 2010 +0100 +Date: Mon Mar 15 14:12:11 2010 +0100 Rework LinkRendition to follow the spec poppler/Link.cc | 68 ++++++++++++++++++++++++++++++++++--------------------- - poppler/Link.h | 12 ++++++--- + poppler/Link.h | 12 ++++++---- 2 files changed, 50 insertions(+), 30 deletions(-) commit 7b5885ee7d2026df9a6e87327b6d02f37d79b8b2 Author: Carlos Garcia Campos -Date: Mon Mar 15 12:25:12 2010 +0100 +Date: Mon Mar 15 12:25:12 2010 +0100 [glib-demo] Annot screen demo - glib/demo/annots.c | 17 +++++++++++++++++ - 1 files changed, 17 insertions(+), 0 deletions(-) + glib/demo/annots.c | 17 +++++++++++++++++ + 1 file changed, 17 insertions(+) commit bdb76c7cb89bcb6fb139b0ef348d96b7780d57ed Author: Carlos Garcia Campos -Date: Mon Mar 15 12:24:19 2010 +0100 +Date: Mon Mar 15 12:24:19 2010 +0100 [glib] Add support for screen annotation Based on patch by Sam Kaplan. - glib/poppler-annot.cc | 75 + glib/poppler-annot.cc | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 8 +++++ - glib/poppler-page.cc | 3 ++ + glib/poppler-annot.h | 8 ++++++ + glib/poppler-page.cc | 3 ++ glib/poppler-private.h | 1 + - glib/poppler.h | 1 + - 5 files changed, 88 insertions(+), 0 deletions(-) + glib/poppler.h | 1 + + 5 files changed, 88 insertions(+) commit 54892b1375e360113432b07c6ba058f861d21fe8 Author: Carlos Garcia Campos -Date: Mon Mar 15 12:21:30 2010 +0100 +Date: Mon Mar 15 12:21:30 2010 +0100 [annots] Save the action already parsed in AnnotScreen @@ -10165,103 +16422,103 @@ commit 5a84a2d749478f19631dbfad2be06ec4ea85038c Author: Carlos Garcia Campos -Date: Mon Mar 15 11:16:17 2010 +0100 +Date: Mon Mar 15 11:16:17 2010 +0100 [glib-demo] Annot and links movie demo - glib/demo/annots.c | 20 +++++++++ + glib/demo/annots.c | 20 +++++++++ glib/demo/utils.c | 115 +++++++++++++++++++++++++++++++++++++++++++++++++++- - glib/demo/utils.h | 3 + - 3 files changed, 137 insertions(+), 1 deletions(-) + glib/demo/utils.h | 3 ++ + 3 files changed, 137 insertions(+), 1 deletion(-) commit 2cf5ee4f62089df099f78cd4d39a4eb7589d1b47 Author: Carlos Garcia Campos -Date: Mon Mar 15 11:04:17 2010 +0100 +Date: Mon Mar 15 11:04:17 2010 +0100 [glib] Add support for movie actions Based on patch by Hugo Mercier. glib/poppler-action.cc | 35 ++++++++++++++++++--- - glib/poppler-action.h | 15 ++++++++- - glib/poppler-page.cc | 81 + glib/poppler-action.h | 15 +++++++-- + glib/poppler-page.cc | 81 +++++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-private.h | 2 + + glib/poppler-private.h | 2 ++ 4 files changed, 125 insertions(+), 8 deletions(-) commit 132b6f072fefd231d42f31626f1b5009c4e8319e Author: Carlos Garcia Campos -Date: Mon Mar 15 10:56:23 2010 +0100 +Date: Mon Mar 15 10:56:23 2010 +0100 [glib] Add support for movie annotations Based on patch by Hugo Mercier. - glib/poppler-annot.cc | 97 + glib/poppler-annot.cc | 97 ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-annot.h | 10 +++++ - glib/poppler-page.cc | 3 + + glib/poppler-annot.h | 10 +++++ + glib/poppler-page.cc | 3 ++ glib/poppler-private.h | 1 + - glib/poppler.h | 1 + - 5 files changed, 112 insertions(+), 0 deletions(-) + glib/poppler.h | 1 + + 5 files changed, 112 insertions(+) commit aecad2bb12be44825d273e364ec6a0444dac5605 Author: Carlos Garcia Campos -Date: Mon Mar 15 10:48:03 2010 +0100 +Date: Mon Mar 15 10:48:03 2010 +0100 [glib] Add PopplerMovie class - glib/Makefile.am | 2 + - glib/poppler-movie.cc | 140 + glib/Makefile.am | 2 + + glib/poppler-movie.cc | 140 ++++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-movie.h | 42 ++++++++++++++ + glib/poppler-movie.h | 42 +++++++++++++++ glib/poppler-private.h | 2 + - glib/poppler.h | 2 + - 5 files changed, 188 insertions(+), 0 deletions(-) + glib/poppler.h | 2 + + 5 files changed, 188 insertions(+) commit 5b3234a16e0d465bff2b5e277cb64b4f4b0a8dbd Author: Carlos Garcia Campos -Date: Sun Mar 14 16:10:26 2010 +0100 +Date: Sun Mar 14 16:10:26 2010 +0100 Split Movie class into Rendition and Movie classes to follow the spec - poppler/Annot.cc | 16 ++- - poppler/Link.cc | 10 +- - poppler/Link.h | 6 +- - poppler/Makefile.am | 2 + - poppler/Movie.cc | 438 + poppler/Annot.cc | 16 +- + poppler/Link.cc | 10 +- + poppler/Link.h | 6 +- + poppler/Makefile.am | 2 + + poppler/Movie.cc | 438 +++++----------------------------------------- - poppler/Movie.h | 138 +++------------ - poppler/Rendition.cc | 400 + poppler/Movie.h | 138 +++------------ + poppler/Rendition.cc | 400 ++++++++++++++++++++++++++++++++++++++++++ - poppler/Rendition.h | 157 +++++++++++++++++ + poppler/Rendition.h | 157 +++++++++++++++++ qt4/src/poppler-movie.cc | 9 +- 9 files changed, 657 insertions(+), 519 deletions(-) commit f9c163730478e3b6d8a1e73dbae6c52c28ae1e84 Author: Pino Toscano -Date: Mon Mar 8 14:49:12 2010 +0100 +Date: Mon Mar 8 14:49:12 2010 +0100 [Qt4] include Object.h and Annot.h, now needed qt4/src/poppler-movie.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit a00532f509c19c5455e0db5068db95dd4583e8dd Author: Carlos Garcia Campos -Date: Mon Mar 8 14:22:53 2010 +0100 +Date: Mon Mar 8 14:22:53 2010 +0100 Check for Null instead of None to know whether a dict entry is present Dict::lookup returns obj->initNull() when the key is not found. poppler/Movie.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit b51e66c9a7e2f7f39ae1edf8bda02a7bc1ad4ebd Author: Carlos Garcia Campos -Date: Mon Mar 8 14:15:22 2010 +0100 +Date: Mon Mar 8 14:15:22 2010 +0100 [annots] Create appearance stream for Movie Annotations when not defined @@ -10275,7 +16532,7 @@ commit fae59411852e5c2c45825c5ea963318f1ed5dc6a Author: Carlos Garcia Campos -Date: Mon Mar 8 14:07:09 2010 +0100 +Date: Mon Mar 8 14:07:09 2010 +0100 Fix handling of poster in Movie @@ -10288,97 +16545,97 @@ commit a451f83d101bf265a1e7e2a17c0b320895e70f4e Author: Carlos Garcia Campos -Date: Sun Mar 7 12:22:57 2010 +0100 +Date: Sun Mar 7 12:22:57 2010 +0100 Save width, height (aspect) in Movie object and provide getAspect() method poppler/Movie.cc | 3 ++- poppler/Movie.h | 4 ++++ - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit f88d469f860da17055fc4b98b64aef241fcf0185 Author: Carlos Garcia Campos -Date: Sat Mar 6 12:33:40 2010 +0100 +Date: Sat Mar 6 12:33:40 2010 +0100 Move Movie objects parsing code from Annot to Movie - poppler/Annot.cc | 244 + poppler/Annot.cc | 244 ++------------------------------------------ - poppler/Annot.h | 73 +------------- - poppler/Link.cc | 4 +- - poppler/Movie.cc | 255 + poppler/Annot.h | 73 +------------ + poppler/Link.cc | 4 +- + poppler/Movie.cc | 255 ++++++++++++++++++++++++++++++++++++++-------- - poppler/Movie.h | 25 ++++- - qt4/src/poppler-movie.cc | 11 ++- + poppler/Movie.h | 25 +++-- + qt4/src/poppler-movie.cc | 11 +- 6 files changed, 246 insertions(+), 366 deletions(-) commit ec9138b574c7226ad733880d3d43b86bb72073f4 Author: Pino Toscano -Date: Sun Mar 7 23:17:50 2010 +0100 +Date: Sun Mar 7 23:17:50 2010 +0100 [autotools] add also cpp/tests/CMakeLists.txt to the "dist files" - Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + Makefile.am | 1 + + 1 file changed, 1 insertion(+) commit ef3258d6fc57e7a62d951cc826804e50e8e1b526 Author: Pino Toscano -Date: Sun Mar 7 23:14:12 2010 +0100 +Date: Sun Mar 7 23:14:12 2010 +0100 [autotools] fix location of poppler-config.h.cmake - Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + Makefile.am | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit fd1d9c882997ff35acd5a458e9dfeba3ad6c8b25 Author: Pino Toscano -Date: Sun Mar 7 22:42:06 2010 +0100 +Date: Sun Mar 7 22:42:06 2010 +0100 [CMake] just enable what needed each time CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 476bde472a7e694afde96a04ea335fe9582d6fad Author: Pino Toscano -Date: Sun Mar 7 22:39:45 2010 +0100 +Date: Sun Mar 7 22:39:45 2010 +0100 [CMake] add small description for the zlib option taken from two bits in configure.ac CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1267d7e0c36e262984070a3b55fea46e7289a4b4 Author: Pino Toscano -Date: Sun Mar 7 19:34:03 2010 +0100 +Date: Sun Mar 7 19:34:03 2010 +0100 [CMake] add a note about gtk-doc not supported yet CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 201b18ad0837e84d874b56e1b0469d1b2d45378b Author: Pino Toscano -Date: Sun Mar 7 19:30:36 2010 +0100 +Date: Sun Mar 7 19:30:36 2010 +0100 [CMake] sync with poppler-config.h.in: add WITH_FONTCONFIGURATION_{FONTCONFIG,WIN32} poppler/poppler-config.h.cmake | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + 1 file changed, 10 insertions(+) commit 0d0044e8cc2d406f066338102ec73e1b56214cc3 Author: Pino Toscano -Date: Sun Mar 7 19:25:27 2010 +0100 +Date: Sun Mar 7 19:25:27 2010 +0100 [CMake] move poppler-config.h.cmake in the poppler subdirectory, where poppler-config.h.in is - CMakeLists.txt | 2 +- - poppler-config.h.cmake | 90 + CMakeLists.txt | 2 +- + poppler-config.h.cmake | 90 ---------------------------------------- poppler/poppler-config.h.cmake | 90 ++++++++++++++++++++++++++++++++++++++++ @@ -10386,86 +16643,86 @@ commit f785e29a901d2c76204dd26e9585446fdd817ebd Author: Pino Toscano -Date: Sun Mar 7 18:35:34 2010 +0100 +Date: Sun Mar 7 18:35:34 2010 +0100 [CMake] remove the generated poppler-enums.{c,h} in the clean target ie usually when doing `make clean' - glib/CMakeLists.txt | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + glib/CMakeLists.txt | 4 ++++ + 1 file changed, 4 insertions(+) commit 369604603375dbe3516136b6f8f9d0c26e0b744f Author: Pino Toscano -Date: Sun Mar 7 18:26:45 2010 +0100 +Date: Sun Mar 7 18:26:45 2010 +0100 [CMake] use the --template option of glib-mkenums (like done with autotools) - glib/CMakeLists.txt | 24 ++++-------------------- - 1 files changed, 4 insertions(+), 20 deletions(-) + glib/CMakeLists.txt | 24 ++++-------------------- + 1 file changed, 4 insertions(+), 20 deletions(-) commit bbcbb34fec10c90edd5960bdbcc6849bc8f39526 Author: Pino Toscano -Date: Sun Mar 7 17:34:40 2010 +0100 +Date: Sun Mar 7 17:34:40 2010 +0100 [CMake] set POPPLER_GLIB_DISABLE_DEPRECATED and POPPLER_GLIB_DISABLE_SINGLE_INCLUDES as done with autotools - CMakeLists.txt | 6 ++++++ - glib/CMakeLists.txt | 6 +++++- - 2 files changed, 11 insertions(+), 1 deletions(-) + CMakeLists.txt | 6 ++++++ + glib/CMakeLists.txt | 6 +++++- + 2 files changed, 11 insertions(+), 1 deletion(-) commit 190fa971c12ca1b3007f6ba349a77a7c15c47490 Author: Pino Toscano -Date: Sun Mar 7 17:24:25 2010 +0100 +Date: Sun Mar 7 17:24:25 2010 +0100 reorder to match what's in the correspondent .in glib/poppler-features.h.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ff46def8b178420a86a974ec2ce767a538bba8be Author: Pino Toscano -Date: Sun Mar 7 17:23:16 2010 +0100 +Date: Sun Mar 7 17:23:16 2010 +0100 [CMake] GDK_FEATURE is no more needed here - glib/CMakeLists.txt | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + glib/CMakeLists.txt | 1 - + 1 file changed, 1 deletion(-) commit 1eb8026a3060ef61a88c535177510f7ac7e7fc25 Author: Pino Toscano -Date: Sun Mar 7 17:19:58 2010 +0100 +Date: Sun Mar 7 17:19:58 2010 +0100 [CMake] set in one place whether to build the glib frontend CMakeLists.txt | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit a1a6f23e2345814e147a72211ce9139555385223 Author: Pino Toscano -Date: Sun Mar 7 17:09:58 2010 +0100 +Date: Sun Mar 7 17:09:58 2010 +0100 [CMake] correctly set the GLIB_REQ stuff CMakeLists.txt | 1 + poppler-glib.pc.cmake | 2 +- - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit 0f2e5d6925c5938281d9bafc297a43867c4a915b Author: Pino Toscano -Date: Sun Mar 7 17:03:21 2010 +0100 +Date: Sun Mar 7 17:03:21 2010 +0100 [CMake] move the minimum GLib version to the main CMakeLists.txt - CMakeLists.txt | 1 + - cmake/modules/FindGTK.cmake | 2 +- - 2 files changed, 2 insertions(+), 1 deletions(-) + CMakeLists.txt | 1 + + cmake/modules/FindGTK.cmake | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) commit efdffba45d15b538dbfb294403e99f3a6470b4d9 Author: Pino Toscano -Date: Sun Mar 7 16:58:27 2010 +0100 +Date: Sun Mar 7 16:58:27 2010 +0100 [CMake] align the GDK stuff (GDK_{FEATURE,REQ}) to what done with autotools @@ -10476,30 +16733,30 @@ commit cfecc69b7f05920f543ee7e9aafeafaa4c3506fb Author: Pino Toscano -Date: Sun Mar 7 16:49:14 2010 +0100 +Date: Sun Mar 7 16:49:14 2010 +0100 [CMake] apparently there's not a minimum version requirement for GDK, so drop the check - cmake/modules/FindGTK.cmake | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) + cmake/modules/FindGTK.cmake | 5 +---- + 1 file changed, 1 insertion(+), 4 deletions(-) commit 8ff1cf03d2607b0f13bbbbf272f2b03d8927bd24 Author: Pino Toscano -Date: Sun Mar 7 16:47:21 2010 +0100 +Date: Sun Mar 7 16:47:21 2010 +0100 [CMake] first look for Cairo, then for GLib/GDK/GTK this starts to align to the searches done with autotools also, move the CAIRO_FEATURE to the main CMakeLists.txt - CMakeLists.txt | 19 +++++++++++-------- - glib/CMakeLists.txt | 1 - + CMakeLists.txt | 19 +++++++++++-------- + glib/CMakeLists.txt | 1 - 2 files changed, 11 insertions(+), 9 deletions(-) commit bcaf62b8e252594530d3050761ba563cf3b1fb6e Author: Pino Toscano -Date: Sun Mar 7 16:00:03 2010 +0100 +Date: Sun Mar 7 16:00:03 2010 +0100 [CMake] enhance/rewrite a bit the FindCairo module @@ -10516,76 +16773,76 @@ apply the changes to the rest of the build system (specify the version needed, use the correct variable for includes) - CMakeLists.txt | 2 +- + CMakeLists.txt | 2 +- cmake/modules/FindCairo.cmake | 64 - ++++++++++++++++++++++++++-------------- - glib/CMakeLists.txt | 2 +- + ++++++++++++++++++++++++++--------------- + glib/CMakeLists.txt | 2 +- 3 files changed, 43 insertions(+), 25 deletions(-) commit c96aa0f5fc74ae04f483485b787aaf65f1791991 Author: Pino Toscano -Date: Sun Mar 7 02:01:13 2010 +0100 +Date: Sun Mar 7 02:01:13 2010 +0100 add Patrick's copyright notices - cpp/poppler-global.h | 1 + - goo/gtypes.h | 14 ++++++++++++++ - poppler/GlobalParams.cc | 1 + - poppler/SplashOutputDev.cc | 1 + - 4 files changed, 17 insertions(+), 0 deletions(-) + cpp/poppler-global.h | 1 + + goo/gtypes.h | 14 ++++++++++++++ + poppler/GlobalParams.cc | 1 + + poppler/SplashOutputDev.cc | 1 + + 4 files changed, 17 insertions(+) commit 3311bedd2eb831ef1fd553f3f50960331cf6885f Author: Patrick Spendrin -Date: Sun Mar 7 01:56:15 2010 +0100 +Date: Sun Mar 7 01:56:15 2010 +0100 MSVC: disable for the 'ustring' class the warning C4251 (which does not apply) cpp/poppler-global.h | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) + 1 file changed, 8 insertions(+) commit 9efa18397bd05fbd27c7811fa6e0f34ce94012e0 Author: Patrick Spendrin -Date: Sun Mar 7 01:48:03 2010 +0100 +Date: Sun Mar 7 01:48:03 2010 +0100 MSVC: disable warning C4800, which is of no use for now goo/gtypes.h | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 3a88d1bf8d2c5a9e8014e0d46e24c9ec06556469 Author: Patrick Spendrin -Date: Sun Mar 7 01:26:10 2010 +0100 +Date: Sun Mar 7 01:26:10 2010 +0100 MSVC: no isfinite(), so provide it using _finite() - poppler/SplashOutputDev.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + poppler/SplashOutputDev.cc | 5 +++++ + 1 file changed, 5 insertions(+) commit 7774912c46f832f25c51b4cfc0e9430b1cd7fa1f Author: Patrick Spendrin -Date: Sun Mar 7 01:22:31 2010 +0100 +Date: Sun Mar 7 01:22:31 2010 +0100 MSVC: do not force constness here, so the right overload will be chosen poppler/GlobalParams.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit cf07a5d85b402b6956c9605fbdc88bddcb94a3cf Author: Pino Toscano -Date: Sun Mar 7 00:49:07 2010 +0100 +Date: Sun Mar 7 00:49:07 2010 +0100 [CMake] show end yes/no message about the GDK usage just like done with autotools CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 42c98f8eabe304d5e3dc8c1ebdd5b0b6c221e696 Author: Pino Toscano -Date: Sat Mar 6 17:18:08 2010 +0100 +Date: Sat Mar 6 17:18:08 2010 +0100 [CMake] make the font configuration backend selection take a string (like with autotools) @@ -10597,11 +16854,11 @@ backend chosen is "fontconfig" CMakeLists.txt | 39 +++++++++++++++++++++++++++++---------- - 1 files changed, 29 insertions(+), 10 deletions(-) + 1 file changed, 29 insertions(+), 10 deletions(-) commit bda6e7cd089f2970af2e9540b4415633ffcf0ebb Author: Pino Toscano -Date: Sat Mar 6 17:13:30 2010 +0100 +Date: Sat Mar 6 17:13:30 2010 +0100 [CMake] add a show_end_message() macro to show a generic string as value @@ -10609,235 +16866,235 @@ make show_end_message_yesno() call it with the proper "yes" or "no" string - cmake/modules/PopplerMacros.cmake | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + cmake/modules/PopplerMacros.cmake | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) commit d313c0f508711b3b7166b84608c43ebf1f07194b Author: Pino Toscano -Date: Sat Mar 6 17:08:59 2010 +0100 +Date: Sat Mar 6 17:08:59 2010 +0100 [CMake] rename the show_end_message() macro to show_end_message_yesno() - CMakeLists.txt | 26 +++++++++++++------------- - cmake/modules/PopplerMacros.cmake | 4 ++-- + CMakeLists.txt | 26 +++++++++++++------------- + cmake/modules/PopplerMacros.cmake | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) commit 0425ff835fa26df5e25e628a6c56f3a180713905 Author: Pino Toscano -Date: Fri Mar 5 22:21:56 2010 +0100 +Date: Fri Mar 5 22:21:56 2010 +0100 update copyright - poppler/ArthurOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/ArthurOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit c5ea135ca58e112110be3ae10d887f3188172765 Author: Pino Toscano -Date: Fri Mar 5 22:14:57 2010 +0100 +Date: Fri Mar 5 22:14:57 2010 +0100 [arthur] update the miter limit - poppler/ArthurOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + poppler/ArthurOutputDev.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) commit 552f344b3e3df7c796afa6946149b0a5590cc4f7 Author: Pino Toscano -Date: Fri Mar 5 22:04:39 2010 +0100 +Date: Fri Mar 5 22:04:39 2010 +0100 [arthur] update the line dash style - poppler/ArthurOutputDev.cc | 12 +++++++++++- - 1 files changed, 11 insertions(+), 1 deletions(-) + poppler/ArthurOutputDev.cc | 12 +++++++++++- + 1 file changed, 11 insertions(+), 1 deletion(-) commit bc42ee05fceef0d0dd2ab0587c184dfc37cf29bf Author: Albert Astals Cid -Date: Fri Mar 5 18:54:32 2010 +0000 +Date: Fri Mar 5 18:54:32 2010 +0000 fix copyright year - poppler/CairoOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + poppler/CairoOutputDev.cc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) commit b21461e91ed671ef29fd3cf4780fda44f82a0679 Author: Adrian Johnson -Date: Fri Mar 5 15:14:08 2010 +0100 +Date: Fri Mar 5 15:14:08 2010 +0100 [cairo] Close image stream before resetting it again - poppler/CairoOutputDev.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.cc | 2 ++ + 1 file changed, 2 insertions(+) commit 866bcc7edb47fe11355081045e2d316a4d530649 Author: Pino Toscano -Date: Thu Mar 4 14:19:50 2010 +0100 +Date: Thu Mar 4 14:19:50 2010 +0100 [Qt4] no need to save&restore on a newly created painter qt4/src/poppler-page.cc | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + 1 file changed, 2 deletions(-) commit 654698b556eb53eab7c2d55fc6b3fdd9e35173bb Author: Pino Toscano -Date: Thu Mar 4 13:16:11 2010 +0100 +Date: Thu Mar 4 13:16:11 2010 +0100 [Qt4] use Arthur unconditionally arthur is no more tied to splash, so can be used in an occasion - qt4/src/poppler-document.cc | 2 +- - qt4/src/poppler-page.cc | 4 +--- + qt4/src/poppler-document.cc | 2 +- + qt4/src/poppler-page.cc | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) commit 41931b6310d2ae81e622db904246f019ceb8410d Author: Pino Toscano -Date: Thu Mar 4 13:13:11 2010 +0100 +Date: Thu Mar 4 13:13:11 2010 +0100 [Qt4] compile Arthur unconditionally as the arthur output dev does not require splash anymore, we can always compile it with poppler-qt4 - poppler/Makefile.am | 4 ++-- + poppler/Makefile.am | 4 ++-- qt4/src/CMakeLists.txt | 6 +----- - qt4/src/Makefile.am | 6 +----- + qt4/src/Makefile.am | 6 +----- 3 files changed, 4 insertions(+), 12 deletions(-) commit 48a29e2bbc9aa9bd0cb2775a2365c0ffdeb6ce87 Author: Pino Toscano -Date: Thu Mar 4 13:11:43 2010 +0100 +Date: Thu Mar 4 13:11:43 2010 +0100 [Arthur] make ArthurOutputDev compile even with Splash disabled text rendering is disabled in that case for now - poppler/ArthurOutputDev.cc | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) + poppler/ArthurOutputDev.cc | 11 ++++++++++- + 1 file changed, 10 insertions(+), 1 deletion(-) commit 2013a19b6457753890affad8c4049f2ce4627df7 Author: Pino Toscano -Date: Thu Mar 4 13:02:43 2010 +0100 +Date: Thu Mar 4 13:02:43 2010 +0100 [CMake/tests] compile gtk-splash-test only if splash is enabled - test/CMakeLists.txt | 14 +++++++++----- - 1 files changed, 9 insertions(+), 5 deletions(-) + test/CMakeLists.txt | 14 +++++++++----- + 1 file changed, 9 insertions(+), 5 deletions(-) commit ae740c5cfefbae13f82b750e39fa3dbbdc94858b Author: Pino Toscano -Date: Tue Mar 2 23:22:06 2010 +0100 +Date: Tue Mar 2 23:22:06 2010 +0100 [cpp] update the copyrights cpp/poppler-document-private.h | 2 +- - cpp/poppler-document.cpp | 2 +- - cpp/poppler-embedded-file.cpp | 2 +- - cpp/poppler-embedded-file.h | 2 +- - cpp/poppler-global.cpp | 3 ++- - cpp/poppler-global.h | 2 +- - cpp/poppler-page.cpp | 2 +- - cpp/poppler-page.h | 2 +- - cpp/poppler-rectangle.h | 2 +- - cpp/poppler-toc.cpp | 2 +- - cpp/poppler-version.cpp | 2 +- - cpp/tests/poppler-dump.cpp | 2 +- + cpp/poppler-document.cpp | 2 +- + cpp/poppler-embedded-file.cpp | 2 +- + cpp/poppler-embedded-file.h | 2 +- + cpp/poppler-global.cpp | 3 ++- + cpp/poppler-global.h | 2 +- + cpp/poppler-page.cpp | 2 +- + cpp/poppler-page.h | 2 +- + cpp/poppler-rectangle.h | 2 +- + cpp/poppler-toc.cpp | 2 +- + cpp/poppler-version.cpp | 2 +- + cpp/tests/poppler-dump.cpp | 2 +- 12 files changed, 13 insertions(+), 12 deletions(-) commit 24b1d8d0b4ae7cea9fbc331f19cd5ce3917b8b4d Author: Pino Toscano -Date: Tue Mar 2 23:15:56 2010 +0100 +Date: Tue Mar 2 23:15:56 2010 +0100 [cpp] {from,to}_utf_8() -> {from,to}_utf8() cpp/poppler-global.cpp | 4 ++-- - cpp/poppler-global.h | 4 ++-- - cpp/poppler-page.cpp | 2 +- + cpp/poppler-global.h | 4 ++-- + cpp/poppler-page.cpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) commit 690af1bc58de1ebe710c5e599f1cb635e4838fc8 Author: Hib Eris -Date: Tue Mar 2 16:33:04 2010 +0100 +Date: Tue Mar 2 16:33:04 2010 +0100 [cpp] define poppler_cpp_EXPORTS when building with autotools as well fixes building on Windows cpp/Makefile.am | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 7492a376e7e5ec35534276ac15485123645617b0 Author: Pino Toscano -Date: Tue Mar 2 22:16:07 2010 +0100 +Date: Tue Mar 2 22:16:07 2010 +0100 [cpp/tests] use gmtime() when gmtime_r() is not available - cpp/tests/poppler-dump.cpp | 9 ++++++++- - 1 files changed, 8 insertions(+), 1 deletions(-) + cpp/tests/poppler-dump.cpp | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) commit de013cc14a0621782c53f481ed7e559f241855a3 Author: Pino Toscano -Date: Tue Mar 2 22:05:25 2010 +0100 +Date: Tue Mar 2 22:05:25 2010 +0100 [cpp] include config.h _after_ the other includes cpp/poppler-global.cpp | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 388e5d6aebcabbfc90894c86248159c63701cb0a Author: Hib Eris -Date: Tue Mar 2 15:51:23 2010 +0100 +Date: Tue Mar 2 15:51:23 2010 +0100 Use ICONV_CONST when necessary cpp/poppler-global.cpp | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) + 1 file changed, 6 insertions(+), 4 deletions(-) commit aaa58b26733a2f7c778632da4942b588050cf33f Author: Pino Toscano -Date: Tue Mar 2 21:53:55 2010 +0100 +Date: Tue Mar 2 21:53:55 2010 +0100 [CMake] properly define ICONV_CONST - CMakeLists.txt | 1 - + CMakeLists.txt | 1 - cmake/modules/FindIconv.cmake | 3 +++ - config.h.cmake | 2 +- + config.h.cmake | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) commit 6304b0d8959fccf96b030c757d78e845d04757e4 Author: Albert Astals Cid -Date: Sun Feb 28 15:33:53 2010 +0100 +Date: Sun Feb 28 15:33:53 2010 +0100 poppler 0.13.1 CMakeLists.txt | 2 +- - NEWS | 33 +++++++++++++++++++++++++++++++++ - configure.ac | 2 +- - cpp/Doxyfile | 2 +- + NEWS | 33 +++++++++++++++++++++++++++++++++ + configure.ac | 2 +- + cpp/Doxyfile | 2 +- qt4/src/Doxyfile | 2 +- 5 files changed, 37 insertions(+), 4 deletions(-) commit 9eac71862915c851c07075e3ca3af82eb9e4e775 Author: Albert Astals Cid -Date: Sun Feb 28 15:33:19 2010 +0100 +Date: Sun Feb 28 15:33:19 2010 +0100 Make sure the private headers end up in the tarball on make dist cpp/Makefile.am | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit b488172311c2921ab4c365d71ad8b1ab7f596c71 Author: Albert Astals Cid -Date: Sun Feb 28 14:25:36 2010 +0100 +Date: Sun Feb 28 14:25:36 2010 +0100 Add copyright notices - poppler/CairoFontEngine.cc | 3 ++- - poppler/CairoFontEngine.h | 2 +- + poppler/CairoFontEngine.cc | 3 ++- + poppler/CairoFontEngine.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) commit 5453cff5b7cb47cadfdae585a58409117af8c1f1 Author: Carlos Garcia Campos -Date: Sun Feb 28 13:51:22 2010 +0100 +Date: Sun Feb 28 13:51:22 2010 +0100 [cairo] Select filter for images based on scale factor @@ -10848,23 +17105,23 @@ poppler/CairoOutputDev.cc | 64 +++++++++++++++++++++++++++++++++------------ - poppler/CairoOutputDev.h | 2 + + poppler/CairoOutputDev.h | 2 ++ 2 files changed, 49 insertions(+), 17 deletions(-) commit e65456cbd5cae2750426aabeb2d66a10537616f0 Author: Carlos Garcia Campos -Date: Sun Feb 28 13:13:13 2010 +0100 +Date: Sun Feb 28 13:13:13 2010 +0100 [cairo] Refactor scaled size computation into a new method poppler/CairoOutputDev.cc | 52 - ++++++++++++++++++++++---------------------- - poppler/CairoOutputDev.h | 2 + + ++++++++++++++++++++++----------------------- + poppler/CairoOutputDev.h | 2 ++ 2 files changed, 28 insertions(+), 26 deletions(-) commit 32aa9ae7d0087298661829265de00e93398272b3 Author: Jan Kümmel -Date: Sat Feb 27 17:58:46 2010 +0100 +Date: Sat Feb 27 17:58:46 2010 +0100 [cairo] Omit writing of embedded fonts into tempary files @@ -10872,30 +17129,30 @@ poppler/CairoFontEngine.cc | 146 ++++++++++++++++++++++++-------------------- - 1 files changed, 80 insertions(+), 66 deletions(-) + 1 file changed, 80 insertions(+), 66 deletions(-) commit 7ba52a32343ca73730a80b64c136e3f03348e7d9 Author: Carlos Garcia Campos -Date: Sat Feb 27 17:42:46 2010 +0100 +Date: Sat Feb 27 17:42:46 2010 +0100 [cairo] Remove unused 'face' from CairoFreeTypeFont class - poppler/CairoFontEngine.cc | 6 ++---- - poppler/CairoFontEngine.h | 3 +-- + poppler/CairoFontEngine.cc | 6 ++---- + poppler/CairoFontEngine.h | 3 +-- 2 files changed, 3 insertions(+), 6 deletions(-) commit 7c3140c88c00282e10888143fffe3c402d48fb05 Author: Adrian Johnson -Date: Sat Feb 27 13:13:47 2010 +0100 +Date: Sat Feb 27 13:13:47 2010 +0100 Don't use '\' character in PostScript names poppler/PSOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 8e354a15a1861719c00799937ad9f9bb1bb71e9f Author: Thomas Freitag -Date: Wed Feb 24 18:58:11 2010 +0000 +Date: Wed Feb 24 18:58:11 2010 +0000 Fix remaining part of 26243 @@ -10905,11 +17162,11 @@ pattern colorspace, this is definely wrong. poppler/Gfx.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit fcbc571a98775b1daa8f562fc8674fb2d15b6626 Author: Pino Toscano -Date: Tue Feb 23 17:02:47 2010 +0100 +Date: Tue Feb 23 17:02:47 2010 +0100 [cpp] make checksum() return an array of data, instead of a string @@ -10924,107 +17181,107 @@ commit fbefb9bef9f7a099d51919255a98f412d1e1d696 Author: Pino Toscano -Date: Tue Feb 23 16:56:47 2010 +0100 +Date: Tue Feb 23 16:56:47 2010 +0100 [cpp apidox] add API documentation for the 'embedded_file' class cpp/poppler-embedded-file.cpp | 43 +++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 43 insertions(+), 0 deletions(-) + 1 file changed, 43 insertions(+) commit 6d39cca0a035fc656d3b86ba66dedaccee532fcb Author: Pino Toscano -Date: Tue Feb 23 16:41:56 2010 +0100 +Date: Tue Feb 23 16:41:56 2010 +0100 [cpp apidox] add API documentation for the 'toc' and 'toc_item' classes - cpp/poppler-toc.cpp | 57 + cpp/poppler-toc.cpp | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 57 insertions(+), 0 deletions(-) + 1 file changed, 57 insertions(+) commit 857e4ceb26d959c48c7af6bff53ca1bfe5307236 Author: Pino Toscano -Date: Tue Feb 23 15:39:58 2010 +0100 +Date: Tue Feb 23 15:39:58 2010 +0100 [cpp] when the loading of the document fails, put back the data where it was before cpp/poppler-document-private.h | 2 +- - cpp/poppler-document.cpp | 10 +++++++--- + cpp/poppler-document.cpp | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) commit 7838b182143086192ac8dcf571da0ce1743619e2 Author: Pino Toscano -Date: Tue Feb 23 00:04:09 2010 +0100 +Date: Tue Feb 23 00:04:09 2010 +0100 [cpp] add the directory of the generated html apidox to the ignore list cpp/.gitignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 71a38a23a9db5cac872c666283b7abcb1462210c Author: Pino Toscano -Date: Mon Feb 22 23:43:34 2010 +0100 +Date: Mon Feb 22 23:43:34 2010 +0100 [cpp] add page::text() to get the text inside a page region cpp/poppler-page.cpp | 16 ++++++++++++++++ cpp/poppler-page.h | 1 + - 2 files changed, 17 insertions(+), 0 deletions(-) + 2 files changed, 17 insertions(+) commit 4c75360233bc67f097551980a46ecce976927220 Author: Pino Toscano -Date: Mon Feb 22 23:05:53 2010 +0100 +Date: Mon Feb 22 23:05:53 2010 +0100 [cpp] add page::search() cpp/poppler-page.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++++++++ - cpp/poppler-page.h | 8 +++++++ - 2 files changed, 59 insertions(+), 0 deletions(-) + cpp/poppler-page.h | 8 ++++++++ + 2 files changed, 59 insertions(+) commit 8932c53a084083eb42d109dd17bac3ad41ce65b5 Author: Pino Toscano -Date: Mon Feb 22 22:39:36 2010 +0100 +Date: Mon Feb 22 22:39:36 2010 +0100 [cpp] add getters and setters for left/top/right/bottom cpp/poppler-rectangle.h | 18 ++++++++++++++++++ - 1 files changed, 18 insertions(+), 0 deletions(-) + 1 file changed, 18 insertions(+) commit 8e1ea57f558fa3a1702a17d79b5aaffc486c6a56 Author: Pino Toscano -Date: Mon Feb 22 22:19:51 2010 +0100 +Date: Mon Feb 22 22:19:51 2010 +0100 [cpp] add a global enum for case sensitivity cpp/poppler-global.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit ae41b087de8f0a7d525320dcf1d64ff22fe982b6 Author: Pino Toscano -Date: Mon Feb 22 19:06:21 2010 +0100 +Date: Mon Feb 22 19:06:21 2010 +0100 [cpp apidox] doxygen configuration for poppler-cpp cpp/Doxyfile | 1551 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 1551 insertions(+), 0 deletions(-) + 1 file changed, 1551 insertions(+) commit 1a36a7bcc684065478a3ade2c2938f0e3672140a Author: Pino Toscano -Date: Mon Feb 22 19:05:49 2010 +0100 +Date: Mon Feb 22 19:05:49 2010 +0100 [cpp apidox] very small start of intro page cpp/Mainpage.dox | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit 85e052ab7a4c462143325ecf60eebba35411b790 Author: Pino Toscano -Date: Mon Feb 22 18:53:20 2010 +0100 +Date: Mon Feb 22 18:53:20 2010 +0100 [cpp apidox] start adding API documentation for the global 'poppler' namespace @@ -11033,11 +17290,11 @@ class cpp/poppler-global.cpp | 16 ++++++++++++++++ - 1 files changed, 16 insertions(+), 0 deletions(-) + 1 file changed, 16 insertions(+) commit b01608f91fb6cf6e9c4fb6e6ee3cb57517a766bf Author: Pino Toscano -Date: Mon Feb 22 18:52:24 2010 +0100 +Date: Mon Feb 22 18:52:24 2010 +0100 [cpp apidox] exclude the 'detail' namespace from apidox extraction @@ -11045,30 +17302,30 @@ handled differently cpp/poppler-global.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit f17a7a8cfdeabb3ced3ba8d42c869d892c528e13 Author: Pino Toscano -Date: Mon Feb 22 18:51:30 2010 +0100 +Date: Mon Feb 22 18:51:30 2010 +0100 [cpp apidox] add API documentation for the version functions cpp/poppler-version.cpp | 12 ++++++++++++ - 1 files changed, 12 insertions(+), 0 deletions(-) + 1 file changed, 12 insertions(+) commit f6c4bbddc7d04c0b1a6b25c41cbf6d81ae40cc0c Author: Pino Toscano -Date: Mon Feb 22 18:50:54 2010 +0100 +Date: Mon Feb 22 18:50:54 2010 +0100 [cpp apidox] start adding API documentation for 'document' cpp/poppler-document.cpp | 182 ++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 182 insertions(+), 0 deletions(-) + 1 file changed, 182 insertions(+) commit cbb7519904d9b6395d0128e16a79324e4b8bfcc0 Author: Pino Toscano -Date: Mon Feb 22 13:15:11 2010 +0100 +Date: Mon Feb 22 13:15:11 2010 +0100 [CMake] no more need to build system check for the Cairo blend modes @@ -11076,12 +17333,12 @@ build system cmake/modules/FindCairo.cmake | 18 ------------------ - config.h.cmake | 3 --- - 2 files changed, 0 insertions(+), 21 deletions(-) + config.h.cmake | 3 --- + 2 files changed, 21 deletions(-) commit 80f47bbf45faf751c661c1d0931e8e1da622b8ca Author: Carlos Garcia Campos -Date: Mon Feb 22 12:43:06 2010 +0100 +Date: Mon Feb 22 12:43:06 2010 +0100 [cairo] Use cairo_surface_set_mime_data() when printing @@ -11091,52 +17348,52 @@ poppler/CairoOutputDev.cc | 42 ++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 1 + - 2 files changed, 43 insertions(+), 0 deletions(-) + poppler/CairoOutputDev.h | 1 + + 2 files changed, 43 insertions(+) commit d63293af6dbff65f160be0118b1580c03a1aab56 Author: Carlos Garcia Campos -Date: Fri Nov 27 09:52:23 2009 +0100 +Date: Fri Nov 27 09:52:23 2009 +0100 [cairo] Turn EXTEND_PAD off when printing poppler/CairoOutputDev.cc | 98 - ++++++++++++++++++++++++++++++-------------- - 1 files changed, 67 insertions(+), 31 deletions(-) + +++++++++++++++++++++++++++++++-------------- + 1 file changed, 67 insertions(+), 31 deletions(-) commit 880890c14e99a954b365a3a6b59deeffa5304d30 Author: Carlos Garcia Campos -Date: Mon Feb 22 11:01:05 2010 +0100 +Date: Mon Feb 22 11:01:05 2010 +0100 [cairo] Use CAIRO_VERSION macros to check whether blend modes are available - configure.ac | 24 ------------------------ - poppler/CairoOutputDev.cc | 4 ++-- + configure.ac | 24 ------------------------ + poppler/CairoOutputDev.cc | 4 ++-- 2 files changed, 2 insertions(+), 26 deletions(-) commit 5c300ce00b5c59da767ca1ffec12f96f0ebbe701 Author: Pino Toscano -Date: Sun Feb 21 21:20:10 2010 +0100 +Date: Sun Feb 21 21:20:10 2010 +0100 [Qt4/apidox] fix typo qt4/src/poppler-qt4.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3f89ccf871e2f4a14129ad3e986b8cd19cdf129c Author: Pino Toscano -Date: Sun Feb 21 21:06:31 2010 +0100 +Date: Sun Feb 21 21:06:31 2010 +0100 [CMake] set the CXXFLAGS in a better way CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit a18dab9e53a20a76eb46fa3a868fffdd3c754ce2 Merge: fa09892 f3862f7 Author: Pino Toscano -Date: Sun Feb 21 19:56:38 2010 +0100 +Date: Sun Feb 21 19:56:38 2010 +0100 Merge remote branch 'origin/cpp-frontend' @@ -11189,7 +17446,7 @@ Gives a 20% speed increase in some pdf splash/Splash.cc | 19 ++++++++++--------- - 1 files changed, 10 insertions(+), 9 deletions(-) + 1 file changed, 10 insertions(+), 9 deletions(-) commit d4cafe357bd86feb4b56e5dfbf5b7822e237a2ee Author: Albert Astals Cid @@ -11200,7 +17457,7 @@ Gives a 8% speed increase in some pdf splash/Splash.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit c3122cfbe090f3a4045269222f941cd5ce77c171 Author: Albert Astals Cid @@ -11221,7 +17478,7 @@ implement writeImgFile for splashModeXBGR8 splash/SplashBitmap.cc | 25 +++++++++++++++++++++++-- - 1 files changed, 23 insertions(+), 2 deletions(-) + 1 file changed, 23 insertions(+), 2 deletions(-) commit f9425c0b5b112ac673d0499f79a743afce719593 Author: Hib Eris @@ -11229,7 +17486,7 @@ use pkgconfig to detect libpng on autotools too - configure.ac | 12 ++++-- + configure.ac | 12 ++++--- goo/Makefile.am | 7 +++- m4/libpng.m4 | 99 --------------------------------------------------- @@ -11243,7 +17500,7 @@ Only swap w with h if rotation is 90 or 270 utils/pdftoppm.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 35015ed11090d67cab69443e607d4d80ca03c619 Author: Nils Höglund @@ -11252,7 +17509,7 @@ Match the number of calls to beginMarkedContent and endMarkedContent poppler/Gfx.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit ee265760e6ecec93fe26fb8e02848872555daefd Author: Albert Astals Cid @@ -11261,7 +17518,7 @@ make sure properties exists before using it poppler/TextOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit eab7a55815c06525c7aeba254b66498ab147a958 Author: Albert Astals Cid @@ -11270,7 +17527,7 @@ if malloc failed return false splash/SplashFTFont.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit e2def20a45c1d8307fd62fabb9769121af975abf Author: Albert Astals Cid @@ -11281,7 +17538,7 @@ Fixes bug 26532 and a small line that was not drawn in 15899 poppler/OptionalContent.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 5edd175bdd0f7c2fc3aecb72384de4cb0788fc4e Author: Albert Astals Cid @@ -11290,7 +17547,7 @@ Add and fix copyright years poppler/CairoOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f0fba1b04589061449f98b9dcd8a0c4e7ad2d74 Author: Pino Toscano @@ -11309,7 +17566,7 @@ [CMake] reflect that poppler-glib needs cairo now poppler-glib.pc.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5c66c775bcd686c61ea136bcd8f261fb631c5e71 Author: Albert Astals Cid @@ -11332,7 +17589,7 @@ CMakeLists.txt | 4 ++++ config.h.cmake | 3 +++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit 1dff9d440556a155fb5ca7bed15fc6a1f77a1c97 Author: Pino Toscano @@ -11343,7 +17600,7 @@ CMakeLists.txt | 1 + config.h.cmake | 6 ++++++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit 4a0bcaa83e6e6533cd48c63449a08467d51c13ea Author: Pino Toscano @@ -11352,7 +17609,7 @@ [CMake] config.h.cmake: change some comments to match autotools' ones config.h.cmake | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) + 1 file changed, 6 insertions(+), 4 deletions(-) commit 9e38082c3e571d035f0152d65661e5dd97fdd5d8 Author: Pino Toscano @@ -11363,7 +17620,7 @@ CMakeLists.txt | 5 +++++ config.h.cmake | 3 +++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit eb03020893ed591c18817d75d427a1296cb1f233 Author: Pino Toscano @@ -11373,7 +17630,7 @@ autotools' generated one, and with the same comment config.h.cmake | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit ba65b3af047b758094b999b2939065c5127508dd Author: Albert Astals Cid @@ -11384,7 +17641,7 @@ Fixes bug 26351 goo/JpegWriter.h | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit d3d2a3ee0a3505f44d1196823716b768d434ba73 Author: Pino Toscano @@ -11393,7 +17650,7 @@ [CMake] fix typo: "MULTITHREAD" -> "MULTITHREADED" CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0dae2294cf8a2f312d8e6504be4e1be516b34b1b Author: Thomas Freitag @@ -11402,7 +17659,7 @@ Fix regression in painting. Fixes bug 26243 poppler/Gfx.cc | 9 ++++++++- - 1 files changed, 8 insertions(+), 1 deletions(-) + 1 file changed, 8 insertions(+), 1 deletion(-) commit aa9c3acbc73bafb33c8a797701ed0488a4a74263 Author: Carlos Garcia Campos @@ -11415,7 +17672,7 @@ poppler/CairoOutputDev.cc | 4 ++++ poppler/CairoOutputDev.h | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 41a450c8db45fd064798d15c3d8fe5ab536a7b30 Author: David Benjamin @@ -11432,7 +17689,7 @@ Still, better to clean this up. poppler/CairoOutputDev.cc | 5 ++--- - 1 files changed, 2 insertions(+), 3 deletions(-) + 1 file changed, 2 insertions(+), 3 deletions(-) commit 309228404710debee4337cc53c641dfef64ad86c Author: David Benjamin @@ -11457,7 +17714,7 @@ poppler/Gfx.cc | 11 +++++++++++ poppler/Gfx.h | 1 + - 2 files changed, 12 insertions(+), 0 deletions(-) + 2 files changed, 12 insertions(+) commit 8284008aa8230a92ba08d547864353d3290e9bf9 Author: David Benjamin @@ -11475,7 +17732,7 @@ poppler/Gfx.cc | 30 +++++++++++++++++++++++++++++- poppler/Gfx.h | 11 +++++++++++ - 2 files changed, 40 insertions(+), 1 deletions(-) + 2 files changed, 40 insertions(+), 1 deletion(-) commit 4ae84c830f842d100cbb702b32970951a5a5769f Author: David Benjamin @@ -11488,7 +17745,7 @@ poppler/Gfx.cc | 4 ++++ poppler/Gfx.h | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 120fe6ef673c648ae7b19ad2a7e9aef22ee25810 Author: David Benjamin @@ -11500,7 +17757,7 @@ collection, so they should not be deleted yet. poppler/GfxFont.cc | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) + 1 file changed, 5 insertions(+), 3 deletions(-) commit 3375fa96c7a7dbbb98f5a7b3df9e840a5f30bc80 Author: Albert Astals Cid @@ -11510,7 +17767,7 @@ goo/GooVector.h | 237 +++++++++++++++++++++++++++++++++---------------------- - 1 files changed, 141 insertions(+), 96 deletions(-) + 1 file changed, 141 insertions(+), 96 deletions(-) commit a945fe64e16ac9aa2577c5db05fc7f3fd4955b7b Author: Carlos Garcia Campos @@ -11521,7 +17778,7 @@ Fixes bug #26264. poppler/CairoOutputDev.cc | 37 +++++++++++++++++++++++++++++++++++-- - 1 files changed, 35 insertions(+), 2 deletions(-) + 1 file changed, 35 insertions(+), 2 deletions(-) commit 428cc965c17f167ea00540beeaeaac5c3e426686 Author: Albert Astals Cid @@ -11533,7 +17790,7 @@ glib/CMakeLists.txt | 1 + glib/poppler-features.h.cmake | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 0af1ae75fd4c8031343f668bed5d8ca6588ee652 Author: Carlos Garcia Campos @@ -11544,7 +17801,7 @@ Fixes bug #16906. poppler/CairoOutputDev.cc | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) commit d8ceaff39f5b80624b6bdc703c2a180dfc3d73ee Author: Carlos Garcia Campos @@ -11553,7 +17810,7 @@ [cairo] Add some more LOG messages poppler/CairoOutputDev.cc | 18 +++++++++++++++--- - 1 files changed, 15 insertions(+), 3 deletions(-) + 1 file changed, 15 insertions(+), 3 deletions(-) commit 778e764b3cb77526260c3c8b46acf19ad06fc61d Author: Albert Astals Cid @@ -11561,7 +17818,7 @@ poppler 0.13.0 - CMakeLists.txt | 4 +- + CMakeLists.txt | 4 +-- NEWS | 99 +++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 +- @@ -11583,7 +17840,7 @@ setting the former from an include()d script cmake/modules/PopplerDefaults.cmake | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit 92e1f46866c063c370ef1d6324f6a6c01aed6680 Author: Pino Toscano @@ -11592,7 +17849,7 @@ [CMake] do not add the fake buildtests target for the MSVC IDE cmake/modules/PopplerMacros.cmake | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit dea5aa37de079196fa916b1db9af782cf25045f9 Author: Maciej Mrozowski @@ -11601,7 +17858,7 @@ Install some more goo files CMakeLists.txt | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit 671a971c45a1e8ce8f6daade82117a9a137034d6 Author: Maciej Mrozowski @@ -11610,7 +17867,7 @@ do not install a private header qt4/src/Makefile.am | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 54c86e53a143a8f9d196e4bef2a733c6f00f6026 Author: Maciej Mrozowski @@ -11619,7 +17876,7 @@ Only build tests if told to test/CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit eb082274694aadb80dd16caea65d7f0a1adf8b46 Author: Maciej Mrozowski @@ -11628,7 +17885,7 @@ Only build demos and test if told so. Install poppler-layer.h glib/CMakeLists.txt | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) + 1 file changed, 5 insertions(+), 4 deletions(-) commit 73fcc310cd7d6ef435b453485c1c99a33f77212a Author: Maciej Mrozowski @@ -11637,7 +17894,7 @@ install man pages utils/CMakeLists.txt | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit 8672217af4cf88d5506572c2b40fbb0d1d0dbd87 Author: Albert Astals Cid @@ -11659,7 +17916,7 @@ ImgWriter is a header too goo/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 735e8a690d0bd3ab4bec90bdad975d19ac3d4689 Author: Albert Astals Cid @@ -11670,7 +17927,7 @@ msvc/config.h | 62 --------------------------------- msvc/poppler/poppler-config.h | 77 ----------------------------------------- - 2 files changed, 0 insertions(+), 139 deletions(-) + 2 files changed, 139 deletions(-) commit d485564f0dc86f62b996380bfbd570cf3f543e4f Author: Albert Astals Cid @@ -11678,10 +17935,10 @@ remove files noone maintains - README.windows | 63 ----------------------- + README.windows | 63 ------------------------ makefile.vc | 150 -------------------------------------------------------- - 2 files changed, 0 insertions(+), 213 deletions(-) + 2 files changed, 213 deletions(-) commit 38467f2738c88f060ae1d30332e34da743a888a5 Author: Albert Astals Cid @@ -11700,7 +17957,7 @@ compile glib/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 0397cf4f193015286464ae70ab202ed400110e30 Author: Albert Astals Cid @@ -11723,10 +17980,10 @@ [glib-demo] Remove #ifdef HAVE_CAIRO macros from several demos - glib/demo/images.c | 2 - + glib/demo/images.c | 2 -- glib/demo/layers.c | 71 +++------------------------------------------------- - glib/demo/render.c | 29 +++----------------- + glib/demo/render.c | 29 ++++----------------- 3 files changed, 9 insertions(+), 93 deletions(-) commit 4e938c1f81add2162ced0e97b24fe588f15f178d @@ -11737,14 +17994,14 @@ Splash support has been removed. - configure.ac | 74 ++++++++------- + configure.ac | 74 +++++++------- glib/Makefile.am | 20 +--- glib/poppler-document.cc | 9 -- glib/poppler-page.cc | 237 +-------------------------------------------- glib/poppler-page.h | 7 -- glib/poppler-private.h | 14 --- - glib/poppler.cc | 6 - + glib/poppler.cc | 6 -- glib/test-poppler-glib.cc | 6 +- poppler-glib.pc.in | 2 +- 9 files changed, 51 insertions(+), 324 deletions(-) @@ -11771,8 +18028,8 @@ poppler/PopplerCache.cc | 60 +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/PopplerCache.h | 16 ++++++++++++ - 2 files changed, 76 insertions(+), 0 deletions(-) + poppler/PopplerCache.h | 16 +++++++++++++ + 2 files changed, 76 insertions(+) commit 5ad492df75c0c2394719e85db4c8b43f15b52110 Author: mpsuzuki @@ -11781,7 +18038,7 @@ [cairo] Fix memory leak poppler/CairoFontEngine.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 3160464b4b70c714c36234320878acab81b866cc Author: Carlos Garcia Campos @@ -11801,7 +18058,7 @@ ++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoRescaleBox.h | 12 ++ poppler/Makefile.am | 4 +- - 5 files changed, 457 insertions(+), 1 deletions(-) + 5 files changed, 457 insertions(+), 1 deletion(-) commit 6825a219f0bc0ac6fd469fb8a6ebb86df774375f Author: Carlos Garcia Campos @@ -11811,7 +18068,7 @@ the page glib/poppler-page.cc | 27 ++++++++++++++++++--------- - 1 files changed, 18 insertions(+), 9 deletions(-) + 1 file changed, 18 insertions(+), 9 deletions(-) commit 6c61a457e9a8ec10945bc1e0700c8e4d121faa58 Author: Albert Astals Cid @@ -11822,7 +18079,7 @@ Fixes crash in KDE bug 223359 poppler/GfxState.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 442894d371879a6bf2adb5a39b9dd0a49e76e4ac Author: Pino Toscano @@ -11833,7 +18090,7 @@ followup of b64d4bd46b052feb0b143f1348773afbd93e5e33 glib/demo/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b64d4bd46b052feb0b143f1348773afbd93e5e33 Author: Carlos Garcia Campos @@ -11845,8 +18102,8 @@ glib/demo/main.c | 4 +- glib/demo/print.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/print.h | 31 +++++++++++ - 4 files changed, 171 insertions(+), 1 deletions(-) + glib/demo/print.h | 31 ++++++++++++ + 4 files changed, 171 insertions(+), 1 deletion(-) commit ba2c746f358a5785d8cbaaf03d8628ee3754c388 Author: Carlos Garcia Campos @@ -11855,7 +18112,7 @@ [glib-demo] Add render for printing option to render demo glib/demo/render.c | 47 ++++++++++++++++++++++++++++++++++++++--------- - 1 files changed, 38 insertions(+), 9 deletions(-) + 1 file changed, 38 insertions(+), 9 deletions(-) commit 9a478008ccb61641f09bd77eaa55033cca266c43 Author: Carlos Garcia Campos @@ -11867,7 +18124,7 @@ when opening any document. poppler/poppler-config.h.in | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + 1 file changed, 10 insertions(+) commit 1f80f874d8e132411816302465f04bc59d404d89 Author: Albert Astals Cid @@ -11878,7 +18135,7 @@ Bug 26034 poppler/PageTransition.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 350ff407e06a961f2a5b9d203cb8e78ce09313a0 Author: Hib Eris @@ -11889,7 +18146,7 @@ configure.ac | 26 +++++++++++++++++++++ poppler/GlobalParams.cc | 57 +++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 83 insertions(+), 0 deletions(-) + 2 files changed, 83 insertions(+) commit 36b67b002db802bfad553720e2114b76b07bb614 Author: Hib Eris @@ -11933,7 +18190,7 @@ - gtk+ to 2.14, see e338643f2cebb1203f7ff0646f87b3dea8318757 cmake/modules/FindGTK.cmake | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit e338643f2cebb1203f7ff0646f87b3dea8318757 Author: Carlos Garcia Campos @@ -11944,7 +18201,7 @@ Fixes bug #22090. configure.ac | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit ce9404b1999f81b3f9e5a89bcd6e715463f89024 Author: Carlos Garcia Campos @@ -11953,7 +18210,7 @@ Bump glib requirements to 2.18 configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 526c8871cbdfbc119e013ee96887a79f65403790 Author: Hib Eris @@ -11964,7 +18221,7 @@ Fixes bug #25032 glib/poppler-document.cc | 22 +++++++++++++++++++--- - 1 files changed, 19 insertions(+), 3 deletions(-) + 1 file changed, 19 insertions(+), 3 deletions(-) commit e0c8188136958b853269179079efefdd3488dc22 Author: Albert Astals Cid @@ -12014,7 +18271,7 @@ enable AM_SILENT_RULES by default configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit f3862f7d987aae52a1fd2bb0af27d1cd803a5b84 Author: Pino Toscano @@ -12023,7 +18280,7 @@ [cpp/tests] poppler-dump: show a string for the font type cpp/tests/poppler-dump.cpp | 23 ++++++++++++++++++++++- - 1 files changed, 22 insertions(+), 1 deletions(-) + 1 file changed, 22 insertions(+), 1 deletion(-) commit 9c343c821593ebae51ac47b58ad007a82f198652 Author: Pino Toscano @@ -12032,7 +18289,7 @@ [cpp/tests] poppler-dump: show the orientation of the pages cpp/tests/poppler-dump.cpp | 16 ++++++++++++++++ - 1 files changed, 16 insertions(+), 0 deletions(-) + 1 file changed, 16 insertions(+) commit bc91fe3824f37cd17a38aac85c817e8ada1b2f43 Author: Pino Toscano @@ -12041,7 +18298,7 @@ [cpp/tests] poppler-dump: a bit less output in permissions lines cpp/tests/poppler-dump.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1199de8f097a78edb831313841ac0ed3f9ec9905 Author: Pino Toscano @@ -12050,7 +18307,7 @@ [cpp/tests] poppler-dump: add --show-all to show all the information cpp/tests/poppler-dump.cpp | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) + 1 file changed, 13 insertions(+) commit 9522f830b59942adfc91d5f03c274415a4737ccc Author: Pino Toscano @@ -12059,8 +18316,8 @@ [cpp] use iconv for the utf8 <-> utf16 conversions cpp/poppler-global.cpp | 92 - +++++++++++++++++++++++++++++++++-------------- - 1 files changed, 64 insertions(+), 28 deletions(-) + +++++++++++++++++++++++++++++++++--------------- + 1 file changed, 64 insertions(+), 28 deletions(-) commit b156b4031f5daf658f40db8efa2a3016d95b98b5 Author: Pino Toscano @@ -12089,7 +18346,7 @@ cpp/poppler-private.cpp | 44 +++++++++++++++++++++++++++++++++++++++++--- - 1 files changed, 41 insertions(+), 3 deletions(-) + 1 file changed, 41 insertions(+), 3 deletions(-) commit 3b6e3605209d5db453725b9ce4e6e54679d9c5da Author: Albert Astals Cid @@ -12114,7 +18371,7 @@ instead of returning a NULL stream poppler/Parser.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 283dd326a00c804b6332ee3ca1aaa0d86377b3f3 Author: Pino Toscano @@ -12124,7 +18381,7 @@ builddir != srcdir cpp/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit df0ccddb7f784b4a8564beda51b3047cb9e3611a Author: Albert Astals Cid @@ -12134,7 +18391,7 @@ change on render time utils/pdftoppm.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + 1 file changed, 4 insertions(+), 2 deletions(-) commit ab88a02f7efefc950a316d7a5edf88dad8f3e4d0 Author: Carlos Garcia Campos @@ -12146,7 +18403,7 @@ missing. poppler/Annot.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 39dc99431b3ea9e00f6f645dd7169c0319571dc9 Author: Carlos Garcia Campos @@ -12160,7 +18417,7 @@ poppler/Annot.cc | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 2 + - 2 files changed, 114 insertions(+), 0 deletions(-) + 2 files changed, 114 insertions(+) commit e4f5a78a853b88b1586ef59fc8893a321ea23736 Author: Carlos Garcia Campos @@ -12172,7 +18429,7 @@ poppler/Annot.cc | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 70 insertions(+), 0 deletions(-) + 1 file changed, 70 insertions(+) commit 752b14857cfb0669fd6d7dfef2ea73c13a2369fc Author: Pino Toscano @@ -12181,7 +18438,7 @@ simplify cpp/poppler-toc.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a26e4b7903fabc667d7d16c23ca2c7a535dd05fa Author: Pino Toscano @@ -12203,7 +18460,7 @@ cpp/tests/Makefile.am | 17 +++ cpp/tests/poppler-dump.cpp | 293 ++++++++++++++++++++++++++++++++++++++++++++ - 7 files changed, 339 insertions(+), 0 deletions(-) + 7 files changed, 339 insertions(+) commit 86c871cc625d00b8ee7f93dc8c0f9ef8462bba5a Author: Carlos Garcia Campos @@ -12222,7 +18479,7 @@ poppler/Annot.cc | 199 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 2 + - 2 files changed, 201 insertions(+), 0 deletions(-) + 2 files changed, 201 insertions(+) commit 904ecd929c6acbbad6d782b950c53c0a80e1f39c Author: Carlos Garcia Campos @@ -12231,7 +18488,7 @@ [annots] Fix memory leaks poppler/Annot.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit ef7954b86f9b1a762c4f77a48d5f42f8db4bbed7 Author: Pino Toscano @@ -12240,7 +18497,7 @@ [cpp] use the correct index (instead of an uninitialized variable) cpp/poppler-page.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2547b5e53e7799cf7299838ae9bd882c21a228ae Author: Pino Toscano @@ -12249,7 +18506,7 @@ [cpp] properly delete the children of a toc item cpp/poppler-toc.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 771bd3594740fe16bd030dbe73928a8b1d4d113f Author: Pino Toscano @@ -12258,7 +18515,7 @@ [cpp] actually implement toc::root() cpp/poppler-toc.cpp | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit ca1d2ec4588b2437b58b4448ae2fc5ebd0f130d3 Author: Pino Toscano @@ -12277,7 +18534,7 @@ [cpp] fix the reference to the vector data cpp/poppler-document.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9bb90c99b65e0e9d9b65c7dbeb5b4d66377ceb21 Author: Pino Toscano @@ -12286,7 +18543,7 @@ [cpp] add destructor for 'rectangle' cpp/poppler-rectangle.h | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 61ccdc9ab3b816174896fcae0899ff34f11eee80 Author: Pino Toscano @@ -12298,7 +18555,7 @@ cpp/Makefile.am | 1 + cpp/poppler-rectangle.cpp | 35 +++++++++++++++++++++++++++++++++++ cpp/poppler-rectangle.h | 5 +++++ - 4 files changed, 42 insertions(+), 0 deletions(-) + 4 files changed, 42 insertions(+) commit 69dd51fed3de41f8b799b811ae5ee59c0d5f59c2 Author: Pino Toscano @@ -12318,7 +18575,7 @@ loading functions cpp/poppler-document.h | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 1d23cc677e9b0a9f61c53e0ea365537f33abe5bf Author: Pino Toscano @@ -12328,7 +18585,7 @@ cpp/poppler-global.cpp | 23 +++++++++++++++++++++++ cpp/poppler-global.h | 3 +++ - 2 files changed, 26 insertions(+), 0 deletions(-) + 2 files changed, 26 insertions(+) commit 82954ea5f8ba880276328765f104690a05adbd9e Author: Carlos Garcia Campos @@ -12341,8 +18598,8 @@ poppler/Annot.cc | 94 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 2 files changed, 96 insertions(+), 0 deletions(-) + poppler/Annot.h | 2 ++ + 2 files changed, 96 insertions(+) commit c6195472326c183fcfd8a3e9da1ee7f6fa8b7c3d Author: Carlos Garcia Campos @@ -12381,7 +18638,7 @@ cpp/poppler-document.cpp | 9 +++++++++ cpp/poppler-document.h | 1 + - 2 files changed, 10 insertions(+), 0 deletions(-) + 2 files changed, 10 insertions(+) commit 6c4fa513e60dbdd5ab693434f239d82d95756994 Author: Carlos Garcia Campos @@ -12395,7 +18652,7 @@ poppler/Annot.cc | 120 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 2 + - 2 files changed, 122 insertions(+), 0 deletions(-) + 2 files changed, 122 insertions(+) commit eed94b8bd2855dce1fd39b835e3280cbd0ccd1cf Author: Carlos Garcia Campos @@ -12407,8 +18664,8 @@ poppler/Annot.cc | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 2 + - 2 files changed, 64 insertions(+), 0 deletions(-) + poppler/Annot.h | 2 ++ + 2 files changed, 64 insertions(+) commit 1c7a5f5e89c4c51e31b6de345d4862ef8dcc2bc0 Author: Carlos Garcia Campos @@ -12422,7 +18679,7 @@ poppler/Annot.cc | 305 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 2 + - 2 files changed, 307 insertions(+), 0 deletions(-) + 2 files changed, 307 insertions(+) commit c9cb6353ad5279d09615eb2c944b2b053cdf5ccc Author: Pino Toscano @@ -12433,7 +18690,7 @@ cpp/poppler-document.cpp | 23 +++++++++++++++++++++++ cpp/poppler-document.h | 1 + cpp/poppler-global.h | 4 ++++ - 3 files changed, 28 insertions(+), 0 deletions(-) + 3 files changed, 28 insertions(+) commit 30e90c7c1b41c62ddc21905e7ccdea4c95547e80 Author: Pino Toscano @@ -12443,7 +18700,7 @@ cpp/poppler-document.cpp | 10 ++++++++++ cpp/poppler-document.h | 2 ++ - 2 files changed, 12 insertions(+), 0 deletions(-) + 2 files changed, 12 insertions(+) commit 93fd588c519958a1f66231c111ea8a6b0a759be1 Author: Pino Toscano @@ -12454,7 +18711,7 @@ cpp/poppler-document-private.h | 5 +++++ cpp/poppler-document.cpp | 35 ++++++++++++++++++++++++++++++++++- cpp/poppler-document.h | 3 +++ - 3 files changed, 42 insertions(+), 1 deletions(-) + 3 files changed, 42 insertions(+), 1 deletion(-) commit 53996365b159cf84adf2cac56c76b8bda8dfb12e Author: Pino Toscano @@ -12499,7 +18756,7 @@ .gitignore | 1 + cpp/.gitignore | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 01e902e40ca15acf0319e37d39a271d6875bfce9 Author: Pino Toscano @@ -12529,7 +18786,7 @@ cmake/modules/FindCairo.cmake | 18 ++++++++++++++++++ config.h.cmake | 3 +++ - 2 files changed, 21 insertions(+), 0 deletions(-) + 2 files changed, 21 insertions(+) commit f6ba877e0c22538cfe34d32d69814f660de59d2c Author: Pino Toscano @@ -12539,7 +18796,7 @@ ConfigureChecks.cmake | 1 + config.h.cmake | 3 +++ - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit e12801320ae030628fc62c073983c06b39ee13d7 Author: Pino Toscano @@ -12548,7 +18805,7 @@ minor spello config.h.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 6428907ebcf33d4391673aadcfa71c3061f6d352 Author: Pino Toscano @@ -12558,7 +18815,7 @@ ConfigureChecks.cmake | 1 + config.h.cmake | 3 +++ - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit 916ab7163249e23bd5ba00922fdcad9caaf92c75 Author: Pino Toscano @@ -12567,7 +18824,7 @@ [CMake] oops, those should have been '#cmakedefine' and not '#define' config.h.cmake | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit ea655d8c7e24e97ee710110a783ed9c209cf76e3 Author: Pino Toscano @@ -12576,7 +18833,7 @@ [CMake] move and rename to match more the autotools output config.h.cmake | 21 ++++++++++++++------- - 1 files changed, 14 insertions(+), 7 deletions(-) + 1 file changed, 14 insertions(+), 7 deletions(-) commit 9f0146c5b2f9326e834104b89791f66b18f85adc Author: Pino Toscano @@ -12586,7 +18843,7 @@ ConfigureChecks.cmake | 2 ++ config.h.cmake | 6 ++++++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit 9d0cf201e96044dd679c26bea6255d986a6cd246 Author: Pino Toscano @@ -12595,7 +18852,7 @@ [cpp] add ignore file cpp/.gitignore | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit d783e92b863d8b22de6ca326328115fec63193ed Author: Pino Toscano @@ -12604,7 +18861,7 @@ [cpp] don't forget the cmake stuff when packing with the autotools Makefile.am | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 0105caefe860e7a45fc7d3a1bd1162fe56bcfe6a Author: Pino Toscano @@ -12626,7 +18883,7 @@ [cpp] add the (rest of the) CMake build system for it CMakeLists.txt | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 0e41f937946e4e4c1b660406bd74e4afe8825b5f Author: Pino Toscano @@ -12637,7 +18894,7 @@ Makefile.am | 6 +++++- configure.ac | 15 +++++++++++++++ cpp/Makefile.am | 32 ++++++++++++++++++++++++++++++++ - 3 files changed, 52 insertions(+), 1 deletions(-) + 3 files changed, 52 insertions(+), 1 deletion(-) commit 9727fdc0c682742335e44ddc2f32d60e4c59983a Author: Pino Toscano @@ -12674,7 +18931,7 @@ cpp/poppler-page-private.h | 44 +++++ cpp/poppler-page-transition.cpp | 95 +++++++++++ cpp/poppler-page-transition.h | 82 +++++++++ - cpp/poppler-page.cpp | 121 +++++++++++++ + cpp/poppler-page.cpp | 121 ++++++++++++++ cpp/poppler-page.h | 62 +++++++ cpp/poppler-private.cpp | 70 ++++++++ cpp/poppler-private.h | 66 ++++++++ @@ -12682,7 +18939,7 @@ cpp/poppler-toc-private.h | 62 +++++++ cpp/poppler-toc.cpp | 136 +++++++++++++++ cpp/poppler-toc.h | 74 ++++++++ - 22 files changed, 2085 insertions(+), 0 deletions(-) + 22 files changed, 2085 insertions(+) commit 62854051f4e47028147cc93a5faac39e2fa2c9fd Author: Carlos Garcia Campos @@ -12691,7 +18948,7 @@ Initialize profileCommands in Gfx constructor poppler/Gfx.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 4e6af25a028d16608111634c5467420e31fa399b Author: Carlos Garcia Campos @@ -12703,7 +18960,7 @@ https://bugzilla.gnome.org/show_bug.cgi?id=603934 poppler/CairoOutputDev.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 6798d3e52e36e91bceff3a1a96372e9d9c6f3813 Author: Carlos Garcia Campos @@ -12727,7 +18984,7 @@ Fixes bug 25465 poppler/PDFDoc.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 32103f45d0193b31e95269ea9123b8011d93e994 Author: Carlos Garcia Campos @@ -12751,7 +19008,7 @@ AnnotLink already implements draw() poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ddf85d4a51f605eed998c633857b8bb5c74ab590 Author: Albert Astals Cid @@ -12762,7 +19019,7 @@ By checking the GooString we are going to use really exists poppler/PSOutputDev.cc | 24 ++++++++++++++++-------- - 1 files changed, 16 insertions(+), 8 deletions(-) + 1 file changed, 16 insertions(+), 8 deletions(-) commit 78b4afa0a44048b8d40438d400652dbae4cb99b1 Author: Albert Astals Cid @@ -12773,7 +19030,7 @@ Fixes KDE bug 217013 poppler/GfxFont.cc | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit fee5cb0eec2ddb8d596289e9a6285cf04d97632e Author: Carlos Garcia Campos @@ -12782,7 +19039,7 @@ [annots] Remove redundant flags definition poppler/Annot.cc | 22 +++++++++------------- - 1 files changed, 9 insertions(+), 13 deletions(-) + 1 file changed, 9 insertions(+), 13 deletions(-) commit 3a94e8ce90c0a4d11c5c5aa8805c167c8a0434e5 Author: Carlos Garcia Campos @@ -12794,7 +19051,7 @@ using it. poppler/CairoOutputDev.cc | 12 +++++------- - 1 files changed, 5 insertions(+), 7 deletions(-) + 1 file changed, 5 insertions(+), 7 deletions(-) commit a093b768e64d477ebdd5f6b519d80a6c45706e7e Author: Albert Astals Cid @@ -12816,7 +19073,7 @@ bug 24575 poppler/CairoOutputDev.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 1d0cb9b2cfd4d4d9aa9b0ad83ad6408544263a09 Author: Carlos Garcia Campos @@ -12825,7 +19082,7 @@ [cairo] Initialize fill_color and stroke_color poppler/CairoOutputDev.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 32de2ac62fb87570e1a59152f37b86e571a01180 Author: Ilya Gorenbein @@ -12836,8 +19093,8 @@ Makes load a file Ilya can't share poppler/XRef.cc | 165 - +++++++++++++++++++++++++++++++----------------------- - 1 files changed, 95 insertions(+), 70 deletions(-) + ++++++++++++++++++++++++++++++++----------------------- + 1 file changed, 95 insertions(+), 70 deletions(-) commit 039c6dffbfbed46a11e207048a3247d6921d6b02 Author: Ilya Gorenbein @@ -12846,7 +19103,7 @@ Correctly initialize fileName poppler/Link.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit b905caf1785ee207cc0480953da69be302d3d4e9 Author: David Benjamin @@ -12859,7 +19116,7 @@ values as well. This fixes bug #17439. poppler/Gfx.cc | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + 1 file changed, 7 insertions(+), 2 deletions(-) commit d99e7a88845a5f4b35e2c538c597316b2ad541ca Author: Albert Astals Cid @@ -12870,8 +19127,8 @@ Bug 25103 configure.ac | 61 - ++++++++++++++++++++++++++++----------------------------- - 1 files changed, 30 insertions(+), 31 deletions(-) + +++++++++++++++++++++++++++++----------------------------- + 1 file changed, 30 insertions(+), 31 deletions(-) commit 55261a2dc86241c8d132e590e76e7398b3ca5090 Author: Albert Astals Cid @@ -12882,7 +19139,7 @@ bug-poppler13487.pdf gets a 15% faster rendering splash/SplashMath.h | 19 +++++++++++++++++-- - 1 files changed, 17 insertions(+), 2 deletions(-) + 1 file changed, 17 insertions(+), 2 deletions(-) commit 28df9fb323f14dc632c9502655abf69984b7d67e Author: Albert Astals Cid @@ -12891,7 +19148,7 @@ Remove unused label poppler/Catalog.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 037979a01a6fcafc61360e758dbc4a5eb056825e Author: Carlos Garcia Campos @@ -12903,7 +19160,7 @@ Fixes bug #8474. poppler/CairoOutputDev.cc | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) + 1 file changed, 6 insertions(+), 1 deletion(-) commit 46380d36f004d71dd2c2e7bc82836af248684b51 Author: Albert Astals Cid @@ -12912,9 +19169,9 @@ i didn't want to commit this configure.ac | 60 - ++++++++++++++++++++++++++------------------------ - splash/SplashMath.h | 5 +-- - utils/pdftoppm.cc | 8 ------ + ++++++++++++++++++++++++++------------------------- + splash/SplashMath.h | 5 ++--- + utils/pdftoppm.cc | 8 ------- 3 files changed, 33 insertions(+), 40 deletions(-) commit 1844e0927ae89824f59b2b3378bf5e00a51a251c @@ -12926,10 +19183,10 @@ it is evil and locale dependant, we do NOT want that so use QString::number - configure.ac | 60 ++++++++++++++--------------- + configure.ac | 60 +++++++++++++++--------------- qt4/src/poppler-annotation.cc | 82 - ++++++++++++++++++++-------------------- - splash/SplashMath.h | 5 +- + ++++++++++++++++++++--------------------- + splash/SplashMath.h | 5 ++- utils/pdftoppm.cc | 8 ++++ 4 files changed, 81 insertions(+), 74 deletions(-) @@ -12957,7 +19214,7 @@ cleartomark. poppler/PSOutputDev.cc | 18 +++++++++++++----- - 1 files changed, 13 insertions(+), 5 deletions(-) + 1 file changed, 13 insertions(+), 5 deletions(-) commit 2d30dc605cd984f6c32124af9aa7b877d416d141 Author: Carlos Garcia Campos @@ -12967,7 +19224,7 @@ table glib/demo/annots.c | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 6c8ae140256818401351a331787c83e043fdba09 Author: Carlos Garcia Campos @@ -12987,7 +19244,7 @@ glib/demo/annots.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 67 insertions(+), 0 deletions(-) + 1 file changed, 67 insertions(+) commit 8f4fdd864d79e4fa83951a3eb006ea8287c3a1ba Author: Carlos Garcia Campos @@ -13009,10 +19266,10 @@ glib/poppler-annot.cc | 69 +++++++++++++++++++++++++++++++++++++++++++++--- - glib/poppler-annot.h | 8 +++++ - glib/poppler-page.cc | 3 ++ + glib/poppler-annot.h | 8 ++++++ + glib/poppler-page.cc | 3 +++ glib/poppler-private.h | 1 + - glib/poppler.h | 49 +++++++++++++++++---------------- + glib/poppler.h | 49 +++++++++++++++++----------------- 5 files changed, 102 insertions(+), 28 deletions(-) commit 189c45332991bce51e40bcaf65da67d2d644045a @@ -13039,7 +19296,7 @@ Fixes KDE bug #214317 poppler/DCTStream.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit c59d93061cf71d13916872a20aed37ecfbb3bfa4 Author: Carlos Garcia Campos @@ -13048,7 +19305,7 @@ [cairo] Do nothing when image mask is 1x1 and the pixel is 0 poppler/CairoOutputDev.cc | 14 ++++++++++++++ - 1 files changed, 14 insertions(+), 0 deletions(-) + 1 file changed, 14 insertions(+) commit 448f03cfc429d33bfa5527e3dc964ef5da10ee94 Author: Adrian Johnson @@ -13064,7 +19321,7 @@ of the charproc when the gray level is > 0.5. poppler/CairoOutputDev.cc | 14 ++++++++++++++ - 1 files changed, 14 insertions(+), 0 deletions(-) + 1 file changed, 14 insertions(+) commit 3fead2a3b53681ef95116f18f17f1a9febec6e48 Author: Carlos Garcia Campos @@ -13073,7 +19330,7 @@ Transitions dictionary can be a Ref too poppler/Page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ac4955d03a532cab1933698aeb667d44300e52d0 Author: Carlos Garcia Campos @@ -13098,7 +19355,7 @@ of the surface will the new data. poppler/CairoOutputDev.cc | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) + 1 file changed, 8 insertions(+) commit 10a41150c4067bb3ab85e25dae76e0968a6cd586 Author: Chris Wilson @@ -13107,7 +19364,7 @@ [cairo] Use colToDbl() to avoid rounding error. poppler/CairoOutputDev.cc | 37 +++++++++++++++++++------------------ - 1 files changed, 19 insertions(+), 18 deletions(-) + 1 file changed, 19 insertions(+), 18 deletions(-) commit c9491319689f04edd57adda7ee85f84f17fd1c47 Author: Chris Wilson @@ -13115,9 +19372,9 @@ [cairo] Reduce the number of redundant pattern creations - poppler/CairoOutputDev.cc | 92 + poppler/CairoOutputDev.cc | 84 +++++++++++++++++++++++++++------------------ - 1 files changed, 55 insertions(+), 37 deletions(-) + 1 file changed, 51 insertions(+), 33 deletions(-) commit ead78d9f703c8b2d556c94be3c47dbae7469eda8 Author: Reece Dunn @@ -13126,7 +19383,7 @@ fontpos is never set to -1, so remove the checks in HtmlOutputDev. utils/HtmlOutputDev.cc | 11 +++-------- - 1 files changed, 3 insertions(+), 8 deletions(-) + 1 file changed, 3 insertions(+), 8 deletions(-) commit 55dd6024a4672a1787e8b1a8276bd78fff94e2cd Author: Ilya Gorenbein @@ -13139,7 +19396,7 @@ to see why one would want such file poppler/Catalog.cc | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) + 1 file changed, 5 insertions(+), 5 deletions(-) commit 58a1d42aed7352c008d201b8f355f6e4146f71e5 Author: Carlos Garcia Campos @@ -13148,7 +19405,7 @@ [cairo] Don't render patterns when using CairoImageOutputDev poppler/CairoOutputDev.h | 15 +++++++++++++-- - 1 files changed, 13 insertions(+), 2 deletions(-) + 1 file changed, 13 insertions(+), 2 deletions(-) commit 7670cc48dcf3ffd77e3ffa29056a3e13b2926709 Author: Ilya Gorenbein @@ -13159,7 +19416,7 @@ Fixes bug 24733 poppler/Annot.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit 4fe89e520a04a6ab6d6ec6a8294896b2f427c7da Author: Albert Astals Cid @@ -13170,7 +19427,7 @@ See bug 24721 poppler/PageLabelInfo.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit b174ebd6b323c7a58a19d59c1a9e4ac4e6cba7d9 Author: Albert Astals Cid @@ -13185,12 +19442,12 @@ of a page so it's a bit slower but at least it's correct. Fixes bug 24686 - poppler/Gfx.cc | 49 +++++++++++++++++--------- - poppler/Gfx.h | 13 ++++++- + poppler/Gfx.cc | 49 +++++++++++++++++---------- + poppler/Gfx.h | 13 +++++-- poppler/GfxState.cc | 94 +++++++++++++++++++++++++-------------------------- poppler/GfxState.h | 33 +++++++++--------- - poppler/Page.cc | 4 +- + poppler/Page.cc | 4 +-- 5 files changed, 107 insertions(+), 86 deletions(-) commit 4a9bdd30dc353865685e03eb1c1ac6093797695a @@ -13202,7 +19459,7 @@ See bug 24525 for more info poppler/GfxFont.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit c839b706092583f6b12ed3cc634bf5af34b7a2bb Author: Carlos Garcia Campos @@ -13211,7 +19468,7 @@ [glib] Fix CVE-2009-3607 glib/poppler-page.cc | 20 ++++++++++---------- - 1 files changed, 10 insertions(+), 10 deletions(-) + 1 file changed, 10 insertions(+), 10 deletions(-) commit 44462e0ca39392e5629020226b901e4026089b46 Author: Albert Astals Cid @@ -13220,7 +19477,7 @@ fix memory leak poppler/PSOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d701aaa9eaa62567210070129f5feffe24bf1936 Author: Albert Astals Cid @@ -13229,7 +19486,7 @@ This include is needed as this file uses Ref poppler/OutputDev.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d4202536e1b62c326c301d5088fa0e176c523e85 Author: Pino Toscano @@ -13238,7 +19495,7 @@ SplashGlyphBitmap is a struct and not a class poppler/ArthurOutputDev.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 654176dee7c9325aa5a24a2de3c070faa16e8a9c Author: Michael Jansen @@ -13268,7 +19525,7 @@ put a space so MSVC won't try to see it as comment poppler/GfxState.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit f64086ea22a4e8cb3d4e7116db2a9541ac2fb19f Author: Albert Astals Cid @@ -13277,7 +19534,7 @@ check the document is not locked when printing qt4/src/poppler-ps-converter.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 85d1015480b7ab3f21cc5f78dc53d4c5efdc6e60 Author: Albert Astals Cid @@ -13286,7 +19543,7 @@ fix file name comment qt4/src/poppler-ps-converter.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 270764ad1bf2cfe95aed0b6850d2347361b4268d Author: Albert Astals Cid @@ -13322,7 +19579,7 @@ fix constructor of DCTStream poppler/Stream.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit fd91b79c053bb5cd01a766032b90981dbc5e5dd3 Author: Albert Astals Cid @@ -13331,7 +19588,7 @@ fix compiling with automake goo/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit c3031b4318af6f85256f2478c8678dedd0d6acd1 Author: Pino Toscano @@ -13340,7 +19597,7 @@ cmake: simplify the linking to libpng CMakeLists.txt | 7 +++---- - 1 files changed, 3 insertions(+), 4 deletions(-) + 1 file changed, 3 insertions(+), 4 deletions(-) commit 96688dd7a091f8fa141fad2b3d05bae04b0b86fb Author: Patrick Spendrin @@ -13349,7 +19606,7 @@ MSVC: add _CRT_SECURE_NO_WARNINGS to the define's CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit f346c1f6b55f87ebd6bb0b0932462d5514aa40ff Author: Albert Astals Cid @@ -13373,7 +19630,7 @@ goo/ImgWriter.cc | 15 +++++++++++++++ goo/ImgWriter.h | 2 ++ goo/Makefile.am | 1 + - 4 files changed, 19 insertions(+), 0 deletions(-) + 4 files changed, 19 insertions(+) commit 699dcacced7be05b788c414c231dc2b5c07de06e Author: Albert Astals Cid @@ -13392,7 +19649,7 @@ build on cmake too CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d67511c92022121066f43003f01b955962ddcd33 Author: Stefan Thomas @@ -13400,15 +19657,15 @@ Add -jpeg to pdftoppm - goo/ImgWriter.h | 28 ++++++++++++++ + goo/ImgWriter.h | 28 +++++++++++++++ goo/JpegWriter.cc | 92 ++++++++++++++++++++++++++++++++++++++++++++++++ goo/JpegWriter.h | 42 ++++++++++++++++++++++ - goo/Makefile.am | 2 + - goo/PNGWriter.cc | 5 ++- - goo/PNGWriter.h | 10 +++-- - splash/SplashBitmap.cc | 46 +++++++++++++++++------- - splash/SplashBitmap.h | 5 ++- + goo/Makefile.am | 2 ++ + goo/PNGWriter.cc | 5 +-- + goo/PNGWriter.h | 10 +++--- + splash/SplashBitmap.cc | 46 ++++++++++++++++-------- + splash/SplashBitmap.h | 5 +-- splash/SplashTypes.h | 11 ++++++ utils/pdftoppm.1 | 3 ++ utils/pdftoppm.cc | 22 +++++++++--- @@ -13421,7 +19678,7 @@ [glib-demo] Show some of the annot flags in annots treeview glib/demo/annots.c | 35 +++++++++++++++++++++++++++++++++-- - 1 files changed, 33 insertions(+), 2 deletions(-) + 1 file changed, 33 insertions(+), 2 deletions(-) commit 034907c6582c1f50782ec9c58a29b140c6fc0688 Author: Albert Astals Cid @@ -13430,7 +19687,7 @@ Forgot to update the year here qt4/src/poppler-private.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit fef89acebf5312324c104fb52e629563fbc2de76 Author: Albert Astals Cid @@ -13453,16 +19710,16 @@ enable it poppler/ArthurOutputDev.cc | 2 +- - poppler/GlobalParams.cc | 19 ------------ + poppler/GlobalParams.cc | 19 ------------- poppler/GlobalParams.h | 3 -- - poppler/SplashOutputDev.cc | 8 ++++- + poppler/SplashOutputDev.cc | 8 +++++- poppler/SplashOutputDev.h | 3 ++ splash/SplashFTFont.cc | 64 - +++++++++-------------------------------- - splash/SplashFTFont.h | 4 +- - splash/SplashFTFontEngine.cc | 8 ++-- - splash/SplashFTFontEngine.h | 7 ++-- - splash/SplashFontEngine.cc | 5 ++- + +++++++++--------------------------------- + splash/SplashFTFont.h | 4 +-- + splash/SplashFTFontEngine.cc | 8 +++--- + splash/SplashFTFontEngine.h | 7 +++-- + splash/SplashFontEngine.cc | 5 ++-- splash/SplashFontEngine.h | 3 +- 11 files changed, 40 insertions(+), 86 deletions(-) @@ -13520,7 +19777,7 @@ flags qt4/src/poppler-annotation.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit d46f7343e446331489d3fe6711a7cf778e0bd902 Author: Albert Astals Cid @@ -13531,7 +19788,7 @@ Fixes saving some files poppler/PDFDoc.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2bc2040081919340415f576ce8266356deadbfcd Author: Albert Astals Cid @@ -13542,7 +19799,7 @@ Makes saving more faithful for some files poppler/PDFDoc.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 05eb7342d5234732f27c9c67b7fc1f9e40a4e075 Author: Albert Astals Cid @@ -13553,7 +19810,7 @@ Fixes saving of some files poppler/PDFDoc.cc | 12 ++++++++++++ - 1 files changed, 12 insertions(+), 0 deletions(-) + 1 file changed, 12 insertions(+) commit b98faa4c162392d9416a5a93c9042b41f82d8657 Author: Albert Astals Cid @@ -13562,7 +19819,7 @@ Return the save status as program status test/pdf-fullrewrite.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit f73f59f2c7bb7c7d57eb70cdc1bc30b80a92d0b7 Author: Albert Astals Cid @@ -13573,7 +19830,7 @@ Fixes saving some files poppler/Parser.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 91135c7e788bc32e414e1a9c9ab43b326a07e970 Author: Albert Astals Cid @@ -13584,7 +19841,7 @@ Fixes saving of some files goo/GooString.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 9dcb3e8be2cd52a795605548e43d6bfc149b2ea5 Author: Yaakov Selkowitz @@ -13595,7 +19852,7 @@ Fixes check on cygwin m4/qt.m4 | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit ed4a6f1cfc7ccd2717d939841c092347c3307547 Author: Kovid Goyal @@ -13606,7 +19863,7 @@ Bug 24090 poppler/PDFDoc.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit 04b232d48930af9bc614d7fef47f79ce247713a4 Author: Albert Astals Cid @@ -13617,7 +19874,7 @@ Bug 24091 poppler/PDFDoc.cc | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit 343e4f9aceb935eb393ad94bbef4dbb1b1a450ee Author: Albert Astals Cid @@ -13626,7 +19883,7 @@ Plug leak test/pdf-fullrewrite.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 2ea0032283c4717f1bb285fab7956fc38f375e87 Author: Yaakov Selkowitz @@ -13650,7 +19907,7 @@ Fixes bug 6841 poppler/Parser.cc | 17 +++++++++++++---- - 1 files changed, 13 insertions(+), 4 deletions(-) + 1 file changed, 13 insertions(+), 4 deletions(-) commit b7702820245fb6cdbf77afba37c53c03d4362a25 Author: Albert Astals Cid @@ -13661,7 +19918,7 @@ This is a regression after the removal of setting LC_NUMERIC poppler/PDFDoc.cc | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit d31080d8195694cef740d4e77484179bb38d1f26 Author: Albert Astals Cid @@ -13673,7 +19930,7 @@ Fixes bug #24036 poppler/Annot.cc | 33 ++++++++++++++++++++------------- - 1 files changed, 20 insertions(+), 13 deletions(-) + 1 file changed, 20 insertions(+), 13 deletions(-) commit a729d005a7204791fa8415de5aa0834136073ce8 Author: Pino Toscano @@ -13690,7 +19947,7 @@ poppler/GlobalParams.cc | 1 + poppler/GlobalParams.h | 1 + poppler/GlobalParamsWin.cc | 1 - - 3 files changed, 2 insertions(+), 1 deletions(-) + 3 files changed, 2 insertions(+), 1 deletion(-) commit 68711d8494e2765c4a24ea59ce8d904981f0f917 Author: Albert Astals Cid @@ -13701,7 +19958,7 @@ some compilers don't know about uint poppler/Gfx.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 943a13c9354dec18cb023642aebbe5d3bb920ed7 Author: Albert Astals Cid @@ -13736,7 +19993,7 @@ Also fixes problems in bug-poppler6881-2.pdf and bug-poppler6500.pdf poppler/JBIG2Stream.cc | 13 ++++++++----- - 1 files changed, 8 insertions(+), 5 deletions(-) + 1 file changed, 8 insertions(+), 5 deletions(-) commit 1cb25a4adaaf3e2da50724312a3db6928991f425 Author: Carlos Garcia Campos @@ -13747,7 +20004,7 @@ Fixes bug #10386 glib/poppler-document.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 842e00f3114666609ef4dec6fa613d46f330a40c Author: Albert Astals Cid @@ -13771,7 +20028,7 @@ a stream poppler/Catalog.h | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 642650b6f70425c8fff2df978ae71249a5ae07f3 Author: David Benjamin @@ -13782,7 +20039,7 @@ Bug #17252 poppler/GfxFont.cc | 38 ++++++++++++++++++++++++++++++++------ - 1 files changed, 32 insertions(+), 6 deletions(-) + 1 file changed, 32 insertions(+), 6 deletions(-) commit bf5811f5331292ccf30f1b0f089fe43d351d96be Author: Albert Astals Cid @@ -13794,7 +20051,7 @@ assume all the area in between have the same color. Fixes bug #20238 poppler/Gfx.cc | 17 ++++++++++++++++- - 1 files changed, 16 insertions(+), 1 deletions(-) + 1 file changed, 16 insertions(+), 1 deletion(-) commit e94430b790fde6ce7b7cb163c2e0adf2d071c81d Author: Albert Astals Cid @@ -13803,7 +20060,7 @@ Make code a bit more readable poppler/Gfx.cc | 23 +++++++++++------------ - 1 files changed, 11 insertions(+), 12 deletions(-) + 1 file changed, 11 insertions(+), 12 deletions(-) commit 465212780557705fd939dfe54f96913505bfc96e Author: Albert Astals Cid @@ -13812,7 +20069,7 @@ forgot to update my copyright poppler/JPEG2000Stream.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 4f6016d01ced32002bef22b9b5d5426a74e55842 Author: Albert Astals Cid @@ -13823,7 +20080,7 @@ Don't just directly print strings of unknown content; use "%s". poppler/JPEG2000Stream.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 4616b23382b5d155f8b2f1942733037cf5730844 Author: Christian Persch @@ -13834,7 +20091,7 @@ Don't just directly print strings of unknown content; use "%s". poppler/GfxState.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 6c5c8d008456d1e4f3d60bc182209747c2a175dc Author: Christian Persch @@ -13863,7 +20120,7 @@ oldest one. Add support for automake 1.11. FDO#23473. autogen.sh | 13 +++++++------ - 1 files changed, 7 insertions(+), 6 deletions(-) + 1 file changed, 7 insertions(+), 6 deletions(-) commit 493d2c5aa78a3241e70108c5d7eccba9ac72f834 Author: Rex Dieter @@ -13893,7 +20150,7 @@ utilities. utils/pdftoabw.cc | 39 ++++++++++++++++++++++++++++++++------- - 1 files changed, 32 insertions(+), 7 deletions(-) + 1 file changed, 32 insertions(+), 7 deletions(-) commit 365683d5faea6e0a7570b139d1f3366c22271f8e Author: Albert Astals Cid @@ -13917,7 +20174,7 @@ See bug #23076. glib/poppler-document.cc | 26 ++++++++++++++++++++++++++ - 1 files changed, 26 insertions(+), 0 deletions(-) + 1 file changed, 26 insertions(+) commit 1b5612841b0c663f6d391d4581f65f68a2975db0 Author: Pino Toscano @@ -13931,7 +20188,7 @@ qt/poppler-document.cc | 8 ++++++++ qt/poppler-qt.h | 12 ++++++++++++ - 2 files changed, 20 insertions(+), 0 deletions(-) + 2 files changed, 20 insertions(+) commit aef8ecda1e80b921228f415a53c9c5a52df87d94 Author: Pino Toscano @@ -13942,7 +20199,7 @@ ... in favour of getPdfVersion() qt4/src/poppler-qt4.h | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 830140f70e48e8033ad4411b6bd405d5ad7358a3 Author: Pino Toscano @@ -13958,7 +20215,7 @@ qt4/src/poppler-document.cc | 8 ++++++++ qt4/src/poppler-qt4.h | 13 +++++++++++++ qt4/tests/check_metadata.cpp | 4 ++++ - 3 files changed, 25 insertions(+), 0 deletions(-) + 3 files changed, 25 insertions(+) commit 5491d16dfbd73f0256c62e49d02622dc3185012e Author: Albert Astals Cid @@ -13995,7 +20252,7 @@ right thing poppler/PDFDoc.cc | 6 +----- - 1 files changed, 1 insertions(+), 5 deletions(-) + 1 file changed, 1 insertion(+), 5 deletions(-) commit a6f698b4edc42c0414dd4690e1e037088321db2c Author: Albert Astals Cid @@ -14047,7 +20304,7 @@ [cairo] CairoImageOutputDev doesn't implement patterns poppler/CairoOutputDev.h | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) + 1 file changed, 13 insertions(+) commit d20d65111aee2ee4b8cdea2962ed1bb149122ba9 Author: Carlos Garcia Campos @@ -14060,7 +20317,7 @@ poppler/CairoOutputDev.cc | 56 +++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoOutputDev.h | 10 ++++++++ - 2 files changed, 66 insertions(+), 0 deletions(-) + 2 files changed, 66 insertions(+) commit e965d0686d979c775b64a93f8e2f775f81885417 Author: Carlos Garcia Campos @@ -14085,7 +20342,7 @@ Fix backwards search qt4/src/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 5b7b1cdc5c3b8652d3ae583b4d7b8b6de625adc2 Author: Albert Astals Cid @@ -14095,7 +20352,7 @@ qt4/tests/check_search.cpp | 51 ++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 51 insertions(+), 0 deletions(-) + 1 file changed, 51 insertions(+) commit 2484b0dcb8eb62f8e2c147498c58871ec04630b5 Author: Albert Astals Cid @@ -14110,7 +20367,7 @@ i have in my test dir so i'm commiting it poppler/SplashOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 03970d8b6d7624444664320470baa6d1b1299622 Author: Carlos Garcia Campos @@ -14119,7 +20376,7 @@ [build] Fix build with autotools utils/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 15752b7cd5c94620e3ad3b6afd9c70ccc754c9b3 Author: Carlos Garcia Campos @@ -14132,7 +20389,7 @@ modes. poppler/CairoOutputDev.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 45dae4e66b2b833f95656850b5f1b0ffd1d96f1d Author: Carlos Garcia Campos @@ -14143,7 +20400,7 @@ Fixes launchpad bug #342282 (page 2 of the attached document) poppler/CairoOutputDev.cc | 16 +++++++++++++--- - 1 files changed, 13 insertions(+), 3 deletions(-) + 1 file changed, 13 insertions(+), 3 deletions(-) commit b1cd54546844f2f7cd6bf7cc14b7584c84c3fc14 Author: Carlos Garcia Campos @@ -14154,7 +20411,7 @@ Fixes bug #20491. poppler/CairoFontEngine.cc | 19 ++----------------- - 1 files changed, 2 insertions(+), 17 deletions(-) + 1 file changed, 2 insertions(+), 17 deletions(-) commit 4181a0ff11195eb7a56d76be23994b843e20b483 Author: Albert Astals Cid @@ -14163,7 +20420,7 @@ this branch is unlikely to happen poppler/Lexer.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a3025f32951ce7b7343aeef111902615d71595e Author: Albert Astals Cid @@ -14172,7 +20429,7 @@ fix overflow calculation not to depend on the variable overflowing poppler/Lexer.cc | 12 ++++++++---- - 1 files changed, 8 insertions(+), 4 deletions(-) + 1 file changed, 8 insertions(+), 4 deletions(-) commit a38001f724f78231c2fdadd28e647a35b41bab74 Author: Albert Astals Cid @@ -14183,7 +20440,7 @@ Fixes bug 23078 poppler/Lexer.cc | 28 ++++++++++++++++++++++------ - 1 files changed, 22 insertions(+), 6 deletions(-) + 1 file changed, 22 insertions(+), 6 deletions(-) commit 4c4c0e44452d07bea88d98b7df0c01fadd7693cc Author: Jakub Wilk @@ -14195,7 +20452,7 @@ People should not be using internal headers but it's just two lines poppler/Object.h | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit e2c319ba18ab473fd969db9519a9231be67538c3 Author: Albert Astals Cid @@ -14206,7 +20463,7 @@ Totally not optimized splash/SplashBitmap.cc | 23 ++++++++++++++++++++++- - 1 files changed, 22 insertions(+), 1 deletions(-) + 1 file changed, 22 insertions(+), 1 deletion(-) commit c669e7f3ca421265e78161cc3fdecd2a0c7510c9 Author: Albert Astals Cid @@ -14218,7 +20475,7 @@ splash/SplashBitmap.cc | 55 ++++++++++++++++++++++++++++++++++-------------- - 1 files changed, 39 insertions(+), 16 deletions(-) + 1 file changed, 39 insertions(+), 16 deletions(-) commit 92744b72df9084fd2d69ba78406898378884aed8 Author: Albert Astals Cid @@ -14229,19 +20486,19 @@ Based on a patch by Shen Liang Also factored common PNG code from HtmlOutputDev to PNGWriter - CMakeLists.txt | 5 ++ + CMakeLists.txt | 5 +++ goo/Makefile.am | 9 +++- goo/PNGWriter.cc | 110 +++++++++++++++++++++++++++++++++++++++++++++ - goo/PNGWriter.h | 43 +++++++++++++++++ - poppler/Makefile.am | 8 +++ - splash/SplashBitmap.cc | 70 ++++++++++++++++++++++++++++ - splash/SplashBitmap.h | 5 ++ + goo/PNGWriter.h | 43 ++++++++++++++++++ + poppler/Makefile.am | 8 ++++ + splash/SplashBitmap.cc | 70 +++++++++++++++++++++++++++++ + splash/SplashBitmap.h | 5 +++ splash/SplashErrorCodes.h | 4 +- utils/CMakeLists.txt | 4 -- utils/HtmlOutputDev.cc | 66 +++++---------------------- utils/Makefile.am | 4 -- - utils/pdftoppm.1 | 3 + + utils/pdftoppm.1 | 3 ++ utils/pdftoppm.cc | 21 +++++++-- 13 files changed, 283 insertions(+), 69 deletions(-) @@ -14256,7 +20513,7 @@ poppler/CairoOutputDev.cc | 59 +++++++++++++++++++++++++++++---------------- - 1 files changed, 38 insertions(+), 21 deletions(-) + 1 file changed, 38 insertions(+), 21 deletions(-) commit 7194f59a18e4f6997ae560af3db1bd101d6f726e Author: Chris Wilson @@ -14270,7 +20527,7 @@ file into a fresh block of memory. poppler/CairoFontEngine.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 7e2bbcf6f85111d1006b0d5bc1503cadaba83c9f Author: Albert Astals Cid @@ -14279,7 +20536,7 @@ Set KDAB via gamaral copyright poppler/Form.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit ed5918e16dafebc9ecf6db8ce0186f407ecbf7d5 Author: Pino Toscano @@ -14288,7 +20545,7 @@ [Qt4 apidox] make example for FontIterator... not leak ;) qt4/src/poppler-qt4.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit f3b36d9c992491e614e88dbf1a84b5433a7647f4 Author: Pino Toscano @@ -14307,7 +20564,7 @@ +++++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-qt4.h | 50 +++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 102 insertions(+), 0 deletions(-) + 2 files changed, 102 insertions(+) commit 78a1969d040018c0c2bb74c94f5507f786e4666e Author: Pino Toscano @@ -14316,7 +20573,7 @@ [Qt] add unhandled cases and remove unused code qt/poppler-page.cc | 12 ++---------- - 1 files changed, 2 insertions(+), 10 deletions(-) + 1 file changed, 2 insertions(+), 10 deletions(-) commit bddebec0712e92e13b57d3d05d652673fe737866 Author: Albert Astals Cid @@ -14338,7 +20595,7 @@ [glib-demo] Add cast to make sure the comparison is always valid glib/demo/attachments.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 464e95ef451103daddc9a30cd26b986291f02176 Author: Carlos Garcia Campos @@ -14347,7 +20604,7 @@ [glib-demo] Add missing return glib/demo/attachments.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 7f48369e4d29b2a71abffa9e1966e3a2252de895 Author: Guillermo Antonio Amaral Bastidas @@ -14357,7 +20614,7 @@ loadChildrenDefaults poppler/Form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e21a3e40bf6f4365064cea751ae186580d8f81f5 Author: William Bader @@ -14367,13 +20624,13 @@ Bug #23030 - poppler/GlobalParams.cc | 17 +++++++++++++ - poppler/GlobalParams.h | 4 +++ + poppler/GlobalParams.cc | 17 ++++++++++++++ + poppler/GlobalParams.h | 4 ++++ poppler/PSOutputDev.cc | 59 - ++++++++++++++++++++++++++-------------------- - poppler/PSOutputDev.h | 2 + - utils/pdftops.1 | 8 +++++- - utils/pdftops.cc | 7 +++++ + ++++++++++++++++++++++++++--------------------- + poppler/PSOutputDev.h | 2 ++ + utils/pdftops.1 | 8 ++++++- + utils/pdftops.cc | 7 ++++++ 6 files changed, 70 insertions(+), 27 deletions(-) commit bd68c90338cbf16f468e5db59722610300a629e1 @@ -14383,7 +20640,7 @@ Forgot to add my copyright poppler/GfxState.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 173451730948c320f16a0f5924a58302603eca0b Author: Albert Astals Cid @@ -14396,7 +20653,7 @@ poppler/Gfx.cc | 13 +++++++++++++ poppler/GfxState.h | 1 + - 2 files changed, 14 insertions(+), 0 deletions(-) + 2 files changed, 14 insertions(+) commit 35c408ca49be08144bcf14aa112505fd556725d2 Author: Albert Astals Cid @@ -14405,7 +20662,7 @@ add the overloaded virtual warning also the autotools based build configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1c32bd2d101e5dfb37e28276ecad699f121b27b7 Author: Albert Astals Cid @@ -14416,7 +20673,7 @@ poppler/OutputDev.cc | 1 + poppler/OutputDev.h | 1 + utils/HtmlOutputDev.h | 2 +- - 3 files changed, 3 insertions(+), 1 deletions(-) + 3 files changed, 3 insertions(+), 1 deletion(-) commit 10717a48c85f1dbeff1c6bcd094006a9ecc92efc Author: Albert Astals Cid @@ -14425,7 +20682,7 @@ Add -Woverloaded-virtual as default CXX flag cmake/modules/PopplerMacros.cmake | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit db5f736655f01575ac5d7c524cbf131924ae91fa Author: Albert Astals Cid @@ -14449,7 +20706,7 @@ poppler/Gfx.cc | 2 -- poppler/OutputDev.cc | 3 --- poppler/OutputDev.h | 1 - - 3 files changed, 0 insertions(+), 6 deletions(-) + 3 files changed, 6 deletions(-) commit 6ab2ec8a89519d2bd1576c8d62f8aec51b04479a Author: Albert Astals Cid @@ -14458,7 +20715,7 @@ Warning-- poppler/PSOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 53c3d636ad645a350b576160e1498726238a7bd1 Author: Carlos Garcia Campos @@ -14499,11 +20756,11 @@ It requires cairo from git master to work at the moment. Fixes bugs #22384, #12979, #13603, #17919, #22255 - configure.ac | 27 ++++++++++++++++++++ + configure.ac | 27 +++++++++++++++++++++ poppler/CairoOutputDev.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoOutputDev.h | 1 + - 3 files changed, 87 insertions(+), 0 deletions(-) + 3 files changed, 87 insertions(+) commit bf8964726c9311e7e82b1faf49cc2272e5c1e339 Author: William Bader @@ -14512,7 +20769,7 @@ Fix some double to int warnings by explicit casting poppler/Gfx.cc | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit fdbd0c548e963461b2bc4bdf1beaa1577cafcea7 Author: Carlos Garcia Campos @@ -14521,8 +20778,8 @@ Update gtk-doc build files gtk-doc.make | 102 - ++++++++++++++++++++++++++++++++++++++------------------ - m4/gtk-doc.m4 | 74 +++++++++++++++++++++++------------------ + ++++++++++++++++++++++++++++++++++++++------------------- + m4/gtk-doc.m4 | 74 ++++++++++++++++++++++------------------- 2 files changed, 110 insertions(+), 66 deletions(-) commit ae84dce5cea4d249526a6ed5b2feb2d3f241da1b @@ -14558,7 +20815,7 @@ crop = !noCrop utils/pdftops.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 3d53a0eb14420d54c0ebf8590e34c018b8da105d Author: Carlos Garcia Campos @@ -14567,7 +20824,7 @@ Copy byte_lookup in copy constructor poppler/GfxState.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 8f7271acf17c46e663cd48d90c382b04a834fba2 Author: Carlos Garcia Campos @@ -14593,7 +20850,7 @@ poppler/GfxState.cc | 125 ++++++++++++++++++++++++++++++--------------------- - poppler/GfxState.h | 21 +++++++- + poppler/GfxState.h | 21 +++++++-- 2 files changed, 91 insertions(+), 55 deletions(-) commit 1bc737796bef1c65289a101b2d4c367267b9c974 @@ -14603,7 +20860,7 @@ Remove unused variable poppler/GfxState.h | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 512b2c654fd80c83b82e7adc828a478a18de17ab Author: Carlos Garcia Campos @@ -14612,7 +20869,7 @@ [cairo] Use CAIRO_EXTEND_PAD in drawImageMaskPrescaled too poppler/CairoOutputDev.cc | 32 +++++++++++++++----------------- - 1 files changed, 15 insertions(+), 17 deletions(-) + 1 file changed, 15 insertions(+), 17 deletions(-) commit ad26e34bede53cb6300bc463cbdcc2b5adf101c2 Author: Carlos Garcia Campos @@ -14623,7 +20880,7 @@ This is just for consistency of drawImage methods poppler/CairoOutputDev.cc | 30 ++++++++++++++---------------- - 1 files changed, 14 insertions(+), 16 deletions(-) + 1 file changed, 14 insertions(+), 16 deletions(-) commit ee6b761a55baef4c3bbe4614b0c3b3d761a3111f Author: Chris Wilson @@ -14640,7 +20897,7 @@ in userspace. poppler/CairoOutputDev.cc | 21 ++++++++++++++------- - 1 files changed, 14 insertions(+), 7 deletions(-) + 1 file changed, 14 insertions(+), 7 deletions(-) commit 499c6c972bac14936b5370276da723a6e98861b3 Author: Carlos Garcia Campos @@ -14650,7 +20907,7 @@ poppler/CairoOutputDev.cc | 306 +++++++++++++++++++++------------------------ - 1 files changed, 140 insertions(+), 166 deletions(-) + 1 file changed, 140 insertions(+), 166 deletions(-) commit f91eb7d01cef0897727c63267db309bc92297d37 Author: Koji Otani @@ -14662,7 +20919,7 @@ poppler/PSOutputDev.cc | 68 ++++++++++++++++++++++++++++++++++++------------ - 1 files changed, 51 insertions(+), 17 deletions(-) + 1 file changed, 51 insertions(+), 17 deletions(-) commit f93f5e17d8f23f3e2862f3411f43a95b334e6c91 Author: Carlos Garcia Campos @@ -14677,7 +20934,7 @@ image buffer. Fixes bug #18017. poppler/CairoOutputDev.cc | 36 ++++++++++++++++++++++++++++++++++-- - 1 files changed, 34 insertions(+), 2 deletions(-) + 1 file changed, 34 insertions(+), 2 deletions(-) commit e7475062b6ae5c495fa72faaf8fb3d97391f8544 Author: Carlos Garcia Campos @@ -14686,7 +20943,7 @@ [cairo] Handle fontType1COT fonts in CairoFontEngine poppler/CairoFontEngine.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit d42b9425fb2f98fa79e7a60e4f71ef14f5bacfe9 Author: Albert Astals Cid @@ -14695,7 +20952,7 @@ glade is not used anymore cmake/modules/FindGTK.cmake | 9 ++++----- - 1 files changed, 4 insertions(+), 5 deletions(-) + 1 file changed, 4 insertions(+), 5 deletions(-) commit 454f7468c6a6a442a5064b5daa24d65ebf4fc6b6 Author: Chris Wilson @@ -14718,7 +20975,7 @@ unnecessary pre-scaling. poppler/CairoOutputDev.cc | 16 ++++++++++++---- - 1 files changed, 12 insertions(+), 4 deletions(-) + 1 file changed, 12 insertions(+), 4 deletions(-) commit f8d93eae3c7b9388feabac71f2380d0b42a855e7 Author: Carlos Garcia Campos @@ -14727,7 +20984,7 @@ Lookup UF and F entries before Unix, MAC and DOS in getFileSpec poppler/FileSpec.cc | 24 ++++++++++++------------ - 1 files changed, 12 insertions(+), 12 deletions(-) + 1 file changed, 12 insertions(+), 12 deletions(-) commit 767c534f5fdf6ccbccfd85a0086d72c215c278f1 Author: Carlos Garcia Campos @@ -14736,7 +20993,7 @@ Use UF entry when present in dict in getFileSpecName() too poppler/FileSpec.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 569627ac4d56ddd58e109ce2a37179a85e042030 Author: Carlos Garcia Campos @@ -14767,7 +21024,7 @@ it just requires zeroing out the masked pixels. poppler/CairoOutputDev.cc | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + 1 file changed, 7 insertions(+), 2 deletions(-) commit 646e5884e748ecce7094c673400484aa1d902bdd Author: Chris Wilson @@ -14782,7 +21039,7 @@ [0:255]. poppler/CairoOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit d75feb1ee84385a9f94308cf47a43f4583092ddf Author: Chris Wilson @@ -14795,7 +21052,7 @@ poppler/CairoOutputDev.cc | 102 ++++++++++++++++++--------------------------- - 1 files changed, 41 insertions(+), 61 deletions(-) + 1 file changed, 41 insertions(+), 61 deletions(-) commit 52f3704fed16cfc1e9dd85f72dde7922371e4099 Author: Carlos Garcia Campos @@ -14804,7 +21061,7 @@ [TODO] Update TODO file TODO | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit ef261f5f72d37a0aa2709611ee2bad7d55340ed8 Author: Carlos Garcia Campos @@ -14815,7 +21072,7 @@ poppler/FileSpec.cc | 114 +++++++++++++++++++++++---------------------------- - 1 files changed, 51 insertions(+), 63 deletions(-) + 1 file changed, 51 insertions(+), 63 deletions(-) commit cafd4653dc6c7574214e80aa09489dcd24e347a6 Author: Carlos Garcia Campos @@ -14824,7 +21081,7 @@ [glib-demo] Fix a typo glib/demo/utils.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a3c9c6d0c0ee55dccd2d03f20d5683ae300cdc6b Author: Pino Toscano @@ -14847,7 +21104,7 @@ them there. TODO | 47 +++++++++++++++-------------------------------- - 1 files changed, 15 insertions(+), 32 deletions(-) + 1 file changed, 15 insertions(+), 32 deletions(-) commit 92ad0ef89fe7690d83854b4821178dfdb2e22897 Author: Pino Toscano @@ -14856,7 +21113,7 @@ [Qt4 demo] hopefully fix the page size on zoom change qt4/demos/pageview.cpp | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) + 1 file changed, 1 insertion(+), 4 deletions(-) commit 97094d13bc0f144b25e13c1de7a5328608ab13e3 Author: Pino Toscano @@ -14876,7 +21133,7 @@ [Qt4 demo] show page numbers in the toolbar as 1..n qt4/demos/navigationtoolbar.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit b0d48df9121c55f8162ddf0ee63832f9adebf37b Author: Pino Toscano @@ -14915,7 +21172,7 @@ Fixes bug #22530. glib/demo/main.c | 33 +++++++++++++++++++++++++++++++-- - 1 files changed, 31 insertions(+), 2 deletions(-) + 1 file changed, 31 insertions(+), 2 deletions(-) commit 6ef83414ab55294cf46b6b05813927bb04066986 Author: Albert Astals Cid @@ -14940,7 +21197,7 @@ The surface is guaranteed to be cleared glib/demo/render.c | 11 ++--------- - 1 files changed, 2 insertions(+), 9 deletions(-) + 1 file changed, 2 insertions(+), 9 deletions(-) commit 5deb6db5d340c08f337d2ba67aa1fd690e4eedd8 Author: William Bader @@ -14959,7 +21216,7 @@ [Qt4 demo] do not crash when changing the zoom with no document qt4/demos/pageview.cpp | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit a98de97137cb343182bd03c443fc08ff4e0fd9a5 Author: Pino Toscano @@ -14981,7 +21238,7 @@ Make sure the array is big enough to read from it poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0a1b41ff6de5a41e3450ecbcb1ba754dc06c29d9 Author: Albert Astals Cid @@ -14994,7 +21251,7 @@ the file poppler/Form.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 6cb846664e57b02c99f1e6ad2b4e9128c9622e0a Author: Ilya Gorenbein @@ -15003,7 +21260,7 @@ Initilize AnnotColot properly when the Array is not correct poppler/Annot.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 5fdc3acb8dded2e7d08e6ef30f4c5ae1a4a11b5e Author: Till Kamppeter @@ -15014,7 +21271,7 @@ poppler/PSOutputDev.cc | 10 +++++++++- poppler/PSOutputDev.h | 4 ++++ - 2 files changed, 13 insertions(+), 1 deletions(-) + 2 files changed, 13 insertions(+), 1 deletion(-) commit bf69beeb257cfd750c6ddc8b68aeb859b36380b2 Author: David Benjamin @@ -15029,7 +21286,7 @@ poppler/Decrypt.cc | 8 ++++++++ poppler/Decrypt.h | 3 +++ - 2 files changed, 11 insertions(+), 0 deletions(-) + 2 files changed, 11 insertions(+) commit 5ee4ff2aaf98e2eaa1ec2dc9f7e659b3b01ba7bf Author: Carlos Garcia Campos @@ -15038,7 +21295,7 @@ [glib-demo] Allow using relative paths in demo application glib/demo/main.c | 17 +++++------------ - 1 files changed, 5 insertions(+), 12 deletions(-) + 1 file changed, 5 insertions(+), 12 deletions(-) commit a568248d3255407fcaa7368c4925c20e95619d20 Author: Albert Astals Cid @@ -15061,7 +21318,7 @@ ship PopplerCache.h CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 84984d2aa25917d68c9971cefe636e626eada13d Author: Albert Astals Cid @@ -15070,7 +21327,7 @@ Ship PopplerCache.h too poppler/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 3a52d46e5df8eb926b550d7f7a82f316dbf6808f Author: Carlos Garcia Campos @@ -15079,7 +21336,7 @@ [glib-demo] Destroy pattern after using it glib/demo/render.c | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 2e97524e5d82a4c33a4e6410fead444681db6749 Author: Carlos Garcia Campos @@ -15089,7 +21346,7 @@ rendering glib/demo/render.c | 12 +++++++++--- - 1 files changed, 9 insertions(+), 3 deletions(-) + 1 file changed, 9 insertions(+), 3 deletions(-) commit 009937842d5a8bfc12394e9e3ab71b7c33340a85 Author: Carlos Garcia Campos @@ -15098,7 +21355,7 @@ [glib-demo] Use cairo_paint instead of rectangle + fill glib/demo/render.c | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit 7248da095f67d57c3999cee7d980e62fd8a7cf49 Author: Carlos Garcia Campos @@ -15110,21 +21367,21 @@ Fixes bug #9860 poppler/ArthurOutputDev.cc | 4 +- - poppler/ArthurOutputDev.h | 5 +- + poppler/ArthurOutputDev.h | 5 ++- poppler/CairoOutputDev.cc | 92 +++++++++++++++++++++++++------------------ - poppler/CairoOutputDev.h | 48 +++++++++++++---------- - poppler/Gfx.cc | 49 +++++++++++++++++++--- + poppler/CairoOutputDev.h | 48 ++++++++++++---------- + poppler/Gfx.cc | 49 +++++++++++++++++++---- poppler/OutputDev.cc | 17 +++++--- - poppler/OutputDev.h | 13 ++++-- - poppler/PSOutputDev.cc | 8 ++- - poppler/PSOutputDev.h | 8 ++- + poppler/OutputDev.h | 13 +++--- + poppler/PSOutputDev.cc | 8 ++-- + poppler/PSOutputDev.h | 8 ++-- poppler/PreScanOutputDev.cc | 25 ++++++++++-- poppler/PreScanOutputDev.h | 25 ++++++++++-- - poppler/SplashOutputDev.cc | 16 +++++-- + poppler/SplashOutputDev.cc | 16 +++++--- poppler/SplashOutputDev.h | 12 ++++-- utils/HtmlOutputDev.cc | 16 ++++---- - utils/HtmlOutputDev.h | 7 ++- + utils/HtmlOutputDev.h | 7 ++-- utils/ImageOutputDev.cc | 20 +++++----- utils/ImageOutputDev.h | 12 ++++-- 17 files changed, 248 insertions(+), 129 deletions(-) @@ -15138,11 +21395,11 @@ Fixes bug 22334 poppler/CMap.cc | 50 - +++++++++++++++++++++++++++++----------------- - poppler/CMap.h | 17 +++++++++++---- + +++++++++++++++++++++++++++++------------------ + poppler/CMap.h | 17 +++++++++++----- poppler/GfxFont.cc | 41 ++++++++++++++++++++++++++------------ - poppler/GlobalParams.cc | 6 ++-- - poppler/GlobalParams.h | 5 ++- + poppler/GlobalParams.cc | 6 +++--- + poppler/GlobalParams.h | 5 +++-- 5 files changed, 77 insertions(+), 42 deletions(-) commit 47de8eef46300832556ce5ed869e391e477fd843 @@ -15156,7 +21413,7 @@ poppler/JBIG2Stream.cc | 88 ++++++++++++++++++++++++++---------------------- - poppler/JBIG2Stream.h | 15 ++++++++ + poppler/JBIG2Stream.h | 15 +++++++++ 2 files changed, 63 insertions(+), 40 deletions(-) commit d30b1013ea3ce45b5ea942fe7357c0fd07ff47f4 @@ -15167,7 +21424,7 @@ poppler/Annot.cc | 25 +++++++++++++++++++++++++ poppler/Annot.h | 3 +++ - 2 files changed, 28 insertions(+), 0 deletions(-) + 2 files changed, 28 insertions(+) commit 287feffc1c1c0aa42a398fc071b489acef9ef22e Author: Carlos Garcia Campos @@ -15177,7 +21434,7 @@ poppler/Annot.cc | 36 ++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 4 ++++ - 2 files changed, 40 insertions(+), 0 deletions(-) + 2 files changed, 40 insertions(+) commit 2a938af5624fbc79316dd6bee5e550f2b4270a76 Author: Carlos Garcia Campos @@ -15187,7 +21444,7 @@ poppler/Annot.cc | 19 +++++++++++++++++++ poppler/Annot.h | 4 ++++ - 2 files changed, 23 insertions(+), 0 deletions(-) + 2 files changed, 23 insertions(+) commit 0af5464352dfa51f0458c57a3590c847a45964c7 Author: Carlos Garcia Campos @@ -15206,7 +21463,7 @@ Fix a crash in pdf-inspector test/pdf-inspector.cc | 11 +++++++++++ - 1 files changed, 11 insertions(+), 0 deletions(-) + 1 file changed, 11 insertions(+) commit 3da7a2657892fde52b62e1f73476cb33d6c75e96 Author: Carlos Garcia Campos @@ -15227,7 +21484,7 @@ poppler/Annot.cc | 26 ++++++++++++++++++++++++++ poppler/Annot.h | 3 +++ - 2 files changed, 29 insertions(+), 0 deletions(-) + 2 files changed, 29 insertions(+) commit 8045e7a1a84a3d54a1c9415ac63b5b9df5ecc349 Author: Carlos Garcia Campos @@ -15237,7 +21494,7 @@ poppler/Page.cc | 28 ++++++++++++++++++++++++++++ poppler/Page.h | 2 ++ - 2 files changed, 30 insertions(+), 0 deletions(-) + 2 files changed, 30 insertions(+) commit fe80eb84ec711b7400cef95e791a74c8fd259af7 Author: Carlos Garcia Campos @@ -15246,7 +21503,7 @@ Add getRef() to get the annotation reference poppler/Annot.h | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 1c92657be72c44dba7185808ffb00dd85c5ab289 Author: Carlos Garcia Campos @@ -15273,8 +21530,8 @@ setters will be added for the other fields. poppler/Annot.cc | 300 - ++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 22 ++++- + ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + poppler/Annot.h | 22 +++- 2 files changed, 315 insertions(+), 7 deletions(-) commit e5c4862b0c1b08a0fab47070cb9c862026e93567 @@ -15284,7 +21541,7 @@ ignore++ m4/.gitignore | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 572779f8037763c1e0ee64c47a3dad6df0d3b693 Author: Koji Otani @@ -15293,7 +21550,7 @@ Fix dashed line in page 1 of bug 20011 poppler/Gfx.cc | 6 ++---- - 1 files changed, 2 insertions(+), 4 deletions(-) + 1 file changed, 2 insertions(+), 4 deletions(-) commit b97591672e0d9c31a3d044fe52e34cc80a491221 Author: Koji Otani @@ -15307,7 +21564,7 @@ See bug 20011 poppler/Gfx.cc | 13 +++++++++++-- - 1 files changed, 11 insertions(+), 2 deletions(-) + 1 file changed, 11 insertions(+), 2 deletions(-) commit a92b38836b1e4475d5a7a1b9cb8f3e9429cef275 Author: Albert Astals Cid @@ -15319,7 +21576,7 @@ poppler/Function.cc | 28 ++++++++++++++++++++++++++++ poppler/PopplerCache.cc | 20 ++++++++++++++++++++ poppler/PopplerCache.h | 14 ++++++++++++++ - 3 files changed, 62 insertions(+), 0 deletions(-) + 3 files changed, 62 insertions(+) commit 2cecdf922f4c8178b0e55d3ddf86c31f8be3313a Author: Carlos Garcia Campos @@ -15328,7 +21585,7 @@ [glib] Fix a crash when a destination points to an invalid page glib/poppler-action.cc | 21 +++++++++++++-------- - 1 files changed, 13 insertions(+), 8 deletions(-) + 1 file changed, 13 insertions(+), 8 deletions(-) commit 831288c13c3a7502bbccd1313c6e376283be367c Author: Albert Astals Cid @@ -15341,7 +21598,7 @@ Makes it be 33% of exec() instead of 42% poppler/Function.cc | 19 ++++++++++++++----- - 1 files changed, 14 insertions(+), 5 deletions(-) + 1 file changed, 14 insertions(+), 5 deletions(-) commit 3d40dcad850a2bc0e28845a15722db0c79920135 Author: Albert Astals Cid @@ -15364,8 +21621,8 @@ poppler/Function.cc | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Function.h | 2 + - 2 files changed, 78 insertions(+), 0 deletions(-) + poppler/Function.h | 2 ++ + 2 files changed, 78 insertions(+) commit 588bfe3c14f42be492066c2a98e30482475a6926 Author: Albert Astals Cid @@ -15378,7 +21635,7 @@ poppler/PopplerCache.cc | 82 +++++++++++++++++++++++++++++++++++++++++++++++ poppler/PopplerCache.h | 47 +++++++++++++++++++++++++++ - 4 files changed, 131 insertions(+), 0 deletions(-) + 4 files changed, 131 insertions(+) commit d09478fcc44b5c594f1803fc24654af5e10fa129 Author: Albert Astals Cid @@ -15387,7 +21644,7 @@ Move index and pop to class definition too poppler/Function.cc | 32 +++++++++++++++----------------- - 1 files changed, 15 insertions(+), 17 deletions(-) + 1 file changed, 15 insertions(+), 17 deletions(-) commit 2083264e8ab0fd9976294de08a18de615d5a1168 Author: Albert Astals Cid @@ -15400,7 +21657,7 @@ poppler/Function.cc | 151 ++++++++++++++++++++++++--------------------------- - 1 files changed, 71 insertions(+), 80 deletions(-) + 1 file changed, 71 insertions(+), 80 deletions(-) commit 24580fcd2be74db5f3140bdb2ebff8431b7d3f1e Author: Albert Astals Cid @@ -15409,7 +21666,7 @@ Add a debug saying how much rendering took qt4/tests/test-poppler-qt4.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 50cf7cffff760e41774957ad8f1f92803142438e Author: Carlos Garcia Campos @@ -15420,7 +21677,7 @@ Fixes bug #21361. test/gtk-cairo-test.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit 4cc9dee35e03d7b295a476f937ec0f2c43bb6592 Author: Christian Persch @@ -15445,7 +21702,7 @@ the page text boxes list qt4/tests/test-poppler-qt4.cpp | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit 2298acac267257b1916c802bdb902428e69e683b Author: Pino Toscano @@ -15454,7 +21711,7 @@ [Qt4 apidox] FontInterator is new in 0.12 qt4/src/poppler-qt4.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 37c48c2521c623c485841472c4a174a1841aea33 Author: Pino Toscano @@ -15467,7 +21724,7 @@ CMakeLists.txt | 5 ++++- glib/poppler-features.h.cmake | 9 +++++++++ - 2 files changed, 13 insertions(+), 1 deletions(-) + 2 files changed, 13 insertions(+), 1 deletion(-) commit 26f6fb1d79c2589829cd896d57da63d16641f307 Author: Pino Toscano @@ -15487,7 +21744,7 @@ [Qt4 demo] compile the new thumbnail module with autotools as well qt4/demos/Makefile.am | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 291bafe64c8755fe5f85a51b184ac6e3d3170e1d Author: Carlos Garcia Campos @@ -15498,7 +21755,7 @@ Fixes bug #22095. glib/poppler-document.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0ca7e214fb5f9c9fb59792149bd23c1617d38cac Author: Christian Persch @@ -15509,13 +21766,13 @@ Add POPPLER_[MAJOR|MINOR|MICRO]_VERSION defines and POPPLER_CHECK_VERSION macro. FDO bug #22091. - configure.ac | 11 ++++- - glib/poppler-features.h.in | 9 +++ + configure.ac | 11 +++- + glib/poppler-features.h.in | 9 ++++ glib/reference/poppler-docs.sgml | 1 + glib/reference/poppler-sections.txt | 10 ++++ glib/reference/tmpl/poppler-features.sgml | 80 +++++++++++++++++++++++++++++ - 5 files changed, 110 insertions(+), 1 deletions(-) + 5 files changed, 110 insertions(+), 1 deletion(-) commit 4ce04da0040e5a2626c110f94a128e2d272401b9 Author: Matthias Drochner @@ -15528,7 +21785,7 @@ the name string is the second of the two array elements. poppler/Form.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 7e01e37a834bfdd75d739ea2b48e9127ca7f259e Author: Till Kamppeter @@ -15538,7 +21795,7 @@ Thomas patches poppler/PSOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 50a7b4bcaa6e5f56cc25fe6936f9dc537a1b4b37 Author: Jeremy C. Reed @@ -15577,7 +21834,7 @@ Add missing { } poppler/Gfx.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 1beec21ed3a016998fee3849d460166895db9047 Author: Albert Astals Cid @@ -15588,7 +21845,7 @@ Fixes bug #22026 poppler/PSOutputDev.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit e80d645c34c7d44d1f35da0a25669d1c4cde6e7f Author: Albert Astals Cid @@ -15599,7 +21856,7 @@ Fixes bug 22025, based on a patch by William Bader poppler/CharCodeToUnicode.cc | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) + 1 file changed, 6 insertions(+), 3 deletions(-) commit e521c1efaeba3f35d10e46bca3d9650dabd2d889 Author: Adrian Johnson @@ -15610,7 +21867,7 @@ poppler/CairoOutputDev.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoOutputDev.h | 19 ++++++++++++++++++ - 2 files changed, 66 insertions(+), 0 deletions(-) + 2 files changed, 66 insertions(+) commit a87978b09a026b2db6b0f80271d87b44b336a121 Author: Pino Toscano @@ -15619,7 +21876,7 @@ [Qt4 demo] show the checksum for embedded files qt4/demos/embeddedfiles.cpp | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit db5102842494a124d813db1696bb60820db3442b Author: Pino Toscano @@ -15635,7 +21892,7 @@ qt4/demos/optcontent.cpp | 2 -- qt4/demos/permissions.cpp | 2 -- qt4/demos/toc.cpp | 2 -- - 6 files changed, 0 insertions(+), 12 deletions(-) + 6 files changed, 12 deletions(-) commit e8d897581656ee4a20e9bb87dd999425663ace3b Author: Pino Toscano @@ -15648,7 +21905,7 @@ qt4/demos/thumbnails.cpp | 2 +- qt4/demos/thumbnails.h | 3 --- qt4/demos/viewer.cpp | 1 - - 5 files changed, 1 insertions(+), 13 deletions(-) + 5 files changed, 1 insertion(+), 13 deletions(-) commit f69a4fe47d3478cccbc03e4ac0929c7eada681c0 Author: Pino Toscano @@ -15666,7 +21923,7 @@ ++++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/thumbnails.h | 51 ++++++++++++++++++++++++++++ qt4/demos/viewer.cpp | 11 +++++- - 4 files changed, 146 insertions(+), 1 deletions(-) + 4 files changed, 146 insertions(+), 1 deletion(-) commit 2f24ac0f4bbd6de1c9f137110b3ac2bd3b23b0b9 Author: Shawn Rutledge @@ -15676,7 +21933,7 @@ qt4/demos/pageview.cpp | 5 +++++ qt4/demos/pageview.h | 3 +++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit 1f1baf186f9e37606765e51ec5b9893ddfbfa893 Author: Shawn Rutledge @@ -15690,7 +21947,7 @@ qt4/src/poppler-page.cc | 21 ++++++++++++++++++++- qt4/src/poppler-qt4.h | 11 +++++++++++ - 2 files changed, 31 insertions(+), 1 deletions(-) + 2 files changed, 31 insertions(+), 1 deletion(-) commit 5cc24be1e9af0a27ab88ffa719bcabc2378868e4 Author: Albert Astals Cid @@ -15699,7 +21956,7 @@ Remove unused variables poppler/SplashOutputDev.cc | 3 --- - 1 files changed, 0 insertions(+), 3 deletions(-) + 1 file changed, 3 deletions(-) commit 45823bf8f4abacbbf257f6708264de074eda3cf4 Author: Albert Astals Cid @@ -15708,7 +21965,7 @@ Make it compile :-/ poppler/SplashOutputDev.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit f5ae14907261a46c121f3ed7aea9d7ad9b9c55de Author: Albert Astals Cid @@ -15717,7 +21974,7 @@ Really fix the typo README | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5d4b1995cdd57db7cef3d88704850aaf66ed7fff Author: William Bader @@ -15726,7 +21983,7 @@ Fix three typos in README README | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 104f9286ceb5fcb5f4795bca7633029142d5f6a4 Author: Thomas Freitag @@ -15748,11 +22005,11 @@ poppler/GfxState_helpers.h | 80 +++++++++ poppler/Makefile.am | 1 + poppler/OutputDev.h | 14 ++ - poppler/PSOutputDev.cc | 285 +++++++++++++++++++------------- + poppler/PSOutputDev.cc | 285 ++++++++++++++++++------------- poppler/PSOutputDev.h | 18 ++ poppler/SplashOutputDev.cc | 404 +++++++++++++++++++++++++++++++++++++------- - poppler/SplashOutputDev.h | 19 ++ + poppler/SplashOutputDev.h | 19 +++ 11 files changed, 766 insertions(+), 256 deletions(-) commit d3e4563146cbff4cb507522783e60462461c7524 @@ -15763,7 +22020,7 @@ should not hurt for others poppler/GfxState.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 78a58931b4347ecb505bad5a51104382ef5f91c7 Author: Thomas Freitag @@ -15772,7 +22029,7 @@ Add splashClearColor that assigns white to the given colorptr splash/SplashTypes.h | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + 1 file changed, 10 insertions(+) commit 47c26747b32c242ec8ac60e7b93150a67eb22e31 Author: Thomas Freitag @@ -15782,7 +22039,7 @@ SplashColorMode splash/SplashState.cc | 17 +++++++++++++++++ - 1 files changed, 17 insertions(+), 0 deletions(-) + 1 file changed, 17 insertions(+) commit 41775d8c0b44bf591d8ff5ede7fad276e8fa9eef Author: Carlos Garcia Campos @@ -15791,7 +22048,7 @@ [glib-demo] Use poppler_annot_markup_has_popup() glib/demo/annots.c | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit f542c5294394e837298cb7e7d1d94bb336bfd09d Author: Carlos Garcia Campos @@ -15801,7 +22058,7 @@ glib/poppler-annot.cc | 20 ++++++++++++++++++++ glib/poppler-annot.h | 1 + - 2 files changed, 21 insertions(+), 0 deletions(-) + 2 files changed, 21 insertions(+) commit af32d56af779edcc539b680e634755941d1bf45c Author: Petr Gajdos @@ -15809,17 +22066,17 @@ Add the possibility of forcing no hinting of fonts - poppler/ArthurOutputDev.cc | 2 + + poppler/ArthurOutputDev.cc | 2 ++ poppler/GlobalParams.cc | 20 +++++++++++ - poppler/GlobalParams.h | 4 ++ - poppler/SplashOutputDev.cc | 2 + + poppler/GlobalParams.h | 4 +++ + poppler/SplashOutputDev.cc | 2 ++ splash/SplashFTFont.cc | 76 ++++++++++++++++++++++++++---------------- - splash/SplashFTFont.h | 2 + + splash/SplashFTFont.h | 2 ++ splash/SplashFTFontEngine.cc | 8 +++-- - splash/SplashFTFontEngine.h | 6 ++- + splash/SplashFTFontEngine.h | 6 ++-- splash/SplashFontEngine.cc | 4 ++- - splash/SplashFontEngine.h | 2 + + splash/SplashFontEngine.h | 2 ++ 10 files changed, 91 insertions(+), 35 deletions(-) commit 1a69d9638214943b3c2278f570694d9722a5de15 @@ -15831,7 +22088,7 @@ Fixes crash on pdf from bug 20108 poppler/GfxState.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit 95246d39c1289111a4ba3eb2ffbec50d7702e5eb Author: Albert Astals Cid @@ -15843,7 +22100,7 @@ Fixes bug #21841 poppler/Gfx.cc | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) + 1 file changed, 10 insertions(+), 1 deletion(-) commit 0c3517bfb4e1e1a28962f8d490ad69ec5766b6a1 Author: Albert Astals Cid @@ -15855,7 +22112,7 @@ does not crash now fofi/FoFiTrueType.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 548c72600b8a5e076647041660ed5031feedc7cc Author: Albert Astals Cid @@ -15866,7 +22123,7 @@ PDF is 0f03b3539a436a9f18d7e4e29d410f89 6607907.pdf poppler/JBIG2Stream.cc | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit f78d3a7ff5ef4b500d76d84ebc45aac3be162dab Author: Albert Astals Cid @@ -15875,8 +22132,8 @@ Move lcms.h include to GfxState.cc, replace lcms typedefs by void * poppler/GfxState.cc | 70 - ++++++++++++++++++++++++++++++++++++++++++++------ - poppler/GfxState.h | 64 ++++++++++------------------------------------ + ++++++++++++++++++++++++++++++++++++++++++++------- + poppler/GfxState.h | 64 +++++++++++----------------------------------- 2 files changed, 75 insertions(+), 59 deletions(-) commit ec2467f9981b7e7c23d5dcd8eabf2e7c8cdf8930 @@ -15887,7 +22144,7 @@ CMakeLists.txt | 3 +++ poppler/Makefile.am | 2 ++ - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit e0fcf7055af480498a81a000dcd9f977a783df66 Author: Albert Astals Cid @@ -15907,7 +22164,7 @@ cmake/modules/FindLCMS.cmake | 95 +++++++++++++++++++++++++++++++----------- - 1 files changed, 71 insertions(+), 24 deletions(-) + 1 file changed, 71 insertions(+), 24 deletions(-) commit 0974b7b4bfe3f8cf3a1408741ddf01c667c28044 Author: Patrick Spendrin @@ -15928,12 +22185,12 @@ We don't use it and it would not work anyway, see bug #21713 goo/gfile.cc | 58 - +++++++++-------------------------------- - goo/gfile.h | 3 +- - poppler/CairoFontEngine.cc | 6 ++-- - splash/SplashFTFontEngine.cc | 3 +- - splash/SplashT1FontEngine.cc | 3 +- - splash/SplashT1FontFile.cc | 3 +- + ++++++++++-------------------------------- + goo/gfile.h | 3 ++- + poppler/CairoFontEngine.cc | 6 ++--- + splash/SplashFTFontEngine.cc | 3 ++- + splash/SplashT1FontEngine.cc | 3 ++- + splash/SplashT1FontFile.cc | 3 ++- 6 files changed, 24 insertions(+), 52 deletions(-) commit e237d8b5c2ae8805487a0790d9fb218263686712 @@ -15944,7 +22201,7 @@ for resolving destinations qt4/src/poppler-document.cc | 3 --- - 1 files changed, 0 insertions(+), 3 deletions(-) + 1 file changed, 3 deletions(-) commit 9a2a851da93ef1a0c291fc9523a468e808ffd08e Author: Pino Toscano @@ -15974,10 +22231,10 @@ [Qt4] start a (basic) unit test for links & destinations qt4/tests/CMakeLists.txt | 1 + - qt4/tests/Makefile.am | 5 ++ + qt4/tests/Makefile.am | 5 +++ qt4/tests/check_links.cpp | 96 +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 102 insertions(+), 0 deletions(-) + 3 files changed, 102 insertions(+) commit 174f8087f5e09c5d1915de128b7a15acf47c1e13 Author: Pino Toscano @@ -15986,7 +22243,7 @@ [Qt4] set the destination name only when it is not resolved qt4/src/poppler-link.cc | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) + 1 file changed, 5 insertions(+), 4 deletions(-) commit fb0cb2add9443992f166acdf744fbec875faaabf Author: Pino Toscano @@ -15997,7 +22254,7 @@ qt4/src/poppler-link.cc | 10 ++++++++++ qt4/src/poppler-link.h | 7 +++++++ - 2 files changed, 17 insertions(+), 0 deletions(-) + 2 files changed, 17 insertions(+) commit b8bd44f1302f7b6a6923d41c98ec74c118a5abb8 Author: Albert Astals Cid @@ -16009,7 +22266,7 @@ NEWS | 142 +++++++++++++++++++++++++++++++++++++++++++++++++++ configure.ac | 2 +- - msvc/config.h | 6 +- + msvc/config.h | 6 +-- poppler/Makefile.am | 2 +- qt4/src/Doxyfile | 2 +- 6 files changed, 150 insertions(+), 8 deletions(-) @@ -16036,7 +22293,7 @@ Don't include popups annots with a parent in annots list poppler/Annot.cc | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) + 1 file changed, 13 insertions(+) commit 5051ebed1477ff3f7721606f79d66d56a80c1145 Author: Carlos Garcia Campos @@ -16064,7 +22321,7 @@ not the next[] ones poppler/Gfx.cc | 23 ++++++++++++++++------- - 1 files changed, 16 insertions(+), 7 deletions(-) + 1 file changed, 16 insertions(+), 7 deletions(-) commit 68d9644499676ed1553b2bfcdbfc9a5677c75345 Author: Albert Astals Cid @@ -16075,7 +22332,7 @@ Fixes bug #16093 poppler/Gfx.cc | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit 810a71ea66f0e07d9849a5e9bf28911472482d1b Author: Carlos Garcia Campos @@ -16086,7 +22343,7 @@ glib/demo/annots.c | 8 ++++++++ glib/poppler-annot.cc | 35 +++++++++++++++++++++++++++++++++++ glib/poppler-annot.h | 2 ++ - 3 files changed, 45 insertions(+), 0 deletions(-) + 3 files changed, 45 insertions(+) commit 5d328282da4713356fbe4283bd992ac2fc9010a2 Author: Albert Astals Cid @@ -16096,7 +22353,7 @@ knows how to deal with NULL splash/SplashFTFont.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b0fb6f94d6d54b1b0c97762db61e2ab0dd07c85 Author: Albert Astals Cid @@ -16105,7 +22362,7 @@ Fix format printing poppler/JBIG2Stream.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit c21b08a254f42f53d4b59ad4fb308c7c68c32d15 Author: Carlos Garcia Campos @@ -16135,7 +22392,7 @@ Fixes bug #21520 utils/Makefile.am | 22 ++++++++++++---------- - 1 files changed, 12 insertions(+), 10 deletions(-) + 1 file changed, 12 insertions(+), 10 deletions(-) commit 70e06e9ae28d08bb7495a7f2eb03b0b5714a1e54 Author: Kouhei Sutou @@ -16145,7 +22402,7 @@ glib/poppler-attachment.cc | 41 +++++++++++++++++++++++++++++++++++------ - 1 files changed, 35 insertions(+), 6 deletions(-) + 1 file changed, 35 insertions(+), 6 deletions(-) commit 977a13f1091700bf7e7b31859e0e6632dc323462 Author: Carlos Garcia Campos @@ -16154,7 +22411,7 @@ [glib] Only create checksum string for valid checksums glib/poppler-attachment.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit fb6e7141e3008ae230ae5819e2c7a0425296d8d2 Author: Carlos Garcia Campos @@ -16177,7 +22434,7 @@ Fix typos in Annot::setContents() documentation poppler/Annot.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit df0032cf5f6e5dc44bad056c659180e4065d32e2 Author: Carlos Garcia Campos @@ -16186,7 +22443,7 @@ Document Annot::setContents() method poppler/Annot.h | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 86a37a8f3f93e3378b446f8d81d80571267c7660 Author: Carlos Garcia Campos @@ -16210,7 +22467,7 @@ poppler/DateInfo.cc | 47 +++++++++++++++++++++++++++++++++++++++++++++++ poppler/DateInfo.h | 7 +++++++ - 3 files changed, 55 insertions(+), 0 deletions(-) + 3 files changed, 55 insertions(+) commit dc4cf0c29b53cda5c1c2badc5026af3429502e3a Author: Pino Toscano @@ -16219,7 +22476,7 @@ add poppler-date.{cc,h} glib/CMakeLists.txt | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 0750c6502faeabff571f5730b567097e793dca64 Author: Carlos Garcia Campos @@ -16228,8 +22485,8 @@ [glib-demo] Fix dates handling in annots demo glib/demo/annots.c | 69 - ++++++++++----------------------------------------- - 1 files changed, 14 insertions(+), 55 deletions(-) + +++++++++++----------------------------------------- + 1 file changed, 14 insertions(+), 55 deletions(-) commit fe73bf9771e8294af4c8a11ec4c2891ff8f8d859 Author: Carlos Garcia Campos @@ -16248,7 +22505,7 @@ [glib-demo] Use format_date from utils and remove duplicated code glib/demo/info.cc | 27 ++------------------------- - 1 files changed, 2 insertions(+), 25 deletions(-) + 1 file changed, 2 insertions(+), 25 deletions(-) commit e5f5ea01d0da4c4d877b93755523dc2a7f2ec049 Author: Carlos Garcia Campos @@ -16261,7 +22518,7 @@ GDate. glib/poppler-annot.cc | 22 +++++++++++----------- - 1 files changed, 11 insertions(+), 11 deletions(-) + 1 file changed, 11 insertions(+), 11 deletions(-) commit 876ad1bcc8a7b2f37656bf15cee7eb888fd46ed4 Author: Carlos Garcia Campos @@ -16271,7 +22528,7 @@ doc glib/poppler-annot.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit 8c54a15e1715721ee7af7e82c90b8dda3689c65f Author: Carlos Garcia Campos @@ -16280,7 +22537,7 @@ [glib] Fix a typo in poppler_date_parse documentation glib/poppler-date.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 39d09fa237d06fa93b02eb916d2c0242c4e8fe85 Author: Carlos Garcia Campos @@ -16307,12 +22564,12 @@ by the document. - glib/Makefile.am | 2 + - glib/poppler-attachment.cc | 4 +- + glib/Makefile.am | 2 ++ + glib/poppler-attachment.cc | 4 +-- glib/poppler-date.cc | 66 ++++++++++++++++++++++++++++++++++++++++++++ glib/poppler-date.h | 30 ++++++++++++++++++++ - glib/poppler-document.cc | 45 +++++------------------------ + glib/poppler-document.cc | 45 ++++++------------------------ glib/poppler-private.h | 2 +- glib/poppler.h | 1 + 7 files changed, 110 insertions(+), 40 deletions(-) @@ -16325,7 +22582,7 @@ glib/poppler-annot.cc | 25 +++++++++++++++++++++++++ glib/poppler-annot.h | 2 ++ - 2 files changed, 27 insertions(+), 0 deletions(-) + 2 files changed, 27 insertions(+) commit eec550e8b3cf96aefed9b03a78d365c2848fb8f2 Author: Carlos Garcia Campos @@ -16335,7 +22592,7 @@ poppler/Annot.cc | 26 +++++++++++++++++++++++++- poppler/Annot.h | 4 ++++ - 2 files changed, 29 insertions(+), 1 deletions(-) + 2 files changed, 29 insertions(+), 1 deletion(-) commit 047a8870a8cea9b680080e0d3bf68d0685431233 Author: Albert Astals Cid @@ -16344,7 +22601,7 @@ In case of err3 or err2 in readPageTree we need to free kidRef too poppler/Catalog.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit cb61b555f2c4db8685dec5491ca86570c962aab6 Author: Carlos Garcia Campos @@ -16356,7 +22613,7 @@ glib/test-poppler-glib.cc | 68 +++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 68 insertions(+), 0 deletions(-) + 1 file changed, 68 insertions(+) commit 2221b8a9ae5e986c79ea3f6c9f3b0246d328c7ab Author: Matthias Franz @@ -16367,7 +22624,7 @@ See bug #21270 poppler/Decrypt.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit e20efbf6cc676758b8ef7d2ad607560fcdbbf89e Author: Peter Kerzum @@ -16376,7 +22633,7 @@ Fix typo in GfxFont.cc poppler/GfxFont.cc | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit b760debea03380280d72cd39d792cbc1a380a87c Author: Albert Astals Cid @@ -16388,7 +22645,7 @@ poppler/Gfx.cc | 102 ++++++++++++++++++++++++++++++++++---------------------- - 1 files changed, 62 insertions(+), 40 deletions(-) + 1 file changed, 62 insertions(+), 40 deletions(-) commit 9f1312f3d7dfa7e536606a7c7296b7c876b11c00 Author: Albert Astals Cid @@ -16421,7 +22678,7 @@ Did a mistake in the gmalloc -> gmallocn commit, it's a 4 here not a 3 poppler/SplashOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9cf2325fb22f812b31858e519411f57747d39bd8 Author: Albert Astals Cid @@ -16442,7 +22699,7 @@ Revert part of last commit, i need more math classes :D poppler/JBIG2Stream.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 7b2d314a61fd0e12f47c62996cb49ec0d1ba747a Author: Albert Astals Cid @@ -16466,7 +22723,7 @@ goo/gmem.cc | 22 ++++++++++++++++++++++ goo/gmem.h | 2 ++ - 2 files changed, 24 insertions(+), 0 deletions(-) + 2 files changed, 24 insertions(+) commit 75c3466ba2e4980802e80b939495981240261cd5 Author: Albert Astals Cid @@ -16477,7 +22734,7 @@ See bug #21080 poppler/CairoFontEngine.cc | 14 ++++++++++++++ - 1 files changed, 14 insertions(+), 0 deletions(-) + 1 file changed, 14 insertions(+) commit 3210970dc1d6faf51bce59bb7ecb6b881f9c0fe6 Author: Carlos Garcia Campos @@ -16486,7 +22743,7 @@ [glib] Print annotations with the print flag enabled glib/poppler-page.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit b0b9798c85c7c6d6f336f73135a98974897b9f60 Author: Albert Astals Cid @@ -16501,7 +22758,7 @@ vs floats splash/SplashFTFont.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 5c08f57aa80092954746d722bb13655aee3f162c Author: Albert Astals Cid @@ -16510,7 +22767,7 @@ Forgot Ross copyright poppler/TextOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit c6d3e7884010ebdcc961d81ca8c692870fc9b139 Author: Ross Moore @@ -16521,7 +22778,7 @@ Fixes bug #20013 poppler/TextOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e4b3f7cbcb6ccdfa8b18d8da5f7074f4140b776a Author: Albert Astals Cid @@ -16532,7 +22789,7 @@ Fixes bug #20769 splash/SplashFTFont.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 4acde05ac4d0b03466c949138321cc3445a14158 Author: Eric Toombs @@ -16541,7 +22798,7 @@ Remove case-insensitive matching of filenames in PDFDoc constructor poppler/PDFDoc.cc | 39 ++++++++++----------------------------- - 1 files changed, 10 insertions(+), 29 deletions(-) + 1 file changed, 10 insertions(+), 29 deletions(-) commit 120c7f6697ed1edaff6e17ae1ed202c69f03a73c Author: Pino Toscano @@ -16550,7 +22807,7 @@ declare the matrix at the beginning poppler/ArthurOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 441a9cd56935bfe2d8fddc5d3bc2c0104aeffaca Author: Eric Toombs @@ -16560,10 +22817,10 @@ See bug #20660 for more information - glib/poppler-document.cc | 14 +++++++++-- + glib/poppler-document.cc | 14 +++++++++--- poppler/PDFDoc.cc | 54 - +++++++++++++++++++++++++++------------------ - poppler/PDFDoc.h | 8 ++++++ + +++++++++++++++++++++++++++------------------- + poppler/PDFDoc.h | 8 +++++++ 3 files changed, 51 insertions(+), 25 deletions(-) commit 16af0ced4a0762f2f538135bd8dd72b469f6fdca @@ -16598,7 +22855,7 @@ rendering CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 50c4ee413929e5a70133839e3cde039da738fab2 Author: Albert Astals Cid @@ -16618,7 +22875,7 @@ Fix cairo luminosity smask when cairo ctm != identity poppler/CairoOutputDev.cc | 16 +++++++++++++++- - 1 files changed, 15 insertions(+), 1 deletions(-) + 1 file changed, 15 insertions(+), 1 deletion(-) commit 3f55aff56a1d2002ba79f3efba5eb77e94575439 Author: Adrian Johnson @@ -16630,7 +22887,7 @@ poppler/CairoOutputDev.cc | 18 +++++++++++++++++- poppler/CairoOutputDev.h | 5 +++++ - 2 files changed, 22 insertions(+), 1 deletions(-) + 2 files changed, 22 insertions(+), 1 deletion(-) commit 4cc3cb8992ac554352d68e97563823b9bbd556ce Author: Carlos Garcia Campos @@ -16642,7 +22899,7 @@ rendering configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit da94fe717a1ab60fb074fae61d582d1ee7151fc2 Author: Albert Astals Cid @@ -16654,7 +22911,7 @@ poppler/Annot.cc | 54 ++++++++++++++++++++++++++++++++++++------------------ - 1 files changed, 36 insertions(+), 18 deletions(-) + 1 file changed, 36 insertions(+), 18 deletions(-) commit 8df0323f1ca4548a5d5824ece8736b356ce7ca42 Author: Albert Astals Cid @@ -16663,7 +22920,7 @@ Really fix jpeg lib init order? poppler/DCTStream.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 12aac6774fc6f92def3d5567051117951cc32223 Author: Albert Astals Cid @@ -16674,7 +22931,7 @@ Fixes bug #20605 poppler/GfxFont.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 0ca9ae2848808d15e7a2b00f5eb33bb8f990c887 Author: Vincent Torri @@ -16683,7 +22940,7 @@ remove the fortran check during the initialisation of libtool configure.ac | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 710e329a3a6a9ee2eed997c9eeaea21c44237423 Author: Vincent Torri @@ -16695,7 +22952,7 @@ the m4/ subdirectory. configure.ac | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d15e47158ae31909212d3875159046afb208de97 Author: Vincent Torri @@ -16704,7 +22961,7 @@ Better check for pkg-config configure.ac | 5 +---- - 1 files changed, 1 insertions(+), 4 deletions(-) + 1 file changed, 1 insertion(+), 4 deletions(-) commit b3f569f9a6c117c097acac52ae6552209fcd2101 Author: Albert Astals Cid @@ -16715,7 +22972,7 @@ Fixes bug #20587 poppler/Gfx.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 7a5d1e57b2757c986da17f7238415b927e73127f Author: Brian Ewins @@ -16728,7 +22985,7 @@ earlier on configure.ac | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 8dc9e4d57a4759de2b56a87d9bace80d5d563fef Author: Marc Kleine-Budde @@ -16746,7 +23003,7 @@ Bug #20538 m4/libjpeg.m4 | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit bf2e2f056cadbc488cd3e9576b44beb34689ec81 Author: Albert Astals Cid @@ -16755,7 +23012,7 @@ Add the new croptting options explanations utils/pdftotext.1 | 15 +++++++++++++++ - 1 files changed, 15 insertions(+), 0 deletions(-) + 1 file changed, 15 insertions(+) commit 663d9e5a448641421d290dd228be692a0f236b9c Author: Jan Jockusch @@ -16766,7 +23023,7 @@ Bug #20331 utils/pdftotext.cc | 29 ++++++++++++++++++++++++++++- - 1 files changed, 28 insertions(+), 1 deletions(-) + 1 file changed, 28 insertions(+), 1 deletion(-) commit cc4b61f19b69c31d9a73ae7361c4b6a94345d1c2 Author: Albert Astals Cid @@ -16779,7 +23036,7 @@ correct poppler/DCTStream.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit a4a73cd9f9ee9767d74fbb44ffe083d2057a9d61 Author: Albert Astals Cid @@ -16788,7 +23045,7 @@ I should compile before commiting :-/ poppler/DCTStream.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 6a6b3cc91053e771a67dffa979076d130f87ff11 Author: Ryszard Trojnacki @@ -16799,7 +23056,7 @@ Bug #20484 poppler/DCTStream.cc | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) + 1 file changed, 7 insertions(+), 4 deletions(-) commit 4dfa7460ddc4b5684d5ef8db17efa50b95b7b735 Author: Nick Jones @@ -16810,7 +23067,7 @@ More details in bug 18364 poppler/Outline.cc | 15 ++++++++++++++- - 1 files changed, 14 insertions(+), 1 deletions(-) + 1 file changed, 14 insertions(+), 1 deletion(-) commit de3131ae38fc9442b198d4d7b0c57c6939ad66ce Author: Pino Toscano @@ -16821,7 +23078,7 @@ store the error code instead of the bool qt4/src/poppler-pdf-converter.cc | 12 +++++++----- - 1 files changed, 7 insertions(+), 5 deletions(-) + 1 file changed, 7 insertions(+), 5 deletions(-) commit dac0542eb793603090416f1b7712ca08253f1e7f Author: Carlos Garcia Campos @@ -16832,7 +23089,7 @@ Fixes bug #19915. glib/poppler-document.cc | 37 +++++++++++++++++++++++++++++++++---- - 1 files changed, 33 insertions(+), 4 deletions(-) + 1 file changed, 33 insertions(+), 4 deletions(-) commit bfc6572614727565d883b9545d4b6665f3c2fdfe Author: Carlos Garcia Campos @@ -16851,7 +23108,7 @@ Fix cache shifting poppler/GfxState.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 305af8cdb6822858e152e1f930bba2ce3904bf1b Author: Albert Astals Cid @@ -16861,7 +23118,7 @@ poppler/JBIG2Stream.cc | 151 +++++++++++++++++++++++++++--------------------- - 1 files changed, 85 insertions(+), 66 deletions(-) + 1 file changed, 85 insertions(+), 66 deletions(-) commit 26a8217160c1eaeeadb92023b27e68f402e38dd0 Author: Carlos Garcia Campos @@ -16873,7 +23130,7 @@ See bug #17337. poppler/CairoOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5e68e52da65b4d8c3817e5fbb6f1a937da321d48 Author: Pino Toscano @@ -16882,7 +23139,7 @@ [Qt4] do not assume the destination file name for links is ASCII qt4/src/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 439cb397fed33df627a09c70788d72bef20dc872 Author: Pino Toscano @@ -16891,7 +23148,7 @@ [Qt] do not assume the destination file name for links is ASCII qt/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 3ea5f45ad3e5a55e577a2e45f61b55932ed17013 Author: Carlos Garcia Campos @@ -16900,7 +23157,7 @@ [glib] Make sure filename is valid utf-8 for remote dests glib/poppler-action.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit b5989e4ffece6c1831610ee163d05fd80386a001 Author: Carlos Garcia Campos @@ -16909,7 +23166,7 @@ Use the UF entry when present in Filespec dictionary poppler/FileSpec.cc | 14 +++++++------- - 1 files changed, 7 insertions(+), 7 deletions(-) + 1 file changed, 7 insertions(+), 7 deletions(-) commit 943fca42b5fa815fad650e42da4ad6e806adc3b1 Author: Carlos Garcia Campos @@ -16918,11 +23175,11 @@ [glib] Add a macro to define boxed types glib/poppler-action.cc | 26 +----------- - glib/poppler-annot.cc | 15 +------ - glib/poppler-document.cc | 44 ++++---------------- + glib/poppler-annot.cc | 15 ++----- + glib/poppler-document.cc | 44 +++++---------------- glib/poppler-page.cc | 99 +++++++++------------------------------------- - glib/poppler-private.h | 20 +++++++++ + glib/poppler-private.h | 20 ++++++++++ 5 files changed, 53 insertions(+), 151 deletions(-) commit 7406337ed2d38a86308f20f8273a152538e524de @@ -16932,7 +23189,7 @@ [glib] Use template files to create poppler-enums glib/Makefile.am | 43 - ++++++++++++--------------------------- + ++++++++++++---------------------------- glib/poppler-enums.c.template | 44 +++++++++++++++++++++++++++++++++++++++++ glib/poppler-enums.h.template | 25 +++++++++++++++++++++++ @@ -16976,7 +23233,7 @@ we need to do it in the reverse order poppler/GfxState.cc | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) + 1 file changed, 5 insertions(+), 5 deletions(-) commit 0ed3fd52bb2d3375ed302285b18f076721b8028e Author: Carlos Garcia Campos @@ -16985,7 +23242,7 @@ [glib-demo] Fix a typo in format string glib/demo/page.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2df6d530cd9acd8648a6196031218ef10e7b3891 Author: Albert Astals Cid @@ -16996,7 +23253,7 @@ Fixes bug 19789 utils/ImageOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 1fc342eadcbbb41302f190b215c5daf23c9ec9b1 Author: Albert Astals Cid @@ -17007,7 +23264,7 @@ Fixes crash on bug 19790 poppler/Form.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit b1d4efb082ac3dadd7752a557e5aeb6651e17471 Author: Albert Astals Cid @@ -17031,8 +23288,8 @@ poppler/GfxState.cc | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/GfxState.h | 15 ++++++++++++ - 2 files changed, 75 insertions(+), 0 deletions(-) + poppler/GfxState.h | 15 +++++++++++++ + 2 files changed, 75 insertions(+) commit d3f04f537fb3e963c149a7e2d8d83c7cb19da8c0 Author: Albert Astals Cid @@ -17043,7 +23300,7 @@ Fixes bug 19702 poppler/JBIG2Stream.cc | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) + 1 file changed, 6 insertions(+), 1 deletion(-) commit 3990c9e52da7b17215506857c792c90a37ebac79 Author: Koji Otani @@ -17052,7 +23309,7 @@ Fix a problem in cairo backend when using a CMYK Profile poppler/GfxState.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 6e51ae7fe8b9dc8ad52b735f2fe056f8ea8f1dcb Author: Albert Astals Cid @@ -17062,7 +23319,7 @@ index of the matrix poppler/DCTStream.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ea2aa7bd1ceb0e3282398f52683e4f52ef401f74 Author: Albert Astals Cid @@ -17094,7 +23351,7 @@ JS poppler/Catalog.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 869584a84eed507775ff1c3183fe484c14b6f77b Author: Jonathan Kew @@ -17115,8 +23372,8 @@ Fixes bug 19483 poppler/GfxState.cc | 106 - +++++++++++++++++++++++++------------------------- - 1 files changed, 53 insertions(+), 53 deletions(-) + +++++++++++++++++++++++++-------------------------- + 1 file changed, 53 insertions(+), 53 deletions(-) commit 6dd77338d16f80760ae32ff9f3e2be9768fc0c49 Author: Pino Toscano @@ -17127,7 +23384,7 @@ Fixes bug #18558. qt4/src/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 69c07c031159d36dde52609bffa6d48c3c56cef5 Author: Pino Toscano @@ -17147,7 +23404,7 @@ remove old cmake modules, add a new one Makefile.am | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit 0e6420ece2d6fcc046d5814b48a2754fb86771e2 Author: Albert Astals Cid @@ -17187,7 +23444,7 @@ CMakeLists.txt | 9 +++++++++ cmake/modules/FindLCMS.cmake | 37 +++++++++++++++++++++++++++++++++++++ config.h.cmake | 3 +++ - 3 files changed, 49 insertions(+), 0 deletions(-) + 3 files changed, 49 insertions(+) commit 140b8ed97416f9c2ec02eb749ca45ca50bd651a8 Author: Koji Otani @@ -17210,7 +23467,7 @@ scanForFonts() as deprecated qt4/src/poppler-qt4.h | 22 ++++++++++++++++++---- - 1 files changed, 18 insertions(+), 4 deletions(-) + 1 file changed, 18 insertions(+), 4 deletions(-) commit 6630e715714161cd803fc064f5d3cf880f42b0a5 Author: Pino Toscano @@ -17219,7 +23476,7 @@ tell Doxygen to consider Q_DECL_DEPRECATED as empty qt4/src/Doxyfile | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d748d430b106580b8be29ca3ec75caf05b55812e Author: Pino Toscano @@ -17237,8 +23494,8 @@ * added unit tests for fonts(), scanForFonts() and FontIterator qt4/src/poppler-document.cc | 27 +++++--- - qt4/src/poppler-fontinfo.cc | 36 ++++++++++ - qt4/src/poppler-private.h | 27 +++++++- + qt4/src/poppler-fontinfo.cc | 36 +++++++++++ + qt4/src/poppler-private.h | 27 ++++++-- qt4/src/poppler-qt4.h | 65 +++++++++++++++++++ qt4/tests/check_fonts.cpp | 149 +++++++++++++++++++++++++++++++++++++++++++ @@ -17265,7 +23522,7 @@ m4/libpng.m4 | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 99 insertions(+), 0 deletions(-) + 1 file changed, 99 insertions(+) commit ae588500f62bab5666174ff3b1564c414c5a76c5 Author: Albert Astals Cid @@ -17276,7 +23533,7 @@ CMakeLists.txt | 6 ++++++ config.h.cmake | 3 +++ utils/CMakeLists.txt | 4 ++++ - 3 files changed, 13 insertions(+), 0 deletions(-) + 3 files changed, 13 insertions(+) commit 940d060a14712c09da427e2fac4ec579f7291b0f Author: Albert Astals Cid @@ -17285,7 +23542,7 @@ do not leak fName if fopen fails utils/HtmlOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 7be9198adb940ad7c5fffc6db0158cf7042e1b8f Author: Albert Astals Cid @@ -17294,7 +23551,7 @@ Do not leak pgNum and imgnum if fopen fails utils/HtmlOutputDev.cc | 16 +++++++++------- - 1 files changed, 9 insertions(+), 7 deletions(-) + 1 file changed, 9 insertions(+), 7 deletions(-) commit dfba6c022b150553cb2b18b027e661b3b4625ce7 Author: Warren Toomey @@ -17302,9 +23559,9 @@ Make pdftohtml output png images when the image stream is not a jpeg - configure.ac | 14 +++++ + configure.ac | 14 ++++++ utils/HtmlOutputDev.cc | 126 - +++++++++++++++++++++++++++++++++++++++++++++-- + +++++++++++++++++++++++++++++++++++++++++++++--- utils/HtmlOutputDev.h | 3 +- utils/Makefile.am | 4 ++ 4 files changed, 140 insertions(+), 7 deletions(-) @@ -17333,7 +23590,7 @@ poppler/Form.cc | 11 ----------- poppler/Form.h | 3 +-- - 2 files changed, 1 insertions(+), 13 deletions(-) + 2 files changed, 1 insertion(+), 13 deletions(-) commit 5203aefc41fa47c461812cc46f28281edd226515 Author: Albert Astals Cid @@ -17355,7 +23612,7 @@ Length2 set to 0 poppler/PSOutputDev.cc | 26 +++++++++++++++++++++----- - 1 files changed, 21 insertions(+), 5 deletions(-) + 1 file changed, 21 insertions(+), 5 deletions(-) commit ca35fdbc7c31dae432d775b6c087a83fa9b897fc Author: Albert Astals Cid @@ -17364,7 +23621,7 @@ We need spaces here too to satify other consumer parsers poppler/PDFDoc.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 3c07c73e07a9cb59ee4c23ca60d2adce92de45f7 Author: Pino Toscano @@ -17373,7 +23630,7 @@ [Qt4-demo] load a document when passed via command line qt4/demos/main_viewer.cpp | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit aba0aaa896d634a51fbb3a3e6eae411be462f930 Author: Albert Astals Cid @@ -17385,7 +23642,7 @@ Add a space after num gen obj poppler/PDFDoc.cc | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) commit e5b93a847ae4e20a77fecef0938da4f14dfbe3eb Author: Hib Eris @@ -17431,7 +23688,7 @@ Fixes second pdf at kde bug 161327 qt4/src/poppler-form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0f10561f3b1c90acc030d973399316bfca5f495e Author: Albert Astals Cid @@ -17451,11 +23708,11 @@ use it from PDFDoc::writeObject goo/GooString.cc | 36 +++++++++++++++++++++++++++++++++++ - goo/GooString.h | 7 ++++++ - poppler/PDFDoc.cc | 7 +++++- + goo/GooString.h | 7 +++++++ + poppler/PDFDoc.cc | 7 ++++++- poppler/PSOutputDev.cc | 49 - ++++++++--------------------------------------- - poppler/PSOutputDev.h | 3 +- + +++++++++--------------------------------------- + poppler/PSOutputDev.h | 3 +-- 5 files changed, 59 insertions(+), 43 deletions(-) commit f41fa9ee71aef5539cf9976c79b32bf1713c8167 @@ -17466,7 +23723,7 @@ easy to understand poppler/XRef.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 6 insertions(+), 6 deletions(-) commit b8ae7d91dedc9a75200b6050628ec2740af84b98 Author: Hib Eris @@ -17479,7 +23736,7 @@ glib/demo/Makefile.am | 2 ++ test/Makefile.am | 2 ++ utils/Makefile.am | 2 ++ - 5 files changed, 10 insertions(+), 1 deletions(-) + 5 files changed, 10 insertions(+), 1 deletion(-) commit ba47bd2ba05f883306606eda30bff17bd4a8eec6 Author: Albert Astals Cid @@ -17494,7 +23751,7 @@ poppler/BaseFile.h | 82 --------------------------------------------------- poppler/Makefile.am | 1 - - 3 files changed, 0 insertions(+), 84 deletions(-) + 3 files changed, 84 deletions(-) commit 84366d9e63b0d6a5ee1aae2463648cfc2ff5e1b8 Author: Hib Eris @@ -17503,7 +23760,7 @@ Let libtool build DLLs on windows too configure.ac | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit 08cef528f2e51cc62cff4125f179021ad9555317 Author: Hib Eris @@ -17512,7 +23769,7 @@ Fix compile warning on string literal format test/pdf-inspector.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0606b4bba8e889204c7b7c9d376f63b659f83a4f Author: Hib Eris @@ -17521,7 +23778,7 @@ Fix compile warnings on parentheses and/or poppler/CairoOutputDev.cc | 13 +++++++------ - 1 files changed, 7 insertions(+), 6 deletions(-) + 1 file changed, 7 insertions(+), 6 deletions(-) commit eba2232cabd5fb1e177db2a6053f0d1a0aee882b Author: Hib Eris @@ -17540,7 +23797,7 @@ Fix compile warning on format type glib/test-poppler-glib.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit fda181c35b7c7500b6d3c6ca9d454addd54929c5 Author: Pino Toscano @@ -17549,7 +23806,7 @@ group condition within brackets poppler/ArthurOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit c1beeecbd6cbf82811d70c75cb24059b4b492abe Author: Pino Toscano @@ -17558,7 +23815,7 @@ [demo] use the proper format field for gsize types glib/demo/attachments.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit bfb975466f0ff78e9e292b6af7cac66e4c331456 Merge: 3e27892 ea3546f @@ -17575,7 +23832,7 @@ [Qt] deserialize also the value of 'right' qt/poppler-link.cc | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit 7c053ab7623cea1ac650d3e960d2d91a1ef21557 Author: Pino Toscano @@ -17586,11 +23843,11 @@ qt/CMakeLists.txt | 1 + qt/Makefile.am | 1 + - qt/poppler-document.cc | 10 --- + qt/poppler-document.cc | 10 ---- qt/poppler-page.cc | 1 + qt/poppler-private.cc | 147 ++++++++++++++++++++++++++++++++++++++++++++++++ - qt/poppler-private.h | 106 ++-------------------------------- + qt/poppler-private.h | 106 +++------------------------------- 6 files changed, 157 insertions(+), 109 deletions(-) commit ea3546f84c5335c58cdb2906b1a1a4656be9c8ea @@ -17600,7 +23857,7 @@ Fix compile warnings on signed/unsigned comparison goo/gfile.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit ca672ae51d2c1fa59a891717b418ba86b5e7345c Author: Hib Eris @@ -17609,7 +23866,7 @@ Fix compile warnings on ignored pragma with mingw compiler poppler/Gfx.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 86cfe8ab2b4e0b600f3f6682701c2fcfbe5d0ca9 Author: Hib Eris @@ -17618,7 +23875,7 @@ Fix compile warnings on signed/unsigned comparison poppler/GfxFont.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + 1 file changed, 4 insertions(+), 2 deletions(-) commit e34af7ffe0a4024e2eb39314bdb09eb9a662e53e Author: Albert Astals Cid @@ -17629,7 +23886,7 @@ poppler/TextOutputDev.cc | 1 + poppler/TextOutputDev.h | 2 +- qt4/src/poppler-page.cc | 1 + - 3 files changed, 3 insertions(+), 1 deletions(-) + 3 files changed, 3 insertions(+), 1 deletion(-) commit f6d84dcfc9cc587c7408af79b1ee7658d456f8d8 Author: Hib Eris @@ -17638,7 +23895,7 @@ Fix compile warning to suggest parentheses and/or poppler/TextOutputDev.cc | 14 ++++++++------ - 1 files changed, 8 insertions(+), 6 deletions(-) + 1 file changed, 8 insertions(+), 6 deletions(-) commit 15205403eaa95d6fba0e36983de993877dd3a983 Author: Hib Eris @@ -17647,7 +23904,7 @@ Fix warning to suggest parentheses inside shift poppler/PSOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit cc24f37e582bfc0069faf286da97a48fe4794db1 Author: Hib Eris @@ -17656,7 +23913,7 @@ Fix compile warning on ambiguous else test/perf-test.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit a8cc4ad8c2da804f25db8cca1c85433d5a63307c Author: Hib Eris @@ -17665,7 +23922,7 @@ Fix compile warning on format not a string literal test/perf-test.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 3cbbf8226730aa7ee6273e154e4a9d58670a3cda Author: Hib Eris @@ -17674,7 +23931,7 @@ Fix compile warning about uninitialized variable poppler/ABWOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit f675916277cb76cd1293225a1271f835a02148fb Author: Pino Toscano @@ -17685,7 +23942,7 @@ found with poppler-qt4 unit tests =) poppler/TextOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit c976770c64e4c991fff27e413414473583b6fd86 Author: Pino Toscano @@ -17697,7 +23954,7 @@ in these cases we don't need the sorting a map gives qt4/src/poppler-page.cc | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit 944f6049a50eb3be9fb29174d67adc4ad1d0b9fe Author: Pino Toscano @@ -17706,7 +23963,7 @@ add find.c and text.c glib/demo/CMakeLists.txt | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit ba91b889c3b50239e339938f3c9d31fffcd87d44 Author: Carlos Garcia Campos @@ -17715,7 +23972,7 @@ Make destructor private in TextPage poppler/TextOutputDev.h | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 0da16537aa83f6ed6d8895c7e54266263a71c1cf Author: Carlos Garcia Campos @@ -17728,7 +23985,7 @@ in such classes. poppler/CairoOutputDev.cc | 108 +++--------------------- - poppler/CairoOutputDev.h | 7 +-- + poppler/CairoOutputDev.h | 7 +- poppler/TextOutputDev.cc | 206 ++++++++++++++++++++++++++------------------- poppler/TextOutputDev.h | 34 ++++++-- @@ -17745,7 +24002,7 @@ +++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/find.h | 31 ++++++ glib/demo/main.c | 4 +- - 4 files changed, 318 insertions(+), 1 deletions(-) + 4 files changed, 318 insertions(+), 1 deletion(-) commit 88df9e9aa9adb53f0a9714ea404d46f111495df3 Author: Carlos Garcia Campos @@ -17758,7 +24015,7 @@ glib/demo/text.c | 175 +++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/text.h | 31 +++++++++ - 4 files changed, 211 insertions(+), 1 deletions(-) + 4 files changed, 211 insertions(+), 1 deletion(-) commit 5b0f2355d55a5104820fd0bf16b4e76b25959de4 Author: Carlos Garcia Campos @@ -17768,7 +24025,7 @@ glib/poppler-page.cc | 148 +++++++++++++++++++++++++++++++++--------------- - glib/poppler-private.h | 4 + + glib/poppler-private.h | 4 ++ 2 files changed, 107 insertions(+), 45 deletions(-) commit 3ced71fb68d62308db7b9535367eafefb55d1cde @@ -17807,7 +24064,7 @@ poppler/PSOutputDev.cc | 114 ++++++++++++++++++++++++++++++------------------ - 1 files changed, 72 insertions(+), 42 deletions(-) + 1 file changed, 72 insertions(+), 42 deletions(-) commit fc395eb90b418e43453acefb42cd04baf0b7ad40 Author: Richard Airlie @@ -17816,7 +24073,7 @@ Allow the use of cropbox in pdftoppm utils/pdftoppm.cc | 16 +++++++++++++--- - 1 files changed, 13 insertions(+), 3 deletions(-) + 1 file changed, 13 insertions(+), 3 deletions(-) commit 80f415176952635a485356cf36048eee53396c25 Author: Albert Astals Cid @@ -17838,7 +24095,7 @@ Fixes bug 19095 poppler/Annot.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit aaeb0d137232bf1cb11dc5e37b8b45b50c6f9c6a Author: Pino Toscano @@ -17847,7 +24104,7 @@ update the xpdf headers installation CMakeLists.txt | 32 +++++++++++++++++++++----------- - 1 files changed, 21 insertions(+), 11 deletions(-) + 1 file changed, 21 insertions(+), 11 deletions(-) commit 7c6527fa05389f705872aaaaff12e739b5d1577e Author: Pino Toscano @@ -17856,7 +24113,7 @@ don't install Function.cc, as it is not an header poppler/Makefile.am | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 0179e21b128ffccb5afd13203137ab8435197609 Author: Albert Astals Cid @@ -17877,7 +24134,7 @@ Try harder to look for openjpeg cmake/modules/FindLIBOPENJPEG.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ab539f46089702f60b96b1ba2b2bc1544173c264 Author: Albert Astals Cid @@ -17890,7 +24147,7 @@ read children. poppler/Outline.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit c9a755f9fd14511f43a2ca7fcda36bdd64bb1d87 Author: Ilya Gorenbein @@ -17901,7 +24158,7 @@ Bug 18924 poppler/Page.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 4cd364c179ae91ed383a8237ba1ad263952fd7aa Author: Pino Toscano @@ -17910,7 +24167,7 @@ add my copyright here qt4/src/poppler-private.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 6b1676deb773675d90469adc84c3de8dcdaf174c Author: Pino Toscano @@ -17919,7 +24176,7 @@ [Qt4] support URI actions for TOC items qt4/src/poppler-private.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit b5cd58b5565055fd0c13771461245ddcd80edfcf Author: Pino Toscano @@ -17929,8 +24186,8 @@ it more safe qt4/src/poppler-private.cc | 85 - ++++++++++++++++++++++++++++++------------- - 1 files changed, 59 insertions(+), 26 deletions(-) + ++++++++++++++++++++++++++++++-------------- + 1 file changed, 59 insertions(+), 26 deletions(-) commit ee191363e22940ae7b06945e68c4738b17c78348 Author: Pino Toscano @@ -17943,7 +24200,7 @@ qt4/src/poppler-private.cc | 65 ++++++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-private.h | 64 - +----------------------------------------- + ++----------------------------------------- 4 files changed, 69 insertions(+), 62 deletions(-) commit f8eaabf1aa7e384619129a7509be85d0c3bfb825 @@ -17953,7 +24210,7 @@ Update copyrights of the last commits poppler/TextOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5f4fedfae6098e25644ffe5d4b1ed0bac043841d Author: Albert Astals Cid @@ -17965,7 +24222,7 @@ value is incorrect it will still work poppler/JPEG2000Stream.cc | 10 ++++++++-- - 1 files changed, 8 insertions(+), 2 deletions(-) + 1 file changed, 8 insertions(+), 2 deletions(-) commit 12f6d6ba2052fbdc8ea4ba7c7c9277e75bf170a5 Author: Carlos Garcia Campos @@ -17979,7 +24236,7 @@ instead be defined as a named resource. poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 817e123a28e9f6b7e5be23f7ac2ba3bcec5e3f3f Author: Adrian Johnson @@ -18000,7 +24257,7 @@ Thanks to Bernard Leak for notifying test/pdf-inspector.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 4a4fa7ed44a87e47a6078a1f7bb6f41071672ea7 Author: Carlos Garcia Campos @@ -18009,7 +24266,7 @@ Fix a crash when selecting text in word mode poppler/TextOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a6f5032ab0d6edbf3879f39efff7916b1f7233da Author: Carlos Garcia Campos @@ -18018,7 +24275,7 @@ optContentConfig is not actually stored in PDFDoc but in Catalog poppler/PDFDoc.h | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit b843ac34c6c4ca1580f99fa2220c59dfcd91f026 Author: Pino Toscano @@ -18027,7 +24284,7 @@ [Qt4] deserialize the value of the 'right' coordinate, too qt4/src/poppler-link.cc | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit 03061fdae49842556c9ff48e61914fc88502e1d8 Author: Tim Mooney @@ -18050,7 +24307,7 @@ Fixes bugs #18254 and #18429 poppler/CairoOutputDev.cc | 15 ++++++++++++++- - 1 files changed, 14 insertions(+), 1 deletions(-) + 1 file changed, 14 insertions(+), 1 deletion(-) commit e2257e6916cd1067d43db9ed45f944413c61ed64 Author: Albert Astals Cid @@ -18064,7 +24321,7 @@ poppler/Gfx.h | 1 + poppler/OptionalContent.h | 1 + qt4/src/poppler-optcontent.cc | 1 + - 6 files changed, 6 insertions(+), 1 deletions(-) + 6 files changed, 6 insertions(+), 1 deletion(-) commit 069f8ad9453e612e907b561aa50983c34400193d Author: Albert Astals Cid @@ -18074,7 +24331,7 @@ glib/CMakeLists.txt | 1 + glib/demo/CMakeLists.txt | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 04025c4f65bbb7e4330f6d17d917a035c0906f3d Author: Carlos Garcia Campos @@ -18086,7 +24343,7 @@ passing a NULL catalog. poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 471255c5a3850984997d91c7850759eb0c7e8a9c Author: Carlos Garcia Campos @@ -18099,7 +24356,7 @@ +++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/layers.h | 31 +++ glib/demo/main.c | 4 +- - 4 files changed, 547 insertions(+), 1 deletions(-) + 4 files changed, 547 insertions(+), 1 deletion(-) commit 7363c25e1d83332932d9b4fe16d7fb4e364da628 Author: Carlos Garcia Campos @@ -18112,11 +24369,11 @@ +++++++++++++++++++++++++++++++++++++++++++++ glib/poppler-document.h | 12 ++ glib/poppler-layer.cc | 201 ++++++++++++++++++++++++ - glib/poppler-layer.h | 43 +++++ + glib/poppler-layer.h | 43 ++++++ glib/poppler-private.h | 21 +++ glib/poppler.h | 3 + glib/test-poppler-glib.cc | 52 ++++++- - 8 files changed, 710 insertions(+), 1 deletions(-) + 8 files changed, 710 insertions(+), 1 deletion(-) commit c674566f458b54097f21aae0d4bf8637146565c5 Author: Carlos Garcia Campos @@ -18149,7 +24406,7 @@ poppler/Gfx.cc | 113 +++++++++++++++++++++++++++++++++++++++----------------- - poppler/Gfx.h | 7 ++- + poppler/Gfx.h | 7 +++- 2 files changed, 84 insertions(+), 36 deletions(-) commit 5f168f991477e291290350a28f4a60a565e187b9 @@ -18159,7 +24416,7 @@ [glib] Show action titles when printing the index in test program glib/test-poppler-glib.cc | 13 ++++++++----- - 1 files changed, 8 insertions(+), 5 deletions(-) + 1 file changed, 8 insertions(+), 5 deletions(-) commit a906d12e16748d9a40c0db4043a576fd3d004341 Author: Carlos Garcia Campos @@ -18182,7 +24439,7 @@ poppler/Catalog.cc | 4 ++++ poppler/OptionalContent.cc | 3 +++ poppler/OptionalContent.h | 5 +++++ - 3 files changed, 12 insertions(+), 0 deletions(-) + 3 files changed, 12 insertions(+) commit 2900e7e4c920d735d5a727e9e39f71df97bd7b93 Author: Albert Astals Cid @@ -18191,7 +24448,7 @@ A new cairo is needed CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit aaaecd2e86769d3a99e21577448a193711985958 Author: Albert Astals Cid @@ -18203,7 +24460,7 @@ For the bug 18374 it works and does not seem a security problem poppler/GfxState.cc | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit 82f4228a50efe6447c68f7f6d34a7805b7e4b75e Author: Albert Astals Cid @@ -18212,7 +24469,7 @@ Add myself here qt4/demos/viewer.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 8df7d83439f0e9ab200840f912f1c08bbf44bd6e Author: Albert Astals Cid @@ -18221,7 +24478,7 @@ [Qt4Demo] Fix leak qt4/demos/viewer.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d3c424e0362f53bda5c4e2e415823d78ace76253 Author: Albert Astals Cid @@ -18231,7 +24488,7 @@ function parameter poppler/Catalog.cc | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 9d12de9b59de4336eabb423f7bf0363b6a35e2a8 Author: Albert Astals Cid @@ -18243,7 +24500,7 @@ think if will group it, but does not poppler/UnicodeTypeTable.cc | 7 +++++-- - 1 files changed, 5 insertions(+), 2 deletions(-) + 1 file changed, 5 insertions(+), 2 deletions(-) commit fc61dad9daa15f83802ffa5c3cd9b59d80bb310b Author: Albert Astals Cid @@ -18252,7 +24509,7 @@ [Qt] Fix leak qt/poppler-link.cc | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit 981fb857b0afb1cda7836744dcf37906285512b4 Author: Albert Astals Cid @@ -18261,7 +24518,7 @@ [Qt] Fix memory leak qt/poppler-document.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit e925e92d5cbfc009c138ece117227a3b0894ead6 Author: Albert Astals Cid @@ -18270,7 +24527,7 @@ Do not leak uBuf in the error case poppler/CharCodeToUnicode.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 0741a402632ec5a8641ff11707142bf2731c1833 Author: Adrian Johnson @@ -18280,7 +24537,7 @@ poppler/CairoFontEngine.cc | 49 ++++++++++++++++++++++++++------------------ - poppler/CairoFontEngine.h | 20 ++++++++++------- + poppler/CairoFontEngine.h | 20 ++++++++++-------- poppler/CairoOutputDev.cc | 2 +- poppler/CairoOutputDev.h | 2 +- 4 files changed, 43 insertions(+), 30 deletions(-) @@ -18295,7 +24552,7 @@ incorrect results. poppler/CairoOutputDev.cc | 5 ----- - 1 files changed, 0 insertions(+), 5 deletions(-) + 1 file changed, 5 deletions(-) commit 3bf4d7d75b455a9a0b5ee3a8c78b218e5af5185a Author: Adrian Johnson @@ -18304,7 +24561,7 @@ Transform the glyph advance by the font matrix poppler/CairoFontEngine.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 4aa32bad61d008a854fdc9e902d6834bb1687d7e Author: Adrian Johnson @@ -18313,7 +24570,7 @@ Use the font BBox, not the font matrix to set the Gfx BBox poppler/CairoFontEngine.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 987955440c7711f440c3d2b5cc8c05ec07228a77 Author: Adrian Johnson @@ -18324,7 +24581,7 @@ we use for transforming the glyph metrics. poppler/CairoFontEngine.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 5c051aa117477cba5d350adfc539acb4b5f2a56a Author: Adrian Johnson @@ -18333,7 +24590,7 @@ Require cairo 1.8.2 for user-font support configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit a3edfa30680864b95a5196c5619846de42980857 Author: Adrian Johnson @@ -18356,7 +24613,7 @@ poppler/CairoOutputDev.cc | 10 ++++++++++ poppler/CairoOutputDev.h | 7 +++++++ - 2 files changed, 17 insertions(+), 0 deletions(-) + 2 files changed, 17 insertions(+) commit a75efe208d899d4a23d5e2fcef200e4225721636 Author: Adrian Johnson @@ -18391,7 +24648,7 @@ Use correct return type in _ft_new_face poppler/CairoFontEngine.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b5ee897a24ce1edfca19a3b843f9b7ee7026d07 Author: Adrian Johnson @@ -18404,7 +24661,7 @@ poppler/CairoFontEngine.cc | 197 +++++++++++++++++++++++++------------------- - poppler/CairoFontEngine.h | 26 +++++-- + poppler/CairoFontEngine.h | 26 ++++-- 2 files changed, 131 insertions(+), 92 deletions(-) commit a5865dae5b414de5f6dbda2a512101050c374e06 @@ -18437,7 +24694,7 @@ [glib] Fix build when compiling with GTK_DISABLE_SINGLE_INCLUDES glib/poppler-page.h | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit a84d272ffd2b593ac98148e71b83fba299c60fea Author: Carlos Garcia Campos @@ -18458,7 +24715,7 @@ [Qt4] Small docu improvement qt4/src/poppler-qt4.h | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 00f9995b4960575cd1f392474c585f2140c8e587 Author: Albert Astals Cid @@ -18469,7 +24726,7 @@ See bug 18023 for more info poppler/TextOutputDev.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit 084cc4335cfe2c0e66219eba4c1177ee7ff018c5 Author: Albert Astals Cid @@ -18479,7 +24736,7 @@ obj3 poppler/Form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit d7442c90206d4b7a8ebc58f995647eb87ac35f42 Author: Albert Astals Cid @@ -18488,7 +24745,7 @@ If Name is a Ref we want to get the String it references, not the Ref poppler/OptionalContent.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 93f8dd9e837557bbfc0f058a664c356e3d6e82c0 Author: Albert Astals Cid @@ -18510,7 +24767,7 @@ Initialize properly OptionalContentGroup::m_name poppler/OptionalContent.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit c7b87f3b8cbbcca29a1974debc2233f621a2e33b Author: Carlo Bramini @@ -18519,7 +24776,7 @@ Fix link on Mingw+Msys test/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e92255296511cae9cbbac8de800d8b26e5f681f1 Author: Pino Toscano @@ -18530,7 +24787,7 @@ the (failed) exporting qt4/src/poppler-pdf-converter.cc | 13 +++++++++++++ - 1 files changed, 13 insertions(+), 0 deletions(-) + 1 file changed, 13 insertions(+) commit 360f470b852e37d400949343763a18bf598820e8 Author: Albert Astals Cid @@ -18539,7 +24796,7 @@ Remove unused var poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit df7317f1320513b4f66cb6618d753b82042671f5 Author: Albert Astals Cid @@ -18548,7 +24805,7 @@ free the object poppler/PDFDoc.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 9946d9af9dd5d5b96d5c777413a3e253dfd1f291 Author: Albert Astals Cid @@ -18558,7 +24815,7 @@ so just fail early poppler/PDFDoc.cc | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit 108959432af7714cb8ffe42d98d40c97f936a2e6 Author: Albert Astals Cid @@ -18567,7 +24824,7 @@ Correctly return wheter it was saved or not qt4/src/poppler-pdf-converter.cc | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) + 1 file changed, 5 insertions(+), 3 deletions(-) commit 4c6cb1c204d782e2ac2113b57f6d372b4716017d Author: Albert Astals Cid @@ -18576,7 +24833,7 @@ Remove spurious // fofi/FoFiType1.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e8e7809ab4b115cbe67251da12989fc024912514 Author: Albert Astals Cid @@ -18589,7 +24846,7 @@ error() to make things a bit clearer fofi/FoFiType1.cc | 28 ++++++++++++++++++++++++---- - 1 files changed, 24 insertions(+), 4 deletions(-) + 1 file changed, 24 insertions(+), 4 deletions(-) commit 7604e025038fee24c2cb3001f2100d5d1e48efe1 Author: Albert Astals Cid @@ -18600,7 +24857,7 @@ we suck :-( Fixes kde bug 172105 qt4/src/poppler-link-extractor.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 450b21e4528a8e890d3dda37ecb0a68602f8efaa Author: Albert Astals Cid @@ -18623,7 +24880,7 @@ poppler/Function.cc | 2 ++ poppler/GfxState.cc | 2 +- - 2 files changed, 3 insertions(+), 1 deletions(-) + 2 files changed, 3 insertions(+), 1 deletion(-) commit d12f5f4395eb18f8d29182e24acddd3e2b5cfe88 Author: Albert Astals Cid @@ -18646,7 +24903,7 @@ utils/ImageOutputDev.cc | 3 +++ utils/ImageOutputDev.h | 3 +++ - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 3225f54fea7cbb6b25d7223268cdeccfdd823375 Author: Albert Astals Cid @@ -18661,7 +24918,7 @@ poppler/Outline.h | 3 +++ splash/Splash.cc | 3 +++ splash/Splash.h | 3 +++ - 5 files changed, 15 insertions(+), 0 deletions(-) + 5 files changed, 15 insertions(+) commit 268d803c9dd67b7f78f8dcdc3c7653c8b2c2d08f Author: Warren Toomey @@ -18670,7 +24927,7 @@ Let HmtlOutputDev process images utils/HtmlOutputDev.h | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit a29984ab777c64a1cb286b667a6a91ad9b191f40 Merge: f399afe 6865872 @@ -18687,9 +24944,9 @@ [Qt4] various apidox improvements qt4/src/Mainpage.dox | 10 +--- - qt4/src/poppler-link.h | 92 +++++++++++++++++++++++++++++++++--- + qt4/src/poppler-link.h | 92 ++++++++++++++++++++++++++++++++---- qt4/src/poppler-qt4.h | 121 - ++++++++++++++++++++++++++++++++--------------- + ++++++++++++++++++++++++++++++++---------------- 3 files changed, 168 insertions(+), 55 deletions(-) commit 68658721583b05ebacb1165ac36e91d49735bbd9 @@ -18700,7 +24957,7 @@ crash on 17811 when using cairooutputdev fofi/FoFiTrueType.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 3cb5b7fc5ae168ef58fd1905f61c1b9abe6cb86c Author: Albert Astals Cid @@ -18724,7 +24981,7 @@ Fixes part of bug 17811 poppler/DCTStream.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit e2461c9aa4d74b5511621d7222979948e31541ad Author: Pino Toscano @@ -18734,7 +24991,7 @@ qt4/src/poppler-ps-converter.cc | 2 +- qt4/src/poppler-qt4.h | 2 ++ - 2 files changed, 3 insertions(+), 1 deletions(-) + 2 files changed, 3 insertions(+), 1 deletion(-) commit 957d7acb66635e9748c6bc7a31cdbbcbb8da9011 Author: Carlo Bramini @@ -18757,7 +25014,7 @@ Only miss, Marco Pesenti Gritti, Timothy Lee and Ed Catmur poppler/CairoOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit a197a07728d19abc2708979c95b4ef53e88fcb55 Author: Carlo Bramini @@ -18766,7 +25023,7 @@ Compile where localtime_r is not available glib/demo/info.cc | 10 ++++++++-- - 1 files changed, 8 insertions(+), 2 deletions(-) + 1 file changed, 8 insertions(+), 2 deletions(-) commit 38884e1722ac7e15c62cece20035c5fb0020f4b3 Author: Albert Astals Cid @@ -18778,7 +25035,7 @@ Fixes pdf on KDE bug 171365 poppler/GfxFont.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0e080aaf44816e5d5b9008f3c2fb54868932f0ac Author: Albert Astals Cid @@ -18790,7 +25047,7 @@ test/gtk-cairo-test.cc | 3 --- test/pdf-inspector.cc | 3 --- - 2 files changed, 0 insertions(+), 6 deletions(-) + 2 files changed, 6 deletions(-) commit 6888b023fdb199d3c5fb705bd928aedf68eeffdb Author: Albert Astals Cid @@ -18802,7 +25059,7 @@ Fixes bug 17744 poppler/SplashOutputDev.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit 539d29f4f3b24b98c9fc5f88d3477e427fbe409d Author: Albert Astals Cid @@ -18827,7 +25084,7 @@ the benefit/lost is almost inexistant poppler/Object.h | 36 ++++++++++++++++++++++-------------- - 1 files changed, 22 insertions(+), 14 deletions(-) + 1 file changed, 22 insertions(+), 14 deletions(-) commit df47e4c441e4ec79b1bb40de7044c9501f243b76 Author: Chris Wilson @@ -18848,7 +25105,7 @@ configure.ac | 1 + poppler/CairoFontEngine.cc | 214 - ++++++++++++++++++++++++++++++++++++++----- + ++++++++++++++++++++++++++++++++++++++------ 2 files changed, 190 insertions(+), 25 deletions(-) commit 41d1edddcf84ca23c0fc39c5f4f3a49e408a9f1a @@ -18858,7 +25115,7 @@ [glib-demo] Fix a crash in forms demo glib/demo/forms.c | 12 +++++++----- - 1 files changed, 7 insertions(+), 5 deletions(-) + 1 file changed, 7 insertions(+), 5 deletions(-) commit fe26075353226be9a02c8cf1a6a29586de15ce86 Author: Pino Toscano @@ -18867,7 +25124,7 @@ really use the key passed to it poppler/Form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 8aa531cb478d6ae838a94f9f31e6a0bbd0dd957c Author: Pino Toscano @@ -18876,7 +25133,7 @@ Read the 'readOnly' attribute directly in the FormField constructor. poppler/Form.cc | 12 +++--------- - 1 files changed, 3 insertions(+), 9 deletions(-) + 1 file changed, 3 insertions(+), 9 deletions(-) commit b56f64d676bdabd4a3ebe0eb2237f4c202a3707d Author: Pino Toscano @@ -18885,7 +25142,7 @@ Handle streams as entries for the catalog JS name tree. poppler/Catalog.cc | 18 +++++++++++++----- - 1 files changed, 13 insertions(+), 5 deletions(-) + 1 file changed, 13 insertions(+), 5 deletions(-) commit 93386d67b3d7adbd87547e9742e4df1c10eadbc1 Author: Albert Astals Cid @@ -18945,7 +25202,7 @@ splash/SplashT1FontFile.h | 3 +++ splash/SplashTypes.h | 3 +++ splash/SplashXPathScanner.cc | 3 +++ - 22 files changed, 66 insertions(+), 0 deletions(-) + 22 files changed, 66 insertions(+) commit beb87362072d5b480cf6b2c02445ec17c119ff56 Author: Albert Astals Cid @@ -18954,7 +25211,7 @@ Add Tomas' Copyright utils/HtmlFonts.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 8ccb1bb651b129875ef802356c4a229b2ce31973 Author: Tomas Are Haavet @@ -18963,7 +25220,7 @@ Initialize pos the correct value to not have crashes utils/HtmlFonts.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 77bf8ec94e36fef7e120f1dc4bb1390be71cfb97 Author: Tomas Are Haavet @@ -18972,7 +25229,7 @@ Fix memory leak utils/HtmlOutputDev.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b22be54dc2205269974315ca748d835d0990d6da Author: Tomas Are Haavet @@ -18981,7 +25238,7 @@ Fix mismatched free/delete utils/HtmlOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit ac16174da1d6f19445f78e7cd7c4a18cb9524dde Author: Albert Astals Cid @@ -18991,7 +25248,7 @@ don't print correctly like PDF from bug 17645 poppler/PSOutputDev.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit ffa4ffdf7fe83035c72addd8c4c8ee566621ba06 Author: Albert Astals Cid @@ -19017,7 +25274,7 @@ because it's already on an error path poppler/XRef.cc | 25 +++++++++++++++++++++++++ - 1 files changed, 25 insertions(+), 0 deletions(-) + 1 file changed, 25 insertions(+) commit 1a852064ff5a1a15bc315ddca472a0ad74292581 Author: Carlos Garcia Campos @@ -19026,7 +25283,7 @@ [glib-demo] Do not try to get info about remote destinations glib/demo/utils.c | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit 951cffeb2cbff4e179043033b5ac7f5eb764d6dc Author: Albert Astals Cid @@ -19039,7 +25296,7 @@ bugs 13972, 16092 and 17523 and they seem to work ok poppler/Decrypt.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 491109edbe827860e764b5fcb67456867923858d Author: Haruyuki Kawabe @@ -19051,7 +25308,7 @@ Fixes bug 17504 utils/HtmlOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 7dfc1e4c9348d537896bda7b0f2ae591afc72866 Author: Albert Astals Cid @@ -19060,7 +25317,7 @@ we want to distribute this file too qt4/src/Makefile.am | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit ddb73e8dc1ccbddf3b170e12c7153ccaf716d7cc Author: Albert Astals Cid @@ -19069,7 +25326,7 @@ We want to distribute cmake/modules/FindLIBOPENJPEG.cmake too Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 646ccc2bb8563d411dc25bdbab53725ae08572ba Author: Albert Astals Cid @@ -19078,7 +25335,7 @@ m_doc->doc->getOptContentConfig() can be null, so check for it qt4/src/poppler-document.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit d7f0bce67101f37f8d3e69d7d701388bcdc7200f Author: Albert Astals Cid @@ -19103,7 +25360,7 @@ i want this packaged too utils/Makefile.am | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit dd0f4c1510382e17cf33d3fe163e384da1d6d289 Author: Albert Astals Cid @@ -19112,7 +25369,7 @@ Fix includepath fofi/FoFiTrueType.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 16c0842c3e01608a72709af55cc5cb8b567efedf Author: Albert Astals Cid @@ -19167,7 +25424,7 @@ NEWS | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 115 insertions(+), 0 deletions(-) + 1 file changed, 115 insertions(+) commit d35ca2ce5df12d40e295873e44b1f18ea40ba897 Author: Pino Toscano @@ -19176,8 +25433,8 @@ [Qt4] apidox improvements qt4/src/poppler-annotation.h | 70 - +++++++++++++++++++++++++++++++++++++++-- - qt4/src/poppler-link.h | 12 +++++-- + +++++++++++++++++++++++++++++++++++++++--- + qt4/src/poppler-link.h | 12 +++++--- qt4/src/poppler-qt4.h | 22 +++++++++++-- 3 files changed, 93 insertions(+), 11 deletions(-) @@ -19190,7 +25447,7 @@ qt4/demos/CMakeLists.txt | 1 - qt4/src/CMakeLists.txt | 1 - qt4/tests/CMakeLists.txt | 1 - - 3 files changed, 0 insertions(+), 3 deletions(-) + 3 files changed, 3 deletions(-) commit db7ee3b3ae0f42155f9245691e4bfdef98a8ed6f Author: Albert Astals Cid @@ -19199,7 +25456,7 @@ [Qt4] Fix docu qt4/src/poppler-qt4.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3366059a25611f19ab592cda18c5efe0b9359771 Author: Pino Toscano @@ -19221,7 +25478,7 @@ we are printing so pass the print flag as true qt/poppler-document.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit f5d1eb5eaabaf3ab4bb87b8b4b901bbf30b20b29 Author: Albert Astals Cid @@ -19233,7 +25490,7 @@ same mistake... qt4/src/poppler-ps-converter.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 58e828d732f06bae9133dd518d89fa4348f1cca8 Author: Albert Astals Cid @@ -19254,7 +25511,7 @@ Fixes a crash when filename is a dictionary poppler/Annot.cc | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) + 1 file changed, 5 insertions(+), 3 deletions(-) commit 996d2e176057e22acbc374cff7a712ce6fd92d93 Author: Carlos Garcia Campos @@ -19267,7 +25524,7 @@ ++++++++++++++++++++++++++++++++++++++++++++++++ poppler/FileSpec.h | 24 ++++++++ poppler/Link.cc | 104 +++++----------------------------- - poppler/Link.h | 4 - + poppler/Link.h | 4 -- poppler/Makefile.am | 2 + poppler/PSOutputDev.cc | 35 +----------- poppler/PSOutputDev.h | 1 - @@ -19283,7 +25540,7 @@ Fixes bug 16121 and 15535 poppler/Form.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit c75abac7ba07990ef54a46fa0d429eea580a71ef Author: Albert Astals Cid @@ -19292,7 +25549,7 @@ Kjartan was missing and just agreed utils/HtmlOutputDev.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 630aa133017d15ddc7bf96c79f43c5b60fa9749a Merge: b2bc9b3 de82255 @@ -19311,12 +25568,12 @@ mostly the start of the \since marker addition, plus few other documentation addition/improvements - qt4/src/poppler-annotation.h | 9 ++++++ - qt4/src/poppler-form.h | 8 +++++ - qt4/src/poppler-link.h | 14 ++++++++-- + qt4/src/poppler-annotation.h | 9 +++++++ + qt4/src/poppler-form.h | 8 ++++++ + qt4/src/poppler-link.h | 14 +++++++--- qt4/src/poppler-optcontent.h | 11 ++++++++ qt4/src/poppler-qt4.h | 59 - ++++++++++++++++++++++++++++++++++++----- + ++++++++++++++++++++++++++++++++++++------ 5 files changed, 90 insertions(+), 11 deletions(-) commit 6bc4881477ea15d70d420e57b5663052f2f9df76 @@ -19330,7 +25587,7 @@ we don't have it in the apidox qt4/src/Doxyfile | 8 +++++--- - 1 files changed, 5 insertions(+), 3 deletions(-) + 1 file changed, 5 insertions(+), 3 deletions(-) commit de822554acdb1b2bc9e70c0668c43a10c0ec129a Author: Albert Astals Cid @@ -19339,7 +25596,7 @@ Initialize widget to null before calling initialize not after :-( poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1a7b7199112d97e816a099cbc1a5672c83e64156 Author: Albert Astals Cid @@ -19348,7 +25605,7 @@ Add my copyright poppler/Dict.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 1fef34782a003f46fceab0d3bed36212bbf32c4c Author: Albert Astals Cid @@ -19365,7 +25622,7 @@ use the second now too and the pdf works poppler/Dict.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit bb7996eaaad6a70404891bb2ff530160737ea3d7 Author: Albert Astals Cid @@ -19374,7 +25631,7 @@ Do not crash on documents with no pages qt4/tests/test-poppler-qt4.cpp | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 0c11d390e4b0e3765ae20968359c7562c9857db7 Author: Albert Astals Cid @@ -19475,7 +25732,7 @@ utils/pdftoppm.cc | 3 +++ utils/pdftops.cc | 3 +++ utils/pdftotext.cc | 3 +++ - 69 files changed, 207 insertions(+), 0 deletions(-) + 69 files changed, 207 insertions(+) commit 8670bfed7900586725b30e3af67f6849acc6efda Author: Vasile Gaburici @@ -19486,7 +25743,7 @@ See bug 16999 for more info utils/ImageOutputDev.cc | 12 +++++++++++- - 1 files changed, 11 insertions(+), 1 deletions(-) + 1 file changed, 11 insertions(+), 1 deletion(-) commit 1c98f197664b1a2c06e2caf32116a8487f4054bf Author: Vasile Gaburici @@ -19497,7 +25754,7 @@ See bug 17321 for a more in depth explanation poppler/CharCodeToUnicode.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 8f1deb3f8000bdeb845a6c786a654bc7eb684f0a Author: Albert Astals Cid @@ -19506,14 +25763,14 @@ Are we a lib or aren't we? Unify String to Date parsing so we all behave the same way - CMakeLists.txt | 2 + + CMakeLists.txt | 2 ++ glib/poppler-document.cc | 29 ++-------------- poppler/DateInfo.cc | 62 +++++++++++++++++++++++++++++++++++ poppler/DateInfo.h | 27 +++++++++++++++ - poppler/Makefile.am | 2 + - qt/poppler-document.cc | 22 +----------- - qt4/src/poppler-annotation-helper.h | 16 +-------- + poppler/Makefile.am | 2 ++ + qt/poppler-document.cc | 22 ++----------- + qt4/src/poppler-annotation-helper.h | 16 ++------- qt4/src/poppler-document.cc | 52 +++-------------------------- utils/pdfinfo.cc | 16 ++------- utils/pdftohtml.cc | 9 ++--- @@ -19526,7 +25783,7 @@ Add a readme for contributors with licensing and misc info README.contributors | 20 ++++++++++++++++++++ - 1 files changed, 20 insertions(+), 0 deletions(-) + 1 file changed, 20 insertions(+) commit 35a72590ffd3284e63601af79599e5fa025e567f Author: Albert Astals Cid @@ -19538,7 +25795,7 @@ 10 MB in size is a font of 3200x3200, huge enough to be discarted poppler/SplashOutputDev.cc | 20 +++++++++++++++++++- - 1 files changed, 19 insertions(+), 1 deletions(-) + 1 file changed, 19 insertions(+), 1 deletion(-) commit 33727cf6773b12d736ba245fdd146559ce93102d Author: Albert Astals Cid @@ -19547,7 +25804,7 @@ fix location of the comment fofi/FoFiType1.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit abe29b4fdb33f449649fdea5d7af2deeb702f0bb Author: Albert Astals Cid @@ -19561,7 +25818,7 @@ fofi/FoFiTrueType.h | 3 +++ fofi/FoFiType1.cc | 3 +++ fofi/FoFiType1C.h | 3 +++ - 5 files changed, 15 insertions(+), 0 deletions(-) + 5 files changed, 15 insertions(+) commit 6346d7050a03935c71336c65d5f8f0fe2860d321 Author: Albert Astals Cid @@ -19576,7 +25833,7 @@ goo/gfile.h | 3 +++ goo/gmem.cc | 3 +++ goo/gmem.h | 3 +++ - 6 files changed, 18 insertions(+), 0 deletions(-) + 6 files changed, 18 insertions(+) commit d6e1f1fb4e83527d3ece51d98fa20262713b7da1 Author: Albert Astals Cid @@ -19585,7 +25842,7 @@ .cc -> .h poppler/FontInfo.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9f0ac70f7ad806cadce379d4fabb90eff697ad52 Author: Albert Astals Cid @@ -19615,7 +25872,7 @@ qt4/src/poppler-movie.cc | 14 ++++++++++++++ qt4/src/poppler-qt4.h | 20 ++++++++++++++++++++ - 2 files changed, 34 insertions(+), 0 deletions(-) + 2 files changed, 34 insertions(+) commit c444c652859b6e52160e5571e84f8eb1292d65f1 Author: Pino Toscano @@ -19624,7 +25881,7 @@ [Qt4] make the MovieObject ctor private, with only Page able to use it qt4/src/poppler-qt4.h | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) + 1 file changed, 5 insertions(+), 4 deletions(-) commit 6d6913a79779769ce0fe2f0b516a90a50e51b947 Author: Albert Astals Cid @@ -19845,7 +26102,7 @@ required in all cases utils/pdftops.1 | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 48a73cc709a8bed9d2d0f9cbd2a9d2b6c0dad05b Author: Pino Toscano @@ -19854,7 +26111,7 @@ [Qt4] convert the title of movie annotations qt4/src/poppler-page.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 419ec15ac825f2e0052b411462f00ac57fed030e Author: Pino Toscano @@ -19864,7 +26121,7 @@ qt4/src/poppler-annotation.cc | 13 +++++++++++++ qt4/src/poppler-annotation.h | 3 +++ - 2 files changed, 16 insertions(+), 0 deletions(-) + 2 files changed, 16 insertions(+) commit 63bcaf113fcb5a4a9e5c120df2c3dafb2977c90a Author: Pino Toscano @@ -19873,7 +26130,7 @@ [Qt4] convert the movie annotation from the core type to the Qt4 one qt4/src/poppler-page.cc | 18 +++++++++++++++--- - 1 files changed, 15 insertions(+), 3 deletions(-) + 1 file changed, 15 insertions(+), 3 deletions(-) commit 5cc490de74af12726bdeb9b5a6a0f0d1d79383b5 Author: Pino Toscano @@ -19886,7 +26143,7 @@ qt4/src/poppler-annotation.cc | 74 +++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-annotation.h | 26 ++++++++++++++- - 2 files changed, 99 insertions(+), 1 deletions(-) + 2 files changed, 99 insertions(+), 1 deletion(-) commit 3d5c2e22d790d7c139e1cd28aebb21cfe76b8b6b Author: Pino Toscano @@ -19896,7 +26153,7 @@ qt4/src/CMakeLists.txt | 1 + qt4/src/Makefile.am | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 599698a9b133999f1f0bb0548489111e9d7b6f05 Author: Pino Toscano @@ -19909,7 +26166,7 @@ qt4/src/poppler-movie.cc | 73 ++++++++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-qt4.h | 34 +++++++++++++++++++++ - 2 files changed, 107 insertions(+), 0 deletions(-) + 2 files changed, 107 insertions(+) commit 820f15009845870701e1f4e7f4fc4fb93312ab3e Author: Pino Toscano @@ -19923,7 +26180,7 @@ is valid before either doing a "smart copy" or "postprocessing" it poppler/Movie.cc | 14 ++++++++------ - 1 files changed, 8 insertions(+), 6 deletions(-) + 1 file changed, 8 insertions(+), 6 deletions(-) commit c3a006ae35250e9a5638c2ce713b7470380751c7 Author: Pino Toscano @@ -19932,7 +26189,7 @@ compile attachments.c in the demo with cmake as well glib/demo/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b5a7987a50b3d28fbfa219e2cef85b9e53aaf079 Author: Carlos Garcia Campos @@ -19942,7 +26199,7 @@ attachments glib/demo/attachments.c | 27 ++++++++++++++++++++------- - 1 files changed, 20 insertions(+), 7 deletions(-) + 1 file changed, 20 insertions(+), 7 deletions(-) commit a2b0aefedbdb20ce0ef8398a700202021fcf00db Author: Carlos Garcia Campos @@ -19951,7 +26208,7 @@ [glib-demo] Fix typo glib/demo/attachments.c | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 9e563d6d877624b1caf82ac30c5ae30a1eb48f21 Author: Carlos Garcia Campos @@ -19961,7 +26218,7 @@ glib/demo/attachments.c | 101 +++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 101 insertions(+), 0 deletions(-) + 1 file changed, 101 insertions(+) commit e233325e6f13d8b232bf68a2812fe755e7fccd4d Author: Carlos Garcia Campos @@ -19976,7 +26233,7 @@ glib/demo/main.c | 4 +- glib/demo/utils.c | 23 +++++ glib/demo/utils.h | 1 + - 6 files changed, 302 insertions(+), 1 deletions(-) + 6 files changed, 302 insertions(+), 1 deletion(-) commit 0e2efa0fce5bf059ce85d3e3bec2293b405ec3c9 Author: Carlos Garcia Campos @@ -19985,7 +26242,7 @@ [glib] Make sure name and descripction are valid utf8 strings glib/poppler-attachment.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 15a73704ab6b009ca5e07c08f0b12d970adc387d Author: Chris Wilson @@ -20001,7 +26258,7 @@ was still being held by the unfreed cairo_t). poppler/CairoOutputDev.cc | 11 ++++++++--- - 1 files changed, 8 insertions(+), 3 deletions(-) + 1 file changed, 8 insertions(+), 3 deletions(-) commit d3110e392097db54e9ee59300213e490dee39126 Author: Albert Astals Cid @@ -20035,7 +26292,7 @@ widgets coordinates qt4/src/poppler-form.cc | 12 +++++++++--- - 1 files changed, 9 insertions(+), 3 deletions(-) + 1 file changed, 9 insertions(+), 3 deletions(-) commit 2e7b0eb4af8cf5938833e5659d01b77096e7b7f7 Author: Pino Toscano @@ -20045,7 +26302,7 @@ qt4/src/poppler-form.cc | 19 +++++++++++++++++++ qt4/src/poppler-form.h | 8 ++++++++ - 2 files changed, 27 insertions(+), 0 deletions(-) + 2 files changed, 27 insertions(+) commit f9e679adbd6830da26eb9909bcb16e3bdf0da6b4 Author: Pino Toscano @@ -20055,7 +26312,7 @@ qt4/src/poppler-page-private.h | 2 ++ qt4/src/poppler-page.cc | 5 +++++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit a6ecc864ea3e94d7232cff6a2e8f49919d8f24ff Author: Albert Astals Cid @@ -20064,7 +26321,7 @@ initialize widget, fixes crash on EC2006.pdf poppler/Annot.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 123a87aff2e35b10efe6a1d715585b427e4a9afa Author: Albert Astals Cid @@ -20090,7 +26347,7 @@ the splash renderer fofi/FoFiTrueType.cc | 8 +++++++- - 1 files changed, 7 insertions(+), 1 deletions(-) + 1 file changed, 7 insertions(+), 1 deletion(-) commit d322720428fa416b7d5f23acc72d1d4b4f74d041 Author: Albert Astals Cid @@ -20099,7 +26356,7 @@ Report an error when FoFiTrueType::load or FoFiTrueType::make fail poppler/SplashOutputDev.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 901ebc84ff7c0872c3f9f5e6eaf418ba6400fa10 Author: Pino Toscano @@ -20112,7 +26369,7 @@ not red,green,blue. qt4/src/poppler-private.h | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 66b34c78943be598778a3ef438b0cefac668c6a2 Author: Albert Astals Cid @@ -20123,7 +26380,7 @@ That was included erroneously when the file writing code was added poppler/Stream.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit fd8d71ea8b12393201ece9c09372fd69c7573025 Author: Albert Astals Cid @@ -20134,7 +26391,7 @@ msvc/poppler/poppler-config.h | 30 ------------------------------ poppler-config.h.cmake | 30 ------------------------------ poppler/poppler-config.h.in | 30 ------------------------------ - 3 files changed, 0 insertions(+), 90 deletions(-) + 3 files changed, 90 deletions(-) commit 391b5d5cdd9f63fe90229f88cdad628fb63c0206 Author: Albert Astals Cid @@ -20168,7 +26425,7 @@ poppler/GlobalParams.cc | 19 +++++++++++++++++++ poppler/GlobalParams.h | 2 ++ - 2 files changed, 21 insertions(+), 0 deletions(-) + 2 files changed, 21 insertions(+) commit 9fd34443d765ccd61864d18bceadc049d905b957 Author: Albert Astals Cid @@ -20179,7 +26436,7 @@ msvc/poppler/poppler-config.h | 4 ---- poppler-config.h.cmake | 4 ---- poppler/poppler-config.h.in | 4 ---- - 3 files changed, 0 insertions(+), 12 deletions(-) + 3 files changed, 12 deletions(-) commit 0f13013dc3079915572b6b002dac8d01d2dbde04 Author: Albert Astals Cid @@ -20190,7 +26447,7 @@ msvc/poppler/poppler-config.h | 25 ------------------------- poppler-config.h.cmake | 25 ------------------------- poppler/poppler-config.h.in | 25 ------------------------- - 3 files changed, 0 insertions(+), 75 deletions(-) + 3 files changed, 75 deletions(-) commit 96392667d1331d2f8750f27c116e34bbf9282dca Author: Albert Astals Cid @@ -20202,7 +26459,7 @@ qt4/src/poppler-fontinfo.cc | 5 +++++ qt4/src/poppler-private.h | 7 +++++++ qt4/src/poppler-qt4.h | 5 +++++ - 3 files changed, 17 insertions(+), 0 deletions(-) + 3 files changed, 17 insertions(+) commit 9fd1077e63d97a316380b8df4821bf4c9434fb52 Author: Albert Astals Cid @@ -20211,7 +26468,7 @@ Build with cmake too utils/CMakeLists.txt | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit d8d6a3f46620d45c279b7ca1a4a2fa3a36285cde Author: Albert Astals Cid @@ -20247,7 +26504,7 @@ Fix ActualText string length check in TextOutputDev.cc poppler/TextOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 21bbdc9d663995336900f1ce97cf294f04464e01 Author: Boris Toloknov @@ -20255,9 +26512,9 @@ make xml output valid xml - utils/HtmlLinks.cc | 33 +++++++++++++++++- + utils/HtmlLinks.cc | 33 +++++++++++++++++-- utils/HtmlOutputDev.cc | 85 - ++++++++++++++++++++++++++++++----------------- + ++++++++++++++++++++++++++++++------------------ 2 files changed, 85 insertions(+), 33 deletions(-) commit dccfc4c2910b47a77cd7b6019d9365f1684ffd0c @@ -20269,7 +26526,7 @@ See bug 16592 to cases where this helps utils/HtmlOutputDev.cc | 14 ++++++++++++-- - 1 files changed, 12 insertions(+), 2 deletions(-) + 1 file changed, 12 insertions(+), 2 deletions(-) commit 0fd5a3db1ddad447d44b64eff9abfb077a7853a0 Author: Boris Toloknov @@ -20279,7 +26536,7 @@ utils/HtmlFonts.cc | 2 ++ utils/HtmlOutputDev.cc | 2 +- - 2 files changed, 3 insertions(+), 1 deletions(-) + 2 files changed, 3 insertions(+), 1 deletion(-) commit 650c73fa0f570f699d907e33060fb23290940b42 Author: Albert Astals Cid @@ -20288,7 +26545,7 @@ findDest crashes on null goostrings so rework the ifs a bit utils/HtmlOutputDev.cc | 16 +++++++++------- - 1 files changed, 9 insertions(+), 7 deletions(-) + 1 file changed, 9 insertions(+), 7 deletions(-) commit adee9c0e9e8b2de20309b3ae6eb8e6d6ed05cf85 Author: Albert Astals Cid @@ -20297,7 +26554,7 @@ We are not storing the ctu, so decref and leak-- :-) poppler/Annot.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit e7b3e3ae3080bd6f239f7d96761729ad30b075ae Author: Albert Astals Cid @@ -20306,7 +26563,7 @@ Fix leak qt4/src/poppler-form.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 006b974d4faae53e6bd51a4281dd923ab1c2d4e8 Author: Albert Astals Cid @@ -20315,7 +26572,7 @@ Fix memory leak poppler/Annot.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 3a549d75acceedfa25dcf79074d0cdfb643c746e Author: Albert Astals Cid @@ -20324,7 +26581,7 @@ Free the previous modified object in case it exists poppler/XRef.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 040d244b97a554342061c777a286e99dbb9acabd Author: Albert Astals Cid @@ -20333,7 +26590,7 @@ Need this or otherwise it crashes on complete overwrite poppler/PDFDoc.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 11ebceeef938a7e6fa9b5437e65b5b4b822f3018 Author: Albert Astals Cid @@ -20346,9 +26603,9 @@ - Update gen to 0 when resizing entries - On XRef::add correctly initialize all newly allocated entries - poppler/PDFDoc.cc | 4 +- + poppler/PDFDoc.cc | 4 ++-- poppler/XRef.cc | 57 - ++++++++++++++++++++++++++++++++++++++++++---------- + ++++++++++++++++++++++++++++++++++++++++++----------- poppler/XRef.h | 2 +- 3 files changed, 49 insertions(+), 14 deletions(-) @@ -20359,7 +26616,7 @@ Fix XRef::writeToFile after my change poppler/XRef.cc | 10 +++------- - 1 files changed, 3 insertions(+), 7 deletions(-) + 1 file changed, 3 insertions(+), 7 deletions(-) commit 136fa97576f2df0d7a7563b34651ca222927ea57 Author: Albert Astals Cid @@ -20379,7 +26636,7 @@ poppler/XRef.cc poppler/XRef.cc | 70 - +++++++++++++++++++----------------------------------- + ++++++++++++++++++++----------------------------------- poppler/XRef.h | 1 - 2 files changed, 25 insertions(+), 46 deletions(-) @@ -20391,7 +26648,7 @@ and changeZoom poppler/Link.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 8dc7afaeea08183de331ecfd41ce1971e7772fd0 Author: Albert Astals Cid @@ -20415,7 +26672,7 @@ Fixes bug 16579 glib/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3696025977fd345b12767f75a2de6ed7e9467365 Author: Pino Toscano @@ -20426,7 +26683,7 @@ is not a valid object poppler/Page.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 0189ff8b86de18486f7397076f7a0fbf133a1a33 Author: Albert Astals Cid @@ -20438,7 +26695,7 @@ Fixes bug 16579 poppler/Page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bd77dcdd5220d63934f4b3e78d85a936947a53d Author: Albert Astals Cid @@ -20447,7 +26704,7 @@ forgot about we use autofoo too qt4/tests/Makefile.am | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 5ed2503003d973b5461594af15485af49591451d Author: Albert Astals Cid @@ -20457,7 +26714,7 @@ qt4/tests/CMakeLists.txt | 1 + qt4/tests/check_actualtext.cpp | 33 +++++++++++++++++++++++++++++++++ - 2 files changed, 34 insertions(+), 0 deletions(-) + 2 files changed, 34 insertions(+) commit f3bb2eb556f5248242f6db85052ef045fcb697c6 Author: Albert Astals Cid @@ -20466,7 +26723,7 @@ Unbreak ActualText extraction poppler/Gfx.cc | 10 +--------- - 1 files changed, 1 insertions(+), 9 deletions(-) + 1 file changed, 1 insertion(+), 9 deletions(-) commit 9e9543b105b39f8b0048c00fc94741e43ad615e9 Author: Pino Toscano @@ -20475,7 +26732,7 @@ use FindPackageHandleStandardArgs cmake/modules/FindLIBOPENJPEG.cmake | 11 ++--------- - 1 files changed, 2 insertions(+), 9 deletions(-) + 1 file changed, 2 insertions(+), 9 deletions(-) commit fec41ceddebe194f139bcc5b2f3fa74e7d1ae502 Author: Pino Toscano @@ -20485,7 +26742,7 @@ libopenjpeg was found or not CMakeLists.txt | 18 +++++++++--------- - 1 files changed, 9 insertions(+), 9 deletions(-) + 1 file changed, 9 insertions(+), 9 deletions(-) commit 5498d93e59a0b79e5add3dc6181d5e98ba689217 Author: Michael Vrable @@ -20535,7 +26792,7 @@ existing file, the contents beyond what we wrote were still there qt4/src/poppler-base-converter.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9810fdfc54aac80aa99561a9d820d11b062e4637 Author: Albert Astals Cid @@ -20544,7 +26801,7 @@ the entry is not updated here either, fix uninitialized variable use poppler/XRef.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 2da15db4751d3cb93d40b48e348dbc51f6e7a29f Author: Carlos Garcia Campos @@ -20591,7 +26848,7 @@ poppler-page-transition.h is here now qt4/src/Doxyfile | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2affed0fc97b958ae46f531c471a3cf0b04c0f55 Author: Albert Astals Cid @@ -20601,7 +26858,7 @@ different from default one configure.ac | 20 +++++++++++++++++--- - 1 files changed, 17 insertions(+), 3 deletions(-) + 1 file changed, 17 insertions(+), 3 deletions(-) commit 8e74bc612cb4102891324ffdbfcdb47293ecb95e Author: Albert Astals Cid @@ -20610,7 +26867,7 @@ Warn the user if he does not have any enabled rendering backend configure.ac | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 99d2361032cbaafd69bd796170757ed6482f208d Author: Albert Astals Cid @@ -20623,12 +26880,12 @@ http://lists.freedesktop.org/archives/poppler/2008-June/003874.html for more information - CMakeLists.txt | 30 ++++++- + CMakeLists.txt | 30 +++++- cmake/modules/FindLIBOPENJPEG.cmake | 44 +++++++++ configure.ac | 33 +++++++ poppler/JPEG2000Stream.cc | 181 +++++++++++++++++++++++++++++++++++ - poppler/JPEG2000Stream.h | 48 +++++++++ + poppler/JPEG2000Stream.h | 48 ++++++++++ poppler/Makefile.am | 22 ++++- poppler/Stream.cc | 7 +- 7 files changed, 360 insertions(+), 5 deletions(-) @@ -20643,7 +26900,7 @@ qt4/src/poppler-document.cc | 23 +++++++++++++++++++++++ qt4/src/poppler-private.h | 3 +++ qt4/src/poppler-qt4.h | 5 +++++ - 3 files changed, 31 insertions(+), 0 deletions(-) + 3 files changed, 31 insertions(+) commit 184292ffb8fef5aa5a72bdbfcc0c95b663f452bd Author: Albert Astals Cid @@ -20653,7 +26910,7 @@ poppler/FontInfo.cc | 2 +- poppler/FontInfo.h | 3 +++ - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit 86b7e8a3bee74c5b89c451137cf9c2758ba6913f Author: Adrian Johnson @@ -20663,7 +26920,7 @@ poppler/CairoOutputDev.cc | 3 +++ poppler/CairoOutputDev.h | 2 +- - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit 99e2d95728f41c91ab59a01c62d82b19a7a2e083 Author: Adrian Johnson @@ -20672,7 +26929,7 @@ glib: save/restore cairo state when rendering a page glib/poppler-page.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 6f40ee4af6b59f9d2c326adc8d2574e45f4d4d29 Author: Albert Astals Cid @@ -20693,7 +26950,7 @@ Fix leak on ABWOutputDev.cc poppler/ABWOutputDev.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 979ef1cafa968d776a2b804ce555b11212212397 Author: Koji Otani @@ -20703,7 +26960,7 @@ poppler/TextOutputDev.cc | 19 ++++++++++++++++++- poppler/UTF8.h | 14 ++++++++++++++ - 2 files changed, 32 insertions(+), 1 deletions(-) + 2 files changed, 32 insertions(+), 1 deletion(-) commit 1614ab3036cf25c9b94967163996678d386ce0ac Author: Albert Astals Cid @@ -20711,14 +26968,14 @@ Do not limit CharCodeToUnicodeString to 8 characters - poppler/Annot.cc | 10 ++++---- - poppler/CharCodeToUnicode.cc | 37 ++++++++++++++++++++--------------- + poppler/Annot.cc | 10 +++++----- + poppler/CharCodeToUnicode.cc | 37 ++++++++++++++++++++---------------- poppler/CharCodeToUnicode.h | 2 +- - poppler/Gfx.cc | 8 +++--- + poppler/Gfx.cc | 8 ++++---- poppler/GfxFont.cc | 43 - +++++++++++++++++++++++------------------ - poppler/GfxFont.h | 6 ++-- - poppler/PSOutputDev.cc | 4 +- + +++++++++++++++++++++++------------------- + poppler/GfxFont.h | 6 +++--- + poppler/PSOutputDev.cc | 4 ++-- 7 files changed, 60 insertions(+), 50 deletions(-) commit bf95c6970dacaa62512de858cf60ff6cf0c1bf7c @@ -20728,7 +26985,7 @@ [Qt] Fix leak when calling Poppler::Document::scanForFonts qt/poppler-document.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d21d7271fc74ab78cd157549138d0027cf179471 Author: Albert Astals Cid @@ -20737,7 +26994,7 @@ Make sure file exists before printing it utils/HtmlOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0480a788c0f25af1bc09360b599debb37f831e10 Author: Albert Astals Cid @@ -20746,7 +27003,7 @@ require gthread-2.0 cmake/modules/FindGTK.cmake | 9 +++++---- - 1 files changed, 5 insertions(+), 4 deletions(-) + 1 file changed, 5 insertions(+), 4 deletions(-) commit 2e40ef652eb9fca7fe947acb2adfecc96ad3c50e Author: Albert Astals Cid @@ -20755,7 +27012,7 @@ Do not shadow a paramer with a local variable name qt4/src/poppler-page.cc | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 1fd856aa1fb48869111e5b86f263bfd94fa7af17 Author: Albert Astals Cid @@ -20764,7 +27021,7 @@ Do not leak tSplash if transpGroupStack->blendingColorSpace is NULL poppler/SplashOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 492209ec8648342a3a5447611f3f1ce63b63e8e9 Author: Albert Astals Cid @@ -20774,7 +27031,7 @@ of uninitialized data due to my previous patch poppler/Page.cc | 16 ++++++---------- - 1 files changed, 6 insertions(+), 10 deletions(-) + 1 file changed, 6 insertions(+), 10 deletions(-) commit 79ab8cceb318f3bb5ebad431824e3ae593aea340 Author: Albert Astals Cid @@ -20783,7 +27040,7 @@ Do not leak memory if data_out is NULL poppler/Page.cc | 35 ++++++++++++++++++----------------- - 1 files changed, 18 insertions(+), 17 deletions(-) + 1 file changed, 18 insertions(+), 17 deletions(-) commit f44c33344d4af31ee008826179bcd92db445f35a Author: Carlos Garcia Campos @@ -20805,7 +27062,7 @@ than previous code so it's and improvement qt4/src/poppler-page.cc | 6 +----- - 1 files changed, 1 insertions(+), 5 deletions(-) + 1 file changed, 1 insertion(+), 5 deletions(-) commit e3e4113c73128f49f99289b592446d4382b5d65c Author: Albert Astals Cid @@ -20816,7 +27073,7 @@ Needed by some reader using poppler internals, bad you! poppler/TextOutputDev.h | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit ff699e64bd1de78915aad4ddb79d6f529aef2b87 Author: Albert Astals Cid @@ -20827,7 +27084,7 @@ Fixes crash http://bugs.freedesktop.org/show_bug.cgi?id=15899 poppler/OptionalContent.cc | 33 ++++++++++++++++++--------------- - 1 files changed, 18 insertions(+), 15 deletions(-) + 1 file changed, 18 insertions(+), 15 deletions(-) commit ac26ba5148b99a03a56e37ba201ad420b8619943 Author: Albert Astals Cid @@ -20836,7 +27093,7 @@ Do not crash on unlock with wrong password qt/poppler-private.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 19ec5a531cb03a7bee1cfcc9c7d5c4390fbd069d Author: Albert Astals Cid @@ -20845,7 +27102,7 @@ Fix build with --enable-fixedpoint splash/Splash.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 1cf5f0fda542efef575a123622637d81b9c42053 Author: Albert Astals Cid @@ -20854,7 +27111,7 @@ [Qt] Fix Document::unlock qt/poppler-document.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit b5041924eb023cc095f2445935ff713cf65dacce Author: Pino Toscano @@ -20863,7 +27120,7 @@ do not delete the GooString owned by an Object poppler/Annot.cc | 4 ---- - 1 files changed, 0 insertions(+), 4 deletions(-) + 1 file changed, 4 deletions(-) commit 546a7b700862db00240de9fd50bdba1dd347765b Author: Albert Astals Cid @@ -20874,7 +27131,7 @@ poppler/Annot.cc | 6 ++++++ poppler/ArthurOutputDev.cc | 1 + poppler/JBIG2Stream.cc | 1 + - 3 files changed, 8 insertions(+), 0 deletions(-) + 3 files changed, 8 insertions(+) commit 914f1b1d814ab3d958aa0ca21ad73ef5aed20b89 Author: Albert Astals Cid @@ -20884,7 +27141,7 @@ accessing the widget member poppler/Annot.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit c907e41ab18dda10cd3c9789bd0e7fe71b6402a8 Author: Albert Astals Cid @@ -20893,7 +27150,7 @@ findSegment can return NULL check for it poppler/JBIG2Stream.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 8b7f29b577bca3295e99fea4a5cf4a6bb7ba2617 Author: Albert Astals Cid @@ -20902,7 +27159,7 @@ new[] implies delete[] poppler/ABWOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 926c13825d5f7364286975db8ffa507b92f4b3ab Author: Albert Astals Cid @@ -20911,7 +27168,7 @@ add lost return when adding kees patch poppler/Object.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ba9283f6bc78e97006e52ef5de20c958ee9e1a37 Author: Albert Astals Cid @@ -20920,7 +27177,7 @@ make the function static utils/pdftoppm.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 931a8272f556ba8a35342f0c5bf53bdb57ea7a31 Author: Albert Astals Cid @@ -20929,7 +27186,7 @@ make the variable static utils/pdftoabw.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1887d2910d2006c7fc3ecc95db0150f1537e9d0a Author: Albert Astals Cid @@ -20972,7 +27229,7 @@ add static poppler/XRef.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 7333bc913111e56ee241b7ef2bf6e9fea68b7da2 Author: Albert Astals Cid @@ -20981,7 +27238,7 @@ add static poppler/JBIG2Stream.cc | 30 +++++++++++++++--------------- - 1 files changed, 15 insertions(+), 15 deletions(-) + 1 file changed, 15 insertions(+), 15 deletions(-) commit 1ea36507f9c9f163b6772268046e7560d0c00dbc Author: Albert Astals Cid @@ -20990,7 +27247,7 @@ make findModifier static poppler/GlobalParams.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit be9961571dbfabb982e6f69abd3bbc98fa971864 Author: Albert Astals Cid @@ -20999,7 +27256,7 @@ make variables not used outside static utils/pdftohtml.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit b157064a85350da6ea9c4f46e965e45ebc59d227 Author: Albert Astals Cid @@ -21008,7 +27265,7 @@ constify setPSPaperSize utils/pdftops.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ee57ead8a6f34fa8de044399e5912395e0f3a425 Author: Albert Astals Cid @@ -21039,7 +27296,7 @@ Makes my release build 64 bytes smaller poppler/Function.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 29e3e779c68371b7c4aadcf68ee0712046f39c6d Author: Pino Toscano @@ -21048,7 +27305,7 @@ remember to call the base implementation here qt4/demos/optcontent.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit a188f3cd36775d78ace5b5d62c8ab7c059b3b2b1 Author: Pino Toscano @@ -21057,7 +27314,7 @@ reset the current page to 0, when closing a document qt4/demos/viewer.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 7eca6da6436ffc1c41cfed1a07be4dafa1172463 Author: Pino Toscano @@ -21067,7 +27324,7 @@ by the document anyway qt4/demos/optcontent.cpp | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 6cddda7f3c3b8ddb95e6aba1b234a27c4454c23d Author: Pino Toscano @@ -21076,8 +27333,8 @@ sync updateFont() with SplashOutputDev poppler/ArthurOutputDev.cc | 75 - ++++++++++++++++++++++++++++++++++--------- - 1 files changed, 59 insertions(+), 16 deletions(-) + ++++++++++++++++++++++++++++++++++---------- + 1 file changed, 59 insertions(+), 16 deletions(-) commit ddc7c1f8c24762bae615e7dec92e92a58c827478 Author: Pino Toscano @@ -21086,7 +27343,7 @@ construct AnnotPolygon for Polygon and PolyLine annotations poppler/Annot.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit f9c7e8037b7165b6271ce7aea0d315053c4d66a5 Merge: 59d33d8 f5fec4f @@ -21103,7 +27360,7 @@ use the base implementation to update all the states poppler/ArthurOutputDev.cc | 11 +---------- - 1 files changed, 1 insertions(+), 10 deletions(-) + 1 file changed, 1 insertion(+), 10 deletions(-) commit 45d2a9529bf241554c59437118cb8c705554dc27 Author: Pino Toscano @@ -21113,7 +27370,7 @@ global settings. poppler/ArthurOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5faa72fd70e0d85268e807a8b870d80dda9189a9 Author: Pino Toscano @@ -21122,7 +27379,7 @@ Get the font and painter matrices, and reenable the font drawing. poppler/ArthurOutputDev.cc | 28 +++++++++++++++++++++------- - 1 files changed, 21 insertions(+), 7 deletions(-) + 1 file changed, 21 insertions(+), 7 deletions(-) commit f5fec4fdedd8d316b19968545e447e2036a1bb47 Author: Kees Cook @@ -21131,8 +27388,8 @@ provide type-checking for union pointer accesses poppler/Object.h | 68 - ++++++++++++++++++++++++++++++++++------------------- - 1 files changed, 43 insertions(+), 25 deletions(-) + ++++++++++++++++++++++++++++++++++-------------------- + 1 file changed, 43 insertions(+), 25 deletions(-) commit a567c921ce538616f4ba0b7933086ef5a8ab0f55 Author: Iñigo Martínez @@ -21144,7 +27401,7 @@ Signed-off-by: Iñigo Martínez poppler/Annot.cc | 19 ++++++++++--------- - 1 files changed, 10 insertions(+), 9 deletions(-) + 1 file changed, 10 insertions(+), 9 deletions(-) commit 73798c95b8a4c0504e9246e6f73fd31f812ad6fa Author: Albert Astals Cid @@ -21158,7 +27415,7 @@ m4/acx_pthread.m4 | 280 +++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Makefile.am | 4 + - 3 files changed, 286 insertions(+), 0 deletions(-) + 3 files changed, 286 insertions(+) commit 6c248bdad77235a45402d9693a0b822cc208b6b9 Author: Pino Toscano @@ -21167,7 +27424,7 @@ the dtor should be virtual qt4/src/poppler-converter-private.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 68dba1a452ca70add5b05ab8e2adab838bc2cb73 Author: Albert Astals Cid @@ -21176,7 +27433,7 @@ if ncand is a Guint cand should be one too poppler/CMap.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0b91eb19f5a3d07b625ee5188f1fcb4b4b1544ea Author: Albert Astals Cid @@ -21185,7 +27442,7 @@ Unused var-- poppler/GfxFont.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ed3cc40987b691319fd9f1a30296d80de5732fd Author: Pino Toscano @@ -21194,7 +27451,7 @@ fix border style conversion qt4/src/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 7c8feb4e3627bde2052a7e536d2d49d1cbbce8ee Author: Albert Astals Cid @@ -21208,7 +27465,7 @@ poppler/GfxState.cc | 6 ++++++ poppler/Stream.cc | 9 +++++++++ - 2 files changed, 15 insertions(+), 0 deletions(-) + 2 files changed, 15 insertions(+) commit f338a9ded5d42dd65853c5c7bbe27f6724096416 Author: Pino Toscano @@ -21217,7 +27474,7 @@ [Qt4] convert the sound annotations qt4/src/poppler-page.cc | 16 ++++++++++++++-- - 1 files changed, 14 insertions(+), 2 deletions(-) + 1 file changed, 14 insertions(+), 2 deletions(-) commit 733d51fca04ee682fed2242f868edd545f3755fa Author: Pino Toscano @@ -21227,8 +27484,8 @@ qt4/src/poppler-annotation.cc | 87 +++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-annotation.h | 30 ++++++++++++++- - 2 files changed, 116 insertions(+), 1 deletions(-) + qt4/src/poppler-annotation.h | 30 +++++++++++++- + 2 files changed, 116 insertions(+), 1 deletion(-) commit feb1ea091111bd7292879c465590acfd7671c876 Author: Pino Toscano @@ -21238,7 +27495,7 @@ poppler/Annot.cc | 37 ++++++++++++++++++++++++++++++++++++- poppler/Annot.h | 26 ++++++++++++++++++++++++++ - 2 files changed, 62 insertions(+), 1 deletions(-) + 2 files changed, 62 insertions(+), 1 deletion(-) commit ec2cf81edf1b2c6707de4d30316ff5f5e24534d4 Author: Pino Toscano @@ -21247,7 +27504,7 @@ [Qt4] convert the file attachment annotations qt4/src/poppler-page.cc | 15 +++++++++++++-- - 1 files changed, 13 insertions(+), 2 deletions(-) + 1 file changed, 13 insertions(+), 2 deletions(-) commit 9fa2e96c96d365ae67859545ebd635d726784fca Author: Pino Toscano @@ -21258,7 +27515,7 @@ qt4/src/poppler-annotation.cc | 88 +++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-annotation.h | 29 +++++++++++++- - 2 files changed, 116 insertions(+), 1 deletions(-) + 2 files changed, 116 insertions(+), 1 deletion(-) commit 5899aff11f94e707654574e830e0757b1df558d4 Author: Pino Toscano @@ -21284,7 +27541,7 @@ add getters for the AnnotPolygon properties poppler/Annot.h | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 9311f75d4c3da991efb8afd00701a0ce1cbae1b0 Author: Iñigo Martínez @@ -21297,7 +27554,7 @@ poppler/Annot.cc | 99 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 37 ++++++++++++++++++++ - 2 files changed, 136 insertions(+), 0 deletions(-) + 2 files changed, 136 insertions(+) commit 01aa052ed761a4ada471d196985825986bb58627 Author: Iñigo Martínez @@ -21308,7 +27565,7 @@ Signed-off-by: Iñigo Martínez poppler/Annot.cc | 96 - +++++++++++++++++++++++++++++------------------------ + +++++++++++++++++++++++++++++------------------------- poppler/Annot.h | 4 ++- 2 files changed, 55 insertions(+), 45 deletions(-) @@ -21356,7 +27613,7 @@ properly initialize an AnnotPath poppler/Annot.cc | 9 ++------- - 1 files changed, 2 insertions(+), 7 deletions(-) + 1 file changed, 2 insertions(+), 7 deletions(-) commit a3406fb2ace1390db1c181823a7bfc66c9174d98 Author: Pino Toscano @@ -21366,7 +27623,7 @@ poppler/Annot.cc | 13 ++++++++++++- poppler/Annot.h | 1 + - 2 files changed, 13 insertions(+), 1 deletions(-) + 2 files changed, 13 insertions(+), 1 deletion(-) commit 0dad70e2d12e8b587cab8ce2d914c81c6897a1d1 Author: Pino Toscano @@ -21379,7 +27636,7 @@ - fix logic when checking for an even number of points poppler/Annot.cc | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 77404e24ea1e175fc9b55097dc5b35cc34760659 Author: Pino Toscano @@ -21388,7 +27645,7 @@ a length is an int poppler/Annot.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit bc2b2ffd2144f951c311e968fba4bc50b7c43ff3 Merge: cd5afe6 bacc1dd @@ -21419,7 +27676,7 @@ color spaces. poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit bacc1dd9f37ff19c5e54878a5b08e7d734584bbf Author: Pino Toscano @@ -21441,8 +27698,8 @@ Signed-off-by: Iñigo Martínez poppler/Annot.cc | 130 - ++++++++++++++++++++++++++++++++++++++++++++++++++--- - poppler/Annot.h | 84 +++++++++++++++++++++++++++++----- + ++++++++++++++++++++++++++++++++++++++++++++++++++---- + poppler/Annot.h | 84 +++++++++++++++++++++++++++++------ 2 files changed, 193 insertions(+), 21 deletions(-) commit 8757c577241dda31bc59c7d1c208c159ad428877 @@ -21467,8 +27724,8 @@ poppler/Annot.cc | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ - poppler/Annot.h | 45 +++++++++++++++++++++ - 2 files changed, 158 insertions(+), 0 deletions(-) + poppler/Annot.h | 45 ++++++++++++++++++++++ + 2 files changed, 158 insertions(+) commit 464b171d0e9b989196c287f2ee4dfbbc14212aa9 Author: Albert Astals Cid @@ -21490,7 +27747,7 @@ color spaces. poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 42db4890e8295aaec5a1be12d1414fc0a9048550 Author: Chris Wilson @@ -21551,7 +27808,7 @@ destroy notify of the cairo_font_face_t. poppler/CairoFontEngine.cc | 19 +++++++++---------- - 1 files changed, 9 insertions(+), 10 deletions(-) + 1 file changed, 9 insertions(+), 10 deletions(-) commit 5f60843824582ece36d806508ec388330ddee854 Author: Iñigo Martínez @@ -21561,7 +27818,8 @@ Signed-off-by: Iñigo Martínez - poppler/Annot.cc | 64 +++++++++++++++++-------------------------------- + poppler/Annot.cc | 64 + +++++++++++++++++--------------------------------- poppler/Annot.h | 69 +++++++++++++++++++++++++----------------------------- 2 files changed, 54 insertions(+), 79 deletions(-) @@ -21573,7 +27831,7 @@ add getters for the coordinates in an AnnotLine poppler/Annot.h | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 1d83d6edf9a843335e37a4d1e0e0dd71eb23d93b Author: Pino Toscano @@ -21603,7 +27861,7 @@ propetly initialise a couple of members; leak less poppler/ArthurOutputDev.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 9409de1e7c5b3770c7ef00c01ee376953dd532a5 Author: Iñigo Martínez @@ -21614,7 +27872,7 @@ Signed-off-by: Iñigo Martínez poppler/Annot.cc | 35 ++--------------------------------- - 1 files changed, 2 insertions(+), 33 deletions(-) + 1 file changed, 2 insertions(+), 33 deletions(-) commit 28c5ee2e9fc2a24d2f2efb3d74d5cf882a106239 Author: Pino Toscano @@ -21623,7 +27881,7 @@ typo fix poppler/Annot.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ed02769688466ca72bf35d4223c3822a1245604b Author: Pino Toscano @@ -21642,7 +27900,7 @@ variable forgotten in the copy&paste... qt4/src/poppler-annotation.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 4168daa141b76e5fcd07d046aca8dac2f3037ff9 Author: Pino Toscano @@ -21651,7 +27909,7 @@ [Qt4] deserialize also CaretAnnotation's qt4/src/poppler-annotation.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit b55bcc2aa95825863bef23ab96364b350a49949d Author: Pino Toscano @@ -21662,7 +27920,7 @@ qt4/src/poppler-annotation.cc | 80 +++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-annotation.h | 25 ++++++++++++- - 2 files changed, 104 insertions(+), 1 deletions(-) + 2 files changed, 104 insertions(+), 1 deletion(-) commit 4c9a02b7e49666efe10fdc16e7a03d8d520b65ec Author: Pino Toscano @@ -21672,7 +27930,7 @@ poppler/Annot.cc | 36 +++++++++++++++++++++++++++++++++++- poppler/Annot.h | 22 ++++++++++++++++++++++ - 2 files changed, 57 insertions(+), 1 deletions(-) + 2 files changed, 57 insertions(+), 1 deletion(-) commit d260fe9e514c667b66969b982119429cc922eb07 Author: Pino Toscano @@ -21683,7 +27941,7 @@ poppler/Annot.cc | 54 +++++++++++++++++++++++++++++++----------------------- - 1 files changed, 31 insertions(+), 23 deletions(-) + 1 file changed, 31 insertions(+), 23 deletions(-) commit 760833e409c122c0a61f7c87fd3133eebc10b402 Author: Pino Toscano @@ -21692,7 +27950,7 @@ First version of AnnotGeometry. poppler/Annot.cc | 77 - ++++++++++++++++++++++++++++++++++++++++++++++++++++- + ++++++++++++++++++++++++++++++++++++++++++++++++++++-- poppler/Annot.h | 24 +++++++++++++++++ 2 files changed, 99 insertions(+), 2 deletions(-) @@ -21707,7 +27965,7 @@ free the "point" object after each iteration poppler/Annot.cc | 11 ++++++++--- - 1 files changed, 8 insertions(+), 3 deletions(-) + 1 file changed, 8 insertions(+), 3 deletions(-) commit af1ffcbcec1730332d11f8da4a7ddac833b22408 Author: Pino Toscano @@ -21717,7 +27975,7 @@ use the heap) poppler/Annot.cc | 7 +++---- - 1 files changed, 3 insertions(+), 4 deletions(-) + 1 file changed, 3 insertions(+), 4 deletions(-) commit 68fd98d69bac20282665cf6b824da30c3b310f0b Author: Pino Toscano @@ -21737,7 +27995,7 @@ poppler/Annot.cc | 28 +++++++++++++++++++++++++++- poppler/Annot.h | 20 ++++++++++++++++++++ - 2 files changed, 47 insertions(+), 1 deletions(-) + 2 files changed, 47 insertions(+), 1 deletion(-) commit 97be4332818bcf58461816be995d88926809a4e5 Author: Iñigo Martínez @@ -21771,7 +28029,7 @@ FindFirstFile returns INVALID_HANDLE_VALUE and not NULL on error goo/gfile.cc | 12 ++++++------ - 1 files changed, 6 insertions(+), 6 deletions(-) + 1 file changed, 6 insertions(+), 6 deletions(-) commit be765f27cc5430d9bb2a3e113eb245d67c20a376 Author: Carlos Garcia Campos @@ -21781,7 +28039,7 @@ - 1 glib/demo/utils.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e991e9ac6fcc0b6928b96fe8326eebcf3cb720ca Author: Albert Astals Cid @@ -21790,7 +28048,7 @@ Add the export macro qt4/src/poppler-page-transition.h | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit b70ca35dce6da6efdff254c11a63de4f44228278 Author: Albert Astals Cid @@ -21815,8 +28073,8 @@ Signed-off-by: Iñigo Martínez glib/demo/annots.c | 314 - +++++++++++++++++++++++++++++++++++++++++++++++---- - 1 files changed, 289 insertions(+), 25 deletions(-) + +++++++++++++++++++++++++++++++++++++++++++++++----- + 1 file changed, 289 insertions(+), 25 deletions(-) commit 7cc8fd70f68d2cdab7ab83a0ecf6c8896c971d62 Author: Pino Toscano @@ -21826,7 +28084,7 @@ qt4/src/poppler-page.cc.orig | 1317 ------------------------------------------ - 1 files changed, 0 insertions(+), 1317 deletions(-) + 1 file changed, 1317 deletions(-) commit 7a47ff3b54678a3de6964d25050e02186484f39a Author: Pino Toscano @@ -21839,7 +28097,7 @@ qt4/src/poppler-page.cc | 7 + qt4/src/poppler-page.cc.orig | 1317 ++++++++++++++++++++++++++++++++++++++++++ - 4 files changed, 1391 insertions(+), 1 deletions(-) + 4 files changed, 1391 insertions(+), 1 deletion(-) commit a6f2c10ee01ee62ae945b50f6b6eae380377fe03 Author: Pino Toscano @@ -21849,7 +28107,7 @@ qt4/src/poppler-document.cc | 15 +++++++++++++++ qt4/src/poppler-qt4.h | 8 ++++++++ - 2 files changed, 23 insertions(+), 0 deletions(-) + 2 files changed, 23 insertions(+) commit b8a471e55b998836c09c65ff736afdef8ac55189 Author: Pino Toscano @@ -21859,7 +28117,7 @@ poppler/Link.cc | 33 +++++++++++++++++++++++++++++++++ poppler/Link.h | 23 +++++++++++++++++++++++ - 2 files changed, 56 insertions(+), 0 deletions(-) + 2 files changed, 56 insertions(+) commit 2fd85dc1b8b2ababadfc60e285c08a844737e4bb Author: Pino Toscano @@ -21869,7 +28127,7 @@ poppler/Catalog.cc | 39 +++++++++++++++++++++++++++++++++++++++ poppler/Catalog.h | 7 +++++++ - 2 files changed, 46 insertions(+), 0 deletions(-) + 2 files changed, 46 insertions(+) commit 312f14f5b7be1f0d62620477222919423c3869e0 Author: Albert Astals Cid @@ -21878,7 +28136,7 @@ compile++ fofi/FoFiBase.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5bd750062e1fb136f77a55d1f35b2d6fabaad1b3 Author: Albert Astals Cid @@ -21899,7 +28157,7 @@ fill news NEWS | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + 1 file changed, 10 insertions(+) commit 2069826d61ebd527768b6455689276c0a8288085 Author: Pino Toscano @@ -21908,7 +28166,7 @@ missing break qt4/src/poppler-page.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d6a0c6a6803a03f402c2dcde41c6195e951470ba Author: Pino Toscano @@ -21917,7 +28175,7 @@ initialize posterStream to avoid crashing later poppler/Movie.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 0be811b3ad86b1cb14be94a017e70c65b8e64730 Author: Albert Astals Cid @@ -21927,7 +28185,7 @@ the same we are already in poppler/FontInfo.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0222c6ceb0fcf1d7c4422691a68a035a558ad614 Author: Albert Astals Cid @@ -21951,7 +28209,7 @@ fix some cmake HAVE_foo CMakeLists.txt | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit 22f615aee488cc363a078330861e80f389f47061 Author: Iñigo Martínez @@ -21962,7 +28220,7 @@ Signed-off-by: Iñigo Martínez glib/poppler-annot.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit cccfe42ed9c53d27cf6a1403ae55bf34a053012d Author: Albert Astals Cid @@ -21981,7 +28239,7 @@ Fix rm line not to error if no *moc file is present qt4/demos/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit d9d52e622c6b28a9941168bb73839ec335ca7232 Author: Albert Astals Cid @@ -21990,7 +28248,7 @@ Fix configure to not require gdk when we are on try mode configure.ac | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 9b8809298dd16cdbffcc12b6db8e274578934063 Author: Albert Astals Cid @@ -21999,7 +28257,7 @@ It's really only an error if < 0 poppler/PDFDoc.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0fb1e697cc4100ce23298141c8b5829273872423 Author: Albert Astals Cid @@ -22008,7 +28266,7 @@ remove unneeded variable poppler/PDFDoc.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 3404cb626ee9b4520d6fe601e07560745a4cb42a Author: Albert Astals Cid @@ -22022,7 +28280,7 @@ poppler/Stream.h | 5 ----- qt4/src/poppler-qiodeviceoutstream-private.h | 1 - qt4/src/poppler-qiodeviceoutstream.cc | 5 ----- - 4 files changed, 0 insertions(+), 16 deletions(-) + 4 files changed, 16 deletions(-) commit 066595dd06c930997d5ec65a06c822616af9baa0 Author: Albert Astals Cid @@ -22033,7 +28291,7 @@ Fixes bug 14126 poppler/PDFDoc.cc | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit 23b6475463f8973b5ac83bb21a6b7b6000cc435b Author: Ed Avis @@ -22064,7 +28322,7 @@ [glib] Remove unused variable. glib/poppler-document.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 21fa476ac384256c15a954b708e009f2b336b06f Author: Carlos Garcia Campos @@ -22075,8 +28333,8 @@ Thanks to Kouhei Sutou who caught the problem. glib/poppler-page.cc | 60 - ++++++++++++++++++++++++++------------------ - glib/poppler-private.h | 3 -- + ++++++++++++++++++++++++++------------------- + glib/poppler-private.h | 3 --- glib/test-poppler-glib.cc | 9 ++++++- 3 files changed, 43 insertions(+), 29 deletions(-) @@ -22087,7 +28345,7 @@ poppler_annot_markup_get_opacity returns a double so use %f glib/demo/annots.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit b9a5fd4671638caa91f8a389be278d993391f499 Author: Albert Astals Cid @@ -22097,7 +28355,7 @@ glib/reference/tmpl/poppler-action.sgml | 1 + glib/reference/tmpl/poppler.sgml | 3 +++ - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit b7e0b740578ea1e84ac0ef850b5a03c66b2863e3 Author: Albert Astals Cid @@ -22106,7 +28364,7 @@ Fill 0.7.3 news NEWS | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit 3adaff1dad8127fdd06653cf49196027ad414a08 Author: Albert Astals Cid @@ -22127,7 +28385,7 @@ [glib] Update outline and links demos to the new POPPLER_ACTION_NONE glib/demo/utils.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 6a22f0a20df38156c06e8ba10649e0828a1da102 Author: Eugen Dedu @@ -22137,7 +28395,7 @@ glib/poppler-action.cc | 2 +- glib/poppler-action.h | 1 + - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit 185d5818fd546f85934b041d5b0cdcdf1849b1dc Author: Carlos Garcia Campos @@ -22156,7 +28414,7 @@ Some more free poppler/OptionalContent.cc | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit bfc308935fa138e27c4d2ad0e1c1cad20eba8e8a Author: Carlos Garcia Campos @@ -22165,7 +28423,7 @@ Use error instead of printf poppler/OptionalContent.cc | 15 ++++++++------- - 1 files changed, 8 insertions(+), 7 deletions(-) + 1 file changed, 8 insertions(+), 7 deletions(-) commit 998b1523ee653c1585f03b4a580e0d95ba694aca Author: Carlos Garcia Campos @@ -22174,7 +28432,7 @@ Some free poppler/OptionalContent.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit c65a66a82259f547927cbb918611bcf4a8e264b2 Author: Albert Astals Cid @@ -22185,7 +28443,7 @@ Fixes several warnings about writes on bad places splash/SplashXPathScanner.cc | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit bd2272f3079319d1c05ca93f7fb6eb0a5370b938 Author: Albert Astals Cid @@ -22197,7 +28455,7 @@ Fixes bug 15009 splash/Splash.cc | 12 ++++++++---- - 1 files changed, 8 insertions(+), 4 deletions(-) + 1 file changed, 8 insertions(+), 4 deletions(-) commit 5bf8d864e68854f0855e07fb67aa124e06c739cd Author: Albert Astals Cid @@ -22206,7 +28464,7 @@ fix build glib/reference/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit d0be5c86dcd3310062d820b3515c31e4720af2ca Author: Albert Astals Cid @@ -22228,7 +28486,7 @@ update soname here too glib/CMakeLists.txt | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit f5065016b168e4896e2fe774cd22bbd900849b52 Author: Carlos Garcia Campos @@ -22238,9 +28496,9 @@ Fixes bug #13719. - configure.ac | 45 +++- + configure.ac | 45 ++- glib/Makefile.am | 7 +- - glib/demo/page.c | 88 ++++++- + glib/demo/page.c | 88 +++++- glib/demo/render.c | 4 + glib/poppler-action.h | 1 - glib/poppler-annot.cc | 26 +- @@ -22273,7 +28531,7 @@ Init to false updated field of XRefEntries plus indenting fixes poppler/XRef.cc | 11 ++++++----- - 1 files changed, 6 insertions(+), 5 deletions(-) + 1 file changed, 6 insertions(+), 5 deletions(-) commit 6a671686c6265ecdb4c48f04392de9c56d4e0936 Author: Adrian Johnson @@ -22291,7 +28549,7 @@ invertable. poppler/CairoOutputDev.cc | 7 ++++--- - 1 files changed, 4 insertions(+), 3 deletions(-) + 1 file changed, 4 insertions(+), 3 deletions(-) commit 0b2c3bb25c908b07e760d824dbfe93c6051812aa Merge: 362fe01 9c472f7 @@ -22310,7 +28568,7 @@ Signed-off-by: Iñigo Martínez poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9c472f76d2462d0e775c851fdbac6ca2bc9812ea Author: Albert Astals Cid @@ -22319,7 +28577,7 @@ cmake build glib/demo/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 821858f5c36786955d9475044bfee57f5060ad2f Author: Albert Astals Cid @@ -22355,7 +28613,7 @@ +++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/annots.h | 31 ++++ glib/demo/main.c | 4 +- - 4 files changed, 504 insertions(+), 1 deletions(-) + 4 files changed, 504 insertions(+), 1 deletion(-) commit 2d6c60537317bd3ac9e0582e0da09e7365729097 Author: Pino Toscano @@ -22366,7 +28624,7 @@ qt4/src/poppler-annotation.cc | 2 ++ qt4/src/poppler-link.cc | 4 ++++ qt4/src/poppler-link.h | 2 ++ - 3 files changed, 8 insertions(+), 0 deletions(-) + 3 files changed, 8 insertions(+) commit a354f7198c493990613a1db131c662ec27948863 Author: Hugo Mercier @@ -22379,7 +28637,7 @@ poppler/Movie.cc | 443 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Movie.h | 177 ++++++++++++++++++++++ - 2 files changed, 620 insertions(+), 0 deletions(-) + 2 files changed, 620 insertions(+) commit 43e5dd941d4bc35c4eebbad66c13235639e0c1a0 Merge: aab1768 4fdd254 @@ -22396,7 +28654,7 @@ Fix build glib/poppler-page.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit aab17684dc3f21ff2b1ee6eacdc0c565d368df78 Author: Hugo Mercier @@ -22420,7 +28678,7 @@ Add poppler-annot to the cmake build system glib/CMakeLists.txt | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 19f0e3b40bce4d8157d8c8bd04eaf6bacbef38b8 Author: Iñigo Martínez @@ -22436,7 +28694,7 @@ glib/poppler-page.h | 15 + glib/poppler-private.h | 5 +- glib/poppler.h | 7 + - 7 files changed, 1151 insertions(+), 1 deletions(-) + 7 files changed, 1151 insertions(+), 1 deletion(-) commit 6fa3ab20fee311b4aff92be18870fd0e1730a81f Author: Iñigo Martínez @@ -22455,7 +28713,7 @@ And free the memory qt4/tests/test-poppler-qt4.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 58f88c23402ac2e678dc655f64d93d89bb1812be Author: Albert Astals Cid @@ -22465,8 +28723,8 @@ are correct qt4/tests/test-poppler-qt4.cpp | 45 - +++++++++++++++++++++++++++++++++++---- - 1 files changed, 40 insertions(+), 5 deletions(-) + +++++++++++++++++++++++++++++++++++----- + 1 file changed, 40 insertions(+), 5 deletions(-) commit 94ceb3cae79dc7786fa59fd889a87160780ed5df Merge: 0f9e843 35f34bd @@ -22486,7 +28744,7 @@ Fixes bug 14883 poppler/GlobalParams.cc | 17 +++++++++-------- - 1 files changed, 9 insertions(+), 8 deletions(-) + 1 file changed, 9 insertions(+), 8 deletions(-) commit 35f34bd44c74eeb76a58b30acfbb0303d7285f06 Author: Carlos Garcia Campos @@ -22495,7 +28753,7 @@ Fix build when compiling without cairo support glib/demo/images.c | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 32637db19dd80a9b8452f86eb677b10e77290627 Author: Albert Astals Cid @@ -22506,7 +28764,7 @@ Fixes bug 14583 m4/qt.m4 | 15 ++++++++++++--- - 1 files changed, 12 insertions(+), 3 deletions(-) + 1 file changed, 12 insertions(+), 3 deletions(-) commit 65a88a95a5c54c890048e8a986df361585d601dd Author: Pino Toscano @@ -22519,7 +28777,7 @@ qt4/src/poppler-embeddedfile.cc | 5 +++++ qt4/src/poppler-qt4.h | 5 +++++ qt4/tests/check_attachments.cpp | 7 +++++++ - 3 files changed, 17 insertions(+), 0 deletions(-) + 3 files changed, 17 insertions(+) commit 23da27a229c8b3cc2a0a0dd6354c40723934390c Author: Pino Toscano @@ -22538,7 +28796,7 @@ be safe about out-of-range values qt4/src/poppler-textbox.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5db75df77938eb7620867d0618058be52ed2d3cb Author: Pino Toscano @@ -22547,7 +28805,7 @@ initialize nicely qt4/src/poppler-private.h | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 3ad0ab7e4abd37528284269c69be3cdfb8d31d2e Author: Pino Toscano @@ -22557,7 +28815,7 @@ qt4/src/poppler-link.h | 17 +++++++++++++++++ qt4/src/poppler-qt4.h | 23 ++++++++++++++++++++++- - 2 files changed, 39 insertions(+), 1 deletions(-) + 2 files changed, 39 insertions(+), 1 deletion(-) commit ec01926e5a9dc16e200060497c43e79a1623698d Author: Jeff Muizelaar @@ -22569,7 +28827,7 @@ our cairo context error and turn off. Related to #14398. poppler/CairoOutputDev.cc | 14 ++++++++++++++ - 1 files changed, 14 insertions(+), 0 deletions(-) + 1 file changed, 14 insertions(+) commit 4882d7a118b93fdb5c441d70757e485be7ee25d7 Author: Pino Toscano @@ -22578,7 +28836,7 @@ printf -> qDebug qt4/src/poppler-optcontent.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 31ce4049bf12c2716be7ec0fb8eda502d989f66e Author: Brad Hards @@ -22592,7 +28850,7 @@ qt4/demos/embeddedfiles.h | 1 + qt4/demos/optcontent.cpp | 8 ++++++++ qt4/demos/optcontent.h | 1 + - 4 files changed, 17 insertions(+), 0 deletions(-) + 4 files changed, 17 insertions(+) commit ff938c431799d49325c0f46f1e6cbe1033993a83 Author: Albert Astals Cid @@ -22601,7 +28859,7 @@ do not forget to distribute GlobalParamsWin.cc next time poppler/Makefile.am | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 277382b8186d137a9f2a62bc2d22e9f0cda7d923 Author: Albert Astals Cid @@ -22610,7 +28868,7 @@ fix typo glib/demo/images.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5b2f8f21fca63508570a0c77c6f7221a322e6e57 Merge: 7e65118 4254f12 @@ -22632,9 +28890,9 @@ and in the drawing of their associated content [applying the same to their children, and so on]. - qt4/src/poppler-optcontent-private.h | 8 ++++++- + qt4/src/poppler-optcontent-private.h | 8 +++++++- qt4/src/poppler-optcontent.cc | 37 - +++++++++++++++++++++++++++++---- + +++++++++++++++++++++++++++++----- 2 files changed, 39 insertions(+), 6 deletions(-) commit 4254f1237ebed09b8e1c85f935a20bde3d8f36ff @@ -22664,7 +28922,7 @@ qt4/demos/Makefile.am | 3 +++ qt4/src/Makefile.am | 5 ++++- qt4/tests/Makefile.am | 3 +++ - 3 files changed, 10 insertions(+), 1 deletions(-) + 3 files changed, 10 insertions(+), 1 deletion(-) commit 344d55539b1b6bcabec609fd828db372a07491b4 Author: Albert Astals Cid @@ -22673,7 +28931,7 @@ fill the NEWS for 0.7.1 NEWS | 15 +++++++++++++++ - 1 files changed, 15 insertions(+), 0 deletions(-) + 1 file changed, 15 insertions(+) commit 1c47633ba782021978fa34d41a4ab0badf3af9d3 Author: Albert Astals Cid @@ -22702,7 +28960,7 @@ export the OptContentModel qt4/src/poppler-optcontent.h | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit 0445e64a4124af7c1b84673f237022e133eb8542 Author: Pino Toscano @@ -22711,7 +28969,7 @@ make only the Document able to create OptContentsModel's qt4/src/poppler-optcontent.h | 6 +++++- - 1 files changed, 5 insertions(+), 1 deletions(-) + 1 file changed, 5 insertions(+), 1 deletion(-) commit c965437b67a4f97ee8365a217bd10406fba3767a Author: Pino Toscano @@ -22731,7 +28989,7 @@ small cleanup qt4/src/poppler-optcontent.cc | 11 ++++------- - 1 files changed, 4 insertions(+), 7 deletions(-) + 1 file changed, 4 insertions(+), 7 deletions(-) commit f11aa0008585e845ce509172d76f72f941be497d Author: Pino Toscano @@ -22741,7 +28999,7 @@ qt4/tests/check_optcontent.cpp | 66 ++++++++++++++-------------------------- - 1 files changed, 23 insertions(+), 43 deletions(-) + 1 file changed, 23 insertions(+), 43 deletions(-) commit 4a324484b5c77ddc348746e7bcf6051ade28e389 Author: Pino Toscano @@ -22751,7 +29009,7 @@ poppler/Gfx.cc | 2 ++ poppler/OptionalContent.cc | 2 ++ - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit 0f4e7791ab6884072a1aee56e9cec212d8cea263 Author: Pino Toscano @@ -22760,7 +29018,7 @@ ignore any generated .moc here qt4/src/.gitignore | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 136ae44f155b17d9e8b041b67f75531d8544337c Author: Pino Toscano @@ -22769,9 +29027,9 @@ keep track of the items changed when toggling an item, so we can update them properly - qt4/src/poppler-optcontent-private.h | 4 +- + qt4/src/poppler-optcontent-private.h | 4 ++-- qt4/src/poppler-optcontent.cc | 38 - ++++++++++++++++++++++++++------- + +++++++++++++++++++++++++++------- 2 files changed, 32 insertions(+), 10 deletions(-) commit b73e2afef7e5e1b68d82a10c94bca3c201c5f8b3 @@ -22794,7 +29052,7 @@ (second patch I forgot to apply with the first) qt4/src/Makefile.am | 9 ++++++--- - 1 files changed, 6 insertions(+), 3 deletions(-) + 1 file changed, 6 insertions(+), 3 deletions(-) commit 0b527a8ed62677bb09df4587f072a310c2959750 Author: Pino Toscano @@ -22804,7 +29062,7 @@ qt4/src/poppler-optcontent-private.h | 1 + qt4/src/poppler-optcontent.cc | 7 ++++++- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit c94d6cc95c6838f31e27832cb3090389bf4d8227 Author: Pino Toscano @@ -22825,7 +29083,7 @@ fix build with the autotools qt4/src/Makefile.am | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit f89ba474bae281f1cdeddb72ac8425dee1087e35 Author: Pino Toscano @@ -22840,7 +29098,7 @@ qt4/src/poppler-optcontent.cc | 74 +++++++++++++++++++++-------------------- - 1 files changed, 38 insertions(+), 36 deletions(-) + 1 file changed, 38 insertions(+), 36 deletions(-) commit defa0ecb2790402a4069fea3b3c285a50675682d Author: Pino Toscano @@ -22852,7 +29110,7 @@ qt4/src/poppler-optcontent.cc | 5 +++++ qt4/src/poppler-optcontent.h | 2 ++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit f395531a3e8f71a46b3c942f8f437ade1d9fdb57 Author: Brad Hards @@ -22861,7 +29119,7 @@ Minor cleanup. qt4/src/poppler-optcontent.cc | 7 +++---- - 1 files changed, 3 insertions(+), 4 deletions(-) + 1 file changed, 3 insertions(+), 4 deletions(-) commit 0a19486cb4de57c0c987cc4ce2434a96bbd18338 Author: Pino Toscano @@ -22871,7 +29129,7 @@ qt4/demos/optcontent.cpp | 8 ++++++++ qt4/demos/optcontent.h | 3 +++ - 2 files changed, 11 insertions(+), 0 deletions(-) + 2 files changed, 11 insertions(+) commit 09b7cc2efb7d21fa4dabd23d2d2de877cc7d86ee Author: Pino Toscano @@ -22881,7 +29139,7 @@ qt4/demos/documentobserver.cpp | 5 +++++ qt4/demos/documentobserver.h | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 39fe905be8f2ae79d9c26cd87547f3ea2608411e Author: Pino Toscano @@ -22890,12 +29148,12 @@ Add a dock for showing the optional content tree. qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 3 ++ + qt4/demos/Makefile.am | 3 +++ qt4/demos/optcontent.cpp | 55 ++++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/optcontent.h | 43 ++++++++++++++++++++++++++++++++++++ qt4/demos/viewer.cpp | 7 ++++++ - 5 files changed, 109 insertions(+), 0 deletions(-) + 5 files changed, 109 insertions(+) commit f17dd5539501a996479b903ac9b8aceb3c4cfafe Author: Pino Toscano @@ -22917,7 +29175,7 @@ qt4/src/poppler-optcontent-private.h | 43 ++++++++++++++++++++++++++++++++++ - qt4/src/poppler-optcontent.cc | 8 +++--- + qt4/src/poppler-optcontent.cc | 8 +++---- qt4/src/poppler-optcontent.h | 42 --------------------------------- 3 files changed, 47 insertions(+), 46 deletions(-) @@ -22951,7 +29209,7 @@ We need to install the optional content header. qt4/src/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 6e2bb03b5ef256c03a8da1cbf9bbc87c593942ad Author: Brad Hards @@ -22961,7 +29219,7 @@ qt4/src/poppler-optcontent-private.h | 57 ++++++++++++++++++++++++++++++++++ - qt4/src/poppler-optcontent.cc | 49 ++++++++++++++++++----------- + qt4/src/poppler-optcontent.cc | 49 +++++++++++++++++------------ qt4/src/poppler-optcontent.h | 24 +++----------- 3 files changed, 92 insertions(+), 38 deletions(-) @@ -23004,7 +29262,7 @@ qt4/src/.gitignore | 1 + qt4/src/CMakeLists.txt | 3 + qt4/src/Makefile.am | 6 + - qt4/src/poppler-document.cc | 13 + + qt4/src/poppler-document.cc | 13 ++ qt4/src/poppler-optcontent.cc | 354 ++++++++++++++++++++++++++++ qt4/src/poppler-optcontent.h | 122 ++++++++++ qt4/src/poppler-private.h | 4 + @@ -23024,7 +29282,7 @@ defined only on win32 (remove a plethora of warnings) qt4/src/poppler-export.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit d4d6c14cd83d04c61daa6618c3148a0bb47dc292 Author: Pino Toscano @@ -23034,7 +29292,7 @@ qt4/src/CMakeLists.txt | 1 + qt4/src/Makefile.am | 1 + - 2 files changed, 2 insertions(+), 0 deletions(-) + 2 files changed, 2 insertions(+) commit 4ba2e2d21710135656adbf93c5994cfb46502308 Author: Pino Toscano @@ -23049,7 +29307,7 @@ qt4/src/poppler-page-private.h | 1 - qt4/src/poppler-private.h | 1 - qt4/src/poppler-qiodeviceoutstream-private.h | 1 - - 7 files changed, 0 insertions(+), 7 deletions(-) + 7 files changed, 7 deletions(-) commit 0a466c09fb70b92f39df19bc315b6575e419ad5b Author: Albert Astals Cid @@ -23058,7 +29316,7 @@ We also need to distribute poppler-export.h qt4/src/Makefile.am | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 2034d57c700049bc9a6565bbb818e1c9f4467784 Author: Albert Astals Cid @@ -23094,7 +29352,7 @@ MSVC at the moment qt4/src/poppler-export.h | 17 +++++++++++++++++ - 1 files changed, 17 insertions(+), 0 deletions(-) + 1 file changed, 17 insertions(+) commit 1778fddb36d6cb2c7f7848bee06189158f69f16e Author: Albert Astals Cid @@ -23104,7 +29362,7 @@ dist to get the release tarball Makefile.am | 39 +++++++++++++++++++++++++++++++++++++++ - 1 files changed, 39 insertions(+), 0 deletions(-) + 1 file changed, 39 insertions(+) commit 51f171e10a42d492c8c32a5e2578d05b73d89238 Author: Albert Astals Cid @@ -23113,7 +29371,7 @@ ignore more qt4/demos/.gitignore | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit adb1ccdb9265f0583cb348c456a39efac610aff1 Author: Albert Astals Cid @@ -23122,7 +29380,7 @@ ignore qt4/demos/.gitignore | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 101e526c63175ffc1a75e1b68da7bb4fff9cd530 Author: Patrick Spendrin @@ -23131,7 +29389,7 @@ define snprintf to _snprintf if we are building on MSVC config.h.cmake | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit f7f8ab488257c3979d20e5c0690ec5d7c2cd831b Author: Patrick Spendrin @@ -23140,7 +29398,7 @@ define M_PI in case it is not defined poppler/Function.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit f00436b63bf9a42dcb2728a07db9c20f1f23d0bc Author: Patrick Spendrin @@ -23150,7 +29408,7 @@ utils/pdftoabw.cc | 2 ++ utils/pdftohtml.cc | 2 ++ - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit e1463451c584181f918265438cf6ddcb408bf731 Author: Albert Astals Cid @@ -23160,7 +29418,7 @@ define it configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 88d4bbbcf828e3247454c8ba3c2fb0fb58207b6a Author: Michael Vrable @@ -23169,7 +29427,7 @@ If a bitmap's dimensions are invalid, do not try to display it. poppler/Gfx.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 452ae6f5674b00b43955952961f7ca0583f73e27 Author: Albert Astals Cid @@ -23178,8 +29436,8 @@ Make sure we don't draw outside the bitmap on Splash::fillGlyph2 splash/Splash.cc | 76 - ++++++++++++++++++++++++++++++++++------------------- - 1 files changed, 49 insertions(+), 27 deletions(-) + +++++++++++++++++++++++++++++++++++------------------- + 1 file changed, 49 insertions(+), 27 deletions(-) commit 7f60fa806bd6d3d28917f349a2a19b52f97f593a Author: James Cloos @@ -23190,7 +29448,7 @@ Signed-off-by: James Cloos qt4/demos/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 053ecae534a4522d152b0139b6aed6da2059d760 Author: Carl Worth @@ -23203,7 +29461,7 @@ larger matrix scale factors until things just blew up. poppler/CairoOutputDev.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit bf6dd890994150406b4464e45355a4a99870fc60 Author: Pino Toscano @@ -23212,12 +29470,12 @@ Add a dock for showing the document metadata. qt4/demos/CMakeLists.txt | 1 + - qt4/demos/Makefile.am | 3 ++ + qt4/demos/Makefile.am | 3 +++ qt4/demos/metadata.cpp | 50 ++++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/metadata.h | 43 +++++++++++++++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 ++++++ - 5 files changed, 104 insertions(+), 0 deletions(-) + qt4/demos/viewer.cpp | 7 +++++++ + 5 files changed, 104 insertions(+) commit b6f0c8f83924c08be20b602b128651bf018172a3 Author: Pino Toscano @@ -23226,7 +29484,7 @@ Do not assign conflicting accelerators. qt4/demos/viewer.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e0c27a968c7e7a0f6a89a050ddbfe328229f431d Author: Pino Toscano @@ -23235,7 +29493,7 @@ Apply the antialias settings w/o notify the observers. qt4/demos/viewer.cpp | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 2c6149abcecda15c6f73a1dee537072240ddd545 Author: Pino Toscano @@ -23245,7 +29503,7 @@ qt4/demos/viewer.cpp | 28 ++++++++++++++++++++++++++++ qt4/demos/viewer.h | 3 +++ - 2 files changed, 31 insertions(+), 0 deletions(-) + 2 files changed, 31 insertions(+) commit db2b0778dca364751a1d22294be29f8c7799e2e9 Author: Pino Toscano @@ -23259,9 +29517,9 @@ qt4/demos/Makefile.am | 3 ++ qt4/demos/embeddedfiles.cpp | 75 +++++++++++++++++++++++++++++++++++++++++++ - qt4/demos/embeddedfiles.h | 43 ++++++++++++++++++++++++ + qt4/demos/embeddedfiles.h | 43 +++++++++++++++++++++++++ qt4/demos/viewer.cpp | 7 ++++ - 5 files changed, 129 insertions(+), 0 deletions(-) + 5 files changed, 129 insertions(+) commit 51fba47ccb12a66282769fc504bac4c9f5123f75 Author: Pino Toscano @@ -23270,7 +29528,7 @@ clear the page label when the document is closed qt4/demos/pageview.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit e964e2b9fbbe9b52b137ecd06729a06530835227 Author: Michael Vrable @@ -23292,7 +29550,7 @@ differently. poppler/Annot.cc | 6 ++---- - 1 files changed, 2 insertions(+), 4 deletions(-) + 1 file changed, 2 insertions(+), 4 deletions(-) commit 702fdd6c56b5369554c683d8c8e0e2c66e80886c Author: Albert Astals Cid @@ -23302,7 +29560,7 @@ glib/reference/tmpl/poppler-document.sgml | 1 + glib/reference/tmpl/poppler-page.sgml | 2 +- - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit 9e13b91ba38c20989d283588e73490a1601f5bb0 Author: Albert Astals Cid @@ -23311,7 +29569,7 @@ distribute the headers too qt4/demos/Makefile.am | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) + 1 file changed, 10 insertions(+), 1 deletion(-) commit 194e0ced7c38514ec3126666531862e3b29b4b77 Author: Albert Astals Cid @@ -23342,7 +29600,7 @@ make the poppler_qt4viewer compile with the auto"tools" qt4/demos/Makefile.am | 16 ++++++++++++---- - 1 files changed, 12 insertions(+), 4 deletions(-) + 1 file changed, 12 insertions(+), 4 deletions(-) commit 7f4acb879d300e18dfaff768027c88195d7d8f1b Author: Timothy Lee @@ -23354,7 +29612,7 @@ utils/ImageOutputDev.cc | 19 +++++++++++++++++++ utils/ImageOutputDev.h | 11 +++++++++++ - 2 files changed, 30 insertions(+), 0 deletions(-) + 2 files changed, 30 insertions(+) commit 064b316648e35416bb49336639da1d8d288d1ecf Author: Albert Astals Cid @@ -23365,7 +29623,7 @@ Fixes bug 14549 poppler/Lexer.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit b287b611b1c7b7dd00e12518cee3a6c35044e161 Author: Pino Toscano @@ -23375,7 +29633,7 @@ qt4/demos/viewer.cpp | 15 +++++++++++++++ qt4/demos/viewer.h | 2 ++ - 2 files changed, 17 insertions(+), 0 deletions(-) + 2 files changed, 17 insertions(+) commit 6400254fdabf3d0d32f27ebd00faa6958be62019 Author: Pino Toscano @@ -23384,7 +29642,7 @@ Add a title to the viewer :) qt4/demos/viewer.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit b363c0568c9c61e7ee8ed86d808f0eed0b93b525 Author: Pino Toscano @@ -23394,7 +29652,7 @@ qt4/demos/viewer.cpp | 29 +++++++++++++++++++++++++++++ qt4/demos/viewer.h | 2 ++ - 2 files changed, 31 insertions(+), 0 deletions(-) + 2 files changed, 31 insertions(+) commit 42987dcdd8d7432145f78cfc550f0c099e6e7311 Author: Pino Toscano @@ -23407,8 +29665,8 @@ qt4/demos/permissions.cpp | 77 +++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/permissions.h | 43 +++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 ++++ - 5 files changed, 129 insertions(+), 0 deletions(-) + qt4/demos/viewer.cpp | 7 +++++ + 5 files changed, 129 insertions(+) commit 9d1dda64de1d9e3f6fc81e40a0c2246a6270dfa8 Author: Pino Toscano @@ -23418,7 +29676,7 @@ qt4/demos/viewer.cpp | 41 +++++++++++++++++++++++++++++++++++++++++ qt4/demos/viewer.h | 4 ++++ - 2 files changed, 45 insertions(+), 0 deletions(-) + 2 files changed, 45 insertions(+) commit 3abb8703d7d8b7a5fbcbb3c19d8e84d640abe88c Author: Pino Toscano @@ -23432,7 +29690,7 @@ ++++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/toc.h | 43 ++++++++++++++++++++++ qt4/demos/viewer.cpp | 7 ++++ - 5 files changed, 142 insertions(+), 0 deletions(-) + 5 files changed, 142 insertions(+) commit 80925f06d125ebfc9909e36bdbe5d37fd0e48bdc Author: Pino Toscano @@ -23457,7 +29715,7 @@ qt4/demos/abstractinfodock.cpp | 57 ++++++++++++++++++++++++++++++++++++++++ qt4/demos/abstractinfodock.h | 48 +++++++++++++++++++++++++++++++++ - 4 files changed, 107 insertions(+), 0 deletions(-) + 4 files changed, 107 insertions(+) commit 0f7d51c7fc2439ee9392c166576c341238f00f36 Author: Pino Toscano @@ -23466,7 +29724,7 @@ Delete the poppler page after usage. qt4/demos/pageview.cpp | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit b41d069cdd1435ddb14b3de2986875069523c814 Author: Pino Toscano @@ -23475,7 +29733,7 @@ Initialize the current page number correctly. qt4/demos/viewer.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 75e516af0e72a2e3041660300e522ad00869372b Author: Pino Toscano @@ -23488,8 +29746,8 @@ qt4/demos/fonts.cpp | 78 ++++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/fonts.h | 44 ++++++++++++++++++++++++++ - qt4/demos/viewer.cpp | 7 ++++ - 5 files changed, 131 insertions(+), 0 deletions(-) + qt4/demos/viewer.cpp | 7 +++++ + 5 files changed, 131 insertions(+) commit 8e642d1cbd48d4790a6769287cbfd90c3bc9fc34 Author: Pino Toscano @@ -23500,7 +29758,7 @@ As start, put the Info dock there. qt4/demos/viewer.cpp | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit c1feb7c2b5008cc04edb3c028f888072920ce4dc Author: Pino Toscano @@ -23514,7 +29772,7 @@ ++++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/info.h | 44 ++++++++++++++++++++++++++ qt4/demos/viewer.cpp | 5 +++ - 5 files changed, 129 insertions(+), 0 deletions(-) + 5 files changed, 129 insertions(+) commit abc9b00c6470f9f6b66c280455f544ad0ee3aa8c Author: Pino Toscano @@ -23528,17 +29786,17 @@ Both the navigation toolbar and the page view are implemented as observers. - qt4/demos/CMakeLists.txt | 3 + - qt4/demos/Makefile.am | 3 + + qt4/demos/CMakeLists.txt | 3 ++ + qt4/demos/Makefile.am | 3 ++ qt4/demos/documentobserver.cpp | 45 ++++++++++++++++++ - qt4/demos/documentobserver.h | 49 +++++++++++++++++++ + qt4/demos/documentobserver.h | 49 ++++++++++++++++++++ qt4/demos/navigationtoolbar.cpp | 98 +++++++++++++++++++++++++++++++++++++++ qt4/demos/navigationtoolbar.h | 56 ++++++++++++++++++++++ qt4/demos/pageview.cpp | 60 ++++++++++++++++++++++++ - qt4/demos/pageview.h | 44 +++++++++++++++++ + qt4/demos/pageview.h | 44 ++++++++++++++++++ qt4/demos/viewer.cpp | 98 - +++++++++++++++++++++++++++++++++++++- + +++++++++++++++++++++++++++++++++++++-- qt4/demos/viewer.h | 17 +++++++ 10 files changed, 470 insertions(+), 3 deletions(-) @@ -23565,7 +29823,7 @@ +++++++++++++++++++++++++++++++++++++++++++++ qt4/demos/viewer.h | 45 ++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 120 insertions(+), 0 deletions(-) + 3 files changed, 120 insertions(+) commit 8da490b090487c4c37290b63bdc9abcfaf6d6940 Author: Pino Toscano @@ -23578,7 +29836,7 @@ qt4/Makefile.am | 2 +- qt4/demos/CMakeLists.txt | 10 ++++++++++ qt4/demos/Makefile.am | 20 ++++++++++++++++++++ - 5 files changed, 33 insertions(+), 1 deletions(-) + 5 files changed, 33 insertions(+), 1 deletion(-) commit e24b49d52a5c1716641695ee731dd49848a114d9 Author: Pino Toscano @@ -23587,7 +29845,7 @@ do not print it as string qt4/src/poppler-private.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2316455864e9c900c08d051c59b9508eddcb7c34 Author: Pino Toscano @@ -23597,7 +29855,7 @@ qt4/src/poppler-private.cc | 21 +++++++++++++++++++++ qt4/src/poppler-private.h | 8 +++++++- - 2 files changed, 28 insertions(+), 1 deletions(-) + 2 files changed, 28 insertions(+), 1 deletion(-) commit d985d3b0cdc57370137865add2a5f3a7802109c7 Author: Pino Toscano @@ -23606,7 +29864,7 @@ Use what FormWidgetText give us. qt4/src/poppler-form.cc | 13 +++---------- - 1 files changed, 3 insertions(+), 10 deletions(-) + 1 file changed, 3 insertions(+), 10 deletions(-) commit a69bd442e52f4495f8d6bfd3bb58b3ebd1be1a63 Author: Michael Vrable @@ -23629,7 +29887,7 @@ UTF-8). poppler/PDFDocEncoding.cc | 23 +++++++++++++++++------ - 1 files changed, 17 insertions(+), 6 deletions(-) + 1 file changed, 17 insertions(+), 6 deletions(-) commit ce17383e0ed21770b471e88f25046a64a23e7e45 Author: Albert Astals Cid @@ -23642,7 +29900,7 @@ splash/SplashFont.cc | 48 ++++++++++++++++++++++++++++-------------------- - 1 files changed, 28 insertions(+), 20 deletions(-) + 1 file changed, 28 insertions(+), 20 deletions(-) commit 15a61cac718ae8cbf83911e299b4cfdd24cdf178 Author: Pino Toscano @@ -23651,7 +29909,7 @@ add images.c glib/demo/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 9cfe10ab7f51d329647e102e446baaef043d8cc6 Merge: e918729 7d65b4d @@ -23672,7 +29930,7 @@ +++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/images.h | 31 +++++ glib/demo/main.c | 4 +- - 4 files changed, 374 insertions(+), 1 deletions(-) + 4 files changed, 374 insertions(+), 1 deletion(-) commit e9187292701e72db1020f7701d0725d83eee4b00 Author: Pino Toscano @@ -23681,7 +29939,7 @@ Do the one-time initialisation in initTestCase(). qt4/tests/check_dateConversion.cpp | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit fb996c46e3c6b56a2c67819620000bcd804aacd6 Author: Michael Vrable @@ -23758,7 +30016,7 @@ so we can redefine it later poppler-config.h.cmake | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e798802f00bff0a24ee6d1312d6c62624395865a Author: Pino Toscano @@ -23767,7 +30025,7 @@ Apidox fix: state which checksum is returned (if available). qt4/src/poppler-qt4.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 4e2ba70a88c40fef6775053b1cc5fa30e622cea7 Author: Pino Toscano @@ -23776,7 +30034,7 @@ Free the Object after you use it. poppler/Annot.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 039545fcd2c12631c7b8aea89c35f36cb387a17a Author: Pino Toscano @@ -23785,7 +30043,7 @@ Return the siblings even for checkboxes. qt4/src/poppler-form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit fe5ee75cdf3e11e314318af12edf9d5bc8986250 Author: Pino Toscano @@ -23794,7 +30052,7 @@ Initialize correctly; free your memory. poppler/Form.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit e0eff92c7067d43faa8e93baed1f061863111251 Author: Carlos Garcia Campos @@ -23843,7 +30101,7 @@ poppler/Form.cc | 128 ++++++++++++++++++++++++++++--------------------------- - poppler/Form.h | 41 ++++++++--------- + poppler/Form.h | 41 +++++++++--------- 2 files changed, 84 insertions(+), 85 deletions(-) commit 5f8e2f9140ee2ede841700726b974768ec863672 @@ -23853,7 +30111,7 @@ Use QVarLengthArray instead of relying on gcc-ism. qt4/src/poppler-page.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 7499764d382366823519aa13a38e1e44781c78af Author: Pino Toscano @@ -23865,7 +30123,7 @@ qt4/src/poppler-form.cc | 14 ++++++++++++++ qt4/src/poppler-form.h | 8 ++++++++ - 2 files changed, 22 insertions(+), 0 deletions(-) + 2 files changed, 22 insertions(+) commit 85bfa4f499a90d45b13df4d0a8760a7da6fc1532 Author: Pino Toscano @@ -23874,7 +30132,7 @@ Small apidox fix. qt4/src/poppler-form.h | 11 ++--------- - 1 files changed, 2 insertions(+), 9 deletions(-) + 1 file changed, 2 insertions(+), 9 deletions(-) commit ada05055c91e967dc3e2af32a2176dd12cb7fe70 Author: Pino Toscano @@ -23887,8 +30145,8 @@ +++++++++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-form.h | 54 ++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 6 +++++ - 3 files changed, 115 insertions(+), 0 deletions(-) + qt4/src/poppler-page.cc | 6 ++++++ + 3 files changed, 115 insertions(+) commit 278b33f25df418ef12798100002845a3e2ceebd3 Merge: c730b33 fdb0a4a @@ -23913,7 +30171,7 @@ glib/poppler-page.cc | 1 + poppler/CairoOutputDev.cc | 3 ++- poppler/CairoOutputDev.h | 2 ++ - 3 files changed, 5 insertions(+), 1 deletions(-) + 3 files changed, 5 insertions(+), 1 deletion(-) commit c730b33f1ec2032c4b8c2660738448d954eb0f7d Author: Pino Toscano @@ -23959,7 +30217,7 @@ Comment out unused vars. utils/pdftoabw.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit d3275e4263372b534c276f81d0c997ecb6675487 Merge: c2186c1 5347a97 @@ -23979,7 +30237,7 @@ Found by Michael Vrable poppler/Lexer.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 5347a97e39388ae38cf2ab9c67f953b0f7a02a13 Author: Pino Toscano @@ -23988,7 +30246,7 @@ Add the operators for the flags we have. qt4/src/poppler-qt4.h | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 329ade4f936bf063539cdc887aaf9a1722a5b8e0 Author: Pino Toscano @@ -24016,7 +30274,7 @@ Do not rely on GNU extensions, but at least use Qt. qt4/src/poppler-qiodeviceoutstream.cc | 11 ++++------- - 1 files changed, 4 insertions(+), 7 deletions(-) + 1 file changed, 4 insertions(+), 7 deletions(-) commit 8cb0e75203daa01439413d1a775482b48e784baa Author: Albert Astals Cid @@ -24026,7 +30284,7 @@ y_max poppler/GfxState.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit c8f734ba4258059fa4521a4d364f62ca1632840b Author: Albert Astals Cid @@ -24036,7 +30294,7 @@ can use the cos and sin cmath functions poppler/Function.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 5fb0c9d31c1abf2e6ad306c112fbd2a7c33d8772 Merge: 2655663 2255c85 @@ -24086,7 +30344,7 @@ See testcase at http://bugs.kde.org/show_bug.cgi?id=157497 poppler/Function.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + 1 file changed, 4 insertions(+), 2 deletions(-) commit 2a39932ae35a2716842bd2a1c3d4f9ce6b1e3dd8 Author: Pino Toscano @@ -24100,7 +30358,7 @@ - QVERIFY() also the return value of unlock() qt4/tests/check_password.cpp | 31 ++++++++++++++++--------------- - 1 files changed, 16 insertions(+), 15 deletions(-) + 1 file changed, 16 insertions(+), 15 deletions(-) commit cc9c124d4d859b845eebf4ca1e4397870a35fd4e Author: Pino Toscano @@ -24110,7 +30368,7 @@ qt4/tests/check_dateConversion.cpp | 34 ++++++++++++++++++++++++++++++++++ - 1 files changed, 34 insertions(+), 0 deletions(-) + 1 file changed, 34 insertions(+) commit eca91761741de5b340f7a2160db5b33401feb935 Author: Pino Toscano @@ -24119,7 +30377,7 @@ Remove unneeded headers. qt4/src/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 899627505a4645fb1cc7d3599adbeec449c57041 Author: Pino Toscano @@ -24128,7 +30386,7 @@ The return value is QString, so return QString's... qt4/src/poppler-document.cc | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) + 1 file changed, 3 insertions(+), 3 deletions(-) commit a1606fa4ff438983e3a7f55dd2d10a66f72e6711 Author: Pino Toscano @@ -24148,7 +30406,7 @@ Remove C-ism. qt4/src/poppler-document.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 3e994e8586fa1c87ef7e7f82af1cdacf2cd36310 Author: Pino Toscano @@ -24157,7 +30415,7 @@ Add the missing font types. qt4/src/poppler-fontinfo.cc | 11 +++++++++-- - 1 files changed, 9 insertions(+), 2 deletions(-) + 1 file changed, 9 insertions(+), 2 deletions(-) commit ba07963f85d777a441349e23d4c2f510e45c73be Author: Pino Toscano @@ -24166,7 +30424,7 @@ Be safe against self-assignment. qt4/src/poppler-fontinfo.cc | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) + 1 file changed, 3 insertions(+) commit 834b86548e09f4b24cdb2f194299d053b9b55022 Author: Pino Toscano @@ -24175,7 +30433,7 @@ Small apidox fix. qt4/src/poppler-qt4.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 11a61eac5b8cde04bf762bbbe0deab5c0bd52951 Author: Pino Toscano @@ -24219,7 +30477,7 @@ qt4/src/Makefile.am | 1 + qt4/src/poppler-private.cc | 70 ++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-private.h | 46 ++-------------------------- + qt4/src/poppler-private.h | 46 +++-------------------------- 4 files changed, 76 insertions(+), 42 deletions(-) commit 124d92139241ad95da559d22af48254b45ac4a2e @@ -24248,7 +30506,7 @@ so increase the allowed length to 128+127 poppler/Lexer.cc | 25 +++++++++++++++++++++---- - 1 files changed, 21 insertions(+), 4 deletions(-) + 1 file changed, 21 insertions(+), 4 deletions(-) commit ee9f85915feb86b54ace1a403baa13bbdd7c3966 Author: Pino Toscano @@ -24260,7 +30518,7 @@ link iteration. qt4/src/poppler-link-extractor.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit ad4b1361f6c25359e6ddb38599bfc1e4e3e80408 Author: Pino Toscano @@ -24291,7 +30549,7 @@ Compile the stress-poppler-dir test as well. qt4/tests/CMakeLists.txt | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 8a946b76ae2e7c2c5238b4e580c1c226eb457dc9 Author: Pino Toscano @@ -24300,7 +30558,7 @@ Micro-touches to the debug messages. qt4/src/poppler-page.cc | 26 +++++++++++++------------- - 1 files changed, 13 insertions(+), 13 deletions(-) + 1 file changed, 13 insertions(+), 13 deletions(-) commit c31990dfe50c7a0e3999e6d967699fce5ccb3339 Merge: 7701e2a 6d58cda @@ -24319,7 +30577,7 @@ qt4/src/poppler-annotation-helper.h | 6 ++++++ qt4/src/poppler-annotation.cc | 31 +++++++++++++++++++++++++++++++ - 2 files changed, 37 insertions(+), 0 deletions(-) + 2 files changed, 37 insertions(+) commit 6d58cda82b0181f2cca6e9d95b15877793be0812 Author: Albert Astals Cid @@ -24328,7 +30586,7 @@ Protect us against weird dateString values qt4/src/poppler-document.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit aa0435f1544fe1adcf10173e34eaeaf2a7a703c7 Merge: b43f4e9 37600b5 @@ -24365,7 +30623,7 @@ qt4/src/poppler-page-private.h | 4 +- qt4/src/poppler-page.cc | 64 +++++++++++++++--------------- - qt4/src/poppler-qt4.h | 5 +- + qt4/src/poppler-qt4.h | 5 +-- 6 files changed, 42 insertions(+), 45 deletions(-) commit 4e0bb0307fccefc21f74a4c5a3a0d7e8e687b550 @@ -24375,7 +30633,7 @@ Fix include guard. poppler/ArthurOutputDev.h | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 6f11ef660540fd13aad1350385beb90758ca86af Author: Albert Astals Cid @@ -24384,7 +30642,7 @@ Fix for end condition, init ucode to 0 poppler/GfxFont.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 1da2091807ae7f7d4d3f446953c41b4c440d4b1b Author: Albert Astals Cid @@ -24396,7 +30654,7 @@ Fixes crash on http://bugs.kde.org/show_bug.cgi?id=157000 poppler/SplashOutputDev.cc | 8 ++++++-- - 1 files changed, 6 insertions(+), 2 deletions(-) + 1 file changed, 6 insertions(+), 2 deletions(-) commit ecabc9469b137e8251344e5502de1cbf875223b9 Author: Pino Toscano @@ -24405,7 +30663,7 @@ Set RelWithDebInfo as default build type, if not specified. cmake/modules/PopplerMacros.cmake | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 19da87a20b3906523a330e3c956903a58a3ede7f Author: Pino Toscano @@ -24467,7 +30725,7 @@ qt4/tests/CMakeLists.txt | 47 + test/CMakeLists.txt | 52 + utils/CMakeLists.txt | 84 ++ - 33 files changed, 3455 insertions(+), 0 deletions(-) + 33 files changed, 3455 insertions(+) commit 1ea831d3eee6eda35fadfb3c75962a0c708e6c7b Author: Pino Toscano @@ -24476,7 +30734,7 @@ Preprocessor #warning is GCC-specific. poppler/ArthurOutputDev.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 4c738cc6bd51f9d9e23ba83949c490c5c8691345 Author: Albert Astals Cid @@ -24489,11 +30747,11 @@ poppler/SplashOutputDev.cc | 37 +++++++++++++++++++++++++++++ splash/SplashFTFont.cc | 55 +++++++++++++++++++++++++++++++++++++++++++- - splash/SplashFTFont.h | 4 +++ - splash/SplashFont.h | 4 +++ + splash/SplashFTFont.h | 4 ++++ + splash/SplashFont.h | 4 ++++ splash/SplashFontFile.cc | 1 + - splash/SplashFontFile.h | 2 + - 6 files changed, 102 insertions(+), 1 deletions(-) + splash/SplashFontFile.h | 2 ++ + 6 files changed, 102 insertions(+), 1 deletion(-) commit 64f16cf6ebf2870852fe8d937b25be58869ad40a Author: Albert Astals Cid @@ -24502,7 +30760,7 @@ Enable antialias by default on the test tool qt4/tests/test-poppler-qt4.cpp | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 90f0e6bc1e96d9f1666cb8476a92e127f5b927d4 Author: Jonathan Kew @@ -24532,7 +30790,7 @@ configure.ac | 1 + poppler/GfxFont.cc | 6 ++++++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit 053369678963206a4afa88a614de1994872c7c5a Author: Carlos Garcia Campos @@ -24552,7 +30810,7 @@ Fix slice rendering in poppler glib demo glib/demo/render.c | 41 ++++++++++++++++++++++++----------------- - 1 files changed, 24 insertions(+), 17 deletions(-) + 1 file changed, 24 insertions(+), 17 deletions(-) commit 7ad6c4ba110b970516d5380444a03ae217496ddf Author: Albert Astals Cid @@ -24561,7 +30819,7 @@ Incrementing the iterator would be a good idea qt4/src/poppler-annotation.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 7c99ec4635a4971321bbead7d1bc723da59b755e Author: Julien Rebetez @@ -24582,7 +30840,7 @@ See http://bugs.kde.org/show_bug.cgi?id=151359 for an example poppler/Gfx.cc | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 96c532ea4b56a147de1deb965126e31f87df588b Author: Carlos Garcia Campos @@ -24591,7 +30849,7 @@ Fix memory leak poppler/Form.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 6bca64407c675ca837f83a12c0f655f975f14407 Author: Carlos Garcia Campos @@ -24602,7 +30860,7 @@ poppler/Form.cc | 18 +++++++++++++++++- poppler/Form.h | 1 + - 2 files changed, 18 insertions(+), 1 deletions(-) + 2 files changed, 18 insertions(+), 1 deletion(-) commit eccf84b51a1cf5d478c0ec84be3fc9be8e458f4f Author: Pino Toscano @@ -24637,7 +30895,7 @@ Fix a crash when createAnnot returns NULL due to invalid annot dict. poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 0d558841142587d66bd3b2025e5a9ca39f7a6159 Author: Albert Astals Cid @@ -24646,7 +30904,7 @@ Fix another reversed comparison due to cmp poppler/Annot.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit cb6a87e39336e2e3893f3e5f577e4d176d237a9f Author: Iñigo Martínez @@ -24657,7 +30915,7 @@ Signed-off-by: Iñigo Martínez poppler/Annot.cc | 24 ++++++++++++------------ - 1 files changed, 12 insertions(+), 12 deletions(-) + 1 file changed, 12 insertions(+), 12 deletions(-) commit 7cf85dc8d7c895a211684c7d36757063ed4f469b Author: Albert Astals Cid @@ -24666,7 +30924,7 @@ The glade file needs to be distributed test/Makefile.am | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 46e93d31dd9b5909ecd8f7a8f8de23329444a7bc Author: Albert Astals Cid @@ -24675,7 +30933,7 @@ we need time.h if we use time() poppler/PDFDoc.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit a0adb006c38ea07f010a01d9c0bb07ca0f48939d Author: Pino Toscano @@ -24694,7 +30952,7 @@ Do not render images when getting the image mapping, it can be done later on demand. - glib/poppler-page.cc | 81 +++++++++++++++------------ + glib/poppler-page.cc | 81 +++++++++++++++------------- glib/poppler-page.h | 6 ++- poppler/CairoOutputDev.cc | 131 ++++++++++++++++++++++++++------------------- @@ -24708,7 +30966,7 @@ ignore pdf-fullrewrite binary test/.gitignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 1d160935ea4c1116b745c584ed7f1fd03fbbfb46 Author: Iñigo Martínez @@ -24717,8 +30975,8 @@ AnnotWidget support and few fixes poppler/Annot.cc | 243 - +++++++++++++++++++++++++++++++++++++++++++++++++++-- - poppler/Annot.h | 142 +++++++++++++++++++++++++++++-- + +++++++++++++++++++++++++++++++++++++++++++++++++++--- + poppler/Annot.h | 142 ++++++++++++++++++++++++++++--- 2 files changed, 365 insertions(+), 20 deletions(-) commit 0e91a3973e525d65236d15930a8ea0e5bbb6a6cc @@ -24740,7 +30998,7 @@ poppler/Annot.cc | 246 +++++++++++++++++++++++++++++------------------------- - poppler/Annot.h | 19 ++-- + poppler/Annot.h | 19 +++-- 2 files changed, 144 insertions(+), 121 deletions(-) commit 2f821f10fbbba9363405201c86494cd861cec2b2 @@ -24751,7 +31009,7 @@ poppler/Annot.cc | 16 ++++++++++++++++ poppler/Annot.h | 23 +++++++++++++++++++++++ - 2 files changed, 39 insertions(+), 0 deletions(-) + 2 files changed, 39 insertions(+) commit de4c8fa6607e55c199bede1dc731227692ef4f53 Author: Iñigo Martínez @@ -24763,8 +31021,8 @@ poppler/Annot.cc | 232 +++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 127 +++++++++++++++++++++++++++++ - 2 files changed, 358 insertions(+), 1 deletions(-) + poppler/Annot.h | 127 ++++++++++++++++++++++++++++++ + 2 files changed, 358 insertions(+), 1 deletion(-) commit c3504a87933ae1516b1ef05e527fd1c039091235 Author: Iñigo Martínez @@ -24777,7 +31035,7 @@ poppler/Annot.cc | 116 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 51 ++++++++++++++++++++++++ - 2 files changed, 167 insertions(+), 0 deletions(-) + 2 files changed, 167 insertions(+) commit a20468cc38bb590124b2b028a08f364f90f2487f Author: Julien Rebetez @@ -24788,7 +31046,7 @@ test/Makefile.am | 11 ++++++++++- test/pdf-fullrewrite.cc | 44 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 54 insertions(+), 1 deletions(-) + 2 files changed, 54 insertions(+), 1 deletion(-) commit 246294714c6011651fd0e5b3649bd65919058c72 Author: Julien Rebetez @@ -24802,7 +31060,7 @@ It is now the case for the other type of FormWidgets. poppler/Form.cc | 7 ++++++- - 1 files changed, 6 insertions(+), 1 deletions(-) + 1 file changed, 6 insertions(+), 1 deletion(-) commit 6e0f297b8b17afb95779724b8618ca39016e664a Author: Julien Rebetez @@ -24822,7 +31080,7 @@ poppler/Dict.cc | 14 +++++++++++++- poppler/Dict.h | 1 + - 2 files changed, 14 insertions(+), 1 deletions(-) + 2 files changed, 14 insertions(+), 1 deletion(-) commit e8d46cab77c7167edb0896296118daafc0f13b6d Author: Julien Rebetez @@ -24833,8 +31091,8 @@ poppler/PDFDoc.cc | 379 ++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/PDFDoc.h | 18 +++- - poppler/XRef.cc | 12 ++- + poppler/PDFDoc.h | 18 ++- + poppler/XRef.cc | 12 +- poppler/XRef.h | 3 +- 4 files changed, 402 insertions(+), 10 deletions(-) @@ -24869,7 +31127,7 @@ poppler/XRef.cc | 39 +++++++++++++++++++++++++++++++++++++++ poppler/XRef.h | 1 + - 2 files changed, 40 insertions(+), 0 deletions(-) + 2 files changed, 40 insertions(+) commit 8bd00dd0872191b8806e9411d9a1adc441f08a47 Author: Julien Rebetez @@ -24892,7 +31150,7 @@ the stream should take care of deleting the buffer. poppler/Stream.h | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 4fbd143de7e3a8ab386dd14b057e62b3b9fe04e4 Author: Julien Rebetez @@ -24904,7 +31162,7 @@ poppler/Stream.cc | 55 +++++++++++++++++++++++++++++++++++++++++++++ poppler/Stream.h | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 119 insertions(+), 0 deletions(-) + 2 files changed, 119 insertions(+) commit 696eaa47169fb063b7e6998c876926c578b6fbfa Author: Carlos Garcia Campos @@ -24913,7 +31171,7 @@ Fix a crash when editing text form fields poppler/Annot.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 9ec1b28dcdade12498b94b650c26483581294ee6 Author: Carlos Garcia Campos @@ -24923,7 +31181,7 @@ children poppler/Form.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit f7ed40c465033bad26dfda008c5984954baa0607 Author: Carlos Garcia Campos @@ -24932,7 +31190,7 @@ Add a cast to fix build glib/demo/info.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 1c0aa21e598b879ec49d96700e6438ccb8ac2283 Author: Albert Astals Cid @@ -24954,7 +31212,7 @@ Fix two use after free bugs in HtmlOutputDev.cc utils/HtmlOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 348f4f9d9d5b0f91da6f46e0fcefec80255d4179 Merge: 8a8a4f0 4eca2e0 @@ -24971,7 +31229,7 @@ Make Document::renderHints return the correct render hints qt4/src/poppler-document.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 4eca2e041c93349e0c4666e83ad1ca3caff91dee Author: Carlos Garcia Campos @@ -24980,7 +31238,7 @@ Add page transitions demo glib/demo/Makefile.am | 2 + - glib/demo/main.c | 16 ++- + glib/demo/main.c | 16 +-- glib/demo/transitions.c | 321 +++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/transitions.h | 31 +++++ @@ -24994,7 +31252,7 @@ font is embedded or not poppler/GfxFont.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 30e9bae97e3742913015f7ea46636b2b80937612 Author: Ed Catmur @@ -25003,8 +31261,8 @@ Fixlets for Adobe Glyph Naming convention implementation poppler/GfxFont.cc | 94 - ++++++++++++++++++++++++++------------------------- - 1 files changed, 48 insertions(+), 46 deletions(-) + +++++++++++++++++++++++++++------------------------- + 1 file changed, 48 insertions(+), 46 deletions(-) commit 40551e616b007ceb15c9d6e3d77c24538ffec924 Author: Albert Astals Cid @@ -25013,7 +31271,7 @@ Check the destination page of the link does exist qt4/src/poppler-link.cc | 20 ++++++++++++-------- - 1 files changed, 12 insertions(+), 8 deletions(-) + 1 file changed, 12 insertions(+), 8 deletions(-) commit c06d6f2236d854f05e7621be280109ff27dc73b9 Author: Albert Astals Cid @@ -25022,7 +31280,7 @@ Use UnicodeParsedString that does exactly what this code does qt4/src/poppler-document.cc | 28 +--------------------------- - 1 files changed, 1 insertions(+), 27 deletions(-) + 1 file changed, 1 insertion(+), 27 deletions(-) commit 5f9f06a10fdb72a9d809ee1f779e1a8f549840e7 Author: Koji Otani @@ -25035,7 +31293,7 @@ for more information poppler/GfxFont.cc | 14 ++++++++++---- - 1 files changed, 10 insertions(+), 4 deletions(-) + 1 file changed, 10 insertions(+), 4 deletions(-) commit bb49e1e3909fc7392c197dc67d9b7f5312fd0dad Author: Ed Catmur @@ -25044,8 +31302,8 @@ Implement Adobe Glyph Naming convention poppler/GfxFont.cc | 183 - +++++++++++++++++++++++++++++++++++++++++++-------- - 1 files changed, 154 insertions(+), 29 deletions(-) + +++++++++++++++++++++++++++++++++++++++++++--------- + 1 file changed, 154 insertions(+), 29 deletions(-) commit 5634d63abdd64d371f2e8687a1c172f55b052008 Author: Koji Otani @@ -25056,7 +31314,7 @@ poppler/Gfx.cc | 67 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 67 insertions(+), 0 deletions(-) + 1 file changed, 67 insertions(+) commit 7a9e7fc96b47b9d833300233ac38bbd60097f425 Author: Carlos Garcia Campos @@ -25072,7 +31330,7 @@ poppler/Annot.cc | 12 +++++++++++- poppler/Annot.h | 10 ++++++++++ - 2 files changed, 21 insertions(+), 1 deletions(-) + 2 files changed, 21 insertions(+), 1 deletion(-) commit 796d9cb9b188a8af69d7fbf9bccbb408cbf6a71a Author: Carlos Garcia Campos @@ -25092,7 +31350,7 @@ Use the default dash array when it's not correct in AnnotBorderBS poppler/Annot.cc | 4 +++- - 1 files changed, 3 insertions(+), 1 deletions(-) + 1 file changed, 3 insertions(+), 1 deletion(-) commit cb2a997aa6f9dd5508ca8b04e63815da893497ef Author: Carlos Garcia Campos @@ -25111,7 +31369,7 @@ Fix several crashes due to uninitialized variables in Annots. poppler/Annot.cc | 11 +++++++---- - 1 files changed, 7 insertions(+), 4 deletions(-) + 1 file changed, 7 insertions(+), 4 deletions(-) commit 0820a93ba1c0e893681024feb9f9bd120a9eeb4d Author: Carlos Garcia Campos @@ -25125,7 +31383,7 @@ destinations, the parameter should be retained unchanged. poppler/Link.cc | 36 ++++++++++++++++++++++++++++-------- - 1 files changed, 28 insertions(+), 8 deletions(-) + 1 file changed, 28 insertions(+), 8 deletions(-) commit 0fb42a2f557d5ec83b42326eb6b0be41622ca328 Author: Iñigo Martínez @@ -25135,7 +31393,7 @@ Signed-off-by: Iñigo Martínez - poppler/Annot.cc | 28 ++++++++++---------- + poppler/Annot.cc | 28 ++++++++++----------- poppler/Annot.h | 72 +++++++++++++++++++++++++++--------------------------- 2 files changed, 50 insertions(+), 50 deletions(-) @@ -25150,7 +31408,7 @@ poppler/Annot.cc | 123 +++++++++++++++++++++++++++++++++++++++++++++++++++++- - poppler/Annot.h | 65 ++++++++++++++++++++++++---- + poppler/Annot.h | 65 ++++++++++++++++++++++++----- 2 files changed, 177 insertions(+), 11 deletions(-) commit 2acecde458122bd67487cc302478befa78bf6fbe @@ -25164,7 +31422,7 @@ poppler/Annot.cc | 115 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/Annot.h | 51 ++++++++++++++++++++++++ - 2 files changed, 166 insertions(+), 0 deletions(-) + 2 files changed, 166 insertions(+) commit 1f8c1fe34e04688d2ba200f1166cfdd1ffe563f0 Author: Iñigo Martínez @@ -25176,7 +31434,7 @@ poppler/Annot.cc | 34 ++++++++++++++++++++++++++++++++++ poppler/Annot.h | 21 +++++++++++++++++++++ - 2 files changed, 55 insertions(+), 0 deletions(-) + 2 files changed, 55 insertions(+) commit 6c83e06fb2eb77d0dbefd1ebfbcac3e5f0cbb622 Author: Iñigo Martínez @@ -25190,7 +31448,7 @@ poppler/Annot.cc | 160 ++++++++++++++++++++++++++++++++++++-------------- poppler/Annot.h | 54 ++++++++++++++--- - poppler/Form.cc | 6 ++- + poppler/Form.cc | 6 +- 4 files changed, 167 insertions(+), 64 deletions(-) commit fa0bb5bbea5bf2769c8b3084f78770b7781002eb @@ -25203,8 +31461,8 @@ poppler/Annot.cc | 613 +++++++++++++++++++++++++++++++++++------------------- - poppler/Annot.h | 140 +++++++++++- - poppler/Gfx.cc | 21 ++- + poppler/Annot.h | 140 +++++++++++-- + poppler/Gfx.cc | 21 +- poppler/Gfx.h | 5 +- 4 files changed, 543 insertions(+), 236 deletions(-) @@ -25216,7 +31474,7 @@ horizontal mode poppler/GfxFont.cc | 46 +++++++++++++++++++++++++--------------------- - 1 files changed, 25 insertions(+), 21 deletions(-) + 1 file changed, 25 insertions(+), 21 deletions(-) commit 85901922bf354a1268037d0b6ec5cbf14da979a1 Author: Albert Astals Cid @@ -25227,7 +31485,7 @@ Fixes http://bugs.kde.org/show_bug.cgi?id=153949 poppler/SplashOutputDev.cc | 23 ++++++++++++++++------- - 1 files changed, 16 insertions(+), 7 deletions(-) + 1 file changed, 16 insertions(+), 7 deletions(-) commit f24259cddb9c5e02cf9d2071bfa0106f3e88bd59 Author: Koji Otani @@ -25235,12 +31493,12 @@ Display characters outside of unicode BMP with TT font - fofi/FoFiTrueType.cc | 33 +++++++++++++++++++-- + fofi/FoFiTrueType.cc | 33 +++++++++++++++++++--- fofi/FoFiTrueType.h | 2 +- - poppler/CMap.cc | 34 ++++++++++++++++++++++ - poppler/CMap.h | 4 ++ + poppler/CMap.cc | 34 +++++++++++++++++++++++ + poppler/CMap.h | 4 +++ poppler/GfxFont.cc | 75 - +++++++++++++++++++++++++++++++------------------ + +++++++++++++++++++++++++++++++------------------- 5 files changed, 115 insertions(+), 33 deletions(-) commit 7cbabbf378cf5a9c0411558ff02b44dec2040ea1 @@ -25250,7 +31508,7 @@ Fix a crash when marked content properties operator is not a dict. poppler/Gfx.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e807f9c72c7f0c5cc0655918f676f4af54739442 Merge: bf57117 e2ea743 @@ -25276,7 +31534,7 @@ poppler/PDFDocEncoding.h | 4 ++ poppler/TextOutputDev.cc | 98 +++++++++++++++++++++++++++++++++++++++++++++- - poppler/TextOutputDev.h | 11 +++++ + poppler/TextOutputDev.h | 11 ++++++ 7 files changed, 116 insertions(+), 5 deletions(-) commit e2ea7430e7d6db50cbfdac34713915e5b0942a89 @@ -25289,7 +31547,7 @@ that'll be too much overhead when re-merging xpdf changes configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit acf70c666d4f534cd97de64d4378bf6399e31fd4 Author: Albert Astals Cid @@ -25298,7 +31556,7 @@ Disable gtk tests if the user disabled glib frontend configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit bb0ec68f21d355081ff75aad641bc3809141e398 Merge: 5a34cdd b925ea2 @@ -25315,7 +31573,7 @@ Remove redundant check. poppler/PSOutputDev.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 275afca4ef24020273df652ccfdf76c6994e9294 Author: Brad Hards @@ -25327,8 +31585,8 @@ poppler/PSOutputDev.cc | 81 +++++++++++++++++++++++++++++++++++++++++++++++- - poppler/PSOutputDev.h | 2 + - 2 files changed, 82 insertions(+), 1 deletions(-) + poppler/PSOutputDev.h | 2 ++ + 2 files changed, 82 insertions(+), 1 deletion(-) commit 641edb83a457083c13f3e374f6ac6c570dd54d7f Author: Brad Hards @@ -25337,8 +31595,8 @@ Minor API documentation update qt4/src/poppler-annotation.h | 81 - ++++++++++++++++++++++++++++++++++++++++- - 1 files changed, 79 insertions(+), 2 deletions(-) + ++++++++++++++++++++++++++++++++++++++++-- + 1 file changed, 79 insertions(+), 2 deletions(-) commit 3635ec6fcbc89daf633c03efb644df9031b80f59 Author: Brad Hards @@ -25348,7 +31606,7 @@ qt4/src/Doxyfile | 185 +++++++++++++++++++++++++++++++++++++++++------------- - 1 files changed, 141 insertions(+), 44 deletions(-) + 1 file changed, 141 insertions(+), 44 deletions(-) commit 02c7ea6e1fd3e225de1eda231813f4db0ffb9fdb Author: Brad Hards @@ -25357,7 +31615,7 @@ Fix off-by-one in printCommands path. poppler/Gfx.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 74af7c1209f47ed39addf7fde3ea106a7c77a408 Author: Carlos Garcia Campos @@ -25366,7 +31624,7 @@ Convert passwords from utf-8 to latin-1 when needed. Fixes bug #4557 glib/poppler-document.cc | 16 ++++++++++++++-- - 1 files changed, 14 insertions(+), 2 deletions(-) + 1 file changed, 14 insertions(+), 2 deletions(-) commit 5a34cddf043cb484549cb411e034786a7d8688a3 Author: Albert Astals Cid @@ -25375,7 +31633,7 @@ add a ignore glib/demo/.gitignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 21a58562cc1e575ec3d81b6e34bfcb21306eb67f Author: Albert Astals Cid @@ -25384,7 +31642,7 @@ sscanf does not like null strings, so don't call it on empty qstrings qt/poppler-document.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 6f8451cf9d19f57f658d1568643ecb0f953e1075 Author: Jeff Muizelaar @@ -25414,7 +31672,7 @@ poppler/Gfx.cc | 14 ++++++++++++++ poppler/GfxState.h | 6 ++++++ poppler/OutputDev.h | 2 ++ - 3 files changed, 22 insertions(+), 0 deletions(-) + 3 files changed, 22 insertions(+) commit f6429b13a972f2deb25b3d3a9948dca024a54841 Author: Jeff Muizelaar @@ -25422,7 +31680,7 @@ Fix accidental mode change. - 0 files changed, 0 insertions(+), 0 deletions(-) + 0 files changed commit 5797f50a99d1494767edc5928f9c3e9d927b946d Author: Jeff Muizelaar @@ -25438,9 +31696,9 @@ backend. poppler/CairoFontEngine.cc | 56 - +++++++++++++++++++++++++++++++++++++++++-- - poppler/CairoFontEngine.h | 7 ++++- - poppler/CairoOutputDev.cc | 8 ++++- + +++++++++++++++++++++++++++++++++++++++++--- + poppler/CairoFontEngine.h | 7 +++++- + poppler/CairoOutputDev.cc | 8 +++++-- 3 files changed, 65 insertions(+), 6 deletions(-) commit 551212e55127c7e46d9aff3318015fd9b5385687 @@ -25452,7 +31710,7 @@ Supported by Derek B. Noonburg poppler/GfxState.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 934a5ae45eb17bd0e2010be89f55510e8a69816b Author: Jeff Muizelaar @@ -25463,7 +31721,7 @@ The code now also does proper rounding instead of just truncating. poppler/CairoOutputDev.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 1b3f045a25e5d172357bc87c15ba591c8e1511a7 Author: Albert Astals Cid @@ -25473,7 +31731,7 @@ incorrect pdf sent by Red Hat poppler/Stream.cc | 21 +++++++++++++++------ - 1 files changed, 15 insertions(+), 6 deletions(-) + 1 file changed, 15 insertions(+), 6 deletions(-) commit 944d327fd7036332a33b4ad6476ceca7a650ef6e Merge: fb1d1f4 c340255 @@ -25505,7 +31763,7 @@ qt4/.gitignore | 1 + qt4/tests/.gitignore | 3 +++ test/.gitignore | 2 ++ - 3 files changed, 6 insertions(+), 0 deletions(-) + 3 files changed, 6 insertions(+) commit cebf770379e7d71166e729aebf771a4ca291d48b Author: Brad Hards @@ -25522,7 +31780,7 @@ qt4/tests/Makefile.am | 7 ++++++- qt4/tests/check_search.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 46 insertions(+), 1 deletions(-) + 2 files changed, 46 insertions(+), 1 deletion(-) commit 570fe464a2aae4f22d0b47cce73b8bc36b116e9f Merge: 1c7b7a0 7875067 @@ -25542,7 +31800,7 @@ a password. qt4/tests/test-poppler-qt4.cpp | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 1c7b7a0c581b542945cac257202bbb819d33694c Author: Brad Hards @@ -25553,7 +31811,7 @@ Also, this is a test of my git newbie-ness. qt4/src/poppler-form.h | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit b86fc565d175835cf27e9c8632da47a5e0b50237 Author: Albert Astals Cid @@ -25633,7 +31891,7 @@ Update from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt COPYING | 27 +++++++++++++-------------- - 1 files changed, 13 insertions(+), 14 deletions(-) + 1 file changed, 13 insertions(+), 14 deletions(-) commit 34a90b35998b65539cf1e8f09194d45db71064a1 Author: Albert Astals Cid @@ -25642,7 +31900,7 @@ Remove duplicate checking poppler/JBIG2Stream.cc | 8 -------- - 1 files changed, 0 insertions(+), 8 deletions(-) + 1 file changed, 8 deletions(-) commit d694e1dd042fb97fbc62046b69cafe30d6f9ea58 Merge: ba5b31c 432e657 @@ -25659,7 +31917,7 @@ Require fontconfig >= 2.0 Fixes bug 9020 configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 432e657a49cb097638a79e38c141088039572816 Author: Jeff Muizelaar @@ -25681,7 +31939,7 @@ } goo/GooString.cc | 30 +++++++++++++++++------------- - 1 files changed, 17 insertions(+), 13 deletions(-) + 1 file changed, 17 insertions(+), 13 deletions(-) commit cb80112afed2c5b9642c3c43f1cc001ed88d08cb Author: Jonathan Kew @@ -25691,7 +31949,7 @@ dir. Fixes ugly warnings on mingw32 poppler/GlobalParams.cc | 6 ++++-- - 1 files changed, 4 insertions(+), 2 deletions(-) + 1 file changed, 4 insertions(+), 2 deletions(-) commit ad6b888edff7b30be72df948c4052b9934a37705 Author: Albert Astals Cid @@ -25700,7 +31958,7 @@ Add some castings to make it compile glib/test-poppler-glib.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit a968dcc759379f48265c91bea63ca4cf987d94a9 Author: Albert Astals Cid @@ -25722,8 +31980,8 @@ Improve documentation qt4/src/poppler-qt4.h | 64 - ++++++++++++++++++++++++++++++++++++++++++------ - 1 files changed, 56 insertions(+), 8 deletions(-) + ++++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 56 insertions(+), 8 deletions(-) commit 96493c9409186a7e964e894c7f730962b6995fd7 Author: Albert Astals Cid @@ -25733,7 +31991,7 @@ glib/test-poppler-glib.c | 514 ---------------------------------------------- - 1 files changed, 0 insertions(+), 514 deletions(-) + 1 file changed, 514 deletions(-) commit 951a05f7a11af4a44e4cb85a015939d6a3e513f5 Author: Albert Astals Cid @@ -25742,7 +32000,7 @@ Remove fordward declaration of a non-existant class poppler/Form.h | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 289679405ab143bc2106cf269227c514a1602e56 Author: Jeff Muizelaar @@ -25755,7 +32013,7 @@ same thing. poppler/Annot.cc | 15 ++++++++++++--- - 1 files changed, 12 insertions(+), 3 deletions(-) + 1 file changed, 12 insertions(+), 3 deletions(-) commit ab0a6c37faf9916edcd70e128d9f2654eb795ace Author: Albert Astals Cid @@ -25771,7 +32029,7 @@ glib/Makefile.am | 2 +- glib/test-poppler-glib.cc | 520 +++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 522 insertions(+), 1 deletions(-) + 3 files changed, 522 insertions(+), 1 deletion(-) commit 6bd637dc135045b20abf024d394538d7a3160795 Merge: c01ab71 25b273d @@ -25790,8 +32048,8 @@ poppler/GlobalParams.cc | 49 +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/GlobalParams.h | 7 ++++++ - 2 files changed, 56 insertions(+), 0 deletions(-) + poppler/GlobalParams.h | 7 +++++++ + 2 files changed, 56 insertions(+) commit 25b273db677815c8df11e52fe9df29fe857a8a88 Author: Jeff Muizelaar @@ -25808,7 +32066,7 @@ poppler/Gfx.cc | 4 ++++ poppler/GfxFont.cc | 4 ++++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit 57331767ed5306eba1f9bf60e48fc88debdc2198 Author: Albert Astals Cid @@ -25838,7 +32096,7 @@ splash/Splash.h | 4 +- splash/SplashFTFont.cc | 23 +++++- splash/SplashFTFont.h | 4 +- - splash/SplashFont.cc | 29 ++++++-- + splash/SplashFont.cc | 29 +++++-- splash/SplashFont.h | 5 +- splash/SplashT1Font.cc | 11 ++- splash/SplashT1Font.h | 4 +- @@ -25853,7 +32111,7 @@ goo/gmem.cc | 18 ++++++++++++++++++ goo/gmem.h | 3 +++ - 2 files changed, 21 insertions(+), 0 deletions(-) + 2 files changed, 21 insertions(+) commit 37e16ac301a35ceca2e3535f8c6100d4cf723c82 Author: Albert Astals Cid @@ -25863,7 +32121,7 @@ failure poppler/DCTStream.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit dbe975c129999a3efceb1c86518fa6fda74f685c Author: Carlos Garcia Campos @@ -25872,7 +32130,7 @@ Fix a crash with invalid TrueType fonts fofi/FoFiTrueType.cc | 10 ++++++---- - 1 files changed, 6 insertions(+), 4 deletions(-) + 1 file changed, 6 insertions(+), 4 deletions(-) commit 8bfe30a48fd7021591ab307bd51f86c06ff202b9 Author: Carlos Garcia Campos @@ -25881,7 +32139,7 @@ Do not generate appearance stream for radio button that are not active poppler/Annot.cc | 3 ++- - 1 files changed, 2 insertions(+), 1 deletions(-) + 1 file changed, 2 insertions(+), 1 deletion(-) commit 1a531dcfee1c6fc79a414c38cbe7327fbf9a59d8 Author: Carlos Garcia Campos @@ -25890,7 +32148,7 @@ Fix a crash with invalid embedded fonts poppler/CairoFontEngine.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit e1740278457e512676b623bcdf9968193f0a8d7b Author: Carlos Garcia Campos @@ -25913,7 +32171,7 @@ See evince bug: http://bugzilla.gnome.org/show_bug.cgi?id=486957 poppler/Form.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 03e1da99f7393fb1103643311b0b5af7b875e09c Author: Jeff Muizelaar @@ -25926,7 +32184,7 @@ poppler/CairoOutputDev.cc | 9 +++++++++ poppler/CairoOutputDev.h | 2 +- - 2 files changed, 10 insertions(+), 1 deletions(-) + 2 files changed, 10 insertions(+), 1 deletion(-) commit 825c942d46e0c3e254028441015c5dd8440cc734 Author: Albert Astals Cid @@ -25935,7 +32193,7 @@ Copy the embeddef file description string correctly poppler/Catalog.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit 5e60da78695eff44cc10dbce46ef170727f682b1 Author: Albert Astals Cid @@ -25945,7 +32203,7 @@ qt4/src/poppler-embeddedfile.cc | 1 + qt4/src/poppler-private.h | 2 +- - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit 1627fbbde8be01af3bdd2583f3439897a37d5215 Author: Jeff Muizelaar @@ -25959,7 +32217,7 @@ wrong when width != maskWidth or heigh != maskHeight. Fixes #12668. poppler/CairoOutputDev.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 3156d560c5eaf6970da422d0b09fd2e95bfe6d1d Author: Carlos Garcia Campos @@ -25969,7 +32227,7 @@ to non existent objects. Fixes bug #11865 poppler/Form.cc | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit f0b5e6286e94c6153c8247b5fae63a18622c48d3 Author: Carlos Garcia Campos @@ -25978,7 +32236,7 @@ Do not return unknown field type for signature form fields glib/poppler-form-field.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 498fd7fb99b01a879d07e2ad12c0b9462a8fc438 Author: Carlos Garcia Campos @@ -26009,7 +32267,7 @@ it's the best thing to do, but it seems better. poppler/GfxFont.cc | 19 +++++++++++++++++++ - 1 files changed, 19 insertions(+), 0 deletions(-) + 1 file changed, 19 insertions(+) commit 3d0df46908379bce1d196b9dc41153b1adb5f725 Author: Michael Wolf @@ -26018,7 +32276,7 @@ Fix compile warning glib/test-poppler-glib.c | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit aba29e12528025c2cc71bf46e02e76ac4db2b193 Author: Carlos Garcia Campos @@ -26029,7 +32287,7 @@ glib/demo/Makefile.am | 2 + glib/demo/forms.c | 489 +++++++++++++++++++++++++++++++++++++++++++++++++ - glib/demo/forms.h | 31 +++ + glib/demo/forms.h | 31 ++++ glib/demo/main.c | 8 +- glib/demo/utils.c | 1 - 5 files changed, 527 insertions(+), 4 deletions(-) @@ -26049,7 +32307,7 @@ Silence deprecation warnings - annoying with msvc 2005. makefile.vc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 59d55f7371bee81c9392fa2d4174ceffaacde471 Author: Krzysztof Kowalczyk @@ -26058,7 +32316,7 @@ Fix misleading comment. goo/GooTimer.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit c36d8afc984795aca0a12a94ec7668092067db82 Author: Krzysztof Kowalczyk @@ -26071,7 +32329,7 @@ This reverts commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec. poppler/XRef.cc | 25 +++++++++++++++++++++---- - 1 files changed, 21 insertions(+), 4 deletions(-) + 1 file changed, 21 insertions(+), 4 deletions(-) commit ff25e83abae1ca17e2e7dd6f20946026fca69fff Author: Krzysztof Kowalczyk @@ -26079,7 +32337,7 @@ Make perf-test compile on unix as well. - test/Makefile.am | 16 ++++++- + test/Makefile.am | 16 +++++- test/perf-test-preview-dummy.cc | 1 + test/perf-test.cc | 104 ++++++++++++++++----------------------- @@ -26092,7 +32350,7 @@ Let perf-test.cc manage lifetime of rendered bitmap. test/perf-test-preview-win.cc | 7 ------- - 1 files changed, 0 insertions(+), 7 deletions(-) + 1 file changed, 7 deletions(-) commit b622b252cba068a15eae77df5deb261dd98affaf Author: Krzysztof Kowalczyk @@ -26101,7 +32359,7 @@ Disable my_error for now - seems to corrupt memory. test/perf-test.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit bde8c9669ca6b43cb6a664bd14df164a718041ea Author: Krzysztof Kowalczyk @@ -26110,7 +32368,7 @@ Con't copy the file unless COPY_FILE is defined. test/perf-test.cc | 11 ++++++++++- - 1 files changed, 10 insertions(+), 1 deletions(-) + 1 file changed, 10 insertions(+), 1 deletion(-) commit bf9b46b012c64624818a2110af7c4b7e3b419728 Author: Krzysztof Kowalczyk @@ -26119,7 +32377,7 @@ Respect -loadonly cmd-line arg. test/perf-test.cc | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 2f664b654ca19135f0f8a0fe89872b9e0d526fa2 Author: Krzysztof Kowalczyk @@ -26138,8 +32396,8 @@ Use GooTimer instead of my own timer. test/perf-test.cc | 98 - ++++------------------------------------------------ - 1 files changed, 8 insertions(+), 90 deletions(-) + +++++------------------------------------------------ + 1 file changed, 8 insertions(+), 90 deletions(-) commit 05fbce5b6657e883ece9054c79576b25271a05a4 Author: Krzysztof Kowalczyk @@ -26148,9 +32406,9 @@ Make GooTimer work for Windows/msvc build. goo/GooTimer.cc | 69 - +++++++++++++++++++++++++++++++++++++----------------- - goo/GooTimer.h | 28 +++++++++++++-------- - poppler/Gfx.cc | 11 +------- + +++++++++++++++++++++++++++++++++++++------------------ + goo/GooTimer.h | 28 +++++++++++++--------- + poppler/Gfx.cc | 11 ++------- 3 files changed, 66 insertions(+), 42 deletions(-) commit 6347915085a487da08d39a859f4261fa812dab09 @@ -26173,7 +32431,7 @@ was throwing msvc off. poppler/Error.cc | 12 +++--------- - 1 files changed, 3 insertions(+), 9 deletions(-) + 1 file changed, 3 insertions(+), 9 deletions(-) commit 71fb15f8bd131a13d8cf0f394fe601cfbb6e1772 Author: Krzysztof Kowalczyk @@ -26206,7 +32464,7 @@ Don't break aliasing. poppler/GlobalParams.cc | 40 ++++++++++++++++++---------------------- - 1 files changed, 18 insertions(+), 22 deletions(-) + 1 file changed, 18 insertions(+), 22 deletions(-) commit 71c47b30adf687a0bcece22834933267053360de Author: Krzysztof Kowalczyk @@ -26215,7 +32473,7 @@ Reduce compiler warnings. poppler/JBIG2Stream.cc | 16 ++++++++++++---- - 1 files changed, 12 insertions(+), 4 deletions(-) + 1 file changed, 12 insertions(+), 4 deletions(-) commit 8466d94929844c976bbad8bb7d1ea7f7f77cc196 Author: Krzysztof Kowalczyk @@ -26224,7 +32482,7 @@ Reduce compiler warnings. Tabs to spaces. fofi/FoFiType1C.cc | 30 +++++++++++++++--------------- - 1 files changed, 15 insertions(+), 15 deletions(-) + 1 file changed, 15 insertions(+), 15 deletions(-) commit c53b8ccfba6fa4345086493f9e44212721c11d0a Author: Krzysztof Kowalczyk @@ -26257,7 +32515,7 @@ Remove unused variables. utils/pdftoppm.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3179eee44eb0afbc642675268b9a4abb16ccdde3 Author: Krzysztof Kowalczyk @@ -26266,7 +32524,7 @@ Remove unused variables. utils/HtmlOutputDev.cc | 23 ----------------------- - 1 files changed, 0 insertions(+), 23 deletions(-) + 1 file changed, 23 deletions(-) commit e9dc379190aa3166870d0b11a05ccc4e9dad2706 Author: Krzysztof Kowalczyk @@ -26275,7 +32533,7 @@ Remove unused variables. poppler/ArthurOutputDev.cc | 16 +++++----------- - 1 files changed, 5 insertions(+), 11 deletions(-) + 1 file changed, 5 insertions(+), 11 deletions(-) commit 08bf7c1151d594d4c7d253a2c89f4f3a088ad8ec Author: Krzysztof Kowalczyk @@ -26286,7 +32544,7 @@ fix problems revealed by the change poppler/XRef.cc | 25 ++++--------------------- - 1 files changed, 4 insertions(+), 21 deletions(-) + 1 file changed, 4 insertions(+), 21 deletions(-) commit 5a1f670a4d16affeed86cdf643ab22f481caa3a5 Author: Krzysztof Kowalczyk @@ -26295,7 +32553,7 @@ ignore *.o files .gitignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit c156aed7234f82dea4cb384c1b8a7acdd34545be Author: Krzysztof Kowalczyk @@ -26304,7 +32562,7 @@ remove unused variables poppler/ABWOutputDev.cc | 10 ++-------- - 1 files changed, 2 insertions(+), 8 deletions(-) + 1 file changed, 2 insertions(+), 8 deletions(-) commit d0bdef4752be5fa609a0766ee87aa54d51611d9a Author: Krzysztof Kowalczyk @@ -26312,7 +32570,7 @@ undo accidental changes to file permissions - 0 files changed, 0 insertions(+), 0 deletions(-) + 0 files changed commit 6c69473f2f4a49757614ddd249e65bb7a13c63c1 Author: Krzysztof Kowalczyk @@ -26320,7 +32578,7 @@ undo accidental mode change - 0 files changed, 0 insertions(+), 0 deletions(-) + 0 files changed commit e7e386e7ce8cb8eb8a7037ebdaa601524d332ae7 Author: Krzysztof Kowalczyk @@ -26341,7 +32599,7 @@ test/perf-test.cc | 176 ++++++++++++++++++++++++++--------------------------- - 1 files changed, 86 insertions(+), 90 deletions(-) + 1 file changed, 86 insertions(+), 90 deletions(-) commit 634718936f2a95fac2a9d12fcea483b3d0ca8fa6 Author: Krzysztof Kowalczyk @@ -26351,9 +32609,9 @@ test/perf-test-pdf-engine.h | 78 ----------------------------------------- - test/perf-test-preview-win.cc | 5 +-- + test/perf-test-preview-win.cc | 5 ++- test/perf-test.cc | 75 - ++++++++++++++++++++++++++++++++++++++- + +++++++++++++++++++++++++++++++++++++-- 3 files changed, 75 insertions(+), 83 deletions(-) commit 617550199762fab42ca2e202e641e047b3efbac0 @@ -26366,7 +32624,7 @@ test/perf-test-preview-dummy.cc | 3 +- test/perf-test-preview-win.cc | 80 +++++++++++++++++++++++---- test/perf-test.cc | 114 - +++----------------------------------- + ++++----------------------------------- 4 files changed, 86 insertions(+), 178 deletions(-) commit fb5bf808b88992c1772a10e4ed9fe788fb618417 @@ -26377,7 +32635,7 @@ makefile.vc | 2 +- test/perf-test.cc | 4 ++++ - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit 60829b08a7440f36014f68ec54bee7a742412738 Author: Krzysztof Kowalczyk @@ -26387,7 +32645,7 @@ msvc/poppler/poppler-config.h | 143 +++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 143 insertions(+), 0 deletions(-) + 1 file changed, 143 insertions(+) commit 853c22a174bae81139edc9aeded7f26ae2655cef Author: Krzysztof Kowalczyk @@ -26397,7 +32655,7 @@ msvc/config.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 62 insertions(+), 0 deletions(-) + 1 file changed, 62 insertions(+) commit 31c43b118bd4372134018be6f6693f77d1f6a39b Author: Krzysztof Kowalczyk @@ -26442,7 +32700,7 @@ programmers honest configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit cdb6fcf98137473efd993e1374a6f010e9db67db Author: Krzysztof Kowalczyk @@ -26451,7 +32709,7 @@ Remove unused variables poppler/Annot.cc | 5 ++--- - 1 files changed, 2 insertions(+), 3 deletions(-) + 1 file changed, 2 insertions(+), 3 deletions(-) commit 0e76b49ac852a5a7ebae4c1f67b153e0b7c9f905 Author: Krzysztof Kowalczyk @@ -26461,7 +32719,7 @@ README.windows | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 63 insertions(+), 0 deletions(-) + 1 file changed, 63 insertions(+) commit c002b4dc75b2688ffe8a734cf3e15f5891797842 Author: Krzysztof Kowalczyk @@ -26474,7 +32732,7 @@ makefile.vc | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 149 insertions(+), 0 deletions(-) + 1 file changed, 149 insertions(+) commit 1f33fc58201c92120c587189d2e0e819f83167da Author: Krzysztof Kowalczyk @@ -26493,7 +32751,7 @@ test/perf-test-preview-win.cc | 222 ++++++ test/perf-test.cc | 1428 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 1803 insertions(+), 0 deletions(-) + 4 files changed, 1803 insertions(+) commit b96db4ad27535c2666fccdfe0a3c04cc7c37792d Author: Jeff Muizelaar @@ -26506,7 +32764,7 @@ but this code was not updated. Found by Matthew Woehlke. qt4/src/poppler-document.cc | 4 +--- - 1 files changed, 1 insertions(+), 3 deletions(-) + 1 file changed, 1 insertion(+), 3 deletions(-) commit 2a495f19d4465e15fd2fa96656d904315c79a443 Author: Kristian Høgsberg @@ -26516,7 +32774,7 @@ ChangeLog.mk | 81 ---------------------------------------------------------- - Makefile.am | 7 +++-- + Makefile.am | 7 ++--- 2 files changed, 4 insertions(+), 84 deletions(-) commit 7d5abbeec55e4b90b139671d96cfdf58bdab70b8 @@ -26531,7 +32789,7 @@ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Makefile.am | 4 +++ configure.ac | 2 +- - 3 files changed, 86 insertions(+), 1 deletions(-) + 3 files changed, 86 insertions(+), 1 deletion(-) commit 15ad81c64cd8b1cb438d41be402daa19a239db3d Author: Albert Astals Cid @@ -26540,7 +32798,7 @@ Use = instead of == in qt.m4 m4/qt.m4 | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 70fabcb96e207b9b889bb32c0cf5ea3fc0aa08f8 Author: Kristian Høgsberg @@ -26587,7 +32845,7 @@ ChangeLog | 6 + poppler/GlobalParamsWin.cc | 285 ++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 291 insertions(+), 0 deletions(-) + 2 files changed, 291 insertions(+) commit d18b5361a0504458da805ed6be037c9d648f9372 Author: Krzysztof Kowalczyk @@ -26596,7 +32854,7 @@ Update ChangeLog for previous checkin ChangeLog | 15 +++++++++++++++ - 1 files changed, 15 insertions(+), 0 deletions(-) + 1 file changed, 15 insertions(+) commit 3330763ddca66b30d5ee60aab94d6fe0bbae9c8f Author: Krzysztof Kowalczyk @@ -26637,9 +32895,9 @@ Add PSConverter::setOutputDevice() to set a QIODevice where writing the resulting PS. - ChangeLog | 7 +++++ + ChangeLog | 7 ++++++ qt4/src/poppler-ps-converter.cc | 51 - +++++++++++++++++++++++++++++++++++--- + ++++++++++++++++++++++++++++++++++++--- qt4/src/poppler-qt4.h | 5 +++- 3 files changed, 58 insertions(+), 5 deletions(-) @@ -26662,7 +32920,7 @@ ChangeLog | 4 ++++ poppler/PSOutputDev.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit eaf9d06cf0d08ccdc183759e0331dc2439a6f10f Author: Carlos Garcia Campos @@ -26684,7 +32942,7 @@ did not want to commit this gtk-doc.make | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3462851b4ea342651095f1803cd488bc3b3f5749 Author: Albert Astals Cid @@ -26707,7 +32965,7 @@ NEWS | 13 +++++++++++++ qt4/src/Makefile.am | 3 ++- - 2 files changed, 15 insertions(+), 1 deletions(-) + 2 files changed, 15 insertions(+), 1 deletion(-) commit c82208a44f3b09c27bc33831641e4f746dd4361f Author: Albert Astals Cid @@ -26768,18 +33026,18 @@ glib/poppler-form-field.cc | 205 +++++++++++++++++ glib/poppler-page.cc | 12 +- glib/reference/poppler-docs.sgml | 2 + - glib/reference/poppler-sections.txt | 108 +++++++++- + glib/reference/poppler-sections.txt | 108 ++++++++- glib/reference/poppler.types | 2 + - glib/reference/tmpl/poppler-action.sgml | 36 +++- + glib/reference/tmpl/poppler-action.sgml | 36 ++- glib/reference/tmpl/poppler-attachment.sgml | 65 ++++++ glib/reference/tmpl/poppler-document.sgml | 50 +++++ glib/reference/tmpl/poppler-enums.sgml | 60 +++++ glib/reference/tmpl/poppler-form-field.sgml | 315 +++++++++++++++++++++++++++ - glib/reference/tmpl/poppler-page.sgml | 236 ++++++++++++++++++++- + glib/reference/tmpl/poppler-page.sgml | 236 +++++++++++++++++++- glib/reference/tmpl/poppler-private.sgml | 6 + - glib/reference/tmpl/poppler.sgml | 49 ++++ - gtk-doc.make | 34 ++-- + glib/reference/tmpl/poppler.sgml | 49 +++++ + gtk-doc.make | 34 +-- 16 files changed, 1181 insertions(+), 28 deletions(-) commit 289e3893cda45055951bb8d3b82a45644bc0b6c6 @@ -26821,7 +33079,7 @@ ChangeLog | 4 ++++ poppler/PDFDoc.cc | 3 ++- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 500a87af9240344806c18ebbd05a89f4f4c69955 Author: Jeff Muizelaar @@ -26839,7 +33097,7 @@ poppler/CairoOutputDev.cc | 7 ++++++- poppler/Error.cc | 7 +++++++ poppler/Error.h | 1 + - 4 files changed, 21 insertions(+), 1 deletions(-) + 4 files changed, 21 insertions(+), 1 deletion(-) commit 0c22556bf70ff67eb388cdcd9784603030397785 Author: Jeff Muizelaar @@ -26853,7 +33111,7 @@ ChangeLog | 5 +++++ glib/demo/Makefile.am | 2 ++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit a23d45dd6cd8a2ac4181170a9ee924fe49a9781b Author: Jeff Muizelaar @@ -26865,7 +33123,7 @@ ChangeLog | 4 ++++ glib/poppler-page.cc | 2 ++ - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit bf489d5cebc467807f2b38f74f6a6e34a503a9ca Author: Albert Astals Cid @@ -26893,12 +33151,12 @@ ChangeLog | 10 ++++++ glib/poppler-page.cc | 81 ++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.h | 2 + - glib/poppler.h | 4 +- + glib/poppler-page.h | 2 ++ + glib/poppler.h | 4 +-- glib/test-poppler-glib.c | 2 +- poppler/TextOutputDev.cc | 74 +++++++++++++++++++++++++++++------------- - poppler/TextOutputDev.h | 34 +++++++++++++++---- + poppler/TextOutputDev.h | 34 ++++++++++++++----- 7 files changed, 163 insertions(+), 44 deletions(-) commit 59ddb5cc8bec54305b6d256ad9975e95ecdcb935 @@ -26912,7 +33170,7 @@ ChangeLog | 5 +++++ poppler/UnicodeTypeTable.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit a6e46ce61670679f368e66c1a98a7d5d1c960c5b Author: Albert Astals Cid @@ -26926,14 +33184,14 @@ * qt4/src/poppler-qt4.h: A few API documentation fixes and improvements. - ChangeLog | 10 ++++++ - qt4/src/Doxyfile | 26 +++++------------ - qt4/src/Mainpage.dox | 26 ++++++++++------ - qt4/src/poppler-annotation.h | 34 ++++++++++++++++++++++ + ChangeLog | 10 +++++++ + qt4/src/Doxyfile | 26 ++++++----------- + qt4/src/Mainpage.dox | 26 ++++++++++------- + qt4/src/poppler-annotation.h | 34 +++++++++++++++++++++++ qt4/src/poppler-form.h | 18 ++++++------ qt4/src/poppler-link.h | 63 - +++++++++++++++++++++++++++++++++++++++-- - qt4/src/poppler-qt4.h | 44 ++++++++++++++++++++--------- + +++++++++++++++++++++++++++++++++++++++--- + qt4/src/poppler-qt4.h | 44 +++++++++++++++++++---------- 7 files changed, 166 insertions(+), 55 deletions(-) commit a7f8d92fba8c45d6ca83568c045d5e324158ee6b @@ -26960,7 +33218,7 @@ ChangeLog | 4 ++++ utils/ImageOutputDev.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit 20bcac5ee1988befb9c590a0d16cb615f0c49901 Author: Albert Astals Cid @@ -26970,7 +33228,7 @@ qt4/src/poppler-annotation-private.h | 49 ++++++++++++++++++++++++++++++++++ - 1 files changed, 49 insertions(+), 0 deletions(-) + 1 file changed, 49 insertions(+) commit e48de657db0ef439457b4b5ca39b937da25d531e Author: Albert Astals Cid @@ -27014,7 +33272,7 @@ of the Link* classes into a common shared private. - ChangeLog | 23 +++- + ChangeLog | 23 ++- qt4/src/poppler-document.cc | 7 +- qt4/src/poppler-embeddedfile.cc | 12 -- qt4/src/poppler-fontinfo.cc | 12 +- @@ -27022,8 +33280,8 @@ qt4/src/poppler-form.h | 14 +- qt4/src/poppler-link.cc | 373 ++++++++++++++++++++++++++++++--------- - qt4/src/poppler-link.h | 67 +++++--- - qt4/src/poppler-qt4.h | 32 +++-- + qt4/src/poppler-link.h | 67 ++++--- + qt4/src/poppler-qt4.h | 32 ++-- qt4/src/poppler-sound.cc | 7 - qt4/src/poppler-textbox.cc | 4 +- 11 files changed, 404 insertions(+), 163 deletions(-) @@ -27056,16 +33314,16 @@ glib/demo/links.c | 289 ++++++++++++++++++++++++++++ glib/demo/links.h | 31 +++ glib/demo/main.c | 205 ++++++++++++++++++++ - glib/demo/outline.c | 218 +++++++++++++++++++++ + glib/demo/outline.c | 218 ++++++++++++++++++++++ glib/demo/outline.h | 31 +++ - glib/demo/page.c | 249 ++++++++++++++++++++++++ + glib/demo/page.c | 249 +++++++++++++++++++++++++ glib/demo/page.h | 31 +++ glib/demo/render.c | 498 +++++++++++++++++++++++++++++++++++++++++++++++++ glib/demo/render.h | 31 +++ glib/demo/utils.c | 234 +++++++++++++++++++++++ - glib/demo/utils.h | 42 ++++ - 19 files changed, 2482 insertions(+), 1 deletions(-) + glib/demo/utils.h | 42 +++++ + 19 files changed, 2482 insertions(+), 1 deletion(-) commit 7c9529b70dc44bb001d21a3b47fc65916813dec1 Author: Carlos Garcia Campos @@ -27076,7 +33334,7 @@ ChangeLog | 4 ++++ glib/poppler-page.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit 3c4a85503261ee81a829a1683f1f5fa85d41f8ee Author: Jeff Muizelaar @@ -27109,11 +33367,11 @@ - scale pdf to fit in a square of wanted size Patch by Ilmari Heikkinen - ChangeLog | 12 +++++ + ChangeLog | 12 ++++++ splash/SplashBitmap.cc | 18 ++++++-- splash/SplashBitmap.h | 2 + utils/pdftoppm.cc | 107 - ++++++++++++++++++++++++++++++++++++++++------- + ++++++++++++++++++++++++++++++++++++++++-------- 4 files changed, 119 insertions(+), 20 deletions(-) commit 567e82c13aace4f40c7a555a62a3a4d223a46d92 @@ -27127,7 +33385,7 @@ ChangeLog | 4 ++++ poppler/GlobalParams.cc | 1 - - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit bc499987074d046baf29deafe4a29d57039c0c5e Author: Jeff Muizelaar @@ -27155,7 +33413,7 @@ ChangeLog | 6 ++++++ poppler/CairoOutputDev.cc | 3 +++ - 2 files changed, 9 insertions(+), 0 deletions(-) + 2 files changed, 9 insertions(+) commit 099eb56896046e020f4ef0365e1ee382f85ec1ab Author: Albert Astals Cid @@ -27176,7 +33434,7 @@ ChangeLog | 1 + NEWS | 18 ++++++++++++++++++ configure.ac | 2 +- - 3 files changed, 20 insertions(+), 1 deletions(-) + 3 files changed, 20 insertions(+), 1 deletion(-) commit c240daefe660ac3456dc0c5f5dc82aa53ebc3313 Author: Albert Astals Cid @@ -27214,7 +33472,7 @@ ChangeLog | 6 ++++++ poppler/CairoOutputDev.cc | 7 ++++++- - 2 files changed, 12 insertions(+), 1 deletions(-) + 2 files changed, 12 insertions(+), 1 deletion(-) commit af97e5f8e0f3beeb43acde92a0788c02d9718adf Author: Carlos Garcia Campos @@ -27228,13 +33486,13 @@ * poppler/Page.cc: Do not always regenerate appearance stream for every form widget, but only when it's actually needed. - ChangeLog | 9 +++++ + ChangeLog | 9 ++++++ poppler/Annot.cc | 86 - ++++++++++++++++++++++++++++++++--------------------- - poppler/Annot.h | 8 ++-- - poppler/Form.cc | 25 ++------------- + +++++++++++++++++++++++++++++++++--------------------- + poppler/Annot.h | 8 ++--- + poppler/Form.cc | 25 +++------------- poppler/Form.h | 4 ++- - poppler/Page.cc | 8 +---- + poppler/Page.cc | 8 ++--- 6 files changed, 74 insertions(+), 66 deletions(-) commit 74627e71388ca0a4c0938a472c291ef87186f370 @@ -27261,7 +33519,7 @@ ChangeLog | 5 +++++ glib/poppler-document.cc | 16 ++++++++++++++++ glib/poppler-document.h | 1 + - 3 files changed, 22 insertions(+), 0 deletions(-) + 3 files changed, 22 insertions(+) commit 4d57b8a12b845d5d5ac321d7a4bca980d60d429f Author: Jeff Muizelaar @@ -27275,7 +33533,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.h | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit f04a67006abdb5843ab481aa1e25b51abd1b1b64 Author: Carlos Garcia Campos @@ -27301,7 +33559,7 @@ ChangeLog | 6 ++++++ poppler/CairoOutputDev.h | 11 +++++++++++ - 2 files changed, 17 insertions(+), 0 deletions(-) + 2 files changed, 17 insertions(+) commit e08779856c801b9968dc2d47e28e86abc1ec7110 Author: Jeff Muizelaar @@ -27323,7 +33581,7 @@ ChangeLog | 10 ++++++++++ poppler/GfxFont.cc | 1 + - 2 files changed, 11 insertions(+), 0 deletions(-) + 2 files changed, 11 insertions(+) commit 86fc9a6f343be920f5159e745947401227e41a37 Author: Jeff Muizelaar @@ -27340,7 +33598,7 @@ ChangeLog | 6 + poppler/CairoOutputDev.cc | 300 +++++++++++++++++++++++++++++++++++++++++++-- - poppler/CairoOutputDev.h | 10 ++- + poppler/CairoOutputDev.h | 10 +- 3 files changed, 303 insertions(+), 13 deletions(-) commit f754246e47161e9bf99887201e283c1419ade4f1 @@ -27353,7 +33611,7 @@ ChangeLog | 4 ++++ configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit bb20249ac676995725b617ef442f5feb01f78205 Author: Jeff Muizelaar @@ -27368,8 +33626,8 @@ ChangeLog | 6 ++ poppler/CairoOutputDev.cc | 133 +++++++++++++++++++++++++++++++++++++++++++++ - poppler/CairoOutputDev.h | 21 +++++++- - 3 files changed, 159 insertions(+), 1 deletions(-) + poppler/CairoOutputDev.h | 21 ++++++- + 3 files changed, 159 insertions(+), 1 deletion(-) commit a85acecaeb0d122becbc52a385d918561e995eca Author: Jeff Muizelaar @@ -27397,7 +33655,7 @@ ChangeLog | 4 ++++ glib/test-poppler-glib.c | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 81393cb30f6287caf5195265cdc039555f2767d3 Author: Carlos Garcia Campos @@ -27410,12 +33668,12 @@ * poppler/Form.h: Make fieldLookup static in Form and use it from both Form and Annot. - ChangeLog | 8 ++++++ - poppler/Annot.cc | 43 +++++++++------------------------- + ChangeLog | 8 +++++++ + poppler/Annot.cc | 43 ++++++++++------------------------- poppler/Annot.h | 1 - poppler/Form.cc | 66 - ++++++++++++++++++++++++++--------------------------- - poppler/Form.h | 2 + + ++++++++++++++++++++++++++---------------------------- + poppler/Form.h | 2 ++ 5 files changed, 54 insertions(+), 66 deletions(-) commit 81b669dcb14bf821a49c9879f8d4129075647f5f @@ -27456,7 +33714,7 @@ micro optimization qt4/src/poppler-page.cc | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 525a7f49dd95f2644870a1c59ca15124e30026b4 Author: Carlos Garcia Campos @@ -27474,7 +33732,7 @@ ChangeLog | 10 +++++++ poppler/Annot.cc | 27 ++++++++++--------- poppler/Form.cc | 77 - +++++++++++++++++++++++++++++++++++++---------------- + ++++++++++++++++++++++++++++++++++++++---------------- 3 files changed, 78 insertions(+), 36 deletions(-) commit 633a1cde65f86ee6577a68f4f8d36de43d14c714 @@ -27578,10 +33836,10 @@ poppler/CairoFontEngine.cc | 47 ++----- poppler/CharCodeToUnicode.cc | 16 +++ poppler/CharCodeToUnicode.h | 1 + - poppler/GfxFont.cc | 232 ++++++++++++++++++++++++++++---- + poppler/GfxFont.cc | 230 +++++++++++++++++++++++++++---- poppler/GfxFont.h | 2 + poppler/SplashOutputDev.cc | 53 ++------ - 9 files changed, 578 insertions(+), 103 deletions(-) + 9 files changed, 577 insertions(+), 102 deletions(-) commit 8389099d8e8940e3f8920b14a83075d69bcd8e6c Author: Albert Astals Cid @@ -27680,7 +33938,7 @@ glib/test-poppler-glib.c | 1 + poppler/Form.cc | 11 +++++++++++ poppler/Form.h | 4 ++++ - 6 files changed, 34 insertions(+), 0 deletions(-) + 6 files changed, 34 insertions(+) commit 8a68855735e9d295d71685e82de39204d639ea7a Author: Carlos Garcia Campos @@ -27727,7 +33985,7 @@ ChangeLog | 5 +++++ poppler/Form.cc | 3 +++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit a33518a3283ff25aa5517bc535ddb61383b1cfdc Author: Albert Astals Cid @@ -27800,7 +34058,7 @@ ChangeLog | 7 +++++++ qt4/src/poppler-form.cc | 2 +- qt4/src/poppler-private.h | 15 +++++++++++++++ - 3 files changed, 23 insertions(+), 1 deletions(-) + 3 files changed, 23 insertions(+), 1 deletion(-) commit b70115cf979b29f75c644518ae0e9c0dd9892ebf Author: Carlos Garcia Campos @@ -27831,12 +34089,12 @@ ChangeLog | 12 ++++ glib/poppler-attachment.cc | 25 +++++++- - glib/poppler-attachment.h | 16 +++-- + glib/poppler-attachment.h | 16 ++--- glib/poppler-document.cc | 142 +++++++++++++++++++++++--------------------- glib/poppler-private.h | 6 +- glib/poppler.h | 1 + - glib/test-poppler-glib.c | 56 +++++++++++++++-- + glib/test-poppler-glib.c | 56 ++++++++++++++--- 7 files changed, 171 insertions(+), 87 deletions(-) commit d933f47d4af0992059148259a189373b42499bbe @@ -27866,7 +34124,7 @@ ChangeLog | 7 +++++++ poppler/Catalog.cc | 1 - qt4/tests/poppler-attachments.cpp | 1 + - 3 files changed, 8 insertions(+), 1 deletions(-) + 3 files changed, 8 insertions(+), 1 deletion(-) commit 7fa87eb2b093770271bc3a72de5b0b9dc228aa1b Author: Carlos Garcia Campos @@ -27882,7 +34140,7 @@ glib/poppler-form-field.cc | 8 ++++++++ glib/poppler-form-field.h | 1 + glib/test-poppler-glib.c | 2 ++ - 4 files changed, 18 insertions(+), 0 deletions(-) + 4 files changed, 18 insertions(+) commit 8b67e0403f6eaab6770cc0b7861074ae0b6d85bb Author: Carlos Garcia Campos @@ -27951,7 +34209,7 @@ glib/poppler-form-field.cc | 8 ++++++++ glib/poppler-form-field.h | 1 + glib/test-poppler-glib.c | 6 +++++- - 4 files changed, 23 insertions(+), 1 deletions(-) + 4 files changed, 23 insertions(+), 1 deletion(-) commit 11875746ce28e8999bcad46167fcfea131cd267a Author: Carlos Garcia Campos @@ -27964,7 +34222,7 @@ ChangeLog | 6 ++++++ glib/poppler-page.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 0a5acaae3b9bfcd731bc4e072f35f9433aa773da Author: Carlos Garcia Campos @@ -27984,17 +34242,17 @@ in order to make it more consistent with the current API and easier to use. - ChangeLog | 15 ++ + ChangeLog | 15 +++ glib/Makefile.am | 2 + glib/poppler-document.cc | 197 ++------------------------- - glib/poppler-document.h | 55 +-------- + glib/poppler-document.h | 55 +------- glib/poppler-form-field.cc | 316 ++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-form-field.h | 96 +++++++++++++ + glib/poppler-form-field.h | 96 ++++++++++++++ glib/poppler-page.cc | 210 ++++++++++++----------------- - glib/poppler-page.h | 55 ++------- + glib/poppler-page.h | 55 ++------ glib/poppler-private.h | 11 +- - glib/poppler.h | 40 ++---- + glib/poppler.h | 40 +++--- glib/test-poppler-glib.c | 119 ++++++++++++++--- 11 files changed, 662 insertions(+), 454 deletions(-) @@ -28038,7 +34296,7 @@ qt4/src/poppler-document.cc | 13 +++++++++++++ qt4/src/poppler-qt4.h | 5 +++++ qt4/tests/test-poppler-qt4.cpp | 1 + - 4 files changed, 24 insertions(+), 0 deletions(-) + 4 files changed, 24 insertions(+) commit 08d4c437e735ac50a340c4ae17ee0eeccd00dc20 Author: Albert Astals Cid @@ -28051,7 +34309,7 @@ ChangeLog | 6 ++++++ glib/poppler-document.cc | 21 +++++++++++++++++++++ - 2 files changed, 27 insertions(+), 0 deletions(-) + 2 files changed, 27 insertions(+) commit cdd2a49dc99aa16ded674c58dbb50298f06cf18a Author: Albert Astals Cid @@ -28079,11 +34337,11 @@ by Jauco Noordzij . Fixes bug #11187 - ChangeLog | 6 +++ + ChangeLog | 6 ++++ poppler/ABWOutputDev.cc | 80 ++++++++++++++++++++++++++++++++++++++++++++++- poppler/ABWOutputDev.h | 1 + - 3 files changed, 86 insertions(+), 1 deletions(-) + 3 files changed, 86 insertions(+), 1 deletion(-) commit 948520cd529ce47d1970aae6a0b8058128e37c30 Author: Albert Astals Cid @@ -28124,7 +34382,7 @@ ChangeLog | 4 ++++ configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit a67a93fc6b4812a4f892b311c5b299e59283cd47 Author: Albert Astals Cid @@ -28166,7 +34424,7 @@ ChangeLog | 4 ++++ poppler/Annot.cc | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 49535c20b4f71d1c1381134233e2e1449cf560c0 Author: Jeff Muizelaar @@ -28191,7 +34449,7 @@ correct form of patch 11102 utils/HtmlFonts.cc | 5 ++++- - 1 files changed, 4 insertions(+), 1 deletions(-) + 1 file changed, 4 insertions(+), 1 deletion(-) commit cdf70857ece0748f13b11c923ccf9626094555b4 Author: Albert Astals Cid @@ -28221,7 +34479,7 @@ ChangeLog | 6 ++++++ configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 03d766ea1ddd4ce6d938f96b53906a7dc8bd179a Author: Albert Astals Cid @@ -28230,7 +34488,7 @@ make dist needs this qt4/src/Makefile.am | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit d540c04268047fdd125ad932ca05c7553a97c0fe Author: Albert Astals Cid @@ -28263,7 +34521,7 @@ ChangeLog | 4 ++++ poppler/gen-unicode-tables.py | 38 ++++++++++++++++++++++++++++++++++++++ - 2 files changed, 42 insertions(+), 0 deletions(-) + 2 files changed, 42 insertions(+) commit 97e602752b05f3690acb1821bdca31c5771361e1 Author: Carlos Garcia Campos @@ -28277,7 +34535,7 @@ ChangeLog | 7 ++ glib/poppler-page.cc | 198 - +++++++++++++++++++++++++++------------------ + ++++++++++++++++++++++++++++------------------ glib/poppler-page.h | 6 +- glib/test-poppler-glib.c | 39 +++++++++ 4 files changed, 168 insertions(+), 82 deletions(-) @@ -28307,7 +34565,7 @@ ChangeLog | 2 ++ NEWS | 15 +++++++++++++++ configure.ac | 2 +- - 3 files changed, 18 insertions(+), 1 deletions(-) + 3 files changed, 18 insertions(+), 1 deletion(-) commit e6ff9e0d95e058f6aff3c72d5f4d7d7ccf661999 Author: Albert Astals Cid @@ -28360,7 +34618,7 @@ ChangeLog | 5 +++++ qt4/src/poppler-link-extractor.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 774a9456c668ef70b2e8f17d59f8f427aa97bad5 Author: Jeff Muizelaar @@ -28411,13 +34669,13 @@ * qt4/src/poppler-qt4.h: A few of API documentation fixes and improvements. - ChangeLog | 10 +++++++ - qt4/src/Mainpage.dox | 8 +---- - qt4/src/poppler-document.cc | 5 ++- + ChangeLog | 10 ++++++++ + qt4/src/Mainpage.dox | 8 ++---- + qt4/src/poppler-document.cc | 5 ++-- qt4/src/poppler-link.h | 4 ++- qt4/src/poppler-private.h | 1 + qt4/src/poppler-qt4.h | 57 - ++++++++++++++++++++++++++++-------------- + ++++++++++++++++++++++++++++--------------- 6 files changed, 57 insertions(+), 28 deletions(-) commit 36d1fe292778ba29990a389c50a0df0d51f11913 @@ -28428,7 +34686,7 @@ ChangeLog | 4 ++++ glib/poppler-action.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit 5b411246a2cce6ed3bb2d8c9e9d856227b6aba7f Author: Albert Astals Cid @@ -28438,10 +34696,10 @@ * glib/poppler-page.h: poppler_page_render_section() for cairo. Bug 7023 - ChangeLog | 6 +++ + ChangeLog | 6 ++++ glib/poppler-page.cc | 88 ++++++++++++++++++++++++++++++++++++++++++++------ - glib/poppler-page.h | 9 +++++ + glib/poppler-page.h | 9 ++++++ 3 files changed, 93 insertions(+), 10 deletions(-) commit 409f2a9cb31add29accb87011331c50dc08110cd @@ -28458,11 +34716,11 @@ image caching when rendering ChangeLog | 11 +++ - glib/poppler-page.cc | 161 ++++++++++++++++++++++++++++++++-- - glib/poppler-page.h | 10 ++ + glib/poppler-page.cc | 161 +++++++++++++++++++++++++++++++-- + glib/poppler-page.h | 10 +++ glib/poppler-private.h | 3 + glib/poppler.h | 9 +- - glib/test-poppler-glib.c | 27 ++++++- + glib/test-poppler-glib.c | 27 +++++- poppler/CairoOutputDev.cc | 215 +++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoOutputDev.h | 122 +++++++++++++++++++++++++ @@ -28504,7 +34762,7 @@ ChangeLog | 7 +++++++ qt4/src/poppler-link.cc | 12 ++++++++++++ qt4/src/poppler-private.h | 4 +++- - 3 files changed, 22 insertions(+), 1 deletions(-) + 3 files changed, 22 insertions(+), 1 deletion(-) commit d68a4eb44b5390b3093774f39a6805ad2e95c146 Author: Jeff Muizelaar @@ -28535,7 +34793,7 @@ poppler/Catalog.cc | 1 + poppler/Form.cc | 5 +++++ poppler/Page.cc | 1 + - 4 files changed, 14 insertions(+), 0 deletions(-) + 4 files changed, 14 insertions(+) commit d46553d696b2d7fe416ce8db40db54dd1d7c6733 Author: Albert Astals Cid @@ -28549,7 +34807,7 @@ ChangeLog | 6 ++++++ poppler/Makefile.am | 1 - - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit d5c52409c532a126bcb8eb65f6f1390113a5f258 Author: Albert Astals Cid @@ -28558,7 +34816,7 @@ jeff committed this line by mistake ChangeLog | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit 6ddc11ef4c534369ee104422bfb989603c466790 Author: Jeff Muizelaar @@ -28591,13 +34849,13 @@ splashModeXBGR8 and hopefully fix qt frontends image generation - ChangeLog | 10 ++++ + ChangeLog | 10 +++++ poppler/SplashOutputDev.cc | 102 ++++++++++++++++++++++++++++++++------------ qt/poppler-private.h | 2 +- qt4/src/poppler-private.h | 2 +- splash/Splash.cc | 44 ++++++++++--------- - splash/SplashBitmap.cc | 16 +++--- + splash/SplashBitmap.cc | 16 +++---- splash/SplashTypes.h | 4 +- 7 files changed, 120 insertions(+), 60 deletions(-) @@ -28609,7 +34867,7 @@ splash/Splash.cc | 1 + splash/SplashBitmap.cc | 1 - - 2 files changed, 1 insertions(+), 1 deletions(-) + 2 files changed, 1 insertion(+), 1 deletion(-) commit e2ac4ada3e29139053871ff7f53772e1ccc7adc0 Author: Albert Astals Cid @@ -28619,7 +34877,7 @@ Although i'm not sure we want to printf this... poppler/GlobalParams.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 9b8133940638c95940edcb9b98126ca9a4f7b8d4 Author: Albert Astals Cid @@ -28636,12 +34894,12 @@ to the printing process. - ChangeLog | 10 ++ + ChangeLog | 10 +++ qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 39 +------- + qt4/src/poppler-document.cc | 39 ++------ qt4/src/poppler-ps-converter.cc | 190 +++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-qt4.h | 119 +++++++++++++++++++++---- + qt4/src/poppler-qt4.h | 119 ++++++++++++++++++++---- 5 files changed, 307 insertions(+), 52 deletions(-) commit 26d5fefcd4c858e2ebd689d963a65773957ac808 @@ -28655,7 +34913,7 @@ ChangeLog | 6 ++++++ qt4/src/poppler-page.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 218364bc4951682de8e63e1bd3f061636b08b615 Author: Albert Astals Cid @@ -28684,7 +34942,7 @@ ChangeLog | 5 +++++ qt4/src/poppler-annotation.h | 3 +++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit 3f4bf880b95e28a1ae7a38b18b341e089860780c Author: Albert Astals Cid @@ -28703,14 +34961,14 @@ parameter of the Page::render() can be dropped. - ChangeLog | 13 +++++ + ChangeLog | 13 ++++++ qt4/src/Makefile.am | 3 +- qt4/src/poppler-link-extractor-private.h | 55 ++++++++++++++++++++++ qt4/src/poppler-link-extractor.cc | 74 ++++++++++++++++++++++++++++++ qt4/src/poppler-page-private.h | 38 +++++++++++++++ - qt4/src/poppler-page.cc | 52 +++------------------ - qt4/src/poppler-private.h | 5 ++- + qt4/src/poppler-page.cc | 52 ++++----------------- + qt4/src/poppler-private.h | 5 +- qt4/src/poppler-qt4.h | 4 +- 8 files changed, 195 insertions(+), 49 deletions(-) @@ -28768,17 +35026,17 @@ frontends to poppler core. Expose Page transitions on the glib frontend. - ChangeLog | 15 +++ + ChangeLog | 15 ++++ glib/poppler-page.cc | 122 +++++++++++++++++++++++++ - glib/poppler-page.h | 111 ++++++++++++++---------- - glib/poppler.h | 58 +++++++++--- + glib/poppler-page.h | 111 +++++++++++++---------- + glib/poppler.h | 58 ++++++++---- glib/test-poppler-glib.c | 60 +++++++++++++ poppler/Makefile.am | 2 + poppler/PageTransition.cc | 197 +++++++++++++++-------------------------- poppler/PageTransition.h | 86 ++++++++++++++++++ - qt/poppler-page-transition.cc | 145 ++++++------------------------- - qt/poppler-page-transition.h | 9 ++- + qt/poppler-page-transition.cc | 145 ++++++------------------------ + qt/poppler-page-transition.h | 9 +- 10 files changed, 497 insertions(+), 308 deletions(-) commit 877d6b202a75eb12119b16e740f85cc8b477d589 @@ -28802,13 +35060,13 @@ Patches for other frontends more than welcome Comments and suggestions even more than welcome :-) - ChangeLog | 14 ++++++++++++ - glib/poppler-page.cc | 3 +- + ChangeLog | 14 +++++++++++++ + glib/poppler-page.cc | 3 ++- poppler/PSOutputDev.cc | 48 - +++++++++++++++++++++++++++++------------- - poppler/PSOutputDev.h | 17 +++++++++----- + +++++++++++++++++++++++++++++-------------- + poppler/PSOutputDev.h | 17 +++++++++------ qt/poppler-document.cc | 2 +- - qt4/src/poppler-document.cc | 9 ++++++- + qt4/src/poppler-document.cc | 9 ++++++-- qt4/src/poppler-qt4.h | 2 +- utils/pdftohtml.cc | 2 +- utils/pdftops.cc | 2 +- @@ -28822,7 +35080,7 @@ ChangeLog | 4 ++++ goo/Makefile.am | 1 - - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit f6adb46cd88d23b34f1918d3be31c05b68b6a443 Author: Albert Astals Cid @@ -28831,7 +35089,7 @@ ignore pdftoabw binary utils/.cvsignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit e09f231ac6c03ac2c3606f1bf20ba1bde3d85abd Author: Albert Astals Cid @@ -28846,7 +35104,7 @@ ChangeLog | 5 +++++ qt4/src/poppler-document.cc | 1 - qt4/src/poppler-private.h | 1 + - 3 files changed, 6 insertions(+), 1 deletions(-) + 3 files changed, 6 insertions(+), 1 deletion(-) commit bf7e0e980bf29994021cb1228f89f582adddf284 Author: Albert Astals Cid @@ -28876,7 +35134,7 @@ goo/gmem.h | 27 +- poppler/ABWOutputDev.cc | 1 - poppler/ABWOutputDev.h | 1 - - poppler/Annot.cc | 1685 ++++++++++--- + poppler/Annot.cc | 1685 +++++++++--- poppler/Annot.h | 83 +- poppler/ArthurOutputDev.cc | 13 +- poppler/Catalog.cc | 79 +- @@ -28884,7 +35142,7 @@ poppler/CharCodeToUnicode.cc | 31 +- poppler/DCTStream.cc | 2 +- poppler/DCTStream.h | 4 +- - poppler/Decrypt.cc | 427 +++- + poppler/Decrypt.cc | 427 ++- poppler/Decrypt.h | 54 +- poppler/Dict.cc | 23 +- poppler/Dict.h | 27 +- @@ -28893,17 +35151,17 @@ poppler/Form.h | 2 +- poppler/Function.cc | 65 +- poppler/Function.h | 8 +- - poppler/Gfx.cc | 1247 +++++++--- + poppler/Gfx.cc | 1247 ++++++--- poppler/Gfx.h | 39 +- poppler/GfxFont.cc | 45 +- poppler/GfxFont.h | 7 +- - poppler/GfxState.cc | 209 ++- + poppler/GfxState.cc | 209 +- poppler/GfxState.h | 42 +- - poppler/GlobalParams.cc | 399 +++- + poppler/GlobalParams.cc | 399 ++- poppler/GlobalParams.h | 41 +- poppler/JBIG2Stream.cc | 96 +- poppler/JBIG2Stream.h | 4 +- - poppler/JPXStream.cc | 246 ++- + poppler/JPXStream.cc | 246 +- poppler/JPXStream.h | 8 +- poppler/Lexer.cc | 18 +- poppler/Link.cc | 150 +- @@ -28919,7 +35177,7 @@ poppler/PSOutputDev.cc | 2715 ++++++++++++++----- poppler/PSOutputDev.h | 58 +- poppler/PSTokenizer.cc | 2 +- - poppler/Page.cc | 227 ++- + poppler/Page.cc | 227 +- poppler/Page.h | 22 +- poppler/PageLabelInfo.cc | 1 - poppler/Parser.cc | 66 +- @@ -28930,9 +35188,9 @@ poppler/SecurityHandler.h | 5 + poppler/SplashOutputDev.cc | 1480 ++++++----- poppler/SplashOutputDev.h | 41 +- - poppler/Stream.cc | 338 ++-- + poppler/Stream.cc | 338 +-- poppler/Stream.h | 39 +- - poppler/TextOutputDev.cc | 537 ++++- + poppler/TextOutputDev.cc | 537 +++- poppler/TextOutputDev.h | 77 +- poppler/UGooString.cc | 182 -- poppler/UGooString.h | 79 - @@ -28953,7 +35211,7 @@ splash/Splash.h | 137 +- splash/SplashBitmap.cc | 110 +- splash/SplashBitmap.h | 10 +- - splash/SplashClip.cc | 276 ++- + splash/SplashClip.cc | 276 +- splash/SplashClip.h | 28 +- splash/SplashFTFont.cc | 104 +- splash/SplashFTFont.h | 5 +- @@ -28982,7 +35240,7 @@ splash/SplashT1FontFile.cc | 9 +- splash/SplashT1FontFile.h | 7 +- splash/SplashTypes.h | 72 +- - splash/SplashXPath.cc | 353 ++-- + splash/SplashXPath.cc | 353 +-- splash/SplashXPath.h | 26 +- splash/SplashXPathScanner.cc | 143 + splash/SplashXPathScanner.h | 13 + @@ -29007,7 +35265,7 @@ ChangeLog | 7 +++++++ qt4/src/poppler-private.h | 5 ++++- - 2 files changed, 11 insertions(+), 1 deletions(-) + 2 files changed, 11 insertions(+), 1 deletion(-) commit 6c7969f37c85f326327aca98e0346f2ebc86ffda Author: Albert Astals Cid @@ -29032,7 +35290,7 @@ CCMAIL: aacid@kde.org qt4/src/poppler-embeddedfile.cc | 1 - - 1 files changed, 0 insertions(+), 1 deletions(-) + 1 file changed, 1 deletion(-) commit f3ded10305f6ac682640c37c21f569db0f830756 Author: Jeff Muizelaar @@ -29045,7 +35303,7 @@ ChangeLog | 5 +++++ utils/pdftoabw.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 2fcb76df955c143153fe4b273d0388fcb7f67d8a Author: Jeff Muizelaar @@ -29068,9 +35326,9 @@ Patch by Dominic Lachowicz ChangeLog | 12 ++++++ - poppler/ABWOutputDev.cc | 3 + + poppler/ABWOutputDev.cc | 3 ++ utils/pdftoabw.cc | 101 - +++++++++++++++++++++++++++------------------- + +++++++++++++++++++++++++++-------------------- 3 files changed, 74 insertions(+), 42 deletions(-) commit 29da65ec48b5ba91139084e197ce457d3cff3732 @@ -29082,7 +35340,7 @@ ChangeLog | 5 +++++ poppler/PSOutputDev.cc | 5 +++++ - 2 files changed, 10 insertions(+), 0 deletions(-) + 2 files changed, 10 insertions(+) commit 722b2bd86f58f2d7a914571cccfa195485a70c47 Author: Jeff Muizelaar @@ -29103,7 +35361,7 @@ configure.ac | 15 + poppler/ABWOutputDev.cc | 1286 +++++++++++++++++++++++++++++++++++++++++++++++ - poppler/ABWOutputDev.h | 140 +++++ + poppler/ABWOutputDev.h | 140 ++++++ poppler/Makefile.am | 17 + utils/Makefile.am | 16 +- utils/pdftoabw.cc | 138 +++++ @@ -29176,7 +35434,7 @@ ChangeLog | 9 ++++++++- poppler/Annot.cc | 3 +++ poppler/Form.cc | 1 + - 3 files changed, 12 insertions(+), 1 deletions(-) + 3 files changed, 12 insertions(+), 1 deletion(-) commit e8d3b21d08a59ec8b62503b48504fe046d746bfa Author: Brad Hards @@ -29222,8 +35480,8 @@ qt4/src/poppler-form.cc | 284 +++++++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-form.h | 247 ++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 531 insertions(+), 0 deletions(-) + qt4/src/poppler-form.h | 247 +++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 531 insertions(+) commit 984ce7f919aec27d5f4225376550cd6b58d4ae52 Author: Albert Astals Cid @@ -29245,9 +35503,9 @@ Qt4 frontend. It supports text and choice fields in a basic way. - ChangeLog | 14 +++++++++ + ChangeLog | 14 ++++++++++ qt4/src/Doxyfile | 1 + - qt4/src/Makefile.am | 2 + + qt4/src/Makefile.am | 2 ++ qt4/src/poppler-annotation-helper.h | 18 ++++++------ qt4/src/poppler-page.cc | 36 ++++++++++++++++++++++++ qt4/src/poppler-private.h | 52 @@ -29287,7 +35545,7 @@ glib/poppler-document.cc | 4 +- poppler/GlobalParams.cc | 666 +------------------------------------------ - poppler/GlobalParams.h | 59 +---- + poppler/GlobalParams.h | 59 +--- poppler/PSOutputDev.cc | 8 - qt/poppler-document.cc | 4 +- qt4/src/poppler-document.cc | 2 +- @@ -29354,7 +35612,7 @@ glib/poppler-page.h | 55 ++ glib/poppler-private.h | 4 + glib/poppler.h | 15 +- - poppler/Annot.cc | 344 ++++++++++--- + poppler/Annot.cc | 344 +++++++++--- poppler/Annot.h | 21 +- poppler/Catalog.cc | 17 +- poppler/Catalog.h | 4 + @@ -29371,7 +35629,7 @@ poppler/Object.h | 4 + poppler/Page.cc | 11 +- poppler/Page.h | 8 +- - poppler/XRef.cc | 87 +++ + poppler/XRef.cc | 87 ++++ poppler/XRef.h | 9 + 25 files changed, 2666 insertions(+), 79 deletions(-) @@ -29386,7 +35644,7 @@ ChangeLog | 6 ++++++ configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit dd140dd63de661303b578863af4d515d82117cca Author: Albert Astals Cid @@ -29395,7 +35653,7 @@ fix date ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 3c1ed68bf4ee49b27275f7f65d49f42933b1cfa0 Author: Albert Astals Cid @@ -29452,7 +35710,7 @@ ChangeLog | 4 ++ glib/poppler-action.cc | 15 +++++- glib/poppler-page.cc | 124 - ++++++++++++++++++++++++++++++----------------- + ++++++++++++++++++++++++++++++------------------ 3 files changed, 97 insertions(+), 46 deletions(-) commit 75dcf94f53c2d7241111f0d527ee4d3a2ef0b0cf @@ -29501,10 +35759,10 @@ Patch by Pino Toscano . ChangeLog | 10 +++- - poppler/Sound.cc | 80 ++++++++++++++++++++++++- + poppler/Sound.cc | 80 +++++++++++++++++++++++++- poppler/Sound.h | 32 ++++++++++- qt4/src/poppler-sound.cc | 144 - ++++++++++++++++----------------------------- + ++++++++++++++++------------------------------ 4 files changed, 167 insertions(+), 99 deletions(-) commit 841bee94da7b6376d2e1fb3daaf8b727b90e42d8 @@ -29523,14 +35781,14 @@ documents with a password and don't need to do a malloc and a memcpy. - ChangeLog | 11 ++++++ + ChangeLog | 11 +++++++ poppler/Stream.cc | 5 --- poppler/Stream.h | 1 - qt4/src/poppler-document.cc | 74 - ++++++++++++++++++++++-------------------- - qt4/src/poppler-link.cc | 4 +- + +++++++++++++++++++++++-------------------- + qt4/src/poppler-link.cc | 4 +-- qt4/src/poppler-page.cc | 34 ++++++++++---------- - qt4/src/poppler-private.h | 24 +++++++++----- + qt4/src/poppler-private.h | 24 ++++++++------ 7 files changed, 84 insertions(+), 69 deletions(-) commit e1432fd7c4a6a2386789f450d39c6d954fd4e656 @@ -29613,7 +35871,7 @@ qt4/src/poppler-link.h | 1 + qt4/src/poppler-page.cc | 4 ++++ qt4/src/poppler-sound.cc | 7 ++++++- - 6 files changed, 26 insertions(+), 1 deletions(-) + 6 files changed, 26 insertions(+), 1 deletion(-) commit d41cd2f567a955031cb7498d9089e70e14df4a42 Author: Albert Astals Cid @@ -29623,7 +35881,7 @@ ChangeLog | 4 ++++ qt4/src/poppler-private.h | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit f8edfb6832144cbbd1b234f6b35e33325269255c Author: Albert Astals Cid @@ -29634,7 +35892,7 @@ ChangeLog | 5 +++++ qt/poppler-page-transition.cc | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 250a9f4b429344e0968c7bd0c0cebe7af373ae0a Author: Albert Astals Cid @@ -29658,7 +35916,7 @@ ChangeLog | 5 +++++ poppler/UGooString.cc | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 42770e5f07407b03dce31c73fd6956f9c8fc9a06 Author: Jeff Muizelaar @@ -29673,7 +35931,7 @@ ChangeLog | 6 +++ glib/poppler-document.cc | 113 - +++++++++++++++++++++++++++++++++------------ + ++++++++++++++++++++++++++++++++++------------ glib/poppler-document.h | 4 ++ 3 files changed, 93 insertions(+), 30 deletions(-) @@ -29711,14 +35969,14 @@ ChangeLog | 15 ++++ goo/GooString.cc | 186 +++++++++++++++++++++++----------------------- - goo/GooString.h | 28 ++++++-- + goo/GooString.h | 28 +++++-- goo/gmem.c | 3 +- goo/gmem.h | 2 +- - poppler/Lexer.cc | 19 ++++- + poppler/Lexer.cc | 19 +++-- poppler/Lexer.h | 10 +++ poppler/PageLabelInfo.cc | 1 + poppler/Parser.cc | 17 +++-- - poppler/UGooString.cc | 137 ++++++++++++++++++++++++++++------ + poppler/UGooString.cc | 137 +++++++++++++++++++++++++++------- poppler/UGooString.h | 40 ++++++++-- 11 files changed, 313 insertions(+), 145 deletions(-) @@ -29743,7 +36001,7 @@ ChangeLog | 1 + poppler/Catalog.h | 2 +- - 2 files changed, 2 insertions(+), 1 deletions(-) + 2 files changed, 2 insertions(+), 1 deletion(-) commit c7d19539a95927eb277966a521f13393c9e116bb Author: Albert Astals Cid @@ -29767,7 +36025,7 @@ ChangeLog | 6 ++++++ qt4/src/poppler-page.cc | 8 ++++++++ qt4/src/poppler-qt4.h | 9 ++++++++- - 3 files changed, 22 insertions(+), 1 deletions(-) + 3 files changed, 22 insertions(+), 1 deletion(-) commit 62dfc58903b496c4cc720c8b2c759c6fb82fb443 Author: Albert Astals Cid @@ -29787,7 +36045,7 @@ glib/test-poppler-glib.c | 7 +++++++ poppler/Page.cc | 13 +++++++++++++ poppler/Page.h | 6 ++++++ - 6 files changed, 52 insertions(+), 0 deletions(-) + 6 files changed, 52 insertions(+) commit 34e5aa62f4d3ba7a2d94a68a91c11a48277a4119 Author: Albert Astals Cid @@ -29813,7 +36071,7 @@ ChangeLog | 3 +++ poppler/Page.cc | 1 + - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit dd1c134dcf085338a85188c7f205fc300396dc86 Author: Albert Astals Cid @@ -29824,7 +36082,7 @@ ChangeLog | 5 +++++ qt/poppler-page.cc | 4 +++- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit 87e474a018c4808d6251fd79f9e9640e0f733551 Author: Jeff Muizelaar @@ -29865,7 +36123,7 @@ ChangeLog | 5 +++++ poppler/SplashOutputDev.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit fba99578f6001ae0c0df0442bb73040b55109b1d Author: Jeff Muizelaar @@ -29881,7 +36139,7 @@ ChangeLog | 7 +++++++ poppler/CairoOutputDev.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit 9a6ffa1c6e009f8606a055f873efdcd5829fcfa2 Author: Jeff Muizelaar @@ -29896,7 +36154,7 @@ ChangeLog | 6 ++++++ poppler/Function.cc | 1 + - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit e92d63a179ae022270156da4e396c15ff9236d89 Author: Albert Astals Cid @@ -29907,7 +36165,7 @@ ChangeLog | 5 +++++ m4/libjpeg.m4 | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 3913110f698fd006b394a395b5b0adfde30af31b Author: Albert Astals Cid @@ -29916,7 +36174,7 @@ there should not be any whitespace after the \ qt4/src/Makefile.am | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit c3ab7addec5a7990872949b813c2b727b1614d64 Author: Albert Astals Cid @@ -29926,7 +36184,7 @@ is enough for this one ;-) qt4/src/poppler-page.cc | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 9e9b82da91abacb916b05302d40bf822af6ac7f1 Author: Albert Astals Cid @@ -29967,12 +36225,12 @@ really commit pino's patch :-S - qt4/src/Doxyfile | 11 +++- - qt4/src/Mainpage.dox | 26 ++++----- + qt4/src/Doxyfile | 11 ++-- + qt4/src/Mainpage.dox | 26 +++++----- qt4/src/poppler-annotation.h | 33 +++++++----- qt4/src/poppler-link.h | 68 +++++++++++++++++++++---- qt4/src/poppler-qt4.h | 115 - ++++++++++++++++++++++++++--------------- + +++++++++++++++++++++++++++--------------- 5 files changed, 171 insertions(+), 82 deletions(-) commit 4f26e65096e3133a39fc0c9e82084c90cf77dda9 @@ -29990,7 +36248,7 @@ ChangeLog | 9 +++++++++ qt4/src/Mainpage.dox | 2 +- - 2 files changed, 10 insertions(+), 1 deletions(-) + 2 files changed, 10 insertions(+), 1 deletion(-) commit e68b6f3f8fea1e4f036eba0f19bb7e0c423d408c Author: Albert Astals Cid @@ -30016,17 +36274,17 @@ changes in the rendering API of Page. Patch by Pino Toscano. - ChangeLog | 17 +++++ - qt4/src/poppler-document.cc | 14 ++++ + ChangeLog | 17 ++++++ + qt4/src/poppler-document.cc | 14 +++++ qt4/src/poppler-link.cc | 2 +- - qt4/src/poppler-page.cc | 125 + qt4/src/poppler-page.cc | 123 ++++++++++++++++++++------------------ - qt4/src/poppler-private.h | 32 +++++++--- - qt4/src/poppler-qt4.h | 75 ++++++----------------- + qt4/src/poppler-private.h | 32 ++++++---- + qt4/src/poppler-qt4.h | 75 +++++++---------------- qt4/tests/stress-poppler-qt4.cpp | 3 +- qt4/tests/test-password-qt4.cpp | 12 ++-- - qt4/tests/test-poppler-qt4.cpp | 17 ++--- - 9 files changed, 153 insertions(+), 144 deletions(-) + qt4/tests/test-poppler-qt4.cpp | 17 +++--- + 9 files changed, 152 insertions(+), 143 deletions(-) commit 37088dd3335be6e7641c47bea9b1ddd689b07372 Author: Albert Astals Cid @@ -30046,7 +36304,7 @@ ChangeLog | 4 ++++ poppler/PSOutputDev.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit e3550fb286dae98992b30edbf4a9300fa58d2e77 Author: Jeff Muizelaar @@ -30092,7 +36350,7 @@ ChangeLog | 7 +++++++ splash/Splash.cc | 2 ++ splash/SplashErrorCodes.h | 2 ++ - 3 files changed, 11 insertions(+), 0 deletions(-) + 3 files changed, 11 insertions(+) commit 42c016c6d3c6de65fd92b51b9d6cc96d52404689 Author: Albert Astals Cid @@ -30120,20 +36378,20 @@ ChangeLog | 19 +++++ poppler/Link.cc | 53 ++++++++++++++ - poppler/Link.h | 32 ++++++++ + poppler/Link.h | 32 +++++++++ poppler/Makefile.am | 2 + - poppler/Page.cc | 8 ++ - poppler/Page.h | 4 + + poppler/Page.cc | 8 +++ + poppler/Page.h | 4 ++ poppler/Sound.cc | 65 +++++++++++++++++ poppler/Sound.h | 46 ++++++++++++ qt4/src/Makefile.am | 1 + qt4/src/poppler-link.cc | 35 +++++++++ - qt4/src/poppler-link.h | 26 +++++++- - qt4/src/poppler-page.cc | 32 ++++++++ - qt4/src/poppler-qt4.h | 87 ++++++++++++++++++++++ + qt4/src/poppler-link.h | 26 ++++++- + qt4/src/poppler-page.cc | 32 +++++++++ + qt4/src/poppler-qt4.h | 87 +++++++++++++++++++++++ qt4/src/poppler-sound.cc | 177 ++++++++++++++++++++++++++++++++++++++++++++++ - 14 files changed, 586 insertions(+), 1 deletions(-) + 14 files changed, 586 insertions(+), 1 deletion(-) commit 1da064d7e7403ec7111eecb2b9613e27a2c4bb5d Author: Albert Astals Cid @@ -30174,7 +36432,7 @@ ignore poppler-features.h glib/.cvsignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 3158b54375bdfdc82779362cc9442aade87f84f6 Author: Kristian Høgsberg @@ -30186,7 +36444,7 @@ ChangeLog | 2 ++ NEWS | 2 +- - 2 files changed, 3 insertions(+), 1 deletions(-) + 2 files changed, 3 insertions(+), 1 deletion(-) commit 17dd1f60f9328ae68fbe262ae0745be976ff9f95 Author: Kristian Høgsberg @@ -30211,7 +36469,7 @@ ChangeLog | 2 ++ utils/pdftops.cc | 3 ++- - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit 0d25592a1a5811ee8fffbd70307c7bcaaaacadf3 Author: Kristian Høgsberg @@ -30225,7 +36483,7 @@ ChangeLog | 3 +++ glib/poppler-page.cc | 5 ++++- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit b834755c7ae45eb4020e9cdbc3852eac0151fcdc Author: Kristian Høgsberg @@ -30237,7 +36495,7 @@ ChangeLog | 4 ++++ poppler/Gfx.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit 181e2af1edf2cbc3c8edadad0dce215a64a990dd Author: Kristian Høgsberg @@ -30252,7 +36510,7 @@ ChangeLog | 4 ++++ NEWS | 10 ++++++++++ configure.ac | 2 +- - 3 files changed, 15 insertions(+), 1 deletions(-) + 3 files changed, 15 insertions(+), 1 deletion(-) commit cc9c17a6730422be99ebcd69991fcf5d7b569640 Author: Kristian Høgsberg @@ -30282,7 +36540,7 @@ ChangeLog | 6 ++++++ poppler/TextOutputDev.cc | 4 ++++ - 2 files changed, 10 insertions(+), 0 deletions(-) + 2 files changed, 10 insertions(+) commit 1cf60015d7d78668c83737be6015dc880fd04ebf Author: Kristian Høgsberg @@ -30301,8 +36559,8 @@ goo/gfile.h | 2 + m4/define-dir.m4 | 34 ++++++++++++++ poppler/GlobalParams.cc | 116 - +++++++++++++++++++++++++++++++--------------- - poppler/GlobalParams.h | 7 +++- + +++++++++++++++++++++++++++++++---------------- + poppler/GlobalParams.h | 7 ++- 7 files changed, 136 insertions(+), 62 deletions(-) commit 821c883f9df9cc0e5b81aa2e070727996cf3bc4e @@ -30316,7 +36574,7 @@ ChangeLog | 3 +++ poppler/Makefile.am | 4 ++++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit d8ab8ebc94c32d32ad17ed54cede453de25d7dd5 Author: Kristian Høgsberg @@ -30329,7 +36587,7 @@ ChangeLog | 5 +++++ configure.ac | 3 ++- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 7c748075e18cfe95be6a56adf09ce7f2f032b86f Author: Albert Astals Cid @@ -30338,7 +36596,7 @@ sorry Jeff ChangeLog | 7 +++++++ - 1 files changed, 7 insertions(+), 0 deletions(-) + 1 file changed, 7 insertions(+) commit 6cdcfae0e1c6fbec07ee5273e6ad97ef04110868 Author: Albert Astals Cid @@ -30355,7 +36613,7 @@ ChangeLog | 10 +- qt4/src/poppler-annotation.cc | 230 ++++++++++++++++++++++++++++++++++++++- - qt4/src/poppler-annotation.h | 22 ++++- + qt4/src/poppler-annotation.h | 22 +++- qt4/src/poppler-page.cc | 237 +++++++++++++++++++++++++---------------- 4 files changed, 392 insertions(+), 107 deletions(-) @@ -30389,7 +36647,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.cc | 8 +++++++- - 2 files changed, 12 insertions(+), 1 deletions(-) + 2 files changed, 12 insertions(+), 1 deletion(-) commit 3ea0aada0434c9f815814253dd9d1374ae6643cc Author: Jeff Muizelaar @@ -30422,7 +36680,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.cc | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 7905adaa21f2347346927fa567c64be60e2bc69c Author: Albert Astals Cid @@ -30454,7 +36712,7 @@ ChangeLog | 5 +++++ qt4/src/poppler-private.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 469202e117910beb4e0ad906d5c154a3bae5c98b Author: Albert Astals Cid @@ -30474,7 +36732,7 @@ did not want to commit that, thanks Brad for noticing! configure.ac | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit f52380e6d569280839d7c37362bd7cc59f2573c3 Author: Albert Astals Cid @@ -30498,7 +36756,7 @@ ChangeLog | 4 ++++ poppler/Catalog.cc | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 9b6455f6530e273afaa5f948b67ceeec8a06f976 Author: Albert Astals Cid @@ -30561,7 +36819,7 @@ ChangeLog | 5 +++++ configure.ac | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 1673b895656143a8a1f1a45e07f777f39995940d Author: Albert Astals Cid @@ -30600,7 +36858,7 @@ push back thing i did not want to commit, sorry configure.ac | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit ba448afc0e97a9e779409ff228adcd4f627971f5 Author: Albert Astals Cid @@ -30634,7 +36892,7 @@ fix date, i don't live in the past ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2f27c3a0218608568f6cd1c718ef51b9879023a3 Author: Albert Astals Cid @@ -30646,7 +36904,7 @@ ChangeLog | 5 +++++ poppler/Stream.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit f39ab43ca824cb7e5db73137c4545b3e85134425 Author: Albert Astals Cid @@ -30661,12 +36919,12 @@ from the qt4 frontend to the qt frontend. Patch by Wilfried Huss - ChangeLog | 7 +++++ + ChangeLog | 7 ++++++ qt/poppler-document.cc | 18 +++++++++++++++ qt/poppler-private.h | 58 ++++++++++++++++++++++++++++++++++++++++++++++++ qt/poppler-qt.h | 16 +++++++++++++ - 4 files changed, 99 insertions(+), 0 deletions(-) + 4 files changed, 99 insertions(+) commit c3a9fd546b853c85b6be5fc8f4e5a78d8a7e7437 Author: Albert Astals Cid @@ -30680,7 +36938,7 @@ ChangeLog | 6 ++++++ qt4/src/poppler-document.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit edc0499644b8083600ced9a5087ec0b0189e615b Author: Kristian Høgsberg @@ -30708,7 +36966,7 @@ ChangeLog | 6 ++++++ poppler/Gfx.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit c57ebd40fcf85432b2e5045086d158a63af12525 Author: Jeff Muizelaar @@ -30722,7 +36980,7 @@ ChangeLog | 5 +++++ poppler/TextOutputDev.cc | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 640d5d5a9d9e53f3f677eb05f3d18e6bfc74e95a Author: Albert Astals Cid @@ -30776,7 +37034,7 @@ put back a change that was not meant to be commited qt/poppler-qt.h | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 4995d09c91173d34a435112828aff21a63b147e9 Author: Albert Astals Cid @@ -30801,11 +37059,11 @@ ChangeLog | 11 ++++ qt/Makefile.am | 4 +- - qt/poppler-document.cc | 19 +++---- + qt/poppler-document.cc | 19 ++++--- qt/poppler-page.cc | 136 - +++++++++++++++++++++++++++++++++++++++++++++-- + +++++++++++++++++++++++++++++++++++++++++++++--- qt/poppler-private.h | 33 +++++++++++- - qt/poppler-qt.h | 14 ++++- + qt/poppler-qt.h | 14 +++-- 6 files changed, 196 insertions(+), 21 deletions(-) commit 831bd8942ef3224354b128d5e14e68fdfc57168b @@ -30815,7 +37073,7 @@ optimization by Mario Teijeiro Otero poppler/UGooString.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1223fd4b200f6c13996f8299f3563c818af0c21d Author: Albert Astals Cid @@ -30830,7 +37088,7 @@ ChangeLog | 9 +++++++++ poppler/UGooString.cc | 8 ++++++++ - 2 files changed, 17 insertions(+), 0 deletions(-) + 2 files changed, 17 insertions(+) commit b85a39ddfc7de8c0621e995c114885ecd08fcdc2 Author: Albert Astals Cid @@ -30857,7 +37115,7 @@ ChangeLog | 6 ++++++ qt/poppler-document.cc | 18 ++++++++++++++++++ qt/poppler-qt.h | 2 ++ - 3 files changed, 26 insertions(+), 0 deletions(-) + 3 files changed, 26 insertions(+) commit 5380d005b7b54cc6587ce6e8c3bbb358da5cd9a5 Author: Jeff Muizelaar @@ -30888,7 +37146,7 @@ ChangeLog | 6 ++++++ poppler/SplashOutputDev.cc | 10 ++++++++++ splash/Splash.cc | 3 +++ - 3 files changed, 19 insertions(+), 0 deletions(-) + 3 files changed, 19 insertions(+) commit 643b310cf51474b6dfc077fe086ea121e807f6e1 Author: Jeff Muizelaar @@ -30933,7 +37191,7 @@ ChangeLog | 6 ++++++ NEWS | 8 ++++++++ configure.ac | 2 +- - 3 files changed, 15 insertions(+), 1 deletions(-) + 3 files changed, 15 insertions(+), 1 deletion(-) commit 223a4bf3a679f666b6c963a8787cf5b5ac75c4b6 Author: Kristian Høgsberg @@ -30948,7 +37206,7 @@ ChangeLog | 6 ++++++ configure.ac | 11 +++++++++++ poppler-glib.pc.in | 3 ++- - 3 files changed, 19 insertions(+), 1 deletions(-) + 3 files changed, 19 insertions(+), 1 deletion(-) commit 7aaa4d3fbdb8ea2534d3cb80e68b2759b2e8fd2f Author: Kristian Høgsberg @@ -30992,7 +37250,7 @@ ChangeLog | 6 ++++++ poppler/CairoOutputDev.cc | 3 +++ poppler/CairoOutputDev.h | 2 +- - 3 files changed, 10 insertions(+), 1 deletions(-) + 3 files changed, 10 insertions(+), 1 deletion(-) commit 6f5a89a0a2cf17d45d1c31ce105829be8c7ac456 Author: Albert Astals Cid @@ -31015,7 +37273,7 @@ /me hits himself ChangeLog | 11 +++ - poppler/SplashOutputDev.cc | 8 ++ + poppler/SplashOutputDev.cc | 8 +++ qt/poppler-private.h | 2 +- qt4/src/poppler-private.h | 2 +- splash/Splash.cc | 169 @@ -31034,7 +37292,7 @@ ChangeLog | 5 +++++ qt4/src/Makefile.am | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit eecd06c86585bca05c99cd2e9a1b1ff3bbae3c72 Author: Kristian Høgsberg @@ -31094,7 +37352,7 @@ ChangeLog | 7 +++++++ qt/poppler-page.cc | 17 +++++++++++++++++ qt4/src/poppler-page.cc | 17 +++++++++++++++++ - 3 files changed, 41 insertions(+), 0 deletions(-) + 3 files changed, 41 insertions(+) commit 655af1e0126ca96d75c9c718d7d8f928c898b1f6 Author: Albert Astals Cid @@ -31103,7 +37361,7 @@ hope to fix really Kouhei's name now ChangeLog | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) + 1 file changed, 5 insertions(+), 5 deletions(-) commit cc783a1ebe868ff75db5472775dabe0020ae501f Author: Albert Astals Cid @@ -31112,7 +37370,7 @@ Fix Kouhei name ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit e4b6ad3bb873a6f334934921e6d56e9d26e06a9a Author: Kristian Høgsberg @@ -31121,7 +37379,7 @@ Add bug number to ChangeLog entry. ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 46f5f070cceb2c0f3b53537c8e33340b9f1bba38 Author: Kristian Høgsberg @@ -31136,7 +37394,7 @@ ChangeLog | 4 ++++ glib/poppler-action.cc | 13 +++++++++++++ glib/poppler-action.h | 4 ++++ - 3 files changed, 21 insertions(+), 0 deletions(-) + 3 files changed, 21 insertions(+) commit 875dc5b112dfe2d4a48a7567b1ff79257447cc0d Author: Kristian Høgsberg @@ -31149,7 +37407,7 @@ ChangeLog | 3 +++ poppler-glib.pc.in | 2 +- - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit b66dda2640c088bbe205f698a0c4028144027922 Author: Kristian Høgsberg @@ -31163,7 +37421,7 @@ ChangeLog | 4 ++++ glib/poppler-document.h | 2 ++ - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 095730456c0d8312067af10dd55a3b9165a83736 Author: Kristian Høgsberg @@ -31176,7 +37434,7 @@ ChangeLog | 3 +++ glib/Makefile.am | 1 + - 2 files changed, 4 insertions(+), 0 deletions(-) + 2 files changed, 4 insertions(+) commit b8d77633899c1dec5f3b9c9a0f075f39afa98965 Author: Kristian Høgsberg @@ -31189,7 +37447,7 @@ ChangeLog | 5 +++++ glib/poppler-document.cc | 2 ++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit 488f77298fee9eebbca5983c1c9fb186b3b67aa3 Author: Kristian Høgsberg @@ -31248,11 +37506,11 @@ * glib/reference/tmpl/poppler.sgml: Make PopplerPSOutput a proper glib object. - ChangeLog | 11 ++++++ + ChangeLog | 11 +++++++ glib/poppler-document.cc | 51 - ++++++++++++++++++++++++----- - glib/poppler-document.h | 4 ++ - glib/poppler-private.h | 2 + + ++++++++++++++++++++++++------ + glib/poppler-document.h | 4 +++ + glib/poppler-private.h | 2 ++ glib/reference/tmpl/poppler-private.sgml | 1 + glib/reference/tmpl/poppler.sgml | 1 + 6 files changed, 61 insertions(+), 9 deletions(-) @@ -31268,7 +37526,7 @@ ChangeLog | 3 +++ glib/poppler-page.cc | 12 +++++++++++- - 2 files changed, 14 insertions(+), 1 deletions(-) + 2 files changed, 14 insertions(+), 1 deletion(-) commit 78ae3efd9541d7b63ff5a2c4de3fde300806688f Author: Kristian Høgsberg @@ -31298,7 +37556,7 @@ poppler/CairoOutputDev.cc | 5 +- poppler/CairoOutputDev.h | 2 +- poppler/Gfx.cc | 1 + - poppler/TextOutputDev.cc | 9 + + poppler/TextOutputDev.cc | 9 ++ 10 files changed, 381 insertions(+), 56 deletions(-) commit 354c1926b7181fd668f221e1d672974e04fda747 @@ -31357,7 +37615,7 @@ numbers for easier casting qt4/src/poppler-link.h | 14 ++++++++++++-- - 1 files changed, 12 insertions(+), 2 deletions(-) + 1 file changed, 12 insertions(+), 2 deletions(-) commit 35500375e3f790c444ab7e7d0a687d270c5a66b1 Author: Albert Astals Cid @@ -31366,7 +37624,7 @@ fixing compile problems for some people qt4/src/poppler-page.cc | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 181f09829cf4831965059e3064114d83348c51b5 Author: Albert Astals Cid @@ -31413,12 +37671,12 @@ ChangeLog | 10 +++ qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 13 +-- - qt4/src/poppler-link.cc | 129 ++++++++++++++++++++++++++++++- + qt4/src/poppler-document.cc | 13 +--- + qt4/src/poppler-link.cc | 129 +++++++++++++++++++++++++++++-- qt4/src/poppler-link.h | 178 +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 139 ++++++++++++++++++++++++++++++---- - qt4/src/poppler-private.h | 9 +- + qt4/src/poppler-page.cc | 139 +++++++++++++++++++++++++++++---- + qt4/src/poppler-private.h | 9 ++- qt4/src/poppler-qt4.h | 56 +++----------- 8 files changed, 456 insertions(+), 79 deletions(-) @@ -31430,7 +37688,7 @@ ChangeLog | 5 +++++ poppler/Catalog.cc | 5 ++++- - 2 files changed, 9 insertions(+), 1 deletions(-) + 2 files changed, 9 insertions(+), 1 deletion(-) commit 1fce6266564583d356817a21f43c6b1ad8ce3716 Author: Albert Astals Cid @@ -31439,7 +37697,7 @@ fix code, i suck qt4/src/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit be913b90d59da35a347498b86fdd3edb065aef23 Author: Albert Astals Cid @@ -31451,7 +37709,7 @@ ChangeLog | 4 ++++ poppler/Function.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit 2b085293bd73b4e77da848b3fe63a7e82e9ba5e5 Author: Albert Astals Cid @@ -31467,7 +37725,7 @@ qt4/src/poppler-page.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ qt4/src/poppler-qt4.h | 16 ++++++++++++++++ - 3 files changed, 64 insertions(+), 0 deletions(-) + 3 files changed, 64 insertions(+) commit a9b0c7977aba7bc85a8673c7f95187ff17ee4173 Author: Kristian Høgsberg @@ -31536,14 +37794,14 @@ One step more to make oKular fully use the qt4 bindings - ChangeLog | 7 ++++++ + ChangeLog | 7 +++++++ poppler/PageLabelInfo.cc | 43 ------------------------------------------ poppler/PageLabelInfo.h | 44 +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-document.cc | 10 +++++++++ - qt4/src/poppler-private.h | 22 ++++++++++++++++---- - qt4/src/poppler-qt4.h | 6 +++++ + qt4/src/poppler-document.cc | 10 ++++++++++ + qt4/src/poppler-private.h | 22 +++++++++++++++++----- + qt4/src/poppler-qt4.h | 6 ++++++ 6 files changed, 84 insertions(+), 48 deletions(-) commit 4147400e2b692df7f70c3772e8a4b576d4d85294 @@ -31554,7 +37812,7 @@ ChangeLog | 5 +++++ poppler/JBIG2Stream.cc | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 960d60467d62d28f20b127d07e8de1af42eec568 Author: Jeff Muizelaar @@ -31579,7 +37837,7 @@ ChangeLog | 5 +++++ qt4/src/poppler-private.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit c902a3a22bcceedc8ee8ca377064efcc8a9178ca Author: Brad Hards @@ -31590,7 +37848,7 @@ CCMAIL: montel@kde.org m4/qt.m4 | 4 ++-- - 1 files changed, 2 insertions(+), 2 deletions(-) + 1 file changed, 2 insertions(+), 2 deletions(-) commit 18f8e1f1d213dbcda27cd0ec429273801f65e208 Author: Albert Astals Cid @@ -31649,7 +37907,7 @@ poppler/CairoOutputDev.cc | 118 +++++++++++++++++++++++++++++++++++++++++++++ poppler/CairoOutputDev.h | 8 +++ - 3 files changed, 134 insertions(+), 0 deletions(-) + 3 files changed, 134 insertions(+) commit 6039d4fc65cb25bef20efa29bc29d42086fc0854 Author: Jeff Muizelaar @@ -31662,7 +37920,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.cc | 4 +++- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit d839a0bd78361930e5e2fe889df12e1e853ffed3 Author: Kristian Høgsberg @@ -31719,7 +37977,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit fd251f52efc7748fda91cc77fb9d3966e0f02ac8 Author: Albert Astals Cid @@ -31730,7 +37988,7 @@ ChangeLog | 5 +++++ m4/qt.m4 | 28 +++++++++++++++++++++++++++- - 2 files changed, 32 insertions(+), 1 deletions(-) + 2 files changed, 32 insertions(+), 1 deletion(-) commit 36de9747153a2ea9b3cf86c41e75a521441a2e06 Author: Albert Astals Cid @@ -31755,7 +38013,7 @@ ChangeLog | 5 +++++ poppler/JBIG2Stream.cc | 43 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 48 insertions(+), 0 deletions(-) + 2 files changed, 48 insertions(+) commit 315f8e488d3db848f88a06c7568b6583bbf0e432 Author: Jeff Muizelaar @@ -31769,7 +38027,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.cc | 11 ++++++++++- - 2 files changed, 15 insertions(+), 1 deletions(-) + 2 files changed, 15 insertions(+), 1 deletion(-) commit 0d311518f678a479c1efeaec15011e0a34de80fc Author: Albert Astals Cid @@ -31788,9 +38046,9 @@ I'll leave adapting the glib frontend for you guys, i tried to adapt it but i got lost at gdk_pixbuf_get_n_channels (pixbuf); - ChangeLog | 9 +++++ - qt/poppler-page.cc | 18 +++------- - qt4/src/poppler-page.cc | 15 +++----- + ChangeLog | 9 ++++++ + qt/poppler-page.cc | 18 ++++------- + qt4/src/poppler-page.cc | 15 ++++----- splash/Splash.cc | 81 ++++++++++++++++++++++++----------------------- splash/SplashBitmap.cc | 10 +++--- @@ -31804,7 +38062,7 @@ ChangeLog | 5 +++++ splash/SplashFTFont.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 56c98450160b639790931226a045ce4712e7d45e Author: Albert Astals Cid @@ -31812,14 +38070,14 @@ Improvements to the Qt4 frontend, comments welcome - ChangeLog | 7 ++ + ChangeLog | 7 +++ m4/qt.m4 | 4 +- qt4/src/Makefile.am | 1 + - qt4/src/poppler-document.cc | 85 +++++++++++++++++++++------ + qt4/src/poppler-document.cc | 85 ++++++++++++++++++++------ qt4/src/poppler-link.cc | 138 +++++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 9 +++- - qt4/src/poppler-private.h | 95 +++++++++++++++++++++++++++++- + qt4/src/poppler-page.cc | 9 ++- + qt4/src/poppler-private.h | 95 ++++++++++++++++++++++++++++- qt4/src/poppler-qt4.h | 86 ++++++++++++++++++++++++--- 8 files changed, 395 insertions(+), 30 deletions(-) @@ -31859,7 +38117,7 @@ ChangeLog | 5 +++++ glib/poppler-page.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit ff4febab0a519732972c21bf76d7693c98265e0f Author: Albert Astals Cid @@ -31885,7 +38143,7 @@ ChangeLog | 6 ++++++ glib/poppler-document.cc | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 784f6d9a0888dab34c586ffe14db8e55b8a11f51 Author: Jeff Muizelaar @@ -31897,7 +38155,7 @@ ChangeLog | 4 ++++ poppler/CairoFontEngine.h | 1 - - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit 847436779d7c82b428acfd6339130228bfadca24 Author: Albert Astals Cid @@ -31906,7 +38164,7 @@ fix date ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 401bae69cc7ade676cacd89b483f0a93a653c7a1 Author: Albert Astals Cid @@ -31991,7 +38249,7 @@ ChangeLog | 5 +++++ glib/Makefile.am | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 50ecfadab36a9769b09e4c2c1670d86448a0e1ee Author: Kristian Høgsberg @@ -32075,16 +38333,17 @@ marker, append the number part of the label as ucs2 (#5952). ChangeLog | 14 +++ - glib/poppler-document.cc | 52 ++++++----- + glib/poppler-document.cc | 52 +++++------ glib/poppler-page.cc | 23 +++-- glib/poppler-private.h | 3 + glib/reference/tmpl/poppler-enums.sgml | 150 ------------------------------- - glib/reference/tmpl/poppler-unused.sgml | 130 ++++++++++++++++++++++++++ + glib/reference/tmpl/poppler-unused.sgml | 130 + +++++++++++++++++++++++++++ glib/test-poppler-glib.c | 2 +- - goo/GooString.cc | 5 + + goo/GooString.cc | 5 ++ goo/GooString.h | 4 + - poppler/PageLabelInfo.cc | 39 ++++++--- + poppler/PageLabelInfo.cc | 39 +++++--- poppler/PageLabelInfo.h | 2 +- 11 files changed, 228 insertions(+), 196 deletions(-) @@ -32096,7 +38355,7 @@ ChangeLog | 4 ++++ poppler/Object.cc | 3 ++- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit eb5642f396c8772c83b2cf27da437413b692c952 Author: Albert Astals Cid @@ -32126,7 +38385,7 @@ poppler/CairoOutputDev.h | 6 +++ poppler/GfxState.cc | 50 ++++++++++++++++++++++ poppler/GfxState.h | 2 + - 5 files changed, 167 insertions(+), 0 deletions(-) + 5 files changed, 167 insertions(+) commit dcb748f68112bd5f99fea8a3da06666be6cff0c5 Author: Jeff Muizelaar @@ -32152,7 +38411,7 @@ poppler/Makefile.am | 2 ++ qt/Makefile.am | 2 ++ qt4/src/Makefile.am | 2 ++ - 5 files changed, 16 insertions(+), 0 deletions(-) + 5 files changed, 16 insertions(+) commit 24b9f5c33fb00ff80a79b34444282a57288f636c Author: Albert Astals Cid @@ -32161,9 +38420,9 @@ * poppler/ArthurOutputDev.cc: Make it compile after changing code so we did not pass files to freetype but buffers - ChangeLog | 5 ++++ + ChangeLog | 5 +++++ poppler/ArthurOutputDev.cc | 53 - +++++++++++++++---------------------------- + ++++++++++++++++---------------------------- 2 files changed, 24 insertions(+), 34 deletions(-) commit 0bda90310b267d3a4963096293eb2bd29b120768 @@ -32232,7 +38491,7 @@ poppler/Gfx.cc | 14 ++++++++++++++ poppler/OutputDev.cc | 16 ++++++++++++++++ poppler/OutputDev.h | 10 ++++++++++ - 4 files changed, 48 insertions(+), 0 deletions(-) + 4 files changed, 48 insertions(+) commit b4e34d905cd0ca5815a450de35b4c2774f4887c9 Author: Jeff Muizelaar @@ -32244,9 +38503,9 @@ Discard the ones that are not truetype or type1. Fixes #5758. Patch by Ed Catmur. - ChangeLog | 6 +++++ + ChangeLog | 6 ++++++ poppler/GlobalParams.cc | 51 - +++++++++++++++++++++++++--------------------- + ++++++++++++++++++++++++++--------------------- 2 files changed, 34 insertions(+), 23 deletions(-) commit fd85a0afdd7b4cafc68df400d4f94fccaea18c76 @@ -32269,7 +38528,7 @@ ChangeLog | 2 ++ utils/Makefile.am | 2 ++ utils/pdf2xml.dtd | 28 ++++++++++++++++++++++++++++ - 3 files changed, 32 insertions(+), 0 deletions(-) + 3 files changed, 32 insertions(+) commit f4df23ca7f396883a906f16dfc8db1ebd528e04a Author: Albert Astals Cid @@ -32278,7 +38537,7 @@ ignore++ utils/.cvsignore | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit 93ad488679f594e45547a67e2a7397f4c8bd2820 Author: Albert Astals Cid @@ -32308,7 +38567,7 @@ i should learn on which day i live ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 1ddeed60d07c3a7e011f3f594fa9299379d0b000 Author: Albert Astals Cid @@ -32317,8 +38576,8 @@ don't use files to pass fonts to freetype ChangeLog | 26 ++++++++++++ - fofi/FoFiTrueType.cc | 43 ++++++++++++++++--- - fofi/FoFiTrueType.h | 7 ++- + fofi/FoFiTrueType.cc | 43 +++++++++++++++---- + fofi/FoFiTrueType.h | 7 ++-- fofi/FoFiType1C.h | 2 +- goo/gfile.cc | 8 ++++ poppler/GfxFont.cc | 49 +++++++++++++++++++++- @@ -32327,16 +38586,16 @@ poppler/GlobalParams.h | 1 + poppler/SplashOutputDev.cc | 94 +++++++++++++++++++++--------------------- - splash/SplashFTFontEngine.cc | 44 ++++++++++++------- - splash/SplashFTFontEngine.h | 16 +++---- + splash/SplashFTFontEngine.cc | 44 +++++++++++++------- + splash/SplashFTFontEngine.h | 16 ++++--- splash/SplashFTFontFile.cc | 47 +++++++++++++-------- splash/SplashFTFontFile.h | 18 ++++---- - splash/SplashFontEngine.cc | 46 ++++++++------------ - splash/SplashFontEngine.h | 16 +++---- + splash/SplashFontEngine.cc | 46 ++++++++------------- + splash/SplashFontEngine.h | 16 ++++--- splash/SplashFontFile.cc | 70 +++++++++++++++++++++++++++---- splash/SplashFontFile.h | 25 +++++++++-- - splash/SplashT1FontEngine.cc | 29 ++++++------- - splash/SplashT1FontFile.cc | 30 +++++++++++-- + splash/SplashT1FontEngine.cc | 29 +++++++------ + splash/SplashT1FontFile.cc | 30 +++++++++++--- splash/SplashT1FontFile.h | 4 +- 21 files changed, 396 insertions(+), 182 deletions(-) @@ -32351,7 +38610,7 @@ ChangeLog | 5 +++++ poppler/GlobalParams.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 0184e7c928ec60c0aa3f8634d96ae0cf0ad6d157 Author: Jeff Muizelaar @@ -32365,7 +38624,7 @@ ChangeLog | 5 +++++ glib/poppler-attachment.h | 1 + - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit c805e25f2f074640e4345f8b71eef8d7de677109 Author: Kristian Høgsberg @@ -32379,7 +38638,7 @@ ChangeLog | 5 +++++ poppler/CairoOutputDev.cc | 6 +++++- - 2 files changed, 10 insertions(+), 1 deletions(-) + 2 files changed, 10 insertions(+), 1 deletion(-) commit 4f48abcd4c21460d4c5b718a7ba18cdceb30c2d1 Author: Jonathan Blandford @@ -32407,7 +38666,7 @@ glib/Makefile.am | 2 + glib/poppler-attachment.cc | 223 +++++++++++++++++++++++++++++++ - glib/poppler-attachment.h | 67 +++++++++ + glib/poppler-attachment.h | 67 ++++++++++ glib/poppler-document.cc | 63 +++++++++ glib/poppler-document.h | 6 + glib/poppler-page.cc | 2 +- @@ -32415,7 +38674,7 @@ glib/poppler.h | 1 + glib/reference/tmpl/poppler-enums.sgml | 150 +++++++++++++++++++++ glib/reference/tmpl/poppler-unused.sgml | 130 ------------------ - glib/test-poppler-glib.c | 26 ++++- + glib/test-poppler-glib.c | 26 +++- 12 files changed, 559 insertions(+), 133 deletions(-) commit 052bf4b80c8a0dc45f6222617bfd8ae1b9c40410 @@ -32478,7 +38737,7 @@ ChangeLog | 5 +++++ splash/SplashFTFont.cc | 3 ++- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 60e13bf84e4f020a264811e4a5bf85d67e15d6df Author: Jeff Muizelaar @@ -32490,7 +38749,7 @@ ChangeLog | 4 ++++ TODO | 10 ++++++++++ - 2 files changed, 14 insertions(+), 0 deletions(-) + 2 files changed, 14 insertions(+) commit cebba06563d1b691a8bbb83828e47c9cc91e231a Author: Albert Astals Cid @@ -32501,7 +38760,7 @@ qt4/tests/check_attachments.cpp | 151 +++++++++++++++++++++++++++++++++++++ qt4/tests/poppler-attachments.cpp | 37 +++++++++ - 2 files changed, 188 insertions(+), 0 deletions(-) + 2 files changed, 188 insertions(+) commit 0b12e7cce6c6633b1d07e2902a9fa13ff52079e7 Author: Albert Astals Cid @@ -32511,7 +38770,7 @@ qt4/src/poppler-embeddedfile.cc | 106 +++++++++++++++++++++++++++++++++++++++ - 1 files changed, 106 insertions(+), 0 deletions(-) + 1 file changed, 106 insertions(+) commit 38c8f3a53b3eb2be1fbfa360f77285037d89b719 Author: Albert Astals Cid @@ -32522,7 +38781,7 @@ poppler/UGooString.cc | 86 +++++++++++++++++++++++++++++++++++++++++++++++++ poppler/UGooString.h | 55 +++++++++++++++++++++++++++++++ - 2 files changed, 141 insertions(+), 0 deletions(-) + 2 files changed, 141 insertions(+) commit ad6e7d862c8fa6e10a7dbbb3391cbb0b6c922375 Author: Albert Astals Cid @@ -32539,14 +38798,14 @@ ++++++++++++++++++++++++++++++++++++++--- poppler/Catalog.h | 60 +++++++++++++++++-- poppler/Dict.cc | 17 +++--- - poppler/Dict.h | 15 +++-- + poppler/Dict.h | 15 ++--- poppler/FontInfo.cc | 1 + poppler/Function.cc | 1 + poppler/Gfx.cc | 1 + poppler/GfxFont.cc | 5 +- poppler/GfxState.cc | 1 + - poppler/Link.cc | 9 ++- - poppler/Link.h | 9 ++- + poppler/Link.cc | 9 +-- + poppler/Link.h | 9 +-- poppler/Makefile.am | 2 + poppler/Object.h | 17 +++--- poppler/Outline.cc | 1 + @@ -32628,7 +38887,7 @@ A file i forgot to add to make it compile :-/ qt/poppler-page-transition-private.h | 28 ++++++++++++++++++++++++++++ - 1 files changed, 28 insertions(+), 0 deletions(-) + 1 file changed, 28 insertions(+) commit 9cc97908ea67ab431e58129f589e00f41f40a143 Author: Jeff Muizelaar @@ -32640,7 +38899,7 @@ ChangeLog | 4 ++++ poppler/GlobalParams.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit c7ce134fb1dadb46e2b3773d0976ea31da0a046f Author: Kristian Høgsberg @@ -32702,7 +38961,7 @@ ChangeLog | 7 +++++++ Makefile.am | 1 + splash/Makefile.am | 4 ++++ - 3 files changed, 12 insertions(+), 0 deletions(-) + 3 files changed, 12 insertions(+) commit ea6d9b97cec6fabf8a5005c565bbdb378bed7f54 Author: Jeff Muizelaar @@ -32764,7 +39023,7 @@ ChangeLog | 4 ++++ poppler/CairoOutputDev.cc | 2 ++ - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 18eb8de66749082e4aa65cc6d369a533826fab33 Author: Kristian Høgsberg @@ -32814,7 +39073,7 @@ ++++++++++++++++++++++++++++ poppler/Makefile.am | 1 - poppler/PageTransition.h | 118 ---------------- - poppler/Private.h | 30 ---- + poppler/Private.h | 30 ----- poppler/TextOutputDev.cc | 2 - qt/Makefile.am | 8 +- qt/poppler-page-transition.cc | 187 ++++++++++++++++++++++++++ @@ -32846,12 +39105,12 @@ Introduce variants of renderTo that return a QImage and do not use a QPixmap so threading is possible. - ChangeLog | 8 ++++++ - qt/poppler-page.cc | 18 +++++++++---- + ChangeLog | 8 +++++++ + qt/poppler-page.cc | 18 ++++++++++----- qt/poppler-qt.h | 30 ++++++++++++++++++++---- - qt4/src/poppler-page.cc | 9 ++++++- + qt4/src/poppler-page.cc | 9 +++++++- qt4/src/poppler-qt4.h | 59 - +++++++++++++++++++++++++--------------------- + +++++++++++++++++++++++++---------------------- 5 files changed, 85 insertions(+), 39 deletions(-) commit 5c2cbf5d327c6cc75c073b56c3ab1748c0d24387 @@ -32884,7 +39143,7 @@ gtk-doc.make | 153 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ m4/gtk-doc.m4 | 53 +++++++++++++++++++ - 7 files changed, 235 insertions(+), 0 deletions(-) + 7 files changed, 235 insertions(+) commit 372c34cc9728d7041bc4f6893c0bae50c9501c50 Author: Albert Astals Cid @@ -32937,10 +39196,10 @@ ++++++++++++++++++++++++++ glib/reference/tmpl/poppler-enums.sgml | 169 ++++++++++++ glib/reference/tmpl/poppler-page.sgml | 243 ++++++++++++++++++ - glib/reference/tmpl/poppler-private.sgml | 128 +++++++++ + glib/reference/tmpl/poppler-private.sgml | 128 ++++++++++ glib/reference/tmpl/poppler.sgml | 216 ++++++++++++++++ glib/reference/tmpl/stamp-poppler-enums.sgml | 19 ++ - 14 files changed, 1584 insertions(+), 0 deletions(-) + 14 files changed, 1584 insertions(+) commit 0fab1b711f153859e113cb3b6d734ddcb58fb87a Author: Jonathan Blandford @@ -32952,7 +39211,7 @@ preparation for gtk-doc support. ChangeLog | 5 ++ - glib/poppler-action.cc | 14 ++++ + glib/poppler-action.cc | 14 +++++ glib/poppler-action.h | 2 - glib/poppler-document.cc | 151 +++++++++++++++++++++++++++++++++++++++++++++- @@ -32969,7 +39228,7 @@ A delete that slipped from the last patch-commit qt4/src/poppler-page.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit cf6f8123af19aca4200b58a454652f68ce8132e2 Author: Albert Astals Cid @@ -32982,12 +39241,12 @@ poppler/PageTransition.cc | 188 +++++++++++++++++++++++++++++++++++++++++++++ poppler/PageTransition.h | 118 ++++++++++++++++++++++++++++ - poppler/Private.h | 30 +++++++ + poppler/Private.h | 30 ++++++++ qt/Makefile.am | 2 +- qt/poppler-page.cc | 111 +------------------------- - qt/poppler-qt.h | 72 +----------------- + qt/poppler-qt.h | 72 +---------------- qt4/src/Makefile.am | 2 +- - qt4/src/poppler-page.cc | 17 ++++- + qt4/src/poppler-page.cc | 17 +++- qt4/src/poppler-qt4.h | 14 +++- 10 files changed, 374 insertions(+), 181 deletions(-) @@ -33001,7 +39260,7 @@ ChangeLog | 5 +++++ utils/HtmlOutputDev.cc | 2 ++ utils/ImageOutputDev.cc | 2 ++ - 3 files changed, 9 insertions(+), 0 deletions(-) + 3 files changed, 9 insertions(+) commit 8b64dafc7f1d198fb0052c0d6f0da6de97bbb48d Author: Brad Hards @@ -33010,18 +39269,18 @@ Plug a few memory leaks in the Qt4 bindings. ChangeLog | 25 +++++++++++++++++++ - qt4/src/poppler-document.cc | 3 ++ - qt4/src/poppler-private.h | 7 ++++- - qt4/src/poppler-qt4.h | 3 ++ + qt4/src/poppler-document.cc | 3 +++ + qt4/src/poppler-private.h | 7 +++++- + qt4/src/poppler-qt4.h | 3 +++ qt4/tests/check_fonts.cpp | 8 ++++++ qt4/tests/check_metadata.cpp | 50 - +++++++++++++++++++++++++++++++++---- - qt4/tests/check_pagelayout.cpp | 6 ++++ - qt4/tests/check_pagemode.cpp | 10 +++++++ - qt4/tests/check_permissions.cpp | 2 + - qt4/tests/check_version.cpp | 22 ---------------- + +++++++++++++++++++++++++++++++++----- + qt4/tests/check_pagelayout.cpp | 6 +++++ + qt4/tests/check_pagemode.cpp | 10 ++++++++ + qt4/tests/check_permissions.cpp | 2 ++ + qt4/tests/check_version.cpp | 22 ----------------- qt4/tests/poppler-fonts.cpp | 1 + - qt4/tests/stress-poppler-qt4.cpp | 2 + + qt4/tests/stress-poppler-qt4.cpp | 2 ++ 12 files changed, 110 insertions(+), 29 deletions(-) commit 64c07a20a4ed844f3b3dd26e974f58d5877cf9fd @@ -33038,11 +39297,11 @@ qt4/tests/check_metadata.cpp: update to reflect UTC. qt4/tests/.cvsignore: suppress check_dateConversion - ChangeLog | 9 +++ - qt4/src/poppler-document.cc | 89 ++++++++++++++++++++----------- + ChangeLog | 9 ++++ + qt4/src/poppler-document.cc | 89 +++++++++++++++++++----------- qt4/src/poppler-qt4.h | 5 ++ qt4/tests/.cvsignore | 1 + - qt4/tests/Makefile.am | 11 +++- + qt4/tests/Makefile.am | 11 ++-- qt4/tests/check_dateConversion.cpp | 105 ++++++++++++++++++++++++++++++++++++ qt4/tests/check_metadata.cpp | 4 +- @@ -33061,7 +39320,7 @@ ChangeLog | 8 +++++ qt4/src/Doxyfile | 2 +- qt4/src/poppler-qt4.h | 81 - ++++++++++++++++++++++++++++++++++++++---------- + ++++++++++++++++++++++++++++++++++++++----------- 3 files changed, 73 insertions(+), 18 deletions(-) commit 8d9cf43aaa73d5012428a6a4c5d7e2cccbd3036e @@ -33083,7 +39342,7 @@ configure.ac | 114 -------------------------------------------------- poppler/JPXStream.cc | 1 + - poppler/Stream.cc | 11 ++++- + poppler/Stream.cc | 11 +++-- 6 files changed, 137 insertions(+), 117 deletions(-) commit 97243286560cb4f264b875185c8768a6af09d554 @@ -33099,11 +39358,11 @@ Ikezoe to man non-embedded CJK fonts work. - ChangeLog | 14 +++++++++-- + ChangeLog | 14 +++++++++--- configure.ac | 2 +- poppler/CairoFontEngine.cc | 52 - +++++++++++++++++++++++++++++++++++++++---- - utils/Makefile.am | 15 +++++++----- + +++++++++++++++++++++++++++++++++++++++----- + utils/Makefile.am | 15 ++++++++----- 4 files changed, 68 insertions(+), 15 deletions(-) commit cf887a9a9fae7272165d3aae05c85444ff5ca604 @@ -33125,7 +39384,7 @@ + .cvsignore utils/.cvsignore | 10 ++++++++++ - 1 files changed, 10 insertions(+), 0 deletions(-) + 1 file changed, 10 insertions(+) commit 5dca860bba6918e06fab3aa56a2c75f0ac9ecdfb Author: Albert Astals Cid @@ -33136,7 +39395,7 @@ ChangeLog | 3 +++ configure.ac | 3 +++ utils/Makefile.am | 3 ++- - 3 files changed, 8 insertions(+), 1 deletions(-) + 3 files changed, 8 insertions(+), 1 deletion(-) commit 03e3d9164ffd71f03136b57a9941ea14fadb21aa Author: Albert Astals Cid @@ -33160,7 +39419,7 @@ ChangeLog | 4 ++++ poppler/Page.cc | 7 +++++++ - 2 files changed, 11 insertions(+), 0 deletions(-) + 2 files changed, 11 insertions(+) commit bcc5e3afe27c8787ce7022a0701997c96eddb4fe Author: Kristian Høgsberg @@ -33279,7 +39538,7 @@ configure.ac | 8 ++++++++ goo/Makefile.am | 4 ++++ poppler/Makefile.am | 4 ++++ - 4 files changed, 25 insertions(+), 1 deletions(-) + 4 files changed, 25 insertions(+), 1 deletion(-) commit 830b61bfd1c985fe14ec4d0f6724c8f70e924fc1 Author: Albert Astals Cid @@ -33345,7 +39604,7 @@ qt4/src/poppler-document.cc | 22 ++++++++++++++++++++++ qt4/src/poppler-qt4.h | 7 +++++++ qt4/tests/check_metadata.cpp | 18 ++++++++++++++++++ - 4 files changed, 54 insertions(+), 0 deletions(-) + 4 files changed, 54 insertions(+) commit 7ec41df91e6dbf792e11676d929acc2f634bd382 Author: Brad Hards @@ -33357,7 +39616,7 @@ qt4/tests/check_fonts.cpp | 24 +++++++++++++++ qt4/tests/check_metadata.cpp | 66 ++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 96 insertions(+), 0 deletions(-) + 3 files changed, 96 insertions(+) commit a92b10016306ac46775c9b95b52d249b233ff950 Author: Albert Astals Cid @@ -33378,7 +39637,7 @@ ChangeLog | 5 +++++ qt4/tests/check_fonts.cpp | 24 ++++++++++++++++++++++++ - 2 files changed, 29 insertions(+), 0 deletions(-) + 2 files changed, 29 insertions(+) commit 62345b0affed8e2e37728fca7f2b750879192c43 Author: Albert Astals Cid @@ -33407,7 +39666,7 @@ qt/poppler-qt.h | 2 ++ qt4/src/poppler-fontinfo.cc | 9 +++++++++ qt4/src/poppler-qt4.h | 2 ++ - 5 files changed, 30 insertions(+), 0 deletions(-) + 5 files changed, 30 insertions(+) commit e091231d98d12c19b0098ffbaec6ecda28097dff Author: Brad Hards @@ -33417,7 +39676,7 @@ ChangeLog | 2 ++ qt4/tests/.cvsignore | 1 + - 2 files changed, 3 insertions(+), 0 deletions(-) + 2 files changed, 3 insertions(+) commit 6a7b1eaaedbfdd3a8e6b4d899477350f2b485641 Author: Brad Hards @@ -33456,7 +39715,7 @@ ChangeLog | 7 +++++++ glib/poppler-page.cc | 8 +++++++- poppler/CairoFontEngine.cc | 2 ++ - 3 files changed, 16 insertions(+), 1 deletions(-) + 3 files changed, 16 insertions(+), 1 deletion(-) commit 4d169c5c345cdac84a39026e759b928977643417 Author: Kristian Høgsberg @@ -33512,7 +39771,7 @@ remove another chagne should not have gone in test/pdf-inspector.cc | 9 ++------- - 1 files changed, 2 insertions(+), 7 deletions(-) + 1 file changed, 2 insertions(+), 7 deletions(-) commit 7dfe02ee112dee51346525b62d877e6591135761 Author: Albert Astals Cid @@ -33524,7 +39783,7 @@ ChangeLog | 3 ++ qt/poppler-fontinfo.cc | 75 ++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 78 insertions(+), 0 deletions(-) + 2 files changed, 78 insertions(+) commit 655b9dd195ac9faf2f7ea0255880b8c83b249a06 Author: Albert Astals Cid @@ -33533,7 +39792,7 @@ this should have not went in poppler/TextOutputDev.h | 10 +++++----- - 1 files changed, 5 insertions(+), 5 deletions(-) + 1 file changed, 5 insertions(+), 5 deletions(-) commit ab45eb562159d5b006e658ec66723a0a47908f65 Author: Albert Astals Cid @@ -33547,15 +39806,15 @@ ChangeLog | 9 ++++- poppler/TextOutputDev.h | 10 +++--- qt/Makefile.am | 1 + - qt/poppler-document.cc | 29 +++++++++++++++ - qt/poppler-private.h | 2 + + qt/poppler-document.cc | 29 ++++++++++++++++ + qt/poppler-private.h | 2 ++ qt/poppler-qt.h | 80 ++++++++++++++++++++++++++++++++++++++++++- - qt4/src/Makefile.am | 2 + + qt4/src/Makefile.am | 2 ++ qt4/src/poppler-fontinfo.cc | 69 +++++++++++++++++++++++++++++++++++++ qt4/src/poppler-qt4.h | 43 +++++++++-------------- qt4/src/poppler-textbox.cc | 49 ++++++++++++++++++++++++++ - test/pdf-inspector.cc | 9 ++++- + test/pdf-inspector.cc | 9 +++-- 11 files changed, 268 insertions(+), 35 deletions(-) commit 64079ad81caf6d2cf66b1f3a3de9454146e15c6c @@ -33586,10 +39845,10 @@ out pixbuf first. ChangeLog | 21 ++++++++++++++++ - glib/poppler-page.cc | 18 ++++++++----- + glib/poppler-page.cc | 18 ++++++++------ poppler/CairoOutputDev.cc | 59 - ++++++++++++++++++++++++++++++++------------ - poppler/CairoOutputDev.h | 6 ++-- + +++++++++++++++++++++++++++++++++------------ + poppler/CairoOutputDev.h | 6 ++--- poppler/TextOutputDev.cc | 8 +++--- 5 files changed, 82 insertions(+), 30 deletions(-) @@ -33604,9 +39863,9 @@ qt4/src/Doxyfile | 4 +- qt4/src/Mainpage.dox | 91 ++++++++++++++++++++++++++++++++++++++++ - qt4/src/poppler-page.cc | 20 ++------- - qt4/src/poppler-qt4.h | 57 +++++++++++++++++------- - qt4/tests/test-poppler-qt4.cpp | 5 +- + qt4/src/poppler-page.cc | 20 +++------ + qt4/src/poppler-qt4.h | 57 +++++++++++++++++-------- + qt4/tests/test-poppler-qt4.cpp | 5 ++- 7 files changed, 151 insertions(+), 37 deletions(-) commit 7b2c6e92611db9350ca5dcaf3fd730fe5e69afea @@ -33631,12 +39890,12 @@ Use Splash backend by default in the qt4 test, added -arthur option to use the Arthur backend - ChangeLog | 12 +++++++- - qt4/src/poppler-page.cc | 45 ++++++++++++++++++++++++++------- + ChangeLog | 12 +++++++-- + qt4/src/poppler-page.cc | 47 ++++++++++++++++++++++++++--------- qt4/src/poppler-qt4.h | 17 +++++++++---- qt4/tests/test-poppler-qt4.cpp | 53 +++++++++++++++++++++++++--------------- - 4 files changed, 90 insertions(+), 37 deletions(-) + 4 files changed, 91 insertions(+), 38 deletions(-) commit b7e4f0e7d175abde7fafb1fcc7ba129468bc8c1a Author: Brad Hards @@ -33649,9 +39908,9 @@ qt4/src/poppler-qt4.h | 11 +++++--- qt4/tests/Makefile.am | 12 +++++--- qt4/tests/check_metadata.cpp | 58 - +++++++++++++++++++------------------- + +++++++++++++++++++-------------------- qt4/tests/check_pagelayout.cpp | 14 +++++----- - qt4/tests/check_pagemode.cpp | 22 +++++++------- + qt4/tests/check_pagemode.cpp | 22 +++++++-------- qt4/tests/check_permissions.cpp | 18 ++++++------ 7 files changed, 78 insertions(+), 64 deletions(-) @@ -33676,7 +39935,7 @@ ChangeLog | 4 ++++ test/pdf-inspector.cc | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit e64f63416dbce497cb2167272b95491664f213e8 Author: Albert Astals Cid @@ -33688,7 +39947,7 @@ qt/poppler-page.cc | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++- qt/poppler-qt.h | 41 +++++++++++++++++++++++++++++++ - 3 files changed, 114 insertions(+), 1 deletions(-) + 3 files changed, 114 insertions(+), 1 deletion(-) commit 8bd8cb4160b73da69d058783750352fbface66dc Author: Albert Astals Cid @@ -33698,7 +39957,7 @@ ChangeLog | 4 ++++ qt/Makefile.am | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit fc59b79dc375544681032a1618e96c458515d724 Author: Kristian Høgsberg @@ -33712,9 +39971,9 @@ to work with new GfXColor type. - ChangeLog | 13 ++++++++++- + ChangeLog | 13 +++++++++++- poppler/GfxState.cc | 59 - ++++++++++++++++++++++++++++++-------------------- + ++++++++++++++++++++++++++++++--------------------- 2 files changed, 47 insertions(+), 25 deletions(-) commit 6fe2cb0fcd53211143dcd0c47bf8c8c7a8c11a39 @@ -33745,7 +40004,7 @@ Comment some unused parameters to calm down compiler warnings when using these heders on external projects with higher warning verbosity - ChangeLog | 5 ++ + ChangeLog | 5 +++ poppler/OutputDev.h | 125 ++++++++++++++++++++++++++------------------------- poppler/Stream.h | 24 +++++----- @@ -33765,28 +40024,28 @@ poppler/ArthurOutputDev.h | 2 +- poppler/CairoOutputDev.cc | 2 +- poppler/CairoOutputDev.h | 2 +- - poppler/Gfx.cc | 645 ++++++++++-- + poppler/Gfx.cc | 645 +++++++++-- poppler/Gfx.h | 17 +- - poppler/GfxState.cc | 1410 +++++++++++++++++++++--- + poppler/GfxState.cc | 1410 ++++++++++++++++++++--- poppler/GfxState.h | 196 +++- poppler/OutputDev.cc | 25 + poppler/OutputDev.h | 46 +- - poppler/PDFDoc.cc | 98 ++- + poppler/PDFDoc.cc | 98 +- poppler/PDFDoc.h | 24 +- - poppler/PSOutputDev.cc | 1461 +++++++++++++++++++++---- + poppler/PSOutputDev.cc | 1461 ++++++++++++++++++++---- poppler/PSOutputDev.h | 48 +- - poppler/Page.cc | 115 ++- + poppler/Page.cc | 115 +- poppler/Page.h | 23 +- - poppler/SplashOutputDev.cc | 1525 +++++++++++++++++++++++--- + poppler/SplashOutputDev.cc | 1525 ++++++++++++++++++++++--- poppler/SplashOutputDev.h | 59 +- - poppler/TextOutputDev.cc | 230 +++-- + poppler/TextOutputDev.cc | 230 ++-- poppler/TextOutputDev.h | 16 +- qt/poppler-page.cc | 34 +- qt4/src/poppler-page.cc | 31 +- splash/Splash.cc | 2656 +++++++++++++++++++++++++++++++++----------- splash/Splash.h | 75 +- - splash/SplashBitmap.cc | 216 +++-- + splash/SplashBitmap.cc | 216 ++-- splash/SplashBitmap.h | 13 +- splash/SplashPattern.cc | 22 +- splash/SplashPattern.h | 19 +- @@ -33853,7 +40112,7 @@ Annot.[cc|h] and related merges from xpdf 3.01 - ChangeLog | 7 ++- + ChangeLog | 7 +- poppler/Annot.cc | 234 ++++++++++++++++++++++++++++++++++++++++++------ poppler/Annot.h | 20 ++--- @@ -33881,7 +40140,7 @@ ChangeLog | 4 ++ splash/SplashScreen.cc | 110 - +++++++++++++++++++++++++++++++---------------- + +++++++++++++++++++++++++++++++----------------- splash/SplashScreen.h | 12 +++++- 3 files changed, 87 insertions(+), 39 deletions(-) @@ -33892,8 +40151,8 @@ Merging SplashXPathScanner.cc changes from xpdf 3.01 splash/SplashXPathScanner.cc | 80 - ++++++++++++++++++++++------------------- - 1 files changed, 43 insertions(+), 37 deletions(-) + +++++++++++++++++++++++------------------- + 1 file changed, 43 insertions(+), 37 deletions(-) commit e34713a2187e05358f98e749ec2923210a40a862 Author: Kristian Høgsberg @@ -33907,7 +40166,7 @@ ChangeLog | 5 +++++ glib/poppler-page.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit fdd0934430ed251f9aeb45158b6ec95684b3e7b4 Author: Marco Pesenti Gritti @@ -33958,7 +40217,7 @@ ChangeLog | 1 + poppler/TextOutputDev.cc | 8 ++++++++ poppler/TextOutputDev.h | 4 ++++ - 3 files changed, 13 insertions(+), 0 deletions(-) + 3 files changed, 13 insertions(+) commit e0cbb0ca2c611ad5ac0267e46279c9d61450902a Author: Albert Astals Cid @@ -33968,7 +40227,7 @@ ChangeLog | 1 + poppler/XRef.cc | 1 - - 2 files changed, 1 insertions(+), 1 deletions(-) + 2 files changed, 1 insertion(+), 1 deletion(-) commit 9c7adb318d395ff674c6febf6406a8d47e9e5bf6 Author: Albert Astals Cid @@ -33990,7 +40249,7 @@ ChangeLog | 1 + poppler/Link.cc | 64 - ++++++++++++++++++++++++++++++++++++++++++++++++++++-- + ++++++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 62 insertions(+), 3 deletions(-) commit 4e9490c0219dd9c99ba0e5533c96663b8570a87b @@ -34063,7 +40322,7 @@ *** empty log message *** ChangeLog | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit db62e07fcf57f45951b21f8aab44b0d943efe5d0 Author: Marco Pesenti Gritti @@ -34096,7 +40355,7 @@ ChangeLog | 6 ++++++ poppler/XRef.cc | 4 ++++ - 2 files changed, 10 insertions(+), 0 deletions(-) + 2 files changed, 10 insertions(+) commit 3badd82b72b2768be27e309b048cd8dcb1c80038 Author: Marco Pesenti Gritti @@ -34177,7 +40436,7 @@ poppler/SplashOutputDev.h | 5 +++++ splash/Splash.cc | 31 +++++++++++++++++++++++++++++++ splash/Splash.h | 11 +++++++++++ - 4 files changed, 55 insertions(+), 0 deletions(-) + 4 files changed, 55 insertions(+) commit a9df3f3203c14161e5d6bc6048ec7e123536e6d3 Author: Marco Pesenti Gritti @@ -34216,14 +40475,14 @@ poppler/GlobalParams.cc | 229 ++++++++++++++++++++++++++ poppler/GlobalParams.h | 16 ++ poppler/Makefile.am | 5 +- - poppler/PDFDoc.cc | 36 ++++ + poppler/PDFDoc.cc | 36 +++++ poppler/PDFDoc.h | 1 + poppler/Parser.cc | 20 --- poppler/Parser.h | 4 - poppler/SecurityHandler.cc | 376 +++++++++++++++++++++++++++++++++++++++++++ poppler/SecurityHandler.h | 157 ++++++++++++++++++ - poppler/Stream.cc | 18 -- + poppler/Stream.cc | 18 --- poppler/Stream.h | 8 - poppler/XRef.cc | 162 ++----------------- poppler/XRef.h | 13 +- @@ -34254,7 +40513,7 @@ splash/SplashFTFont.cc | 7 +++++++ splash/SplashMath.h | 34 +++++++++++++++++++++++++++++++++- splash/SplashTypes.h | 5 +++++ - 6 files changed, 61 insertions(+), 1 deletions(-) + 6 files changed, 61 insertions(+), 1 deletion(-) commit 00457c5f44a246c9f867a114a72be9f7b2dc1cf5 Author: Marco Pesenti Gritti @@ -34284,7 +40543,7 @@ ChangeLog | 3 ++ splash/SplashXPath.cc | 81 - +++++++++++++++++++++++------------------------- + ++++++++++++++++++++++++------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) commit 0555ba861d3b84d88c80da4fa247274338ff7817 @@ -34294,7 +40553,7 @@ SplashFontEngine.cc merge from xpdf 3.00 -> 3.01 splash/SplashFontEngine.cc | 8 ++++++++ - 1 files changed, 8 insertions(+), 0 deletions(-) + 1 file changed, 8 insertions(+) commit ddc72bd8354168d992631d1ef8cd0939b428966c Author: Albert Astals Cid @@ -34314,7 +40573,7 @@ splash/SplashPath.cc | 3 ++- splash/SplashPath.h | 5 +++++ - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 3ea00e853049d8c26ee88aaef8ea6c47c8d46956 Author: Albert Astals Cid @@ -34324,7 +40583,7 @@ splash/SplashFont.cc | 6 ++++++ splash/SplashFont.h | 10 +++++++++- - 2 files changed, 15 insertions(+), 1 deletions(-) + 2 files changed, 15 insertions(+), 1 deletion(-) commit e571dcbfd0c77a28e41710577859f632cc989de5 Author: Albert Astals Cid @@ -34348,7 +40607,7 @@ Merge xpdf 3.00 -> 3.01 changes for that file splash/SplashClip.h | 9 +++++++++ - 1 files changed, 9 insertions(+), 0 deletions(-) + 1 file changed, 9 insertions(+) commit b2f94635249f2c5f0c876a1005826fe4c6eb6025 Author: Albert Astals Cid @@ -34358,7 +40617,7 @@ poppler/Catalog.cc | 5 ++++- poppler/Catalog.h | 3 +++ - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 0fc2e70576b1c48cf47a686e8aa7e202a802bc9d Author: Albert Astals Cid @@ -34377,7 +40636,7 @@ Another small xpdf 3.00 -> xpdf 3.01 merge poppler/Object.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 52efe9845cf3eb1dd836f90bfa203760baa2f87c Author: Albert Astals Cid @@ -34387,7 +40646,7 @@ xpdf 3.01 changes of this file poppler/JPXStream.cc | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + 1 file changed, 2 deletions(-) commit 4b4fc5c017bf147c9069bbce32fc14467bd2a81a Author: Albert Astals Cid @@ -34401,9 +40660,9 @@ ChangeLog | 4 + fofi/FoFiTrueType.cc | 406 ++++++++++++++++++++++++++++++++++++++++++------ - fofi/FoFiTrueType.h | 15 ++- - fofi/FoFiType1.cc | 25 ++-- - fofi/FoFiType1C.cc | 134 ++++++++++++++--- + fofi/FoFiTrueType.h | 15 +- + fofi/FoFiType1.cc | 25 ++- + fofi/FoFiType1C.cc | 134 +++++++++++++--- fofi/FoFiType1C.h | 6 + poppler/PSOutputDev.cc | 7 +- poppler/PSOutputDev.h | 3 +- @@ -34443,17 +40702,17 @@ qt4/tests/check_metadata.cpp | 101 +++++++++++++++++++++++++++++++ qt4/tests/check_orientation.cpp | 40 ------------ - qt4/tests/check_pagelayout.cpp | 44 +++++++++++++ + qt4/tests/check_pagelayout.cpp | 44 ++++++++++++++ qt4/tests/check_pagelayout_facing.cpp | 22 ------- qt4/tests/check_pagelayout_none.cpp | 22 ------- qt4/tests/check_pagelayout_single.cpp | 22 ------- - qt4/tests/check_pagemode.cpp | 64 +++++++++++++++++++ + qt4/tests/check_pagemode.cpp | 64 ++++++++++++++++++++ qt4/tests/check_pagemode_attach.cpp | 22 ------- qt4/tests/check_pagemode_fullscreen.cpp | 22 ------- qt4/tests/check_pagemode_none.cpp | 22 ------- qt4/tests/check_pagemode_oc.cpp | 22 ------- qt4/tests/check_pagemode_thumbs.cpp | 22 ------- - qt4/tests/check_permissions.cpp | 60 +++++++------------ + qt4/tests/check_permissions.cpp | 60 +++++++----------- 20 files changed, 354 insertions(+), 362 deletions(-) commit 3725841417871d1051772068833dc908ca70b7ce @@ -34466,7 +40725,7 @@ ChangeLog | 4 ++++ glib/poppler-page.cc | 5 ++++- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit ecf3dcadb948013cbc987e464952933daf78e4bf Author: Brad Hards @@ -34475,10 +40734,10 @@ Merge some missing parts of previous patches, and some other minor cleanups from xpdf 3.0.1 - poppler/Catalog.cc | 16 +-- + poppler/Catalog.cc | 16 +- poppler/JPXStream.cc | 380 ++++++++++++++++++++++++++++++++---------------- - poppler/JPXStream.h | 25 ++- + poppler/JPXStream.h | 25 +++- poppler/Lexer.cc | 11 ++ poppler/Lexer.h | 3 + poppler/PSOutputDev.cc | 31 ++-- @@ -34497,7 +40756,7 @@ ChangeLog | 9 ++ poppler/JArithmeticDecoder.cc | 42 ++++++-- - poppler/JArithmeticDecoder.h | 22 ++++- + poppler/JArithmeticDecoder.h | 22 +++- poppler/JBIG2Stream.cc | 227 +++++++++++++++++++++++++---------------- poppler/JBIG2Stream.h | 4 +- @@ -34516,7 +40775,7 @@ ChangeLog | 6 ++++++ configure.ac | 2 +- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 244e5c1f8f65da41ba6314028766dfe5973f6132 Author: Brad Hards @@ -34530,12 +40789,12 @@ ChangeLog | 13 ++++++++ fofi/FoFiTrueType.cc | 1 + goo/GooHash.cc | 24 ++++++++++++++ - goo/GooHash.h | 2 + + goo/GooHash.h | 2 ++ goo/GooList.cc | 5 +++ goo/GooList.h | 5 +++ goo/GooString.cc | 85 +++++++++++++++++++++++++++++++++++++++++++++++++- - goo/GooString.h | 11 ++---- + goo/GooString.h | 11 +++---- goo/gmem.c | 3 ++ poppler/Decrypt.cc | 1 + 10 files changed, 142 insertions(+), 8 deletions(-) @@ -34557,7 +40816,7 @@ add note about related bug ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit ace2eb6ba518b970b96f30f61c4795c161e0cb79 Author: Jeff Muizelaar @@ -34569,7 +40828,7 @@ ChangeLog | 4 ++++ poppler/FlateStream.cc | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 96657c5480bf2ecf445ad5a105b8e7393ae53c8b Author: Jeff Muizelaar @@ -34581,7 +40840,7 @@ ChangeLog | 4 ++++ configure.ac | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit d1d715158223c7ca3ae279cea420a948cfdb0428 Author: Brad Hards @@ -34592,42 +40851,42 @@ tweaking by me. There may be some residual gmallocn changes still to be merged. - ChangeLog | 7 +++++ - fofi/FoFiTrueType.cc | 12 ++++---- + ChangeLog | 7 ++++++ + fofi/FoFiTrueType.cc | 12 ++++----- fofi/FoFiType1.cc | 2 +- - fofi/FoFiType1C.cc | 14 +++++----- - goo/gmem.c | 22 ++++++++++++++++ + fofi/FoFiType1C.cc | 14 +++++------ + goo/gmem.c | 22 +++++++++++++++++ goo/gmem.h | 9 +++++++ poppler/Annot.cc | 2 +- poppler/Array.cc | 2 +- poppler/BuiltinFont.cc | 2 +- - poppler/CMap.cc | 6 ++-- + poppler/CMap.cc | 6 ++--- poppler/Catalog.cc | 8 +++--- - poppler/CharCodeToUnicode.cc | 22 ++++++++-------- + poppler/CharCodeToUnicode.cc | 22 ++++++++--------- poppler/Dict.cc | 2 +- - poppler/Function.cc | 20 +++++++------- + poppler/Function.cc | 20 +++++++-------- poppler/Gfx.cc | 2 +- poppler/GfxFont.cc | 24 +++++++++--------- poppler/GfxState.cc | 54 - ++++++++++++++++++++-------------------- + ++++++++++++++++++++--------------------- poppler/JArithmeticDecoder.cc | 2 +- - poppler/JBIG2Stream.cc | 30 +++++++++++----------- - poppler/Link.cc | 6 ++-- - poppler/NameToCharCode.cc | 4 +- - poppler/Outline.cc | 4 +- + poppler/JBIG2Stream.cc | 30 +++++++++++------------ + poppler/Link.cc | 6 ++--- + poppler/NameToCharCode.cc | 4 +-- + poppler/Outline.cc | 4 +-- poppler/SplashOutputDev.cc | 8 +++--- - poppler/Stream.cc | 12 ++++---- + poppler/Stream.cc | 12 ++++----- poppler/TextOutputDev.cc | 48 ++++++++++++++++++------------------ poppler/XRef.cc | 18 +++++++------- - splash/SplashClip.cc | 12 ++++---- + splash/SplashClip.cc | 12 ++++----- splash/SplashFTFontFile.cc | 2 +- - splash/SplashFont.cc | 6 ++-- + splash/SplashFont.cc | 6 ++--- splash/SplashPath.cc | 8 +++--- - splash/SplashScreen.cc | 4 +- - splash/SplashState.cc | 4 +- - splash/SplashT1FontFile.cc | 4 +- - splash/SplashXPath.cc | 4 +- - splash/SplashXPathScanner.cc | 4 +- + splash/SplashScreen.cc | 4 +-- + splash/SplashState.cc | 4 +-- + splash/SplashT1FontFile.cc | 4 +-- + splash/SplashXPath.cc | 4 +-- + splash/SplashXPathScanner.cc | 4 +-- 35 files changed, 214 insertions(+), 176 deletions(-) commit feb82c60b1f86a9d1260db57534d98c54ee615c4 @@ -34678,7 +40937,7 @@ ChangeLog | 5 +++++ test/Makefile.am | 4 +++- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit da3aac379f07ffedd6078707ec9923800fc0c0a5 Author: Jonathan Blandford @@ -34713,7 +40972,7 @@ poppler/OutputDev.h | 10 +- poppler/ProfileData.cc | 44 +++++ poppler/ProfileData.h | 41 +++++ - test/Makefile.am | 13 ++- + test/Makefile.am | 13 +- test/pdf-inspector.cc | 358 ++++++++++++++++++++++++++++++++++++++ test/pdf-inspector.glade | 434 ++++++++++++++++++++++++++++++++++++++++++++++ @@ -34771,7 +41030,7 @@ ChangeLog | 6 ++++++ poppler/GfxFont.cc | 1 - - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 5dc9b14b99f2efa2fe018e9267dd363d1bcd78b1 Author: Albert Astals Cid @@ -34781,7 +41040,7 @@ ChangeLog | 4 ++++ poppler/PDFDoc.cc | 10 +++++++++- - 2 files changed, 13 insertions(+), 1 deletions(-) + 2 files changed, 13 insertions(+), 1 deletion(-) commit 155d019d7b474f244a3e4bf64d192015f6a266c4 Author: Kristian Høgsberg @@ -34805,7 +41064,7 @@ Update comment poppler/PDFDoc.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit de7953c8a8360d8bfc99298906c5fc1094684fc3 Author: Albert Astals Cid @@ -34836,7 +41095,7 @@ ChangeLog | 3 +++ qt4/src/Doxyfile | 2 +- - 2 files changed, 4 insertions(+), 1 deletions(-) + 2 files changed, 4 insertions(+), 1 deletion(-) commit f43a6f1d1c27c042f5736746c94430083baa4c1d Author: Brad Hards @@ -34846,10 +41105,10 @@ ChangeLog | 5 ++ qt4/tests/.cvsignore | 1 + - qt4/tests/Makefile.am | 7 ++- + qt4/tests/Makefile.am | 7 +- qt4/tests/test-password-qt4.cpp | 135 +++++++++++++++++++++++++++++++++++++++ - 4 files changed, 147 insertions(+), 1 deletions(-) + 4 files changed, 147 insertions(+), 1 deletion(-) commit 2ec26afaf80864b023899b890b8e229448da9bed Author: Kristian Høgsberg @@ -34882,12 +41141,12 @@ * poppler/TextOutputDev.h: Propagate selection colors to the glib API. - ChangeLog | 7 +++++ + ChangeLog | 7 ++++++ glib/poppler-page.cc | 63 ++++++++++++++++++++++++++++++++++++++++------ glib/poppler-page.h | 4 ++- - poppler/TextOutputDev.cc | 25 ++++++++--------- - poppler/TextOutputDev.h | 7 +++- + poppler/TextOutputDev.cc | 25 +++++++++--------- + poppler/TextOutputDev.h | 7 ++++-- 5 files changed, 82 insertions(+), 24 deletions(-) commit 43e97129393f403c41f191ceae9a54793ece005f @@ -34915,7 +41174,7 @@ ChangeLog | 6 +++++ qt4/tests/test-poppler-qt4.cpp | 47 - +++++++++++++++++++++++++++++++-------- + +++++++++++++++++++++++++++++++--------- 2 files changed, 43 insertions(+), 10 deletions(-) commit f3e0a163b098da1cc389c2c4f47e28358b1bec77 @@ -34943,7 +41202,7 @@ ChangeLog | 7 +++++++ glib/poppler-page.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit 22f509e60f60ccaea1f91d9ec1ef7ba8200bee8a Author: Brad Hards @@ -34969,12 +41228,12 @@ directly - hopefully that will be less ugly, and not fill everything. ChangeLog | 8 + - poppler/ArthurOutputDev.cc | 407 - +++++++++++++++++++++++++++++++------------ - poppler/ArthurOutputDev.h | 15 ++- + poppler/ArthurOutputDev.cc | 401 + ++++++++++++++++++++++++++++++++------------ + poppler/ArthurOutputDev.h | 15 +- qt4/src/poppler-page.cc | 2 +- splash/SplashPath.h | 2 + - 5 files changed, 317 insertions(+), 117 deletions(-) + 5 files changed, 314 insertions(+), 114 deletions(-) commit 8567b794628786b82e8db2a7daf75e4ad2398960 Author: Brad Hards @@ -34987,7 +41246,7 @@ qt4/tests/Makefile.am | 10 +++++++++- qt4/tests/check_pagelayout_facing.cpp | 22 ++++++++++++++++++++++ qt4/tests/check_version.cpp | 22 ++++++++++++++++++++++ - 5 files changed, 61 insertions(+), 1 deletions(-) + 5 files changed, 61 insertions(+), 1 deletion(-) commit 59d660cf4d614fdea09d6a62b8889f7682c2b4f9 Author: Brad Hards @@ -34996,7 +41255,7 @@ Compile fix associated with last change. poppler/ArthurOutputDev.cc | 2 -- - 1 files changed, 0 insertions(+), 2 deletions(-) + 1 file changed, 2 deletions(-) commit 88c57c73f57820d6a57e26825093fbc688845e67 Author: Brad Hards @@ -35033,10 +41292,10 @@ ChangeLog | 16 +++++ glib/poppler-document.cc | 2 +- - glib/poppler-page.cc | 31 ++++----- + glib/poppler-page.cc | 31 +++++---- poppler/TextOutputDev.cc | 164 - ++++++++++++++++++++++++++++++++++----------- - poppler/TextOutputDev.h | 8 ++ + +++++++++++++++++++++++++++++++++++----------- + poppler/TextOutputDev.h | 8 +++ 5 files changed, 164 insertions(+), 57 deletions(-) commit ad312dbded4e8f70c3a2eac9a0964fa00ecb6b2c @@ -35048,7 +41307,7 @@ ChangeLog | 4 ++++ poppler/PageLabelInfo.cc | 11 +++++++++++ poppler/PageLabelInfo.h | 2 ++ - 3 files changed, 17 insertions(+), 0 deletions(-) + 3 files changed, 17 insertions(+) commit b45ad9f3409d7b1ed147135a70553e5255913c61 Author: Albert Astals Cid @@ -35062,7 +41321,7 @@ had to be deleted, do it. poppler/GlobalParams.cc | 9 +++++++-- - 1 files changed, 7 insertions(+), 2 deletions(-) + 1 file changed, 7 insertions(+), 2 deletions(-) commit f93dfc5c5133e0b1bd9f4786cfe18bd796cbac2a Author: Albert Astals Cid @@ -35071,7 +41330,7 @@ Remove the debugging poppler/GlobalParams.cc | 5 ----- - 1 files changed, 0 insertions(+), 5 deletions(-) + 1 file changed, 5 deletions(-) commit 8022315004e1623c0be320f7671fcd72c15c0de3 Author: Albert Astals Cid @@ -35080,7 +41339,7 @@ Wonder how that slipped here poppler/GlobalParams.cc | 3 +-- - 1 files changed, 1 insertions(+), 2 deletions(-) + 1 file changed, 1 insertion(+), 2 deletions(-) commit 82638babe89e402c0348619ec3205059b977c7e9 Author: Albert Astals Cid @@ -35088,15 +41347,15 @@ Fontconfig patch is here, rejoice - ChangeLog | 15 ++- + ChangeLog | 15 +- glib/poppler-document.cc | 1 - - poppler/CairoFontEngine.cc | 95 +--------- + poppler/CairoFontEngine.cc | 95 +-------- poppler/CairoFontEngine.h | 2 - poppler/CairoOutputDev.cc | 4 - poppler/GlobalParams.cc | 473 ++++++++++++++++++++----------------------- - poppler/GlobalParams.h | 17 +-- - poppler/SplashOutputDev.cc | 132 +------------ + poppler/GlobalParams.h | 17 +- + poppler/SplashOutputDev.cc | 132 +----------- poppler/SplashOutputDev.h | 3 - qt/poppler-document.cc | 1 - qt4/src/poppler-document.cc | 1 - @@ -35150,7 +41409,7 @@ ChangeLog | 12 +++++ poppler/CairoOutputDev.cc | 2 +- poppler/TextOutputDev.cc | 113 - +++++++++++++++++++++----------------------- + ++++++++++++++++++++++----------------------- 3 files changed, 67 insertions(+), 60 deletions(-) commit a3d9b5849cedf1316c6fc5859872e957f3f7b593 @@ -35178,14 +41437,14 @@ * glib/poppler-document.h: add prototypes. - ChangeLog | 23 +++++++++++++++++++++ + ChangeLog | 23 ++++++++++++++++++++++ glib/poppler-document.cc | 49 - +++++++++++++++++++++++++++++++++++++++------ - glib/poppler-document.h | 15 +++++++++---- - glib/poppler-page.cc | 10 +++++++++ - glib/poppler-private.h | 6 +++++ - poppler/PSOutputDev.cc | 23 +++++++++++++-------- - poppler/PSOutputDev.h | 9 ++++++- + +++++++++++++++++++++++++++++++++++++++------- + glib/poppler-document.h | 15 +++++++++----- + glib/poppler-page.cc | 10 ++++++++++ + glib/poppler-private.h | 6 ++++++ + poppler/PSOutputDev.cc | 23 +++++++++++++--------- + poppler/PSOutputDev.h | 9 +++++++-- 7 files changed, 112 insertions(+), 23 deletions(-) commit 7be920ecf13698c3cf4ab8df09c8c67f1a04bfa2 @@ -35196,7 +41455,7 @@ ChangeLog | 4 ++++ qt/test-poppler-qt.cpp | 2 ++ - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 2bc26dffd9f296799617d319055648c20f748c8a Author: Kristian Høgsberg @@ -35222,7 +41481,7 @@ ChangeLog | 5 +++++ poppler/DCTStream.cc | 38 ++++++++++++++++++++++++++++++++++++++ - 2 files changed, 43 insertions(+), 0 deletions(-) + 2 files changed, 43 insertions(+) commit a1869eca39172fcb42f036a5846b19548be53568 Author: Albert Astals Cid @@ -35232,7 +41491,7 @@ ChangeLog | 5 +++++ poppler/CairoFontEngine.cc | 2 ++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit 95529b41272484f08fb54393e1886bf7ff3e02c8 Author: Albert Astals Cid @@ -35240,9 +41499,9 @@ Make it possible to browse pages in test-poppler-qt - ChangeLog | 13 ++++++++--- + ChangeLog | 13 +++++++++---- qt/test-poppler-qt.cpp | 49 - +++++++++++++++++++++++++++++++++++++++-------- + +++++++++++++++++++++++++++++++++++++++--------- 2 files changed, 49 insertions(+), 13 deletions(-) commit 2d52650864eab0e9385ed1fe8fb594daac9d8322 @@ -35258,10 +41517,10 @@ * glib/poppler-document.h (PopplerFontType): new enum. Update prototypes. - ChangeLog | 11 +++++++++ + ChangeLog | 11 ++++++++++ glib/poppler-document.cc | 54 +++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-document.h | 38 +++++++++++++++++++++++--------- + glib/poppler-document.h | 38 ++++++++++++++++++++++---------- 3 files changed, 91 insertions(+), 12 deletions(-) commit 43bed4aafcf1d291dc96fa5070efbd7936a6122f @@ -35272,7 +41531,7 @@ ChangeLog | 4 ++++ splash/Splash.cc | 10 ++++++++++ - 2 files changed, 14 insertions(+), 0 deletions(-) + 2 files changed, 14 insertions(+) commit c7bcef87493d354a077dd223d76f86640acc0ce3 Author: Martin Kretzschmar @@ -35290,7 +41549,7 @@ A general cleanup of the Arthur output renderer. - ChangeLog | 5 ++ + ChangeLog | 5 +++ poppler/ArthurOutputDev.cc | 105 +++++++++++++++----------------------------- 2 files changed, 41 insertions(+), 69 deletions(-) @@ -35311,7 +41570,7 @@ ChangeLog | 9 +++++++ glib/poppler-page.cc | 59 +++++++++++++++++++++++++++++++++++++++++++++- - poppler/TextOutputDev.cc | 17 +++++++----- + poppler/TextOutputDev.cc | 17 +++++++------ 3 files changed, 77 insertions(+), 8 deletions(-) commit 1cd915397c9532ed80b4f905b6ed9c0126aa38f2 @@ -35355,7 +41614,7 @@ ChangeLog | 6 +++++- glib/poppler-page.cc | 5 +++++ - 2 files changed, 10 insertions(+), 1 deletions(-) + 2 files changed, 10 insertions(+), 1 deletion(-) commit b1015f6bdbd93b2a2574a9f0e0e1cd7dbae9af78 Author: Brad Hards @@ -35366,7 +41625,7 @@ ChangeLog | 4 ++++ glib/poppler-document.cc | 2 ++ - 2 files changed, 6 insertions(+), 0 deletions(-) + 2 files changed, 6 insertions(+) commit 8bf787031e7a2e93b4e1202918bd1aee86675082 Author: Brad Hards @@ -35395,7 +41654,7 @@ Suppress noise from new test files. qt4/tests/.cvsignore | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit 8a8d57bdcf11ed2903913d938b9711053b9bb9f1 Author: Albert Astals Cid @@ -35406,7 +41665,7 @@ ChangeLog | 2 ++ poppler/GfxFont.cc | 41 +++++++++++++++++++++++++++++++++++++++++ poppler/GfxFont.h | 36 ++++++++++++++++++++++++++++++++++++ - 3 files changed, 79 insertions(+), 0 deletions(-) + 3 files changed, 79 insertions(+) commit 3a1646c2f776f5a07b0e830fcb8e1b0a80efb41c Author: Albert Astals Cid @@ -35417,7 +41676,7 @@ ChangeLog | 5 +++++ poppler/PDFDoc.cc | 28 ++++++++++++++++++++++++++++ poppler/PDFDoc.h | 1 + - 3 files changed, 34 insertions(+), 0 deletions(-) + 3 files changed, 34 insertions(+) commit 377c023d31cf74d8240aa5be9dba8e3838459a8c Author: Brad Hards @@ -35428,7 +41687,7 @@ ChangeLog | 4 ++++ qt4/tests/Makefile.am | 6 +++++- qt4/tests/check_linearised.cpp | 23 +++++++++++++++++++++++ - 3 files changed, 32 insertions(+), 1 deletions(-) + 3 files changed, 32 insertions(+), 1 deletion(-) commit 5fa869887a840a585340993718df0841010666cf Author: Brad Hards @@ -35449,7 +41708,7 @@ Update to reflect recent changes. qt4/tests/.cvsignore | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 6cea437208f913085a6a8c7183b0826a107cefb5 Author: Albert Astals Cid @@ -35469,10 +41728,10 @@ Check in a couple more test apps qt4/tests/Makefile.am | 10 ++++++- - qt4/tests/check_author.cpp | 25 ++++++++++++++++ + qt4/tests/check_author.cpp | 25 +++++++++++++++++ qt4/tests/check_permissions.cpp | 59 +++++++++++++++++++++++++++++++++++++++ - 3 files changed, 93 insertions(+), 1 deletions(-) + 3 files changed, 93 insertions(+), 1 deletion(-) commit 839a798ec3725427185de5a48c58ac448596b25d Author: Brad Hards @@ -35480,10 +41739,10 @@ Add Qt4 bindings for new user permission properties. - ChangeLog | 4 +++ + ChangeLog | 4 ++++ qt4/src/poppler-document.cc | 25 +++++++++++++++++++++ qt4/src/poppler-qt4.h | 51 - ++++++++++++++++++++++++++++++++++++++---- + ++++++++++++++++++++++++++++++++++++++----- 3 files changed, 75 insertions(+), 5 deletions(-) commit e10f6990d3339e3a7adeaa50b1754cf7ecf82f87 @@ -35494,11 +41753,11 @@ printing, document assembly, extraction for accessibility and form completion. - ChangeLog | 8 +++++++ - poppler/PDFDoc.h | 9 ++++++++ + ChangeLog | 8 ++++++++ + poppler/PDFDoc.h | 9 +++++++++ poppler/XRef.cc | 55 - ++++++++++++++++++++++++++++++++++++++++++++++++++--- - poppler/XRef.h | 4 +++ + ++++++++++++++++++++++++++++++++++++++++++++++++++---- + poppler/XRef.h | 4 ++++ 4 files changed, 72 insertions(+), 4 deletions(-) commit 3a8e1ba03cdec6412dd0b79f0cc59a4cd97dd4e7 @@ -35508,7 +41767,7 @@ A couple more little changes. ChangeLog | 6 ++++++ - 1 files changed, 6 insertions(+), 0 deletions(-) + 1 file changed, 6 insertions(+) commit a44bd0b45bb89f29ddca5d0e8986a8de50f9db39 Author: Brad Hards @@ -35517,7 +41776,7 @@ Change path to sample file to point to test module qt4/tests/check_orientation.cpp | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 2a7079087c35651c242d3843c94703a3199e61ca Author: Brad Hards @@ -35526,7 +41785,7 @@ Fix typo causing failure to pick up upside down pages. qt4/src/poppler-page.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 529a548044ae721a414c5b8e768c0498b1e6830b Author: Brad Hards @@ -35536,7 +41795,7 @@ ChangeLog | 30 +++++++++++++++++++++++++++++- qt4/tests/.cvsignore | 2 ++ - 2 files changed, 31 insertions(+), 1 deletions(-) + 2 files changed, 31 insertions(+), 1 deletion(-) commit 08cca4670f8ae65333beacda85834112e76489d1 Author: Brad Hards @@ -35548,7 +41807,7 @@ qt4/tests/Makefile.am | 9 ++++- qt4/tests/poppler-fonts.cpp | 76 +++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 84 insertions(+), 1 deletions(-) + 2 files changed, 84 insertions(+), 1 deletion(-) commit 52af89d8303b50c45d5e4584d19ec8b7d7ebcf9b Author: Brad Hards @@ -35572,10 +41831,10 @@ * qt4/src/poppler-page.cc: change the render API to make it more Qt-like. - qt4/src/poppler-document.cc | 7 +++- - qt4/src/poppler-page.cc | 5 +-- + qt4/src/poppler-document.cc | 7 ++++- + qt4/src/poppler-page.cc | 5 ++- qt4/src/poppler-qt4.h | 73 - ++++++++++++++++++++++++++++++++++++++++-- + ++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 77 insertions(+), 8 deletions(-) commit 5d194b926d1ed642ed4bbd3304befa073d389cd4 @@ -35597,7 +41856,7 @@ file. qt4/tests/check_orientation.cpp | 8 ++++---- - 1 files changed, 4 insertions(+), 4 deletions(-) + 1 file changed, 4 insertions(+), 4 deletions(-) commit 96fc0ea3fc6c9c7d933e9e0c02a622b2aeef7617 Author: Kristian Høgsberg @@ -35610,7 +41869,7 @@ backwards in the text flow. Currently this is a big pile of if-statements, and there is certainly room for improvement. - ChangeLog | 6 ++ + ChangeLog | 6 +++ poppler/TextOutputDev.cc | 129 +++++++++++++++++++++++++++++++++++++--------- 2 files changed, 111 insertions(+), 24 deletions(-) @@ -35651,7 +41910,7 @@ ChangeLog | 5 +++++ glib/poppler-page.cc | 1 - glib/poppler-private.h | 1 + - 3 files changed, 6 insertions(+), 1 deletions(-) + 3 files changed, 6 insertions(+), 1 deletion(-) commit b15a8caf003d7d0631d4f78db5ab54e55a5a000a Author: Kristian Høgsberg @@ -35673,7 +41932,7 @@ ChangeLog | 20 ++- configure.ac | 4 +- - glib/poppler-page.cc | 224 +++++++++++++++++++------ + glib/poppler-page.cc | 224 ++++++++++++++++++------ glib/poppler-page.h | 65 ++++--- glib/poppler-private.h | 3 + poppler/CairoOutputDev.cc | 13 +- @@ -35692,7 +41951,7 @@ Forgot assigning type on copy constructor poppler/FontInfo.cc | 1 + - 1 files changed, 1 insertions(+), 0 deletions(-) + 1 file changed, 1 insertion(+) commit e512cd1832a0e6d15149e12e8e67a39d335efc86 Author: Albert Astals Cid @@ -35703,7 +41962,7 @@ ChangeLog | 3 +++ poppler/FontInfo.cc | 4 ++++ poppler/FontInfo.h | 2 ++ - 3 files changed, 9 insertions(+), 0 deletions(-) + 3 files changed, 9 insertions(+) commit 8aeb5205f2876a9dc36eb1dc1e361bb87adf4e31 Author: Albert Astals Cid @@ -35726,7 +41985,7 @@ qt4/.cvsignore | 3 +++ qt4/src/.cvsignore | 7 +++++++ qt4/tests/.cvsignore | 8 ++++++++ - 5 files changed, 26 insertions(+), 0 deletions(-) + 5 files changed, 26 insertions(+) commit ea58a20bbcf450a1ecb8fe00e8162cfdf76105f1 Author: Brad Hards @@ -35748,7 +42007,7 @@ ChangeLog | 12 + Makefile.am | 10 +- - configure.ac | 94 +++- + configure.ac | 94 ++- poppler-qt4.pc.in | 12 + poppler/ArthurOutputDev.cc | 604 +++++++++++++++++++ poppler/ArthurOutputDev.h | 133 +++++ @@ -35790,7 +42049,7 @@ * poppler/Makefile.am: Remove specialized cairo output devices. - ChangeLog | 17 +++ + ChangeLog | 17 ++++ glib/poppler-document.cc | 2 +- glib/poppler-page.cc | 21 +++- glib/poppler-private.h | 4 +- @@ -35831,11 +42090,11 @@ const; to the qt frontend. Code almost 100% copied from xpdf code inside kpdf - ChangeLog | 5 ++ + ChangeLog | 5 +++ qt/poppler-page.cc | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++ qt/poppler-qt.h | 78 +++++++++++++++++++++++++++++++++ - 3 files changed, 204 insertions(+), 0 deletions(-) + 3 files changed, 204 insertions(+) commit 9d4327eecd94299a3629b0814e84f981a4be1dfb Author: Martin Kretzschmar @@ -35867,7 +42126,7 @@ ChangeLog | 4 ++++ poppler/Error.h | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit c2780a3b3f4615bb28bfe394d649b388db4ccf4d Author: Kristian Høgsberg @@ -35887,7 +42146,7 @@ NEWS | 10 ++++++++++ configure.ac | 2 +- glib/poppler-page.cc | 2 ++ - 4 files changed, 22 insertions(+), 1 deletions(-) + 4 files changed, 22 insertions(+), 1 deletion(-) commit 9023891f314ac37811b5c973be2e36b6de353cf2 Author: Martin Kretzschmar @@ -35897,7 +42156,7 @@ ChangeLog | 5 +++++ glib/poppler-document.cc | 16 +++++++++++++++- - 2 files changed, 20 insertions(+), 1 deletions(-) + 2 files changed, 20 insertions(+), 1 deletion(-) commit bbf2fe757f0fd08d0e90e3810709ab7152c779c0 Author: Kristian Høgsberg @@ -35913,7 +42172,7 @@ ChangeLog | 7 +++++ glib/poppler-page.cc | 69 - ++++++++++++++++++++++++++++--------------------- + ++++++++++++++++++++++++++++---------------------- glib/poppler-page.h | 57 +++++++++++++++++++++-------------------- glib/poppler.h | 1 - 4 files changed, 75 insertions(+), 59 deletions(-) @@ -35947,7 +42206,7 @@ ChangeLog | 6 ++++++ glib/poppler-page.cc | 6 ++++++ - 2 files changed, 12 insertions(+), 0 deletions(-) + 2 files changed, 12 insertions(+) commit bada3d03583ef6ed34d2aa743de8fd9ca4a5c748 Author: Kristian Høgsberg @@ -35962,7 +42221,7 @@ ChangeLog | 5 +++ autogen.sh | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - 2 files changed, 109 insertions(+), 0 deletions(-) + 2 files changed, 109 insertions(+) commit 25db42831ddde500697126352458e092a9b0ab9b Author: Kristian Høgsberg @@ -35979,7 +42238,7 @@ ChangeLog | 6 ++++++ glib/poppler-document.cc | 9 +++++++++ glib/poppler-document.h | 1 + - 3 files changed, 16 insertions(+), 0 deletions(-) + 3 files changed, 16 insertions(+) commit e54e306ac5d603001fefda3b9ecd81821e4bd09e Author: Kristian Høgsberg @@ -35990,7 +42249,7 @@ poppler/FontInfo.cc | 197 +++++++++++++++++++++++++++++++++++++++++++++++++++ poppler/FontInfo.h | 51 +++++++++++++ - 2 files changed, 248 insertions(+), 0 deletions(-) + 2 files changed, 248 insertions(+) commit 23e8ed5cbf4d7d999a8a1dcf714aaddaf339ceff Author: Kristian Høgsberg @@ -36015,7 +42274,7 @@ glib/poppler.h | 2 + glib/test-poppler-glib.c | 14 +++++ poppler/Makefile.am | 2 + - 7 files changed, 179 insertions(+), 0 deletions(-) + 7 files changed, 179 insertions(+) commit fbb86d2983a28ad2c46b8c5d475a2df1f0f0e4b9 Author: Kristian Høgsberg @@ -36040,7 +42299,7 @@ ChangeLog | 4 ++++ qt/test-poppler-qt.cpp | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit 0017b1a72c58e2d016d22451079c466abdfff15c Author: Kristian Høgsberg @@ -36060,7 +42319,7 @@ poppler/TextOutputDev.h | 3 +++ qt/poppler-qt.h | 2 ++ test/gtk-splash-test.cc | 2 +- - 4 files changed, 15 insertions(+), 1 deletions(-) + 4 files changed, 15 insertions(+), 1 deletion(-) commit 47c3b4ec2c7691e44f5100b1f5956df0005467c8 Author: Kristian Høgsberg @@ -36114,7 +42373,7 @@ glib/poppler-document.cc | 155 +++++++++++++++++++++++++++++++++++++++++++++- glib/poppler.gidl | 5 ++ - glib/test-poppler-glib.c | 46 ++++++++++---- + glib/test-poppler-glib.c | 46 +++++++++----- 4 files changed, 194 insertions(+), 17 deletions(-) commit 9e6eeec574d48d2341ee620e16360d3b21c40103 @@ -36157,7 +42416,7 @@ * poppler/CairoOutputDev.cc (drawImage): Use getRGBLine here. - ChangeLog | 8 ++ + ChangeLog | 8 +++ poppler/CairoOutputDev.cc | 66 +++++++++---------- poppler/GfxState.cc | 160 ++++++++++++++++++++++++++++++++++++++++++++- @@ -36191,7 +42450,7 @@ ChangeLog | 5 +++++ glib/poppler-document.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 0bbf2f08173866cde9b097eeeb1f4218a396588d Author: Kristian Høgsberg @@ -36227,7 +42486,7 @@ Add bugzilla number. ChangeLog | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) + 1 file changed, 1 insertion(+), 1 deletion(-) commit 42de1348622cf86a87bc22941bd48bffa943dac9 Author: Kristian Høgsberg @@ -36243,7 +42502,7 @@ ChangeLog | 7 +++++++ poppler/CairoFontEngine.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit afc05387c94a76ff0ed69b3f5d9a69ddd1448e83 Author: Kristian Høgsberg @@ -36287,7 +42546,7 @@ Add bug number and attribution to ChangeLog entry. ChangeLog | 4 ++++ - 1 files changed, 4 insertions(+), 0 deletions(-) + 1 file changed, 4 insertions(+) commit 6d7f624c13e8a9a8251ac97388cd80e418c70250 Author: Kristian Høgsberg @@ -36303,7 +42562,7 @@ * glib/poppler-enums.c: * glib/poppler-enums.h: Removed. - ChangeLog | 8 ++ + ChangeLog | 8 +++ configure.ac | 3 + glib/.cvsignore | 1 + glib/Makefile.am | 67 ++++++++++++------ @@ -36364,7 +42623,7 @@ ChangeLog | 4 ++++ glib/test.gidl | 23 +++++++++++++++++++++++ - 2 files changed, 27 insertions(+), 0 deletions(-) + 2 files changed, 27 insertions(+) commit bef5a548f3b21e7220079155e9b5054fb0c6c3c7 Author: Kristian Høgsberg @@ -36407,7 +42666,7 @@ glib/poppler.cc | 21 +++++++++++++++++++++ glib/poppler.h | 11 +++++++++++ glib/test-poppler-glib.c | 9 ++++++++- - 6 files changed, 89 insertions(+), 1 deletions(-) + 6 files changed, 89 insertions(+), 1 deletion(-) commit 7d189e33cfa68e722561e9398ad85a77b538ab14 Author: Kristian Høgsberg @@ -36451,7 +42710,7 @@ ChangeLog | 6 +++ poppler/CairoOutputDev.cc | 98 - +++++++++++++++++++++++--------------------- + +++++++++++++++++++++++---------------------- 2 files changed, 57 insertions(+), 47 deletions(-) commit c142773ad30b409d8169a53921e731305de46e50 @@ -36503,11 +42762,11 @@ Register a bunch of boxed types to test introspection, and for LBs. Also, remove unused 'popper_document_save()' (-: - ChangeLog | 13 +++++++ - glib/poppler-document.cc | 48 +++++++++++++++----------- - glib/poppler-document.h | 18 +++++++++- - glib/poppler-enums.c | 19 ++++++++++ - glib/poppler-enums.h | 2 + + ChangeLog | 13 ++++++++ + glib/poppler-document.cc | 48 ++++++++++++++++----------- + glib/poppler-document.h | 18 ++++++++-- + glib/poppler-enums.c | 19 +++++++++++ + glib/poppler-enums.h | 2 ++ glib/poppler-page.cc | 83 ++++++++++++++++++++++++++++++++++++++++++++++ glib/poppler-page.h | 36 ++++++++++++++------ @@ -36526,8 +42785,8 @@ 0.4.0 font API and port to new cairo head. - ChangeLog | 7 ++++ - configure.ac | 4 +- + ChangeLog | 7 +++++ + configure.ac | 4 +-- poppler/CairoFontEngine.cc | 67 ++++++++++++++++------------------------ poppler/CairoFontEngine.h | 12 +++---- @@ -36549,7 +42808,7 @@ ChangeLog | 8 ++++++++ splash/SplashFTFont.cc | 2 +- - 2 files changed, 9 insertions(+), 1 deletions(-) + 2 files changed, 9 insertions(+), 1 deletion(-) commit 49d89ca0ed3986bec7468f6c0ed295e84ba67239 Author: Jeff Muizelaar @@ -36621,13 +42880,13 @@ to really set the PDF version correct. Third time's the charm. - ChangeLog | 7 +++++ + ChangeLog | 7 ++++++ glib/poppler-document.cc | 4 ++- goo/GooTimer.cc | 63 ++++++++++++++++++++++++++++++++++++++++++++++ goo/GooTimer.h | 40 +++++++++++++++++++++++++++++ - goo/Makefile.am | 2 + - 5 files changed, 115 insertions(+), 1 deletions(-) + goo/Makefile.am | 2 ++ + 5 files changed, 115 insertions(+), 1 deletion(-) commit 38948ea6f9ef76dae9b8a7156fe1ef32a0457380 Author: Kristian Høgsberg @@ -36642,7 +42901,7 @@ ChangeLog | 6 ++++++ NEWS | 6 ++++++ configure.ac | 2 +- - 3 files changed, 13 insertions(+), 1 deletions(-) + 3 files changed, 13 insertions(+), 1 deletion(-) commit af65146c92682a3af06e9d3147426445c78309de Author: Kristian Høgsberg @@ -36658,7 +42917,7 @@ ChangeLog | 7 +++++++ poppler/GlobalParams.cc | 2 +- - 2 files changed, 8 insertions(+), 1 deletions(-) + 2 files changed, 8 insertions(+), 1 deletion(-) commit c2db3e1b297a9dc0accd0d8a1366970d45705c8f Author: Jeff Muizelaar @@ -36674,7 +42933,7 @@ * poppler/Stream.h: Add a reimplementation of FlateStream using zlib. - ChangeLog | 10 ++++ + ChangeLog | 10 +++++ configure.ac | 29 +++++++++++++ poppler/FlateStream.cc | 107 ++++++++++++++++++++++++++++++++++++++++++++++++ @@ -36709,7 +42968,7 @@ ChangeLog | 4 ++++ glib/test-poppler-glib.c | 20 ++++++++++++++++++++ - 2 files changed, 24 insertions(+), 0 deletions(-) + 2 files changed, 24 insertions(+) commit 44b800d520f90ffd143255d2c23835ea357c195b Author: Kristian Høgsberg @@ -36718,7 +42977,7 @@ Actually commit the qt/Makefile.am change advertised in the ChangeLog. qt/Makefile.am | 5 +++-- - 1 files changed, 3 insertions(+), 2 deletions(-) + 1 file changed, 3 insertions(+), 2 deletions(-) commit 437bec03dd2ab3cdf6215f9ad443b7f21ce84e18 Author: Kristian Høgsberg @@ -36731,7 +42990,7 @@ to SOURCES. ChangeLog | 5 +++++ - 1 files changed, 5 insertions(+), 0 deletions(-) + 1 file changed, 5 insertions(+) commit 9b2b1244ed5f30a99120aaee49c72f7cb6a4f556 Author: Kristian Høgsberg @@ -36772,7 +43031,7 @@ ChangeLog | 5 +++++ poppler/CairoFontEngine.cc | 3 ++- - 2 files changed, 7 insertions(+), 1 deletions(-) + 2 files changed, 7 insertions(+), 1 deletion(-) commit 42ecccf9b454893797e3d62f0f1c0a3276689e51 Author: Kristian Høgsberg @@ -36789,9 +43048,9 @@ between several cairo_font_t. - ChangeLog | 8 ++++ + ChangeLog | 8 +++++ poppler/CairoFontEngine.cc | 79 - +++++++++++++++++++------------------------ + ++++++++++++++++++++------------------------ poppler/CairoFontEngine.h | 23 +++++-------- poppler/CairoOutputDev.cc | 18 +++++----- 4 files changed, 61 insertions(+), 67 deletions(-) @@ -36842,12 +43101,12 @@ call to Stream::addFilters(), reported by Ryan Lortie (#3046). - ChangeLog | 7 +++++- - NEWS | 12 ++-------- + ChangeLog | 7 ++++++- + NEWS | 12 +++--------- poppler/CairoFontEngine.cc | 45 - ++++++++++++++++++++++++++++++++++++++----- - poppler/CairoFontEngine.h | 9 +++++++- - poppler/CairoOutputDev.cc | 9 +------- + ++++++++++++++++++++++++++++++++++++++------ + poppler/CairoFontEngine.h | 9 ++++++++- + poppler/CairoOutputDev.cc | 9 +-------- 5 files changed, 57 insertions(+), 25 deletions(-) commit 71c1563bb0462154cb7caa4356d8f8d049073ac4 @@ -36916,7 +43175,7 @@ ChangeLog | 5 +++++ glib/poppler-document.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 4e81624dcc2d5218f2f8bb4eaa992e724014a853 Author: Jonathan Blandford @@ -36930,7 +43189,7 @@ ChangeLog | 5 +++++ glib/poppler-document.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 6ef9d30f06be2bd8a9e1470d70f49843a7e432ac Author: Kristian Høgsberg @@ -36944,7 +43203,7 @@ ChangeLog | 5 +++++ glib/poppler-action.cc | 7 ++++++- - 2 files changed, 11 insertions(+), 1 deletions(-) + 2 files changed, 11 insertions(+), 1 deletion(-) commit 770b7310ce8b07f95960c2014bf3f6040c060ac4 Author: Kristian Høgsberg @@ -36986,18 +43245,18 @@ * poppler/Catalog.cc: * poppler/Catalog.h: Extend to support PageLayout. - ChangeLog | 22 +++++ + ChangeLog | 22 ++++++ glib/Makefile.am | 32 +++++++- glib/poppler-action.h | 15 ++-- glib/poppler-document.cc | 196 +++++++++++++++++++++++++++++++++++++++++----- - glib/poppler-document.h | 43 +++++++++-- + glib/poppler-document.h | 43 ++++++++-- glib/poppler-enums.c | 144 ++++++++++++++++++++++++++++++++++ glib/poppler-enums.h | 32 ++++++++ glib/poppler-page.cc | 3 - glib/poppler-page.h | 1 + glib/poppler.h | 7 ++ - glib/test-poppler-glib.c | 48 ++++++++++- + glib/test-poppler-glib.c | 48 +++++++++++- poppler/Catalog.cc | 17 ++++ poppler/Catalog.h | 11 +++ 13 files changed, 529 insertions(+), 42 deletions(-) @@ -37070,7 +43329,7 @@ ChangeLog | 6 ++++++ qt/poppler-document.cc | 20 ++++++++++++++++++++ qt/poppler-qt.h | 4 ++++ - 3 files changed, 30 insertions(+), 0 deletions(-) + 3 files changed, 30 insertions(+) commit dee72b531dab83a29c7675ae06ffe376e4498a4e Author: Kristian Høgsberg @@ -37082,7 +43341,7 @@ ChangeLog | 4 ++++ poppler-qt.pc.in | 2 +- - 2 files changed, 5 insertions(+), 1 deletions(-) + 2 files changed, 5 insertions(+), 1 deletion(-) commit df59ce3b1d5ca8cd46aaf5f189bc78953e21e1a9 Author: Jeff Muizelaar @@ -37149,7 +43408,7 @@ ChangeLog | 5 +++++ configure.ac | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit e258ed0cb42d524ee39451f680ad4c067e7721da Author: Jeff Muizelaar @@ -37165,7 +43424,7 @@ ChangeLog | 6 ++++++ glib/.cvsignore | 7 +++++++ qt/.cvsignore | 7 +++++++ - 4 files changed, 22 insertions(+), 0 deletions(-) + 4 files changed, 22 insertions(+) commit 2a5624a81aa84677a57e098d7d4045f44e3b6f3a Author: Jeff Muizelaar @@ -37180,7 +43439,7 @@ ChangeLog | 6 ++++++ qt/poppler-page.cc | 6 ++++++ qt/poppler-qt.h | 1 + - 3 files changed, 13 insertions(+), 0 deletions(-) + 3 files changed, 13 insertions(+) commit f983e3d317660653f2bfc56f9b06e2cec675beca Author: Jeff Muizelaar @@ -37201,7 +43460,7 @@ ChangeLog | 13 +++ Makefile.am | 13 ++- - configure.ac | 64 +++++++++++++- + configure.ac | 64 ++++++++++++- poppler-qt.pc.in | 11 +++ qt/Makefile.am | 32 +++++++ qt/poppler-document.cc | 232 @@ -37234,9 +43493,9 @@ (splash_render_to_pixbuf): Split out the splash code to this function. - ChangeLog | 16 ++++ + ChangeLog | 16 +++++ NEWS | 6 +- - configure.ac | 16 +++- + configure.ac | 16 +++-- glib/Makefile.am | 17 ++++- glib/poppler-page.cc | 152 ++++++++++++++++++++++++++++++++-------- @@ -37254,7 +43513,7 @@ * ChangeLog: Add this entry to test commit mailer script. ChangeLog | 2 ++ - 1 files changed, 2 insertions(+), 0 deletions(-) + 1 file changed, 2 insertions(+) commit 50b494266ce197fe88468ca2917b9910d77e5f98 Author: Kristian Høgsberg @@ -37267,7 +43526,7 @@ ChangeLog | 3 +++ TODO | 2 ++ - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit d3d12235bf4de48363571b3d992ea3bfc29e6529 Author: Kristian Høgsberg @@ -37309,7 +43568,7 @@ ChangeLog | 5 +++++ glib/poppler-page.cc | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit 8c2a5ffb73c0f2d84adebcfbd43f8347ae8c8bbc Author: Jeff Muizelaar @@ -37322,7 +43581,7 @@ ChangeLog | 5 +++++ poppler/DCTStream.h | 2 ++ - 2 files changed, 7 insertions(+), 0 deletions(-) + 2 files changed, 7 insertions(+) commit 1879d82d9088aa36ef5e677f4bae44c84f90caa6 Author: Jeff Muizelaar @@ -37337,7 +43596,7 @@ ChangeLog | 6 ++++++ poppler/Page.cc | 10 ++++++++++ poppler/Page.h | 4 ++++ - 3 files changed, 20 insertions(+), 0 deletions(-) + 3 files changed, 20 insertions(+) commit fa4efbed51e12811070798a7cfb6b1f9e8d57abc Author: Kristian Høgsberg @@ -37366,7 +43625,7 @@ a couple of functions. - ChangeLog | 8 ++++ + ChangeLog | 8 +++++ glib/poppler-page.cc | 82 ++++++++++++++++++++++++++++++++++++++++------ glib/poppler-page.h | 18 +++++++--- @@ -37386,7 +43645,7 @@ links to locations on the current document. :s - ChangeLog | 7 ++++ + ChangeLog | 7 +++++ glib/poppler-page.cc | 85 +++++++++++++++++++++++++++++++++++++++++++++++--- glib/poppler-page.h | 15 +++++++++ @@ -37403,7 +43662,7 @@ ChangeLog | 5 +++++ poppler/DCTStream.h | 2 +- - 2 files changed, 6 insertions(+), 1 deletions(-) + 2 files changed, 6 insertions(+), 1 deletion(-) commit e6a2a588305b4797af901599eb6854028f2be476 Author: Jeff Muizelaar @@ -37415,7 +43674,7 @@ ChangeLog | 4 ++++ poppler/Catalog.cc | 1 + - 2 files changed, 5 insertions(+), 0 deletions(-) + 2 files changed, 5 insertions(+) commit a52905c0f0bf4d10d2103b80924a4de204d03836 Author: Jonathan Blandford @@ -37425,7 +43684,7 @@ glib/poppler-action.cc | 285 ++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 285 insertions(+), 0 deletions(-) + 1 file changed, 285 insertions(+) commit 9542860a74076020b5727d4b761c08cdab42d69e Author: Jonathan Blandford @@ -37435,7 +43694,7 @@ glib/poppler-action.h | 157 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 157 insertions(+), 0 deletions(-) + 1 file changed, 157 insertions(+) commit 07720f98eca8736695f7d0d8e98465d301e6b7cf Author: Jonathan Blandford @@ -37462,14 +43721,14 @@ * glib/poppler-private.h (_poppler_action_new): New function. * glib/test-poppler-glib.c: Fix warnings. - ChangeLog | 8 ++++++ - glib/Makefile.am | 2 + + ChangeLog | 8 +++++++ + glib/Makefile.am | 2 ++ glib/poppler-document.cc | 57 - ++++++++++----------------------------------- - glib/poppler-document.h | 7 +---- - glib/poppler-private.h | 12 ++++++++- + +++++++++++----------------------------------- + glib/poppler-document.h | 7 ++---- + glib/poppler-private.h | 12 ++++++++-- glib/poppler.h | 1 + - glib/test-poppler-glib.c | 4 ++- + glib/test-poppler-glib.c | 4 +++- 7 files changed, 39 insertions(+), 52 deletions(-) commit cab0ec4d011c34b571050a446c6e3286cc8749c8 @@ -37492,8 +43751,8 @@ ChangeLog | 12 ++++ glib/poppler-document.cc | 160 +++++++++++++++++++++++++++++++++++++++++++++- - glib/poppler-document.h | 15 ++++ - glib/poppler-page.cc | 48 ++++++++++++++- + glib/poppler-document.h | 15 +++++ + glib/poppler-page.cc | 48 +++++++++++++- glib/poppler-page.h | 3 + poppler-glib.pc.in | 2 +- 6 files changed, 236 insertions(+), 4 deletions(-) @@ -37512,11 +43771,11 @@ * glib/poppler-page.cc (poppler_page_get_thumbnail): New glib function for getting the embedded thumbnail image for a page. - ChangeLog | 10 ++++ + ChangeLog | 10 +++++ glib/poppler-page.cc | 23 ++++++++++ - glib/poppler-page.h | 32 ++++++------- + glib/poppler-page.h | 32 +++++++------- glib/test-poppler-glib.c | 24 +++++++--- - poppler/Dict.cc | 20 ++++++++ + poppler/Dict.cc | 20 +++++++++ poppler/Dict.h | 1 + poppler/Page.cc | 109 ++++++++++++++++++++++++++++++++++++++++++++++ @@ -37700,9 +43959,9 @@ ChangeLog | 23 +++ glib/poppler-document.cc | 95 ++++++++++++- glib/poppler-document.h | 3 + - glib/poppler-page.cc | 37 +++++- + glib/poppler-page.cc | 37 ++++- glib/poppler-private.h | 3 +- - glib/test-poppler-glib.c | 13 ++- + glib/test-poppler-glib.c | 13 +- poppler/Catalog.cc | 15 ++ poppler/Catalog.h | 6 + poppler/Makefile.am | 4 +- @@ -37759,14 +44018,14 @@ * glib/test-poppler-glib.c: * poppler-glib.pc.in: New files. - ChangeLog | 19 +++++ + ChangeLog | 19 ++++++ Makefile.am | 27 ++++---- - NEWS | 4 + + NEWS | 4 ++ configure.ac | 25 ++++++- - glib/Makefile.am | 33 +++++++++ + glib/Makefile.am | 33 ++++++++++ glib/poppler-document.cc | 165 ++++++++++++++++++++++++++++++++++++++++++++++ - glib/poppler-document.h | 52 ++++++++++++++ + glib/poppler-document.h | 52 +++++++++++++++ glib/poppler-page.cc | 158 ++++++++++++++++++++++++++++++++++++++++++++ glib/poppler-page.h | 50 ++++++++++++++ @@ -37774,7 +44033,7 @@ glib/poppler.cc | 29 ++++++++ glib/poppler.h | 42 ++++++++++++ glib/test-poppler-glib.c | 43 ++++++++++++ - poppler-glib.pc.in | 11 +++ + poppler-glib.pc.in | 11 ++++ 14 files changed, 661 insertions(+), 17 deletions(-) commit 2a31446b227b5cdc8334e672a71835b6ea14713a @@ -37790,7 +44049,7 @@ ChangeLog | 7 +++++++ poppler/XRef.cc | 6 ++++++ - 2 files changed, 13 insertions(+), 0 deletions(-) + 2 files changed, 13 insertions(+) commit e632a1d4b2f685993bda407458c34ef8e6b74136 Author: Kristian Høgsberg @@ -37821,7 +44080,7 @@ * DCTStream.cc, DCTStream.h, Stream.cc, Stream.h, Makefile.am: Conditionally use libjpeg instead of xpdf jpeg decoder. - ChangeLog | 9 ++++ + ChangeLog | 9 +++++ configure.ac | 34 +++++++++++++++- poppler/DCTStream.cc | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++ @@ -37868,7 +44127,7 @@ ChangeLog | 6 ++++++ NEWS | 12 ++++++++++++ configure.ac | 2 +- - 3 files changed, 19 insertions(+), 1 deletions(-) + 3 files changed, 19 insertions(+), 1 deletion(-) commit 5c6a2d34fc25df28ca5326e6910d7cf664f0c3d7 Author: Kristian Høgsberg @@ -37903,7 +44162,7 @@ Tell Gfx.cc that it should use drawString instead of drawChar. ChangeLog | 14 ++++++ - TODO | 3 + + TODO | 3 ++ poppler/CairoOutputDev.cc | 110 ++++++++++++++++++++++++++++++++++----------- poppler/CairoOutputDev.h | 7 +-- @@ -37950,7 +44209,7 @@ poppler/.cvsignore | 10 ++++++++++ splash/.cvsignore | 8 ++++++++ test/.cvsignore | 10 ++++++++++ - 7 files changed, 68 insertions(+), 0 deletions(-) + 7 files changed, 68 insertions(+) commit 932edfc3c5c61e3b3e98957b717abbf8055e1c5e Author: Kristian Høgsberg @@ -38025,7 +44284,7 @@ ChangeLog | 4 ++++ autogen.sh | 4 ++++ - 2 files changed, 8 insertions(+), 0 deletions(-) + 2 files changed, 8 insertions(+) commit cb02d5d0e770e2a8cbe5a8ac810820a2ce5fec0c Author: Kristian Høgsberg @@ -38212,4 +44471,4 @@ test/Makefile.am | 48 + test/gtk-cairo-test.cc | 298 +++ test/gtk-splash-test.cc | 314 +++ - 177 files changed, 70512 insertions(+), 0 deletions(-) + 177 files changed, 70512 insertions(+) diff -Nru poppler-0.18.4/Makefile.am poppler-0.20.5/Makefile.am --- poppler-0.18.4/Makefile.am 2011-11-22 21:32:57.000000000 +0000 +++ poppler-0.20.5/Makefile.am 2012-08-15 13:31:38.000000000 +0000 @@ -1,5 +1,5 @@ ACLOCAL_AMFLAGS = -I m4 -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-testdatadir=$(TESTDATADIR) if BUILD_SPLASH_OUTPUT splash_subdir = splash @@ -76,6 +76,7 @@ cmake/modules/FindGTK.cmake \ cmake/modules/FindIconv.cmake \ cmake/modules/FindLCMS.cmake \ + cmake/modules/FindLCMS2.cmake \ cmake/modules/FindQt4.cmake \ cmake/modules/GObjectIntrospectionMacros.cmake \ cmake/modules/MacroBoolTo01.cmake \ diff -Nru poppler-0.18.4/Makefile.in poppler-0.20.5/Makefile.in --- poppler-0.18.4/Makefile.in 2012-02-15 17:22:45.000000000 +0000 +++ poppler-0.20.5/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -72,11 +89,11 @@ poppler-qt4-uninstalled.pc poppler-cpp.pc \ poppler-cpp-uninstalled.pc CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = @@ -87,6 +104,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -108,6 +130,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ @@ -122,9 +150,11 @@ distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ - { test ! -d "$(distdir)" \ - || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -fr "$(distdir)"; }; } + if test -d "$(distdir)"; then \ + find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -rf "$(distdir)" \ + || { sleep 5 && rm -rf "$(distdir)"; }; \ + else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -153,6 +183,8 @@ DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print +am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ + | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -226,12 +258,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -285,6 +321,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -350,7 +387,7 @@ top_srcdir = @top_srcdir@ win32_libs = @win32_libs@ ACLOCAL_AMFLAGS = -I m4 -DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc +DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --with-testdatadir=$(TESTDATADIR) @BUILD_SPLASH_OUTPUT_TRUE@splash_subdir = splash @BUILD_SPLASH_OUTPUT_TRUE@splash_pc_file = poppler-splash.pc @BUILD_CAIRO_OUTPUT_TRUE@cairo_pc_file = poppler-cairo.pc @@ -381,7 +418,8 @@ cmake/modules/FindGLIB.cmake \ cmake/modules/FindGObjectIntrospection.cmake \ cmake/modules/FindGTK.cmake cmake/modules/FindIconv.cmake \ - cmake/modules/FindLCMS.cmake cmake/modules/FindQt4.cmake \ + cmake/modules/FindLCMS.cmake cmake/modules/FindLCMS2.cmake \ + cmake/modules/FindQt4.cmake \ cmake/modules/GObjectIntrospectionMacros.cmake \ cmake/modules/MacroBoolTo01.cmake \ cmake/modules/MacroEnsureVersion.cmake \ @@ -406,7 +444,7 @@ $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: -am--refresh: +am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ @@ -442,10 +480,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -492,8 +528,11 @@ -rm -f libtool config.lt install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -507,9 +546,7 @@ @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files + dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -680,13 +717,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -718,7 +752,11 @@ $(am__remove_distdir) dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 + tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-lzip: distdir + tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir @@ -726,7 +764,7 @@ $(am__remove_distdir) dist-xz: distdir - tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz + tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir @@ -757,6 +795,8 @@ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ + *.tar.lz*) \ + lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ @@ -766,7 +806,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) @@ -776,6 +816,7 @@ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ @@ -804,8 +845,16 @@ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: - @$(am__cd) '$(distuninstallcheck_dir)' \ - && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + @test -n '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: trying to run $@ with an empty' \ + '$$(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + $(am__cd) '$(distuninstallcheck_dir)' || { \ + echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ + exit 1; \ + }; \ + test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ @@ -839,10 +888,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: @@ -930,8 +984,8 @@ .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-generic distclean-hdr \ + dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ + dist-zip distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-local distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ diff -Nru poppler-0.18.4/NEWS poppler-0.20.5/NEWS --- poppler-0.18.4/NEWS 2012-02-15 17:21:34.000000000 +0000 +++ poppler-0.20.5/NEWS 2012-10-10 17:32:36.000000000 +0000 @@ -1,3 +1,234 @@ +Release 0.20.5 + core: + * Fix crashes in malformed documents + * Fix parsing of very big numbers + * Splash: Do not render invalid font outlines (Bug #55573) + * Check for NaN in TextPage::addChar + + build system: + * Fix build using mingw64 with winpthread + * autotools: Fix compilation when lcms is on non standard locations (Bug #55326) + * Support automake-1.12 (Bug #55541) + + glib: + * Chain up finalize to the parent class (Bug #55521) + +Release 0.20.4 + core: + * Improvements regarding embedded file handling. (KDE Bug #306008) + * Fix opening some broken files (Bug #14303) + * Fix memory leaks + * Fix crashes in various broken files + * Refine warning to only complain when really needed + * Remove function declared but not implemented + * Remove execution permissions from a header file + + qt4: + * Improvements regarding embedded file handling. (KDE Bug #306008) + +Release 0.20.3 + core: + * If NULL, NULL fails as password try EMPTY, EMPTY before failing (Bug #3498) + * SplashOutputDev: Fix bogus memory allocation size in Splash::arbitraryTransformImage (Bug #49523) + * SplashOutputDev: Fix segfault when scaleImage returns NULL (Bug #52488) + * SplashOutputDev: Blend mode enhancements for CMYK + * PSOutputDev: Fix conversion when creating multiple strips (Bug #51982) + * PSOutputDev: Fix Bitmaps in level2sep or level3sep (Bug #52384) + * PSOutputDev: Fix DeviceN images with alternate Lab colorspace in level 3 PostScript (Bug #51822) + * PSOutputDev: Make sure xScale and yScale are always initialized (Bug #52215) + * Unify poppler-config.h includes in core "installed" headers (Bug #52193) + * Replace c++ style includes with c style ones (Bug #52426) + + utils: + * pdfseparate: Return 0 on success + +Release 0.20.2 + core: + * Fix compilation on Windows + * Copy resources content defined in the pages dict on save (Bug #51369) + * PSOutputDev: Correct %%DocumentCustomColors (Bug #51479) + * PSOutputDev: Fix handling of DeviceN images in level 3 PostScript (Bug #51548) + * Fix crash in malformed documents + + qt4: + * Do not hang on malformed /Annots objects (Bug #51361) + +Release 0.20.1 + core: + * Remove unnecesary transparency group handling in splash (Bug #13487) + * Include substitute font name in system font cache (Bug #49826) + * Fix logic on SplashBitmap::writeImgFile + * PSOutputDev: use setoverprintmode only if rip knows it + * Fix crash in malformed documents + + qt4: + * Make TextAnnotation constructor public + * Fix saving of default TextAnnotation to xml + * Keep page rotation into account when normalizing annotation coords + + glib: + * Fix memory leak when document fails to load + * Make sure password is always converted to latin1 + * Fix typo in documentation + + build system: + * Distribute cmake/modules/FindLCMS2.cmake (Bug #49818) + + utils: + * pdftohtml: Determine if font is bold or italic based on FontDescriptor (Bug #49758) + * pdfseparate: Syntax fixes in the man page + +Release 0.20.0 + core: + * Reconstruct xref table if xref needed but missing (Bug #40719) + * Fix getFullyQualifiedName with unicode field names (Bug #49256) + * SplashOutputDev: Fix rendering of knockout groups (Bug #12185) + * SplashOutputDev: Fix cmyk transfer bug (Bug #49341) + * Fix crashes in broken documents + * Bring back the Outputdev::begin/endMarkedContent virtuals + * Build fixes + + qt4: + * Convert propertly unicode encoded field qualified names + + glib: + * glib: Use delete[] to free array allocated with new[] (Bug #48447) + +Release 0.19.4 + core: + * Annotation improvements + * More compatible file writing + * SplashOutputDev: Fix slow rendering of pdf with a lot of image masks in pattern colorspace + * Fix crashes in broken documents + * Fix spurious warning messages + + utils: + * pdftotext: Add missing section heading to man page + * pdftohtml: Fix crash when the destination file does not exist + + build system: + * autoconf: Do not append "-ansi" to CXXFLAG, if "-std=XXX" is already specified. + * autoconf: Do not clear FREETYPE_CFLAGS, FREETYPE_LIBS before PKG_CHECK_MODULES() + * autoconf: Copying graphics library CFLAGS to cpp frontend Makefile.am + +Release 0.19.3 + core: + * Annotation improvements + * CairoOutputDev: Fix regression caused by mesh gradients + * CairoOutputDev: Use correct userfont font bbox (Bug #48399) + * CairoOutputDev: Fix paintTransparencyGroup when both mask and fill opacity are required (Bug #48453) + * CairoOutputDev: Ensure 0 width lines with stroke_adjust are aligned + * CairoOutputDev: Only align stroke coords for horizontal and vertical lines (Bug #48318) + * CairoOutputDev: Fix stroke pattern with transparency group (Bug #48468) + * Fix crash in JBIG2Stream decoding + * Fix memory leak when looking for a substitute font + * Fix page labels to not have a null character at the end + * Fix Splash CMYK merge error + * ttc<->ttf fallback is expected for CJK font list in for Windows (Bug #48046) + + qt4: + * Annotations can now be modified + * Annotations can now be added + * Annotations can now be removed + + utils: + * pdftohtml: Add producer and version to xml output + * pdftohtml: Fix the mask inversion for PNG + +Release 0.19.2 + core: + * Annotation improvements + * CairoOutputDev: update cairo mesh pattern to 1.12 api + * CairoOutputDev: fix some transparency issues (Bug #47739) + * CairoOutputDev: Fix regression in some shadings + * TextOutputDev: Don't add newline to last line extracted by TextSelectionDumper (Bug #45955) + * CJK font improvements + * Improve font matching for non embedded fonts + * Fix regression regarding forceRasterize in PSOutputDev + * Fix typos glyph names in truetype 'post' table standard mac ordering + + build system: + * minor cmake fixes + * misc autoconf fixes + * POPPLER_VERSION is now wrapped in quotes + + utils: + * pdftohtml: extract mask images even if they are not JPEG (Bug #47186) + * pdftohtml: Flip images if they need to (Bug #32340) + +Release 0.19.1 + core: + * Improve CJK suport in PSOutputDev + * CJK substitute implementation on WIndows platforms + * Do not crash on malformed files with 0 bits in the color map of an image + * Fix regression in some PSOutputDev array sizing + * Improvements to Annotation editing + * Fix logic error in Rendition parsing code (Bug #47063) + * Minor API changes to SplashOutputDev (Bug #46622) + * Fix mismatch in some functions declarations + * Update poppler copyright year + + utils: + * pdftops: Fix -passfonts regression. (Bug #46744) + * pdffonts: List the encoding of each font. (Bug #46888) + * pdftohtml: Add possibilty of controlling word breaks percentage. (Bug #47022) + + qt4: + * Support for LinkMovie object (Bug #40561) + * Support for Media Rendition + + glib: + * Add poppler_fonts_iter_get_encoding + * Improvements to the demo + +Release 0.19.0 + core: + * Merge Xpdf 3.03 + * Add support for lcms2 + * SplashOutputDev: Implement Overprint + * PSOutputDev: Implement Overprint + * Expand glyph name ligatures such as "ff", "ffi" etc to normal form (Bug #7002) + * Use an Identity CharCodeToUnicode for Adobe-Identity and Adobe-UCS collections (Bug #35468) + * CairoOutputDev: Avoid setting huge clip area when printing (Bug #44002) + * CairoOutputDev: Fix test for rotation (Bug #14619) + * CairoOutputDev: Don't read inline image streams twice (Bug #45668) + * CairoOutputDev: set mask matrix before drawing an image with a mask (Bug #40828) + * Update glyph names to Unicode values mapping (Bug #13131) + * Only use Hints table when there are no parse errors (Bug #46459) + * Expose POPPLER_VERSION in poppler-config.h + + utils: + * pdftohtml: Output images in -xml mode if no -i option is specified + * pdftohtml: Get rid of static data members; merge duplicated jpeg dumping code + * pdftohtml: Be more consistent generating the outlines + * pdftohtml: Generate outlines in pdftohtml in -xml mode (Bug #56993) + * pdftohtml: Combine UTF16 surrogate pairs (Bug #46521) + * pdfinfo: Report page rotation + * pdfinfo: Decode utf-16 surrogate pairs + * pdftoppm: Allow one of -scale-to-[xy] = -1 to mean the aspect ratio is to be preserved (Bug #43393) + * pdftocairo: Allow one of -scale-to-[xy] = -1 to mean the aspect ratio is to be preserved + * pdffonts: Add -subst option to list the substitute font name and filename + * pdfseparate: Produce PDF/X conformant pdf pages if the original PDF was PDF/X conformant + * pdfimages: Add -list option to list all images (Bug #46066) + * Improve various manpages + + glib: + * Add poppler_fonts_iter_get_substitute_name + * Demo improvements + * Update gtk-doc makefile and m4 file + * Fix typos in documentation + + qt4: + * Add the option of PSConverter creating EPS + * Form support improvements + + build system: + * autotools: Print the cairo version required if not found (Bug #44619) + * autotools: Print the glib version required if not found + * autotools: Use pkgconfig to check for libopenjpeg (Bug #21789) + * autotools: Replace openjpeg compile test with a version test + * Add a configuration option for the test data dir + Release 0.18.4 core: * CairoOutputDev: Restore temporary clip used in CairoOutputDev::fill when painting a mask diff -Nru poppler-0.18.4/README poppler-0.20.5/README --- poppler-0.18.4/README 2011-11-22 21:32:57.000000000 +0000 +++ poppler-0.20.5/README 2012-05-10 20:05:44.000000000 +0000 @@ -34,4 +34,4 @@ Kristian Høgsberg, Feb. 27, 2005 -See the README-XPDF for the original xpdf-3.00 README. +See the README-XPDF for the original xpdf-3.03 README. diff -Nru poppler-0.18.4/README-XPDF poppler-0.20.5/README-XPDF --- poppler-0.18.4/README-XPDF 2011-11-22 21:32:57.000000000 +0000 +++ poppler-0.20.5/README-XPDF 2012-05-10 20:05:44.000000000 +0000 @@ -1,17 +1,17 @@ Xpdf ==== -version 3.00 -2004-jan-22 +version 3.03 +2011-aug-15 The Xpdf software and documentation are -copyright 1996-2004 Glyph & Cog, LLC. +copyright 1996-2011 Glyph & Cog, LLC. Email: derekn@foolabs.com WWW: http://www.foolabs.com/xpdf/ The PDF data structures, operators, and specification are -copyright 1985-2003 Adobe Systems Inc. +copyright 1985-2006 Adobe Systems Inc. What is Xpdf? @@ -24,35 +24,36 @@ utilities. Xpdf runs under the X Window System on UNIX, VMS, and OS/2. The non-X -components (pdftops, pdftotext, etc.) also run on Win32 systems and -should run on pretty much any system with a decent C++ compiler. - -Xpdf is designed to be small and efficient. It can use Type 1 or -TrueType fonts. - - -Distribution ------------- - -Xpdf is licensed under the GNU General Public License (GPL), version -2. In my opinion, the GPL is a convoluted, confusing, ambiguous mess. -But it's also pervasive, and I'm sick of arguing. And even if it is -confusing, the basic idea is good. - -In order to cut down on the confusion a little bit, here are some -informal clarifications: - -- I don't mind if you redistribute Xpdf in source and/or binary form, - as long as you include all of the documentation: README, man pages - (or help files), and COPYING. (Note that the README file contains a - pointer to a web page with the source code.) - -- Selling a CD-ROM that contains Xpdf is fine with me, as long as it - includes the documentation. I wouldn't mind receiving a sample - copy, but it's not necessary. - -- If you make useful changes to Xpdf, please make the source code - available -- post it on a web site, email it to me, whatever. +components (pdftops, pdftotext, etc.) also run on Windows and Mac OSX +systems and should run on pretty much any system with a decent C++ +compiler. Xpdf will run on 32-bit and 64-bit machines. + + +License & Distribution +---------------------- + +Xpdf is licensed under the GNU General Pulbic License (GPL), version 2 +or 3. This means that you can distribute derivatives of Xpdf under +any of the following: + - GPL v2 only + - GPL v3 only + - GPL v2 or v3 + +The Xpdf source package includes the text of both GPL versions: +COPYING for GPL v2, COPYING3 for GPL v3. + +Please note that Xpdf is NOT licensed under "any later version" of the +GPL, as I have no idea what those versions will look like. + +If you are redistributing unmodified copies of Xpdf (or any of the +Xpdf tools) in binary form, you need to include all of the +documentation: README, man pages (or help files), COPYING, and +COPYING3. + +If you want to incorporate the Xpdf source code into another program +(or create a modified version of Xpdf), and you are distributing that +program, you have two options: release your program under the GPL (v2 +and/or v3), or purchase a commercial Xpdf source license. If you're interested in commercial licensing, please see the Glyph & Cog web site: @@ -63,7 +64,7 @@ Compatibility ------------- -Xpdf is developed and tested on a Linux 2.4 x86 system. +Xpdf is developed and tested on Linux. In addition, it has been compiled by others on Solaris, AIX, HP-UX, Digital Unix, Irix, and numerous other Unix implementations, as well @@ -72,8 +73,8 @@ to compile it. The non-X components of Xpdf (pdftops, pdftotext, pdfinfo, pdffonts, -pdftoppm, and pdfimages) can also be compiled on Win32 systems. See -the Xpdf web page for details. +pdfdetach, pdftoppm, and pdfimages) can also be compiled on Windows +and Mac OSX systems. See the Xpdf web page for details. If you compile Xpdf for a system not listed on the web page, please let me know. If you're willing to make your binary available by ftp @@ -101,10 +102,9 @@ Source code and several precompiled executables are available. -Announcements of new versions are posted to several newsgroups -(comp.text.pdf, comp.os.linux.announce, and others) and emailed to a -list of people. If you'd like to receive email notification of new -versions, just let me know. +Announcements of new versions are posted to comp.text.pdf and emailed +to a list of people. If you'd like to receive email notification of +new versions, just let me know. Running Xpdf @@ -123,30 +123,48 @@ pdftotext file.pdf -There are four additional utilities (which are fully described in +There are five additional utilities (which are fully described in their man pages): pdfinfo -- dumps a PDF file's Info dictionary (plus some other useful information) pdffonts -- lists the fonts used in a PDF file along with various information for each font + pdfdetach -- lists or extracts embedded files (attachments) from a + PDF file pdftoppm -- converts a PDF file to a series of PPM/PGM/PBM-format bitmaps pdfimages -- extracts the images from a PDF file Command line options and many other details are described in the man -pages (xpdf.1, etc.) and the VMS help files (xpdf.hlp, etc.). +pages (xpdf(1), etc.) and the VMS help files (xpdf.hlp, etc.). + +All of these utilities read an optional configuration file: see the +xpdfrc(5) man page. -Upgrading from Xpdf 2.xx ------------------------- +Upgrading from Xpdf 3.02 (and earlier) +-------------------------------------- -WARNING: Xpdf 3.00 switched to a new PDF rasterizer, which no longer -uses X fonts. You'll need a set of Base-14 fonts -- the URW fonts -distributed with ghostscript can be used for this. Xpdf will search -for the URW fonts, but if you have them installed in a non-standard -directory, you'll need to set up an xpdfrc config file to point to -them. For full details, please see the xpdfrc(5) man page. +The font configuration system has been changed. Previous versions +used mostly separate commands to configure fonts for display and for +PostScript output. As of 3.03, configuration options that make sense +for both display and PS output have been unified. + +The following xpdfrc commands have been removed: +* displayFontT1, displayFontTT: replaced with fontFile +* displayNamedCIDFontT1, displayNamedCIDFontTT: replaced with fontFile +* displayCIDFontT1, displayCIDFontTT: replaced with fontFileCC +* psFont: replaced with psResidentFont +* psNamedFont16: replaced with psResidentFont16 +* psFont16: replaced with psResidentFontCC + +See the xpdfrc(5) man page for more information on the new commands. + +Pdftops will now embed external 16-bit fonts (configured with the +fontFileCC command) when the PDF file refers to a non-embedded font. +It does not do any subsetting (yet), so the resulting PS files will be +large. Compiling Xpdf @@ -184,7 +202,8 @@ xpdf. * Pine Tree Systems A/S for funding the OPI and EPS support in pdftops. -* Easy Software Products for funding the "sh" operator support. +* Easy Software Products for funding several improvements to the + PostScript output code. * Tom Kacvinsky for help with FreeType and for being my interface to the FreeType team. * Theppitak Karoonboonyanan for help with Thai support. @@ -203,10 +222,15 @@ References ---------- -Adobe Systems Inc., _PDF Reference: Adobe Portable Document Format -Version 1.5_. -http://partners.adobe.com/asn/tech/pdf/specifications.jsp -[The manual for PDF version 1.5.] +Adobe Systems Inc., _PDF Reference, sixth edition: Adobe Portable +Document Format version 1.7_. +http://www.adobe.com/devnet/pdf/pdf_reference.html +[The manual for PDF version 1.7.] + +Adobe Systems Inc., "Errata for the PDF Reference, sixth edition, +version 1.7", October 16, 2006. +http://www.adobe.com/devnet/pdf/pdf_reference.html +[The errata for the PDF 1.7 spec.] Adobe Systems Inc., _PostScript Language Reference_, 3rd ed. Addison-Wesley, 1999, ISBN 0-201-37922-8. @@ -261,6 +285,10 @@ http://partners.adobe.com/asn/developer/type/zapfdingbats.txt [Mappings between character names to Unicode.] +Adobe Systems Inc., OpenType Specification v. 1.4. +http://partners.adobe.com/public/developer/opentype/index_spec.html +[The OpenType font format spec.] + Aldus Corp., _OPI: Open Prepress Interface Specification 1.3_. 1993. http://partners.adobe.com/asn/developer/PDFS/TN/OPI_13.pdf @@ -270,7 +298,7 @@ [This is the algorithm used to encrypt PDF files.] T. Boutell, et al., "PNG (Portable Network Graphics) Specification, -Version 1.0. RFC 2083. +Version 1.0". RFC 2083. [PDF uses the PNG filter algorithms.] CCITT, "Information Technology - Digital Compression and Coding of @@ -295,6 +323,15 @@ [The definition of the compression algorithm used in FlateDecode streams.] +Morris Dworkin, "Recommendation for Block Cipher Modes of Operation", +National Institute of Standards, NIST Special Publication 800-38A, +2001. +[The cipher block chaining (CBC) mode used with AES in PDF files.] + +Federal Information Processing Standards Publication 197 (FIPS PUBS +197), "Advanced Encryption Standard (AES)", November 26, 2001. +[AES encryption, used in PDF 1.6.] + Jim Flowers, "X Logical Font Description Conventions", Version 1.5, X Consortium Standard, X Version 11, Release 6.1. ftp://ftp.x.org/pub/R6.1/xc/doc/hardcopy/XLFD/xlfd.PS.Z @@ -332,6 +369,10 @@ [The official Group 3 and 4 fax standards - used by the CCITTFaxDecode stream, as well as the JBIG2Decode stream.] +B. Kaliski, "PKCS #5: Password-Based Cryptography Specification, +Version 2.0". RFC 2898. +[Defines the padding scheme used with AES encryption in PDF files.] + Christoph Loeffler, Adriaan Ligtenberg, George S. Moschytz, "Practical Fast 1-D DCT Algorithms with 11 Multiplications". IEEE Intl. Conf. on Acoustics, Speech & Signal Processing, 1989, 988-991. @@ -341,10 +382,11 @@ http://www.microsoft.com/typography/tt/tt.htm [The TrueType font spec (in MS Word format, naturally).] -Thai Industrial Standard, "Standard for Thai Character Codes for -Computers", TIS-620-2533 (1990). -http://www.nectec.or.th/it-standards/std620/std620.htm -[The TIS-620 Thai encoding.] +V. Ostromoukhov, R.D. Hersch, "Stochastic Clustered-Dot Dithering", +Conf. Color Imaging: Device-Independent Color, Color Hardcopy, and +Graphic Arts IV, 1999, SPIE Vol. 3648, 496-505. +http://diwww.epfl.ch/w3lsp/publications/colour/scd.html +[The stochastic dithering algorithm used in Xpdf.] P. Peterlin, "ISO 8859-2 (Latin 2) Resources". http://sizif.mf.uni-lj.si/linux/cee/iso8859-2.html @@ -358,6 +400,11 @@ R. Rivest, "The MD5 Message-Digest Algorithm". RFC 1321. [MD5 is used in PDF document encryption.] +Thai Industrial Standard, "Standard for Thai Character Codes for +Computers", TIS-620-2533 (1990). +http://www.nectec.or.th/it-standards/std620/std620.htm +[The TIS-620 Thai encoding.] + Unicode Consortium, "Unicode Home Page". http://www.unicode.org/ [Online copy of the Unicode spec.] diff -Nru poppler-0.18.4/aclocal.m4 poppler-0.20.5/aclocal.m4 --- poppler-0.18.4/aclocal.m4 2012-02-15 17:22:43.000000000 +0000 +++ poppler-0.20.5/aclocal.m4 2012-10-10 17:34:53.000000000 +0000 @@ -1,7 +1,8 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. +# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, +# Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -13,8 +14,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, -[m4_warning([this file was generated for autoconf 2.68. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, +[m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -1179,12 +1180,15 @@ fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been @@ -1194,7 +1198,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11.1], [], +m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -1210,19 +1214,21 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11.1])dnl +[AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. @@ -1304,14 +1310,14 @@ Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 -# Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, +# 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 10 +# serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, @@ -1351,6 +1357,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -1415,7 +1422,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -1480,10 +1487,13 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl +AC_SUBST([am__nodep])dnl +_AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- @@ -1717,12 +1727,15 @@ done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -1854,12 +1867,15 @@ fi ]) -# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. +# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, +# Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. @@ -1882,13 +1898,14 @@ # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software +# Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 4 +# serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- @@ -1896,13 +1913,13 @@ [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) -# ------------------------------ +# -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) -# ---------------------------------- +# ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) @@ -1978,13 +1995,13 @@ fi AC_MSG_RESULT(yes)]) -# Copyright (C) 2009 Free Software Foundation, Inc. +# Copyright (C) 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 1 +# serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- @@ -1999,18 +2016,50 @@ no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac +dnl +dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl do not support nested variable expansions. +dnl See automake bug#9928 and bug#10237. +am_make=${MAKE-make} +AC_CACHE_CHECK([whether $am_make supports nested variables], + [am_cv_make_support_nested_variables], + [if AS_ECHO([['TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi]) +if test $am_cv_make_support_nested_variables = yes; then + dnl Using `$V' instead of `$(V)' breaks IRIX make. + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AC_SUBST([AM_V])dnl +AM_SUBST_NOTMAKE([AM_V])dnl +AC_SUBST([AM_DEFAULT_V])dnl +AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. +# serial 1 + # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't @@ -2033,13 +2082,13 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. -# serial 2 +# serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- @@ -2048,13 +2097,13 @@ AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- +# -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -2076,10 +2125,11 @@ # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) +[# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) diff -Nru poppler-0.18.4/cmake/modules/FindLCMS2.cmake poppler-0.20.5/cmake/modules/FindLCMS2.cmake --- poppler-0.18.4/cmake/modules/FindLCMS2.cmake 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/cmake/modules/FindLCMS2.cmake 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,73 @@ +# - Find LCMS2 +# Find the LCMS2 includes and library +# This module defines +# LCMS2_INCLUDE_DIR, where to find lcms.h +# LCMS2_LIBRARIES, the libraries needed to use LCMS2. +# LCMS2_VERSION, The value of LCMS_VERSION defined in lcms.h +# LCMS2_FOUND, If false, do not try to use LCMS2. + + +# Copyright (c) 2008, Adrian Page, +# Copyright (c) 2009, Cyrille Berger, +# +# Redistribution and use is allowed according to the terms of the BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. + + +# use pkg-config to get the directories and then use these values +# in the FIND_PATH() and FIND_LIBRARY() calls +if(NOT WIN32) + find_package(PkgConfig) + pkg_check_modules(PC_LCMS2 lcms2) + set(LCMS2_DEFINITIONS ${PC_LCMS2_CFLAGS_OTHER}) +endif(NOT WIN32) + +find_path(LCMS2_INCLUDE_DIR lcms2.h + PATHS + ${PC_LCMS2_INCLUDEDIR} + ${PC_LCMS2_INCLUDE_DIRS} + PATH_SUFFIXES lcms2 liblcms2 +) + +find_library(LCMS2_LIBRARIES NAMES lcms2 liblcms2 lcms-2 liblcms-2 + PATHS + ${PC_LCMS2_LIBDIR} + ${PC_LCMS2_LIBRARY_DIRS} + PATH_SUFFIXES lcms2 +) + +if(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) + set(LCMS2_FOUND TRUE) +else(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) + set(LCMS2_FOUND FALSE) +endif(LCMS2_INCLUDE_DIR AND LCMS2_LIBRARIES) + +if(LCMS2_FOUND) + file(READ ${LCMS2_INCLUDE_DIR}/lcms2.h LCMS2_VERSION_CONTENT) + string(REGEX MATCH "#define LCMS_VERSION[ ]*[0-9]*\n" LCMS2_VERSION_MATCH ${LCMS2_VERSION_CONTENT}) + if(LCMS2_VERSION_MATCH) + string(REGEX REPLACE "#define LCMS_VERSION[ ]*([0-9]*)\n" "\\1" LCMS2_VERSION ${LCMS2_VERSION_MATCH}) + if(NOT LCMS2_FIND_QUIETLY) + string(SUBSTRING ${LCMS2_VERSION} 0 1 LCMS2_MAJOR_VERSION) + string(SUBSTRING ${LCMS2_VERSION} 1 2 LCMS2_MINOR_VERSION) + message(STATUS "Found lcms version ${LCMS2_MAJOR_VERSION}.${LCMS2_MINOR_VERSION}, ${LCMS2_LIBRARIES}") + endif(NOT LCMS2_FIND_QUIETLY) + else(LCMS2_VERSION_MATCH) + if(NOT LCMS2_FIND_QUIETLY) + message(STATUS "Found lcms2 but failed to find version ${LCMS2_LIBRARIES}") + endif(NOT LCMS2_FIND_QUIETLY) + set(LCMS2_VERSION NOTFOUND) + endif(LCMS2_VERSION_MATCH) +else(LCMS2_FOUND) + if(NOT LCMS2_FIND_QUIETLY) + if(LCMS2_FIND_REQUIRED) + message(FATAL_ERROR "Required package lcms2 NOT found") + else(LCMS2_FIND_REQUIRED) + message(STATUS "lcms2 NOT found") + endif(LCMS2_FIND_REQUIRED) + endif(NOT LCMS2_FIND_QUIETLY) +endif(LCMS2_FOUND) + +mark_as_advanced(LCMS2_INCLUDE_DIR LCMS2_LIBRARIES LCMS2_VERSION) + + diff -Nru poppler-0.18.4/cmake/modules/FindLIBOPENJPEG.cmake poppler-0.20.5/cmake/modules/FindLIBOPENJPEG.cmake --- poppler-0.18.4/cmake/modules/FindLIBOPENJPEG.cmake 2012-01-26 23:38:42.000000000 +0000 +++ poppler-0.20.5/cmake/modules/FindLIBOPENJPEG.cmake 2012-05-10 20:05:44.000000000 +0000 @@ -39,6 +39,9 @@ } " WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG) + set(CMAKE_REQUIRED_INCLUDES) + set(CMAKE_REQUIRED_LIBRARIES) + set(LIBOPENJPEG_FOUND TRUE) endif(LIBOPENJPEG_INCLUDE_DIR AND LIBOPENJPEG_LIBRARIES) diff -Nru poppler-0.18.4/cmake/modules/PopplerMacros.cmake poppler-0.20.5/cmake/modules/PopplerMacros.cmake --- poppler-0.18.4/cmake/modules/PopplerMacros.cmake 2011-11-22 21:32:58.000000000 +0000 +++ poppler-0.20.5/cmake/modules/PopplerMacros.cmake 2012-05-10 20:05:44.000000000 +0000 @@ -101,7 +101,7 @@ if(CMAKE_COMPILER_IS_GNUCXX) # set the default compile warnings set(DEFAULT_COMPILE_WARNINGS_NO) - set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wno-write-strings -Wcast-align -fno-exceptions -fno-check-new -fno-common") + set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common") set(CMAKE_CXX_FLAGS "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") diff -Nru poppler-0.18.4/config.guess poppler-0.20.5/config.guess --- poppler-0.18.4/config.guess 2011-12-04 14:45:38.000000000 +0000 +++ poppler-0.20.5/config.guess 2012-06-10 18:43:14.000000000 +0000 @@ -2,9 +2,9 @@ # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-05-11' +timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -17,9 +17,7 @@ # General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -57,8 +55,8 @@ Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -145,7 +143,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward @@ -792,13 +790,12 @@ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + UNAME_PROCESSOR=`/usr/bin/uname -p` + case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -807,6 +804,9 @@ *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; + i*:MSYS*:*) + echo ${UNAME_MACHINE}-pc-msys + exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 @@ -861,6 +861,13 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + aarch64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + aarch64_be:Linux:*:*) + UNAME_MACHINE=aarch64_be + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; @@ -895,13 +902,16 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo cris-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit ;; + hexagon:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -943,7 +953,7 @@ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo or32-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu @@ -978,13 +988,13 @@ echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-tilera-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -1315,6 +1325,9 @@ i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; + x86_64:VMkernel:*:*) + echo ${UNAME_MACHINE}-unknown-esx + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 diff -Nru poppler-0.18.4/config.h.cmake poppler-0.20.5/config.h.cmake --- poppler-0.18.4/config.h.cmake 2012-01-26 23:38:42.000000000 +0000 +++ poppler-0.20.5/config.h.cmake 2012-09-08 16:07:00.000000000 +0000 @@ -180,6 +180,9 @@ /* Use single precision arithmetic in the Splash backend */ #cmakedefine USE_FLOAT 1 +/* Defines if use lcms1 */ +#cmakedefine USE_LCMS1 1 + /* Version number of package */ #define VERSION "${POPPLER_VERSION}" diff -Nru poppler-0.18.4/config.h.in poppler-0.20.5/config.h.in --- poppler-0.18.4/config.h.in 2012-02-15 17:22:56.000000000 +0000 +++ poppler-0.20.5/config.h.in 2012-10-10 17:35:05.000000000 +0000 @@ -61,9 +61,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H -/* Define to 1 if you have the `openjpeg' library (-lopenjpeg). */ -#undef HAVE_LIBOPENJPEG - /* Define to 1 if you have the `tiff' library (-ltiff). */ #undef HAVE_LIBTIFF @@ -175,6 +172,9 @@ /* Support for curl based doc builder is compiled in. */ #undef POPPLER_HAS_CURL_SUPPORT +/* Defines the poppler version */ +#undef POPPLER_VERSION + /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE @@ -194,6 +194,9 @@ /* Use single precision arithmetic in the Splash backend */ #undef USE_FLOAT +/* Defines if use lcms1 */ +#undef USE_LCMS1 + /* Version number of package */ #undef VERSION @@ -231,6 +234,11 @@ #endif +/* Enable large inode numbers on Mac OS X 10.5. */ +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif + /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS diff -Nru poppler-0.18.4/config.sub poppler-0.20.5/config.sub --- poppler-0.18.4/config.sub 2011-12-04 14:45:39.000000000 +0000 +++ poppler-0.20.5/config.sub 2012-09-10 17:29:18.000000000 +0000 @@ -2,9 +2,9 @@ # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011 Free Software Foundation, Inc. +# 2011, 2012 Free Software Foundation, Inc. -timestamp='2011-03-23' +timestamp='2012-04-18' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -21,9 +21,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. +# along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -76,8 +74,8 @@ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free -Software Foundation, Inc. +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 +Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,6 +130,10 @@ os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; + android-linux) + os=-linux-android + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown + ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] @@ -223,6 +225,12 @@ -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; + -lynx*178) + os=-lynxos178 + ;; + -lynx*5) + os=-lynxos5 + ;; -lynx*) os=-lynxos ;; @@ -247,17 +255,22 @@ # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ + | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ + | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ + | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ @@ -291,7 +304,7 @@ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ - | rx \ + | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ @@ -300,7 +313,7 @@ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ - | v850 | v850e \ + | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) @@ -315,8 +328,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | picochip) - # Motorola 68HC11/12. + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -329,7 +341,10 @@ strongarm | thumb | xscale) basic_machine=arm-unknown ;; - + xgate) + basic_machine=$basic_machine-unknown + os=-none + ;; xscaleeb) basic_machine=armeb-unknown ;; @@ -352,11 +367,13 @@ # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ + | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ + | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ @@ -365,8 +382,10 @@ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ @@ -400,7 +419,7 @@ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* | rx-* \ + | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ @@ -408,10 +427,11 @@ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tile-* | tilegx-* \ + | tile*-* \ | tron-* \ | ubicom32-* \ - | v850-* | v850e-* | vax-* \ + | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ + | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ @@ -711,7 +731,6 @@ i370-ibm* | ibm*) basic_machine=i370-ibm ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 @@ -808,10 +827,18 @@ ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; + msys) + basic_machine=i386-pc + os=-msys + ;; mvs) basic_machine=i370-ibm os=-mvs ;; + nacl) + basic_machine=le32-unknown + os=-nacl + ;; ncr3000) basic_machine=i486-ncr os=-sysv4 @@ -1120,13 +1147,8 @@ basic_machine=t90-cray os=-unicos ;; - # This must be matched before tile*. - tilegx*) - basic_machine=tilegx-unknown - os=-linux-gnu - ;; tile*) - basic_machine=tile-unknown + basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) @@ -1336,7 +1358,7 @@ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ @@ -1521,6 +1543,9 @@ c4x-* | tic4x-*) os=-coff ;; + hexagon-*) + os=-elf + ;; tic54x-*) os=-coff ;; @@ -1548,9 +1573,6 @@ ;; m68000-sun) os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 ;; m68*-cisco) os=-aout diff -Nru poppler-0.18.4/configure poppler-0.20.5/configure --- poppler-0.18.4/configure 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/configure 2012-10-10 17:34:54.000000000 +0000 @@ -1,13 +1,11 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for poppler 0.18.4. +# Generated by GNU Autoconf 2.69 for poppler 0.20.5. # # Report bugs to . # # -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -136,6 +134,31 @@ # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +as_fn_exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh @@ -169,7 +192,8 @@ else exitcode=1; echo positional parameters were not saved. fi -test x\$exitcode = x0 || exit 1" +test x\$exitcode = x0 || exit 1 +test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && @@ -222,21 +246,25 @@ if test "x$CONFIG_SHELL" != x; then : - # We cannot yet assume a decent shell, so we have to provide a - # neutralization value for shells without unset; and this also - # works around shells that cannot unset nonexistent variables. - # Preserve -v and -x to the replacement shell. - BASH_ENV=/dev/null - ENV=/dev/null - (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV - export CONFIG_SHELL - case $- in # (((( - *v*x* | *x*v* ) as_opts=-vx ;; - *v* ) as_opts=-v ;; - *x* ) as_opts=-x ;; - * ) as_opts= ;; - esac - exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 fi if test x$as_have_required = xno; then : @@ -340,6 +368,14 @@ } # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take @@ -461,6 +497,10 @@ chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). @@ -495,16 +535,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -516,28 +556,8 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -571,8 +591,8 @@ # Identity of this package. PACKAGE_NAME='poppler' PACKAGE_TARNAME='poppler' -PACKAGE_VERSION='0.18.4' -PACKAGE_STRING='poppler 0.18.4' +PACKAGE_VERSION='0.20.5' +PACKAGE_STRING='poppler 0.20.5' PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=poppler' PACKAGE_URL='' @@ -622,6 +642,9 @@ POPPLER_MAJOR_VERSION PC_REQUIRES_PRIVATE PC_REQUIRES +TESTDATADIR +USE_LCMS1_FALSE +USE_LCMS1_TRUE USE_CMS_FALSE USE_CMS_TRUE LCMS_LIBS @@ -704,6 +727,7 @@ BUILD_LIBJPEG_FALSE BUILD_LIBJPEG_TRUE LIBJPEG_LIBS +LIBJPEG_CFLAGS BUILD_LIBCURL_FALSE BUILD_LIBCURL_TRUE LIBCURL_LIBS @@ -713,10 +737,13 @@ ZLIB_LIBS BUILD_LIBTIFF_FALSE BUILD_LIBTIFF_TRUE +LIBTIFF_CFLAGSS LIBTIFF_LIBS +LIBTIFF_CFLAGS BUILD_LIBOPENJPEG_FALSE BUILD_LIBOPENJPEG_TRUE LIBOPENJPEG_LIBS +LIBOPENJPEG_CFLAGS X_EXTRA_LIBS X_LIBS X_PRE_LIBS @@ -776,6 +803,7 @@ am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE @@ -791,6 +819,8 @@ CC AM_BACKSLASH AM_DEFAULT_VERBOSITY +AM_DEFAULT_V +AM_V am__untar am__tar AMTAR @@ -892,6 +922,7 @@ enable_utils enable_compile_warnings enable_cms +with_testdatadir ' ac_precious_vars='build_alias host_alias @@ -910,8 +941,13 @@ PKG_CONFIG_PATH PKG_CONFIG_LIBDIR XMKMF +LIBOPENJPEG_CFLAGS +LIBOPENJPEG_LIBS +LIBTIFF_CFLAGS +LIBTIFF_LIBS LIBCURL_CFLAGS LIBCURL_LIBS +LIBJPEG_CFLAGS LIBPNG_CFLAGS LIBPNG_LIBS FREETYPE_CFLAGS @@ -1389,8 +1425,6 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1476,7 +1510,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures poppler 0.18.4 to adapt to many kinds of systems. +\`configure' configures poppler 0.20.5 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1550,7 +1584,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of poppler 0.18.4:";; + short | recursive ) echo "Configuration of poppler 0.20.5:";; esac cat <<\_ACEOF @@ -1609,6 +1643,8 @@ --with-html-dir=PATH path to installed docs --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir + --with-testdatadir=/path/to/testdatadir + Specify test data dir Some influential environment variables: CC C compiler command @@ -1628,10 +1664,20 @@ PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path XMKMF Path to xmkmf, Makefile generator for X Window System + LIBOPENJPEG_CFLAGS + C compiler flags for LIBOPENJPEG, overriding pkg-config + LIBOPENJPEG_LIBS + linker flags for LIBOPENJPEG, overriding pkg-config + LIBTIFF_CFLAGS + C compiler flags for LIBTIFF + LIBTIFF_LIBS + linker flags to link LIBTIFF (default is -ltiff) LIBCURL_CFLAGS C compiler flags for LIBCURL, overriding pkg-config LIBCURL_LIBS linker flags for LIBCURL, overriding pkg-config + LIBJPEG_CFLAGS + C compiler flags for LIBJPEG LIBPNG_CFLAGS C compiler flags for LIBPNG, overriding pkg-config LIBPNG_LIBS linker flags for LIBPNG, overriding pkg-config @@ -1739,10 +1785,10 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -poppler configure 0.18.4 -generated by GNU Autoconf 2.68 +poppler configure 0.20.5 +generated by GNU Autoconf 2.69 -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF @@ -1928,7 +1974,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2116,7 +2162,7 @@ test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || - $as_test_x conftest$ac_exeext + test -x conftest$ac_exeext }; then : ac_retval=0 else @@ -2433,8 +2479,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by poppler $as_me 0.18.4, which was -generated by GNU Autoconf 2.68. Invocation command line was +It was created by poppler $as_me 0.20.5, which was +generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2850,7 +2896,7 @@ # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. @@ -3019,7 +3065,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3059,7 +3105,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3110,7 +3156,7 @@ test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue + as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ @@ -3163,7 +3209,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3249,7 +3295,7 @@ # Define the identity of the package. PACKAGE='poppler' - VERSION='0.18.4' + VERSION='0.20.5' cat >>confdefs.h <<_ACEOF @@ -3279,11 +3325,11 @@ # We need awk for the "check" target. The system "awk" is bad on # some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} +# Always define AMTAR for backward compatibility. Yes, it's still used +# in the wild :-( We should find a proper way to deprecate it ... +AMTAR='$${TAR-tar}' -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' +am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' @@ -3299,6 +3345,33 @@ no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi AM_BACKSLASH='\' ac_config_headers="$ac_config_headers config.h" @@ -3357,6 +3430,7 @@ if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' + am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= @@ -3389,7 +3463,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3429,7 +3503,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3482,7 +3556,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3523,7 +3597,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -3581,7 +3655,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -3625,7 +3699,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -4071,8 +4145,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -4170,6 +4243,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -4229,7 +4303,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -4439,7 +4513,7 @@ for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue + as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in @@ -4505,7 +4579,7 @@ for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue + as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in @@ -4999,7 +5073,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5039,7 +5113,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5091,7 +5165,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5131,7 +5205,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5183,7 +5257,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5223,7 +5297,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5398,7 +5472,7 @@ for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue + as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in @@ -5477,7 +5551,7 @@ for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue + as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in @@ -5733,7 +5807,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -5777,7 +5851,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6201,7 +6275,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6241,7 +6315,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6410,7 +6484,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else @@ -6544,7 +6618,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6584,7 +6658,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6684,7 +6758,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6728,7 +6802,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6853,7 +6927,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6893,7 +6967,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6952,7 +7026,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -6992,7 +7066,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7641,7 +7715,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7681,7 +7755,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7761,7 +7835,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7801,7 +7875,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7853,7 +7927,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7893,7 +7967,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7945,7 +8019,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -7985,7 +8059,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8037,7 +8111,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8077,7 +8151,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8129,7 +8203,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -8169,7 +8243,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -9538,6 +9612,9 @@ openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs=no + ;; esac ld_shlibs=yes @@ -9759,7 +9836,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -9936,6 +10013,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then @@ -10389,7 +10467,7 @@ link_all_deplibs=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else @@ -11417,6 +11495,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -12410,7 +12500,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12450,7 +12540,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12503,7 +12593,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12544,7 +12634,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue @@ -12602,7 +12692,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12646,7 +12736,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -12842,8 +12932,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -12941,6 +13030,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -13000,7 +13090,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -13083,7 +13173,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13127,7 +13217,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -13325,6 +13415,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -13384,7 +13475,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -15336,7 +15427,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -15707,6 +15798,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + link_all_deplibs_CXX=no + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -16332,6 +16426,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -16844,7 +16950,7 @@ return 0; } _ACEOF -for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99 +for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : @@ -16884,8 +16990,7 @@ /* end confdefs.h. */ #include #include -#include -#include +struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); @@ -17018,7 +17123,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17062,7 +17167,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17260,6 +17365,7 @@ # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. + rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. @@ -17319,7 +17425,7 @@ break fi ;; - msvisualcpp | msvcmsys) + msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. @@ -17379,7 +17485,13 @@ cygwin* | mingw*) ;; *) - CXXFLAGS="$CXXFLAGS -ansi" + case "${CXXFLAGS}" in + *-std=*) + ;; + *) + CXXFLAGS="$CXXFLAGS -ansi" + ;; + esac ;; esac fi @@ -17412,7 +17524,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17455,7 +17567,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17507,6 +17619,12 @@ fi +cat >>confdefs.h <<_ACEOF +#define POPPLER_VERSION "0.20.5" +_ACEOF + + + $as_echo "#define OPI_SUPPORT 1" >>confdefs.h @@ -17672,7 +17790,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_acx_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -17828,7 +17946,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -18997,7 +19115,67 @@ fi if test x$enable_libopenjpeg = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5 + + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBOPENJPEG" >&5 +$as_echo_n "checking for LIBOPENJPEG... " >&6; } + +if test -n "$LIBOPENJPEG_CFLAGS"; then + pkg_cv_LIBOPENJPEG_CFLAGS="$LIBOPENJPEG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjpeg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libopenjpeg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBOPENJPEG_CFLAGS=`$PKG_CONFIG --cflags "libopenjpeg" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LIBOPENJPEG_LIBS"; then + pkg_cv_LIBOPENJPEG_LIBS="$LIBOPENJPEG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjpeg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libopenjpeg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBOPENJPEG_LIBS=`$PKG_CONFIG --libs "libopenjpeg" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LIBOPENJPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenjpeg" 2>&1` + else + LIBOPENJPEG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenjpeg" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBOPENJPEG_PKG_ERRORS" >&5 + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5 $as_echo_n "checking for opj_cio_open in -lopenjpeg... " >&6; } if ${ac_cv_lib_openjpeg_opj_cio_open+:} false; then : $as_echo_n "(cached) " >&6 @@ -19034,18 +19212,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_cio_open" >&5 $as_echo "$ac_cv_lib_openjpeg_opj_cio_open" >&6; } if test "x$ac_cv_lib_openjpeg_opj_cio_open" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBOPENJPEG 1 -_ACEOF - - LIBS="-lopenjpeg $LIBS" - + LIBOPENJPEG_LIBS="-lopenjpeg" else as_fn_error $? "\"*** libopenjpeg library not found ***\"" "$LINENO" 5 fi - -for ac_header in openjpeg.h + for ac_header in openjpeg.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "openjpeg.h" "ac_cv_header_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_h" = xyes; then : @@ -19059,8 +19231,10 @@ done -elif test x$enable_libopenjpeg = xtry; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5 +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5 $as_echo_n "checking for opj_cio_open in -lopenjpeg... " >&6; } if ${ac_cv_lib_openjpeg_opj_cio_open+:} false; then : $as_echo_n "(cached) " >&6 @@ -19097,12 +19271,12 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_cio_open" >&5 $as_echo "$ac_cv_lib_openjpeg_opj_cio_open" >&6; } if test "x$ac_cv_lib_openjpeg_opj_cio_open" = xyes; then : - enable_libopenjpeg="yes" + LIBOPENJPEG_LIBS="-lopenjpeg" else - enable_libopenjpeg="no" + as_fn_error $? "\"*** libopenjpeg library not found ***\"" "$LINENO" 5 fi - for ac_header in openjpeg.h + for ac_header in openjpeg.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "openjpeg.h" "ac_cv_header_openjpeg_h" "$ac_includes_default" if test "x$ac_cv_header_openjpeg_h" = xyes; then : @@ -19111,72 +19285,85 @@ _ACEOF else - enable_libopenjpeg="no" + as_fn_error $? "\"*** libopenjpeg headers not found ***\"" "$LINENO" 5 fi done -fi - -if test x$enable_libopenjpeg = xyes; then - LIBOPENJPEG_LIBS="-lopenjpeg" - - $as_echo "#define ENABLE_LIBOPENJPEG 1" >>confdefs.h - - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -#include +else + LIBOPENJPEG_CFLAGS=$pkg_cv_LIBOPENJPEG_CFLAGS + LIBOPENJPEG_LIBS=$pkg_cv_LIBOPENJPEG_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } -int -main () -{ +fi +elif test x$enable_libopenjpeg = xtry; then - int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBOPENJPEG" >&5 +$as_echo_n "checking for LIBOPENJPEG... " >&6; } - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - have_openjpeg_flag="yes" +if test -n "$LIBOPENJPEG_CFLAGS"; then + pkg_cv_LIBOPENJPEG_CFLAGS="$LIBOPENJPEG_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjpeg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libopenjpeg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBOPENJPEG_CFLAGS=`$PKG_CONFIG --cflags "libopenjpeg" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - am_cv_proto_iconv_arg1="no" + pkg_failed=yes fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - if test x$have_openjpeg_flag = xyes; then - -$as_echo "#define WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG 1" >>confdefs.h - - fi + else + pkg_failed=untried fi - - if test x$enable_libopenjpeg = xyes; then - BUILD_LIBOPENJPEG_TRUE= - BUILD_LIBOPENJPEG_FALSE='#' +if test -n "$LIBOPENJPEG_LIBS"; then + pkg_cv_LIBOPENJPEG_LIBS="$LIBOPENJPEG_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjpeg\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libopenjpeg") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LIBOPENJPEG_LIBS=`$PKG_CONFIG --libs "libopenjpeg" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes else - BUILD_LIBOPENJPEG_TRUE='#' - BUILD_LIBOPENJPEG_FALSE= + pkg_failed=yes +fi + else + pkg_failed=untried fi -# Check whether --enable-libtiff was given. -if test "${enable_libtiff+set}" = set; then : - enableval=$enable_libtiff; enable_libtiff=$enableval +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes else - enable_libtiff="try" + _pkg_short_errors_supported=no fi + if test $_pkg_short_errors_supported = yes; then + LIBOPENJPEG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libopenjpeg" 2>&1` + else + LIBOPENJPEG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libopenjpeg" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LIBOPENJPEG_PKG_ERRORS" >&5 - -if test x$enable_libtiff = xyes; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5 -$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; } -if ${ac_cv_lib_tiff_TIFFOpen+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5 +$as_echo_n "checking for opj_cio_open in -lopenjpeg... " >&6; } +if ${ac_cv_lib_openjpeg_opj_cio_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltiff $LIBS" +LIBS="-lopenjpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19186,59 +19373,57 @@ #ifdef __cplusplus extern "C" #endif -char TIFFOpen (); +char opj_cio_open (); int main () { -return TIFFOpen (); +return opj_cio_open (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_tiff_TIFFOpen=yes + ac_cv_lib_openjpeg_opj_cio_open=yes else - ac_cv_lib_tiff_TIFFOpen=no + ac_cv_lib_openjpeg_opj_cio_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5 -$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; } -if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_LIBTIFF 1 -_ACEOF - - LIBS="-ltiff $LIBS" - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_cio_open" >&5 +$as_echo "$ac_cv_lib_openjpeg_opj_cio_open" >&6; } +if test "x$ac_cv_lib_openjpeg_opj_cio_open" = xyes; then : + enable_libopenjpeg="yes" + LIBOPENJPEG_LIBS="-lopenjpeg" else - as_fn_error $? "\"*** libtiff library not found ***\"" "$LINENO" 5 + enable_libopenjpeg="no" fi - for ac_header in tiffio.h + for ac_header in openjpeg.h do : - ac_fn_cxx_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" -if test "x$ac_cv_header_tiffio_h" = xyes; then : + ac_fn_cxx_check_header_mongrel "$LINENO" "openjpeg.h" "ac_cv_header_openjpeg_h" "$ac_includes_default" +if test "x$ac_cv_header_openjpeg_h" = xyes; then : cat >>confdefs.h <<_ACEOF -#define HAVE_TIFFIO_H 1 +#define HAVE_OPENJPEG_H 1 _ACEOF else - as_fn_error $? "\"*** libtiff headers not found ***\"" "$LINENO" 5 + enable_libopenjpeg="no" fi done -elif test x$enable_libtiff = xtry; then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5 -$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; } -if ${ac_cv_lib_tiff_TIFFOpen+:} false; then : +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for opj_cio_open in -lopenjpeg" >&5 +$as_echo_n "checking for opj_cio_open in -lopenjpeg... " >&6; } +if ${ac_cv_lib_openjpeg_opj_cio_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS -LIBS="-ltiff $LIBS" +LIBS="-lopenjpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -19248,32 +19433,224 @@ #ifdef __cplusplus extern "C" #endif -char TIFFOpen (); +char opj_cio_open (); int main () { -return TIFFOpen (); +return opj_cio_open (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : - ac_cv_lib_tiff_TIFFOpen=yes + ac_cv_lib_openjpeg_opj_cio_open=yes else - ac_cv_lib_tiff_TIFFOpen=no + ac_cv_lib_openjpeg_opj_cio_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5 -$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; } -if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then : - enable_libtiff="yes" -else - enable_libtiff="no" -fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_openjpeg_opj_cio_open" >&5 +$as_echo "$ac_cv_lib_openjpeg_opj_cio_open" >&6; } +if test "x$ac_cv_lib_openjpeg_opj_cio_open" = xyes; then : + enable_libopenjpeg="yes" + LIBOPENJPEG_LIBS="-lopenjpeg" +else + enable_libopenjpeg="no" +fi + + for ac_header in openjpeg.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "openjpeg.h" "ac_cv_header_openjpeg_h" "$ac_includes_default" +if test "x$ac_cv_header_openjpeg_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_OPENJPEG_H 1 +_ACEOF + +else + enable_libopenjpeg="no" +fi + +done + +else + LIBOPENJPEG_CFLAGS=$pkg_cv_LIBOPENJPEG_CFLAGS + LIBOPENJPEG_LIBS=$pkg_cv_LIBOPENJPEG_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + enable_libopenjpeg="yes" +fi +fi + +if test x$enable_libopenjpeg = xyes; then + + + $as_echo "#define ENABLE_LIBOPENJPEG 1" >>confdefs.h + + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libopenjpeg >= 1.5\""; } >&5 + ($PKG_CONFIG --exists --print-errors "libopenjpeg >= 1.5") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + +$as_echo "#define WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG 1" >>confdefs.h + +fi +fi + + if test x$enable_libopenjpeg = xyes; then + BUILD_LIBOPENJPEG_TRUE= + BUILD_LIBOPENJPEG_FALSE='#' +else + BUILD_LIBOPENJPEG_TRUE='#' + BUILD_LIBOPENJPEG_FALSE= +fi + + +# Check whether --enable-libtiff was given. +if test "${enable_libtiff+set}" = set; then : + enableval=$enable_libtiff; enable_libtiff=$enableval +else + enable_libtiff="try" +fi + + + + +ac_save_CPPFLAGS="$CPPFLAGS" +ac_save_CXXFLAGS="$CXXFLAGS" +ac_save_LIBS="$LDFLAGS" +CPPFLAGS="$CPPFLAGS $LIBTIFF_CFLAGS" +CXXFLAGS="$CXXFLAGS $LIBTIFF_CFLAGS" +LIBS="$LIBS $LIBTIFF_LIBS" +if test x$enable_libtiff = xyes; then + if test x"$LIBTIFF_LIBS" != ; then + ac_fn_cxx_check_func "$LINENO" "TIFFOpen" "ac_cv_func_TIFFOpen" +if test "x$ac_cv_func_TIFFOpen" = xyes; then : + +else + as_fn_error $? "\"*** libtiff library not found ***\"" "$LINENO" 5 +fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5 +$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; } +if ${ac_cv_lib_tiff_TIFFOpen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltiff $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char TIFFOpen (); +int +main () +{ +return TIFFOpen (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_lib_tiff_TIFFOpen=yes +else + ac_cv_lib_tiff_TIFFOpen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5 +$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; } +if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBTIFF 1 +_ACEOF + + LIBS="-ltiff $LIBS" + +else + as_fn_error $? "\"*** libtiff library not found ***\"" "$LINENO" 5 +fi + + fi + for ac_header in tiffio.h +do : + ac_fn_cxx_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" +if test "x$ac_cv_header_tiffio_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_TIFFIO_H 1 +_ACEOF + +else + as_fn_error $? "\"*** libtiff headers not found ***\"" "$LINENO" 5 +fi + +done + +elif test x$enable_libtiff = xtry; then + if test x"$LIBTIFF_LIBS" != x; then + ac_fn_cxx_check_func "$LINENO" "TIFFOpen" "ac_cv_func_TIFFOpen" +if test "x$ac_cv_func_TIFFOpen" = xyes; then : + enable_libtiff="yes" +else + enable_libtiff="no" +fi + + else + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5 +$as_echo_n "checking for TIFFOpen in -ltiff... " >&6; } +if ${ac_cv_lib_tiff_TIFFOpen+:} false; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ltiff $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +/* Override any GCC internal prototype to avoid an error. + Use char because int might match the return type of a GCC + builtin and then its argument prototype would still apply. */ +#ifdef __cplusplus +extern "C" +#endif +char TIFFOpen (); +int +main () +{ +return TIFFOpen (); + ; + return 0; +} +_ACEOF +if ac_fn_cxx_try_link "$LINENO"; then : + ac_cv_lib_tiff_TIFFOpen=yes +else + ac_cv_lib_tiff_TIFFOpen=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5 +$as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; } +if test "x$ac_cv_lib_tiff_TIFFOpen" = xyes; then : + enable_libtiff="yes" +else + enable_libtiff="no" +fi + + fi for ac_header in tiffio.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" @@ -19289,9 +19666,15 @@ done fi +CPPFLAGS="$ac_save_CPPFLAGS" +CXXFLAGS="$ac_save_CXXFLAGS" +LIBS="$ac_save_LIBS" if test x$enable_libtiff = xyes; then - LIBTIFF_LIBS="-ltiff" + if test x"$LIBTIFF_LIBS" = x; then + LIBTIFF_LIBS="-ltiff" + fi + $as_echo "#define ENABLE_LIBTIFF 1" >>confdefs.h @@ -19528,6 +19911,8 @@ esac rm -rf conftest* fi + + fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 @@ -19898,8 +20283,14 @@ enable_libjpeg="try" fi + if test x$enable_libjpeg != xno; then + ac_save_USER_INCLUDES="$USER_INCLUDES" + ac_save_USER_LDFLAGS="$USER_LDFLAGS" + USER_INCLUDES="$USER_INCLUDES $LIBJPEG_CFLAGS" + USER_LDFLAGS="$USER_LDFLAGS $LIBJPEG_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libjpeg6b" >&5 $as_echo_n "checking for libjpeg6b... " >&6; } @@ -20012,6 +20403,10 @@ fi +ac_save_CPPFLAGS="$CPPFLAGS" +ac_save_CFLAGS="$CFLAGS" +CPPFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" if test "x$ac_cv_header_jpeglib_h" = xyes; then : jpeg_incdir=yes @@ -20020,6 +20415,8 @@ fi +CPPFLAGS="$ac_save_CPPFLAGS" +CFLAGS="$ac_save_CFLAGS" test "x$jpeg_incdir" = xNO && jpeg_incdir= if test -n "$jpeg_incdir" && test -n "$LIBJPEG_LIBS" ; then @@ -20056,6 +20453,87 @@ + + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_CFLAGS="$CFLAGS" + CPPFLAGS="$CPPFLAGS $LIBJPEG_CFLAGS" + CFLAGS="$CFLAGS $LIBJPEG_CFLAGS" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking libjpeg.h works correctly" >&5 +$as_echo_n "checking libjpeg.h works correctly... " >&6; } + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef _WIN32 +#include +#endif +#include +#include +#include + +int +main () +{ +{return 0;} + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 +$as_echo "ok" >&6; } + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking libjpeg.h problem can be fixed by XMD_H macro" >&5 +$as_echo_n "checking libjpeg.h problem can be fixed by XMD_H macro... " >&6; } + CPPFLAGS="$CPPFLAGS -DXMD_H" + CFLAGS="$CFLAGS -DXMD_H" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +#ifdef _WIN32 +#include +#endif +#include +#include +#include + +int +main () +{ +{return 0;} + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok, -DXMD_H is added to LIBJPEG_CFLAGS" >&5 +$as_echo "ok, -DXMD_H is added to LIBJPEG_CFLAGS" >&6; } + LIBJPEG_CFLAGS="$LIBJPEG_CFLAGS -DXMD_H" + +else + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disable libjpeg" >&5 +$as_echo "no, disable libjpeg" >&6; } + enable_libjpeg="no" + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + CPPFLAGS="$ac_save_CPPFLAGS" + CFLAGS="$ac_save_CFLAGS" + + + USER_INCLUDES="$ac_save_USER_INCLUDES" + USER_LDFLAGS="$ac_save_USER_LDFLAGS" fi if test x$enable_libjpeg = xyes; then @@ -20165,8 +20643,6 @@ fi -FREETYPE_LIBS= -FREETYPE_CFLAGS= pkg_failed=no @@ -20248,6 +20724,9 @@ else + FREETYPE_LIBS= + FREETYPE_CFLAGS= + # Extract the first word of "freetype-config", so it can be a program name with args. set dummy freetype-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 @@ -20266,7 +20745,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FREETYPE_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -20473,6 +20952,7 @@ enable_cairo_output="try" fi +use_cairo="" if test x$enable_cairo_output = xyes; then pkg_failed=no @@ -20626,10 +21106,12 @@ echo "$CAIRO_PKG_ERRORS" >&5 enable_cairo_output="no" + use_cairo="no (requires cairo >= $CAIRO_VERSION)" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_cairo_output="no" + use_cairo="no (requires cairo >= $CAIRO_VERSION)" else CAIRO_CFLAGS=$pkg_cv_CAIRO_CFLAGS CAIRO_LIBS=$pkg_cv_CAIRO_LIBS @@ -20638,6 +21120,9 @@ enable_cairo_output="yes" fi fi +if test x$use_cairo = x; then + use_cairo=$enable_cairo_output +fi @@ -20796,6 +21281,7 @@ +use_glib="" found_introspection=no if test x$enable_cairo_output = xyes; then POPPLER_GLIB_DISABLE_DEPRECATED="" @@ -20963,10 +21449,12 @@ echo "$POPPLER_GLIB_PKG_ERRORS" >&5 enable_poppler_glib="no" + use_glib="no (requires glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION)" elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } enable_poppler_glib="no" + use_glib="no (requires glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION)" else POPPLER_GLIB_CFLAGS=$pkg_cv_POPPLER_GLIB_CFLAGS POPPLER_GLIB_LIBS=$pkg_cv_POPPLER_GLIB_LIBS @@ -21089,7 +21577,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GLIB_MKENUMS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21118,8 +21606,12 @@ if test x$enable_poppler_glib = xyes; then as_fn_error $? "\"Cairo output is required to build glib frontend\"" "$LINENO" 5 fi + use_glib="no (requires cairo output)" enable_poppler_glib="no" fi +if test x"$use_glib" = x; then + use_glib="$enable_poppler_glib" +fi if test x$enable_poppler_glib = xyes; then BUILD_POPPLER_GLIB_TRUE= BUILD_POPPLER_GLIB_FALSE='#' @@ -21161,7 +21653,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21203,7 +21695,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_REBASE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21247,7 +21739,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_GTKDOC_MKPDF="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21822,7 +22314,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MOCQT4="${ac_tool_prefix}moc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21862,7 +22354,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MOCQT4="moc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21922,7 +22414,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MOCQT4="${ac_tool_prefix}moc-qt4" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -21962,7 +22454,7 @@ IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MOCQT4="moc-qt4" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 @@ -23065,6 +23557,78 @@ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LCMS_LIBS"; then + pkg_cv_LCMS_LIBS="$LCMS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1` + else + LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LCMS_PKG_ERRORS" >&5 + + lcms2=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + lcms2=no +else + LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS + LCMS_LIBS=$pkg_cv_LCMS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + lcms2=yes +fi + if test x$lcms2 = xno; then + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 +$as_echo_n "checking for LCMS... " >&6; } + +if test -n "$LCMS_CFLAGS"; then + pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 ac_status=$? @@ -23147,6 +23711,7 @@ $as_echo "yes" >&6; } fi + fi elif test x$enable_cms = xtry; then pkg_failed=no @@ -23157,6 +23722,80 @@ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$LCMS_LIBS"; then + pkg_cv_LCMS_LIBS="$LCMS_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 + ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +else + _pkg_short_errors_supported=no +fi + if test $_pkg_short_errors_supported = yes; then + LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1` + else + LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$LCMS_PKG_ERRORS" >&5 + + lcms2=no +elif test $pkg_failed = untried; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + lcms2=no +else + LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS + LCMS_LIBS=$pkg_cv_LCMS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + lcms2=yes +fi + if test x$lcms2 = xyes; then + enable_cms=yes + else + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 +$as_echo_n "checking for LCMS... " >&6; } + +if test -n "$LCMS_CFLAGS"; then + pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 ac_status=$? @@ -23219,12 +23858,19 @@ $as_echo "yes" >&6; } enable_cms=yes fi + fi fi if test "x$enable_cms" = "xyes"; then $as_echo "#define USE_CMS 1" >>confdefs.h + if test "x$lcms2" != "xyes"; then + lcms1=yes; + +$as_echo "#define USE_LCMS1 1" >>confdefs.h + + fi fi if test x$enable_cms = xyes; then USE_CMS_TRUE= @@ -23234,13 +23880,83 @@ USE_CMS_FALSE= fi + if test x$lcms1 = xyes; then + USE_LCMS1_TRUE= + USE_LCMS1_FALSE='#' +else + USE_LCMS1_TRUE='#' + USE_LCMS1_FALSE= +fi + + + +# Check whether --with-testdatadir was given. +if test "${with_testdatadir+set}" = set; then : + withval=$with_testdatadir; case $withval in + [\\/]* | ?:[\\/]* ) # Absolute name. + TESTDATADIR=$withval ;; + *) # Relative name. + TESTDATADIR=$ac_pwd/$withval ;; + esac + +else + case $srcdir in + [\\/]* | ?:[\\/]* ) # Absolute name. + TESTDATADIR=$srcdir/../test ;; + *) # Relative name. + TESTDATADIR=$ac_pwd/$srcdir/../test ;; + esac + + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for test data in $TESTDATADIR" >&5 +$as_echo_n "checking for test data in $TESTDATADIR... " >&6; } +if test -d $TESTDATADIR && test -f $TESTDATADIR/test-poppler.c; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + No test data found in $TESTDATADIR. + You will not be able to run 'make check' successfully. + + The test data is not included in the source packages + and is also not part of the main git repository. Instead, + you can checkout the test data from its own git + repository with: + + git clone git://git.freedesktop.org/git/poppler/test + + You should checkout the test data as a sibling of your + poppler source folder or specify the location of your + checkout with --with-testdatadir=/path/to/checkoutdir/test. +" >&5 +$as_echo "$as_me: WARNING: + No test data found in $TESTDATADIR. + You will not be able to run 'make check' successfully. + + The test data is not included in the source packages + and is also not part of the main git repository. Instead, + you can checkout the test data from its own git + repository with: + + git clone git://git.freedesktop.org/git/poppler/test + + You should checkout the test data as a sibling of your + poppler source folder or specify the location of your + checkout with --with-testdatadir=/path/to/checkoutdir/test. +" >&2;} +fi + if test "x$GCC" != xyes; then enable_compile_warnings=no fi case "$enable_compile_warnings" in no) ;; - yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;; + yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;; kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \ -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \ -Wconversion -Wall -W -Wpointer-arith \ @@ -23249,7 +23965,7 @@ -fno-common $CXXFLAGS" ;; esac -case $($PKG_CONFIG --version) in +case `$PKG_CONFIG --version` in 0.?|0.10-7) PC_REQUIRES_PRIVATE=""; PC_REQUIRES="poppler = $VERSION";; @@ -23263,11 +23979,11 @@ POPPLER_MAJOR_VERSION=0 -POPPLER_MINOR_VERSION=18 +POPPLER_MINOR_VERSION=20 -POPPLER_MICRO_VERSION=4 +POPPLER_MICRO_VERSION=5 -POPPLER_VERSION=0.18.4 +POPPLER_VERSION=0.20.5 ac_config_files="$ac_config_files Makefile goo/Makefile fofi/Makefile splash/Makefile poppler/Makefile utils/Makefile glib/Makefile glib/poppler-features.h glib/reference/Makefile glib/reference/version.xml glib/demo/Makefile test/Makefile qt4/Makefile qt4/src/Makefile qt4/tests/Makefile qt4/demos/Makefile cpp/Makefile cpp/poppler-version.h cpp/tests/Makefile poppler.pc poppler-uninstalled.pc poppler-cairo.pc poppler-cairo-uninstalled.pc poppler-splash.pc poppler-splash-uninstalled.pc poppler-glib.pc poppler-glib-uninstalled.pc poppler-qt4.pc poppler-qt4-uninstalled.pc poppler-cpp.pc poppler-cpp-uninstalled.pc" @@ -23502,6 +24218,10 @@ as_fn_error $? "conditional \"USE_CMS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${USE_LCMS1_TRUE}" && test -z "${USE_LCMS1_FALSE}"; then + as_fn_error $? "conditional \"USE_LCMS1\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 @@ -23800,16 +24520,16 @@ # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. + # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' + as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi else - as_ln_s='cp -p' + as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @@ -23869,28 +24589,16 @@ as_mkdir_p=false fi -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in #( - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +as_test_x='test -x' +as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" @@ -23911,8 +24619,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by poppler $as_me 0.18.4, which was -generated by GNU Autoconf 2.68. Invocation command line was +This file was extended by poppler $as_me 0.20.5, which was +generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -23977,11 +24685,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -poppler config.status 0.18.4 -configured by $0, generated by GNU Autoconf 2.68, +poppler config.status 0.20.5 +configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -24072,7 +24780,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then - set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion + set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' @@ -26052,9 +26760,9 @@ echo "Building poppler with support for:" echo " font configuration: $with_font_configuration" echo " splash output: $enable_splash_output" -echo " cairo output: $enable_cairo_output" +echo " cairo output: $use_cairo" echo " qt4 wrapper: $enable_poppler_qt4" -echo " glib wrapper: $enable_poppler_glib" +echo " glib wrapper: $use_glib" echo " introspection: $found_introspection" echo " cpp wrapper: $enable_poppler_cpp" echo " use gtk-doc: $enable_gtk_doc" @@ -26065,7 +26773,15 @@ echo " use libcurl: $enable_libcurl" echo " use libopenjpeg: $enable_libopenjpeg" echo " use cms: $enable_cms" +if test x$enable_cms = xyes;then + if test x$lcms1 = xyes;then + echo " with lcms1" + else + echo " with lcms2" + fi +fi echo " command line utils: $enable_utils" +echo " test data dir: $TESTDATADIR" echo "" if test x$enable_splash_output = xno -a x$enable_cairo_output = xno; then diff -Nru poppler-0.18.4/configure.ac poppler-0.20.5/configure.ac --- poppler-0.18.4/configure.ac 2012-02-15 17:21:50.000000000 +0000 +++ poppler-0.20.5/configure.ac 2012-10-10 17:32:48.000000000 +0000 @@ -1,6 +1,6 @@ m4_define([poppler_version_major],[0]) -m4_define([poppler_version_minor],[18]) -m4_define([poppler_version_micro],[4]) +m4_define([poppler_version_minor],[20]) +m4_define([poppler_version_micro],[5]) m4_define([poppler_version],[poppler_version_major.poppler_version_minor.poppler_version_micro]) AC_PREREQ(2.59) @@ -31,7 +31,13 @@ cygwin* | mingw*) ;; *) - CXXFLAGS="$CXXFLAGS -ansi" + case "${CXXFLAGS}" in + *-std=*) + ;; + *) + CXXFLAGS="$CXXFLAGS -ansi" + ;; + esac ;; esac fi @@ -40,6 +46,9 @@ dnl ##### Check for pkgconfig PKG_PROG_PKG_CONFIG +dnl ##### Export the version +AC_DEFINE_UNQUOTED([POPPLER_VERSION], ["poppler_version"], [Defines the poppler version]) + dnl Enable these unconditionally. AC_DEFINE([OPI_SUPPORT], [1], [Generate OPI comments in PS output.]) AC_DEFINE([MULTITHREADED], [1], [Enable multithreading support.]) @@ -145,37 +154,38 @@ fi -dnl Test for libopenjpeg +dnl Test for libopenjpeg. Versions prior to 1.4 do not provide a pkgconfig file. AC_ARG_ENABLE(libopenjpeg, AC_HELP_STRING([--disable-libopenjpeg], [Don't build against libopenjpeg.]), enable_libopenjpeg=$enableval, enable_libopenjpeg="try") if test x$enable_libopenjpeg = xyes; then - AC_CHECK_LIB([openjpeg], [opj_cio_open],, - AC_MSG_ERROR("*** libopenjpeg library not found ***")) - AC_CHECK_HEADERS([openjpeg.h],, - AC_MSG_ERROR("*** libopenjpeg headers not found ***")) + PKG_CHECK_MODULES(LIBOPENJPEG, libopenjpeg, + [], + [AC_CHECK_LIB([openjpeg], [opj_cio_open], + LIBOPENJPEG_LIBS="-lopenjpeg", + AC_MSG_ERROR("*** libopenjpeg library not found ***")) + AC_CHECK_HEADERS([openjpeg.h],, + AC_MSG_ERROR("*** libopenjpeg headers not found ***"))]) elif test x$enable_libopenjpeg = xtry; then - AC_CHECK_LIB([openjpeg], [opj_cio_open], - [enable_libopenjpeg="yes"], - [enable_libopenjpeg="no"]) - AC_CHECK_HEADERS([openjpeg.h],, - [enable_libopenjpeg="no"]) + PKG_CHECK_MODULES(LIBOPENJPEG, libopenjpeg, + [enable_libopenjpeg="yes"], + [AC_CHECK_LIB([openjpeg], [opj_cio_open], + [enable_libopenjpeg="yes" + LIBOPENJPEG_LIBS="-lopenjpeg"], + [enable_libopenjpeg="no"]) + AC_CHECK_HEADERS([openjpeg.h],, + [enable_libopenjpeg="no"])]) fi if test x$enable_libopenjpeg = xyes; then - LIBOPENJPEG_LIBS="-lopenjpeg" + AC_SUBST(LIBOPENJPEG_CFLAGS) AC_SUBST(LIBOPENJPEG_LIBS) AC_DEFINE(ENABLE_LIBOPENJPEG) - AC_TRY_COMPILE([ -#include -], [ - int foo = OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG; -], have_openjpeg_flag="yes", am_cv_proto_iconv_arg1="no") - if test x$have_openjpeg_flag = xyes; then - AC_DEFINE(WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG, 1, [OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag.]) - fi + PKG_CHECK_EXISTS(libopenjpeg >= 1.5, + [AC_DEFINE(WITH_OPENJPEG_IGNORE_PCLR_CMAP_CDEF_FLAG, 1, [OpenJPEG with the OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG flag.])], + []) fi AM_CONDITIONAL(BUILD_LIBOPENJPEG, test x$enable_libopenjpeg = xyes) @@ -189,21 +199,46 @@ enable_libtiff=$enableval, enable_libtiff="try") +AC_ARG_VAR([LIBTIFF_CFLAGS], [C compiler flags for LIBTIFF]) +AC_ARG_VAR([LIBTIFF_LIBS], [linker flags to link LIBTIFF (default is -ltiff)]) +ac_save_CPPFLAGS="$CPPFLAGS" +ac_save_CXXFLAGS="$CXXFLAGS" +ac_save_LIBS="$LDFLAGS" +CPPFLAGS="$CPPFLAGS $LIBTIFF_CFLAGS" +CXXFLAGS="$CXXFLAGS $LIBTIFF_CFLAGS" +LIBS="$LIBS $LIBTIFF_LIBS" if test x$enable_libtiff = xyes; then - AC_CHECK_LIB([tiff], [TIFFOpen],, - AC_MSG_ERROR("*** libtiff library not found ***")) + if test x"$LIBTIFF_LIBS" != ; then + AC_CHECK_FUNC([TIFFOpen],, + AC_MSG_ERROR("*** libtiff library not found ***")) + else + AC_CHECK_LIB([tiff], [TIFFOpen],, + AC_MSG_ERROR("*** libtiff library not found ***")) + fi AC_CHECK_HEADERS([tiffio.h],, AC_MSG_ERROR("*** libtiff headers not found ***")) elif test x$enable_libtiff = xtry; then - AC_CHECK_LIB([tiff], [TIFFOpen], - [enable_libtiff="yes"], - [enable_libtiff="no"]) + if test x"$LIBTIFF_LIBS" != x; then + AC_CHECK_FUNC([TIFFOpen], + [enable_libtiff="yes"], + [enable_libtiff="no"]) + else + AC_CHECK_LIB([tiff], [TIFFOpen], + [enable_libtiff="yes"], + [enable_libtiff="no"]) + fi AC_CHECK_HEADERS([tiffio.h],, [enable_libtiff="no"]) fi +CPPFLAGS="$ac_save_CPPFLAGS" +CXXFLAGS="$ac_save_CXXFLAGS" +LIBS="$ac_save_LIBS" if test x$enable_libtiff = xyes; then - LIBTIFF_LIBS="-ltiff" + if test x"$LIBTIFF_LIBS" = x; then + LIBTIFF_LIBS="-ltiff" + fi + AC_SUBST(LIBTIFF_CFLAGSS) AC_SUBST(LIBTIFF_LIBS) AC_DEFINE(ENABLE_LIBTIFF) fi @@ -279,8 +314,63 @@ [Don't build against libjpeg.]), enable_libjpeg=$enableval, enable_libjpeg="try") +AC_ARG_VAR([LIBJPEG_CFLAGS], [C compiler flags for LIBJPEG]) if test x$enable_libjpeg != xno; then + + dnl + dnl POPPLER_FIND_JPEG uses "USER_INCLUDES" and "USER_LIBS" + dnl to receive the flags for header and library directories. + dnl + ac_save_USER_INCLUDES="$USER_INCLUDES" + ac_save_USER_LDFLAGS="$USER_LDFLAGS" + USER_INCLUDES="$USER_INCLUDES $LIBJPEG_CFLAGS" + USER_LDFLAGS="$USER_LDFLAGS $LIBJPEG_CFLAGS" POPPLER_FIND_JPEG + + dnl check INT16, INT32 typedef conflict in jmorecfg.h + ac_save_CPPFLAGS="$CPPFLAGS" + ac_save_CFLAGS="$CFLAGS" + CPPFLAGS="$CPPFLAGS $LIBJPEG_CFLAGS" + CFLAGS="$CFLAGS $LIBJPEG_CFLAGS" + AC_MSG_CHECKING([libjpeg.h works correctly]) + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ +#ifdef _WIN32 +#include +#endif +#include +#include +#include +],[{return 0;}])],[ + AC_MSG_RESULT([ok]) + ],[ + AC_MSG_RESULT([no]) + AC_MSG_CHECKING([libjpeg.h problem can be fixed by XMD_H macro]) + CPPFLAGS="$CPPFLAGS -DXMD_H" + CFLAGS="$CFLAGS -DXMD_H" + AC_COMPILE_IFELSE([ + AC_LANG_PROGRAM([ +#ifdef _WIN32 +#include +#endif +#include +#include +#include +],[{return 0;}])],[ + AC_MSG_RESULT([ok, -DXMD_H is added to LIBJPEG_CFLAGS]) + LIBJPEG_CFLAGS="$LIBJPEG_CFLAGS -DXMD_H" + ],[ + AC_MSG_RESULT([no, disable libjpeg]) + enable_libjpeg="no" + ]) + ]) + CPPFLAGS="$ac_save_CPPFLAGS" + CFLAGS="$ac_save_CFLAGS" + + dnl POPPLER_FIND_JPEG sets LIBJPEG_LIBS + AC_SUBST(LIBJPEG_CFLAGS) + USER_INCLUDES="$ac_save_USER_INCLUDES" + USER_LDFLAGS="$ac_save_USER_LDFLAGS" fi AM_CONDITIONAL(BUILD_LIBJPEG, test x$enable_libjpeg = xyes) @@ -306,8 +396,6 @@ AM_CONDITIONAL(BUILD_LIBPNG, test x$enable_libpng = xyes) dnl Check for freetype headers -FREETYPE_LIBS= -FREETYPE_CFLAGS= PKG_CHECK_MODULES(FREETYPE, freetype2, [freetype_pkgconfig=yes], [freetype_pkgconfig=no]) @@ -318,6 +406,9 @@ else + FREETYPE_LIBS= + FREETYPE_CFLAGS= + AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, no) if test "x$FREETYPE_CONFIG" != "xno" ; then @@ -386,12 +477,17 @@ [Don't build the cairo graphics backend.]), enable_cairo_output=$enableval, enable_cairo_output="try") +use_cairo="" if test x$enable_cairo_output = xyes; then PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION) elif test x$enable_cairo_output = xtry; then PKG_CHECK_MODULES(CAIRO, cairo >= $CAIRO_VERSION cairo-ft >= $CAIRO_VERSION, [enable_cairo_output="yes"], - [enable_cairo_output="no"]) + [enable_cairo_output="no" + use_cairo="no (requires cairo >= $CAIRO_VERSION)"]) +fi +if test x$use_cairo = x; then + use_cairo=$enable_cairo_output fi AC_SUBST(CAIRO_CFLAGS) @@ -421,6 +517,7 @@ AC_SUBST(CAIRO_FEATURE) AC_SUBST(CAIRO_REQ) +use_glib="" found_introspection=no if test x$enable_cairo_output = xyes; then POPPLER_GLIB_DISABLE_DEPRECATED="" @@ -438,7 +535,8 @@ elif test x$enable_poppler_glib = xtry; then PKG_CHECK_MODULES(POPPLER_GLIB, glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION, [enable_poppler_glib="yes"], - [enable_poppler_glib="no"]) + [enable_poppler_glib="no" + use_glib="no (requires glib-2.0 >= $GLIB_REQUIRED gobject-2.0 >= $GLIB_REQUIRED cairo >= $CAIRO_VERSION)"]) fi if test x$enable_poppler_glib = xyes; then # Check for introspection @@ -452,8 +550,12 @@ if test x$enable_poppler_glib = xyes; then AC_MSG_ERROR("Cairo output is required to build glib frontend") fi + use_glib="no (requires cairo output)" enable_poppler_glib="no" fi +if test x"$use_glib" = x; then + use_glib="$enable_poppler_glib" +fi AM_CONDITIONAL(BUILD_POPPLER_GLIB, test x$enable_poppler_glib = xyes) AM_CONDITIONAL(HAVE_INTROSPECTION, test "x$found_introspection" = "xyes") AC_SUBST(GLIB_REQ) @@ -572,22 +674,76 @@ enable_cms=$enableval, enable_cms="try") if test x$enable_cms = xyes; then - PKG_CHECK_MODULES(LCMS, lcms) + PKG_CHECK_MODULES(LCMS, lcms2, [lcms2=yes], [lcms2=no]) + if test x$lcms2 = xno; then + PKG_CHECK_MODULES(LCMS, lcms) + fi elif test x$enable_cms = xtry; then - PKG_CHECK_MODULES(LCMS, lcms, [enable_cms=yes], [enable_cms=no]) + PKG_CHECK_MODULES(LCMS, lcms2,[lcms2=yes],[lcms2=no]) + if test x$lcms2 = xyes; then + enable_cms=yes + else + PKG_CHECK_MODULES(LCMS, lcms,[enable_cms=yes],[enable_cms=no]) + fi fi if test "x$enable_cms" = "xyes"; then AC_DEFINE(USE_CMS, 1, [Defines if use cms]) + if test "x$lcms2" != "xyes"; then + lcms1=yes; + AC_DEFINE(USE_LCMS1, 1, [Defines if use lcms1]) + fi fi AM_CONDITIONAL(USE_CMS, test x$enable_cms = xyes) +AM_CONDITIONAL(USE_LCMS1, test x$lcms1 = xyes) + +AC_ARG_WITH([testdatadir], + [AS_HELP_STRING([--with-testdatadir=/path/to/testdatadir], + [Specify test data dir])], + [case $withval in + [[\\/]]* | ?:[[\\/]]* ) # Absolute name. + TESTDATADIR=$withval ;; + *) # Relative name. + TESTDATADIR=$ac_pwd/$withval ;; + esac + ], + [case $srcdir in + [[\\/]]* | ?:[[\\/]]* ) # Absolute name. + TESTDATADIR=$srcdir/../test ;; + *) # Relative name. + TESTDATADIR=$ac_pwd/$srcdir/../test ;; + esac + ] +) +AC_MSG_CHECKING([for test data in $TESTDATADIR]) +if test -d $TESTDATADIR && test -f $TESTDATADIR/test-poppler.c; then + AC_MSG_RESULT([yes]) +else + AC_MSG_RESULT([no]) + AC_MSG_WARN([ + No test data found in $TESTDATADIR. + You will not be able to run 'make check' successfully. + + The test data is not included in the source packages + and is also not part of the main git repository. Instead, + you can checkout the test data from its own git + repository with: + + git clone git://git.freedesktop.org/git/poppler/test + + You should checkout the test data as a sibling of your + poppler source folder or specify the location of your + checkout with --with-testdatadir=/path/to/checkoutdir/test. +]) +fi +AC_SUBST(TESTDATADIR) if test "x$GCC" != xyes; then enable_compile_warnings=no fi case "$enable_compile_warnings" in no) ;; - yes) CXXFLAGS="-Wall -Wno-write-strings -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;; + yes) CXXFLAGS="-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions -fno-check-new -fno-common $CXXFLAGS" ;; kde) CXXFLAGS="-Wnon-virtual-dtor -Wno-long-long -Wundef \ -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align \ -Wconversion -Wall -W -Wpointer-arith \ @@ -596,7 +752,7 @@ -fno-common $CXXFLAGS" ;; esac -case $($PKG_CONFIG --version) in +case `$PKG_CONFIG --version` in 0.?|0.1[0-7]) PC_REQUIRES_PRIVATE=""; PC_REQUIRES="poppler = $VERSION";; @@ -651,9 +807,9 @@ echo "Building poppler with support for:" echo " font configuration: $with_font_configuration" echo " splash output: $enable_splash_output" -echo " cairo output: $enable_cairo_output" +echo " cairo output: $use_cairo" echo " qt4 wrapper: $enable_poppler_qt4" -echo " glib wrapper: $enable_poppler_glib" +echo " glib wrapper: $use_glib" echo " introspection: $found_introspection" echo " cpp wrapper: $enable_poppler_cpp" echo " use gtk-doc: $enable_gtk_doc" @@ -664,7 +820,15 @@ echo " use libcurl: $enable_libcurl" echo " use libopenjpeg: $enable_libopenjpeg" echo " use cms: $enable_cms" +if test x$enable_cms = xyes;then + if test x$lcms1 = xyes;then + echo " with lcms1" + else + echo " with lcms2" + fi +fi echo " command line utils: $enable_utils" +echo " test data dir: $TESTDATADIR" echo "" if test x$enable_splash_output = xno -a x$enable_cairo_output = xno; then diff -Nru poppler-0.18.4/cpp/Makefile.am poppler-0.20.5/cpp/Makefile.am --- poppler-0.18.4/cpp/Makefile.am 2011-11-22 21:32:58.000000000 +0000 +++ poppler-0.20.5/cpp/Makefile.am 2012-05-10 20:05:44.000000000 +0000 @@ -1,7 +1,27 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/goo \ - -I$(top_srcdir)/poppler + -I$(top_srcdir)/poppler \ + $(libjpeg_includes) \ + $(libtiff_includes) \ + $(libjpeg2000_includes) \ + $(libpng_includes) + +if BUILD_LIBJPEG +libjpeg_includes = $(LIBJPEG_CFLAGS) +endif + +if BUILD_LIBTIFF +libtiff_includes = $(LIBTIFF_CFLAGS) +endif + +if BUILD_LIBOPENJPEG +libjpeg2000_includes = $(LIBOPENJPEG_CFLAGS) +endif + +if BUILD_LIBPNG +libpng_includes = $(LIBPNG_CFLAGS) +endif SUBDIRS = . tests diff -Nru poppler-0.18.4/cpp/Makefile.in poppler-0.20.5/cpp/Makefile.in --- poppler-0.18.4/cpp/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/cpp/Makefile.in 2012-10-10 17:34:54.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -74,6 +91,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(poppler_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @@ -94,8 +117,8 @@ libpoppler_cpp_la-poppler-toc.lo \ libpoppler_cpp_la-poppler-version.lo libpoppler_cpp_la_OBJECTS = $(am_libpoppler_cpp_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libpoppler_cpp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ @@ -111,18 +134,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -130,18 +153,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpoppler_cpp_la_SOURCES) DIST_SOURCES = $(libpoppler_cpp_la_SOURCES) @@ -152,6 +175,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(poppler_include_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive @@ -259,12 +287,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -318,6 +350,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -385,8 +418,16 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/goo \ - -I$(top_srcdir)/poppler - + -I$(top_srcdir)/poppler \ + $(libjpeg_includes) \ + $(libtiff_includes) \ + $(libjpeg2000_includes) \ + $(libpng_includes) + +@BUILD_LIBJPEG_TRUE@libjpeg_includes = $(LIBJPEG_CFLAGS) +@BUILD_LIBTIFF_TRUE@libtiff_includes = $(LIBTIFF_CFLAGS) +@BUILD_LIBOPENJPEG_TRUE@libjpeg2000_includes = $(LIBOPENJPEG_CFLAGS) +@BUILD_LIBPNG_TRUE@libpng_includes = $(LIBPNG_CFLAGS) SUBDIRS = . tests poppler_includedir = $(includedir)/poppler/cpp poppler_include_HEADERS = \ @@ -471,7 +512,6 @@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -479,6 +519,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -500,7 +542,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libpoppler-cpp.la: $(libpoppler_cpp_la_OBJECTS) $(libpoppler_cpp_la_DEPENDENCIES) +libpoppler-cpp.la: $(libpoppler_cpp_la_OBJECTS) $(libpoppler_cpp_la_DEPENDENCIES) $(EXTRA_libpoppler_cpp_la_DEPENDENCIES) $(AM_V_CXXLD)$(libpoppler_cpp_la_LINK) -rpath $(libdir) $(libpoppler_cpp_la_OBJECTS) $(libpoppler_cpp_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -526,154 +568,135 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< libpoppler_cpp_la-PNMWriter.lo: PNMWriter.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-PNMWriter.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-PNMWriter.Tpo -c -o libpoppler_cpp_la-PNMWriter.lo `test -f 'PNMWriter.cc' || echo '$(srcdir)/'`PNMWriter.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-PNMWriter.Tpo $(DEPDIR)/libpoppler_cpp_la-PNMWriter.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='PNMWriter.cc' object='libpoppler_cpp_la-PNMWriter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='PNMWriter.cc' object='libpoppler_cpp_la-PNMWriter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-PNMWriter.lo `test -f 'PNMWriter.cc' || echo '$(srcdir)/'`PNMWriter.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-PNMWriter.lo `test -f 'PNMWriter.cc' || echo '$(srcdir)/'`PNMWriter.cc libpoppler_cpp_la-poppler-document.lo: poppler-document.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-document.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-document.Tpo -c -o libpoppler_cpp_la-poppler-document.lo `test -f 'poppler-document.cpp' || echo '$(srcdir)/'`poppler-document.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-document.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-document.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-document.cpp' object='libpoppler_cpp_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-document.cpp' object='libpoppler_cpp_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-document.lo `test -f 'poppler-document.cpp' || echo '$(srcdir)/'`poppler-document.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-document.lo `test -f 'poppler-document.cpp' || echo '$(srcdir)/'`poppler-document.cpp libpoppler_cpp_la-poppler-embedded-file.lo: poppler-embedded-file.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-embedded-file.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-embedded-file.Tpo -c -o libpoppler_cpp_la-poppler-embedded-file.lo `test -f 'poppler-embedded-file.cpp' || echo '$(srcdir)/'`poppler-embedded-file.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-embedded-file.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-embedded-file.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-embedded-file.cpp' object='libpoppler_cpp_la-poppler-embedded-file.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-embedded-file.cpp' object='libpoppler_cpp_la-poppler-embedded-file.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-embedded-file.lo `test -f 'poppler-embedded-file.cpp' || echo '$(srcdir)/'`poppler-embedded-file.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-embedded-file.lo `test -f 'poppler-embedded-file.cpp' || echo '$(srcdir)/'`poppler-embedded-file.cpp libpoppler_cpp_la-poppler-font.lo: poppler-font.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-font.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-font.Tpo -c -o libpoppler_cpp_la-poppler-font.lo `test -f 'poppler-font.cpp' || echo '$(srcdir)/'`poppler-font.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-font.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-font.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-font.cpp' object='libpoppler_cpp_la-poppler-font.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-font.cpp' object='libpoppler_cpp_la-poppler-font.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-font.lo `test -f 'poppler-font.cpp' || echo '$(srcdir)/'`poppler-font.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-font.lo `test -f 'poppler-font.cpp' || echo '$(srcdir)/'`poppler-font.cpp libpoppler_cpp_la-poppler-global.lo: poppler-global.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-global.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-global.Tpo -c -o libpoppler_cpp_la-poppler-global.lo `test -f 'poppler-global.cpp' || echo '$(srcdir)/'`poppler-global.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-global.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-global.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-global.cpp' object='libpoppler_cpp_la-poppler-global.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-global.cpp' object='libpoppler_cpp_la-poppler-global.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-global.lo `test -f 'poppler-global.cpp' || echo '$(srcdir)/'`poppler-global.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-global.lo `test -f 'poppler-global.cpp' || echo '$(srcdir)/'`poppler-global.cpp libpoppler_cpp_la-poppler-image.lo: poppler-image.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-image.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-image.Tpo -c -o libpoppler_cpp_la-poppler-image.lo `test -f 'poppler-image.cpp' || echo '$(srcdir)/'`poppler-image.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-image.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-image.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-image.cpp' object='libpoppler_cpp_la-poppler-image.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-image.cpp' object='libpoppler_cpp_la-poppler-image.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-image.lo `test -f 'poppler-image.cpp' || echo '$(srcdir)/'`poppler-image.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-image.lo `test -f 'poppler-image.cpp' || echo '$(srcdir)/'`poppler-image.cpp libpoppler_cpp_la-poppler-page.lo: poppler-page.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-page.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-page.Tpo -c -o libpoppler_cpp_la-poppler-page.lo `test -f 'poppler-page.cpp' || echo '$(srcdir)/'`poppler-page.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-page.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-page.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-page.cpp' object='libpoppler_cpp_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page.cpp' object='libpoppler_cpp_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-page.lo `test -f 'poppler-page.cpp' || echo '$(srcdir)/'`poppler-page.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-page.lo `test -f 'poppler-page.cpp' || echo '$(srcdir)/'`poppler-page.cpp libpoppler_cpp_la-poppler-page-renderer.lo: poppler-page-renderer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-page-renderer.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-page-renderer.Tpo -c -o libpoppler_cpp_la-poppler-page-renderer.lo `test -f 'poppler-page-renderer.cpp' || echo '$(srcdir)/'`poppler-page-renderer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-page-renderer.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-page-renderer.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-page-renderer.cpp' object='libpoppler_cpp_la-poppler-page-renderer.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page-renderer.cpp' object='libpoppler_cpp_la-poppler-page-renderer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-page-renderer.lo `test -f 'poppler-page-renderer.cpp' || echo '$(srcdir)/'`poppler-page-renderer.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-page-renderer.lo `test -f 'poppler-page-renderer.cpp' || echo '$(srcdir)/'`poppler-page-renderer.cpp libpoppler_cpp_la-poppler-page-transition.lo: poppler-page-transition.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-page-transition.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-page-transition.Tpo -c -o libpoppler_cpp_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cpp' || echo '$(srcdir)/'`poppler-page-transition.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-page-transition.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-page-transition.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-page-transition.cpp' object='libpoppler_cpp_la-poppler-page-transition.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page-transition.cpp' object='libpoppler_cpp_la-poppler-page-transition.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cpp' || echo '$(srcdir)/'`poppler-page-transition.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cpp' || echo '$(srcdir)/'`poppler-page-transition.cpp libpoppler_cpp_la-poppler-private.lo: poppler-private.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-private.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-private.Tpo -c -o libpoppler_cpp_la-poppler-private.lo `test -f 'poppler-private.cpp' || echo '$(srcdir)/'`poppler-private.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-private.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-private.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-private.cpp' object='libpoppler_cpp_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-private.cpp' object='libpoppler_cpp_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-private.lo `test -f 'poppler-private.cpp' || echo '$(srcdir)/'`poppler-private.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-private.lo `test -f 'poppler-private.cpp' || echo '$(srcdir)/'`poppler-private.cpp libpoppler_cpp_la-poppler-rectangle.lo: poppler-rectangle.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-rectangle.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-rectangle.Tpo -c -o libpoppler_cpp_la-poppler-rectangle.lo `test -f 'poppler-rectangle.cpp' || echo '$(srcdir)/'`poppler-rectangle.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-rectangle.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-rectangle.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-rectangle.cpp' object='libpoppler_cpp_la-poppler-rectangle.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-rectangle.cpp' object='libpoppler_cpp_la-poppler-rectangle.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-rectangle.lo `test -f 'poppler-rectangle.cpp' || echo '$(srcdir)/'`poppler-rectangle.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-rectangle.lo `test -f 'poppler-rectangle.cpp' || echo '$(srcdir)/'`poppler-rectangle.cpp libpoppler_cpp_la-poppler-toc.lo: poppler-toc.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-toc.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-toc.Tpo -c -o libpoppler_cpp_la-poppler-toc.lo `test -f 'poppler-toc.cpp' || echo '$(srcdir)/'`poppler-toc.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-toc.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-toc.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-toc.cpp' object='libpoppler_cpp_la-poppler-toc.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-toc.cpp' object='libpoppler_cpp_la-poppler-toc.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-toc.lo `test -f 'poppler-toc.cpp' || echo '$(srcdir)/'`poppler-toc.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-toc.lo `test -f 'poppler-toc.cpp' || echo '$(srcdir)/'`poppler-toc.cpp libpoppler_cpp_la-poppler-version.lo: poppler-version.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_cpp_la-poppler-version.lo -MD -MP -MF $(DEPDIR)/libpoppler_cpp_la-poppler-version.Tpo -c -o libpoppler_cpp_la-poppler-version.lo `test -f 'poppler-version.cpp' || echo '$(srcdir)/'`poppler-version.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_cpp_la-poppler-version.Tpo $(DEPDIR)/libpoppler_cpp_la-poppler-version.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-version.cpp' object='libpoppler_cpp_la-poppler-version.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-version.cpp' object='libpoppler_cpp_la-poppler-version.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-version.lo `test -f 'poppler-version.cpp' || echo '$(srcdir)/'`poppler-version.cpp +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_cpp_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_cpp_la-poppler-version.lo `test -f 'poppler-version.cpp' || echo '$(srcdir)/'`poppler-version.cpp .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -682,8 +705,11 @@ -rm -rf .libs _libs install-poppler_includeHEADERS: $(poppler_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -697,9 +723,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -868,13 +892,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -912,10 +933,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/cpp/poppler-document.cpp poppler-0.20.5/cpp/poppler-document.cpp --- poppler-0.18.4/cpp/poppler-document.cpp 2011-11-22 21:32:58.000000000 +0000 +++ poppler-0.20.5/cpp/poppler-document.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -43,7 +43,7 @@ { if (!count) { globalParams = new GlobalParams(); - setErrorFunction(detail::error_function); + setErrorCallback(detail::error_function, NULL); } count++; } diff -Nru poppler-0.18.4/cpp/poppler-page-renderer.cpp poppler-0.20.5/cpp/poppler-page-renderer.cpp --- poppler-0.18.4/cpp/poppler-page-renderer.cpp 2011-11-22 21:32:59.000000000 +0000 +++ poppler-0.20.5/cpp/poppler-page-renderer.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -175,7 +175,7 @@ SplashOutputDev splashOutputDev(splashModeXBGR8, 4, gFalse, bgColor, gTrue, text_AA); splashOutputDev.setVectorAntialias(d->hints & antialiasing ? gTrue : gFalse); splashOutputDev.setFreeTypeHinting(d->hints & text_hinting ? gTrue : gFalse, gFalse); - splashOutputDev.startDoc(pdfdoc->getXRef()); + splashOutputDev.startDoc(pdfdoc); pdfdoc->displayPageSlice(&splashOutputDev, pp->index + 1, xres, yres, int(rotate) * 90, gFalse, gTrue, gFalse, diff -Nru poppler-0.18.4/cpp/poppler-page.cpp poppler-0.20.5/cpp/poppler-page.cpp --- poppler-0.18.4/cpp/poppler-page.cpp 2011-11-22 21:32:59.000000000 +0000 +++ poppler-0.20.5/cpp/poppler-page.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -208,24 +208,24 @@ double rect_right = r.right(); double rect_bottom = r.bottom(); - TextOutputDev td(NULL, gTrue, gFalse, gFalse); + TextOutputDev td(NULL, gTrue, 0, gFalse, gFalse); d->doc->doc->displayPage(&td, d->index + 1, 72, 72, rotation_value, false, true, false); TextPage *text_page = td.takeText(); switch (direction) { case search_from_top: found = text_page->findText(&u[0], len, - gTrue, gTrue, gFalse, gFalse, sCase, gFalse, + gTrue, gTrue, gFalse, gFalse, sCase, gFalse, gFalse, &rect_left, &rect_top, &rect_right, &rect_bottom); break; case search_next_result: found = text_page->findText(&u[0], len, - gFalse, gTrue, gTrue, gFalse, sCase, gFalse, + gFalse, gTrue, gTrue, gFalse, sCase, gFalse, gFalse, &rect_left, &rect_top, &rect_right, &rect_bottom); break; case search_previous_result: found = text_page->findText(&u[0], len, - gFalse, gTrue, gTrue, gFalse, sCase, gTrue, + gFalse, gTrue, gTrue, gFalse, sCase, gTrue, gFalse, &rect_left, &rect_top, &rect_right, &rect_bottom); break; } @@ -267,7 +267,7 @@ { std::auto_ptr s; const GBool use_raw_order = (layout_mode == raw_order_layout); - TextOutputDev td(0, gFalse, use_raw_order, gFalse); + TextOutputDev td(0, gFalse, 0, use_raw_order, gFalse); d->doc->doc->displayPage(&td, d->index + 1, 72, 72, 0, false, true, false); if (r.is_empty()) { const PDFRectangle *rect = d->page->getCropBox(); diff -Nru poppler-0.18.4/cpp/poppler-private.cpp poppler-0.20.5/cpp/poppler-private.cpp --- poppler-0.18.4/cpp/poppler-private.cpp 2011-11-22 21:32:59.000000000 +0000 +++ poppler-0.20.5/cpp/poppler-private.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -28,7 +28,7 @@ using namespace poppler; -void detail::error_function(int pos, char *msg, va_list args) +void detail::error_function(void * /*data*/, ErrorCategory /*category*/, int pos, char *msg) { std::ostringstream oss; if (pos >= 0) { @@ -36,9 +36,7 @@ } else { oss << "poppler/error: "; } - char buffer[4096]; // should be big enough - vsnprintf(buffer, sizeof(buffer) - 1, msg, args); - oss << buffer; + oss << msg; std::cerr << oss.str(); } diff -Nru poppler-0.18.4/cpp/poppler-private.h poppler-0.20.5/cpp/poppler-private.h --- poppler-0.18.4/cpp/poppler-private.h 2011-11-22 21:32:59.000000000 +0000 +++ poppler-0.20.5/cpp/poppler-private.h 2012-05-10 20:05:44.000000000 +0000 @@ -22,6 +22,7 @@ #include "poppler-global.h" #include "poppler-rectangle.h" +#include "Error.h" #include "CharTypes.h" #include @@ -37,7 +38,7 @@ namespace detail { -void error_function(int pos, char *msg, va_list args); +void error_function(void *data, ErrorCategory category, int pos, char *msg); rectf pdfrectangle_to_rectf(const PDFRectangle &pdfrect); diff -Nru poppler-0.18.4/cpp/poppler-version.h poppler-0.20.5/cpp/poppler-version.h --- poppler-0.18.4/cpp/poppler-version.h 2012-02-15 17:22:55.000000000 +0000 +++ poppler-0.20.5/cpp/poppler-version.h 2012-10-10 17:35:04.000000000 +0000 @@ -21,10 +21,10 @@ #include "poppler-global.h" -#define POPPLER_VERSION "0.18.4" +#define POPPLER_VERSION "0.20.5" #define POPPLER_VERSION_MAJOR 0 -#define POPPLER_VERSION_MINOR 18 -#define POPPLER_VERSION_MICRO 4 +#define POPPLER_VERSION_MINOR 20 +#define POPPLER_VERSION_MICRO 5 namespace poppler { diff -Nru poppler-0.18.4/cpp/tests/Makefile.in poppler-0.20.5/cpp/tests/Makefile.in --- poppler-0.18.4/cpp/tests/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/cpp/tests/Makefile.in 2012-10-10 17:34:54.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,8 +73,8 @@ am_poppler_dump_OBJECTS = parseargs.$(OBJEXT) poppler-dump.$(OBJEXT) poppler_dump_OBJECTS = $(am_poppler_dump_OBJECTS) poppler_dump_DEPENDENCIES = $(LDADDS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am_poppler_render_OBJECTS = parseargs.$(OBJEXT) \ poppler-render.$(OBJEXT) @@ -73,24 +90,29 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(poppler_dump_SOURCES) $(poppler_render_SOURCES) DIST_SOURCES = $(poppler_dump_SOURCES) $(poppler_render_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -166,12 +188,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -225,6 +251,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -352,10 +379,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -poppler-dump$(EXEEXT): $(poppler_dump_OBJECTS) $(poppler_dump_DEPENDENCIES) +poppler-dump$(EXEEXT): $(poppler_dump_OBJECTS) $(poppler_dump_DEPENDENCIES) $(EXTRA_poppler_dump_DEPENDENCIES) @rm -f poppler-dump$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_dump_OBJECTS) $(poppler_dump_LDADD) $(LIBS) -poppler-render$(EXEEXT): $(poppler_render_OBJECTS) $(poppler_render_DEPENDENCIES) +poppler-render$(EXEEXT): $(poppler_render_OBJECTS) $(poppler_render_DEPENDENCIES) $(EXTRA_poppler_render_DEPENDENCIES) @rm -f poppler-render$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_render_OBJECTS) $(poppler_render_LDADD) $(LIBS) @@ -372,66 +399,58 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< parseargs.o: $(top_srcdir)/utils/parseargs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT parseargs.o -MD -MP -MF $(DEPDIR)/parseargs.Tpo -c -o parseargs.o `test -f '$(top_srcdir)/utils/parseargs.cc' || echo '$(srcdir)/'`$(top_srcdir)/utils/parseargs.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parseargs.Tpo $(DEPDIR)/parseargs.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/utils/parseargs.cc' object='parseargs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/utils/parseargs.cc' object='parseargs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parseargs.o `test -f '$(top_srcdir)/utils/parseargs.cc' || echo '$(srcdir)/'`$(top_srcdir)/utils/parseargs.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parseargs.o `test -f '$(top_srcdir)/utils/parseargs.cc' || echo '$(srcdir)/'`$(top_srcdir)/utils/parseargs.cc parseargs.obj: $(top_srcdir)/utils/parseargs.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT parseargs.obj -MD -MP -MF $(DEPDIR)/parseargs.Tpo -c -o parseargs.obj `if test -f '$(top_srcdir)/utils/parseargs.cc'; then $(CYGPATH_W) '$(top_srcdir)/utils/parseargs.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/utils/parseargs.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/parseargs.Tpo $(DEPDIR)/parseargs.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$(top_srcdir)/utils/parseargs.cc' object='parseargs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$(top_srcdir)/utils/parseargs.cc' object='parseargs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parseargs.obj `if test -f '$(top_srcdir)/utils/parseargs.cc'; then $(CYGPATH_W) '$(top_srcdir)/utils/parseargs.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/utils/parseargs.cc'; fi` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o parseargs.obj `if test -f '$(top_srcdir)/utils/parseargs.cc'; then $(CYGPATH_W) '$(top_srcdir)/utils/parseargs.cc'; else $(CYGPATH_W) '$(srcdir)/$(top_srcdir)/utils/parseargs.cc'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -535,10 +554,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/debian/changelog poppler-0.20.5/debian/changelog --- poppler-0.18.4/debian/changelog 2012-02-27 07:56:28.000000000 +0000 +++ poppler-0.20.5/debian/changelog 2013-04-11 07:01:41.000000000 +0000 @@ -1,3 +1,285 @@ +poppler (0.20.5-1ubuntu3~precise1~ppa1) precise; urgency=low + + * No-change backport to precise + + -- Mrinal Kalakrishnan Thu, 11 Apr 2013 00:01:41 -0700 + +poppler (0.20.5-1ubuntu3) raring; urgency=low + + * SECURITY UPDATE: invalid memory access issues + - debian/patches/CVE-2013-1788.patch: add checks in poppler/Function.cc, + poppler/Stream.cc, splash/Splash.cc. + - CVE-2013-1788 + * SECURITY UPDATE: denial of service via malformed documents + - debian/patches/CVE-2013-1789.patch: validate data in splash/Splash.cc. + - CVE-2013-1789 + * SECURITY UPDATE: uninitialized memory read + - debian/patches/CVE-2013-1790.patch: properly handle refLine in + poppler/Stream.cc. + - CVE-2013-1790 + + -- Marc Deslauriers Fri, 08 Mar 2013 12:59:26 -0500 + +poppler (0.20.5-1ubuntu2) raring; urgency=low + + * debian/tests/build: Don't call deprecated g_type_init() when building with + glib >= 2.35. + + -- Martin Pitt Wed, 16 Jan 2013 16:14:28 +0100 + +poppler (0.20.5-1ubuntu1) raring; urgency=low + + * Merge from Debian experimental. Remaining changes: + - Drop libopenjpeg-dev build depends, it's in universe. + - Lower poppler-data to Suggests, it's too big for CD images, + handled by language-selector. + - Have libpoppler-dev Depend on libpoppler-private-dev, to help with + the transition after the split of the two packages (inherited from + Debian). + - Add one more optional symbol to libpoppler-qt4-4 symbols file to + account for armel toolchain differences between Debian and Ubuntu. + - debian/patches/git_gouraud_shading_support.patch: Evince crashes after + opening certain PDF file because parameterized Gouraud shading is not + supported. + - debian/patches/git_mask_segfault.patch: don't segfault in + setSoftMaskFromImageMask. + - debian/patches/git_no_buggy_check.patch: "Don't do a check for sanity + that then we don't use." + - Add simple compile/link/run autopkgtest. + * Refresh Ubuntu patches. + + -- Logan Rosen Fri, 21 Dec 2012 16:54:30 -0500 + +poppler (0.20.5-1) experimental; urgency=low + + * New upstream release. + * Update copyright. + + -- Pino Toscano Wed, 10 Oct 2012 21:02:25 +0200 + +poppler (0.20.5-0ubuntu3) raring; urgency=low + + * Add simple compile/link/run autopkgtest. + + -- Daniel Kessel Thu, 13 Dec 2012 17:11:45 +0100 + +poppler (0.20.5-0ubuntu2) raring; urgency=low + + * debian/patches/git_mask_segfault.patch: + - don't segfault in setSoftMaskFromImageMask (lp: #1034229) + * debian/patches/git_no_buggy_check.patch: + "Don't do a check for sanity that then we don't use" (lp: #1020162) + + -- Sebastien Bacher Mon, 03 Dec 2012 18:47:40 +0100 + +poppler (0.20.5-0ubuntu1) raring; urgency=low + + * New upstream release + + -- Robert Ancell Wed, 14 Nov 2012 14:50:48 +1300 + +poppler (0.20.4-1) experimental; urgency=low + + * New upstream release. + * Rename packages according to the new SONAMEs: + - libpoppler27 -> libpoppler28 + * Add few optional symbols to the libpoppler-qt4-4 symbols file. + * Rename docs to libpoppler28.docs to make sure it is used only for + libpoppler. + + -- Pino Toscano Sun, 23 Sep 2012 17:03:39 +0200 + +poppler (0.20.4-0ubuntu2) raring; urgency=low + + * debian/patches/git_gouraud_shading_support.patch: (LP: #1072129) + - Evince crashes after opening certain PDF file because parameterized + Gouraud shading is not supported. + + -- Matthieu Baerts (matttbe) Sat, 10 Nov 2012 16:51:12 +0100 + +poppler (0.20.4-0ubuntu1) quantal; urgency=low + + * New upstream bugfix release + * debian/control: + * debian/rules: + * debian/libpoppler28.install: + - libpoppler27 -> libpoppler28 + + -- Robert Ancell Wed, 12 Sep 2012 10:53:15 +1200 + +poppler (0.20.3-2ubuntu1) quantal; urgency=low + + * Merge with Debian to resolve armel FTBFS, remaining changes: + - Drop libopenjpeg-dev build depends, it's in universe. + - Lower poppler-data to Suggests, it's too big for CD images, + handled by language-selector. + - Have libpoppler-dev Depend on libpoppler-private-dev, to help with + the transition after the split of the two packages (inherited from + Debian). + * Add one more optional symbol to libpoppler-qt4-4 symbols file to + account for armel toolchain differences between Debian and Ubuntu. + + -- Adam Conrad Thu, 16 Aug 2012 04:20:31 -0600 + +poppler (0.20.3-2) experimental; urgency=low + + * Adapt the libpoppler-qt4-4 symbols file to the internal symbols exported + only with GCC 4.7, and to other templinst arm* symbols. + + -- Pino Toscano Tue, 14 Aug 2012 01:08:12 +0200 + +poppler (0.20.3-1ubuntu1) quantal; urgency=low + + * Merge with Debian, remaining Ubuntu changes: + * debian/control: + - Drop libopenjpeg-dev build depends, it's in universe. + - Lower poppler-data to Suggests, it's too big for CD images, + handled by language-selector. + - Have libpoppler-dev Depend on libpoppler-private-dev, to help with + the transition after the split of the two packages (inherited from + Debian). + + -- Robert Ancell Tue, 14 Aug 2012 13:11:05 +1200 + +poppler (0.20.3-1) experimental; urgency=low + + * New upstream release. + * Rename packages according to the new SONAMEs: + - libpoppler26 -> libpoppler27 + * Update copyright. + * Remove from libpoppler-private-dev the headers we used to install manually + but which are not installed by the upstream sources: + - ArthurOutputDev.h + - CairoFontEngine.h + - CairoOutputDev.h + - DCTStream.h + - JPEG2000Stream.h + - PageLabelInfo.h + using them would have meant not compiling with upstream sources anyway. + * Remove the libopenjpeg-dev suggest from libpoppler-private-dev, since now + there are no more headers including openjpeg headers. + * Add a symbols file for libpoppler-qt4-4, based on poppler 0.20.1: + - add patch qt4-visibility.diff to enable the GCC hidden visibility, + and avoid exporting private symbols + - set the current poppler version as version for the remaining private + symbols + - stop invoking dh_makeshlibs manually for libpoppler-qt4-4 + + -- Pino Toscano Sat, 11 Aug 2012 12:13:20 +0200 + +poppler (0.20.2-2ubuntu2) quantal; urgency=low + + * debian/control: + - Have libpoppler-dev Depend on libpoppler-private-dev, to help with + the transition after the split of the two packages (inherited from + Debian). + + -- Michael Terry Wed, 18 Jul 2012 12:38:24 -0400 + +poppler (0.20.2-2ubuntu1) quantal; urgency=low + + * Merge with Debian, remaining Ubuntu changes: + * debian/control: + - Drop libopenjpeg-dev build depends, it's in universe. + - Lower poppler-data to Suggests, it's too big for CD images, + handled by language-selector. + + -- Iain Lane Mon, 16 Jul 2012 15:25:44 +0100 + +poppler (0.20.2-2) experimental; urgency=low + + * Raise the version of the libpoppler-private-dev breaks/replaces against + libpoppler-dev to << 0.20.2. (Closes: #681313) + + -- Pino Toscano Thu, 12 Jul 2012 12:19:17 +0200 + +poppler (0.20.2-1) experimental; urgency=low + + * New upstream release. + * Merge changes from 0.18.4-3: + - upstream_cairo-use-correct-userfont-font-bbox.patch: drop, backported + - upstream_Change-nnnnnn-to-number.patch: drop, backported + - upstream_pdfinfo-decode-utf-16-surrogate-pairs.patch: drop, backported + * Update copyright. + + -- Pino Toscano Wed, 11 Jul 2012 23:51:35 +0200 + +poppler (0.20.1-1ubuntu2) quantal; urgency=low + + * debian/control: + - Build-Depend on libtiff5-dev + + -- Michael Terry Tue, 10 Jul 2012 09:27:55 -0400 + +poppler (0.20.1-1ubuntu1) quantal; urgency=low + + * Merge with Debian, remaining Ubuntu changes: + * debian/control: + - Drop libopenjpeg-dev build depends, it's in universe. + - Lower poppler-data to Suggests, it's too big for CD images, + handled by language-selector. + + -- Robert Ancell Fri, 22 Jun 2012 14:50:04 +1200 + +poppler (0.20.1-1) experimental; urgency=low + + * New upstream release. + * Rename packages according to the new SONAMEs: + - libpoppler19 -> libpoppler26 + - libpoppler-qt4-3 -> libpoppler-qt4-4 + * Bump shlibs for libpoppler-qt4-4. + * Update copyright. + * Update build dependencies: + - Switch liblcms1-dev to liblcms2-dev, supported upstream now. + * debian/patches: + - ltmain-as-needed.diff: refresh + * Add pdfdetach in the description of poppler-utils. + * Add a symbols file for libpoppler-glib8, based on poppler 0.18; + the C++ symbols (internal) of it now have the current poppler version + as version. + + -- Pino Toscano Mon, 11 Jun 2012 15:14:29 +0200 + +poppler (0.20.0-0ubuntu1) quantal-proposed; urgency=low + + * New upstream release + + -- Robert Ancell Thu, 07 Jun 2012 17:13:58 +1200 + +poppler (0.18.4-3) unstable; urgency=low + + * Finally drop the libfontconfig1-dev dependency from libpoppler-dev, + since now all sources have been fixed. + * Remove an extra colon from the override_dh_auto_clean declaration. + * Move the poppler private headers from libpoppler-dev to + libpoppler-private-dev: + - Add break/replaces in libpoppler-private-dev. + - Drop lintian overrides of libpoppler-private-dev. + - Adjust descriptions of libpoppler-dev and libpoppler-private-dev. + * Backport upstream commit f1e621adbbb74ec709022b2a31195331651c83fa to fix + the glyph drawing with cairo >= 1.12; patch + upstream_cairo-use-correct-userfont-font-bbox.patch. (Closes: #668250) + * Backport upstream commit fde3bed0f400a50f31f1f6bcee44ac1b2c17ddc6 to make + pdfinfo decode UTF-16 surrogate pairs; patch + upstream_pdfinfo-decode-utf-16-surrogate-pairs.patch. (Closes: #525309) + * Backport upstream commit 4eaafe67de79fb63ebf61f031a97bbc0ed6a8891 to fix + the man page of pdftoppm regarding the naming of the output files; + patch upstream_Change-nnnnnn-to-number.patch. (Closes: #495901) + + -- Pino Toscano Thu, 21 Jun 2012 21:38:32 +0200 + +poppler (0.18.4-2) unstable; urgency=low + + * Upload to unstable. + * Enable all the hardening flags. + * Bump to Standards-Version to 3.9.3, no changes required. + * Bump debhelper build dependency to >= 9, since compat 9 is used. + * Set the minimum shlib version of libpoppler19 to the current version. + * Temporarly put back the libfontconfig1-dev dependency to libpoppler-dev, + as there is still one source assuming that dependency. + + -- Pino Toscano Thu, 31 May 2012 15:24:07 +0200 + poppler (0.18.4-1ubuntu2) precise; urgency=low * debian/control: Add back libfontconfig1-dev dependency to libpoppler-dev diff -Nru poppler-0.18.4/debian/control poppler-0.20.5/debian/control --- poppler-0.18.4/debian/control 2012-02-27 07:55:23.000000000 +0000 +++ poppler-0.20.5/debian/control 2013-01-09 10:56:35.000000000 +0000 @@ -2,12 +2,13 @@ Section: devel Priority: optional Maintainer: Ubuntu Developers +XS-Testsuite: autopkgtest XSBC-Original-Maintainer: Loic Minier Uploaders: Josselin Mouette , Dave Beckett , Ross Burton , Pino Toscano -Build-Depends: debhelper (>= 8.9.0), +Build-Depends: debhelper (>= 9), dpkg (>= 1.16.1), autotools-dev, libglib2.0-dev (>= 2.18), @@ -25,12 +26,12 @@ libgirepository1.0-dev (>= 1.31.0-2~), gobject-introspection (>= 1.31.0-2~), libglib2.0-doc -Standards-Version: 3.9.2 +Standards-Version: 3.9.3 Homepage: http://poppler.freedesktop.org/ Vcs-Git: git://git.debian.org/pkg-freedesktop/poppler.git Vcs-Browser: http://git.debian.org/?p=pkg-freedesktop/poppler.git -Package: libpoppler19 +Package: libpoppler28 Architecture: any Section: libs Multi-Arch: same @@ -46,15 +47,15 @@ Package: libpoppler-dev Architecture: any Section: libdevel -Depends: libpoppler19 (= ${binary:Version}), +Depends: libpoppler28 (= ${binary:Version}), + libpoppler-private-dev, ${shlibs:Depends}, - ${misc:Depends}, - libfontconfig1-dev + ${misc:Depends} Description: PDF rendering library -- development files Poppler is a PDF rendering library based on Xpdf PDF viewer. . - This package contains the headers and development libraries needed to - build applications using Poppler. + This package contains the development libraries needed to build applications + using Poppler. Package: libpoppler-private-dev Architecture: any @@ -62,16 +63,15 @@ Depends: libpoppler-dev (= ${binary:Version}), ${misc:Depends} Suggests: libfreetype6-dev, - libopenjpeg-dev, libpng-dev, libtiff-dev +Breaks: libpoppler-dev (<< 0.20.2) +Replaces: libpoppler-dev (<< 0.20.2) Description: PDF rendering library -- private development files Poppler is a PDF rendering library based on Xpdf PDF viewer. . This package contains the private and unstable headers needed to build applications using the private Poppler core library. - (At the moment this package is empty, allowing the migration of sources - to this package instead of libpoppler-dev.) Package: libpoppler-glib8 Architecture: any @@ -116,7 +116,7 @@ It can be used by packages using the GIRepository format to generate dynamic bindings. -Package: libpoppler-qt4-3 +Package: libpoppler-qt4-4 Architecture: any Section: libs Multi-Arch: same @@ -132,7 +132,7 @@ Package: libpoppler-qt4-dev Architecture: any Section: libdevel -Depends: libpoppler-qt4-3 (= ${binary:Version}), +Depends: libpoppler-qt4-4 (= ${binary:Version}), libpoppler-dev (= ${binary:Version}), libqt4-dev (>= 4.4.0), ${shlibs:Depends}, @@ -189,6 +189,7 @@ This package contains command line utilities (based on Poppler) for getting information of PDF documents, convert them to other formats, or manipulate them: + * pdfdetach -- lists or extracts embedded files (attachments) * pdffonts -- font analyzer * pdfimages -- image extractor * pdfinfo -- document information @@ -205,7 +206,7 @@ Section: debug Priority: extra Depends: ${misc:Depends}, - libpoppler19 (= ${binary:Version}) + libpoppler28 (= ${binary:Version}) Description: PDF rendering library -- debugging symbols Poppler is a PDF rendering library based on Xpdf PDF viewer. . diff -Nru poppler-0.18.4/debian/copyright poppler-0.20.5/debian/copyright --- poppler-0.18.4/debian/copyright 2012-02-18 19:08:48.000000000 +0000 +++ poppler-0.20.5/debian/copyright 2013-01-09 10:56:35.000000000 +0000 @@ -17,8 +17,10 @@ Copyright © 2004-2012 Albert Astals Cid Copyright © 2006-2010 Alexander Neundorf Copyright © 2012 Alexander Saprykin + Copyright © 2012 Alexey Pavlov Copyright © 2011 Andrea Canciani Copyright © 2011 Andreas Hartmetz + Copyright © 2012 Anthony Wesley Copyright © 2012 Arseny Solokha Copyright © 2009, 2011 Axel Strübing Copyright © 2008 Boris Toloknov @@ -44,16 +46,21 @@ Copyright © 2011 Edward Jiang Copyright © 2004 Enrico Ros Copyright © 2009 Eric Toombs - Copyright © 1989, 1991, 1994-2009 Free Software Foundation, Inc. - Copyright © 1996-2007 Glyph & Cog, LLC. + Copyright © 2012 Even Rouault + Copyright © 2012 Fabio D'Urso + Copyright © 1989, 1991, 1994-2011 Free Software Foundation, Inc. + Copyright © 2011 Glad Deschrijver + Copyright © 1996-2011 Glyph & Cog, LLC. Copyright © 2009 Glenn Ganz Copyright © 1999-2000 Gueorgui Ovtcharov - Copyright © 2010 Guillermo Amaral + Copyright © 2010, 2012 Guillermo A. Amaral B. Copyright © 2010 Harry Roberts Copyright © 2008 Haruyuki Kawabe Copyright © 2008, 2010-2012 Hib Eris + Copyright © 2012 Horst Prote Copyright © 2008 Hugo Mercier - Copyright © 2012 Igor Slepchin + Copyright © 2011-2012 Igor Slepchin + Copyright © 2012 Ihar Filipau Copyright © 2007 Ilmari Heikkinen Copyright © 2008-2010 Ilya Gorenbein Copyright © 2007-2008 Iñigo Martínez @@ -62,6 +69,7 @@ Copyright © 2009-2010 Jakub Wilk Copyright © 2009 Jan Jockusch Copyright © 2010 Jan Kümmel + Copyright © 2012 Jason Crain Copyright © 2006-2007 Jauco Noordzij Copyright © 2005-2008 Jeff Muizelaar Copyright © Jerry Epplin @@ -79,15 +87,18 @@ Copyright © 2011 Kenji Uno Copyright © 2002 Kitware, Inc. Copyright © 2008 Kjartan Maraas - Copyright © 2007-2009 Koji Otani + Copyright © 2007-2009, 2012 Koji Otani Copyright © 2006-2007 Kouhei Sutou Copyright © 2009 Kovid Goyal Copyright © 2005-2007 Kristian Høgsberg Copyright © 2006-2007 Krzysztof Kowalczyk Copyright © 2006-2007 Laurent Montel + Copyright © 2012 Lu Wang Copyright © 2005 Marco Pesenti Gritti + Copyright © 2012 Mark Brand Copyright © 2008 Mark Kaplan - Copyright © 2010 Mark Riedesel + Copyright © 2010, 2012 Mark Riedesel + Copyright © 2012 Markus Trippelsdorf Copyright © 2005 Martin Kretzschmar Copyright © 2009 Matthias Drochner Copyright © 2010 Matthias Fauconneau @@ -101,10 +112,13 @@ Copyright © 2009 Nick Jones Copyright © 2005-2006 Nickolay V. Shmyrev Copyright © 2010 Nils Höglund + Copyright © 2012 Oliver Sander Copyright © 2010 OSSD CDAC Mumbai by Leena Chourey and Onkar Potdar + Copyright © 2012 Patrick Pfeifer Copyright © 2010 Patrick Spendrin Copyright © 2006 Paul Walmsley Copyright © 2010 Paweł Wiejacha + Copyright © Peter Breitenlohner Copyright © 2009 Peter Kerzum Copyright © 2009 Petr Gajdos Copyright © 2010 Philip Lorenz @@ -131,7 +145,7 @@ Copyright © 2011 Stephen Reichling Copyright © 2006 Steven G. Johnson Copyright © 2011 Steven Murdoc - Copyright © 2010 Suzuki Toshiya + Copyright © 2010, 2012 Suzuki Toshiya Copyright © 2005-2006 Takashi Iwai Copyright © The GLib Team Copyright © 2005-2010 The Poppler Developers @@ -140,15 +154,16 @@ Copyright © 2006 Thorkild Stray Copyright © 2009 Till Kamppeter Copyright © 2008 Timothy Lee - Copyright © 2005 Tobias Koening + Copyright © 2005, 2012 Tobias Koening Copyright © 2011 Tom Gleason Copyright © 2008 Tomas Are Haavet Copyright © 2010-2011 Tomas Hoger Copyright © 2008 Vasile Gaburici + Copyright © 2011 Vittal Aithal Copyright © 2012 Yi Yang Copyright © 2008-2009 Warren Toomey Copyright © 2006 Wilfried Huss - Copyright © 2009-2011 William Bader + Copyright © 2009-2012 William Bader Copyright © 2007 Will Stephenson Copyright © 1994 X Consortium diff -Nru poppler-0.18.4/debian/docs poppler-0.20.5/debian/docs --- poppler-0.18.4/debian/docs 2012-02-10 15:35:34.000000000 +0000 +++ poppler-0.20.5/debian/docs 1970-01-01 00:00:00.000000000 +0000 @@ -1,5 +0,0 @@ -AUTHORS -NEWS -README -README-XPDF -TODO diff -Nru poppler-0.18.4/debian/libpoppler-dev.install poppler-0.20.5/debian/libpoppler-dev.install --- poppler-0.18.4/debian/libpoppler-dev.install 2012-02-12 15:03:58.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-dev.install 2013-01-09 10:56:35.000000000 +0000 @@ -1,16 +1,5 @@ -usr/include/poppler/*.h -usr/include/poppler/fofi/ -usr/include/poppler/goo/ -usr/include/poppler/splash/ usr/lib/*/libpoppler.a usr/lib/*/libpoppler.so usr/lib/*/pkgconfig/poppler.pc usr/lib/*/pkgconfig/poppler-splash.pc usr/lib/*/pkgconfig/poppler-cairo.pc -# private headers not installed -poppler/ArthurOutputDev.h usr/include/poppler/ -poppler/CairoFontEngine.h usr/include/poppler/ -poppler/CairoOutputDev.h usr/include/poppler/ -poppler/DCTStream.h usr/include/poppler/ -poppler/JPEG2000Stream.h usr/include/poppler/ -poppler/PageLabelInfo.h usr/include/poppler/ diff -Nru poppler-0.18.4/debian/libpoppler-glib8.symbols.in poppler-0.20.5/debian/libpoppler-glib8.symbols.in --- poppler-0.18.4/debian/libpoppler-glib8.symbols.in 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-glib8.symbols.in 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,270 @@ +libpoppler-glib.so.8 libpoppler-glib8 #MINVER# +* Build-Depends-Package: libpoppler-glib-dev + (regex)"^_Z.*@Base$" #CURVER# + poppler_action_copy@Base 0.18.0 + poppler_action_free@Base 0.18.0 + poppler_action_get_type@Base 0.18.0 + poppler_action_layer_action_get_type@Base 0.18.0 + poppler_action_movie_operation_get_type@Base 0.18.0 + poppler_action_type_get_type@Base 0.18.0 + poppler_annot_callout_line_copy@Base 0.18.0 + poppler_annot_callout_line_free@Base 0.18.0 + poppler_annot_callout_line_get_type@Base 0.18.0 + poppler_annot_callout_line_new@Base 0.18.0 + poppler_annot_external_data_type_get_type@Base 0.18.0 + poppler_annot_file_attachment_get_attachment@Base 0.18.0 + poppler_annot_file_attachment_get_name@Base 0.18.0 + poppler_annot_file_attachment_get_type@Base 0.18.0 + poppler_annot_flag_get_type@Base 0.18.0 + poppler_annot_free_text_get_callout_line@Base 0.18.0 + poppler_annot_free_text_get_quadding@Base 0.18.0 + poppler_annot_free_text_get_type@Base 0.18.0 + poppler_annot_free_text_quadding_get_type@Base 0.18.0 + poppler_annot_get_annot_type@Base 0.18.0 + poppler_annot_get_color@Base 0.18.0 + poppler_annot_get_contents@Base 0.18.0 + poppler_annot_get_flags@Base 0.18.0 + poppler_annot_get_modified@Base 0.18.0 + poppler_annot_get_name@Base 0.18.0 + poppler_annot_get_page_index@Base 0.18.0 + poppler_annot_get_type@Base 0.18.0 + poppler_annot_mapping_copy@Base 0.18.0 + poppler_annot_mapping_free@Base 0.18.0 + poppler_annot_mapping_get_type@Base 0.18.0 + poppler_annot_mapping_new@Base 0.18.0 + poppler_annot_markup_get_date@Base 0.18.0 + poppler_annot_markup_get_external_data@Base 0.18.0 + poppler_annot_markup_get_label@Base 0.18.0 + poppler_annot_markup_get_opacity@Base 0.18.0 + poppler_annot_markup_get_popup_is_open@Base 0.18.0 + poppler_annot_markup_get_popup_rectangle@Base 0.18.0 + poppler_annot_markup_get_reply_to@Base 0.18.0 + poppler_annot_markup_get_subject@Base 0.18.0 + poppler_annot_markup_get_type@Base 0.18.0 + poppler_annot_markup_has_popup@Base 0.18.0 + poppler_annot_markup_reply_type_get_type@Base 0.18.0 + poppler_annot_markup_set_label@Base 0.18.0 + poppler_annot_markup_set_opacity@Base 0.18.0 + poppler_annot_markup_set_popup@Base 0.18.0 + poppler_annot_markup_set_popup_is_open@Base 0.18.0 + poppler_annot_movie_get_movie@Base 0.18.0 + poppler_annot_movie_get_title@Base 0.18.0 + poppler_annot_movie_get_type@Base 0.18.0 + poppler_annot_screen_get_action@Base 0.18.0 + poppler_annot_screen_get_type@Base 0.18.0 + poppler_annot_set_color@Base 0.18.0 + poppler_annot_set_contents@Base 0.18.0 + poppler_annot_text_get_icon@Base 0.18.0 + poppler_annot_text_get_is_open@Base 0.18.0 + poppler_annot_text_get_state@Base 0.18.0 + poppler_annot_text_get_type@Base 0.18.0 + poppler_annot_text_new@Base 0.18.0 + poppler_annot_text_set_icon@Base 0.18.0 + poppler_annot_text_set_is_open@Base 0.18.0 + poppler_annot_text_state_get_type@Base 0.18.0 + poppler_annot_type_get_type@Base 0.18.0 + poppler_attachment_get_type@Base 0.18.0 + poppler_attachment_save@Base 0.18.0 + poppler_attachment_save_to_callback@Base 0.18.0 + poppler_backend_get_type@Base 0.18.0 + poppler_color_copy@Base 0.18.0 + poppler_color_free@Base 0.18.0 + poppler_color_get_type@Base 0.18.0 + poppler_color_new@Base 0.18.0 + poppler_date_parse@Base 0.18.0 + poppler_dest_copy@Base 0.18.0 + poppler_dest_free@Base 0.18.0 + poppler_dest_get_type@Base 0.18.0 + poppler_dest_type_get_type@Base 0.18.0 + poppler_document_find_dest@Base 0.18.0 + poppler_document_get_attachments@Base 0.18.0 + poppler_document_get_author@Base 0.18.0 + poppler_document_get_creation_date@Base 0.18.0 + poppler_document_get_creator@Base 0.18.0 + poppler_document_get_form_field@Base 0.18.0 + poppler_document_get_id@Base 0.18.0 + poppler_document_get_keywords@Base 0.18.0 + poppler_document_get_metadata@Base 0.18.0 + poppler_document_get_modification_date@Base 0.18.0 + poppler_document_get_n_attachments@Base 0.18.0 + poppler_document_get_n_pages@Base 0.18.0 + poppler_document_get_page@Base 0.18.0 + poppler_document_get_page_by_label@Base 0.18.0 + poppler_document_get_page_layout@Base 0.18.0 + poppler_document_get_page_mode@Base 0.18.0 + poppler_document_get_pdf_version@Base 0.18.0 + poppler_document_get_pdf_version_string@Base 0.18.0 + poppler_document_get_permissions@Base 0.18.0 + poppler_document_get_producer@Base 0.18.0 + poppler_document_get_subject@Base 0.18.0 + poppler_document_get_title@Base 0.18.0 + poppler_document_get_type@Base 0.18.0 + poppler_document_has_attachments@Base 0.18.0 + poppler_document_is_linearized@Base 0.18.0 + poppler_document_new_from_data@Base 0.18.0 + poppler_document_new_from_file@Base 0.18.0 + poppler_document_save@Base 0.18.0 + poppler_document_save_a_copy@Base 0.18.0 + poppler_error_get_type@Base 0.18.0 + poppler_error_quark@Base 0.18.0 + poppler_font_info_free@Base 0.18.0 + poppler_font_info_get_type@Base 0.18.0 + poppler_font_info_new@Base 0.18.0 + poppler_font_info_scan@Base 0.18.0 + poppler_font_type_get_type@Base 0.18.0 + poppler_fonts_iter_copy@Base 0.18.0 + poppler_fonts_iter_free@Base 0.18.0 + poppler_fonts_iter_get_encoding@Base 0.20.1 + poppler_fonts_iter_get_file_name@Base 0.18.0 + poppler_fonts_iter_get_font_type@Base 0.18.0 + poppler_fonts_iter_get_full_name@Base 0.18.0 + poppler_fonts_iter_get_name@Base 0.18.0 + poppler_fonts_iter_get_substitute_name@Base 0.20.1 + poppler_fonts_iter_get_type@Base 0.18.0 + poppler_fonts_iter_is_embedded@Base 0.18.0 + poppler_fonts_iter_is_subset@Base 0.18.0 + poppler_fonts_iter_next@Base 0.18.0 + poppler_form_button_type_get_type@Base 0.18.0 + poppler_form_choice_type_get_type@Base 0.18.0 + poppler_form_field_button_get_button_type@Base 0.18.0 + poppler_form_field_button_get_state@Base 0.18.0 + poppler_form_field_button_set_state@Base 0.18.0 + poppler_form_field_choice_can_select_multiple@Base 0.18.0 + poppler_form_field_choice_commit_on_change@Base 0.18.0 + poppler_form_field_choice_do_spell_check@Base 0.18.0 + poppler_form_field_choice_get_choice_type@Base 0.18.0 + poppler_form_field_choice_get_item@Base 0.18.0 + poppler_form_field_choice_get_n_items@Base 0.18.0 + poppler_form_field_choice_get_text@Base 0.18.0 + poppler_form_field_choice_is_editable@Base 0.18.0 + poppler_form_field_choice_is_item_selected@Base 0.18.0 + poppler_form_field_choice_select_item@Base 0.18.0 + poppler_form_field_choice_set_text@Base 0.18.0 + poppler_form_field_choice_toggle_item@Base 0.18.0 + poppler_form_field_choice_unselect_all@Base 0.18.0 + poppler_form_field_get_action@Base 0.18.0 + poppler_form_field_get_field_type@Base 0.18.0 + poppler_form_field_get_font_size@Base 0.18.0 + poppler_form_field_get_id@Base 0.18.0 + poppler_form_field_get_mapping_name@Base 0.18.0 + poppler_form_field_get_name@Base 0.18.0 + poppler_form_field_get_partial_name@Base 0.18.0 + poppler_form_field_get_type@Base 0.18.0 + poppler_form_field_is_read_only@Base 0.18.0 + poppler_form_field_mapping_copy@Base 0.18.0 + poppler_form_field_mapping_free@Base 0.18.0 + poppler_form_field_mapping_get_type@Base 0.18.0 + poppler_form_field_mapping_new@Base 0.18.0 + poppler_form_field_text_do_scroll@Base 0.18.0 + poppler_form_field_text_do_spell_check@Base 0.18.0 + poppler_form_field_text_get_max_len@Base 0.18.0 + poppler_form_field_text_get_text@Base 0.18.0 + poppler_form_field_text_get_text_type@Base 0.18.0 + poppler_form_field_text_is_password@Base 0.18.0 + poppler_form_field_text_is_rich_text@Base 0.18.0 + poppler_form_field_text_set_text@Base 0.18.0 + poppler_form_field_type_get_type@Base 0.18.0 + poppler_form_text_type_get_type@Base 0.18.0 + poppler_get_backend@Base 0.18.0 + poppler_get_version@Base 0.18.0 + poppler_image_mapping_copy@Base 0.18.0 + poppler_image_mapping_free@Base 0.18.0 + poppler_image_mapping_get_type@Base 0.18.0 + poppler_image_mapping_new@Base 0.18.0 + poppler_index_iter_copy@Base 0.18.0 + poppler_index_iter_free@Base 0.18.0 + poppler_index_iter_get_action@Base 0.18.0 + poppler_index_iter_get_child@Base 0.18.0 + poppler_index_iter_get_type@Base 0.18.0 + poppler_index_iter_is_open@Base 0.18.0 + poppler_index_iter_new@Base 0.18.0 + poppler_index_iter_next@Base 0.18.0 + poppler_layer_get_radio_button_group_id@Base 0.18.0 + poppler_layer_get_title@Base 0.18.0 + poppler_layer_get_type@Base 0.18.0 + poppler_layer_hide@Base 0.18.0 + poppler_layer_is_parent@Base 0.18.0 + poppler_layer_is_visible@Base 0.18.0 + poppler_layer_show@Base 0.18.0 + poppler_layers_iter_copy@Base 0.18.0 + poppler_layers_iter_free@Base 0.18.0 + poppler_layers_iter_get_child@Base 0.18.0 + poppler_layers_iter_get_layer@Base 0.18.0 + poppler_layers_iter_get_title@Base 0.18.0 + poppler_layers_iter_get_type@Base 0.18.0 + poppler_layers_iter_new@Base 0.18.0 + poppler_layers_iter_next@Base 0.18.0 + poppler_link_mapping_copy@Base 0.18.0 + poppler_link_mapping_free@Base 0.18.0 + poppler_link_mapping_get_type@Base 0.18.0 + poppler_link_mapping_new@Base 0.18.0 + poppler_media_get_filename@Base 0.18.0 + poppler_media_get_mime_type@Base 0.18.0 + poppler_media_get_type@Base 0.18.0 + poppler_media_is_embedded@Base 0.18.0 + poppler_media_save@Base 0.18.0 + poppler_media_save_to_callback@Base 0.18.0 + poppler_movie_get_filename@Base 0.18.0 + poppler_movie_get_type@Base 0.18.0 + poppler_movie_need_poster@Base 0.18.0 + poppler_movie_show_controls@Base 0.18.0 + poppler_orientation_get_type@Base 0.18.0 + poppler_page_add_annot@Base 0.18.0 + poppler_page_find_text@Base 0.18.0 + poppler_page_free_annot_mapping@Base 0.18.0 + poppler_page_free_form_field_mapping@Base 0.18.0 + poppler_page_free_image_mapping@Base 0.18.0 + poppler_page_free_link_mapping@Base 0.18.0 + poppler_page_free_text_attributes@Base 0.18.0 + poppler_page_get_annot_mapping@Base 0.18.0 + poppler_page_get_crop_box@Base 0.18.0 + poppler_page_get_duration@Base 0.18.0 + poppler_page_get_form_field_mapping@Base 0.18.0 + poppler_page_get_image@Base 0.18.0 + poppler_page_get_image_mapping@Base 0.18.0 + poppler_page_get_index@Base 0.18.0 + poppler_page_get_label@Base 0.18.0 + poppler_page_get_link_mapping@Base 0.18.0 + poppler_page_get_selected_region@Base 0.18.0 + poppler_page_get_selected_text@Base 0.18.0 + poppler_page_get_selection_region@Base 0.18.0 + poppler_page_get_size@Base 0.18.0 + poppler_page_get_text@Base 0.18.0 + poppler_page_get_text_attributes@Base 0.18.0 + poppler_page_get_text_layout@Base 0.18.0 + poppler_page_get_thumbnail@Base 0.18.0 + poppler_page_get_thumbnail_size@Base 0.18.0 + poppler_page_get_transition@Base 0.18.0 + poppler_page_get_type@Base 0.18.0 + poppler_page_layout_get_type@Base 0.18.0 + poppler_page_mode_get_type@Base 0.18.0 + poppler_page_render@Base 0.18.0 + poppler_page_render_for_printing@Base 0.18.0 + poppler_page_render_for_printing_with_options@Base 0.18.0 + poppler_page_render_selection@Base 0.18.0 + poppler_page_render_to_ps@Base 0.18.0 + poppler_page_selection_region_free@Base 0.18.0 + poppler_page_transition_alignment_get_type@Base 0.18.0 + poppler_page_transition_copy@Base 0.18.0 + poppler_page_transition_direction_get_type@Base 0.18.0 + poppler_page_transition_free@Base 0.18.0 + poppler_page_transition_get_type@Base 0.18.0 + poppler_page_transition_new@Base 0.18.0 + poppler_page_transition_type_get_type@Base 0.18.0 + poppler_permissions_get_type@Base 0.18.0 + poppler_print_flags_get_type@Base 0.18.0 + poppler_ps_file_free@Base 0.18.0 + poppler_ps_file_get_type@Base 0.18.0 + poppler_ps_file_new@Base 0.18.0 + poppler_ps_file_set_duplex@Base 0.18.0 + poppler_ps_file_set_paper_size@Base 0.18.0 + poppler_rectangle_copy@Base 0.18.0 + poppler_rectangle_free@Base 0.18.0 + poppler_rectangle_get_type@Base 0.18.0 + poppler_rectangle_new@Base 0.18.0 + poppler_selection_style_get_type@Base 0.18.0 + poppler_text_attributes_copy@Base 0.18.0 + poppler_text_attributes_free@Base 0.18.0 + poppler_text_attributes_get_type@Base 0.18.0 + poppler_text_attributes_new@Base 0.18.0 + poppler_viewer_preferences_get_type@Base 0.18.0 diff -Nru poppler-0.18.4/debian/libpoppler-private-dev.install poppler-0.20.5/debian/libpoppler-private-dev.install --- poppler-0.18.4/debian/libpoppler-private-dev.install 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-private-dev.install 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,4 @@ +usr/include/poppler/*.h +usr/include/poppler/fofi/ +usr/include/poppler/goo/ +usr/include/poppler/splash/ diff -Nru poppler-0.18.4/debian/libpoppler-private-dev.lintian-overrides poppler-0.20.5/debian/libpoppler-private-dev.lintian-overrides --- poppler-0.18.4/debian/libpoppler-private-dev.lintian-overrides 2012-02-10 18:48:26.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-private-dev.lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1,3 +0,0 @@ -# temporarly empty package to ease migrations from libpoppler-dev to it -libpoppler-private-dev: empty-binary-package -libpoppler-private-dev: package-contains-no-arch-dependent-files diff -Nru poppler-0.18.4/debian/libpoppler-qt4-3.install poppler-0.20.5/debian/libpoppler-qt4-3.install --- poppler-0.18.4/debian/libpoppler-qt4-3.install 2012-02-12 15:04:14.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-qt4-3.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libpoppler-qt4.so.3* diff -Nru poppler-0.18.4/debian/libpoppler-qt4-4.install poppler-0.20.5/debian/libpoppler-qt4-4.install --- poppler-0.18.4/debian/libpoppler-qt4-4.install 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-qt4-4.install 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libpoppler-qt4.so.4* diff -Nru poppler-0.18.4/debian/libpoppler-qt4-4.symbols.in poppler-0.20.5/debian/libpoppler-qt4-4.symbols.in --- poppler-0.18.4/debian/libpoppler-qt4-4.symbols.in 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler-qt4-4.symbols.in 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,756 @@ +libpoppler-qt4.so.4 libpoppler-qt4-4 #MINVER# +* Build-Depends-Package: libpoppler-qt4-dev + (regex)"^_Z.*15ArthurOutputDev.*@Base$" #CURVER# + (regex)"^_Z.*19SplashOutFontFileID.*@Base$" #CURVER# + _ZN9OutputDev11processLinkEP9AnnotLink@Base #CURVER# + _ZN7Poppler10Annotation11setBoundaryERK6QRectF@Base 0.20.1 + _ZN7Poppler10Annotation11setContentsERK7QString@Base 0.20.1 + _ZN7Poppler10Annotation13setUniqueNameERK7QString@Base 0.20.1 + _ZN7Poppler10Annotation15setCreationDateERK9QDateTime@Base 0.20.1 + _ZN7Poppler10Annotation19setModificationDateERK9QDateTime@Base 0.20.1 + _ZN7Poppler10Annotation5Popup10setSummaryERK7QString@Base 0.20.1 + _ZN7Poppler10Annotation5Popup11setGeometryERK6QRectF@Base 0.20.1 + (optional=gccinternal)_ZN7Poppler10Annotation5Popup7PrivateC1ERKS2_@Base 0.20.1 + (optional=gccinternal)_ZN7Poppler10Annotation5Popup7PrivateC2ERKS2_@Base 0.20.1 + (optional=gccinternal)_ZN7Poppler10Annotation5Popup7PrivateD1Ev@Base 0.20.1 + (optional=gccinternal)_ZN7Poppler10Annotation5Popup7PrivateD2Ev@Base 0.20.1 + _ZN7Poppler10Annotation5Popup7setTextERK7QString@Base 0.20.1 + _ZN7Poppler10Annotation5Popup8setFlagsEi@Base 0.20.1 + _ZN7Poppler10Annotation5Popup8setTitleERK7QString@Base 0.20.1 + _ZN7Poppler10Annotation5PopupC1ERKS1_@Base 0.20.1 + _ZN7Poppler10Annotation5PopupC1Ev@Base 0.20.1 + _ZN7Poppler10Annotation5PopupC2ERKS1_@Base 0.20.1 + _ZN7Poppler10Annotation5PopupC2Ev@Base 0.20.1 + _ZN7Poppler10Annotation5PopupD1Ev@Base 0.20.1 + _ZN7Poppler10Annotation5PopupD2Ev@Base 0.20.1 + _ZN7Poppler10Annotation5PopupaSERKS1_@Base 0.20.1 + _ZN7Poppler10Annotation5Style10setOpacityEd@Base 0.20.1 + _ZN7Poppler10Annotation5Style11setXCornersEd@Base 0.20.1 + _ZN7Poppler10Annotation5Style11setYCornersEd@Base 0.20.1 + _ZN7Poppler10Annotation5Style12setDashArrayERK7QVectorIdE@Base 0.20.1 + _ZN7Poppler10Annotation5Style12setLineStyleENS0_9LineStyleE@Base 0.20.1 + _ZN7Poppler10Annotation5Style13setLineEffectENS0_10LineEffectE@Base 0.20.1 + _ZN7Poppler10Annotation5Style18setEffectIntensityEd@Base 0.20.1 + (optional=gccinternal)_ZN7Poppler10Annotation5Style7PrivateC1ERKS2_@Base 0.20.1 + (optional=gccinternal)_ZN7Poppler10Annotation5Style7PrivateC2ERKS2_@Base 0.20.1 + _ZN7Poppler10Annotation5Style8setColorERK6QColor@Base 0.20.1 + _ZN7Poppler10Annotation5Style8setWidthEd@Base 0.20.1 + _ZN7Poppler10Annotation5StyleC1ERKS1_@Base 0.20.1 + _ZN7Poppler10Annotation5StyleC1Ev@Base 0.20.1 + _ZN7Poppler10Annotation5StyleC2ERKS1_@Base 0.20.1 + _ZN7Poppler10Annotation5StyleC2Ev@Base 0.20.1 + _ZN7Poppler10Annotation5StyleD1Ev@Base 0.20.1 + _ZN7Poppler10Annotation5StyleD2Ev@Base 0.20.1 + _ZN7Poppler10Annotation5StyleaSERKS1_@Base 0.20.1 + _ZN7Poppler10Annotation8setFlagsEi@Base 0.20.1 + _ZN7Poppler10Annotation8setPopupERKNS0_5PopupE@Base 0.20.1 + _ZN7Poppler10Annotation8setStyleERKNS0_5StyleE@Base 0.20.1 + _ZN7Poppler10Annotation9setAuthorERK7QString@Base 0.20.1 + _ZN7Poppler10AnnotationC1ERNS_17AnnotationPrivateE@Base 0.20.1 + _ZN7Poppler10AnnotationC1ERNS_17AnnotationPrivateERK8QDomNode@Base 0.20.1 + _ZN7Poppler10AnnotationC2ERNS_17AnnotationPrivateE@Base 0.20.1 + _ZN7Poppler10AnnotationC2ERNS_17AnnotationPrivateERK8QDomNode@Base 0.20.1 + _ZN7Poppler10AnnotationD0Ev@Base 0.20.1 + _ZN7Poppler10AnnotationD1Ev@Base 0.20.1 + _ZN7Poppler10AnnotationD2Ev@Base 0.20.1 + _ZN7Poppler10LinkActionC1ERK6QRectFNS0_10ActionTypeE@Base 0.20.1 + _ZN7Poppler10LinkActionC2ERK6QRectFNS0_10ActionTypeE@Base 0.20.1 + _ZN7Poppler10LinkActionD0Ev@Base 0.20.1 + _ZN7Poppler10LinkActionD1Ev@Base 0.20.1 + _ZN7Poppler10LinkActionD2Ev@Base 0.20.1 + _ZN7Poppler10LinkBrowseC1ERK6QRectFRK7QString@Base 0.20.1 + _ZN7Poppler10LinkBrowseC2ERK6QRectFRK7QString@Base 0.20.1 + _ZN7Poppler10LinkBrowseD0Ev@Base 0.20.1 + _ZN7Poppler10LinkBrowseD1Ev@Base 0.20.1 + _ZN7Poppler10LinkBrowseD2Ev@Base 0.20.1 + _ZN7Poppler11LinkExecuteC1ERK6QRectFRK7QStringS6_@Base 0.20.1 + _ZN7Poppler11LinkExecuteC2ERK6QRectFRK7QStringS6_@Base 0.20.1 + _ZN7Poppler11LinkExecuteD0Ev@Base 0.20.1 + _ZN7Poppler11LinkExecuteD1Ev@Base 0.20.1 + _ZN7Poppler11LinkExecuteD2Ev@Base 0.20.1 + _ZN7Poppler11MovieObjectC1EP10AnnotMovie@Base 0.20.1 + _ZN7Poppler11MovieObjectC2EP10AnnotMovie@Base 0.20.1 + _ZN7Poppler11MovieObjectD1Ev@Base 0.20.1 + _ZN7Poppler11MovieObjectD2Ev@Base 0.20.1 + _ZN7Poppler11PSConverter11setPageListERK5QListIiE@Base 0.20.1 + _ZN7Poppler11PSConverter12setPSOptionsE6QFlagsINS0_8PSOptionEE@Base 0.20.1 + _ZN7Poppler11PSConverter12setTopMarginEi@Base 0.20.1 + _ZN7Poppler11PSConverter13setLeftMarginEi@Base 0.20.1 + _ZN7Poppler11PSConverter13setPaperWidthEi@Base 0.20.1 + _ZN7Poppler11PSConverter14setPaperHeightEi@Base 0.20.1 + _ZN7Poppler11PSConverter14setRightMarginEi@Base 0.20.1 + _ZN7Poppler11PSConverter15setBottomMarginEi@Base 0.20.1 + _ZN7Poppler11PSConverter16setStrictMarginsEb@Base 0.20.1 + _ZN7Poppler11PSConverter17setForceRasterizeEb@Base 0.20.1 + _ZN7Poppler11PSConverter24setPageConvertedCallbackEPFviPvES1_@Base 0.20.1 + _ZN7Poppler11PSConverter7convertEv@Base 0.20.1 + _ZN7Poppler11PSConverter7setHDPIEd@Base 0.20.1 + _ZN7Poppler11PSConverter7setVDPIEd@Base 0.20.1 + _ZN7Poppler11PSConverter8setTitleERK7QString@Base 0.20.1 + _ZN7Poppler11PSConverter9setRotateEi@Base 0.20.1 + _ZN7Poppler11PSConverterC1EPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler11PSConverterC2EPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler11PSConverterD0Ev@Base 0.20.1 + _ZN7Poppler11PSConverterD1Ev@Base 0.20.1 + _ZN7Poppler11PSConverterD2Ev@Base 0.20.1 + _ZN7Poppler11SoundObjectC1EP5Sound@Base 0.20.1 + _ZN7Poppler11SoundObjectC2EP5Sound@Base 0.20.1 + _ZN7Poppler11SoundObjectD1Ev@Base 0.20.1 + _ZN7Poppler11SoundObjectD2Ev@Base 0.20.1 + _ZN7Poppler11convertDateEPc@Base 0.20.1 + _ZN7Poppler12EmbeddedFile4dataEv@Base 0.20.1 + _ZN7Poppler12EmbeddedFileC1EP7EmbFile@Base 0.20.1 + _ZN7Poppler12EmbeddedFileC1ERNS_16EmbeddedFileDataE@Base 0.20.1 + _ZN7Poppler12EmbeddedFileC2EP7EmbFile@Base 0.20.1 + _ZN7Poppler12EmbeddedFileC2ERNS_16EmbeddedFileDataE@Base 0.20.1 + _ZN7Poppler12EmbeddedFileD1Ev@Base 0.20.1 + _ZN7Poppler12EmbeddedFileD2Ev@Base 0.20.1 + _ZN7Poppler12FontIterator4nextEv@Base 0.20.1 + _ZN7Poppler12FontIteratorC1EiPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler12FontIteratorC2EiPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler12FontIteratorD1Ev@Base 0.20.1 + _ZN7Poppler12FontIteratorD2Ev@Base 0.20.1 + _ZN7Poppler12PDFConverter13setPDFOptionsE6QFlagsINS0_9PDFOptionEE@Base 0.20.1 + _ZN7Poppler12PDFConverter7convertEv@Base 0.20.1 + _ZN7Poppler12PDFConverterC1EPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler12PDFConverterC2EPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler12PDFConverterD0Ev@Base 0.20.1 + _ZN7Poppler12PDFConverterD1Ev@Base 0.20.1 + _ZN7Poppler12PDFConverterD2Ev@Base 0.20.1 + _ZN7Poppler13BaseConverter15setOutputDeviceEP9QIODevice@Base 0.20.1 + _ZN7Poppler13BaseConverter17setOutputFileNameERK7QString@Base 0.20.1 + _ZN7Poppler13BaseConverterC1ERNS_20BaseConverterPrivateE@Base 0.20.1 + _ZN7Poppler13BaseConverterC2ERNS_20BaseConverterPrivateE@Base 0.20.1 + _ZN7Poppler13BaseConverterD0Ev@Base 0.20.1 + _ZN7Poppler13BaseConverterD1Ev@Base 0.20.1 + _ZN7Poppler13BaseConverterD2Ev@Base 0.20.1 + _ZN7Poppler13FormFieldText7setTextERK7QString@Base 0.20.1 + _ZN7Poppler13FormFieldTextC1EPNS_12DocumentDataEP4PageP14FormWidgetText@Base 0.20.1 + _ZN7Poppler13FormFieldTextC2EPNS_12DocumentDataEP4PageP14FormWidgetText@Base 0.20.1 + _ZN7Poppler13FormFieldTextD0Ev@Base 0.20.1 + _ZN7Poppler13FormFieldTextD1Ev@Base 0.20.1 + _ZN7Poppler13FormFieldTextD2Ev@Base 0.20.1 + _ZN7Poppler13InkAnnotation11setInkPathsERK5QListI11QLinkedListI7QPointFEE@Base 0.20.1 + _ZN7Poppler13InkAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler13InkAnnotationC1ERNS_20InkAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler13InkAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler13InkAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler13InkAnnotationC2ERNS_20InkAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler13InkAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler13InkAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler13InkAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler13InkAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler13LinkRenditionC1ERK6QRectFP14MediaRendition@Base 0.20.1 + _ZN7Poppler13LinkRenditionC2ERK6QRectFP14MediaRendition@Base 0.20.1 + _ZN7Poppler13LinkRenditionD0Ev@Base 0.20.1 + _ZN7Poppler13LinkRenditionD1Ev@Base 0.20.1 + _ZN7Poppler13LinkRenditionD2Ev@Base 0.20.1 + _ZN7Poppler14GeomAnnotation11setGeomTypeENS0_8GeomTypeE@Base 0.20.1 + _ZN7Poppler14GeomAnnotation17setGeomInnerColorERK6QColor@Base 0.20.1 + _ZN7Poppler14GeomAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14GeomAnnotationC1ERNS_21GeomAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14GeomAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler14GeomAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14GeomAnnotationC2ERNS_21GeomAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14GeomAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler14GeomAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler14GeomAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler14GeomAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler14LineAnnotation11setLineTypeENS0_8LineTypeE@Base 0.20.1 + _ZN7Poppler14LineAnnotation13setLineClosedEb@Base 0.20.1 + _ZN7Poppler14LineAnnotation13setLineIntentENS0_10LineIntentE@Base 0.20.1 + _ZN7Poppler14LineAnnotation13setLinePointsERK11QLinkedListI7QPointFE@Base 0.20.1 + _ZN7Poppler14LineAnnotation15setLineEndStyleENS0_9TermStyleE@Base 0.20.1 + _ZN7Poppler14LineAnnotation17setLineInnerColorERK6QColor@Base 0.20.1 + _ZN7Poppler14LineAnnotation17setLineStartStyleENS0_9TermStyleE@Base 0.20.1 + _ZN7Poppler14LineAnnotation18setLineShowCaptionEb@Base 0.20.1 + _ZN7Poppler14LineAnnotation23setLineLeadingBackPointEd@Base 0.20.1 + _ZN7Poppler14LineAnnotation26setLineLeadingForwardPointEd@Base 0.20.1 + _ZN7Poppler14LineAnnotationC1ENS0_8LineTypeE@Base 0.20.1 + _ZN7Poppler14LineAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14LineAnnotationC1ERNS_21LineAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14LineAnnotationC2ENS0_8LineTypeE@Base 0.20.1 + _ZN7Poppler14LineAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14LineAnnotationC2ERNS_21LineAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14LineAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler14LineAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler14LineAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler14LinkAnnotation18setLinkDestinationEPNS_4LinkE@Base 0.20.1 + _ZN7Poppler14LinkAnnotation18setLinkRegionPointEiRK7QPointF@Base 0.20.1 + _ZN7Poppler14LinkAnnotation20setLinkHighlightModeENS0_13HighlightModeE@Base 0.20.1 + _ZN7Poppler14LinkAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14LinkAnnotationC1ERNS_21LinkAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14LinkAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler14LinkAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14LinkAnnotationC2ERNS_21LinkAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14LinkAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler14LinkAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler14LinkAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler14LinkAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler14LinkJavaScriptC1ERK6QRectFRK7QString@Base 0.20.1 + _ZN7Poppler14LinkJavaScriptC2ERK6QRectFRK7QString@Base 0.20.1 + _ZN7Poppler14LinkJavaScriptD0Ev@Base 0.20.1 + _ZN7Poppler14LinkJavaScriptD1Ev@Base 0.20.1 + _ZN7Poppler14LinkJavaScriptD2Ev@Base 0.20.1 + _ZN7Poppler14MediaRenditionC1EP14MediaRendition@Base 0.20.1 + _ZN7Poppler14MediaRenditionC2EP14MediaRendition@Base 0.20.1 + _ZN7Poppler14MediaRenditionD1Ev@Base 0.20.1 + _ZN7Poppler14MediaRenditionD2Ev@Base 0.20.1 + _ZN7Poppler14PageTransitionC1ERKNS_20PageTransitionParamsE@Base 0.20.1 + _ZN7Poppler14PageTransitionC1ERKS0_@Base 0.20.1 + _ZN7Poppler14PageTransitionC2ERKNS_20PageTransitionParamsE@Base 0.20.1 + _ZN7Poppler14PageTransitionC2ERKS0_@Base 0.20.1 + _ZN7Poppler14PageTransitionD1Ev@Base 0.20.1 + _ZN7Poppler14PageTransitionD2Ev@Base 0.20.1 + _ZN7Poppler14TextAnnotation11setTextFontERK5QFont@Base 0.20.1 + _ZN7Poppler14TextAnnotation11setTextIconERK7QString@Base 0.20.1 + _ZN7Poppler14TextAnnotation11setTextTypeENS0_8TextTypeE@Base 0.20.1 + _ZN7Poppler14TextAnnotation14setInplaceTextERK7QString@Base 0.20.1 + _ZN7Poppler14TextAnnotation15setInplaceAlignEi@Base 0.20.1 + _ZN7Poppler14TextAnnotation16setCalloutPointsERK7QVectorI7QPointFE@Base 0.20.1 + _ZN7Poppler14TextAnnotation16setInplaceIntentENS0_13InplaceIntentE@Base 0.20.1 + _ZN7Poppler14TextAnnotationC1ENS0_8TextTypeE@Base 0.20.1 + _ZN7Poppler14TextAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14TextAnnotationC1ERNS_21TextAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14TextAnnotationC2ENS0_8TextTypeE@Base 0.20.1 + _ZN7Poppler14TextAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler14TextAnnotationC2ERNS_21TextAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler14TextAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler14TextAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler14TextAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler14isCmsAvailableEv@Base 0.20.1 + _ZN7Poppler15AnnotationUtils15storeAnnotationEPKNS_10AnnotationER11QDomElementR12QDomDocument@Base 0.20.1 + _ZN7Poppler15AnnotationUtils16createAnnotationERK11QDomElement@Base 0.20.1 + _ZN7Poppler15AnnotationUtils16findChildElementERK8QDomNodeRK7QString@Base 0.20.1 + _ZN7Poppler15CaretAnnotation14setCaretSymbolENS0_11CaretSymbolE@Base 0.20.1 + _ZN7Poppler15CaretAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15CaretAnnotationC1ERNS_22CaretAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15CaretAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler15CaretAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15CaretAnnotationC2ERNS_22CaretAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15CaretAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler15CaretAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler15CaretAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler15CaretAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler15FormFieldButton8setStateEb@Base 0.20.1 + _ZN7Poppler15FormFieldButtonC1EPNS_12DocumentDataEP4PageP16FormWidgetButton@Base 0.20.1 + _ZN7Poppler15FormFieldButtonC2EPNS_12DocumentDataEP4PageP16FormWidgetButton@Base 0.20.1 + _ZN7Poppler15FormFieldButtonD0Ev@Base 0.20.1 + _ZN7Poppler15FormFieldButtonD1Ev@Base 0.20.1 + _ZN7Poppler15FormFieldButtonD2Ev@Base 0.20.1 + _ZN7Poppler15FormFieldChoice17setCurrentChoicesERK5QListIiE@Base 0.20.1 + _ZN7Poppler15FormFieldChoiceC1EPNS_12DocumentDataEP4PageP16FormWidgetChoice@Base 0.20.1 + _ZN7Poppler15FormFieldChoiceC2EPNS_12DocumentDataEP4PageP16FormWidgetChoice@Base 0.20.1 + _ZN7Poppler15FormFieldChoiceD0Ev@Base 0.20.1 + _ZN7Poppler15FormFieldChoiceD1Ev@Base 0.20.1 + _ZN7Poppler15FormFieldChoiceD2Ev@Base 0.20.1 + _ZN7Poppler15LinkDestinationC1ERK7QString@Base 0.20.1 + _ZN7Poppler15LinkDestinationC1ERKNS_19LinkDestinationDataE@Base 0.20.1 + _ZN7Poppler15LinkDestinationC1ERKS0_@Base 0.20.1 + _ZN7Poppler15LinkDestinationC2ERK7QString@Base 0.20.1 + _ZN7Poppler15LinkDestinationC2ERKNS_19LinkDestinationDataE@Base 0.20.1 + _ZN7Poppler15LinkDestinationC2ERKS0_@Base 0.20.1 + _ZN7Poppler15LinkDestinationD1Ev@Base 0.20.1 + _ZN7Poppler15LinkDestinationD2Ev@Base 0.20.1 + _ZN7Poppler15LinkDestinationaSERKS0_@Base 0.20.1 + _ZN7Poppler15MovieAnnotation13setMovieTitleERK7QString@Base 0.20.1 + _ZN7Poppler15MovieAnnotation8setMovieEPNS_11MovieObjectE@Base 0.20.1 + _ZN7Poppler15MovieAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15MovieAnnotationC1ERNS_22MovieAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15MovieAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler15MovieAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15MovieAnnotationC2ERNS_22MovieAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15MovieAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler15MovieAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler15MovieAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler15MovieAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler15OptContentModel11qt_metacallEN11QMetaObject4CallEiPPv@Base 0.20.1 + _ZN7Poppler15OptContentModel11qt_metacastEPKc@Base 0.20.1 + _ZN7Poppler15OptContentModel16staticMetaObjectE@Base 0.20.1 + _ZN7Poppler15OptContentModel7setDataERK11QModelIndexRK8QVarianti@Base 0.20.1 + _ZN7Poppler15OptContentModelC1EP4OCGsP7QObject@Base 0.20.1 + _ZN7Poppler15OptContentModelC2EP4OCGsP7QObject@Base 0.20.1 + _ZN7Poppler15OptContentModelD0Ev@Base 0.20.1 + _ZN7Poppler15OptContentModelD1Ev@Base 0.20.1 + _ZN7Poppler15OptContentModelD2Ev@Base 0.20.1 + _ZN7Poppler15SoundAnnotation16setSoundIconNameERK7QString@Base 0.20.1 + _ZN7Poppler15SoundAnnotation8setSoundEPNS_11SoundObjectE@Base 0.20.1 + _ZN7Poppler15SoundAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15SoundAnnotationC1ERNS_22SoundAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15SoundAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler15SoundAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15SoundAnnotationC2ERNS_22SoundAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15SoundAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler15SoundAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler15SoundAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler15SoundAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler15StampAnnotation16setStampIconNameERK7QString@Base 0.20.1 + _ZN7Poppler15StampAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15StampAnnotationC1ERNS_22StampAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15StampAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler15StampAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler15StampAnnotationC2ERNS_22StampAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler15StampAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler15StampAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler15StampAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler15StampAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler16ScreenAnnotation14setScreenTitleERK7QString@Base 0.20.1 + _ZN7Poppler16ScreenAnnotation9setActionEPNS_13LinkRenditionE@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationC1ERNS_23ScreenAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationC2ERNS_23ScreenAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler16ScreenAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler19HighlightAnnotation16setHighlightTypeENS0_13HighlightTypeE@Base 0.20.1 + _ZN7Poppler19HighlightAnnotation17setHighlightQuadsERK5QListINS0_4QuadEE@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationC1ERNS_26HighlightAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationC2ERNS_26HighlightAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler19HighlightAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler21setDebugErrorFunctionEPFvRK7QStringRK8QVariantES5_@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotation15setEmbeddedFileEPNS_12EmbeddedFileE@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotation15setFileIconNameERK7QString@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationC1ERK8QDomNode@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationC1ERNS_31FileAttachmentAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationC1Ev@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationC2ERK8QDomNode@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationC2ERNS_31FileAttachmentAnnotationPrivateE@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationC2Ev@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationD0Ev@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationD1Ev@Base 0.20.1 + _ZN7Poppler24FileAttachmentAnnotationD2Ev@Base 0.20.1 + _ZN7Poppler4LinkC1ERK6QRectF@Base 0.20.1 + _ZN7Poppler4LinkC1ERNS_11LinkPrivateE@Base 0.20.1 + _ZN7Poppler4LinkC2ERK6QRectF@Base 0.20.1 + _ZN7Poppler4LinkC2ERNS_11LinkPrivateE@Base 0.20.1 + _ZN7Poppler4LinkD0Ev@Base 0.20.1 + _ZN7Poppler4LinkD1Ev@Base 0.20.1 + _ZN7Poppler4LinkD2Ev@Base 0.20.1 + _ZN7Poppler4Page10defaultCTMEPdddib@Base 0.20.1 + _ZN7Poppler4Page13addAnnotationEPKNS_10AnnotationE@Base 0.20.1 + _ZN7Poppler4Page16removeAnnotationEPKNS_10AnnotationE@Base 0.20.1 + _ZN7Poppler4PageC1EPNS_12DocumentDataEi@Base 0.20.1 + _ZN7Poppler4PageC2EPNS_12DocumentDataEi@Base 0.20.1 + _ZN7Poppler4PageD1Ev@Base 0.20.1 + _ZN7Poppler4PageD2Ev@Base 0.20.1 + _ZN7Poppler7TextBoxC1ERK7QStringRK6QRectF@Base 0.20.1 + _ZN7Poppler7TextBoxC2ERK7QStringRK6QRectF@Base 0.20.1 + _ZN7Poppler7TextBoxD1Ev@Base 0.20.1 + _ZN7Poppler7TextBoxD2Ev@Base 0.20.1 + _ZN7Poppler8Document12loadFromDataERK10QByteArrayS3_S3_@Base 0.20.1 + _ZN7Poppler8Document13setPaperColorERK6QColor@Base 0.20.1 + _ZN7Poppler8Document13setRenderHintENS0_10RenderHintEb@Base 0.20.1 + _ZN7Poppler8Document15linkDestinationERK7QString@Base 0.20.1 + _ZN7Poppler8Document16setRenderBackendENS0_13RenderBackendE@Base 0.20.1 + _ZN7Poppler8Document20optionalContentModelEv@Base 0.20.1 + _ZN7Poppler8Document22setColorDisplayProfileEPv@Base 0.20.1 + _ZN7Poppler8Document23availableRenderBackendsEv@Base 0.20.1 + _ZN7Poppler8Document26setColorDisplayProfileNameERK7QString@Base 0.20.1 + _ZN7Poppler8Document4loadERK7QStringRK10QByteArrayS6_@Base 0.20.1 + _ZN7Poppler8Document6unlockERK10QByteArrayS3_@Base 0.20.1 + _ZN7Poppler8DocumentC1EPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler8DocumentC2EPNS_12DocumentDataE@Base 0.20.1 + _ZN7Poppler8DocumentD1Ev@Base 0.20.1 + _ZN7Poppler8DocumentD2Ev@Base 0.20.1 + _ZN7Poppler8FontInfoC1ERKNS_12FontInfoDataE@Base 0.20.1 + _ZN7Poppler8FontInfoC1ERKS0_@Base 0.20.1 + _ZN7Poppler8FontInfoC1Ev@Base 0.20.1 + _ZN7Poppler8FontInfoC2ERKNS_12FontInfoDataE@Base 0.20.1 + _ZN7Poppler8FontInfoC2ERKS0_@Base 0.20.1 + _ZN7Poppler8FontInfoC2Ev@Base 0.20.1 + _ZN7Poppler8FontInfoD1Ev@Base 0.20.1 + _ZN7Poppler8FontInfoD2Ev@Base 0.20.1 + _ZN7Poppler8FontInfoaSERKS0_@Base 0.20.1 + _ZN7Poppler8LinkGotoC1ERK6QRectF7QStringRKNS_15LinkDestinationE@Base 0.20.1 + _ZN7Poppler8LinkGotoC2ERK6QRectF7QStringRKNS_15LinkDestinationE@Base 0.20.1 + _ZN7Poppler8LinkGotoD0Ev@Base 0.20.1 + _ZN7Poppler8LinkGotoD1Ev@Base 0.20.1 + _ZN7Poppler8LinkGotoD2Ev@Base 0.20.1 + _ZN7Poppler9FormFieldC1ERNS_13FormFieldDataE@Base 0.20.1 + _ZN7Poppler9FormFieldC2ERNS_13FormFieldDataE@Base 0.20.1 + _ZN7Poppler9FormFieldD0Ev@Base 0.20.1 + _ZN7Poppler9FormFieldD1Ev@Base 0.20.1 + _ZN7Poppler9FormFieldD2Ev@Base 0.20.1 + _ZN7Poppler9LinkMovieC1ERK6QRectFNS0_9OperationERK7QStringRK3Ref@Base 0.20.1 + _ZN7Poppler9LinkMovieC2ERK6QRectFNS0_9OperationERK7QStringRK3Ref@Base 0.20.1 + _ZN7Poppler9LinkMovieD0Ev@Base 0.20.1 + _ZN7Poppler9LinkMovieD1Ev@Base 0.20.1 + _ZN7Poppler9LinkMovieD2Ev@Base 0.20.1 + _ZN7Poppler9LinkSoundC1ERK6QRectFdbbbPNS_11SoundObjectE@Base 0.20.1 + _ZN7Poppler9LinkSoundC2ERK6QRectFdbbbPNS_11SoundObjectE@Base 0.20.1 + _ZN7Poppler9LinkSoundD0Ev@Base 0.20.1 + _ZN7Poppler9LinkSoundD1Ev@Base 0.20.1 + _ZN7Poppler9LinkSoundD2Ev@Base 0.20.1 + (optional=templinst)_ZN7QString5clearEv@Base 0.20.1 + (optional=templinst)_ZN7QVectorIfE7reallocEii@Base 0.20.1 + _ZNK7Poppler10Annotation10uniqueNameEv@Base 0.20.1 + _ZNK7Poppler10Annotation12creationDateEv@Base 0.20.1 + _ZNK7Poppler10Annotation12revisionTypeEv@Base 0.20.1 + _ZNK7Poppler10Annotation13revisionScopeEv@Base 0.20.1 + _ZNK7Poppler10Annotation16modificationDateEv@Base 0.20.1 + _ZNK7Poppler10Annotation29storeBaseAnnotationPropertiesER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler10Annotation5Popup4textEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Popup5flagsEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Popup5titleEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Popup7summaryEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Popup8geometryEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style10lineEffectEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style15effectIntensityEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style5colorEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style5widthEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style7opacityEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style8xCornersEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style8yCornersEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style9dashArrayEv@Base 0.20.1 + _ZNK7Poppler10Annotation5Style9lineStyleEv@Base 0.20.1 + _ZNK7Poppler10Annotation5flagsEv@Base 0.20.1 + _ZNK7Poppler10Annotation5popupEv@Base 0.20.1 + _ZNK7Poppler10Annotation5styleEv@Base 0.20.1 + _ZNK7Poppler10Annotation6authorEv@Base 0.20.1 + _ZNK7Poppler10Annotation8boundaryEv@Base 0.20.1 + _ZNK7Poppler10Annotation8contentsEv@Base 0.20.1 + _ZNK7Poppler10Annotation9revisionsEv@Base 0.20.1 + _ZNK7Poppler10LinkAction10actionTypeEv@Base 0.20.1 + _ZNK7Poppler10LinkAction8linkTypeEv@Base 0.20.1 + _ZNK7Poppler10LinkBrowse3urlEv@Base 0.20.1 + _ZNK7Poppler10LinkBrowse8linkTypeEv@Base 0.20.1 + _ZNK7Poppler11LinkExecute10parametersEv@Base 0.20.1 + _ZNK7Poppler11LinkExecute8fileNameEv@Base 0.20.1 + _ZNK7Poppler11LinkExecute8linkTypeEv@Base 0.20.1 + _ZNK7Poppler11MovieObject12showControlsEv@Base 0.20.1 + _ZNK7Poppler11MovieObject3urlEv@Base 0.20.1 + _ZNK7Poppler11MovieObject4sizeEv@Base 0.20.1 + _ZNK7Poppler11MovieObject8playModeEv@Base 0.20.1 + _ZNK7Poppler11MovieObject8rotationEv@Base 0.20.1 + _ZNK7Poppler11PSConverter9psOptionsEv@Base 0.20.1 + _ZNK7Poppler11SoundObject12samplingRateEv@Base 0.20.1 + _ZNK7Poppler11SoundObject13bitsPerSampleEv@Base 0.20.1 + _ZNK7Poppler11SoundObject13soundEncodingEv@Base 0.20.1 + _ZNK7Poppler11SoundObject3urlEv@Base 0.20.1 + _ZNK7Poppler11SoundObject4dataEv@Base 0.20.1 + _ZNK7Poppler11SoundObject8channelsEv@Base 0.20.1 + _ZNK7Poppler11SoundObject9soundTypeEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile10createDateEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile11descriptionEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile4nameEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile4sizeEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile7isValidEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile7modDateEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile8checksumEv@Base 0.20.1 + _ZNK7Poppler12EmbeddedFile8mimeTypeEv@Base 0.20.1 + _ZNK7Poppler12FontIterator11currentPageEv@Base 0.20.1 + _ZNK7Poppler12FontIterator7hasNextEv@Base 0.20.1 + _ZNK7Poppler12PDFConverter10pdfOptionsEv@Base 0.20.1 + _ZNK7Poppler13BaseConverter9lastErrorEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText10isPasswordEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText10isRichTextEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText13maximumLengthEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText13textAlignmentEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText17canBeSpellCheckedEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText4textEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText4typeEv@Base 0.20.1 + _ZNK7Poppler13FormFieldText8textTypeEv@Base 0.20.1 + _ZNK7Poppler13InkAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler13InkAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler13InkAnnotation8inkPathsEv@Base 0.20.1 + _ZNK7Poppler13LinkRendition8linkTypeEv@Base 0.20.1 + _ZNK7Poppler13LinkRendition9renditionEv@Base 0.20.1 + _ZNK7Poppler14GeomAnnotation14geomInnerColorEv@Base 0.20.1 + _ZNK7Poppler14GeomAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler14GeomAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler14GeomAnnotation8geomTypeEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation10lineIntentEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation10linePointsEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation12isLineClosedEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation12lineEndStyleEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation14lineInnerColorEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation14lineStartStyleEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation15lineShowCaptionEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation20lineLeadingBackPointEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation23lineLeadingForwardPointEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler14LineAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler14LineAnnotation8lineTypeEv@Base 0.20.1 + _ZNK7Poppler14LinkAnnotation15linkDestinationEv@Base 0.20.1 + _ZNK7Poppler14LinkAnnotation15linkRegionPointEi@Base 0.20.1 + _ZNK7Poppler14LinkAnnotation17linkHighlightModeEv@Base 0.20.1 + _ZNK7Poppler14LinkAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler14LinkAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler14LinkJavaScript6scriptEv@Base 0.20.1 + _ZNK7Poppler14LinkJavaScript8linkTypeEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition10isEmbeddedEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition11contentTypeEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition11repeatCountEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition12showControlsEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition4dataEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition4sizeEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition7isValidEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition8autoPlayEv@Base 0.20.1 + _ZNK7Poppler14MediaRendition8fileNameEv@Base 0.20.1 + _ZNK7Poppler14PageTransition13isRectangularEv@Base 0.20.1 + _ZNK7Poppler14PageTransition4typeEv@Base 0.20.1 + _ZNK7Poppler14PageTransition5angleEv@Base 0.20.1 + _ZNK7Poppler14PageTransition5scaleEv@Base 0.20.1 + _ZNK7Poppler14PageTransition8durationEv@Base 0.20.1 + _ZNK7Poppler14PageTransition9alignmentEv@Base 0.20.1 + _ZNK7Poppler14PageTransition9directionEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation11inplaceTextEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation12calloutPointEi@Base 0.20.1 + _ZNK7Poppler14TextAnnotation12inplaceAlignEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation13calloutPointsEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation13inplaceIntentEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler14TextAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation8textFontEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation8textIconEv@Base 0.20.1 + _ZNK7Poppler14TextAnnotation8textTypeEv@Base 0.20.1 + _ZNK7Poppler15CaretAnnotation11caretSymbolEv@Base 0.20.1 + _ZNK7Poppler15CaretAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler15CaretAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler15FormFieldButton10buttonTypeEv@Base 0.20.1 + _ZNK7Poppler15FormFieldButton4typeEv@Base 0.20.1 + _ZNK7Poppler15FormFieldButton5stateEv@Base 0.20.1 + _ZNK7Poppler15FormFieldButton7captionEv@Base 0.20.1 + _ZNK7Poppler15FormFieldButton8siblingsEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice10choiceTypeEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice10isEditableEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice11multiSelectEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice13textAlignmentEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice14currentChoicesEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice17canBeSpellCheckedEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice4typeEv@Base 0.20.1 + _ZNK7Poppler15FormFieldChoice7choicesEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination10pageNumberEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination11isChangeTopEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination12isChangeLeftEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination12isChangeZoomEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination15destinationNameEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination3topEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination4kindEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination4leftEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination4zoomEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination5rightEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination6bottomEv@Base 0.20.1 + _ZNK7Poppler15LinkDestination8toStringEv@Base 0.20.1 + _ZNK7Poppler15MovieAnnotation10movieTitleEv@Base 0.20.1 + _ZNK7Poppler15MovieAnnotation5movieEv@Base 0.20.1 + _ZNK7Poppler15MovieAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler15MovieAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler15OptContentModel10headerDataEiN2Qt11OrientationEi@Base 0.20.1 + _ZNK7Poppler15OptContentModel10metaObjectEv@Base 0.20.1 + _ZNK7Poppler15OptContentModel11columnCountERK11QModelIndex@Base 0.20.1 + _ZNK7Poppler15OptContentModel4dataERK11QModelIndexi@Base 0.20.1 + _ZNK7Poppler15OptContentModel5flagsERK11QModelIndex@Base 0.20.1 + _ZNK7Poppler15OptContentModel5indexEiiRK11QModelIndex@Base 0.20.1 + _ZNK7Poppler15OptContentModel6parentERK11QModelIndex@Base 0.20.1 + _ZNK7Poppler15OptContentModel8rowCountERK11QModelIndex@Base 0.20.1 + _ZNK7Poppler15SoundAnnotation13soundIconNameEv@Base 0.20.1 + _ZNK7Poppler15SoundAnnotation5soundEv@Base 0.20.1 + _ZNK7Poppler15SoundAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler15SoundAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler15StampAnnotation13stampIconNameEv@Base 0.20.1 + _ZNK7Poppler15StampAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler15StampAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler16ScreenAnnotation11screenTitleEv@Base 0.20.1 + _ZNK7Poppler16ScreenAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler16ScreenAnnotation6actionEv@Base 0.20.1 + _ZNK7Poppler16ScreenAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler19HighlightAnnotation13highlightTypeEv@Base 0.20.1 + _ZNK7Poppler19HighlightAnnotation14highlightQuadsEv@Base 0.20.1 + _ZNK7Poppler19HighlightAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler19HighlightAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler24FileAttachmentAnnotation12embeddedFileEv@Base 0.20.1 + _ZNK7Poppler24FileAttachmentAnnotation12fileIconNameEv@Base 0.20.1 + _ZNK7Poppler24FileAttachmentAnnotation5storeER8QDomNodeR12QDomDocument@Base 0.20.1 + _ZNK7Poppler24FileAttachmentAnnotation7subTypeEv@Base 0.20.1 + _ZNK7Poppler4Link8linkAreaEv@Base 0.20.1 + _ZNK7Poppler4Link8linkTypeEv@Base 0.20.1 + _ZNK7Poppler4Page10formFieldsEv@Base 0.20.1 + _ZNK7Poppler4Page10transitionEv@Base 0.20.1 + _ZNK7Poppler4Page11annotationsEv@Base 0.20.1 + _ZNK7Poppler4Page11orientationEv@Base 0.20.1 + _ZNK7Poppler4Page13renderToImageEddiiiiNS0_8RotationE@Base 0.20.1 + _ZNK7Poppler4Page15renderToPainterEP8QPainterddiiiiNS0_8RotationE6QFlagsINS0_11PainterFlagEE@Base 0.20.1 + _ZNK7Poppler4Page4textERK6QRectF@Base 0.20.1 + _ZNK7Poppler4Page4textERK6QRectFNS0_10TextLayoutE@Base 0.20.1 + _ZNK7Poppler4Page5labelEv@Base 0.20.1 + _ZNK7Poppler4Page5linksEv@Base 0.20.1 + _ZNK7Poppler4Page6actionENS0_10PageActionE@Base 0.20.1 + _ZNK7Poppler4Page6searchERK7QStringR6QRectFNS0_15SearchDirectionENS0_10SearchModeENS0_8RotationE@Base 0.20.1 + _ZNK7Poppler4Page6searchERK7QStringRdS4_S4_S4_NS0_15SearchDirectionENS0_10SearchModeENS0_8RotationE@Base 0.20.1 + _ZNK7Poppler4Page8durationEv@Base 0.20.1 + _ZNK7Poppler4Page8pageSizeEv@Base 0.20.1 + _ZNK7Poppler4Page8textListENS0_8RotationE@Base 0.20.1 + _ZNK7Poppler4Page9pageSizeFEv@Base 0.20.1 + _ZNK7Poppler4Page9thumbnailEv@Base 0.20.1 + _ZNK7Poppler7TextBox11boundingBoxEv@Base 0.20.1 + _ZNK7Poppler7TextBox13hasSpaceAfterEv@Base 0.20.1 + _ZNK7Poppler7TextBox15charBoundingBoxEi@Base 0.20.1 + _ZNK7Poppler7TextBox4textEv@Base 0.20.1 + _ZNK7Poppler7TextBox8nextWordEv@Base 0.20.1 + _ZNK7Poppler8Document10okToChangeEv@Base 0.20.1 + _ZNK7Poppler8Document10pageLayoutEv@Base 0.20.1 + _ZNK7Poppler8Document10paperColorEv@Base 0.20.1 + _ZNK7Poppler8Document10pdfVersionEv@Base 0.20.1 + _ZNK7Poppler8Document11isEncryptedEv@Base 0.20.1 + _ZNK7Poppler8Document11psConverterEv@Base 0.20.1 + _ZNK7Poppler8Document11renderHintsEv@Base 0.20.1 + _ZNK7Poppler8Document12isLinearizedEv@Base 0.20.1 + _ZNK7Poppler8Document12okToAddNotesEv@Base 0.20.1 + _ZNK7Poppler8Document12okToAssembleEv@Base 0.20.1 + _ZNK7Poppler8Document12okToFillFormEv@Base 0.20.1 + _ZNK7Poppler8Document12pdfConverterEv@Base 0.20.1 + _ZNK7Poppler8Document12scanForFontsEiP5QListINS_8FontInfoEE@Base 0.20.1 + _ZNK7Poppler8Document13embeddedFilesEv@Base 0.20.1 + _ZNK7Poppler8Document13getPdfVersionEPiS1_@Base 0.20.1 + _ZNK7Poppler8Document13renderBackendEv@Base 0.20.1 + _ZNK7Poppler8Document15colorRgbProfileEv@Base 0.20.1 + _ZNK7Poppler8Document15newFontIteratorEi@Base 0.20.1 + _ZNK7Poppler8Document16hasEmbeddedFilesEv@Base 0.20.1 + _ZNK7Poppler8Document16okToPrintHighResEv@Base 0.20.1 + _ZNK7Poppler8Document18hasOptionalContentEv@Base 0.20.1 + _ZNK7Poppler8Document19colorDisplayProfileEv@Base 0.20.1 + _ZNK7Poppler8Document20okToCreateFormFieldsEv@Base 0.20.1 + _ZNK7Poppler8Document27okToExtractForAccessibilityEv@Base 0.20.1 + _ZNK7Poppler8Document3tocEv@Base 0.20.1 + _ZNK7Poppler8Document4dateERK7QString@Base 0.20.1 + _ZNK7Poppler8Document4infoERK7QString@Base 0.20.1 + _ZNK7Poppler8Document4pageERK7QString@Base 0.20.1 + _ZNK7Poppler8Document4pageEi@Base 0.20.1 + _ZNK7Poppler8Document5fontsEv@Base 0.20.1 + _ZNK7Poppler8Document7scriptsEv@Base 0.20.1 + _ZNK7Poppler8Document8fontDataERKNS_8FontInfoE@Base 0.20.1 + _ZNK7Poppler8Document8getPdfIdEP10QByteArrayS2_@Base 0.20.1 + _ZNK7Poppler8Document8infoKeysEv@Base 0.20.1 + _ZNK7Poppler8Document8isLockedEv@Base 0.20.1 + _ZNK7Poppler8Document8metadataEv@Base 0.20.1 + _ZNK7Poppler8Document8numPagesEv@Base 0.20.1 + _ZNK7Poppler8Document8okToCopyEv@Base 0.20.1 + _ZNK7Poppler8Document8pageModeEv@Base 0.20.1 + _ZNK7Poppler8Document9okToPrintEv@Base 0.20.1 + _ZNK7Poppler8FontInfo10isEmbeddedEv@Base 0.20.1 + _ZNK7Poppler8FontInfo4fileEv@Base 0.20.1 + _ZNK7Poppler8FontInfo4nameEv@Base 0.20.1 + _ZNK7Poppler8FontInfo4typeEv@Base 0.20.1 + _ZNK7Poppler8FontInfo8isSubsetEv@Base 0.20.1 + _ZNK7Poppler8FontInfo8typeNameEv@Base 0.20.1 + _ZNK7Poppler8LinkGoto10isExternalEv@Base 0.20.1 + _ZNK7Poppler8LinkGoto11destinationEv@Base 0.20.1 + _ZNK7Poppler8LinkGoto8fileNameEv@Base 0.20.1 + _ZNK7Poppler8LinkGoto8linkTypeEv@Base 0.20.1 + _ZNK7Poppler9FormField10isReadOnlyEv@Base 0.20.1 + _ZNK7Poppler9FormField16activationActionEv@Base 0.20.1 + _ZNK7Poppler9FormField18fullyQualifiedNameEv@Base 0.20.1 + _ZNK7Poppler9FormField2idEv@Base 0.20.1 + _ZNK7Poppler9FormField4nameEv@Base 0.20.1 + _ZNK7Poppler9FormField4rectEv@Base 0.20.1 + _ZNK7Poppler9FormField6uiNameEv@Base 0.20.1 + _ZNK7Poppler9FormField9isVisibleEv@Base 0.20.1 + _ZNK7Poppler9LinkMovie22isReferencedAnnotationEPKNS_15MovieAnnotationE@Base 0.20.1 + _ZNK7Poppler9LinkMovie8linkTypeEv@Base 0.20.1 + _ZNK7Poppler9LinkMovie9operationEv@Base 0.20.1 + _ZNK7Poppler9LinkSound11synchronousEv@Base 0.20.1 + _ZNK7Poppler9LinkSound3mixEv@Base 0.20.1 + _ZNK7Poppler9LinkSound5soundEv@Base 0.20.1 + _ZNK7Poppler9LinkSound6repeatEv@Base 0.20.1 + _ZNK7Poppler9LinkSound6volumeEv@Base 0.20.1 + _ZNK7Poppler9LinkSound8linkTypeEv@Base 0.20.1 + _ZTI11QSharedData@Base 0.20.1 + _ZTIN7Poppler10AnnotationE@Base 0.20.1 + _ZTIN7Poppler10LinkActionE@Base 0.20.1 + _ZTIN7Poppler10LinkBrowseE@Base 0.20.1 + _ZTIN7Poppler11LinkExecuteE@Base 0.20.1 + _ZTIN7Poppler11PSConverterE@Base 0.20.1 + _ZTIN7Poppler12PDFConverterE@Base 0.20.1 + _ZTIN7Poppler13BaseConverterE@Base 0.20.1 + _ZTIN7Poppler13FormFieldTextE@Base 0.20.1 + _ZTIN7Poppler13InkAnnotationE@Base 0.20.1 + _ZTIN7Poppler13LinkRenditionE@Base 0.20.1 + _ZTIN7Poppler14GeomAnnotationE@Base 0.20.1 + _ZTIN7Poppler14LineAnnotationE@Base 0.20.1 + _ZTIN7Poppler14LinkAnnotationE@Base 0.20.1 + _ZTIN7Poppler14LinkJavaScriptE@Base 0.20.1 + _ZTIN7Poppler14TextAnnotationE@Base 0.20.1 + _ZTIN7Poppler15CaretAnnotationE@Base 0.20.1 + _ZTIN7Poppler15FormFieldButtonE@Base 0.20.1 + _ZTIN7Poppler15FormFieldChoiceE@Base 0.20.1 + _ZTIN7Poppler15MovieAnnotationE@Base 0.20.1 + _ZTIN7Poppler15OptContentModelE@Base 0.20.1 + _ZTIN7Poppler15SoundAnnotationE@Base 0.20.1 + _ZTIN7Poppler15StampAnnotationE@Base 0.20.1 + _ZTIN7Poppler16ScreenAnnotationE@Base 0.20.1 + _ZTIN7Poppler19HighlightAnnotationE@Base 0.20.1 + _ZTIN7Poppler24FileAttachmentAnnotationE@Base 0.20.1 + _ZTIN7Poppler4LinkE@Base 0.20.1 + _ZTIN7Poppler8LinkGotoE@Base 0.20.1 + _ZTIN7Poppler9FormFieldE@Base 0.20.1 + _ZTIN7Poppler9LinkMovieE@Base 0.20.1 + _ZTIN7Poppler9LinkSoundE@Base 0.20.1 + _ZTS11QSharedData@Base 0.20.1 + _ZTSN7Poppler10AnnotationE@Base 0.20.1 + _ZTSN7Poppler10LinkActionE@Base 0.20.1 + _ZTSN7Poppler10LinkBrowseE@Base 0.20.1 + _ZTSN7Poppler11LinkExecuteE@Base 0.20.1 + _ZTSN7Poppler11PSConverterE@Base 0.20.1 + _ZTSN7Poppler12PDFConverterE@Base 0.20.1 + _ZTSN7Poppler13BaseConverterE@Base 0.20.1 + _ZTSN7Poppler13FormFieldTextE@Base 0.20.1 + _ZTSN7Poppler13InkAnnotationE@Base 0.20.1 + _ZTSN7Poppler13LinkRenditionE@Base 0.20.1 + _ZTSN7Poppler14GeomAnnotationE@Base 0.20.1 + _ZTSN7Poppler14LineAnnotationE@Base 0.20.1 + _ZTSN7Poppler14LinkAnnotationE@Base 0.20.1 + _ZTSN7Poppler14LinkJavaScriptE@Base 0.20.1 + _ZTSN7Poppler14TextAnnotationE@Base 0.20.1 + _ZTSN7Poppler15CaretAnnotationE@Base 0.20.1 + _ZTSN7Poppler15FormFieldButtonE@Base 0.20.1 + _ZTSN7Poppler15FormFieldChoiceE@Base 0.20.1 + _ZTSN7Poppler15MovieAnnotationE@Base 0.20.1 + _ZTSN7Poppler15OptContentModelE@Base 0.20.1 + _ZTSN7Poppler15SoundAnnotationE@Base 0.20.1 + _ZTSN7Poppler15StampAnnotationE@Base 0.20.1 + _ZTSN7Poppler16ScreenAnnotationE@Base 0.20.1 + _ZTSN7Poppler19HighlightAnnotationE@Base 0.20.1 + _ZTSN7Poppler24FileAttachmentAnnotationE@Base 0.20.1 + _ZTSN7Poppler4LinkE@Base 0.20.1 + _ZTSN7Poppler8LinkGotoE@Base 0.20.1 + _ZTSN7Poppler9FormFieldE@Base 0.20.1 + _ZTSN7Poppler9LinkMovieE@Base 0.20.1 + _ZTSN7Poppler9LinkSoundE@Base 0.20.1 + _ZTVN7Poppler10AnnotationE@Base 0.20.1 + _ZTVN7Poppler10LinkActionE@Base 0.20.1 + _ZTVN7Poppler10LinkBrowseE@Base 0.20.1 + _ZTVN7Poppler11LinkExecuteE@Base 0.20.1 + _ZTVN7Poppler11PSConverterE@Base 0.20.1 + _ZTVN7Poppler12PDFConverterE@Base 0.20.1 + _ZTVN7Poppler13BaseConverterE@Base 0.20.1 + _ZTVN7Poppler13FormFieldTextE@Base 0.20.1 + _ZTVN7Poppler13InkAnnotationE@Base 0.20.1 + _ZTVN7Poppler13LinkRenditionE@Base 0.20.1 + _ZTVN7Poppler14GeomAnnotationE@Base 0.20.1 + _ZTVN7Poppler14LineAnnotationE@Base 0.20.1 + _ZTVN7Poppler14LinkAnnotationE@Base 0.20.1 + _ZTVN7Poppler14LinkJavaScriptE@Base 0.20.1 + _ZTVN7Poppler14TextAnnotationE@Base 0.20.1 + _ZTVN7Poppler15CaretAnnotationE@Base 0.20.1 + _ZTVN7Poppler15FormFieldButtonE@Base 0.20.1 + _ZTVN7Poppler15FormFieldChoiceE@Base 0.20.1 + _ZTVN7Poppler15MovieAnnotationE@Base 0.20.1 + _ZTVN7Poppler15OptContentModelE@Base 0.20.1 + _ZTVN7Poppler15SoundAnnotationE@Base 0.20.1 + _ZTVN7Poppler15StampAnnotationE@Base 0.20.1 + _ZTVN7Poppler16ScreenAnnotationE@Base 0.20.1 + _ZTVN7Poppler19HighlightAnnotationE@Base 0.20.1 + _ZTVN7Poppler24FileAttachmentAnnotationE@Base 0.20.1 + _ZTVN7Poppler4LinkE@Base 0.20.1 + _ZTVN7Poppler8LinkGotoE@Base 0.20.1 + _ZTVN7Poppler9FormFieldE@Base 0.20.1 + _ZTVN7Poppler9LinkMovieE@Base 0.20.1 + _ZTVN7Poppler9LinkSoundE@Base 0.20.1 diff -Nru poppler-0.18.4/debian/libpoppler19.install poppler-0.20.5/debian/libpoppler19.install --- poppler-0.18.4/debian/libpoppler19.install 2012-02-12 15:03:34.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler19.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/*/libpoppler.so.19* diff -Nru poppler-0.18.4/debian/libpoppler28.docs poppler-0.20.5/debian/libpoppler28.docs --- poppler-0.18.4/debian/libpoppler28.docs 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler28.docs 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,5 @@ +AUTHORS +NEWS +README +README-XPDF +TODO diff -Nru poppler-0.18.4/debian/libpoppler28.install poppler-0.20.5/debian/libpoppler28.install --- poppler-0.18.4/debian/libpoppler28.install 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/libpoppler28.install 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/*/libpoppler.so.28* diff -Nru poppler-0.18.4/debian/patches/10_fix-a4-page-shift-on-brother-ps-printers.patch poppler-0.20.5/debian/patches/10_fix-a4-page-shift-on-brother-ps-printers.patch --- poppler-0.18.4/debian/patches/10_fix-a4-page-shift-on-brother-ps-printers.patch 2012-02-21 13:50:55.000000000 +0000 +++ poppler-0.20.5/debian/patches/10_fix-a4-page-shift-on-brother-ps-printers.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: Fix page shifts when printing on A4 paper with Brother PostScript printers -Bug: https://bugs.freedesktop.org//show_bug.cgi?id=18711 -Bug-Ubuntu: https://launchpad.net/bugs/293832 - -Index: poppler-0.16.0/poppler/PSOutputDev.cc -=================================================================== ---- poppler-0.16.0.orig/poppler/PSOutputDev.cc 2010-12-04 16:47:47.000000000 +0000 -+++ poppler-0.16.0/poppler/PSOutputDev.cc 2011-01-13 21:51:23.996929004 +0000 -@@ -116,7 +116,6 @@ - " pop 3 dict begin", - " /PageSize exch def", - " /ImagingBBox null def", -- " /Policies 1 dict dup begin /PageSize 3 def end def", - " { /Duplex true def } if", - " currentdict end setpagedevice", - " } {", diff -Nru poppler-0.18.4/debian/patches/CVE-2013-1788.patch poppler-0.20.5/debian/patches/CVE-2013-1788.patch --- poppler-0.18.4/debian/patches/CVE-2013-1788.patch 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/CVE-2013-1788.patch 2013-03-08 18:08:38.000000000 +0000 @@ -0,0 +1,125 @@ +Description: fix invalid memory access issues +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=8b6dc55e530b2f5ede6b9dfb64aafdd1d5836492 +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=e14b6e9c13d35c9bd1e0c50906ace8e707816888 +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=0388837f01bc467045164f9ddaff787000a8caaa +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=957aa252912cde85d76c41e9710b33425a82b696 +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=bbc2d8918fe234b7ef2c480eb148943922cc0959 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702071 + +Index: poppler-0.20.5/poppler/Function.cc +=================================================================== +--- poppler-0.20.5.orig/poppler/Function.cc 2012-09-09 17:24:04.000000000 -0400 ++++ poppler-0.20.5/poppler/Function.cc 2013-03-08 12:54:41.313197849 -0500 +@@ -1063,6 +1063,10 @@ + error(errSyntaxError, -1, "Stack underflow in PostScript function"); + return; + } ++ if (unlikely(sp - n > psStackSize)) { ++ error(errSyntaxError, -1, "Stack underflow in PostScript function"); ++ return; ++ } + if (!checkOverflow(n)) { + return; + } +Index: poppler-0.20.5/poppler/Stream.cc +=================================================================== +--- poppler-0.20.5.orig/poppler/Stream.cc 2012-09-26 08:22:16.000000000 -0400 ++++ poppler-0.20.5/poppler/Stream.cc 2013-03-08 12:54:43.833197825 -0500 +@@ -2384,7 +2384,8 @@ + + // clip [-256,511] --> [0,255] + #define dctClipOffset 256 +-static Guchar dctClip[768]; ++#define dctClipLength 768 ++static Guchar dctClip[dctClipLength]; + static int dctClipInit = 0; + + // zig zag decode map +@@ -3340,7 +3341,12 @@ + + // convert to 8-bit integers + for (i = 0; i < 64; ++i) { +- dataOut[i] = dctClip[dctClipOffset + 128 + ((dataIn[i] + 8) >> 4)]; ++ const int ix = dctClipOffset + 128 + ((dataIn[i] + 8) >> 4); ++ if (unlikely(ix < 0 || ix >= dctClipLength)) { ++ dataOut[i] = 0; ++ } else { ++ dataOut[i] = dctClip[ix]; ++ } + } + } + +Index: poppler-0.20.5/splash/Splash.cc +=================================================================== +--- poppler-0.20.5.orig/splash/Splash.cc 2012-08-15 09:31:38.000000000 -0400 ++++ poppler-0.20.5/splash/Splash.cc 2013-03-08 12:54:49.893197767 -0500 +@@ -2102,11 +2102,14 @@ + lineDashStartOn = gTrue; + lineDashStartIdx = 0; + if (lineDashStartPhase > 0) { +- while (lineDashStartPhase >= state->lineDash[lineDashStartIdx]) { ++ while (lineDashStartIdx < state->lineDashLength && lineDashStartPhase >= state->lineDash[lineDashStartIdx]) { + lineDashStartOn = !lineDashStartOn; + lineDashStartPhase -= state->lineDash[lineDashStartIdx]; + ++lineDashStartIdx; + } ++ if (unlikely(lineDashStartIdx == state->lineDashLength)) { ++ return new SplashPath(); ++ } + } + + dPath = new SplashPath(); +@@ -3078,6 +3081,12 @@ + Guchar *destPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, d; + int i, j; ++ ++ destPtr = dest->data; ++ if (destPtr == NULL) { ++ error(errInternal, -1, "dest->data is NULL in Splash::scaleMaskYdXu"); ++ return; ++ } + + // Bresenham parameters for y scale + yp = srcHeight / scaledHeight; +@@ -3094,7 +3103,6 @@ + // init y scale Bresenham + yt = 0; + +- destPtr = dest->data; + for (y = 0; y < scaledHeight; ++y) { + + // y scale Bresenham +@@ -3153,6 +3161,12 @@ + Guchar *destPtr0, *destPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx, d, d0, d1; + int i; ++ ++ destPtr0 = dest->data; ++ if (destPtr0 == NULL) { ++ error(errInternal, -1, "dest->data is NULL in Splash::scaleMaskYuXd"); ++ return; ++ } + + // Bresenham parameters for y scale + yp = scaledHeight / srcHeight; +@@ -3168,7 +3182,6 @@ + // init y scale Bresenham + yt = 0; + +- destPtr0 = dest->data; + for (y = 0; y < srcHeight; ++y) { + + // y scale Bresenham +@@ -4491,6 +4504,11 @@ + Guchar *lineBuf; + Guchar *p0, *p1; + int w; ++ ++ if (unlikely(img->data == NULL)) { ++ error(errInternal, -1, "img->data is NULL in Splash::vertFlipImage"); ++ return; ++ } + + w = width * nComps; + lineBuf = (Guchar *)gmalloc(w); diff -Nru poppler-0.18.4/debian/patches/CVE-2013-1789.patch poppler-0.20.5/debian/patches/CVE-2013-1789.patch --- poppler-0.18.4/debian/patches/CVE-2013-1789.patch 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/CVE-2013-1789.patch 2013-03-08 18:09:27.000000000 +0000 @@ -0,0 +1,67 @@ +Description: fix denial of service via malformed documents +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=a205e71a2dbe0c8d4f4905a76a3f79ec522eacec +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=a9b8ab4657dec65b8b86c225d12c533ad7e984e2 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702071 + +Index: poppler-0.20.5/splash/Splash.cc +=================================================================== +--- poppler-0.20.5.orig/splash/Splash.cc 2013-03-08 12:58:36.129195610 -0500 ++++ poppler-0.20.5/splash/Splash.cc 2013-03-08 12:58:52.213195456 -0500 +@@ -2807,6 +2807,11 @@ + // scale the input image + scaledMask = scaleMask(src, srcData, srcWidth, srcHeight, + scaledWidth, scaledHeight); ++ if (scaledMask->data == NULL) { ++ error(errInternal, -1, "scaledMask->data is NULL in Splash::arbitraryTransformMask"); ++ delete scaledMask; ++ return; ++ } + + // construct the three sections + i = (vy[2] <= vy[3]) ? 2 : 3; +@@ -3244,6 +3249,12 @@ + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx; + int i, j; + ++ destPtr0 = dest->data; ++ if (destPtr0 == NULL) { ++ error(errInternal, -1, "dest->data is NULL in Splash::scaleMaskYuXu"); ++ return; ++ } ++ + // Bresenham parameters for y scale + yp = scaledHeight / srcHeight; + yq = scaledHeight % srcHeight; +@@ -3258,7 +3269,6 @@ + // init y scale Bresenham + yt = 0; + +- destPtr0 = dest->data; + for (y = 0; y < srcHeight; ++y) { + + // y scale Bresenham +@@ -3314,11 +3324,15 @@ + + w = src->getWidth(); + h = src->getHeight(); ++ p = src->getDataPtr(); ++ if (p == NULL) { ++ error(errInternal, -1, "src->getDataPtr() is NULL in Splash::blitMask"); ++ return; ++ } + if (vectorAntialias && clipRes != splashClipAllInside) { + pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); + drawAAPixelInit(); +- p = src->getDataPtr(); + for (y = 0; y < h; ++y) { + for (x = 0; x < w; ++x) { + pipe.shape = *p++; +@@ -3328,7 +3342,6 @@ + } else { + pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); +- p = src->getDataPtr(); + if (clipRes == splashClipAllInside) { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); diff -Nru poppler-0.18.4/debian/patches/CVE-2013-1790.patch poppler-0.20.5/debian/patches/CVE-2013-1790.patch --- poppler-0.18.4/debian/patches/CVE-2013-1790.patch 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/CVE-2013-1790.patch 2013-03-08 18:09:56.000000000 +0000 @@ -0,0 +1,20 @@ +Description: fix uninitialized memory read +Origin: upstream, http://cgit.freedesktop.org/poppler/poppler/commit/?id=b1026b5978c385328f2a15a2185c599a563edf91 +Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=702071 + +Index: poppler-0.20.5/poppler/Stream.cc +=================================================================== +--- poppler-0.20.5.orig/poppler/Stream.cc 2013-03-08 12:59:01.289195370 -0500 ++++ poppler-0.20.5/poppler/Stream.cc 2013-03-08 12:59:12.309195265 -0500 +@@ -1710,8 +1710,9 @@ + for (i = 0; i < columns && codingLine[i] < columns; ++i) { + refLine[i] = codingLine[i]; + } +- refLine[i++] = columns; +- refLine[i] = columns; ++ for (; i < columns + 2; ++i) { ++ refLine[i] = columns; ++ } + codingLine[0] = 0; + a0i = 0; + b1i = 0; diff -Nru poppler-0.18.4/debian/patches/git_gouraud_shading_support.patch poppler-0.20.5/debian/patches/git_gouraud_shading_support.patch --- poppler-0.18.4/debian/patches/git_gouraud_shading_support.patch 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/git_gouraud_shading_support.patch 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,36 @@ +From ae8fc0cbfc6123189e17b3cf1286e0540f181646 Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Tue, 30 Oct 2012 10:52:04 +0000 +Subject: cairo: support parameterized Gouraud shading +Bug: https://bugs.freedesktop.org/show_bug.cgi?id=56463 +Bug-Ubuntu: https://bugs.launchpad.net/poppler/+bug/1072129 + +--- +--- a/poppler/CairoOutputDev.cc ++++ b/poppler/CairoOutputDev.cc +@@ -945,10 +945,21 @@ + fill_pattern = cairo_pattern_create_mesh (); + + for (i = 0; i < shading->getNTriangles(); i++) { +- shading->getTriangle(i, +- &x0, &y0, &color[0], +- &x1, &y1, &color[1], +- &x2, &y2, &color[2]); ++ if (shading->isParameterized()) { ++ double color0, color1, color2; ++ shading->getTriangle(i, &x0, &y0, &color0, ++ &x1, &y1, &color1, ++ &x2, &y2, &color2); ++ shading->getParameterizedColor(color0, &color[0]); ++ shading->getParameterizedColor(color1, &color[1]); ++ shading->getParameterizedColor(color2, &color[2]); ++ } else { ++ shading->getTriangle(i, ++ &x0, &y0, &color[0], ++ &x1, &y1, &color[1], ++ &x2, &y2, &color[2]); ++ ++ } + + cairo_mesh_pattern_begin_patch (fill_pattern); + diff -Nru poppler-0.18.4/debian/patches/git_mask_segfault.patch poppler-0.20.5/debian/patches/git_mask_segfault.patch --- poppler-0.18.4/debian/patches/git_mask_segfault.patch 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/git_mask_segfault.patch 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,76 @@ +From e0d0177562ff546b59b3bc8eb68a08dc740d6f6c Mon Sep 17 00:00:00 2001 +From: Adrian Johnson +Date: Wed, 14 Nov 2012 12:14:20 +0000 +Subject: cairo: Fix crash in CairoImageOutputDev with setSoftMaskFromImageMask + +Bug 57067 +--- +--- a/poppler/CairoOutputDev.cc ++++ b/poppler/CairoOutputDev.cc +@@ -2991,6 +2991,52 @@ + } + } + ++void CairoImageOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, ++ int width, int height, GBool invert, ++ GBool inlineImg, double *baseMatrix) ++{ ++ cairo_t *cr; ++ cairo_surface_t *surface; ++ double x1, y1, x2, y2; ++ double *ctm; ++ double mat[6]; ++ CairoImage *image; ++ ++ ctm = state->getCTM(); ++ ++ mat[0] = ctm[0]; ++ mat[1] = ctm[1]; ++ mat[2] = -ctm[2]; ++ mat[3] = -ctm[3]; ++ mat[4] = ctm[2] + ctm[4]; ++ mat[5] = ctm[3] + ctm[5]; ++ x1 = mat[4]; ++ y1 = mat[5]; ++ x2 = x1 + width; ++ y2 = y1 + height; ++ ++ image = new CairoImage (x1, y1, x2, y2); ++ saveImage (image); ++ ++ if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { ++ surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); ++ cr = cairo_create (surface); ++ setCairo (cr); ++ cairo_translate (cr, 0, height); ++ cairo_scale (cr, width, -height); ++ ++ CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, inlineImg, gFalse); ++ if (state->getFillColorSpace()->getMode() == csPattern) { ++ cairo_mask (cairo, mask); ++ } ++ image->setImage (surface); ++ ++ setCairo (NULL); ++ cairo_surface_destroy (surface); ++ cairo_destroy (cr); ++ } ++} ++ + void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, + GBool interpolate, int *maskColors, GBool inlineImg) +--- a/poppler/CairoOutputDev.h ++++ b/poppler/CairoOutputDev.h +@@ -465,6 +465,11 @@ + Stream *maskStr, + int maskWidth, int maskHeight, + GBool maskInvert, GBool maskInterpolate); ++ virtual void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, ++ int width, int height, GBool invert, ++ GBool inlineImg, double *baseMatrix); ++ virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) {} ++ + + //----- transparency groups and soft masks + virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, diff -Nru poppler-0.18.4/debian/patches/git_no_buggy_check.patch poppler-0.20.5/debian/patches/git_no_buggy_check.patch --- poppler-0.18.4/debian/patches/git_no_buggy_check.patch 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/git_no_buggy_check.patch 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,42 @@ +From 15f600a5702788f7e5b91cd67bc2438179921939 Mon Sep 17 00:00:00 2001 +From: Albert Astals Cid +Date: Thu, 15 Nov 2012 21:17:27 +0000 +Subject: Don't do a check for sanity that then we don't use + +Fixes bugs 56753 and 51684 +--- +--- a/fofi/FoFiTrueType.cc ++++ b/fofi/FoFiTrueType.cc +@@ -2073,32 +2073,6 @@ + return; + } + +- // make sure the loca table is sane (correct length and entries are +- // in bounds) +- if (!openTypeCFF) { +- i = seekTable("loca"); +- if (tables[i].len < 0) { +- parsedOk = gFalse; +- return; +- } +- if (tables[i].len < (nGlyphs + 1) * (locaFmt ? 4 : 2)) { +- nGlyphs = tables[i].len / (locaFmt ? 4 : 2) - 1; +- } +- for (j = 0; j <= nGlyphs; ++j) { +- if (locaFmt) { +- pos = (int)getU32BE(tables[i].offset + j*4, &parsedOk); +- } else { +- pos = getU16BE(tables[i].offset + j*2, &parsedOk); +- } +- if (pos < 0 || pos > len) { +- parsedOk = gFalse; +- } +- } +- if (!parsedOk) { +- return; +- } +- } +- + // read the post table + readPostTable(); + } diff -Nru poppler-0.18.4/debian/patches/git_test_rotation.patch poppler-0.20.5/debian/patches/git_test_rotation.patch --- poppler-0.18.4/debian/patches/git_test_rotation.patch 2012-02-21 13:50:55.000000000 +0000 +++ poppler-0.20.5/debian/patches/git_test_rotation.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,33 +0,0 @@ -From ce1b6c7ca16847f07eeafc29c6503be6fa5a9a3d Mon Sep 17 00:00:00 2001 -From: Patrick Pfeifer -Date: Thu, 19 Jan 2012 13:54:48 +0000 -Subject: cairo: Fix test for rotation - -Fixes bug #14619. ---- -diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc -index 051f5d0..d49b87f 100644 ---- a/poppler/CairoOutputDev.cc -+++ b/poppler/CairoOutputDev.cc -@@ -1834,7 +1834,11 @@ void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - cairo_get_matrix (cairo, &matrix); - //XXX: it is possible that we should only do sub pixel positioning if - // we are rendering fonts */ -- if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) { -+ if (!printing && prescaleImages -+ /* not rotated */ -+ && matrix.xy == 0 && matrix.yx == 0 -+ /* axes not flipped / not 180 deg rotated */ -+ && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) { - drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg); - } else { - drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg); -@@ -1969,6 +1973,8 @@ void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream - - /* cairo does a very poor job of scaling down images so we scale them ourselves */ - -+ LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height)); -+ - /* this scaling code is adopted from the splash image scaling code */ - cairo_get_matrix(cairo, &matrix); - #if 0 diff -Nru poppler-0.18.4/debian/patches/ltmain-as-needed.diff poppler-0.20.5/debian/patches/ltmain-as-needed.diff --- poppler-0.18.4/debian/patches/ltmain-as-needed.diff 2012-02-12 17:36:38.000000000 +0000 +++ poppler-0.20.5/debian/patches/ltmain-as-needed.diff 2013-01-09 10:56:35.000000000 +0000 @@ -15,7 +15,7 @@ -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result -@@ -6160,6 +6165,15 @@ func_mode_link () +@@ -6163,6 +6168,15 @@ func_mode_link () lib= found=no case $deplib in diff -Nru poppler-0.18.4/debian/patches/poppler-lcm2.patch poppler-0.20.5/debian/patches/poppler-lcm2.patch --- poppler-0.18.4/debian/patches/poppler-lcm2.patch 2012-02-21 13:50:55.000000000 +0000 +++ poppler-0.20.5/debian/patches/poppler-lcm2.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,637 +0,0 @@ ---- a/config.h.in -+++ b/config.h.in -@@ -194,6 +194,9 @@ - /* Use single precision arithmetic in the Splash backend */ - #undef USE_FLOAT - -+/* Defines if use lcms1 */ -+#undef USE_LCMS1 -+ - /* Version number of package */ - #undef VERSION - ---- a/configure -+++ b/configure -@@ -622,6 +622,8 @@ - POPPLER_MAJOR_VERSION - PC_REQUIRES_PRIVATE - PC_REQUIRES -+USE_LCMS1_FALSE -+USE_LCMS1_TRUE - USE_CMS_FALSE - USE_CMS_TRUE - LCMS_LIBS -@@ -22853,6 +22855,78 @@ - pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$LCMS_LIBS"; then -+ pkg_cv_LCMS_LIBS="$LCMS_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+ -+ -+ -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no -+fi -+ if test $_pkg_short_errors_supported = yes; then -+ LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1` -+ else -+ LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$LCMS_PKG_ERRORS" >&5 -+ -+ lcms2=no -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ lcms2=no -+else -+ LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS -+ LCMS_LIBS=$pkg_cv_LCMS_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ lcms2=yes -+fi -+ if test x$lcms2 = xno; then -+ -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 -+$as_echo_n "checking for LCMS... " >&6; } -+ -+if test -n "$LCMS_CFLAGS"; then -+ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 - ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 - ac_status=$? -@@ -22935,6 +23009,7 @@ - $as_echo "yes" >&6; } - - fi -+ fi - elif test x$enable_cms = xtry; then - - pkg_failed=no -@@ -22945,6 +23020,80 @@ - pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+if test -n "$LCMS_LIBS"; then -+ pkg_cv_LCMS_LIBS="$LCMS_LIBS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ -+ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5 -+ ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5 -+ ac_status=$? -+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 -+ test $ac_status = 0; }; then -+ pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null` -+ test "x$?" != "x0" && pkg_failed=yes -+else -+ pkg_failed=yes -+fi -+ else -+ pkg_failed=untried -+fi -+ -+ -+ -+if test $pkg_failed = yes; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ -+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then -+ _pkg_short_errors_supported=yes -+else -+ _pkg_short_errors_supported=no -+fi -+ if test $_pkg_short_errors_supported = yes; then -+ LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "lcms2" 2>&1` -+ else -+ LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "lcms2" 2>&1` -+ fi -+ # Put the nasty error message in config.log where it belongs -+ echo "$LCMS_PKG_ERRORS" >&5 -+ -+ lcms2=no -+elif test $pkg_failed = untried; then -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -+$as_echo "no" >&6; } -+ lcms2=no -+else -+ LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS -+ LCMS_LIBS=$pkg_cv_LCMS_LIBS -+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -+$as_echo "yes" >&6; } -+ lcms2=yes -+fi -+ if test x$lcms2 = xyes; then -+ enable_cms=yes -+ else -+ -+pkg_failed=no -+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5 -+$as_echo_n "checking for LCMS... " >&6; } -+ -+if test -n "$LCMS_CFLAGS"; then -+ pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS" -+ elif test -n "$PKG_CONFIG"; then -+ if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms\""; } >&5 - ($PKG_CONFIG --exists --print-errors "lcms") 2>&5 - ac_status=$? -@@ -23007,12 +23156,19 @@ - $as_echo "yes" >&6; } - enable_cms=yes - fi -+ fi - fi - - if test "x$enable_cms" = "xyes"; then - - $as_echo "#define USE_CMS 1" >>confdefs.h - -+ if test "x$lcms2" != "xyes"; then -+ lcms1=yes; -+ -+$as_echo "#define USE_LCMS1 1" >>confdefs.h -+ -+ fi - fi - if test x$enable_cms = xyes; then - USE_CMS_TRUE= -@@ -23022,6 +23178,14 @@ - USE_CMS_FALSE= - fi - -+ if test x$lcms1 = xyes; then -+ USE_LCMS1_TRUE= -+ USE_LCMS1_FALSE='#' -+else -+ USE_LCMS1_TRUE='#' -+ USE_LCMS1_FALSE= -+fi -+ - - if test "x$GCC" != xyes; then - enable_compile_warnings=no -@@ -23290,6 +23454,10 @@ - as_fn_error $? "conditional \"USE_CMS\" was never defined. - Usually this means the macro was only invoked conditionally." "$LINENO" 5 - fi -+if test -z "${USE_LCMS1_TRUE}" && test -z "${USE_LCMS1_FALSE}"; then -+ as_fn_error $? "conditional \"USE_LCMS1\" was never defined. -+Usually this means the macro was only invoked conditionally." "$LINENO" 5 -+fi - - : "${CONFIG_STATUS=./config.status}" - ac_write_fail=0 -@@ -25853,6 +26021,13 @@ - echo " use libcurl: $enable_libcurl" - echo " use libopenjpeg: $enable_libopenjpeg" - echo " use cms: $enable_cms" -+if test x$enable_cms = xyes;then -+ if test x$lcms1 = xyes;then -+ echo " with lcms1" -+ else -+ echo " with lcms2" -+ fi -+fi - echo " command line utils: $enable_utils" - echo "" - ---- a/configure.ac -+++ b/configure.ac -@@ -562,15 +562,28 @@ - enable_cms=$enableval, - enable_cms="try") - if test x$enable_cms = xyes; then -- PKG_CHECK_MODULES(LCMS, lcms) -+ PKG_CHECK_MODULES(LCMS, lcms2, [lcms2=yes], [lcms2=no]) -+ if test x$lcms2 = xno; then -+ PKG_CHECK_MODULES(LCMS, lcms) -+ fi - elif test x$enable_cms = xtry; then -- PKG_CHECK_MODULES(LCMS, lcms, [enable_cms=yes], [enable_cms=no]) -+ PKG_CHECK_MODULES(LCMS, lcms2,[lcms2=yes],[lcms2=no]) -+ if test x$lcms2 = xyes; then -+ enable_cms=yes -+ else -+ PKG_CHECK_MODULES(LCMS, lcms,[enable_cms=yes],[enable_cms=no]) -+ fi - fi - - if test "x$enable_cms" = "xyes"; then - AC_DEFINE(USE_CMS, 1, [Defines if use cms]) -+ if test "x$lcms2" != "xyes"; then -+ lcms1=yes; -+ AC_DEFINE(USE_LCMS1, 1, [Defines if use lcms1]) -+ fi - fi - AM_CONDITIONAL(USE_CMS, test x$enable_cms = xyes) -+AM_CONDITIONAL(USE_LCMS1, test x$lcms1 = xyes) - - if test "x$GCC" != xyes; then - enable_compile_warnings=no -@@ -654,6 +667,13 @@ - echo " use libcurl: $enable_libcurl" - echo " use libopenjpeg: $enable_libopenjpeg" - echo " use cms: $enable_cms" -+if test x$enable_cms = xyes;then -+ if test x$lcms1 = xyes;then -+ echo " with lcms1" -+ else -+ echo " with lcms2" -+ fi -+fi - echo " command line utils: $enable_utils" - echo "" - ---- a/poppler/GfxState.cc -+++ b/poppler/GfxState.cc -@@ -146,7 +146,40 @@ - - #ifdef USE_CMS - -+#ifdef USE_LCMS1 - #include -+#define cmsColorSpaceSignature icColorSpaceSignature -+#define cmsSetLogErrorHandler cmsSetErrorHandler -+#define cmsSigXYZData icSigXYZData -+#define cmsSigLuvData icSigLuvData -+#define cmsSigLabData icSigLabData -+#define cmsSigYCbCrData icSigYCbCrData -+#define cmsSigYxyData icSigYxyData -+#define cmsSigRgbData icSigRgbData -+#define cmsSigHsvData icSigHsvData -+#define cmsSigHlsData icSigHlsData -+#define cmsSigCmyData icSigCmyData -+#define cmsSig3colorData icSig3colorData -+#define cmsSigGrayData icSigGrayData -+#define cmsSigCmykData icSigCmykData -+#define cmsSig4colorData icSig4colorData -+#define cmsSig2colorData icSig2colorData -+#define cmsSig5colorData icSig5colorData -+#define cmsSig6colorData icSig6colorData -+#define cmsSig7colorData icSig7colorData -+#define cmsSig8colorData icSig8colorData -+#define cmsSig9colorData icSig9colorData -+#define cmsSig10colorData icSig10colorData -+#define cmsSig11colorData icSig11colorData -+#define cmsSig12colorData icSig12colorData -+#define cmsSig13colorData icSig13colorData -+#define cmsSig14colorData icSig14colorData -+#define cmsSig15colorData icSig15colorData -+#define LCMS_FLAGS 0 -+#else -+#include -+#define LCMS_FLAGS cmsFLAGS_NOOPTIMIZE -+#endif - - #define COLOR_PROFILE_DIR "/ColorProfiles/" - #define GLOBAL_COLOR_PROFILE_DIR POPPLER_DATADIR COLOR_PROFILE_DIR -@@ -180,8 +213,8 @@ - static GfxColorTransform *XYZ2DisplayTransform = NULL; - - // convert color space signature to cmsColor type --static unsigned int getCMSColorSpaceType(icColorSpaceSignature cs); --static unsigned int getCMSNChannels(icColorSpaceSignature cs); -+static unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs); -+static unsigned int getCMSNChannels(cmsColorSpaceSignature cs); - static cmsHPROFILE loadColorProfile(const char *fileName); - - void GfxColorSpace::setDisplayProfile(void *displayProfileA) { -@@ -332,11 +365,18 @@ - return hp; - } - -+#ifdef USE_LCMS1 - static int CMSError(int ecode, const char *msg) - { - error(-1, "%s", msg); -- return 1; - } -+#else -+static void CMSError(cmsContext contextId, cmsUInt32Number ecode, -+ const char *text) -+{ -+ error(-1, "%s", text); -+} -+#endif - - int GfxColorSpace::setupColorProfiles() - { -@@ -349,7 +389,7 @@ - initialized = gTrue; - - // set error handlor -- cmsSetErrorHandler(CMSError); -+ cmsSetLogErrorHandler(CMSError); - - if (displayProfile == NULL) { - // load display profile if it was not already loaded. -@@ -375,7 +415,7 @@ - displayProfile, - COLORSPACE_SH(displayPixelType) | - CHANNELS_SH(nChannels) | BYTES_SH(1), -- INTENT_RELATIVE_COLORIMETRIC,0)) == 0) { -+ INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) { - error(-1, "Can't create Lab transform"); - } else { - XYZ2DisplayTransform = new GfxColorTransform(transform); -@@ -385,125 +425,124 @@ - return 0; - } - --unsigned int getCMSColorSpaceType(icColorSpaceSignature cs) -+unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs) - { - switch (cs) { -- case icSigXYZData: -+ case cmsSigXYZData: - return PT_XYZ; - break; -- case icSigLabData: -+ case cmsSigLabData: - return PT_Lab; - break; -- case icSigLuvData: -+ case cmsSigLuvData: - return PT_YUV; - break; -- case icSigYCbCrData: -+ case cmsSigYCbCrData: - return PT_YCbCr; - break; -- case icSigYxyData: -+ case cmsSigYxyData: - return PT_Yxy; - break; -- case icSigRgbData: -+ case cmsSigRgbData: - return PT_RGB; - break; -- case icSigGrayData: -+ case cmsSigGrayData: - return PT_GRAY; - break; -- case icSigHsvData: -+ case cmsSigHsvData: - return PT_HSV; - break; -- case icSigHlsData: -+ case cmsSigHlsData: - return PT_HLS; - break; -- case icSigCmykData: -+ case cmsSigCmykData: - return PT_CMYK; - break; -- case icSigCmyData: -+ case cmsSigCmyData: - return PT_CMY; - break; -- case icSig2colorData: -- case icSig3colorData: -- case icSig4colorData: -- case icSig5colorData: -- case icSig6colorData: -- case icSig7colorData: -- case icSig8colorData: -- case icSig9colorData: -- case icSig10colorData: -- case icSig11colorData: -- case icSig12colorData: -- case icSig13colorData: -- case icSig14colorData: -- case icSig15colorData: -+ case cmsSig2colorData: -+ case cmsSig3colorData: -+ case cmsSig4colorData: -+ case cmsSig5colorData: -+ case cmsSig6colorData: -+ case cmsSig7colorData: -+ case cmsSig8colorData: -+ case cmsSig9colorData: -+ case cmsSig10colorData: -+ case cmsSig11colorData: -+ case cmsSig12colorData: -+ case cmsSig13colorData: -+ case cmsSig14colorData: -+ case cmsSig15colorData: - default: - break; - } - return PT_RGB; - } - --unsigned int getCMSNChannels(icColorSpaceSignature cs) -+unsigned int getCMSNChannels(cmsColorSpaceSignature cs) - { - switch (cs) { -- case icSigXYZData: -- case icSigLuvData: -- case icSigLabData: -- case icSigYCbCrData: -- case icSigYxyData: -- case icSigRgbData: -- case icSigHsvData: -- case icSigHlsData: -- case icSigCmyData: -- case icSig3colorData: -+ case cmsSigXYZData: -+ case cmsSigLuvData: -+ case cmsSigLabData: -+ case cmsSigYCbCrData: -+ case cmsSigYxyData: -+ case cmsSigRgbData: -+ case cmsSigHsvData: -+ case cmsSigHlsData: -+ case cmsSigCmyData: -+ case cmsSig3colorData: - return 3; - break; -- case icSigGrayData: -+ case cmsSigGrayData: - return 1; - break; -- case icSigCmykData: -- case icSig4colorData: -+ case cmsSigCmykData: -+ case cmsSig4colorData: - return 4; - break; -- case icSig2colorData: -+ case cmsSig2colorData: - return 2; - break; -- case icSig5colorData: -+ case cmsSig5colorData: - return 5; - break; -- case icSig6colorData: -+ case cmsSig6colorData: - return 6; - break; -- case icSig7colorData: -+ case cmsSig7colorData: - return 7; - break; -- case icSig8colorData: -+ case cmsSig8colorData: - return 8; - break; -- case icSig9colorData: -+ case cmsSig9colorData: - return 9; - break; -- case icSig10colorData: -+ case cmsSig10colorData: - return 10; - break; -- case icSig11colorData: -+ case cmsSig11colorData: - return 11; - break; -- case icSig12colorData: -+ case cmsSig12colorData: - return 12; - break; -- case icSig13colorData: -+ case cmsSig13colorData: - return 13; - break; -- case icSig14colorData: -+ case cmsSig14colorData: - return 14; - break; -- case icSig15colorData: -+ case cmsSig15colorData: - return 15; - default: - break; - } - return 3; - } -- - #endif - - //------------------------------------------------------------------------ -@@ -1631,7 +1670,7 @@ - dhp, - COLORSPACE_SH(dcst) | - CHANNELS_SH(dNChannels) | BYTES_SH(1), -- INTENT_RELATIVE_COLORIMETRIC,0)) == 0) { -+ INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) { - error(-1, "Can't create transform"); - cs->transform = NULL; - } else { -@@ -1641,7 +1680,7 @@ - // create line transform only when the display is RGB type color space - if ((transform = cmsCreateTransform(hp, - CHANNELS_SH(nCompsA) | BYTES_SH(1),dhp, -- TYPE_RGB_8,INTENT_RELATIVE_COLORIMETRIC,0)) == 0) { -+ TYPE_RGB_8,INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) { - error(-1, "Can't create transform"); - cs->lineTransform = NULL; - } else { ---- a/qt4/src/poppler-document.cc -+++ b/qt4/src/poppler-document.cc -@@ -40,7 +40,11 @@ - #include "poppler-page-private.h" - - #if defined(USE_CMS) -+#if defined(USE_LCMS1) - #include -+#else -+#include -+#endif - #endif - - namespace Poppler { ---- a/utils/pdftocairo.cc -+++ b/utils/pdftocairo.cc -@@ -50,7 +50,11 @@ - #include "PDFDocFactory.h" - #include "CairoOutputDev.h" - #if USE_CMS -+#ifdef USE_LCMS1 - #include -+#else -+#include -+#endif - #endif - #include - #if CAIRO_HAS_PS_SURFACE -@@ -257,10 +261,22 @@ - writer = new PNGWriter(PNGWriter::RGB); - - #if USE_CMS -+#ifdef USE_LCMS1 - if (icc_data) - static_cast(writer)->setICCProfile(cmsTakeProductName(profile), icc_data, icc_data_size); - else - static_cast(writer)->setSRGBProfile(); -+#else -+ if (icc_data) { -+ cmsUInt8Number profileID[17]; -+ profileID[16] = '\0'; -+ -+ cmsGetHeaderProfileID(profile,profileID); -+ static_cast(writer)->setICCProfile(reinterpret_cast(profileID), icc_data, icc_data_size); -+ } else { -+ static_cast(writer)->setSRGBProfile(); -+ } -+#endif - #endif - #endif - diff -Nru poppler-0.18.4/debian/patches/qt4-visibility.diff poppler-0.20.5/debian/patches/qt4-visibility.diff --- poppler-0.18.4/debian/patches/qt4-visibility.diff 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/patches/qt4-visibility.diff 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,42 @@ +Author: Pino Toscano +Description: Hidden visibility for poppler-qt4 + Enables the hidden visibility for poppler-qt4, hiding all the non-exported + symbols. + . + The addition in poppler-export.h could fit upstream, while the CXXFLAGS + additions need to be added with proper configure check. +Forwarded: no +Last-Update: 2012-08-11 + +--- a/qt4/src/Makefile.am ++++ b/qt4/src/Makefile.am +@@ -54,6 +54,7 @@ + poppler-embeddedfile-private.h + + libpoppler_qt4_la_CXXFLAGS = \ ++ -fvisibility=hidden -fvisibility-inlines-hidden \ + -Dpoppler_qt4_EXPORTS + + libpoppler_qt4_la_LIBADD = \ +--- a/qt4/src/Makefile.in ++++ b/qt4/src/Makefile.in +@@ -415,6 +415,7 @@ + poppler-embeddedfile-private.h + + libpoppler_qt4_la_CXXFLAGS = \ ++ -fvisibility=hidden -fvisibility-inlines-hidden \ + -Dpoppler_qt4_EXPORTS + + libpoppler_qt4_la_LIBADD = \ +--- a/qt4/src/poppler-export.h ++++ b/qt4/src/poppler-export.h +@@ -5,6 +5,9 @@ + #if defined(_WIN32) + # define LIB_EXPORT __declspec(dllexport) + # define LIB_IMPORT __declspec(dllimport) ++#elif defined(__GNUC__) ++# define LIB_EXPORT __attribute__((visibility("default"))) ++# define LIB_IMPORT + #else + # define LIB_EXPORT + # define LIB_IMPORT diff -Nru poppler-0.18.4/debian/patches/series poppler-0.20.5/debian/patches/series --- poppler-0.18.4/debian/patches/series 2012-02-21 14:03:38.000000000 +0000 +++ poppler-0.20.5/debian/patches/series 2013-03-08 17:59:06.000000000 +0000 @@ -1,4 +1,9 @@ ltmain-as-needed.diff -10_fix-a4-page-shift-on-brother-ps-printers.patch -poppler-lcm2.patch -git_test_rotation.patch +qt4-visibility.diff +git_gouraud_shading_support.patch +git_mask_segfault.patch +git_no_buggy_check.patch + +CVE-2013-1788.patch +CVE-2013-1789.patch +CVE-2013-1790.patch diff -Nru poppler-0.18.4/debian/rules poppler-0.20.5/debian/rules --- poppler-0.18.4/debian/rules 2012-02-12 21:45:22.000000000 +0000 +++ poppler-0.20.5/debian/rules 2013-01-09 10:56:35.000000000 +0000 @@ -1,5 +1,11 @@ #!/usr/bin/make -f +# the upstream version (i.e. without the Debian revision) +UPSTREAM_VERSION := $(shell dpkg-parsechangelog | sed -n 's/^Version: //p' | cut -f1 -d '-') +# symbols.in files & their "generated" file names +SYMBOLS_in := $(wildcard debian/*.symbols.in) +SYMBOLS_generated := $(patsubst %.in,%,$(SYMBOLS_in)) + # use qt4's moc as the default moc is qt3's when both are installed PATH := /usr/share/qt4/bin:$(PATH) export PATH @@ -10,6 +16,9 @@ # make the build verbose export V=1 +# enable all the hardening options +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + # disable gtk stuff to minimize Build-Depends CONFIGURE_ARGS := \ --enable-libjpeg \ @@ -26,9 +35,10 @@ %: dh $@ --parallel --with gir -override_dh_auto_clean:: +override_dh_auto_clean: dh_auto_clean rm -f glib/reference/html/* + rm -f $(SYMBOLS_generated) override_dh_auto_configure: dh_auto_configure -- $(CONFIGURE_ARGS) @@ -37,17 +47,18 @@ dh_install --list-missing override_dh_installchangelogs: - dh_installchangelogs -plibpoppler19 + dh_installchangelogs -plibpoppler28 dh_installchangelogs --remaining-packages -XChangeLog override_dh_strip: dh_strip --dbg-package=poppler-dbg -override_dh_makeshlibs: - dh_makeshlibs -plibpoppler19 -V"libpoppler19" +override_dh_makeshlibs: $(SYMBOLS_generated) + dh_makeshlibs -plibpoppler28 -V dh_makeshlibs -plibpoppler-cpp0 -V"libpoppler-cpp0 (>= 0.16)" - dh_makeshlibs -plibpoppler-glib8 -V"libpoppler-glib8 (>= 0.18)" - dh_makeshlibs -plibpoppler-qt4-3 -V"libpoppler-qt4-3 (>= 0.18)" dh_makeshlibs --remaining-packages +debian/%.symbols: debian/%.symbols.in + cat $^ | sed -e 's/#CURVER#/$(UPSTREAM_VERSION)/g' > $@ + .PHONY: override_dh_auto_test diff -Nru poppler-0.18.4/debian/tests/build poppler-0.20.5/debian/tests/build --- poppler-0.18.4/debian/tests/build 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/tests/build 2013-01-16 15:14:15.000000000 +0000 @@ -0,0 +1,34 @@ +#!/bin/sh +# autopkgtest check: Build and run a program against libpoppler, to verify that the +# headers and pkg-config file are installed correctly +# (C) 2012 Canonical Ltd. +# Author: Daniel Kessel + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM +cd $WORKDIR +cat < libpopplertest.c +#include + +int main() +{ +#if !defined(GLIB_VERSION_2_36) + g_type_init(); +#endif + PopplerDocument* doc = poppler_document_new_from_file("file:///usr/share/cups/data/default-testpage.pdf", NULL, NULL); + g_assert(doc != NULL); + + int n_pages = poppler_document_get_n_pages(doc); + g_assert_cmpint(n_pages, == , 1); + + return 0; +} +EOF + +gcc -o libpopplertest libpopplertest.c `pkg-config --cflags --libs poppler-glib` -Wall -Werror +echo "build: OK" +[ -x libpopplertest ] +./libpopplertest +echo "run: OK" diff -Nru poppler-0.18.4/debian/tests/control poppler-0.20.5/debian/tests/control --- poppler-0.18.4/debian/tests/control 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/debian/tests/control 2013-01-09 10:56:35.000000000 +0000 @@ -0,0 +1,2 @@ +Tests: build +Depends: libpoppler-glib-dev, cups-filters, build-essential diff -Nru poppler-0.18.4/depcomp poppler-0.20.5/depcomp --- poppler-0.18.4/depcomp 2011-11-22 21:37:10.000000000 +0000 +++ poppler-0.20.5/depcomp 2012-06-10 18:43:19.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-12-04.11; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free -# Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, +# 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. + tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . @@ -90,10 +90,18 @@ # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 - cygpath_u="sed s,\\\\\\\\,/,g" + cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi +if test "$depmode" = msvc7msys; then + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvc7 +fi + case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what @@ -158,10 +166,12 @@ ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as -## well. +## well. hp depmode also adds that space, but also prefixes the VPATH +## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. - sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -405,6 +415,52 @@ rm -f "$tmpdepfile" ;; +msvc7) + if test "$libtool" = yes; then + showIncludes=-Wc,-showIncludes + else + showIncludes=-showIncludes + fi + "$@" $showIncludes > "$tmpdepfile" + stat=$? + grep -v '^Note: including file: ' "$tmpdepfile" + if test "$stat" = 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + # The first sed program below extracts the file names and escapes + # backslashes for cygpath. The second sed program outputs the file + # name when reading, but also accumulates all include files in the + # hold buffer in order to output them again at the end. This only + # works with sed implementations that can handle large buffers. + sed < "$tmpdepfile" -n ' +/^Note: including file: *\(.*\)/ { + s//\1/ + s/\\/\\\\/g + p +}' | $cygpath_u | sort -u | sed -n ' +s/ /\\ /g +s/\(.*\)/ \1 \\/p +s/.\(.*\) \\/\1:/ +H +$ { + s/.*/ / + G + p +}' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvc7msys) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. @@ -503,7 +559,9 @@ touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" + # makedepend may prepend the VPATH from the source file name to the object. + # No need to regex-escape $object, excess matching of '.' is harmless. + sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation diff -Nru poppler-0.18.4/fofi/FoFiBase.cc poppler-0.20.5/fofi/FoFiBase.cc --- poppler-0.18.4/fofi/FoFiBase.cc 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiBase.cc 2012-05-10 20:05:44.000000000 +0000 @@ -28,6 +28,7 @@ #endif #include +#include #include "goo/gmem.h" #include "poppler/Error.h" #include "FoFiBase.h" @@ -54,22 +55,22 @@ int n; if (!(f = fopen(fileName, "rb"))) { - error(-1, "Cannot open '%s'", fileName); + error(errIO, -1, "Cannot open '{0:s}'", fileName); return NULL; } if (fseek(f, 0, SEEK_END) != 0) { - error(-1, "Cannot seek to end of '%s'", fileName); + error(errIO, -1, "Cannot seek to end of '{0:s}'", fileName); fclose(f); return NULL; } n = (int)ftell(f); if (n < 0) { - error(-1, "Cannot determine length of '%s'", fileName); + error(errIO, -1, "Cannot determine length of '{0:s}'", fileName); fclose(f); return NULL; } if (fseek(f, 0, SEEK_SET) != 0) { - error(-1, "Cannot seek to start of '%s'", fileName); + error(errIO, -1, "Cannot seek to start of '{0:s}'", fileName); fclose(f); return NULL; } @@ -109,7 +110,7 @@ int FoFiBase::getS16BE(int pos, GBool *ok) { int x; - if (pos < 0 || pos+1 >= len) { + if (pos < 0 || pos+1 >= len || pos > INT_MAX - 1) { *ok = gFalse; return 0; } @@ -124,7 +125,7 @@ int FoFiBase::getU16BE(int pos, GBool *ok) { int x; - if (pos < 0 || pos+1 >= len) { + if (pos < 0 || pos+1 >= len || pos > INT_MAX - 1) { *ok = gFalse; return 0; } @@ -136,7 +137,7 @@ int FoFiBase::getS32BE(int pos, GBool *ok) { int x; - if (pos < 0 || pos+3 >= len) { + if (pos < 0 || pos+3 >= len || pos > INT_MAX - 3) { *ok = gFalse; return 0; } @@ -153,7 +154,7 @@ Guint FoFiBase::getU32BE(int pos, GBool *ok) { Guint x; - if (pos < 0 || pos+3 >= len) { + if (pos < 0 || pos+3 >= len || pos > INT_MAX - 3) { *ok = gFalse; return 0; } @@ -164,11 +165,25 @@ return x; } +Guint FoFiBase::getU32LE(int pos, GBool *ok) { + Guint x; + + if (pos < 0 || pos+3 >= len || pos > INT_MAX - 3) { + *ok = gFalse; + return 0; + } + x = file[pos+3]; + x = (x << 8) + file[pos+2]; + x = (x << 8) + file[pos+1]; + x = (x << 8) + file[pos]; + return x; +} + Guint FoFiBase::getUVarBE(int pos, int size, GBool *ok) { Guint x; int i; - if (pos < 0 || pos + size > len) { + if (pos < 0 || pos + size > len || pos > INT_MAX - size) { *ok = gFalse; return 0; } diff -Nru poppler-0.18.4/fofi/FoFiBase.h poppler-0.20.5/fofi/FoFiBase.h --- poppler-0.18.4/fofi/FoFiBase.h 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiBase.h 2012-05-10 20:05:44.000000000 +0000 @@ -17,7 +17,7 @@ //------------------------------------------------------------------------ -typedef void (*FoFiOutputFunc)(void *stream, char *data, int len); +typedef void (*FoFiOutputFunc)(void *stream, const char *data, int len); //------------------------------------------------------------------------ // FoFiBase @@ -42,6 +42,7 @@ int getU16BE(int pos, GBool *ok); int getS32BE(int pos, GBool *ok); Guint getU32BE(int pos, GBool *ok); + Guint getU32LE(int pos, GBool *ok); Guint getUVarBE(int pos, int size, GBool *ok); GBool checkRegion(int pos, int size); diff -Nru poppler-0.18.4/fofi/FoFiEncodings.cc poppler-0.20.5/fofi/FoFiEncodings.cc --- poppler-0.18.4/fofi/FoFiEncodings.cc 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiEncodings.cc 2012-05-10 20:05:44.000000000 +0000 @@ -19,7 +19,7 @@ // Type 1 and 1C font data //------------------------------------------------------------------------ -char *fofiType1StandardEncoding[256] = { +const char *fofiType1StandardEncoding[256] = { NULL, NULL, NULL, @@ -278,7 +278,7 @@ NULL }; -char *fofiType1ExpertEncoding[256] = { +const char *fofiType1ExpertEncoding[256] = { NULL, NULL, NULL, @@ -541,7 +541,7 @@ // Type 1C font data //------------------------------------------------------------------------ -char *fofiType1CStdStrings[391] = { +const char *fofiType1CStdStrings[391] = { ".notdef", "space", "exclam", diff -Nru poppler-0.18.4/fofi/FoFiEncodings.h poppler-0.20.5/fofi/FoFiEncodings.h --- poppler-0.18.4/fofi/FoFiEncodings.h 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiEncodings.h 2012-05-10 20:05:44.000000000 +0000 @@ -19,14 +19,14 @@ // Type 1 and 1C font data //------------------------------------------------------------------------ -extern char *fofiType1StandardEncoding[256]; -extern char *fofiType1ExpertEncoding[256]; +extern const char *fofiType1StandardEncoding[256]; +extern const char *fofiType1ExpertEncoding[256]; //------------------------------------------------------------------------ // Type 1C font data //------------------------------------------------------------------------ -extern char *fofiType1CStdStrings[391]; +extern const char *fofiType1CStdStrings[391]; extern Gushort fofiType1CISOAdobeCharset[229]; extern Gushort fofiType1CExpertCharset[166]; extern Gushort fofiType1CExpertSubsetCharset[87]; diff -Nru poppler-0.18.4/fofi/FoFiIdentifier.cc poppler-0.20.5/fofi/FoFiIdentifier.cc --- poppler-0.18.4/fofi/FoFiIdentifier.cc 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiIdentifier.cc 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,630 @@ +//======================================================================== +// +// FoFiIdentifier.cc +// +// Copyright 2009 Glyph & Cog, LLC +// +//======================================================================== + +#ifdef USE_GCC_PRAGMAS +#pragma implementation +#endif + +#include +#include +#include +#include "goo/gtypes.h" +#include "FoFiIdentifier.h" + +//------------------------------------------------------------------------ + +class Reader { +public: + + virtual ~Reader() {} + + // Read one byte. Returns -1 if past EOF. + virtual int getByte(int pos) = 0; + + // Read a big-endian unsigned 16-bit integer. Fills in *val and + // returns true if successful. + virtual GBool getU16BE(int pos, int *val) = 0; + + // Read a big-endian unsigned 32-bit integer. Fills in *val and + // returns true if successful. + virtual GBool getU32BE(int pos, Guint *val) = 0; + + // Read a little-endian unsigned 32-bit integer. Fills in *val and + // returns true if successful. + virtual GBool getU32LE(int pos, Guint *val) = 0; + + // Read a big-endian unsigned -byte integer, where 1 <= size + // <= 4. Fills in *val and returns true if successful. + virtual GBool getUVarBE(int pos, int size, Guint *val) = 0; + + // Compare against a string. Returns true if equal. + virtual GBool cmp(int pos, const char *s) = 0; + +}; + +//------------------------------------------------------------------------ + +class MemReader: public Reader { +public: + + static MemReader *make(char *bufA, int lenA); + virtual ~MemReader(); + virtual int getByte(int pos); + virtual GBool getU16BE(int pos, int *val); + virtual GBool getU32BE(int pos, Guint *val); + virtual GBool getU32LE(int pos, Guint *val); + virtual GBool getUVarBE(int pos, int size, Guint *val); + virtual GBool cmp(int pos, const char *s); + +private: + + MemReader(char *bufA, int lenA); + + char *buf; + int len; +}; + +MemReader *MemReader::make(char *bufA, int lenA) { + return new MemReader(bufA, lenA); +} + +MemReader::MemReader(char *bufA, int lenA) { + buf = bufA; + len = lenA; +} + +MemReader::~MemReader() { +} + +int MemReader::getByte(int pos) { + if (pos < 0 || pos >= len) { + return -1; + } + return buf[pos] & 0xff; +} + +GBool MemReader::getU16BE(int pos, int *val) { + if (pos < 0 || pos > len - 2) { + return gFalse; + } + *val = ((buf[pos] & 0xff) << 8) + + (buf[pos+1] & 0xff); + return gTrue; +} + +GBool MemReader::getU32BE(int pos, Guint *val) { + if (pos < 0 || pos > len - 4) { + return gFalse; + } + *val = ((buf[pos] & 0xff) << 24) + + ((buf[pos+1] & 0xff) << 16) + + ((buf[pos+2] & 0xff) << 8) + + (buf[pos+3] & 0xff); + return gTrue; +} + +GBool MemReader::getU32LE(int pos, Guint *val) { + if (pos < 0 || pos > len - 4) { + return gFalse; + } + *val = (buf[pos] & 0xff) + + ((buf[pos+1] & 0xff) << 8) + + ((buf[pos+2] & 0xff) << 16) + + ((buf[pos+3] & 0xff) << 24); + return gTrue; +} + +GBool MemReader::getUVarBE(int pos, int size, Guint *val) { + int i; + + if (size < 1 || size > 4 || pos < 0 || pos > len - size) { + return gFalse; + } + *val = 0; + for (i = 0; i < size; ++i) { + *val = (*val << 8) + (buf[pos + i] & 0xff); + } + return gTrue; +} + +GBool MemReader::cmp(int pos, const char *s) { + int n; + + n = (int)strlen(s); + if (pos < 0 || len < n || pos > len - n) { + return gFalse; + } + return !memcmp(buf + pos, s, n); +} + +//------------------------------------------------------------------------ + +class FileReader: public Reader { +public: + + static FileReader *make(char *fileName); + virtual ~FileReader(); + virtual int getByte(int pos); + virtual GBool getU16BE(int pos, int *val); + virtual GBool getU32BE(int pos, Guint *val); + virtual GBool getU32LE(int pos, Guint *val); + virtual GBool getUVarBE(int pos, int size, Guint *val); + virtual GBool cmp(int pos, const char *s); + +private: + + FileReader(FILE *fA); + GBool fillBuf(int pos, int len); + + FILE *f; + char buf[1024]; + int bufPos, bufLen; +}; + +FileReader *FileReader::make(char *fileName) { + FILE *fA; + + if (!(fA = fopen(fileName, "rb"))) { + return NULL; + } + return new FileReader(fA); +} + +FileReader::FileReader(FILE *fA) { + f = fA; + bufPos = 0; + bufLen = 0; +} + +FileReader::~FileReader() { + fclose(f); +} + +int FileReader::getByte(int pos) { + if (!fillBuf(pos, 1)) { + return -1; + } + return buf[pos - bufPos] & 0xff; +} + +GBool FileReader::getU16BE(int pos, int *val) { + if (!fillBuf(pos, 2)) { + return gFalse; + } + *val = ((buf[pos - bufPos] & 0xff) << 8) + + (buf[pos - bufPos + 1] & 0xff); + return gTrue; +} + +GBool FileReader::getU32BE(int pos, Guint *val) { + if (!fillBuf(pos, 4)) { + return gFalse; + } + *val = ((buf[pos - bufPos] & 0xff) << 24) + + ((buf[pos - bufPos + 1] & 0xff) << 16) + + ((buf[pos - bufPos + 2] & 0xff) << 8) + + (buf[pos - bufPos + 3] & 0xff); + return gTrue; +} + +GBool FileReader::getU32LE(int pos, Guint *val) { + if (!fillBuf(pos, 4)) { + return gFalse; + } + *val = (buf[pos - bufPos] & 0xff) + + ((buf[pos - bufPos + 1] & 0xff) << 8) + + ((buf[pos - bufPos + 2] & 0xff) << 16) + + ((buf[pos - bufPos + 3] & 0xff) << 24); + return gTrue; +} + +GBool FileReader::getUVarBE(int pos, int size, Guint *val) { + int i; + + if (size < 1 || size > 4 || !fillBuf(pos, size)) { + return gFalse; + } + *val = 0; + for (i = 0; i < size; ++i) { + *val = (*val << 8) + (buf[pos - bufPos + i] & 0xff); + } + return gTrue; +} + +GBool FileReader::cmp(int pos, const char *s) { + int n; + + n = (int)strlen(s); + if (!fillBuf(pos, n)) { + return gFalse; + } + return !memcmp(buf - bufPos + pos, s, n); +} + +GBool FileReader::fillBuf(int pos, int len) { + if (pos < 0 || len < 0 || len > (int)sizeof(buf) || + pos > INT_MAX - (int)sizeof(buf)) { + return gFalse; + } + if (pos >= bufPos && pos + len <= bufPos + bufLen) { + return gTrue; + } + if (fseek(f, pos, SEEK_SET)) { + return gFalse; + } + bufPos = pos; + bufLen = (int)fread(buf, 1, sizeof(buf), f); + if (bufLen < len) { + return gFalse; + } + return gTrue; +} + +//------------------------------------------------------------------------ + +class StreamReader: public Reader { +public: + + static StreamReader *make(int (*getCharA)(void *data), void *dataA); + virtual ~StreamReader(); + virtual int getByte(int pos); + virtual GBool getU16BE(int pos, int *val); + virtual GBool getU32BE(int pos, Guint *val); + virtual GBool getU32LE(int pos, Guint *val); + virtual GBool getUVarBE(int pos, int size, Guint *val); + virtual GBool cmp(int pos, const char *s); + +private: + + StreamReader(int (*getCharA)(void *data), void *dataA); + GBool fillBuf(int pos, int len); + + int (*getChar)(void *data); + void *data; + int streamPos; + char buf[1024]; + int bufPos, bufLen; +}; + +StreamReader *StreamReader::make(int (*getCharA)(void *data), void *dataA) { + return new StreamReader(getCharA, dataA); +} + +StreamReader::StreamReader(int (*getCharA)(void *data), void *dataA) { + getChar = getCharA; + data = dataA; + streamPos = 0; + bufPos = 0; + bufLen = 0; +} + +StreamReader::~StreamReader() { +} + +int StreamReader::getByte(int pos) { + if (!fillBuf(pos, 1)) { + return -1; + } + return buf[pos - bufPos] & 0xff; +} + +GBool StreamReader::getU16BE(int pos, int *val) { + if (!fillBuf(pos, 2)) { + return gFalse; + } + *val = ((buf[pos - bufPos] & 0xff) << 8) + + (buf[pos - bufPos + 1] & 0xff); + return gTrue; +} + +GBool StreamReader::getU32BE(int pos, Guint *val) { + if (!fillBuf(pos, 4)) { + return gFalse; + } + *val = ((buf[pos - bufPos] & 0xff) << 24) + + ((buf[pos - bufPos + 1] & 0xff) << 16) + + ((buf[pos - bufPos + 2] & 0xff) << 8) + + (buf[pos - bufPos + 3] & 0xff); + return gTrue; +} + +GBool StreamReader::getU32LE(int pos, Guint *val) { + if (!fillBuf(pos, 4)) { + return gFalse; + } + *val = (buf[pos - bufPos] & 0xff) + + ((buf[pos - bufPos + 1] & 0xff) << 8) + + ((buf[pos - bufPos + 2] & 0xff) << 16) + + ((buf[pos - bufPos + 3] & 0xff) << 24); + return gTrue; +} + +GBool StreamReader::getUVarBE(int pos, int size, Guint *val) { + int i; + + if (size < 1 || size > 4 || !fillBuf(pos, size)) { + return gFalse; + } + *val = 0; + for (i = 0; i < size; ++i) { + *val = (*val << 8) + (buf[pos - bufPos + i] & 0xff); + } + return gTrue; +} + +GBool StreamReader::cmp(int pos, const char *s) { + int n; + + n = (int)strlen(s); + if (!fillBuf(pos, n)) { + return gFalse; + } + return !memcmp(buf - bufPos + pos, s, n); +} + +GBool StreamReader::fillBuf(int pos, int len) { + int c; + + if (pos < 0 || len < 0 || len > (int)sizeof(buf) || + pos > INT_MAX - (int)sizeof(buf)) { + return gFalse; + } + if (pos < bufPos) { + return gFalse; + } + + // if requested region will not fit in the current buffer... + if (pos + len > bufPos + (int)sizeof(buf)) { + + // if the start of the requested data is already in the buffer, move + // it to the start of the buffer + if (pos < bufPos + bufLen) { + bufLen -= pos - bufPos; + memmove(buf, buf + (pos - bufPos), bufLen); + bufPos = pos; + + // otherwise discard data from the + // stream until we get to the requested position + } else { + bufPos += bufLen; + bufLen = 0; + while (bufPos < pos) { + if ((c = (*getChar)(data)) < 0) { + return gFalse; + } + ++bufPos; + } + } + } + + // read the rest of the requested data + while (bufPos + bufLen < pos + len) { + if ((c = (*getChar)(data)) < 0) { + return gFalse; + } + buf[bufLen++] = (char)c; + } + + return gTrue; +} + +//------------------------------------------------------------------------ + +static FoFiIdentifierType identify(Reader *reader); +static FoFiIdentifierType identifyOpenType(Reader *reader); +static FoFiIdentifierType identifyCFF(Reader *reader, int start); + +FoFiIdentifierType FoFiIdentifier::identifyMem(char *file, int len) { + MemReader *reader; + FoFiIdentifierType type; + + if (!(reader = MemReader::make(file, len))) { + return fofiIdError; + } + type = identify(reader); + delete reader; + return type; +} + +FoFiIdentifierType FoFiIdentifier::identifyFile(char *fileName) { + FileReader *reader; + FoFiIdentifierType type; + + if (!(reader = FileReader::make(fileName))) { + return fofiIdError; + } + type = identify(reader); + delete reader; + return type; +} + +FoFiIdentifierType FoFiIdentifier::identifyStream(int (*getChar)(void *data), + void *data) { + StreamReader *reader; + FoFiIdentifierType type; + + if (!(reader = StreamReader::make(getChar, data))) { + return fofiIdError; + } + type = identify(reader); + delete reader; + return type; +} + +static FoFiIdentifierType identify(Reader *reader) { + Guint n; + + //----- PFA + if (reader->cmp(0, "%!PS-AdobeFont-1") || + reader->cmp(0, "%!FontType1")) { + return fofiIdType1PFA; + } + + //----- PFB + if (reader->getByte(0) == 0x80 && + reader->getByte(1) == 0x01 && + reader->getU32LE(2, &n)) { + if ((n >= 16 && reader->cmp(6, "%!PS-AdobeFont-1")) || + (n >= 11 && reader->cmp(6, "%!FontType1"))) { + return fofiIdType1PFB; + } + } + + //----- TrueType + if ((reader->getByte(0) == 0x00 && + reader->getByte(1) == 0x01 && + reader->getByte(2) == 0x00 && + reader->getByte(3) == 0x00) || + (reader->getByte(0) == 0x74 && // 'true' + reader->getByte(1) == 0x72 && + reader->getByte(2) == 0x75 && + reader->getByte(3) == 0x65)) { + return fofiIdTrueType; + } + if (reader->getByte(0) == 0x74 && // 'ttcf' + reader->getByte(1) == 0x74 && + reader->getByte(2) == 0x63 && + reader->getByte(3) == 0x66) { + return fofiIdTrueTypeCollection; + } + + //----- OpenType + if (reader->getByte(0) == 0x4f && // 'OTTO + reader->getByte(1) == 0x54 && + reader->getByte(2) == 0x54 && + reader->getByte(3) == 0x4f) { + return identifyOpenType(reader); + } + + //----- CFF + if (reader->getByte(0) == 0x01 && + reader->getByte(1) == 0x00) { + return identifyCFF(reader, 0); + } + // some tools embed CFF fonts with an extra whitespace char at the + // beginning + if (reader->getByte(1) == 0x01 && + reader->getByte(2) == 0x00) { + return identifyCFF(reader, 1); + } + + return fofiIdUnknown; +} + +static FoFiIdentifierType identifyOpenType(Reader *reader) { + FoFiIdentifierType type; + Guint offset; + int nTables, i; + + if (!reader->getU16BE(4, &nTables)) { + return fofiIdUnknown; + } + for (i = 0; i < nTables; ++i) { + if (reader->cmp(12 + i*16, "CFF ")) { + if (reader->getU32BE(12 + i*16 + 8, &offset) && + offset < (Guint)INT_MAX) { + type = identifyCFF(reader, (int)offset); + if (type == fofiIdCFF8Bit) { + type = fofiIdOpenTypeCFF8Bit; + } else if (type == fofiIdCFFCID) { + type = fofiIdOpenTypeCFFCID; + } + return type; + } + return fofiIdUnknown; + } + } + return fofiIdUnknown; +} + +static FoFiIdentifierType identifyCFF(Reader *reader, int start) { + Guint offset0, offset1; + int hdrSize, offSize0, offSize1, pos, endPos, b0, n, i; + + //----- read the header + if (reader->getByte(start) != 0x01 || + reader->getByte(start + 1) != 0x00) { + return fofiIdUnknown; + } + if ((hdrSize = reader->getByte(start + 2)) < 0) { + return fofiIdUnknown; + } + if ((offSize0 = reader->getByte(start + 3)) < 1 || offSize0 > 4) { + return fofiIdUnknown; + } + pos = start + hdrSize; + if (pos < 0) { + return fofiIdUnknown; + } + + //----- skip the name index + if (!reader->getU16BE(pos, &n)) { + return fofiIdUnknown; + } + if (n == 0) { + pos += 2; + } else { + if ((offSize1 = reader->getByte(pos + 2)) < 1 || offSize1 > 4) { + return fofiIdUnknown; + } + if (!reader->getUVarBE(pos + 3 + n * offSize1, offSize1, &offset1) || + offset1 > (Guint)INT_MAX) { + return fofiIdUnknown; + } + pos += 3 + (n + 1) * offSize1 + (int)offset1 - 1; + } + if (pos < 0) { + return fofiIdUnknown; + } + + //----- parse the top dict index + if (!reader->getU16BE(pos, &n) || n < 1) { + return fofiIdUnknown; + } + if ((offSize1 = reader->getByte(pos + 2)) < 1 || offSize1 > 4) { + return fofiIdUnknown; + } + if (!reader->getUVarBE(pos + 3, offSize1, &offset0) || + offset0 > (Guint)INT_MAX || + !reader->getUVarBE(pos + 3 + offSize1, offSize1, &offset1) || + offset1 > (Guint)INT_MAX || + offset0 > offset1) { + return fofiIdUnknown; + } + pos = pos + 3 + (n + 1) * offSize1 + (int)offset0 - 1; + endPos = pos + 3 + (n + 1) * offSize1 + (int)offset1 - 1; + if (pos < 0 || endPos < 0 || pos > endPos) { + return fofiIdUnknown; + } + + //----- parse the top dict, look for ROS as first entry + // for a CID font, the top dict starts with: + // ROS + for (i = 0; i < 3; ++i) { + b0 = reader->getByte(pos++); + if (b0 == 0x1c) { + pos += 2; + } else if (b0 == 0x1d) { + pos += 4; + } else if (b0 >= 0xf7 && b0 <= 0xfe) { + pos += 1; + } else if (b0 < 0x20 || b0 > 0xf6) { + return fofiIdCFF8Bit; + } + if (pos >= endPos || pos < 0) { + return fofiIdCFF8Bit; + } + } + if (pos + 1 < endPos && + reader->getByte(pos) == 12 && + reader->getByte(pos + 1) == 30) { + return fofiIdCFFCID; + } else { + return fofiIdCFF8Bit; + } +} diff -Nru poppler-0.18.4/fofi/FoFiIdentifier.h poppler-0.20.5/fofi/FoFiIdentifier.h --- poppler-0.18.4/fofi/FoFiIdentifier.h 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiIdentifier.h 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,42 @@ +//======================================================================== +// +// FoFiIdentifier.h +// +// Copyright 2009 Glyph & Cog, LLC +// +//======================================================================== + +#ifndef FOFIIDENTIFIER_H +#define FOFIIDENTIFIER_H + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +//------------------------------------------------------------------------ +// FoFiIdentifier +//------------------------------------------------------------------------ + +enum FoFiIdentifierType { + fofiIdType1PFA, // Type 1 font in PFA format + fofiIdType1PFB, // Type 1 font in PFB format + fofiIdCFF8Bit, // 8-bit CFF font + fofiIdCFFCID, // CID CFF font + fofiIdTrueType, // TrueType font + fofiIdTrueTypeCollection, // TrueType collection + fofiIdOpenTypeCFF8Bit, // OpenType wrapper with 8-bit CFF font + fofiIdOpenTypeCFFCID, // OpenType wrapper with CID CFF font + fofiIdUnknown, // unknown type + fofiIdError // error in reading the file +}; + +class FoFiIdentifier { +public: + + static FoFiIdentifierType identifyMem(char *file, int len); + static FoFiIdentifierType identifyFile(char *fileName); + static FoFiIdentifierType identifyStream(int (*getChar)(void *data), + void *data); +}; + +#endif diff -Nru poppler-0.18.4/fofi/FoFiTrueType.cc poppler-0.20.5/fofi/FoFiTrueType.cc --- poppler-0.18.4/fofi/FoFiTrueType.cc 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiTrueType.cc 2012-05-10 20:05:44.000000000 +0000 @@ -16,8 +16,10 @@ // Copyright (C) 2006 Takashi Iwai // Copyright (C) 2007 Koji Otani // Copyright (C) 2007 Carlos Garcia Campos -// Copyright (C) 2008, 2009 Albert Astals Cid +// Copyright (C) 2008, 2009, 2012 Albert Astals Cid // Copyright (C) 2008 Tomas Are Haavet +// Copyright (C) 2012 Suzuki Toshiya +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -32,6 +34,7 @@ #include #include +#include #include "goo/gtypes.h" #include "goo/gmem.h" #include "goo/GooString.h" @@ -137,34 +140,31 @@ #define vrt2Tag 0x76727432 #define vertTag 0x76657274 -static int cmpTrueTypeLocaOffset(const void *p1, const void *p2) { - TrueTypeLoca *loca1 = (TrueTypeLoca *)p1; - TrueTypeLoca *loca2 = (TrueTypeLoca *)p2; - - if (loca1->origOffset == loca2->origOffset) { - return loca1->idx - loca2->idx; +struct cmpTrueTypeLocaOffsetFunctor { + bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) { + if (loca1.origOffset == loca2.origOffset) { + return loca1.idx < loca2.idx; + } + return loca1.origOffset < loca2.origOffset; } - return loca1->origOffset - loca2->origOffset; -} - -static int cmpTrueTypeLocaIdx(const void *p1, const void *p2) { - TrueTypeLoca *loca1 = (TrueTypeLoca *)p1; - TrueTypeLoca *loca2 = (TrueTypeLoca *)p2; - - return loca1->idx - loca2->idx; -} +}; -static int cmpTrueTypeTableTag(const void *p1, const void *p2) { - TrueTypeTable *tab1 = (TrueTypeTable *)p1; - TrueTypeTable *tab2 = (TrueTypeTable *)p2; +struct cmpTrueTypeLocaIdxFunctor { + bool operator()(const TrueTypeLoca &loca1, const TrueTypeLoca &loca2) { + return loca1.idx < loca2.idx; + } +}; - return (int)tab1->tag - (int)tab2->tag; -} +struct cmpTrueTypeTableTagFunctor { + bool operator()(const TrueTypeTable &tab1, const TrueTypeTable &tab2) { + return tab1.tag < tab2.tag; + } +}; //------------------------------------------------------------------------ struct T42Table { - char *tag; // 4-byte tag + const char *tag; // 4-byte tag GBool required; // required by the TrueType spec? }; @@ -194,7 +194,7 @@ // Glyph names in some arbitrary standard order that Apple uses for // their TrueType fonts. -static char *macGlyphNames[258] = { +static const char *macGlyphNames[258] = { ".notdef", "null", "CR", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quotesingle", "parenleft", @@ -232,9 +232,9 @@ "paragraph", "germandbls", "registered", "copyright", "trademark", "acute", "dieresis", "notequal", "AE", "Oslash", "infinity", "plusminus", - "lessequal", "greaterequal", "yen", "mu1", + "lessequal", "greaterequal", "yen", "mu", "partialdiff", "summation", "product", "pi", - "integral", "ordfeminine", "ordmasculine", "Ohm", + "integral", "ordfeminine", "ordmasculine", "Omega", "ae", "oslash", "questiondown", "exclamdown", "logicalnot", "radical", "florin", "approxequal", "increment", "guillemotleft", "guillemotright", "ellipsis", @@ -340,8 +340,8 @@ return -1; } -Gushort FoFiTrueType::mapCodeToGID(int i, Guint c) { - Gushort gid; +int FoFiTrueType::mapCodeToGID(int i, Guint c) { + int gid; Guint segCnt, segEnd, segStart, segDelta, segOffset; Guint cmapFirst, cmapLen; int pos, a, b, m; @@ -444,21 +444,32 @@ return nameToGID->lookupInt(name); } -Gushort *FoFiTrueType::getCIDToGIDMap(int *nCIDs) { - FoFiType1C *ff; - Gushort *map; +GBool FoFiTrueType::getCFFBlock(char **start, int *length) { int i; - *nCIDs = 0; if (!openTypeCFF) { - return NULL; + return gFalse; } i = seekTable("CFF "); if (!checkRegion(tables[i].offset, tables[i].len)) { + return gFalse; + } + *start = (char *)file + tables[i].offset; + *length = tables[i].len; + return gTrue; +} + +int *FoFiTrueType::getCIDToGIDMap(int *nCIDs) { + char *start; + int length; + FoFiType1C *ff; + int *map; + + *nCIDs = 0; + if (!getCFFBlock(&start, &length)) { return NULL; } - if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, - tables[i].len))) { + if (!(ff = FoFiType1C::make(start, length))) { return NULL; } map = ff->getCIDToGIDMap(nCIDs); @@ -490,11 +501,27 @@ return 3; } +void FoFiTrueType::getFontMatrix(double *mat) { + char *start; + int length; + FoFiType1C *ff; + + if (!getCFFBlock(&start, &length)) { + return; + } + if (!(ff = FoFiType1C::make(start, length))) { + return; + } + ff->getFontMatrix(mat); + delete ff; +} + void FoFiTrueType::convertToType42(char *psName, char **encoding, - Gushort *codeToGID, + int *codeToGID, FoFiOutputFunc outputFunc, void *outputStream) { GooString *buf; + int maxUsedGlyph; GBool ok; if (openTypeCFF) { @@ -524,27 +551,23 @@ // write the guts of the dictionary cvtEncoding(encoding, outputFunc, outputStream); cvtCharStrings(encoding, codeToGID, outputFunc, outputStream); - cvtSfnts(outputFunc, outputStream, NULL, gFalse); + cvtSfnts(outputFunc, outputStream, NULL, gFalse, &maxUsedGlyph); // end the dictionary and define the font (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); } -void FoFiTrueType::convertToType1(char *psName, char **newEncoding, +void FoFiTrueType::convertToType1(char *psName, const char **newEncoding, GBool ascii, FoFiOutputFunc outputFunc, void *outputStream) { + char *start; + int length; FoFiType1C *ff; - int i; - if (!openTypeCFF) { + if (!getCFFBlock(&start, &length)) { return; } - i = seekTable("CFF "); - if (!checkRegion(tables[i].offset, tables[i].len)) { - return; - } - if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, - tables[i].len))) { + if (!(ff = FoFiType1C::make(start, length))) { return; } ff->convertToType1(psName, newEncoding, ascii, outputFunc, outputStream); @@ -552,12 +575,12 @@ } void FoFiTrueType::convertToCIDType2(char *psName, - Gushort *cidMap, int nCIDs, + int *cidMap, int nCIDs, GBool needVerticalMetrics, FoFiOutputFunc outputFunc, void *outputStream) { GooString *buf; - Gushort cid; + int cid, maxUsedGlyph; GBool ok; int i, j, k; @@ -673,7 +696,7 @@ (*outputFunc)(outputStream, " end readonly def\n", 19); // write the guts of the dictionary - cvtSfnts(outputFunc, outputStream, NULL, needVerticalMetrics); + cvtSfnts(outputFunc, outputStream, NULL, needVerticalMetrics, &maxUsedGlyph); // end the dictionary and define the font (*outputFunc)(outputStream, @@ -681,34 +704,30 @@ 56); } -void FoFiTrueType::convertToCIDType0(char *psName, +void FoFiTrueType::convertToCIDType0(char *psName, int *cidMap, int nCIDs, FoFiOutputFunc outputFunc, void *outputStream) { + char *start; + int length; FoFiType1C *ff; - int i; - if (!openTypeCFF) { - return; - } - i = seekTable("CFF "); - if (!checkRegion(tables[i].offset, tables[i].len)) { + if (!getCFFBlock(&start, &length)) { return; } - if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, - tables[i].len))) { + if (!(ff = FoFiType1C::make(start, length))) { return; } - ff->convertToCIDType0(psName, outputFunc, outputStream); + ff->convertToCIDType0(psName, cidMap, nCIDs, outputFunc, outputStream); delete ff; } -void FoFiTrueType::convertToType0(char *psName, Gushort *cidMap, int nCIDs, +void FoFiTrueType::convertToType0(char *psName, int *cidMap, int nCIDs, GBool needVerticalMetrics, FoFiOutputFunc outputFunc, void *outputStream) { GooString *buf; GooString *sfntsName; - int n, i, j; + int maxUsedGlyph, n, i, j; if (openTypeCFF) { return; @@ -716,11 +735,32 @@ // write the Type 42 sfnts array sfntsName = (new GooString(psName))->append("_sfnts"); - cvtSfnts(outputFunc, outputStream, sfntsName, needVerticalMetrics); + cvtSfnts(outputFunc, outputStream, sfntsName, needVerticalMetrics, + &maxUsedGlyph); delete sfntsName; // write the descendant Type 42 fonts - n = cidMap ? nCIDs : nGlyphs; + // (The following is a kludge: nGlyphs is the glyph count from the + // maxp table; maxUsedGlyph is the max glyph number that has a + // non-zero-length description, from the loca table. The problem is + // that some TrueType font subsets fail to change the glyph count, + // i.e., nGlyphs is much larger than maxUsedGlyph+1, which results + // in an unnecessarily huge Type 0 font. But some other PDF files + // have fonts with only zero or one used glyph, and a content stream + // that refers to one of the unused glyphs -- this results in PS + // errors if we simply use maxUsedGlyph+1 for the Type 0 font. So + // we compromise by always defining at least 256 glyphs.) + if (cidMap) { + n = nCIDs; + } else if (nGlyphs > maxUsedGlyph + 256) { + if (maxUsedGlyph <= 255) { + n = 256; + } else { + n = maxUsedGlyph + 1; + } + } else { + n = nGlyphs; + } for (i = 0; i < n; i += 256) { (*outputFunc)(outputStream, "10 dict begin\n", 14); (*outputFunc)(outputStream, "/FontName /", 11); @@ -785,38 +825,37 @@ (*outputFunc)(outputStream, "FontName currentdict end definefont pop\n", 40); } -void FoFiTrueType::convertToType0(char *psName, +void FoFiTrueType::convertToType0(char *psName, int *cidMap, int nCIDs, FoFiOutputFunc outputFunc, void *outputStream) { + char *start; + int length; FoFiType1C *ff; - int i; - if (!openTypeCFF) { - return; - } - i = seekTable("CFF "); - if (!checkRegion(tables[i].offset, tables[i].len)) { + if (!getCFFBlock(&start, &length)) { return; } - if (!(ff = FoFiType1C::make((char *)file + tables[i].offset, - tables[i].len))) { + if (!(ff = FoFiType1C::make(start, length))) { return; } - ff->convertToType0(psName, outputFunc, outputStream); + ff->convertToType0(psName, cidMap, nCIDs, outputFunc, outputStream); delete ff; } void FoFiTrueType::writeTTF(FoFiOutputFunc outputFunc, void *outputStream, char *name, - Gushort *codeToGID) { - // this substitute cmap table maps char codes 0000-ffff directly to - // glyphs 0000-ffff - static char cmapTab[36] = { + int *codeToGID) { + // this substitute cmap table maps char code ffff to glyph 0, + // with tables for MacRoman and MS Unicode + static char cmapTab[44] = { 0, 0, // table version number - 0, 1, // number of encoding tables + 0, 2, // number of encoding tables 0, 1, // platform ID 0, 0, // encoding ID - 0, 0, 0, 12, // offset of subtable + 0, 0, 0, 20, // offset of subtable + 0, 3, // platform ID + 0, 1, // encoding ID + 0, 0, 0, 20, // offset of subtable 0, 4, // subtable format 0, 24, // subtable length 0, 0, // subtable version @@ -826,9 +865,9 @@ 0, 0, // 2*segCount - 2*2^floor(log2(segCount)) (char)0xff, (char)0xff, // endCount[0] 0, 0, // reserved - 0, 0, // startCount[0] - 0, 0, // idDelta[0] - 0, 0 // pad to a mulitple of four bytes + (char)0xff, (char)0xff, // startCount[0] + 0, 1, // idDelta[0] + 0, 0 // idRangeOffset[0] }; static char nameTab[8] = { 0, 0, // format @@ -850,8 +889,8 @@ static char os2Tab[86] = { 0, 1, // version 0, 1, // xAvgCharWidth - 0, 0, // usWeightClass - 0, 0, // usWidthClass + 0x01, (char)0x90, // usWeightClass + 0, 5, // usWidthClass 0, 0, // fsType 0, 0, // ySubscriptXSize 0, 0, // ySubscriptYSize @@ -877,14 +916,14 @@ 0, 0, // sTypoAscender 0, 0, // sTypoDescender 0, 0, // sTypoLineGap - 0, 0, // usWinAscent - 0, 0, // usWinDescent - 0, 0, 0, 0, // ulCodePageRange1 + 0x20, 0x00, // usWinAscent + 0x20, 0x00, // usWinDescent + 0, 0, 0, 1, // ulCodePageRange1 0, 0, 0, 0 // ulCodePageRange2 }; GBool missingCmap, missingName, missingPost, missingOS2; - GBool unsortedLoca, badCmapLen, abbrevHMTX; - int nZeroLengthTables; + GBool unsortedLoca, emptyCmap, badCmapLen, abbrevHMTX; + int nZeroLengthTables, nBogusTables; int nHMetrics, advWidth, lsb; TrueTypeLoca *locaTable; TrueTypeTable *newTables; @@ -948,29 +987,50 @@ locaTable[i].idx = i; } - // check for zero-length tables - nZeroLengthTables = 0; + // check for zero-length tables and bogus tags + nZeroLengthTables = nBogusTables = 0; for (i = 0; i < nTables; ++i) { if (tables[i].len == 0) { ++nZeroLengthTables; + if (tables[i].tag == cmapTag) { + missingCmap = gTrue; + } else if (tables[i].tag == nameTag) { + missingName = gTrue; + } else if (tables[i].tag == postTag) { + missingPost = gTrue; + } else if (tables[i].tag == os2Tag) { + missingOS2 = gTrue; + } + } else if (!(tables[i].tag & 0xe0000000) || + !(tables[i].tag & 0x00e00000) || + !(tables[i].tag & 0x0000e000) || + !(tables[i].tag & 0x000000e0)) { + // tags where any of the bytes are < 0x20 are probably bogus + // (the TrueType spec uses ASCII sequences for tags) -- this + // catches problems where the number of tables given in the + // header is too large, and so gibberish data is read at the end + // of the table directory + ++nBogusTables; } } - // check for an incorrect cmap table length - badCmapLen = gFalse; + // check for an empty cmap table or an incorrect cmap table length + emptyCmap = badCmapLen = gFalse; cmapLen = 0; // make gcc happy if (!missingCmap) { - if (nCmaps > 0) { + if (nCmaps == 0) { + emptyCmap = gTrue; + } else { cmapLen = cmaps[0].offset + cmaps[0].len; for (i = 1; i < nCmaps; ++i) { - if (cmaps[i].offset + cmaps[i].len > cmapLen) { + if (cmaps[i].offset + cmaps[i].len > cmapLen) { cmapLen = cmaps[i].offset + cmaps[i].len; - } + } + } + cmapLen -= tables[cmapIdx].offset; + if (cmapLen > tables[cmapIdx].len) { + badCmapLen = gTrue; } - } - cmapLen -= tables[cmapIdx].offset; - if (cmapLen > tables[cmapIdx].len) { - badCmapLen = gTrue; } } @@ -983,7 +1043,8 @@ // if nothing is broken, just write the TTF file as is if (!missingCmap && !missingName && !missingPost && !missingOS2 && - !unsortedLoca && !badCmapLen && !abbrevHMTX && nZeroLengthTables == 0 && + !unsortedLoca && !emptyCmap && !badCmapLen && !abbrevHMTX && + nZeroLengthTables == 0 && nBogusTables == 0 && !name && !codeToGID) { (*outputFunc)(outputStream, (char *)file, len); goto done1; @@ -997,14 +1058,17 @@ // the same pos value remain in the same order) glyfLen = 0; // make gcc happy if (unsortedLoca) { - qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca), - &cmpTrueTypeLocaOffset); + std::sort(locaTable, locaTable + nGlyphs + 1, + cmpTrueTypeLocaOffsetFunctor()); for (i = 0; i < nGlyphs; ++i) { locaTable[i].len = locaTable[i+1].origOffset - locaTable[i].origOffset; } locaTable[nGlyphs].len = 0; - qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca), - &cmpTrueTypeLocaIdx); + std::sort(locaTable, locaTable + nGlyphs + 1, cmpTrueTypeLocaIdxFunctor()); + // if the last entry in the loca is not the max offset (size of + // the glyf table), something is wrong -- work around the problem + // by forcing the last sorted entry to have a zero length + locaTable[nGlyphs].len = 0; pos = 0; for (i = 0; i <= nGlyphs; ++i) { locaTable[i].newOffset = pos; @@ -1134,8 +1198,16 @@ newCmapTab[42] = 0; // idRangeOffset[1] newCmapTab[43] = 0; for (i = 0; i < 256; ++i) { - newCmapTab[44 + 2*i] = codeToGID[i] >> 8; - newCmapTab[44 + 2*i + 1] = codeToGID[i] & 0xff; + if (codeToGID[i] < 0) { + //~ this may not be correct - we want this character to never be + //~ displayed, but mapping it to the notdef glyph may result in + //~ little boxes being displayed + newCmapTab[44 + 2*i] = 0; + newCmapTab[44 + 2*i + 1] = 0; + } else { + newCmapTab[44 + 2*i] = codeToGID[i] >> 8; + newCmapTab[44 + 2*i + 1] = codeToGID[i] & 0xff; + } } } else { newCmapLen = 0; @@ -1187,16 +1259,20 @@ // - sort the table by tag // - compute new table positions, including 4-byte alignment // - (re)compute table checksums - nNewTables = nTables - nZeroLengthTables + + nNewTables = nTables - nZeroLengthTables - nBogusTables + (missingCmap ? 1 : 0) + (missingName ? 1 : 0) + (missingPost ? 1 : 0) + (missingOS2 ? 1 : 0); newTables = (TrueTypeTable *)gmallocn(nNewTables, sizeof(TrueTypeTable)); j = 0; for (i = 0; i < nTables; ++i) { - if (tables[i].len > 0) { + if (tables[i].len > 0 && + (tables[i].tag & 0xe0000000) && + (tables[i].tag & 0x00e00000) && + (tables[i].tag & 0x0000e000) && + (tables[i].tag & 0x000000e0)) { newTables[j] = tables[i]; newTables[j].origOffset = tables[i].offset; - if (checkRegion(tables[i].offset, newTables[i].len)) { + if (checkRegion(tables[i].offset, tables[i].len)) { newTables[j].checksum = computeTableChecksum(file + tables[i].offset, tables[i].len); if (tables[i].tag == headTag) { @@ -1208,6 +1284,10 @@ newTables[j].len = newCmapLen; newTables[j].checksum = computeTableChecksum((Guchar *)newCmapTab, newCmapLen); + } else if (newTables[j].tag == cmapTag && emptyCmap) { + newTables[j].checksum = computeTableChecksum((Guchar *)cmapTab, + sizeof(cmapTab)); + newTables[j].len = sizeof(cmapTab); } else if (newTables[j].tag == cmapTag && badCmapLen) { newTables[j].len = cmapLen; } else if (newTables[j].tag == locaTag && unsortedLoca) { @@ -1272,8 +1352,7 @@ newTables[j].len = sizeof(os2Tab); ++j; } - qsort(newTables, nNewTables, sizeof(TrueTypeTable), - &cmpTrueTypeTableTag); + std::sort(newTables, newTables + nNewTables, cmpTrueTypeTableTagFunctor()); pos = 12 + nNewTables * 16; for (i = 0; i < nNewTables; ++i) { newTables[i].offset = pos; @@ -1424,7 +1503,7 @@ void FoFiTrueType::cvtEncoding(char **encoding, FoFiOutputFunc outputFunc, void *outputStream) { - char *name; + const char *name; GooString *buf; int i; @@ -1451,7 +1530,7 @@ } void FoFiTrueType::cvtCharStrings(char **encoding, - Gushort *codeToGID, + int *codeToGID, FoFiOutputFunc outputFunc, void *outputStream) { char *name; @@ -1504,7 +1583,8 @@ void FoFiTrueType::cvtSfnts(FoFiOutputFunc outputFunc, void *outputStream, GooString *name, - GBool needVerticalMetrics) { + GBool needVerticalMetrics, + int *maxUsedGlyph) { Guchar headData[54]; TrueTypeLoca *locaTable; Guchar *locaData; @@ -1513,7 +1593,7 @@ GBool ok; Guint checksum; int nNewTables; - int length, pos, glyfPos, i, j, k; + int glyfTableLen, length, pos, glyfPos, i, j, k; Guchar vheaTab[36] = { 0, 1, 0, 0, // table version number 0, 0, // ascent @@ -1549,16 +1629,25 @@ memcpy(headData, file + pos, 54); headData[8] = headData[9] = headData[10] = headData[11] = (Guchar)0; + // check for a bogus loca format field in the 'head' table + // (I've encountered fonts with loca format set to 0x0100 instead of 0x0001) + if (locaFmt != 0 && locaFmt != 1) { + headData[50] = 0; + headData[51] = 1; + } + // read the original 'loca' table, pad entries out to 4 bytes, and // sort it into proper order -- some (non-compliant) fonts have // out-of-order loca tables; in order to correctly handle the case // where (compliant) fonts have empty entries in the middle of the - // table, cmpTrueTypeLocaPos uses offset as its primary sort key, + // table, cmpTrueTypeLocaOffset uses offset as its primary sort key, // and idx as its secondary key (ensuring that adjacent entries with // the same pos value remain in the same order) locaTable = (TrueTypeLoca *)gmallocn(nGlyphs + 1, sizeof(TrueTypeLoca)); i = seekTable("loca"); pos = tables[i].offset; + i = seekTable("glyf"); + glyfTableLen = tables[i].len; ok = gTrue; for (i = 0; i <= nGlyphs; ++i) { locaTable[i].idx = i; @@ -1567,22 +1656,28 @@ } else { locaTable[i].origOffset = 2 * getU16BE(pos + i*2, &ok); } + if (locaTable[i].origOffset > glyfTableLen) { + locaTable[i].origOffset = glyfTableLen; + } } - qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca), - &cmpTrueTypeLocaOffset); + std::sort(locaTable, locaTable + nGlyphs + 1, + cmpTrueTypeLocaOffsetFunctor()); for (i = 0; i < nGlyphs; ++i) { locaTable[i].len = locaTable[i+1].origOffset - locaTable[i].origOffset; } locaTable[nGlyphs].len = 0; - qsort(locaTable, nGlyphs + 1, sizeof(TrueTypeLoca), - &cmpTrueTypeLocaIdx); + std::sort(locaTable, locaTable + nGlyphs + 1, cmpTrueTypeLocaIdxFunctor()); pos = 0; + *maxUsedGlyph = -1; for (i = 0; i <= nGlyphs; ++i) { locaTable[i].newOffset = pos; pos += locaTable[i].len; if (pos & 3) { pos += 4 - (pos & 3); } + if (locaTable[i].len > 0) { + *maxUsedGlyph = i; + } } // construct the new 'loca' table @@ -1665,7 +1760,7 @@ length = sizeof(vheaTab); checksum = computeTableChecksum(vheaTab, length); } else if (needVerticalMetrics && i == t42VmtxTable) { - length = 4 + (nGlyphs - 1) * 4; + length = 4 + (nGlyphs - 1) * 2; vmtxTab = (Guchar *)gmalloc(length); vmtxTab[0] = advance / 256; vmtxTab[1] = advance % 256; @@ -1783,7 +1878,6 @@ dumpString(vheaTab, length, outputFunc, outputStream); } else if (needVerticalMetrics && i == t42VmtxTable) { dumpString(vmtxTab, length, outputFunc, outputStream); - gfree(vmtxTab); } } } @@ -1794,6 +1888,9 @@ gfree(locaData); gfree(locaTable); + if (vmtxTab) { + gfree(vmtxTab); + } } void FoFiTrueType::dumpString(Guchar *s, int length, @@ -1900,22 +1997,23 @@ } tables = (TrueTypeTable *)gmallocn(nTables, sizeof(TrueTypeTable)); pos += 12; - int wrongTables = 0; + j = 0; for (i = 0; i < nTables; ++i) { - tables[i].tag = getU32BE(pos, &parsedOk); - tables[i].checksum = getU32BE(pos + 4, &parsedOk); - tables[i].offset = (int)getU32BE(pos + 8, &parsedOk); - tables[i].len = (int)getU32BE(pos + 12, &parsedOk); - if (tables[i].offset + tables[i].len < tables[i].offset || - tables[i].offset + tables[i].len > len) { - i--; - wrongTables++; - error(-1, "Found a bad table definition on true type definition, trying to continue..."); + tables[j].tag = getU32BE(pos, &parsedOk); + tables[j].checksum = getU32BE(pos + 4, &parsedOk); + tables[j].offset = (int)getU32BE(pos + 8, &parsedOk); + tables[j].len = (int)getU32BE(pos + 12, &parsedOk); + if (tables[j].offset + tables[j].len >= tables[j].offset && + tables[j].offset + tables[j].len <= len) { + // ignore any bogus entries in the table directory + ++j; } pos += 16; } - nTables -= wrongTables; - tables = (TrueTypeTable *)greallocn_checkoverflow(tables, nTables, sizeof(TrueTypeTable)); + if (nTables != j) { + nTables = j; + tables = (TrueTypeTable *)greallocn_checkoverflow(tables, nTables, sizeof(TrueTypeTable)); + } if (!parsedOk || tables == NULL) { return; } @@ -2085,7 +2183,7 @@ } } -int FoFiTrueType::seekTable(char *tag) { +int FoFiTrueType::seekTable(const char *tag) { Guint tagI; int i; @@ -2123,7 +2221,17 @@ setup GSUB table data Only supporting vertical text substitution. */ -int FoFiTrueType::setupGSUB(const char *tagName) +int FoFiTrueType::setupGSUB(const char *scriptName) +{ + return setupGSUB(scriptName, NULL); +} + +/* + setup GSUB table data + Only supporting vertical text substitution. +*/ +int FoFiTrueType::setupGSUB(const char *scriptName, + const char *languageName) { Guint gsubTable; unsigned int i; @@ -2140,11 +2248,11 @@ int x; Guint pos; - if (tagName == 0) { + if (scriptName == 0) { gsubFeatureTable = 0; return 0; } - scriptTag = charToTag(tagName); + scriptTag = charToTag(scriptName); /* read GSUB Header */ if ((x = seekTable("GSUB")) < 0) { return 0; /* GSUB table not found */ @@ -2181,11 +2289,25 @@ /* read script table */ /* use default language system */ pos = gsubTable+scriptList+scriptTable; - langSys = getU16BE(pos,&parsedOk);/* default language system */ + langSys = 0; + if (languageName) { + Guint langTag = charToTag(languageName); + Guint langCount = getU16BE(pos+2,&parsedOk); + for (i = 0;i < langCount && langSys == 0;i++) { + tag = getU32BE(pos+4+i*(4+2),&parsedOk); + if (tag == langTag) { + langSys = getU16BE(pos+4+i*(4+2)+4,&parsedOk); + } + } + } + if (langSys == 0) { + /* default language system */ + langSys = getU16BE(pos,&parsedOk); + } /* read LangSys table */ if (langSys == 0) { - /* no ldefault LangSys */ + /* no default LangSys */ return 0; } @@ -2357,6 +2479,9 @@ case 1: count = getU16BE(pos,&parsedOk); pos += 2; + // In some poor CJK fonts, key GIDs are not sorted, + // thus we cannot finish checking even when the range + // including orgGID seems to have already passed. for (i = 0;i < count;i++) { Guint gid; @@ -2366,9 +2491,6 @@ /* found */ index = i; break; - } else if (gid > orgGID) { - /* not found */ - break; } } break; @@ -2385,13 +2507,13 @@ pos += 2; startIndex = getU16BE(pos,&parsedOk); pos += 2; + // In some poor CJK fonts, key GIDs are not sorted, + // thus we cannot finish checking even when the range + // including orgGID seems to have already passed. if (startGID <= orgGID && orgGID <= endGID) { /* found */ index = startIndex+orgGID-startGID; break; - } else if (orgGID <= endGID) { - /* not found */ - break; } } break; diff -Nru poppler-0.18.4/fofi/FoFiTrueType.h poppler-0.20.5/fofi/FoFiTrueType.h --- poppler-0.18.4/fofi/FoFiTrueType.h 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiTrueType.h 2012-05-10 20:05:44.000000000 +0000 @@ -16,6 +16,7 @@ // Copyright (C) 2006 Takashi Iwai // Copyright (C) 2007 Koji Otani // Copyright (C) 2011 Albert Astals Cid +// Copyright (C) 2012 Suzuki Toshiya // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -71,7 +72,7 @@ int findCmap(int platform, int encoding); // Return the GID corresponding to according to the th cmap. - Gushort mapCodeToGID(int i, Guint c); + int mapCodeToGID(int i, Guint c); // map gid to vertical glyph gid if exist. // if not exist return original gid @@ -85,7 +86,7 @@ // Return the mapping from CIDs to GIDs, and return the number of // CIDs in *. This is only useful for CID fonts. (Only // useful for OpenType CFF fonts.) - Gushort *getCIDToGIDMap(int *nCIDs); + int *getCIDToGIDMap(int *nCIDs); // Returns the least restrictive embedding licensing right (as // defined by the TrueType spec): @@ -96,6 +97,10 @@ // * 0: restricted license embedding int getEmbeddingRights(); + // Return the font matrix as an array of six numbers. (Only useful + // for OpenType CFF fonts.) + void getFontMatrix(double *mat); + // Convert to a Type 42 font, suitable for embedding in a PostScript // file. will be used as the PostScript font name (so we // don't need to depend on the 'name' table in the font). The @@ -104,7 +109,7 @@ // array specifies the mapping from char codes to GIDs. // (Not useful for OpenType CFF fonts.) void convertToType42(char *psName, char **encoding, - Gushort *codeToGID, + int *codeToGID, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 1 font, suitable for embedding in a PostScript @@ -114,7 +119,7 @@ // otherwise it will be left as binary data. If is // non-NULL, it will be used as the PostScript font name. (Only // useful for OpenType CFF fonts.) - void convertToType1(char *psName, char **newEncoding, GBool ascii, + void convertToType1(char *psName, const char **newEncoding, GBool ascii, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 2 CIDFont, suitable for embedding in a @@ -122,14 +127,14 @@ // name (so we don't need to depend on the 'name' table in the // font). The array maps CIDs to GIDs; it has // entries. (Not useful for OpenType CFF fonts.) - void convertToCIDType2(char *psName, Gushort *cidMap, int nCIDs, + void convertToCIDType2(char *psName, int *cidMap, int nCIDs, GBool needVerticalMetrics, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 0 CIDFont, suitable for embedding in a // PostScript file. will be used as the PostScript font // name. (Only useful for OpenType CFF fonts.) - void convertToCIDType0(char *psName, + void convertToCIDType0(char *psName, int *cidMap, int nCIDs, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 0 (but non-CID) composite font, suitable for @@ -137,14 +142,14 @@ // PostScript font name (so we don't need to depend on the 'name' // table in the font). The array maps CIDs to GIDs; it has // entries. (Not useful for OpenType CFF fonts.) - void convertToType0(char *psName, Gushort *cidMap, int nCIDs, + void convertToType0(char *psName, int *cidMap, int nCIDs, GBool needVerticalMetrics, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 0 (but non-CID) composite font, suitable for // embedding in a PostScript file. will be used as the // PostScript font name. (Only useful for OpenType CFF fonts.) - void convertToType0(char *psName, + void convertToType0(char *psName, int *cidMap, int nCIDs, FoFiOutputFunc outputFunc, void *outputStream); // Write a clean TTF file, filling in missing tables and correcting @@ -154,9 +159,19 @@ // complete and correct, it will be written unmodified. (Not useful // for OpenType CFF fonts.) void writeTTF(FoFiOutputFunc outputFunc, void *outputStream, - char *name = NULL, Gushort *codeToGID = NULL); + char *name = NULL, int *codeToGID = NULL); + + // Returns a pointer to the CFF font embedded in this OpenType font. + // If successful, sets * and *, and returns true. + // Otherwise returns false. (Only useful for OpenType CFF fonts). + GBool getCFFBlock(char **start, int *length); + + // setup vert/vrt2 GSUB for default lang + int setupGSUB(const char *scriptName); + + // setup vert/vrt2 GSUB for specified lang + int setupGSUB(const char *scriptName, const char* languageName); - int setupGSUB(const char *tagName); private: FoFiTrueType(char *fileA, int lenA, GBool freeFileDataA, int faceIndexA); @@ -164,19 +179,20 @@ FoFiOutputFunc outputFunc, void *outputStream); void cvtCharStrings(char **encoding, - Gushort *codeToGID, + int *codeToGID, FoFiOutputFunc outputFunc, void *outputStream); void cvtSfnts(FoFiOutputFunc outputFunc, void *outputStream, GooString *name, - GBool needVerticalMetrics); + GBool needVerticalMetrics, + int *maxUsedGlyph); void dumpString(Guchar *s, int length, FoFiOutputFunc outputFunc, void *outputStream); Guint computeTableChecksum(Guchar *data, int length); void parse(); void readPostTable(); - int seekTable(char *tag); + int seekTable(const char *tag); Guint charToTag(const char *tagName); Guint doMapToVertGID(Guint orgGID); Guint scanLookupList(Guint listIndex, Guint orgGID); diff -Nru poppler-0.18.4/fofi/FoFiType1.cc poppler-0.20.5/fofi/FoFiType1.cc --- poppler-0.18.4/fofi/FoFiType1.cc 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiType1.cc 2012-05-10 20:05:44.000000000 +0000 @@ -59,7 +59,14 @@ { name = NULL; encoding = NULL; + fontMatrix[0] = 0.001; + fontMatrix[1] = 0; + fontMatrix[2] = 0; + fontMatrix[3] = 0.001; + fontMatrix[4] = 0; + fontMatrix[5] = 0; parsed = gFalse; + undoPFB(); } FoFiType1::~FoFiType1() { @@ -90,7 +97,18 @@ return encoding; } -void FoFiType1::writeEncoded(char **newEncoding, +void FoFiType1::getFontMatrix(double *mat) { + int i; + + if (!parsed) { + parse(); + } + for (i = 0; i < 6; ++i) { + mat[i] = fontMatrix[i]; + } +} + +void FoFiType1::writeEncoded(const char **newEncoding, FoFiOutputFunc outputFunc, void *outputStream) { char buf[512]; char *line, *line2, *p; @@ -193,9 +211,11 @@ char *line, *line1, *p, *p2; char buf[256]; char c; - int n, code, i, j; + int n, code, base, i, j; char *tokptr; + GBool gotMatrix; + gotMatrix = gFalse; for (i = 1, line = (char *)file; i <= 100 && line && (!name || !encoding); ++i) { @@ -213,7 +233,7 @@ // get encoding } else if (!encoding && !strncmp(line, "/Encoding StandardEncoding def", 30)) { - encoding = fofiType1StandardEncoding; + encoding = (char **)fofiType1StandardEncoding; } else if (!encoding && !strncmp(line, "/Encoding 256 array", 19)) { encoding = (char **)gmallocn(256, sizeof(char *)); @@ -223,53 +243,48 @@ for (j = 0, line = getNextLine(line); j < 300 && line && (line1 = getNextLine(line)); ++j, line = line1) { - if ((n = line1 - line) > 255) { - error(-1, "FoFiType1::parse a line has more than 255 characters, we don't support this"); + if ((n = (int)(line1 - line)) > 255) { + error(errSyntaxWarning, -1, "FoFiType1::parse a line has more than 255 characters, we don't support this"); n = 255; } strncpy(buf, line, n); buf[n] = '\0'; for (p = buf; *p == ' ' || *p == '\t'; ++p) ; if (!strncmp(p, "dup", 3)) { - for (p += 3; *p == ' ' || *p == '\t'; ++p) ; - for (p2 = p; *p2 >= '0' && *p2 <= '9'; ++p2) ; - if (*p2) { - c = *p2; // store it so we can recover it after atoi - *p2 = '\0'; // terminate p so atoi works - code = atoi(p); - *p2 = c; - if (code == 8 && *p2 == '#') { - code = 0; - for (++p2; *p2 >= '0' && *p2 <= '7'; ++p2) { - code = code * 8 + (*p2 - '0'); - } - } - if (likely(code < 256 && code >= 0)) { - for (p = p2; *p == ' ' || *p == '\t'; ++p) ; - if (*p == '/') { - ++p; - for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ; - c = *p2; // store it so we can recover it after copyString - *p2 = '\0'; // terminate p so copyString works - encoding[code] = copyString(p); - *p2 = c; - p = p2; - for (; *p == ' ' || *p == '\t'; ++p); // eat spaces between string and put - if (!strncmp(p, "put", 3)) { - // eat put and spaces and newlines after put - for (p += 3; *p == ' ' || *p == '\t' || *p == '\n' || *p == '\r'; ++p); - if (*p) - { - // there is still something after the definition - // there might be another definition in this line - // so move line1 to the end of our parsing - // so we start in the potential next definition in the next loop - line1 = &line[p - buf]; - } - } else { - error(-1, "FoFiType1::parse no put after dup"); - } - } + while (1) { + p += 3; + for (; *p == ' ' || *p == '\t'; ++p) ; + code = 0; + if (*p == '8' && p[1] == '#') { + base = 8; + p += 2; + } else if (*p >= '0' && *p <= '9') { + base = 10; + } else { + break; + } + for (; *p >= '0' && *p < '0' + base; ++p) { + code = code * base + (*p - '0'); + } + for (; *p == ' ' || *p == '\t'; ++p) ; + if (*p != '/') { + break; + } + ++p; + for (p2 = p; *p2 && *p2 != ' ' && *p2 != '\t'; ++p2) ; + if (code >= 0 && code < 256) { + c = *p2; + *p2 = '\0'; + encoding[code] = copyString(p); + *p2 = c; + } + for (p = p2; *p == ' ' || *p == '\t'; ++p) ; + if (strncmp(p, "put", 3)) { + break; + } + for (p += 3; *p == ' ' || *p == '\t'; ++p) ; + if (strncmp(p, "dup", 3)) { + break; } } } else { @@ -281,6 +296,24 @@ } //~ check for getinterval/putinterval junk + } else if (!gotMatrix && !strncmp(line, "/FontMatrix", 11)) { + strncpy(buf, line + 11, 255); + buf[255] = '\0'; + if ((p = strchr(buf, '['))) { + ++p; + if ((p2 = strchr(p, ']'))) { + *p2 = '\0'; + for (j = 0; j < 6; ++j) { + if ((p = strtok(j == 0 ? p : (char *)NULL, " \t\n\r"))) { + fontMatrix[j] = atof(p); + } else { + break; + } + } + } + } + gotMatrix = gTrue; + } else { line = getNextLine(line); } @@ -288,3 +321,38 @@ parsed = gTrue; } + +// Undo the PFB encoding, i.e., remove the PFB headers. +void FoFiType1::undoPFB() { + GBool ok; + Guchar *file2; + int pos1, pos2, type; + Guint segLen; + + ok = gTrue; + if (getU8(0, &ok) != 0x80 || !ok) { + return; + } + file2 = (Guchar *)gmalloc(len); + pos1 = pos2 = 0; + while (getU8(pos1, &ok) == 0x80 && ok) { + type = getU8(pos1 + 1, &ok); + if (type < 1 || type > 2 || !ok) { + break; + } + segLen = getU32LE(pos1 + 2, &ok); + pos1 += 6; + if (!ok || !checkRegion(pos1, segLen)) { + break; + } + memcpy(file2 + pos2, file + pos1, segLen); + pos1 += segLen; + pos2 += segLen; + } + if (freeFileData) { + gfree(fileData); + } + file = fileData = file2; + freeFileData = gTrue; + len = pos2; +} diff -Nru poppler-0.18.4/fofi/FoFiType1.h poppler-0.20.5/fofi/FoFiType1.h --- poppler-0.18.4/fofi/FoFiType1.h 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiType1.h 2012-05-10 20:05:44.000000000 +0000 @@ -38,8 +38,11 @@ // be NULL). char **getEncoding(); + // Return the font matrix as an array of six numbers. + void getFontMatrix(double *mat); + // Write a version of the Type 1 font file with a new encoding. - void writeEncoded(char **newEncoding, + void writeEncoded(const char **newEncoding, FoFiOutputFunc outputFunc, void *outputStream); private: @@ -48,9 +51,11 @@ char *getNextLine(char *line); void parse(); + void undoPFB(); char *name; char **encoding; + double fontMatrix[6]; GBool parsed; }; diff -Nru poppler-0.18.4/fofi/FoFiType1C.cc poppler-0.20.5/fofi/FoFiType1C.cc --- poppler-0.18.4/fofi/FoFiType1C.cc 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiType1C.cc 2012-09-09 21:24:04.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2009, 2010 Albert Astals Cid +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -78,6 +79,7 @@ privateDicts = NULL; fdSelect = NULL; charset = NULL; + charsetLength = 0; } FoFiType1C::~FoFiType1C() { @@ -116,8 +118,22 @@ return encoding; } -Gushort *FoFiType1C::getCIDToGIDMap(int *nCIDs) { - Gushort *map; +GooString *FoFiType1C::getGlyphName(int gid) { + char buf[256]; + GBool ok; + + ok = gTrue; + if (gid < 0 || gid >= charsetLength) + return NULL; + getString(charset[gid], buf, &ok); + if (!ok) { + return NULL; + } + return new GooString(buf); +} + +int *FoFiType1C::getCIDToGIDMap(int *nCIDs) { + int *map; int n, i; // a CID font's top dict has ROS as the first operator @@ -129,14 +145,14 @@ // in a CID font, the charset data is the GID-to-CID mapping, so all // we have to do is reverse it n = 0; - for (i = 0; i < nGlyphs; ++i) { + for (i = 0; i < nGlyphs && i < charsetLength; ++i) { if (charset[i] > n) { n = charset[i]; } } ++n; - map = (Gushort *)gmallocn(n, sizeof(Gushort)); - memset(map, 0, n * sizeof(Gushort)); + map = (int *)gmallocn(n, sizeof(int)); + memset(map, 0, n * sizeof(int)); for (i = 0; i < nGlyphs; ++i) { map[charset[i]] = i; } @@ -144,7 +160,36 @@ return map; } -void FoFiType1C::convertToType1(char *psName, char **newEncoding, GBool ascii, +void FoFiType1C::getFontMatrix(double *mat) { + int i; + + if (topDict.firstOp == 0x0c1e && privateDicts[0].hasFontMatrix) { + if (topDict.hasFontMatrix) { + mat[0] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[0] + + topDict.fontMatrix[1] * privateDicts[0].fontMatrix[2]; + mat[1] = topDict.fontMatrix[0] * privateDicts[0].fontMatrix[1] + + topDict.fontMatrix[1] * privateDicts[0].fontMatrix[3]; + mat[2] = topDict.fontMatrix[2] * privateDicts[0].fontMatrix[0] + + topDict.fontMatrix[3] * privateDicts[0].fontMatrix[2]; + mat[3] = topDict.fontMatrix[2] * privateDicts[0].fontMatrix[1] + + topDict.fontMatrix[3] * privateDicts[0].fontMatrix[3]; + mat[4] = topDict.fontMatrix[4] * privateDicts[0].fontMatrix[0] + + topDict.fontMatrix[5] * privateDicts[0].fontMatrix[2]; + mat[5] = topDict.fontMatrix[4] * privateDicts[0].fontMatrix[1] + + topDict.fontMatrix[5] * privateDicts[0].fontMatrix[3]; + } else { + for (i = 0; i < 6; ++i) { + mat[i] = privateDicts[0].fontMatrix[i]; + } + } + } else { + for (i = 0; i < 6; ++i) { + mat[i] = topDict.fontMatrix[i]; + } + } +} + +void FoFiType1C::convertToType1(char *psName, const char **newEncoding, GBool ascii, FoFiOutputFunc outputFunc, void *outputStream) { int psNameLen; @@ -153,7 +198,7 @@ Type1CIndexVal val; GooString *buf; char buf2[256]; - char **enc; + const char **enc; GBool ok; int i; @@ -179,39 +224,39 @@ (*outputFunc)(outputStream, "12 dict begin\n", 14); (*outputFunc)(outputStream, "/FontInfo 10 dict dup begin\n", 28); if (topDict.versionSID != 0) { - (*outputFunc)(outputStream, "/version (", 10); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") readonly def\n", 15); + (*outputFunc)(outputStream, "/version ", 9); + writePSString(buf2, outputFunc, outputStream); + (*outputFunc)(outputStream, " readonly def\n", 14); } if (topDict.noticeSID != 0) { getString(topDict.noticeSID, buf2, &ok); - (*outputFunc)(outputStream, "/Notice (", 9); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") readonly def\n", 15); + (*outputFunc)(outputStream, "/Notice ", 8); + writePSString(buf2, outputFunc, outputStream); + (*outputFunc)(outputStream, " readonly def\n", 14); } if (topDict.copyrightSID != 0) { getString(topDict.copyrightSID, buf2, &ok); - (*outputFunc)(outputStream, "/Copyright (", 12); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") readonly def\n", 15); + (*outputFunc)(outputStream, "/Copyright ", 11); + writePSString(buf2, outputFunc, outputStream); + (*outputFunc)(outputStream, " readonly def\n", 14); } if (topDict.fullNameSID != 0) { getString(topDict.fullNameSID, buf2, &ok); - (*outputFunc)(outputStream, "/FullName (", 11); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") readonly def\n", 15); + (*outputFunc)(outputStream, "/FullName ", 10); + writePSString(buf2, outputFunc, outputStream); + (*outputFunc)(outputStream, " readonly def\n", 14); } if (topDict.familyNameSID != 0) { getString(topDict.familyNameSID, buf2, &ok); - (*outputFunc)(outputStream, "/FamilyName (", 13); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") readonly def\n", 15); + (*outputFunc)(outputStream, "/FamilyName ", 12); + writePSString(buf2, outputFunc, outputStream); + (*outputFunc)(outputStream, " readonly def\n", 14); } if (topDict.weightSID != 0) { getString(topDict.weightSID, buf2, &ok); - (*outputFunc)(outputStream, "/Weight (", 9); - (*outputFunc)(outputStream, buf2, strlen(buf2)); - (*outputFunc)(outputStream, ") readonly def\n", 15); + (*outputFunc)(outputStream, "/Weight ", 8); + writePSString(buf2, outputFunc, outputStream); + (*outputFunc)(outputStream, " readonly def\n", 14); } if (topDict.isFixedPitch) { (*outputFunc)(outputStream, "/isFixedPitch true def\n", 23); @@ -265,7 +310,7 @@ (*outputFunc)(outputStream, "256 array\n", 10); (*outputFunc)(outputStream, "0 1 255 {1 index exch /.notdef put} for\n", 40); - enc = newEncoding ? newEncoding : encoding; + enc = newEncoding ? newEncoding : (const char **)encoding; for (i = 0; i < 256; ++i) { if (enc[i]) { buf = GooString::format("dup {0:d} /{1:s} put\n", i, enc[i]); @@ -420,7 +465,7 @@ for (i = 0; i < nGlyphs; ++i) { ok = gTrue; getIndexVal(&charStringsIdx, i, &val, &ok); - if (ok) { + if (ok && i < charsetLength) { getString(charset[i], buf2, &ok); if (ok) { eexecCvtGlyph(&eb, buf2, val.pos, val.len, &subrIdx, &privateDicts[0]); @@ -444,7 +489,7 @@ (*outputFunc)(outputStream, "cleartomark\n", 12); } -void FoFiType1C::convertToCIDType0(char *psName, +void FoFiType1C::convertToCIDType0(char *psName, int *codeMap, int nCodes, FoFiOutputFunc outputFunc, void *outputStream) { int *cidMap; @@ -459,18 +504,36 @@ int gid, offset, n, i, j, k; // compute the CID count and build the CID-to-GID mapping - nCIDs = 0; - for (i = 0; i < nGlyphs; ++i) { - if (charset[i] >= nCIDs) { - nCIDs = charset[i] + 1; + if (codeMap) { + nCIDs = nCodes; + cidMap = (int *)gmallocn(nCIDs, sizeof(int)); + for (i = 0; i < nCodes; ++i) { + if (codeMap[i] >= 0 && codeMap[i] < nGlyphs) { + cidMap[i] = codeMap[i]; + } else { + cidMap[i] = -1; + } + } + } else if (topDict.firstOp == 0x0c1e) { + nCIDs = 0; + for (i = 0; i < nGlyphs && i < charsetLength; ++i) { + if (charset[i] >= nCIDs) { + nCIDs = charset[i] + 1; + } + } + cidMap = (int *)gmallocn(nCIDs, sizeof(int)); + for (i = 0; i < nCIDs; ++i) { + cidMap[i] = -1; + } + for (i = 0; i < nGlyphs && i < charsetLength; ++i) { + cidMap[charset[i]] = i; + } + } else { + nCIDs = nGlyphs; + cidMap = (int *)gmallocn(nCIDs, sizeof(int)); + for (i = 0; i < nCIDs; ++i) { + cidMap[i] = i; } - } - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - cidMap[i] = -1; - } - for (i = 0; i < nGlyphs; ++i) { - cidMap[charset[i]] = i; } // build the charstrings @@ -482,12 +545,13 @@ ok = gTrue; getIndexVal(&charStringsIdx, gid, &val, &ok); if (ok) { - getIndex(privateDicts[fdSelect[gid]].subrsOffset, &subrIdx, &ok); + getIndex(privateDicts[fdSelect ? fdSelect[gid] : 0].subrsOffset, + &subrIdx, &ok); if (!ok) { subrIdx.pos = -1; } cvtGlyph(val.pos, val.len, charStrings, - &subrIdx, &privateDicts[fdSelect[gid]], gTrue); + &subrIdx, &privateDicts[fdSelect ? fdSelect[gid] : 0], gTrue); } } } @@ -732,7 +796,7 @@ // write the charstring offset (CIDMap) table for (i = 0; i <= nCIDs; i += 6) { for (j = 0; j < 6 && i+j <= nCIDs; ++j) { - if (i+j < nCIDs && cidMap[i+j] >= 0) { + if (i+j < nCIDs && cidMap[i+j] >= 0 && fdSelect) { buf2[0] = (char)fdSelect[cidMap[i+j]]; } else { buf2[0] = (char)0; @@ -770,7 +834,7 @@ gfree(cidMap); } -void FoFiType1C::convertToType0(char *psName, +void FoFiType1C::convertToType0(char *psName, int *codeMap, int nCodes, FoFiOutputFunc outputFunc, void *outputStream) { int *cidMap; @@ -783,18 +847,36 @@ int fd, i, j, k; // compute the CID count and build the CID-to-GID mapping - nCIDs = 0; - for (i = 0; i < nGlyphs; ++i) { - if (charset[i] >= nCIDs) { - nCIDs = charset[i] + 1; + if (codeMap) { + nCIDs = nCodes; + cidMap = (int *)gmallocn(nCIDs, sizeof(int)); + for (i = 0; i < nCodes; ++i) { + if (codeMap[i] >= 0 && codeMap[i] < nGlyphs) { + cidMap[i] = codeMap[i]; + } else { + cidMap[i] = -1; + } + } + } else if (topDict.firstOp == 0x0c1e) { + nCIDs = 0; + for (i = 0; i < nGlyphs && i < charsetLength; ++i) { + if (charset[i] >= nCIDs) { + nCIDs = charset[i] + 1; + } + } + cidMap = (int *)gmallocn(nCIDs, sizeof(int)); + for (i = 0; i < nCIDs; ++i) { + cidMap[i] = -1; + } + for (i = 0; i < nGlyphs && i < charsetLength; ++i) { + cidMap[charset[i]] = i; + } + } else { + nCIDs = nGlyphs; + cidMap = (int *)gmallocn(nCIDs, sizeof(int)); + for (i = 0; i < nCIDs; ++i) { + cidMap[i] = i; } - } - cidMap = (int *)gmallocn(nCIDs, sizeof(int)); - for (i = 0; i < nCIDs; ++i) { - cidMap[i] = -1; - } - for (i = 0; i < nGlyphs; ++i) { - cidMap[charset[i]] = i; } // write the descendant Type 1 fonts @@ -804,7 +886,8 @@ //~ to handle multiple FDs correctly, need to somehow divide the //~ font up by FD; as a kludge we ignore CID 0, which is .notdef fd = 0; - if (fdSelect != NULL) { + // if fdSelect is NULL, we have an 8-bit font, so just leave fd=0 + if (fdSelect) { for (j = i==0 ? 1 : 0; j < 256 && i+j < nCIDs; ++j) { if (cidMap[i+j] >= 0) { fd = fdSelect[cidMap[i+j]]; @@ -1083,7 +1166,7 @@ gfree(cidMap); } -void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName, +void FoFiType1C::eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, int offset, int nBytes, Type1CIndex *subrIdx, Type1CPrivateDict *pDict) { @@ -1809,7 +1892,7 @@ charBuf->append((char *)buf, n); } -void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, char *s) { +void FoFiType1C::eexecWrite(Type1CEexecBuf *eb, const char *s) { Guchar *p; Guchar x; @@ -1853,6 +1936,38 @@ } } +void FoFiType1C::writePSString(char *s, FoFiOutputFunc outputFunc, + void *outputStream) { + char buf[80]; + char *p; + int i, c; + + i = 0; + buf[i++] = '('; + for (p = s; *p; ++p) { + c = *p & 0xff; + if (c == '(' || c == ')' || c == '\\') { + buf[i++] = '\\'; + buf[i++] = c; + } else if (c < 0x20 || c >= 0x80) { + buf[i++] = '\\'; + buf[i++] = '0' + ((c >> 6) & 7); + buf[i++] = '0' + ((c >> 3) & 7); + buf[i++] = '0' + (c & 7); + } else { + buf[i++] = c; + } + if (i >= 64) { + buf[i++] = '\\'; + buf[i++] = '\n'; + (*outputFunc)(outputStream, buf, i); + i = 0; + } + } + buf[i++] = ')'; + (*outputFunc)(outputStream, buf, i); +} + GBool FoFiType1C::parse() { Type1CIndex fdIdx; Type1CIndexVal val; @@ -1913,6 +2028,7 @@ // for 8-bit fonts: read the private dict } else { + nFDs = 1; privateDicts = (Type1CPrivateDict *)gmalloc(sizeof(Type1CPrivateDict)); readPrivateDict(topDict.privateOffset, topDict.privateSize, &privateDicts[0]); @@ -2064,6 +2180,8 @@ GBool hasFontMatrix; hasFontMatrix = gFalse; + fontMatrix[0] = fontMatrix[1] = fontMatrix[2] = 0; // make gcc happy + fontMatrix[3] = fontMatrix[4] = fontMatrix[5] = 0; pSize = pOffset = 0; pos = offset; nOps = 0; @@ -2278,10 +2396,10 @@ int pos, c, sid, nLeft, nSups, i, j; if (topDict.encodingOffset == 0) { - encoding = fofiType1StandardEncoding; + encoding = (char **)fofiType1StandardEncoding; } else if (topDict.encodingOffset == 1) { - encoding = fofiType1ExpertEncoding; + encoding = (char **)fofiType1ExpertEncoding; } else { encoding = (char **)gmallocn(256, sizeof(char *)); @@ -2301,7 +2419,7 @@ if (nCodes > nGlyphs) { nCodes = nGlyphs; } - for (i = 1; i < nCodes; ++i) { + for (i = 1; i < nCodes && i < charsetLength; ++i) { c = getU8(pos++, &parsedOk); if (!parsedOk) { return; @@ -2323,7 +2441,7 @@ if (!parsedOk) { return; } - for (j = 0; j <= nLeft && nCodes < nGlyphs; ++j) { + for (j = 0; j <= nLeft && nCodes < nGlyphs && nCodes < charsetLength; ++j) { if (c < 256) { if (encoding[c]) { gfree(encoding[c]); @@ -2366,12 +2484,16 @@ if (topDict.charsetOffset == 0) { charset = fofiType1CISOAdobeCharset; + charsetLength = sizeof(fofiType1CISOAdobeCharset) / sizeof(Gushort); } else if (topDict.charsetOffset == 1) { charset = fofiType1CExpertCharset; + charsetLength = sizeof(fofiType1CExpertCharset) / sizeof(Gushort); } else if (topDict.charsetOffset == 2) { charset = fofiType1CExpertSubsetCharset; + charsetLength = sizeof(fofiType1CExpertSubsetCharset) / sizeof(Gushort); } else { charset = (Gushort *)gmallocn(nGlyphs, sizeof(Gushort)); + charsetLength = nGlyphs; for (i = 0; i < nGlyphs; ++i) { charset[i] = 0; } @@ -2416,6 +2538,7 @@ if (!parsedOk) { gfree(charset); charset = NULL; + charsetLength = 0; return gFalse; } } @@ -2601,7 +2724,9 @@ Type1CIndexVal val; int n; - if (sid < 391) { + if (sid < 0) { + buf[0] = '\0'; + } else if (sid < 391) { strcpy(buf, fofiType1CStdStrings[sid]); } else { sid -= 391; diff -Nru poppler-0.18.4/fofi/FoFiType1C.h poppler-0.20.5/fofi/FoFiType1C.h --- poppler-0.18.4/fofi/FoFiType1C.h 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/FoFiType1C.h 2012-09-09 21:24:04.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2006 Takashi Iwai +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -161,9 +162,16 @@ // be NULL). This is only useful with 8-bit fonts. char **getEncoding(); + // Get the glyph names. + int getNumGlyphs() { return nGlyphs; } + GooString *getGlyphName(int gid); + // Return the mapping from CIDs to GIDs, and return the number of // CIDs in *. This is only useful for CID fonts. - Gushort *getCIDToGIDMap(int *nCIDs); + int *getCIDToGIDMap(int *nCIDs); + + // Return the font matrix as an array of six numbers. + void getFontMatrix(double *mat); // Convert to a Type 1 font, suitable for embedding in a PostScript // file. This is only useful with 8-bit fonts. If is @@ -171,25 +179,36 @@ // font. If is true the eexec section will be hex-encoded, // otherwise it will be left as binary data. If is non-NULL, // it will be used as the PostScript font name. - void convertToType1(char *psName, char **newEncoding, GBool ascii, + void convertToType1(char *psName, const char **newEncoding, GBool ascii, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 0 CIDFont, suitable for embedding in a // PostScript file. will be used as the PostScript font - // name. - void convertToCIDType0(char *psName, + // name. There are three cases for the CID-to-GID mapping: + // (1) if is non-NULL, then it is the CID-to-GID mapping + // (2) if is NULL and this is a CID CFF font, then the + // font's internal CID-to-GID mapping is used + // (3) is is NULL and this is an 8-bit CFF font, then + // the identity CID-to-GID mapping is used + void convertToCIDType0(char *psName, int *codeMap, int nCodes, FoFiOutputFunc outputFunc, void *outputStream); // Convert to a Type 0 (but non-CID) composite font, suitable for // embedding in a PostScript file. will be used as the - // PostScript font name. - void convertToType0(char *psName, + // PostScript font name. There are three cases for the CID-to-GID + // mapping: + // (1) if is non-NULL, then it is the CID-to-GID mapping + // (2) if is NULL and this is a CID CFF font, then the + // font's internal CID-to-GID mapping is used + // (3) is is NULL and this is an 8-bit CFF font, then + // the identity CID-to-GID mapping is used + void convertToType0(char *psName, int *codeMap, int nCodes, FoFiOutputFunc outputFunc, void *outputStream); private: FoFiType1C(char *fileA, int lenA, GBool freeFileDataA); - void eexecCvtGlyph(Type1CEexecBuf *eb, char *glyphName, + void eexecCvtGlyph(Type1CEexecBuf *eb, const char *glyphName, int offset, int nBytes, Type1CIndex *subrIdx, Type1CPrivateDict *pDict); @@ -199,8 +218,9 @@ void cvtGlyphWidth(GBool useOp, GooString *charBuf, Type1CPrivateDict *pDict); void cvtNum(double x, GBool isFP, GooString *charBuf); - void eexecWrite(Type1CEexecBuf *eb, char *s); + void eexecWrite(Type1CEexecBuf *eb, const char *s); void eexecWriteCharstring(Type1CEexecBuf *eb, Guchar *s, int n); + void writePSString(char *s, FoFiOutputFunc outputFunc, void *outputStream); GBool parse(); void readTopDict(); void readFD(int offset, int length, Type1CPrivateDict *pDict); @@ -231,6 +251,7 @@ int nFDs; Guchar *fdSelect; Gushort *charset; + Gushort charsetLength; int gsubrBias; GBool parsedOk; diff -Nru poppler-0.18.4/fofi/Makefile.am poppler-0.20.5/fofi/Makefile.am --- poppler-0.18.4/fofi/Makefile.am 2011-11-22 21:33:00.000000000 +0000 +++ poppler-0.20.5/fofi/Makefile.am 2012-05-10 20:05:44.000000000 +0000 @@ -10,6 +10,7 @@ FoFiEncodings.h \ FoFiTrueType.h \ FoFiType1.h \ + FoFiIdentifier.h \ FoFiType1C.h endif @@ -23,4 +24,5 @@ FoFiType1.cc \ FoFiType1.h \ FoFiType1C.cc \ + FoFiIdentifier.cc \ FoFiType1C.h diff -Nru poppler-0.18.4/fofi/Makefile.in poppler-0.20.5/fofi/Makefile.in --- poppler-0.18.4/fofi/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/fofi/Makefile.in 2012-10-10 17:34:54.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,10 +73,10 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libfofi_la_LIBADD = am_libfofi_la_OBJECTS = FoFiBase.lo FoFiEncodings.lo FoFiTrueType.lo \ - FoFiType1.lo FoFiType1C.lo + FoFiType1.lo FoFiType1C.lo FoFiIdentifier.lo libfofi_la_OBJECTS = $(am_libfofi_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -71,18 +88,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -90,23 +107,28 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libfofi_la_SOURCES) DIST_SOURCES = $(libfofi_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__poppler_fofi_include_HEADERS_DIST = FoFiBase.h FoFiEncodings.h \ - FoFiTrueType.h FoFiType1.h FoFiType1C.h + FoFiTrueType.h FoFiType1.h FoFiIdentifier.h FoFiType1C.h am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -128,6 +150,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(poppler_fofi_includedir)" HEADERS = $(poppler_fofi_include_HEADERS) ETAGS = etags @@ -205,12 +233,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -264,6 +296,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -338,6 +371,7 @@ @ENABLE_XPDF_HEADERS_TRUE@ FoFiEncodings.h \ @ENABLE_XPDF_HEADERS_TRUE@ FoFiTrueType.h \ @ENABLE_XPDF_HEADERS_TRUE@ FoFiType1.h \ +@ENABLE_XPDF_HEADERS_TRUE@ FoFiIdentifier.h \ @ENABLE_XPDF_HEADERS_TRUE@ FoFiType1C.h libfofi_la_SOURCES = \ @@ -350,6 +384,7 @@ FoFiType1.cc \ FoFiType1.h \ FoFiType1C.cc \ + FoFiIdentifier.cc \ FoFiType1C.h all: all-am @@ -395,7 +430,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libfofi.la: $(libfofi_la_OBJECTS) $(libfofi_la_DEPENDENCIES) +libfofi.la: $(libfofi_la_OBJECTS) $(libfofi_la_DEPENDENCIES) $(EXTRA_libfofi_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libfofi_la_OBJECTS) $(libfofi_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -406,6 +441,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiBase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiEncodings.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiIdentifier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiTrueType.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiType1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FoFiType1C.Plo@am__quote@ @@ -413,26 +449,23 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -441,8 +474,11 @@ -rm -rf .libs _libs install-poppler_fofi_includeHEADERS: $(poppler_fofi_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_fofi_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_fofi_includedir)" @list='$(poppler_fofi_include_HEADERS)'; test -n "$(poppler_fofi_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_fofi_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_fofi_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -456,9 +492,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_fofi_include_HEADERS)'; test -n "$(poppler_fofi_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_fofi_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_fofi_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_fofi_includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -559,10 +593,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/glib/CMakeLists.txt poppler-0.20.5/glib/CMakeLists.txt --- poppler-0.18.4/glib/CMakeLists.txt 2012-02-05 14:37:19.000000000 +0000 +++ poppler-0.20.5/glib/CMakeLists.txt 2012-06-11 13:19:41.000000000 +0000 @@ -77,7 +77,7 @@ ${CMAKE_SOURCE_DIR}/poppler/CairoRescaleBox.cc ) add_library(poppler-glib SHARED ${poppler_glib_SRCS} ${poppler_glib_generated_SRCS}) -set_target_properties(poppler-glib PROPERTIES VERSION 8.2.0 SOVERSION 8) +set_target_properties(poppler-glib PROPERTIES VERSION 8.4.0 SOVERSION 8) target_link_libraries(poppler-glib poppler ${GLIB2_LIBRARIES} ${CAIRO_LIBRARIES} ${FREETYPE_LIBRARIES}) install(TARGETS poppler-glib RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) diff -Nru poppler-0.18.4/glib/Makefile.am poppler-0.20.5/glib/Makefile.am --- poppler-0.18.4/glib/Makefile.am 2012-02-05 14:37:19.000000000 +0000 +++ poppler-0.20.5/glib/Makefile.am 2012-06-11 13:19:41.000000000 +0000 @@ -74,7 +74,7 @@ $(FREETYPE_LIBS) \ $(FONTCONFIG_LIBS) -libpoppler_glib_la_LDFLAGS = -version-info 10:0:2 @create_shared_lib@ @auto_import_flags@ +libpoppler_glib_la_LDFLAGS = -version-info 12:0:4 @create_shared_lib@ @auto_import_flags@ BUILT_SOURCES = \ poppler-enums.c \ diff -Nru poppler-0.18.4/glib/Makefile.in poppler-0.20.5/glib/Makefile.in --- poppler-0.18.4/glib/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/glib/Makefile.in 2012-10-10 17:34:54.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -18,6 +18,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -77,6 +94,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibsdir)" \ "$(DESTDIR)$(poppler_glib_includedir)" \ @@ -94,8 +117,8 @@ poppler-attachment.lo poppler-form-field.lo poppler-annot.lo \ poppler-layer.lo poppler-media.lo poppler-movie.lo poppler.lo libpoppler_glib_la_OBJECTS = $(am_libpoppler_glib_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libpoppler_glib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ @@ -111,18 +134,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -130,18 +153,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpoppler_glib_la_SOURCES) DIST_SOURCES = $(libpoppler_glib_la_SOURCES) @@ -152,6 +175,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__dist_gir_DATA_DIST = Poppler-0.18.gir DATA = $(dist_gir_DATA) $(typelibs_DATA) HEADERS = $(nodist_poppler_glib_include_HEADERS) \ @@ -262,12 +290,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -321,6 +353,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -444,7 +477,7 @@ $(FREETYPE_LIBS) \ $(FONTCONFIG_LIBS) -libpoppler_glib_la_LDFLAGS = -version-info 10:0:2 @create_shared_lib@ @auto_import_flags@ +libpoppler_glib_la_LDFLAGS = -version-info 12:0:4 @create_shared_lib@ @auto_import_flags@ BUILT_SOURCES = \ poppler-enums.c \ poppler-enums.h @@ -505,7 +538,6 @@ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -513,6 +545,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -534,7 +568,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libpoppler-glib.la: $(libpoppler_glib_la_OBJECTS) $(libpoppler_glib_la_DEPENDENCIES) +libpoppler-glib.la: $(libpoppler_glib_la_OBJECTS) $(libpoppler_glib_la_DEPENDENCIES) $(EXTRA_libpoppler_glib_la_DEPENDENCIES) $(AM_V_CXXLD)$(libpoppler_glib_la_LINK) -rpath $(libdir) $(libpoppler_glib_la_OBJECTS) $(libpoppler_glib_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -559,50 +593,44 @@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -611,8 +639,11 @@ -rm -rf .libs _libs install-dist_girDATA: $(dist_gir_DATA) @$(NORMAL_INSTALL) - test -z "$(girdir)" || $(MKDIR_P) "$(DESTDIR)$(girdir)" @list='$(dist_gir_DATA)'; test -n "$(girdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(girdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(girdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -626,13 +657,14 @@ @$(NORMAL_UNINSTALL) @list='$(dist_gir_DATA)'; test -n "$(girdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(girdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(girdir)" && rm -f $$files + dir='$(DESTDIR)$(girdir)'; $(am__uninstall_files_from_dir) install-typelibsDATA: $(typelibs_DATA) @$(NORMAL_INSTALL) - test -z "$(typelibsdir)" || $(MKDIR_P) "$(DESTDIR)$(typelibsdir)" @list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(typelibsdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(typelibsdir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -646,13 +678,14 @@ @$(NORMAL_UNINSTALL) @list='$(typelibs_DATA)'; test -n "$(typelibsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(typelibsdir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(typelibsdir)" && rm -f $$files + dir='$(DESTDIR)$(typelibsdir)'; $(am__uninstall_files_from_dir) install-nodist_poppler_glib_includeHEADERS: $(nodist_poppler_glib_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_glib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_glib_includedir)" @list='$(nodist_poppler_glib_include_HEADERS)'; test -n "$(poppler_glib_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_glib_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_glib_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -666,13 +699,14 @@ @$(NORMAL_UNINSTALL) @list='$(nodist_poppler_glib_include_HEADERS)'; test -n "$(poppler_glib_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_glib_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_glib_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_glib_includedir)'; $(am__uninstall_files_from_dir) install-poppler_glib_includeHEADERS: $(poppler_glib_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_glib_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_glib_includedir)" @list='$(poppler_glib_include_HEADERS)'; test -n "$(poppler_glib_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_glib_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_glib_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -686,9 +720,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_glib_include_HEADERS)'; test -n "$(poppler_glib_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_glib_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_glib_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_glib_includedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. @@ -857,13 +889,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -903,10 +932,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/glib/Poppler-0.18.gir poppler-0.20.5/glib/Poppler-0.18.gir --- poppler-0.18.4/glib/Poppler-0.18.gir 2012-02-15 17:23:33.000000000 +0000 +++ poppler-0.20.5/glib/Poppler-0.18.gir 2012-10-10 17:35:47.000000000 +0000 @@ -354,20 +354,16 @@ - Retrieves the color of @poppler_annot. - -@poppler_annot, or %NULL. It must be freed with g_free() when done. + Retrieves the color of @poppler_annot. - a new allocated #PopplerColor with the color values of + a new allocated #PopplerColor with the color values of @poppler_annot, or %NULL. It must be freed with g_free() when done. - Retrieves the contents of @poppler_annot. - -must be freed with g_free() when done. + Retrieves the contents of @poppler_annot. - a new allocated string with the contents of @poppler_annot. It + a new allocated string with the contents of @poppler_annot. It must be freed with g_free() when done. @@ -382,20 +378,16 @@ Retrieves the last modification data of @poppler_annot. The returned string will be either a PDF format date or a text string. -See also #poppler_date_parse() - -@poppler_annot. It must be freed with g_free() when done. +See also #poppler_date_parse() - a new allocated string with the last modification data of + a new allocated string with the last modification data of @poppler_annot. It must be freed with g_free() when done. - Retrieves the name of @poppler_annot. - -be freed with g_free() when done. + Retrieves the name of @poppler_annot. - a new allocated string with the name of @poppler_annot. It must + a new allocated string with the name of @poppler_annot. It must be freed with g_free() when done. @@ -435,7 +427,7 @@ a text string containing the new contents - + @@ -467,20 +459,16 @@ - Creates a new empty #PopplerAnnotCalloutLine. - -It must be freed when done. + Creates a new empty #PopplerAnnotCalloutLine. - a new allocated #PopplerAnnotCalloutLine, %NULL in other case. + a new allocated #PopplerAnnotCalloutLine, %NULL in other case. It must be freed when done. - It does copy @callout to a new #PopplerAnnotCalloutLine. - -@callout, %NULL in other case. It must be freed when done. + It does copy @callout to a new #PopplerAnnotCalloutLine. - a new allocated #PopplerAnnotCalloutLine as exact copy of + a new allocated #PopplerAnnotCalloutLine as exact copy of @callout, %NULL in other case. It must be freed when done. @@ -523,11 +511,9 @@ - Retrieves the name of @poppler_annot. - -be freed with g_free() when done. + Retrieves the name of @poppler_annot. - a new allocated string with the name of @poppler_annot. It must + a new allocated string with the name of @poppler_annot. It must be freed with g_free() when done. @@ -590,12 +576,9 @@ Retrieves a #PopplerAnnotCalloutLine of four or six numbers specifying a callout -line attached to the @poppler_annot. - -line, %NULL in other case. It must be freed with g_free() when -done. +line attached to the @poppler_annot. - a new allocated #PopplerAnnotCalloutLine if the annot has a callout + a new allocated #PopplerAnnotCalloutLine if the annot has a callout line, %NULL in other case. It must be freed with g_free() when done. @@ -667,17 +650,17 @@ glib:type-name="PopplerAnnotMarkup" glib:get-type="poppler_annot_markup_get_type"> - Returns the date and time when the annotation was created - -when the annotation was created, or %NULL + Returns the date and time when the annotation was created - a #GDate representing the date and time + a #GDate representing the date and time when the annotation was created, or %NULL + Gets the external data type of @poppler_annot. + #PopplerAnnotExternalDataType of @poppler_annot. @@ -691,21 +674,17 @@ - Retrieves the opacity value of @poppler_annot. - -between 0 (transparent) and 1 (opaque) + Retrieves the opacity value of @poppler_annot. - the opacity value of @poppler_annot, + the opacity value of @poppler_annot, between 0 (transparent) and 1 (opaque) - Retrieves the state of the popup window related to @poppler_annot. - -other case. + Retrieves the state of the popup window related to @poppler_annot. - the state of @poppler_annot. %TRUE if it's open, %FALSE in + the state of @poppler_annot. %TRUE if it's open, %FALSE in other case. @@ -729,14 +708,18 @@ + Gets the reply type of @poppler_annot. + #PopplerAnnotMarkupReplyType of @poppler_annot. + Retrives the subject text of @poppler_annot. + the subject text of @poppler_annot. @@ -759,7 +742,7 @@ a text string containing the new label, or %NULL - + @@ -831,11 +814,9 @@ - Retrieves the movie object (PopplerMovie) stored in the @poppler_annot. - -object is owned by #PopplerAnnotMovie and should not be freed + Retrieves the movie object (PopplerMovie) stored in the @poppler_annot. - the movie object stored in the @poppler_annot. The returned + the movie object stored in the @poppler_annot. The returned object is owned by #PopplerAnnotMovie and should not be freed @@ -858,11 +839,9 @@ - Retrieves the action (#PopplerAction) that shall be performed when @poppler_annot is activated - -object is owned by @poppler_annot and should not be freed + Retrieves the action (#PopplerAction) that shall be performed when @poppler_annot is activated - the action to perform. The returned + the action to perform. The returned object is owned by @poppler_annot and should not be freed @@ -902,11 +881,9 @@ - Retrieves the state of @poppler_annot. - -other case. + Retrieves the state of @poppler_annot. - the state of @poppler_annot. %TRUE if it's open, %FALSE in + the state of @poppler_annot. %TRUE if it's open, %FALSE in other case. @@ -923,33 +900,33 @@ Sets the icon of @poppler_annot. The following predefined icons are currently supported: <variablelist> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_NOTE</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_COMMENT</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_KEY</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_HELP</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_NEW_PARAGRAPH</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_PARAGRAPH</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_INSERT</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_CROSS</term> -</varlistentry> -<varlistentry> -<term>#POPPLER_ANNOT_TEXT_ICON_CIRCLE</term> -</varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_NOTE</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_COMMENT</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_KEY</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_HELP</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_NEW_PARAGRAPH</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_PARAGRAPH</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_INSERT</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_CROSS</term> + </varlistentry> + <varlistentry> + <term>#POPPLER_ANNOT_TEXT_ICON_CIRCLE</term> + </varlistentry> </variablelist> @@ -957,7 +934,7 @@ the name of an icon - + @@ -1139,7 +1116,7 @@ name of file to save - + @@ -1202,6 +1179,7 @@ @error and return %FALSE, in which case poppler_attachment_save_to_callback() will fail with the same error. + %TRUE if successful, %FALSE (with @error set) if failed. @@ -1401,7 +1379,7 @@ password to unlock the file with, or %NULL - + @@ -1418,27 +1396,24 @@ uri of the file to load - + password to unlock the file with, or %NULL - + - Finds named destination @link_name in @document - -@link_name is not a destination. Returned value must -be freed with #poppler_dest_free + Finds named destination @link_name in @document - The #PopplerDest destination or %NULL if + The #PopplerDest destination or %NULL if @link_name is not a destination. Returned value must be freed with #poppler_dest_free a named destination - + @@ -1457,11 +1432,9 @@ - Returns the author of the document - -of @document, or %NULL + Returns the author of the document - a new allocated string containing the author + a new allocated string containing the author of @document, or %NULL @@ -1479,22 +1452,18 @@ version="0.16"> Returns the creator of the document. If the document was converted from another format, the creator is the name of the product -that created the original document from which it was converted. - -of @document, or %NULL +that created the original document from which it was converted. - a new allocated string containing the creator + a new allocated string containing the creator of @document, or %NULL Returns the #PopplerFormField for the given @id. It must be freed with -g_object_unref() - -not found +g_object_unref() - a new #PopplerFormField or %NULL if + a new #PopplerFormField or %NULL if not found @@ -1541,22 +1510,18 @@ - Returns the keywords associated to the document - -to @document, or %NULL + Returns the keywords associated to the document - a new allocated string containing keywords associated + a new allocated string containing keywords associated to @document, or %NULL - Returns the XML metadata string of the document - -metadata, or %NULL + Returns the XML metadata string of the document - a new allocated string containing the XML + a new allocated string containing the XML metadata, or %NULL @@ -1614,7 +1579,7 @@ a page label - + @@ -1666,11 +1631,9 @@ - Returns the PDF version of @document as a string (e.g. PDF-1.6) - -of @document, or %NULL + Returns the PDF version of @document as a string (e.g. PDF-1.6) - a new allocated string containing the PDF version + a new allocated string containing the PDF version of @document, or %NULL @@ -1688,33 +1651,27 @@ version="0.16"> Returns the producer of the document. If the document was converted from another format, the producer is the name of the product -that converted it to PDF - -of @document, or %NULL +that converted it to PDF - a new allocated string containing the producer + a new allocated string containing the producer of @document, or %NULL - Returns the subject of the document - -of @document, or %NULL + Returns the subject of the document - a new allocated string containing the subject + a new allocated string containing the subject of @document, or %NULL - Returns the document's title - -of @document, or %NULL + Returns the document's title - a new allocated string containing the title + a new allocated string containing the title of @document, or %NULL @@ -1749,7 +1706,7 @@ uri of file to save - + @@ -1768,7 +1725,7 @@ uri of file to save - + @@ -1906,13 +1863,13 @@ <informalexample><programlisting> font_info = poppler_font_info_new (document); while (poppler_font_info_scan (font_info, 20, &fonts_iter)) { -if (!fonts_iter) -continue; /<!-- -->* No fonts found in these 20 pages *<!-- -->/ -do { -/<!-- -->* Do something with font iter *<!-- -->/ -g_print ("Font Name: %s\n", poppler_fonts_iter_get_name (fonts_iter)); -} while (poppler_fonts_iter_next (fonts_iter)); -poppler_fonts_iter_free (fonts_iter); + if (!fonts_iter) + continue; /<!-- -->* No fonts found in these 20 pages *<!-- -->/ + do { + /<!-- -->* Do something with font iter *<!-- -->/ + g_print ("Font Name: %s\n", poppler_fonts_iter_get_name (fonts_iter)); + } while (poppler_fonts_iter_next (fonts_iter)); + poppler_fonts_iter_free (fonts_iter); } </programlisting></informalexample> @@ -2006,13 +1963,22 @@ + + Returns the encoding of the font associated with @iter + + the font encoding + + + The filename of the font associated with @iter or %NULL if the font is embedded - the filename of the font or %NULL y font is emebedded - + the filename of the font or %NULL if font is embedded + Returns the full name of the font associated with @iter the font full name - + Returns the name of the font associated with @iter the font name - + + + + + The name of the substitute font of the font associated with @iter or %NULL if +the font is embedded + + the name of the substitute font or %NULL if font is embedded + @@ -2231,7 +2207,7 @@ the new text - + @@ -2259,11 +2235,9 @@ c:identifier="poppler_form_field_get_action" version="0.18"> Retrieves the action (#PopplerAction) that shall be -performed when @field is activated, or %NULL - -object is owned by @field and should not be freed +performed when @field is activated, or %NULL - the action to perform. The returned + the action to perform. The returned object is owned by @field and should not be freed @@ -2390,7 +2364,7 @@ the new text - + @@ -2529,21 +2503,21 @@ static void walk_index (PopplerIndexIter *iter) { -do -{ -/<!-- -->* Get the the action and do something with it *<!-- -->/ -PopplerIndexIter *child = poppler_index_iter_get_child (iter); -if (child) -walk_index (child); -poppler_index_iter_free (child); -} -while (poppler_index_iter_next (iter)); + do + { + /<!-- -->* Get the the action and do something with it *<!-- -->/ + PopplerIndexIter *child = poppler_index_iter_get_child (iter); + if (child) + walk_index (child); + poppler_index_iter_free (child); + } + while (poppler_index_iter_next (iter)); } ... { -iter = poppler_index_iter_new (document); -walk_index (iter); -poppler_index_iter_free (iter); + iter = poppler_index_iter_new (document); + walk_index (iter); + poppler_index_iter_free (iter); } </programlisting></informalexample> @@ -2614,11 +2588,9 @@ - Returns the numeric ID the radio button group associated with @layer. - -or 0 if the layer is not associated to any radio button group + Returns the numeric ID the radio button group associated with @layer. - the ID of the radio button group associated with @layer, + the ID of the radio button group associated with @layer, or 0 if the layer is not associated to any radio button group @@ -2629,7 +2601,7 @@ presentation as a title in a viewer's GUI a string containing the title of the layer - + @@ -2685,12 +2657,9 @@ Creates a new #PopplerLayersIter as a copy of @iter. This must be freed with -poppler_layers_iter_free(). - - -Since 0.12 +poppler_layers_iter_free(). - a new #PopplerLayersIter + a new #PopplerLayersIter Since 0.12 @@ -2715,11 +2684,9 @@ - Returns the #PopplerLayer associated with @iter. - -there isn't any layer associated with @iter + Returns the #PopplerLayer associated with @iter. - a new #PopplerLayer, or %NULL if + a new #PopplerLayer, or %NULL if there isn't any layer associated with @iter @@ -2727,11 +2694,9 @@ c:identifier="poppler_layers_iter_get_title" version="0.12"> Returns the title associated with @iter. It must be freed with -g_free(). - -The returned string should be freed with g_free() when no longer needed. +g_free(). - a new string containing the @iter's title or %NULL if @iter doesn't have a title. + a new string containing the @iter's title or %NULL if @iter doesn't have a title. The returned string should be freed with g_free() when no longer needed. @@ -2783,10 +2748,10 @@ - + - + - + + Returns the media clip filename, in case of non-embedded media. filename might be +a local relative or absolute path or a URI - + a filename, return value is owned by #PopplerMedia and should not be freed + Returns the media clip mime-type the mime-type, return value is owned by #PopplerMedia and should not be freed - + name of file to save - + @@ -2905,9 +2875,13 @@ parent="GObject.Object" glib:type-name="PopplerMovie" glib:get-type="poppler_movie_get_type"> - + + Returns the local filename identifying a self-describing movie file - + a local filename, return value is owned by #PopplerMovie and should not be freed + the path of the output filename - + the first page to print @@ -3154,7 +3128,7 @@ the text to search for (UTF-8 encoded) - + @@ -3212,7 +3186,7 @@ - The image identificator + The image identifier @@ -3240,11 +3214,9 @@ c:identifier="poppler_page_get_label" version="0.16"> Returns the label of @page. Note that page labels -and page indices might not coincide. - -or %NULL if @page doesn't have a label +and page indices might not coincide. - a new allocated string containing the label of @page, + a new allocated string containing the label of @page, or %NULL if @page doesn't have a label @@ -3288,11 +3260,9 @@ - Retrieves the contents of the specified @selection as text. - -as a string + Retrieves the contents of the specified @selection as text. - a pointer to the contents of the @selection + a pointer to the contents of the @selection as a string @@ -3362,11 +3332,9 @@ - Retrieves the text of @page. - -as a string + Retrieves the text of @page. - a pointer to the text of the @page + a pointer to the text of the @page as a string @@ -3412,7 +3380,7 @@ direction="out" caller-allocates="0" transfer-ownership="full"> - (out) length of returned array + length of returned array @@ -3420,11 +3388,9 @@ Get the embedded thumbnail for the specified page. If the document doesn't have an embedded thumbnail for the page, this function -returns %NULL. - -doesn't have a thumbnail for this page. +returns %NULL. - the tumbnail as a cairo_surface_t or %NULL if the document + the tumbnail as a cairo_surface_t or %NULL if the document doesn't have a thumbnail for this page. @@ -3439,12 +3405,18 @@ - - (out) return location for width + + return location for width - - (out) return location for height + + return location for height @@ -3993,7 +3965,7 @@ string to parse - + an uninitialized #time_t @@ -4019,7 +3991,7 @@ Returns the version of poppler in use. This result is not to be freed. the version of poppler. - + diff -Nru poppler-0.18.4/glib/demo/Makefile.in poppler-0.20.5/glib/demo/Makefile.in --- poppler-0.18.4/glib/demo/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/glib/demo/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -67,8 +84,8 @@ poppler_glib_demo_DEPENDENCIES = \ $(top_builddir)/glib/libpoppler-glib.la \ $(top_builddir)/poppler/libpoppler.la $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -80,18 +97,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) @@ -99,21 +116,26 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(poppler_glib_demo_SOURCES) DIST_SOURCES = $(poppler_glib_demo_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -189,12 +211,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -248,6 +274,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -399,8 +426,11 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -440,7 +470,7 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -poppler-glib-demo$(EXEEXT): $(poppler_glib_demo_OBJECTS) $(poppler_glib_demo_DEPENDENCIES) +poppler-glib-demo$(EXEEXT): $(poppler_glib_demo_OBJECTS) $(poppler_glib_demo_DEPENDENCIES) $(EXTRA_poppler_glib_demo_DEPENDENCIES) @rm -f poppler-glib-demo$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_glib_demo_OBJECTS) $(poppler_glib_demo_LDADD) $(LIBS) @@ -472,50 +502,44 @@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -622,10 +646,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/glib/demo/annots.c poppler-0.20.5/glib/demo/annots.c --- poppler-0.18.4/glib/demo/annots.c 2011-11-22 21:33:01.000000000 +0000 +++ poppler-0.20.5/glib/demo/annots.c 2012-06-11 13:19:41.000000000 +0000 @@ -666,9 +666,15 @@ vbox = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); +#if GTK_CHECK_VERSION (2, 24, 0) + type_selector = gtk_combo_box_text_new (); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (type_selector), "POPPLER_ANNOT_UNKNOWN"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (type_selector), "POPPLER_ANNOT_TEXT"); +#else type_selector = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX (type_selector), "POPPLER_ANNOT_UNKNOWN"); gtk_combo_box_append_text (GTK_COMBO_BOX (type_selector), "POPPLER_ANNOT_TEXT"); +#endif gtk_combo_box_set_active (GTK_COMBO_BOX (type_selector), 1); gtk_box_pack_start (GTK_BOX (vbox), type_selector, TRUE, TRUE, 0); gtk_widget_show (type_selector); diff -Nru poppler-0.18.4/glib/demo/fonts.c poppler-0.20.5/glib/demo/fonts.c --- poppler-0.18.4/glib/demo/fonts.c 2011-11-22 21:33:01.000000000 +0000 +++ poppler-0.20.5/glib/demo/fonts.c 2012-06-11 13:19:41.000000000 +0000 @@ -155,13 +155,19 @@ const gchar *name; const gchar *type; const gchar *embedded; + const gchar *substitute; const gchar *filename; + const gchar *encoding; gchar *details; name = poppler_fonts_iter_get_name (fonts_iter); if (!name) name = "No name"; + encoding = poppler_fonts_iter_get_encoding (fonts_iter); + if (!encoding) + encoding = "None"; + type = font_type_to_string (poppler_fonts_iter_get_font_type (fonts_iter)); if (poppler_fonts_iter_is_embedded (fonts_iter)) { @@ -173,12 +179,13 @@ embedded = "Not embedded"; } + substitute = poppler_fonts_iter_get_substitute_name (fonts_iter); filename = poppler_fonts_iter_get_file_name (fonts_iter); - if (filename) - details = g_markup_printf_escaped ("%s\n%s (%s)", type, embedded, filename); + if (substitute && filename) + details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s, substituting with %s\n(%s)", type, encoding, embedded, substitute, filename); else - details = g_markup_printf_escaped ("%s\n%s", type, embedded); + details = g_markup_printf_escaped ("%s\nEncoding: %s\n%s", type, encoding, embedded); gtk_list_store_append (GTK_LIST_STORE (model), &iter); gtk_list_store_set (GTK_LIST_STORE (model), &iter, diff -Nru poppler-0.18.4/glib/demo/main.c poppler-0.20.5/glib/demo/main.c --- poppler-0.18.4/glib/demo/main.c 2011-11-22 21:33:02.000000000 +0000 +++ poppler-0.20.5/glib/demo/main.c 2012-06-11 13:19:41.000000000 +0000 @@ -180,7 +180,9 @@ action_area = gtk_dialog_get_action_area (dialog); /* Set the dialog up with HIG properties */ +#if !GTK_CHECK_VERSION (2, 22, 0) gtk_dialog_set_has_separator (dialog, FALSE); +#endif gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (content_area), 2); /* 2 * 5 + 2 = 12 */ gtk_container_set_border_width (GTK_CONTAINER (action_area), 5); @@ -294,14 +296,19 @@ gchar *uri; GTimer *timer; GError *error = NULL; + GtkAccelGroup *gtk_accel; + GClosure *closure; if (argc != 2) { g_print ("Usage: poppler-glib-demo FILE\n"); return 1; } +/* Threading is always enabled starting from GLib 2.24.0 */ +#if !GLIB_CHECK_VERSION (2, 24, 0) if (!g_thread_supported ()) g_thread_init (NULL); +#endif gtk_init (&argc, &argv); @@ -359,6 +366,13 @@ g_signal_connect (G_OBJECT (win), "delete-event", G_CALLBACK (gtk_main_quit), NULL); + gtk_accel = gtk_accel_group_new (); + closure = g_cclosure_new (G_CALLBACK (gtk_main_quit), NULL, NULL); + gtk_accel_group_connect (gtk_accel, gdk_keyval_from_name ("q"), + GDK_CONTROL_MASK, 0, closure); + g_closure_unref (closure); + gtk_window_add_accel_group (GTK_WINDOW(win), gtk_accel); + hbox = gtk_hbox_new (FALSE, 6); treeview = pgd_demo_list_create (); diff -Nru poppler-0.18.4/glib/demo/print.c poppler-0.20.5/glib/demo/print.c --- poppler-0.18.4/glib/demo/print.c 2011-11-22 21:33:02.000000000 +0000 +++ poppler-0.20.5/glib/demo/print.c 2012-06-11 13:19:41.000000000 +0000 @@ -121,11 +121,18 @@ gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0); gtk_widget_show (label); +#if GTK_CHECK_VERSION (2, 24, 0) + combo = gtk_combo_box_text_new (); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Document"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Document and markup"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), "Document and stamps"); +#else combo = gtk_combo_box_new_text (); - demo->options_combo = combo; gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "Document"); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "Document and markup"); gtk_combo_box_append_text (GTK_COMBO_BOX (combo), "Document and stamps"); +#endif + demo->options_combo = combo; gtk_combo_box_set_active (GTK_COMBO_BOX (combo), options); gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0); gtk_widget_show (combo); diff -Nru poppler-0.18.4/glib/demo/render.c poppler-0.20.5/glib/demo/render.c --- poppler-0.18.4/glib/demo/render.c 2011-11-22 21:33:02.000000000 +0000 +++ poppler-0.20.5/glib/demo/render.c 2012-06-11 13:19:41.000000000 +0000 @@ -372,11 +372,19 @@ gtk_box_pack_start (GTK_BOX (rotate_hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); +#if GTK_CHECK_VERSION (2, 24, 0) + rotate_selector = gtk_combo_box_text_new (); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "0"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "90"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "180"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "270"); +#else rotate_selector = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "0"); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "90"); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "180"); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "270"); +#endif gtk_combo_box_set_active (GTK_COMBO_BOX (rotate_selector), 0); g_signal_connect (G_OBJECT (rotate_selector), "changed", G_CALLBACK (pgd_render_rotate_selector_changed), @@ -393,11 +401,19 @@ gtk_box_pack_start (GTK_BOX (mode_hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); +#if GTK_CHECK_VERSION (2, 24, 0) + mode_selector = gtk_combo_box_text_new (); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (mode_selector), "cairo"); +#ifdef POPPLER_WITH_GDK + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (mode_selector), "pixbuf"); +#endif +#else // ! GTK_CHECK_VERSION (2, 24, 0) mode_selector = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "cairo"); #ifdef POPPLER_WITH_GDK gtk_combo_box_append_text (GTK_COMBO_BOX (mode_selector), "pixbuf"); #endif +#endif // GTK_CHECK_VERSION (2, 24, 0) gtk_combo_box_set_active (GTK_COMBO_BOX (mode_selector), 0); g_signal_connect (G_OBJECT (mode_selector), "changed", G_CALLBACK (pgd_render_mode_selector_changed), diff -Nru poppler-0.18.4/glib/demo/selections.c poppler-0.20.5/glib/demo/selections.c --- poppler-0.18.4/glib/demo/selections.c 2011-11-22 21:33:02.000000000 +0000 +++ poppler-0.20.5/glib/demo/selections.c 2012-06-11 13:19:41.000000000 +0000 @@ -34,6 +34,7 @@ GtkWidget *darea; GtkWidget *fg_color_button; GtkWidget *bg_color_button; + GtkWidget *copy_button; PopplerPage *page; cairo_surface_t *surface; @@ -76,6 +77,7 @@ cairo_region_destroy (demo->selected_region); demo->selected_region = NULL; } + gtk_widget_set_sensitive(demo->copy_button, FALSE); } static void @@ -125,7 +127,7 @@ } static void -pgd_selections_update_seleted_text (PgdSelectionsDemo *demo) +pgd_selections_update_selected_text (PgdSelectionsDemo *demo) { GList *region; gchar *text; @@ -146,6 +148,7 @@ if (text) { demo->selected_text = g_utf8_normalize (text, -1, G_NORMALIZE_NFKC); g_free (text); + gtk_widget_set_sensitive(demo->copy_button, TRUE); } } @@ -316,7 +319,7 @@ return FALSE; if (demo->start.x != -1) - pgd_selections_update_seleted_text (demo); + pgd_selections_update_selected_text (demo); demo->start.x = -1; @@ -430,6 +433,15 @@ } static void +pgd_selections_copy (GtkButton *button, + PgdSelectionsDemo *demo) +{ + GtkClipboard *clipboard = gtk_clipboard_get_for_display(gdk_display_get_default(), + GDK_SELECTION_CLIPBOARD); + gtk_clipboard_set_text (clipboard, demo->selected_text, -1); +} + +static void pgd_selections_page_selector_value_changed (GtkSpinButton *spinbutton, PgdSelectionsDemo *demo) { @@ -538,11 +550,19 @@ gtk_box_pack_start (GTK_BOX (rotate_hbox), label, TRUE, TRUE, 0); gtk_widget_show (label); +#if GTK_CHECK_VERSION (2, 24, 0) + rotate_selector = gtk_combo_box_text_new (); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "0"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "90"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "180"); + gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (rotate_selector), "270"); +#else rotate_selector = gtk_combo_box_new_text (); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "0"); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "90"); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "180"); gtk_combo_box_append_text (GTK_COMBO_BOX (rotate_selector), "270"); +#endif gtk_combo_box_set_active (GTK_COMBO_BOX (rotate_selector), 0); #if 0 g_signal_connect (G_OBJECT (rotate_selector), "changed", @@ -591,6 +611,14 @@ gtk_box_pack_start (GTK_BOX (hbox), color_hbox, FALSE, TRUE, 0); gtk_widget_show (color_hbox); + demo->copy_button = gtk_button_new_with_label ("Copy"); + g_signal_connect (G_OBJECT (demo->copy_button), "clicked", + G_CALLBACK (pgd_selections_copy), + (gpointer)demo); + gtk_box_pack_end (GTK_BOX (hbox), demo->copy_button, FALSE, TRUE, 0); + gtk_widget_set_sensitive(demo->copy_button, FALSE); + gtk_widget_show (demo->copy_button); + button = gtk_button_new_with_label ("Render"); g_signal_connect (G_OBJECT (button), "clicked", G_CALLBACK (pgd_selections_render), diff -Nru poppler-0.18.4/glib/poppler-action.cc poppler-0.20.5/glib/poppler-action.cc --- poppler-0.18.4/glib/poppler-action.cc 2011-11-22 21:33:02.000000000 +0000 +++ poppler-0.20.5/glib/poppler-action.cc 2012-05-10 20:05:44.000000000 +0000 @@ -480,7 +480,7 @@ if (annotObj.isDict ()) { Object tmp; - annot = new AnnotMovie (xref, annotObj.getDict(), document->doc->getCatalog (), &tmp); + annot = new AnnotMovie (document->doc, annotObj.getDict(), &tmp); if (!annot->isOk ()) { delete annot; annot = NULL; diff -Nru poppler-0.18.4/glib/poppler-annot.cc poppler-0.20.5/glib/poppler-annot.cc --- poppler-0.18.4/glib/poppler-annot.cc 2012-02-05 14:37:19.000000000 +0000 +++ poppler-0.20.5/glib/poppler-annot.cc 2012-06-11 13:19:41.000000000 +0000 @@ -200,7 +200,7 @@ PDFRectangle pdf_rect(rect->x1, rect->y1, rect->x2, rect->y2); - annot = new AnnotText (doc->doc->getXRef(), &pdf_rect, doc->doc->getCatalog()); + annot = new AnnotText (doc->doc, &pdf_rect); return _poppler_annot_text_new (annot); } @@ -709,7 +709,7 @@ g_return_if_fail (POPPLER_IS_ANNOT_MARKUP (poppler_annot)); annot = static_cast(POPPLER_ANNOT (poppler_annot)->annot); - popup = new AnnotPopup (annot->getXRef(), &pdf_rect, (Catalog *)NULL); + popup = new AnnotPopup (annot->getDoc(), &pdf_rect); annot->setPopup (popup); } diff -Nru poppler-0.18.4/glib/poppler-document.cc poppler-0.20.5/glib/poppler-document.cc --- poppler-0.18.4/glib/poppler-document.cc 2012-02-05 14:37:19.000000000 +0000 +++ poppler-0.20.5/glib/poppler-document.cc 2012-10-10 17:27:04.000000000 +0000 @@ -84,8 +84,6 @@ { PopplerDocument *document; - document = (PopplerDocument *) g_object_new (POPPLER_TYPE_DOCUMENT, NULL, NULL); - if (!newDoc->isOk()) { int fopen_errno; switch (newDoc->getErrorCode()) @@ -125,14 +123,32 @@ return NULL; } + document = (PopplerDocument *) g_object_new (POPPLER_TYPE_DOCUMENT, NULL); document->doc = newDoc; document->output_dev = new CairoOutputDev (); - document->output_dev->startDoc(document->doc->getXRef (), document->doc->getCatalog ()); + document->output_dev->startDoc(document->doc); return document; } +static GooString * +poppler_password_to_latin1 (const gchar *password) +{ + gchar *password_latin; + GooString *password_g; + + if (!password) + return NULL; + + password_latin = g_convert(password, -1, "ISO-8859-1", "UTF-8", + NULL, NULL, NULL); + password_g = new GooString (password_latin); + g_free (password_latin); + + return password_g; +} + /** * poppler_document_new_from_file: * @uri: uri of the file to load @@ -163,21 +179,7 @@ if (!filename) return NULL; - password_g = NULL; - if (password != NULL) { - if (g_utf8_validate (password, -1, NULL)) { - gchar *password_latin; - - password_latin = g_convert (password, -1, - "ISO-8859-1", - "UTF-8", - NULL, NULL, NULL); - password_g = new GooString (password_latin); - g_free (password_latin); - } else { - password_g = new GooString (password); - } - } + password_g = poppler_password_to_latin1(password); #ifdef G_OS_WIN32 wchar_t *filenameW; @@ -192,7 +194,7 @@ length = MultiByteToWideChar(CP_UTF8, 0, filename, -1, filenameW, length); newDoc = new PDFDoc(filenameW, length, password_g, password_g); - delete filenameW; + delete [] filenameW; #else filename_g = new GooString (filename); newDoc = new PDFDoc(filename_g, password_g, password_g); @@ -236,10 +238,7 @@ obj.initNull(); str = new MemStream(data, 0, length, &obj); - password_g = NULL; - if (password != NULL) - password_g = new GooString (password); - + password_g = poppler_password_to_latin1(password); newDoc = new PDFDoc(str, password_g, password_g); delete password_g; @@ -357,6 +356,8 @@ poppler_document_layers_free (document); delete document->output_dev; delete document->doc; + + G_OBJECT_CLASS (poppler_document_parent_class)->finalize (object); } /** @@ -1716,13 +1717,40 @@ } /** + * poppler_fonts_iter_get_substitute_name: + * @iter: a #PopplerFontsIter + * + * The name of the substitute font of the font associated with @iter or %NULL if + * the font is embedded + * + * Returns: the name of the substitute font or %NULL if font is embedded + * + * Since: 0.20 + */ +const char * +poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter) +{ + GooString *name; + FontInfo *info; + + info = (FontInfo *)iter->items->get (iter->index); + + name = info->getSubstituteName(); + if (name != NULL) { + return name->getCString(); + } else { + return NULL; + } +} + +/** * poppler_fonts_iter_get_file_name: * @iter: a #PopplerFontsIter * * The filename of the font associated with @iter or %NULL if * the font is embedded * - * Returns: the filename of the font or %NULL y font is emebedded + * Returns: the filename of the font or %NULL if font is embedded */ const char * poppler_fonts_iter_get_file_name (PopplerFontsIter *iter) @@ -1761,6 +1789,32 @@ } /** + * poppler_fonts_iter_get_encoding: + * @iter: a #PopplerFontsIter + * + * Returns the encoding of the font associated with @iter + * + * Returns: the font encoding + * + * Since: 0.20 + */ +const char * +poppler_fonts_iter_get_encoding (PopplerFontsIter *iter) +{ + GooString *encoding; + FontInfo *info; + + info = (FontInfo *)iter->items->get (iter->index); + + encoding = info->getEncoding(); + if (encoding != NULL) { + return encoding->getCString(); + } else { + return NULL; + } +} + +/** * poppler_fonts_iter_is_embedded: * @iter: a #PopplerFontsIter * @@ -1905,6 +1959,8 @@ delete font_info->scanner; g_object_unref (font_info->document); + + G_OBJECT_CLASS (poppler_font_info_parent_class)->finalize (object); } /** @@ -2406,6 +2462,8 @@ delete ps_file->out; g_object_unref (ps_file->document); g_free (ps_file->filename); + + G_OBJECT_CLASS (poppler_ps_file_parent_class)->finalize (object); } /** @@ -2516,7 +2574,7 @@ if (!page) return NULL; - widgets = page->getFormWidgets (document->doc->getCatalog ()); + widgets = page->getFormWidgets (); if (!widgets) return NULL; diff -Nru poppler-0.18.4/glib/poppler-document.h poppler-0.20.5/glib/poppler-document.h --- poppler-0.18.4/glib/poppler-document.h 2012-02-05 14:37:19.000000000 +0000 +++ poppler-0.20.5/glib/poppler-document.h 2012-06-11 13:19:41.000000000 +0000 @@ -246,8 +246,10 @@ void poppler_fonts_iter_free (PopplerFontsIter *iter); const char *poppler_fonts_iter_get_name (PopplerFontsIter *iter); const char *poppler_fonts_iter_get_full_name (PopplerFontsIter *iter); +const char *poppler_fonts_iter_get_substitute_name (PopplerFontsIter *iter); const char *poppler_fonts_iter_get_file_name (PopplerFontsIter *iter); PopplerFontType poppler_fonts_iter_get_font_type (PopplerFontsIter *iter); +const char *poppler_fonts_iter_get_encoding (PopplerFontsIter *iter); gboolean poppler_fonts_iter_is_embedded (PopplerFontsIter *iter); gboolean poppler_fonts_iter_is_subset (PopplerFontsIter *iter); gboolean poppler_fonts_iter_next (PopplerFontsIter *iter); diff -Nru poppler-0.18.4/glib/poppler-page.cc poppler-0.20.5/glib/poppler-page.cc --- poppler-0.18.4/glib/poppler-page.cc 2012-02-05 14:37:19.000000000 +0000 +++ poppler-0.20.5/glib/poppler-page.cc 2012-10-10 17:27:04.000000000 +0000 @@ -79,6 +79,8 @@ if (page->text != NULL) page->text->decRefCnt(); /* page->page is owned by the document */ + + G_OBJECT_CLASS (poppler_page_parent_class)->finalize (object); } /** @@ -263,15 +265,14 @@ TextOutputDev *text_dev; Gfx *gfx; - text_dev = new TextOutputDev (NULL, gTrue, gFalse, gFalse); + text_dev = new TextOutputDev (NULL, gTrue, 0, gFalse, gFalse); gfx = page->page->createGfx(text_dev, 72.0, 72.0, 0, gFalse, /* useMediaBox */ gTrue, /* Crop */ -1, -1, -1, -1, gFalse, /* printing */ - page->document->doc->getCatalog (), - NULL, NULL, NULL, NULL); + NULL, NULL); page->page->display(gfx); text_dev->endPage(); @@ -354,7 +355,6 @@ -1, -1, -1, -1, printing, - page->document->doc->getCatalog (), NULL, NULL, printing ? poppler_print_annot_cb : NULL, printing ? GINT_TO_POINTER ((gint)print_flags) : NULL); @@ -889,6 +889,7 @@ gFalse, gTrue, // startAtTop, stopAtBottom gFalse, gFalse, // startAtLast, stopAtLast gFalse, gFalse, // caseSensitive, backwards + gFalse, // wholeWord &xMin, &yMin, &xMax, &yMax)) { match = poppler_rectangle_new (); @@ -925,8 +926,7 @@ gTrue, /* Crop */ -1, -1, -1, -1, gFalse, /* printing */ - page->document->doc->getCatalog (), - NULL, NULL, NULL, NULL); + NULL, NULL); page->page->display(gfx); delete gfx; @@ -989,7 +989,7 @@ /** * poppler_page_get_image: * @page: A #PopplerPage - * @image_id: The image identificator + * @image_id: The image identifier * * Returns a cairo surface for the image of the @page * @@ -1063,8 +1063,6 @@ if (!ps_file->out) ps_file->out = new PSOutputDev (ps_file->filename, ps_file->document->doc, - ps_file->document->doc->getXRef(), - ps_file->document->doc->getCatalog(), NULL, ps_file->first_page, ps_file->last_page, psModePS, (int)ps_file->paper_width, @@ -1141,7 +1139,7 @@ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL); - links = new Links (page->page->getAnnots (page->document->doc->getCatalog ())); + links = new Links (page->page->getAnnots ()); if (links == NULL) return NULL; @@ -1246,7 +1244,7 @@ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL); - forms = page->page->getFormWidgets (page->document->doc->getCatalog ()); + forms = page->page->getFormWidgets (); if (forms == NULL) return NULL; @@ -1314,7 +1312,7 @@ g_return_val_if_fail (POPPLER_IS_PAGE (page), NULL); - annots = page->page->getAnnots (page->document->doc->getCatalog ()); + annots = page->page->getAnnots (); if (!annots) return NULL; @@ -1432,7 +1430,7 @@ g_return_if_fail (POPPLER_IS_PAGE (page)); g_return_if_fail (POPPLER_IS_ANNOT (annot)); - page->page->addAnnot (annot->annot, page->document->doc->getCatalog ()); + page->page->addAnnot (annot->annot); } /* PopplerRectangle type */ diff -Nru poppler-0.18.4/glib/poppler.h poppler-0.20.5/glib/poppler.h --- poppler-0.18.4/glib/poppler.h 2011-11-22 21:33:04.000000000 +0000 +++ poppler-0.20.5/glib/poppler.h 2012-06-11 13:19:41.000000000 +0000 @@ -138,7 +138,7 @@ * PopplerPrintFlags: * @POPPLER_PRINT_DOCUMENT: print main document contents * @POPPLER_PRINT_MARKUP_ANNOTS: print document and markup annotations - * @POPPLER_PRINT_STAMP_ANNOTS_ONLY: print doucment and only stamp annotations + * @POPPLER_PRINT_STAMP_ANNOTS_ONLY: print document and only stamp annotations * @POPPLER_PRINT_ALL: print main document contents and all markup annotations * * Printing flags diff -Nru poppler-0.18.4/glib/reference/Makefile.in poppler-0.20.5/glib/reference/Makefile.in --- poppler-0.18.4/glib/reference/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/glib/reference/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -21,6 +21,23 @@ # Everything below here is generic # #################################### VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -57,14 +74,19 @@ $(top_builddir)/poppler/poppler-config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -138,12 +160,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -197,6 +223,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -411,6 +438,7 @@ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; +$(top_srcdir)/gtk-doc.make: $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh @@ -482,10 +510,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/glib/reference/html/PopplerAnnot.html poppler-0.20.5/glib/reference/html/PopplerAnnot.html --- poppler-0.18.4/glib/reference/html/PopplerAnnot.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerAnnot.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerAnnot - + @@ -58,41 +58,41 @@ enum PopplerAnnotFreeTextQuadding; PopplerAnnotType poppler_annot_get_annot_type (PopplerAnnot *poppler_annot); PopplerAnnotFlag poppler_annot_get_flags (PopplerAnnot *poppler_annot); -gchar * poppler_annot_get_name (PopplerAnnot *poppler_annot); -gint poppler_annot_get_page_index (PopplerAnnot *poppler_annot); +gchar * poppler_annot_get_name (PopplerAnnot *poppler_annot); +gint poppler_annot_get_page_index (PopplerAnnot *poppler_annot); PopplerColor * poppler_annot_get_color (PopplerAnnot *poppler_annot); void poppler_annot_set_color (PopplerAnnot *poppler_annot, PopplerColor *poppler_color); -gchar * poppler_annot_get_contents (PopplerAnnot *poppler_annot); +gchar * poppler_annot_get_contents (PopplerAnnot *poppler_annot); void poppler_annot_set_contents (PopplerAnnot *poppler_annot, - const gchar *contents); -gchar * poppler_annot_get_modified (PopplerAnnot *poppler_annot); -gchar * poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot); + const gchar *contents); +gchar * poppler_annot_get_modified (PopplerAnnot *poppler_annot); +gchar * poppler_annot_markup_get_label (PopplerAnnotMarkup *poppler_annot); void poppler_annot_markup_set_label (PopplerAnnotMarkup *poppler_annot, - const gchar *label); -gchar * poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot); -gdouble poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot); + const gchar *label); +gchar * poppler_annot_markup_get_subject (PopplerAnnotMarkup *poppler_annot); +gdouble poppler_annot_markup_get_opacity (PopplerAnnotMarkup *poppler_annot); void poppler_annot_markup_set_opacity (PopplerAnnotMarkup *poppler_annot, - gdouble opacity); -gboolean poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot); + gdouble opacity); +gboolean poppler_annot_markup_has_popup (PopplerAnnotMarkup *poppler_annot); void poppler_annot_markup_set_popup (PopplerAnnotMarkup *poppler_annot, PopplerRectangle *popup_rect); -gboolean poppler_annot_markup_get_popup_is_open +gboolean poppler_annot_markup_get_popup_is_open (PopplerAnnotMarkup *poppler_annot); void poppler_annot_markup_set_popup_is_open (PopplerAnnotMarkup *poppler_annot, - gboolean is_open); -gboolean poppler_annot_markup_get_popup_rectangle + gboolean is_open); +gboolean poppler_annot_markup_get_popup_rectangle (PopplerAnnotMarkup *poppler_annot, PopplerRectangle *poppler_rect); -GDate * poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot); +GDate * poppler_annot_markup_get_date (PopplerAnnotMarkup *poppler_annot); PopplerAnnotExternalDataType poppler_annot_markup_get_external_data (PopplerAnnotMarkup *poppler_annot); PopplerAnnotMarkupReplyType poppler_annot_markup_get_reply_to (PopplerAnnotMarkup *poppler_annot); PopplerAnnot * poppler_annot_text_new (PopplerDocument *doc, PopplerRectangle *rect); -gchar * poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot); +gchar * poppler_annot_text_get_icon (PopplerAnnotText *poppler_annot); #define POPPLER_ANNOT_TEXT_ICON_NOTE #define POPPLER_ANNOT_TEXT_ICON_COMMENT #define POPPLER_ANNOT_TEXT_ICON_KEY @@ -103,10 +103,10 @@ #define POPPLER_ANNOT_TEXT_ICON_CROSS #define POPPLER_ANNOT_TEXT_ICON_CIRCLE void poppler_annot_text_set_icon (PopplerAnnotText *poppler_annot, - const gchar *icon); -gboolean poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot); + const gchar *icon); +gboolean poppler_annot_text_get_is_open (PopplerAnnotText *poppler_annot); void poppler_annot_text_set_is_open (PopplerAnnotText *poppler_annot, - gboolean is_open); + gboolean is_open); PopplerAnnotTextState poppler_annot_text_get_state (PopplerAnnotText *poppler_annot); PopplerAnnotCalloutLine * poppler_annot_free_text_get_callout_line (PopplerAnnotFreeText *poppler_annot); @@ -114,11 +114,11 @@ (PopplerAnnotFreeText *poppler_annot); PopplerAttachment * poppler_annot_file_attachment_get_attachment (PopplerAnnotFileAttachment *poppler_annot); -gchar * poppler_annot_file_attachment_get_name +gchar * poppler_annot_file_attachment_get_name (PopplerAnnotFileAttachment *poppler_annot); PopplerAction * poppler_annot_screen_get_action (PopplerAnnotScreen *poppler_annot); PopplerMovie * poppler_annot_movie_get_movie (PopplerAnnotMovie *poppler_annot); -gchar * poppler_annot_movie_get_title (PopplerAnnotMovie *poppler_annot); +gchar * poppler_annot_movie_get_title (PopplerAnnotMovie *poppler_annot); PopplerAnnotCalloutLine * poppler_annot_callout_line_new (void); PopplerAnnotCalloutLine * poppler_annot_callout_line_copy @@ -129,7 +129,7 @@

Object Hierarchy

-  GObject
+  GObject
    +----PopplerAnnot
 
@@ -329,7 +329,7 @@

poppler_annot_get_name ()

-
gchar *             poppler_annot_get_name              (PopplerAnnot *poppler_annot);
+
gchar *             poppler_annot_get_name              (PopplerAnnot *poppler_annot);

Retrieves the name of poppler_annot.

@@ -344,7 +344,7 @@

Returns :

a new allocated string with the name of poppler_annot. It must -be freed with g_free() when done. +be freed with g_free() when done.
@@ -352,7 +352,7 @@

poppler_annot_get_page_index ()

-
gint                poppler_annot_get_page_index        (PopplerAnnot *poppler_annot);
+
gint                poppler_annot_get_page_index        (PopplerAnnot *poppler_annot);

Returns the page index to which poppler_annot is associated, or -1 if unknown

@@ -390,7 +390,7 @@

Returns :

a new allocated PopplerColor with the color values of -poppler_annot, or NULL. It must be freed with g_free() when done. +poppler_annot, or NULL. It must be freed with g_free() when done.
@@ -413,7 +413,7 @@

poppler_color :

-a PopplerColor, or NULL. [allow-none] +a PopplerColor, or NULL. [allow-none] @@ -423,7 +423,7 @@

poppler_annot_get_contents ()

-
gchar *             poppler_annot_get_contents          (PopplerAnnot *poppler_annot);
+
gchar *             poppler_annot_get_contents          (PopplerAnnot *poppler_annot);

Retrieves the contents of poppler_annot.

@@ -438,7 +438,7 @@

Returns :

a new allocated string with the contents of poppler_annot. It -must be freed with g_free() when done. +must be freed with g_free() when done.
@@ -447,7 +447,7 @@

poppler_annot_set_contents ()

void                poppler_annot_set_contents          (PopplerAnnot *poppler_annot,
-                                                         const gchar *contents);
+ const gchar *contents);

Sets the contents of poppler_annot to the given value, replacing the current contents. @@ -471,7 +471,7 @@


poppler_annot_get_modified ()

-
gchar *             poppler_annot_get_modified          (PopplerAnnot *poppler_annot);
+
gchar *             poppler_annot_get_modified          (PopplerAnnot *poppler_annot);

Retrieves the last modification data of poppler_annot. The returned string will be either a PDF format date or a text string. @@ -488,7 +488,7 @@

Returns :

a new allocated string with the last modification data of -poppler_annot. It must be freed with g_free() when done. +poppler_annot. It must be freed with g_free() when done.
@@ -496,7 +496,7 @@

poppler_annot_markup_get_label ()

-
gchar *             poppler_annot_markup_get_label      (PopplerAnnotMarkup *poppler_annot);
+
gchar *             poppler_annot_markup_get_label      (PopplerAnnotMarkup *poppler_annot);

Retrieves the label text of poppler_annot.

@@ -519,7 +519,7 @@

poppler_annot_markup_set_label ()

void                poppler_annot_markup_set_label      (PopplerAnnotMarkup *poppler_annot,
-                                                         const gchar *label);
+ const gchar *label);

Sets the label text of poppler_annot, replacing the current one

@@ -533,7 +533,7 @@

label :

-a text string containing the new label, or NULL. [allow-none] +a text string containing the new label, or NULL. [allow-none] @@ -543,7 +543,7 @@

poppler_annot_markup_get_subject ()

-
gchar *             poppler_annot_markup_get_subject    (PopplerAnnotMarkup *poppler_annot);
+
gchar *             poppler_annot_markup_get_subject    (PopplerAnnotMarkup *poppler_annot);

Retrives the subject text of poppler_annot.

@@ -565,7 +565,7 @@

poppler_annot_markup_get_opacity ()

-
gdouble             poppler_annot_markup_get_opacity    (PopplerAnnotMarkup *poppler_annot);
+
gdouble             poppler_annot_markup_get_opacity    (PopplerAnnotMarkup *poppler_annot);

Retrieves the opacity value of poppler_annot.

@@ -589,7 +589,7 @@

poppler_annot_markup_set_opacity ()

void                poppler_annot_markup_set_opacity    (PopplerAnnotMarkup *poppler_annot,
-                                                         gdouble opacity);
+ gdouble opacity);

Sets the opacity of poppler_annot. This value applies to all visible elements of poppler_annot in its closed state, @@ -614,9 +614,9 @@


poppler_annot_markup_has_popup ()

-
gboolean            poppler_annot_markup_has_popup      (PopplerAnnotMarkup *poppler_annot);
+
gboolean            poppler_annot_markup_has_popup      (PopplerAnnotMarkup *poppler_annot);

-Return TRUE if the markup annotation has a popup window associated +Return TRUE if the markup annotation has a popup window associated

@@ -629,7 +629,7 @@ +TRUE, if poppler_annot has popup, FALSE otherwise

Returns :

-TRUE, if poppler_annot has popup, FALSE otherwise
@@ -664,7 +664,7 @@

poppler_annot_markup_get_popup_is_open ()

-
gboolean            poppler_annot_markup_get_popup_is_open
+
gboolean            poppler_annot_markup_get_popup_is_open
                                                         (PopplerAnnotMarkup *poppler_annot);

Retrieves the state of the popup window related to poppler_annot. @@ -679,7 +679,7 @@

Returns :

-the state of poppler_annot. TRUE if it's open, FALSE in +the state of poppler_annot. TRUE if it's open, FALSE in other case. @@ -690,7 +690,7 @@

poppler_annot_markup_set_popup_is_open ()

void                poppler_annot_markup_set_popup_is_open
                                                         (PopplerAnnotMarkup *poppler_annot,
-                                                         gboolean is_open);
+ gboolean is_open);

Sets the state of the popup window related to poppler_annot.

@@ -713,7 +713,7 @@

poppler_annot_markup_get_popup_rectangle ()

-
gboolean            poppler_annot_markup_get_popup_rectangle
+
gboolean            poppler_annot_markup_get_popup_rectangle
                                                         (PopplerAnnotMarkup *poppler_annot,
                                                          PopplerRectangle *poppler_rect);

@@ -735,7 +735,7 @@

Returns :

-TRUE if PopplerRectangle was correctly filled, FALSE otherwise +TRUE if PopplerRectangle was correctly filled, FALSE otherwise
@@ -744,7 +744,7 @@

poppler_annot_markup_get_date ()

-
GDate *             poppler_annot_markup_get_date       (PopplerAnnotMarkup *poppler_annot);
+
GDate *             poppler_annot_markup_get_date       (PopplerAnnotMarkup *poppler_annot);

Returns the date and time when the annotation was created

@@ -758,8 +758,8 @@

Returns :

-a GDate representing the date and time -when the annotation was created, or NULL. [transfer full] +a GDate representing the date and time +when the annotation was created, or NULL. [transfer full] @@ -847,7 +847,7 @@

poppler_annot_text_get_icon ()

-
gchar *             poppler_annot_text_get_icon         (PopplerAnnotText *poppler_annot);
+
gchar *             poppler_annot_text_get_icon         (PopplerAnnotText *poppler_annot);

Gets name of the icon of poppler_annot.

@@ -924,7 +924,7 @@

poppler_annot_text_set_icon ()

void                poppler_annot_text_set_icon         (PopplerAnnotText *poppler_annot,
-                                                         const gchar *icon);
+ const gchar *icon);

Sets the icon of poppler_annot. The following predefined icons are currently supported: @@ -991,7 +991,7 @@


poppler_annot_text_get_is_open ()

-
gboolean            poppler_annot_text_get_is_open      (PopplerAnnotText *poppler_annot);
+
gboolean            poppler_annot_text_get_is_open      (PopplerAnnotText *poppler_annot);

Retrieves the state of poppler_annot.

@@ -1005,7 +1005,7 @@

Returns :

-the state of poppler_annot. TRUE if it's open, FALSE in +the state of poppler_annot. TRUE if it's open, FALSE in other case. @@ -1015,7 +1015,7 @@

poppler_annot_text_set_is_open ()

void                poppler_annot_text_set_is_open      (PopplerAnnotText *poppler_annot,
-                                                         gboolean is_open);
+ gboolean is_open);

Sets whether poppler_annot should initially be displayed open

@@ -1078,7 +1078,7 @@

Returns :

a new allocated PopplerAnnotCalloutLine if the annot has a callout -line, NULL in other case. It must be freed with g_free() when +line, NULL in other case. It must be freed with g_free() when done. @@ -1138,7 +1138,7 @@

poppler_annot_file_attachment_get_name ()

-
gchar *             poppler_annot_file_attachment_get_name
+
gchar *             poppler_annot_file_attachment_get_name
                                                         (PopplerAnnotFileAttachment *poppler_annot);

Retrieves the name of poppler_annot. @@ -1154,7 +1154,7 @@

Returns :

a new allocated string with the name of poppler_annot. It must -be freed with g_free() when done. +be freed with g_free() when done.
@@ -1213,7 +1213,7 @@

poppler_annot_movie_get_title ()

-
gchar *             poppler_annot_movie_get_title       (PopplerAnnotMovie *poppler_annot);
+
gchar *             poppler_annot_movie_get_title       (PopplerAnnotMovie *poppler_annot);

Retrieves the movie title of poppler_annot.

@@ -1245,7 +1245,7 @@

Returns :

-a new allocated PopplerAnnotCalloutLine, NULL in other case. +a new allocated PopplerAnnotCalloutLine, NULL in other case. It must be freed when done.
@@ -1268,7 +1268,7 @@

Returns :

a new allocated PopplerAnnotCalloutLine as exact copy of -callout, NULL in other case. It must be freed when done. +callout, NULL in other case. It must be freed when done.
diff -Nru poppler-0.18.4/glib/reference/html/PopplerAttachment.html poppler-0.20.5/glib/reference/html/PopplerAttachment.html --- poppler-0.18.4/glib/reference/html/PopplerAttachment.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerAttachment.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerAttachment - + @@ -43,23 +43,23 @@ #include <poppler.h> PopplerAttachment; -gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf, +gboolean (*PopplerAttachmentSaveFunc) (const gchar *buf, gsize count, - gpointer data, - GError **error); -gboolean poppler_attachment_save (PopplerAttachment *attachment, + gpointer data, + GError **error); +gboolean poppler_attachment_save (PopplerAttachment *attachment, const char *filename, - GError **error); -gboolean poppler_attachment_save_to_callback (PopplerAttachment *attachment, + GError **error); +gboolean poppler_attachment_save_to_callback (PopplerAttachment *attachment, PopplerAttachmentSaveFunc save_func, - gpointer user_data, - GError **error); + gpointer user_data, + GError **error);

Object Hierarchy

-  GObject
+  GObject
    +----PopplerAttachment
 
@@ -75,20 +75,20 @@

PopplerAttachmentSaveFunc ()

-
gboolean            (*PopplerAttachmentSaveFunc)        (const gchar *buf,
+
gboolean            (*PopplerAttachmentSaveFunc)        (const gchar *buf,
                                                          gsize count,
-                                                         gpointer data,
-                                                         GError **error);
+ gpointer data, + GError **error);

Specifies the type of the function passed to poppler_attachment_save_to_callback(). It is called once for each block of bytes that is "written" by poppler_attachment_save_to_callback(). If -successful it should return TRUE. If an error occurs it should set -error and return FALSE, in which case poppler_attachment_save_to_callback() +successful it should return TRUE. If an error occurs it should set +error and return FALSE, in which case poppler_attachment_save_to_callback() will fail with the same error.

-Returns: TRUE if successful, FALSE (with error set) if failed. +Returns: TRUE if successful, FALSE (with error set) if failed.

@@ -110,7 +110,7 @@ - @@ -119,12 +119,12 @@

poppler_attachment_save ()

-
gboolean            poppler_attachment_save             (PopplerAttachment *attachment,
+
gboolean            poppler_attachment_save             (PopplerAttachment *attachment,
                                                          const char *filename,
-                                                         GError **error);
+ GError **error);

-Saves attachment to a file indicated by filename. If error is set, FALSE -will be returned. Possible errors include those in the G_FILE_ERROR domain +Saves attachment to a file indicated by filename. If error is set, FALSE +will be returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.

error :

GError to set on error, or NULL +GError to set on error, or NULL
@@ -140,13 +140,13 @@ - +TRUE, if the file successfully saved

error :

return location for error, or NULL. [allow-none] +return location for error, or NULL. [allow-none]

Returns :

-TRUE, if the file successfully saved
@@ -154,15 +154,15 @@

poppler_attachment_save_to_callback ()

-
gboolean            poppler_attachment_save_to_callback (PopplerAttachment *attachment,
+
gboolean            poppler_attachment_save_to_callback (PopplerAttachment *attachment,
                                                          PopplerAttachmentSaveFunc save_func,
-                                                         gpointer user_data,
-                                                         GError **error);
+ gpointer user_data, + GError **error);

Saves attachment by feeding the produced data to save_func. Can be used when you want to store the attachment to something other than a file, such as -an in-memory buffer or a socket. If error is set, FALSE will be -returned. Possible errors include those in the G_FILE_ERROR domain and +an in-memory buffer or a socket. If error is set, FALSE will be +returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.

@@ -183,13 +183,13 @@ - +TRUE, if the save successfully completed

error :

return location for error, or NULL. [allow-none] +return location for error, or NULL. [allow-none]

Returns :

-TRUE, if the save successfully completed
diff -Nru poppler-0.18.4/glib/reference/html/PopplerDocument.html poppler-0.20.5/glib/reference/html/PopplerDocument.html --- poppler-0.18.4/glib/reference/html/PopplerDocument.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerDocument.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerDocument - + @@ -57,60 +57,60 @@ enum PopplerPermissions; PopplerDocument * poppler_document_new_from_file (const char *uri, const char *password, - GError **error); + GError **error); PopplerDocument * poppler_document_new_from_data (char *data, int length, const char *password, - GError **error); -gboolean poppler_document_save (PopplerDocument *document, + GError **error); +gboolean poppler_document_save (PopplerDocument *document, const char *uri, - GError **error); -gboolean poppler_document_save_a_copy (PopplerDocument *document, + GError **error); +gboolean poppler_document_save_a_copy (PopplerDocument *document, const char *uri, - GError **error); -gboolean poppler_document_get_id (PopplerDocument *document, - gchar **permanent_id, - gchar **update_id); -gchar * poppler_document_get_pdf_version_string + GError **error); +gboolean poppler_document_get_id (PopplerDocument *document, + gchar **permanent_id, + gchar **update_id); +gchar * poppler_document_get_pdf_version_string (PopplerDocument *document); void poppler_document_get_pdf_version (PopplerDocument *document, - guint *major_version, - guint *minor_version); -gchar * poppler_document_get_title (PopplerDocument *document); -gchar * poppler_document_get_author (PopplerDocument *document); -gchar * poppler_document_get_subject (PopplerDocument *document); -gchar * poppler_document_get_keywords (PopplerDocument *document); -gchar * poppler_document_get_creator (PopplerDocument *document); -gchar * poppler_document_get_producer (PopplerDocument *document); + guint *major_version, + guint *minor_version); +gchar * poppler_document_get_title (PopplerDocument *document); +gchar * poppler_document_get_author (PopplerDocument *document); +gchar * poppler_document_get_subject (PopplerDocument *document); +gchar * poppler_document_get_keywords (PopplerDocument *document); +gchar * poppler_document_get_creator (PopplerDocument *document); +gchar * poppler_document_get_producer (PopplerDocument *document); time_t poppler_document_get_creation_date (PopplerDocument *document); time_t poppler_document_get_modification_date (PopplerDocument *document); PopplerPageLayout poppler_document_get_page_layout (PopplerDocument *document); PopplerPageMode poppler_document_get_page_mode (PopplerDocument *document); PopplerPermissions poppler_document_get_permissions (PopplerDocument *document); -gchar * poppler_document_get_metadata (PopplerDocument *document); -gboolean poppler_document_is_linearized (PopplerDocument *document); +gchar * poppler_document_get_metadata (PopplerDocument *document); +gboolean poppler_document_is_linearized (PopplerDocument *document); int poppler_document_get_n_pages (PopplerDocument *document); PopplerPage * poppler_document_get_page (PopplerDocument *document, int index); PopplerPage * poppler_document_get_page_by_label (PopplerDocument *document, const char *label); PopplerDest * poppler_document_find_dest (PopplerDocument *document, - const gchar *link_name); -guint poppler_document_get_n_attachments (PopplerDocument *document); -gboolean poppler_document_has_attachments (PopplerDocument *document); -GList * poppler_document_get_attachments (PopplerDocument *document); + const gchar *link_name); +guint poppler_document_get_n_attachments (PopplerDocument *document); +gboolean poppler_document_has_attachments (PopplerDocument *document); +GList * poppler_document_get_attachments (PopplerDocument *document); PopplerFormField * poppler_document_get_form_field (PopplerDocument *document, - gint id); + gint id); PopplerIndexIter * poppler_index_iter_new (PopplerDocument *document); PopplerIndexIter * poppler_index_iter_copy (PopplerIndexIter *iter); void poppler_index_iter_free (PopplerIndexIter *iter); PopplerIndexIter * poppler_index_iter_get_child (PopplerIndexIter *parent); -gboolean poppler_index_iter_is_open (PopplerIndexIter *iter); +gboolean poppler_index_iter_is_open (PopplerIndexIter *iter); PopplerAction * poppler_index_iter_get_action (PopplerIndexIter *iter); -gboolean poppler_index_iter_next (PopplerIndexIter *iter); +gboolean poppler_index_iter_next (PopplerIndexIter *iter); PopplerFontInfo * poppler_font_info_new (PopplerDocument *document); -gboolean poppler_font_info_scan (PopplerFontInfo *font_info, +gboolean poppler_font_info_scan (PopplerFontInfo *font_info, int n_pages, PopplerFontsIter **iter); void poppler_font_info_free (PopplerFontInfo *font_info); @@ -119,17 +119,20 @@ const char * poppler_fonts_iter_get_name (PopplerFontsIter *iter); const char * poppler_fonts_iter_get_full_name (PopplerFontsIter *iter); PopplerFontType poppler_fonts_iter_get_font_type (PopplerFontsIter *iter); +const char * poppler_fonts_iter_get_substitute_name + (PopplerFontsIter *iter); const char * poppler_fonts_iter_get_file_name (PopplerFontsIter *iter); -gboolean poppler_fonts_iter_is_embedded (PopplerFontsIter *iter); -gboolean poppler_fonts_iter_is_subset (PopplerFontsIter *iter); -gboolean poppler_fonts_iter_next (PopplerFontsIter *iter); +const char * poppler_fonts_iter_get_encoding (PopplerFontsIter *iter); +gboolean poppler_fonts_iter_is_embedded (PopplerFontsIter *iter); +gboolean poppler_fonts_iter_is_subset (PopplerFontsIter *iter); +gboolean poppler_fonts_iter_next (PopplerFontsIter *iter); PopplerLayersIter * poppler_layers_iter_new (PopplerDocument *document); PopplerLayersIter * poppler_layers_iter_copy (PopplerLayersIter *iter); void poppler_layers_iter_free (PopplerLayersIter *iter); PopplerLayersIter * poppler_layers_iter_get_child (PopplerLayersIter *parent); PopplerLayer * poppler_layers_iter_get_layer (PopplerLayersIter *iter); -gchar * poppler_layers_iter_get_title (PopplerLayersIter *iter); -gboolean poppler_layers_iter_next (PopplerLayersIter *iter); +gchar * poppler_layers_iter_get_title (PopplerLayersIter *iter); +gboolean poppler_layers_iter_next (PopplerLayersIter *iter); PopplerPSFile * poppler_ps_file_new (PopplerDocument *document, const char *filename, int first_page, @@ -139,35 +142,35 @@ double width, double height); void poppler_ps_file_set_duplex (PopplerPSFile *ps_file, - gboolean duplex); + gboolean duplex);

Object Hierarchy

-  GObject
+  GObject
    +----PopplerDocument
 

Properties

-  "author"                   gchar*                : Read
-  "creation-date"            gint                  : Read
-  "creator"                  gchar*                : Read
-  "format"                   gchar*                : Read
-  "format-major"             guint                 : Read
-  "format-minor"             guint                 : Read
-  "keywords"                 gchar*                : Read
-  "linearized"               gboolean              : Read
-  "metadata"                 gchar*                : Read
-  "mod-date"                 gint                  : Read
+  "author"                   gchar*                : Read
+  "creation-date"            gint                  : Read
+  "creator"                  gchar*                : Read
+  "format"                   gchar*                : Read
+  "format-major"             guint                 : Read
+  "format-minor"             guint                 : Read
+  "keywords"                 gchar*                : Read
+  "linearized"               gboolean              : Read
+  "metadata"                 gchar*                : Read
+  "mod-date"                 gint                  : Read
   "page-layout"              PopplerPageLayout     : Read
   "page-mode"                PopplerPageMode       : Read
   "permissions"              PopplerPermissions    : Read
-  "producer"                 gchar*                : Read
-  "subject"                  gchar*                : Read
-  "title"                    gchar*                : Read
+  "producer"                 gchar*                : Read
+  "subject"                  gchar*                : Read
+  "title"                    gchar*                : Read
   "viewer-preferences"       PopplerViewerPreferences  : Read
 
@@ -552,10 +555,10 @@

poppler_document_new_from_file ()

PopplerDocument *   poppler_document_new_from_file      (const char *uri,
                                                          const char *password,
-                                                         GError **error);
+ GError **error);

-Creates a new PopplerDocument. If NULL is returned, then error will be -set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR +Creates a new PopplerDocument. If NULL is returned, then error will be +set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

@@ -567,17 +570,17 @@ - - - @@ -589,10 +592,10 @@
PopplerDocument *   poppler_document_new_from_data      (char *data,
                                                          int length,
                                                          const char *password,
-                                                         GError **error);
+ GError **error);

-Creates a new PopplerDocument. If NULL is returned, then error will be -set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR +Creates a new PopplerDocument. If NULL is returned, then error will be +set. Possible errors include those in the POPPLER_ERROR and G_FILE_ERROR domains.

password :

password to unlock the file with, or NULL. [allow-none] +password to unlock the file with, or NULL. [allow-none]

error :

Return location for an error, or NULL. [allow-none] +Return location for an error, or NULL. [allow-none]

Returns :

A newly created PopplerDocument, or NULL +A newly created PopplerDocument, or NULL
@@ -609,17 +612,17 @@ - - - @@ -628,15 +631,15 @@

poppler_document_save ()

-
gboolean            poppler_document_save               (PopplerDocument *document,
+
gboolean            poppler_document_save               (PopplerDocument *document,
                                                          const char *uri,
-                                                         GError **error);
+ GError **error);

Saves document. Any change made in the document such as form fields filled, annotations added or modified will be saved. -If error is set, FALSE will be returned. Possible errors -include those in the G_FILE_ERROR domain. +If error is set, FALSE will be returned. Possible errors +include those in the G_FILE_ERROR domain.

password :

password to unlock the file with, or NULL. [allow-none] +password to unlock the file with, or NULL. [allow-none]

error :

Return location for an error, or NULL. [allow-none] +Return location for an error, or NULL. [allow-none]

Returns :

A newly created PopplerDocument, or NULL +A newly created PopplerDocument, or NULL
@@ -652,13 +655,13 @@ - +TRUE, if the document was successfully saved

error :

return location for an error, or NULL. [allow-none] +return location for an error, or NULL. [allow-none]

Returns :

-TRUE, if the document was successfully saved
@@ -666,15 +669,15 @@

poppler_document_save_a_copy ()

-
gboolean            poppler_document_save_a_copy        (PopplerDocument *document,
+
gboolean            poppler_document_save_a_copy        (PopplerDocument *document,
                                                          const char *uri,
-                                                         GError **error);
+ GError **error);

Saves a copy of the original document. Any change made in the document such as form fields filled by the user will not be saved. -If error is set, FALSE will be returned. Possible errors -include those in the G_FILE_ERROR domain. +If error is set, FALSE will be returned. Possible errors +include those in the G_FILE_ERROR domain.

@@ -690,13 +693,13 @@ - +TRUE, if the document was successfully saved

error :

return location for an error, or NULL. [allow-none] +return location for an error, or NULL. [allow-none]

Returns :

-TRUE, if the document was successfully saved
@@ -704,9 +707,9 @@

poppler_document_get_id ()

-
gboolean            poppler_document_get_id             (PopplerDocument *document,
-                                                         gchar **permanent_id,
-                                                         gchar **update_id);
+
gboolean            poppler_document_get_id             (PopplerDocument *document,
+                                                         gchar **permanent_id,
+                                                         gchar **update_id);

Returns the PDF file identifier represented as two byte string arrays of size 32. permanent_id is the permanent identifier that is built based on the file @@ -728,18 +731,18 @@

permanent_id :

-location to store an allocated string, use g_free() to free the returned string. [out][allow-none] +location to store an allocated string, use g_free() to free the returned string. [out][allow-none]

update_id :

-location to store an allocated string, use g_free() to free the returned string. [out][allow-none] +location to store an allocated string, use g_free() to free the returned string. [out][allow-none]

Returns :

-TRUE if the document contains an id, FALSE otherwise +TRUE if the document contains an id, FALSE otherwise
@@ -748,7 +751,7 @@

poppler_document_get_pdf_version_string ()

-
gchar *             poppler_document_get_pdf_version_string
+
gchar *             poppler_document_get_pdf_version_string
                                                         (PopplerDocument *document);

Returns the PDF version of document as a string (e.g. PDF-1.6) @@ -764,7 +767,7 @@

Returns :

a new allocated string containing the PDF version -of document, or NULL +of document, or NULL @@ -775,8 +778,8 @@

poppler_document_get_pdf_version ()

void                poppler_document_get_pdf_version    (PopplerDocument *document,
-                                                         guint *major_version,
-                                                         guint *minor_version);
+ guint *major_version, + guint *minor_version);
@@ -806,7 +809,7 @@

poppler_document_get_title ()

-
gchar *             poppler_document_get_title          (PopplerDocument *document);
+
gchar *             poppler_document_get_title          (PopplerDocument *document);

Returns the document's title

@@ -821,7 +824,7 @@
@@ -831,7 +834,7 @@

poppler_document_get_author ()

-
gchar *             poppler_document_get_author         (PopplerDocument *document);
+
gchar *             poppler_document_get_author         (PopplerDocument *document);

Returns the author of the document

@@ -846,7 +849,7 @@
@@ -856,7 +859,7 @@

poppler_document_get_subject ()

-
gchar *             poppler_document_get_subject        (PopplerDocument *document);
+
gchar *             poppler_document_get_subject        (PopplerDocument *document);

Returns the subject of the document

@@ -871,7 +874,7 @@
@@ -881,7 +884,7 @@

poppler_document_get_keywords ()

-
gchar *             poppler_document_get_keywords       (PopplerDocument *document);
+
gchar *             poppler_document_get_keywords       (PopplerDocument *document);

Returns the keywords associated to the document

@@ -896,7 +899,7 @@
@@ -906,7 +909,7 @@

poppler_document_get_creator ()

-
gchar *             poppler_document_get_creator        (PopplerDocument *document);
+
gchar *             poppler_document_get_creator        (PopplerDocument *document);

Returns the creator of the document. If the document was converted from another format, the creator is the name of the product @@ -923,7 +926,7 @@

@@ -933,7 +936,7 @@

poppler_document_get_producer ()

-
gchar *             poppler_document_get_producer       (PopplerDocument *document);
+
gchar *             poppler_document_get_producer       (PopplerDocument *document);

Returns the producer of the document. If the document was converted from another format, the producer is the name of the product @@ -950,7 +953,7 @@

@@ -1077,7 +1080,7 @@

poppler_document_get_metadata ()

-
gchar *             poppler_document_get_metadata       (PopplerDocument *document);
+
gchar *             poppler_document_get_metadata       (PopplerDocument *document);

Returns the XML metadata string of the document

@@ -1092,7 +1095,7 @@
@@ -1102,7 +1105,7 @@

poppler_document_is_linearized ()

-
gboolean            poppler_document_is_linearized      (PopplerDocument *document);
+
gboolean            poppler_document_is_linearized      (PopplerDocument *document);

Returns whether document is linearized or not. Linearization of PDF enables efficient incremental access of the PDF file in a network environment. @@ -1118,7 +1121,7 @@

+TRUE if document is linearized, FALSE otherwhise

Returns :

a new allocated string containing the title -of document, or NULL +of document, or NULL

Returns :

a new allocated string containing the author -of document, or NULL +of document, or NULL

Returns :

a new allocated string containing the subject -of document, or NULL +of document, or NULL

Returns :

a new allocated string containing keywords associated -to document, or NULL +to document, or NULL

Returns :

a new allocated string containing the creator -of document, or NULL +of document, or NULL

Returns :

a new allocated string containing the producer -of document, or NULL +of document, or NULL

Returns :

a new allocated string containing the XML -metadata, or NULL +metadata, or NULL

Returns :

-TRUE if document is linearized, FALSE otherwhise
@@ -1212,7 +1215,7 @@

poppler_document_find_dest ()

PopplerDest *       poppler_document_find_dest          (PopplerDocument *document,
-                                                         const gchar *link_name);
+ const gchar *link_name);

Finds named destination link_name in document

@@ -1230,7 +1233,7 @@

Returns :

-The PopplerDest destination or NULL if +The PopplerDest destination or NULL if link_name is not a destination. Returned value must be freed with poppler_dest_free @@ -1241,7 +1244,7 @@

poppler_document_get_n_attachments ()

-
guint               poppler_document_get_n_attachments  (PopplerDocument *document);
+
guint               poppler_document_get_n_attachments  (PopplerDocument *document);

Returns the number of attachments in a loaded document. See also poppler_document_get_attachments() @@ -1265,9 +1268,9 @@


poppler_document_has_attachments ()

-
gboolean            poppler_document_has_attachments    (PopplerDocument *document);
+
gboolean            poppler_document_has_attachments    (PopplerDocument *document);

-Returns TRUE of document has any attachments. +Returns TRUE of document has any attachments.

@@ -1280,7 +1283,7 @@ +TRUE, if document has attachments.

Returns :

-TRUE, if document has attachments.
@@ -1288,11 +1291,11 @@

poppler_document_get_attachments ()

-
GList *             poppler_document_get_attachments    (PopplerDocument *document);
+
GList *             poppler_document_get_attachments    (PopplerDocument *document);

-Returns a GList containing PopplerAttachments. These attachments +Returns a GList containing PopplerAttachments. These attachments are unowned, and must be unreffed, and the list must be freed with -g_list_free(). +g_list_free().

@@ -1314,10 +1317,10 @@

poppler_document_get_form_field ()

PopplerFormField *  poppler_document_get_form_field     (PopplerDocument *document,
-                                                         gint id);
+ gint id);

Returns the PopplerFormField for the given id. It must be freed with -g_object_unref() +g_object_unref()

@@ -1334,7 +1337,7 @@ - @@ -1346,7 +1349,7 @@

poppler_index_iter_new ()

PopplerIndexIter *  poppler_index_iter_new              (PopplerDocument *document);

-Returns the root PopplerIndexIter for document, or NULL. This must be +Returns the root PopplerIndexIter for document, or NULL. This must be freed with poppler_index_iter_free().

@@ -1445,7 +1448,7 @@

poppler_index_iter_get_child ()

PopplerIndexIter *  poppler_index_iter_get_child        (PopplerIndexIter *parent);

-Returns a newly created child of parent, or NULL if the iter has no child. +Returns a newly created child of parent, or NULL if the iter has no child. See poppler_index_iter_new() for more information on this function.

Returns :

a new PopplerFormField or NULL if +a new PopplerFormField or NULL if not found. [transfer full]
@@ -1467,7 +1470,7 @@

poppler_index_iter_is_open ()

-
gboolean            poppler_index_iter_is_open          (PopplerIndexIter *iter);
+
gboolean            poppler_index_iter_is_open          (PopplerIndexIter *iter);

Returns whether this node should be expanded by default to the user. The document can provide a hint as to how the document's index should be expanded @@ -1484,7 +1487,7 @@

+TRUE, if the document wants iter to be expanded

Returns :

-TRUE, if the document wants iter to be expanded
@@ -1516,7 +1519,7 @@

poppler_index_iter_next ()

-
gboolean            poppler_index_iter_next             (PopplerIndexIter *iter);
+
gboolean            poppler_index_iter_next             (PopplerIndexIter *iter);

Sets iter to point to the next action at the current level, if valid. See poppler_index_iter_new() for more information. @@ -1532,7 +1535,7 @@

Returns :

-TRUE, if iter was set to the next action +TRUE, if iter was set to the next action
@@ -1562,7 +1565,7 @@

poppler_font_info_scan ()

-
gboolean            poppler_font_info_scan              (PopplerFontInfo *font_info,
+
gboolean            poppler_font_info_scan              (PopplerFontInfo *font_info,
                                                          int n_pages,
                                                          PopplerFontsIter **iter);

@@ -1609,7 +1612,7 @@

Returns :

-TRUE, if there are more fonts left to scan +TRUE, if there are more fonts left to scan
@@ -1725,10 +1728,35 @@

+

poppler_fonts_iter_get_substitute_name ()

+
const char *        poppler_fonts_iter_get_substitute_name
+                                                        (PopplerFontsIter *iter);
+

+The name of the substitute font of the font associated with iter or NULL if +the font is embedded +

+
++ + + + + + + + + + +

iter :

a PopplerFontsIter +

Returns :

the name of the substitute font or NULL if font is embedded
+

Since 0.20

+
+
+

poppler_fonts_iter_get_file_name ()

const char *        poppler_fonts_iter_get_file_name    (PopplerFontsIter *iter);

-The filename of the font associated with iter or NULL if +The filename of the font associated with iter or NULL if the font is embedded

@@ -1741,15 +1769,38 @@ - + + + +

Returns :

the filename of the font or NULL y font is emebeddedthe filename of the font or NULL if font is embedded
+
+
+
+

poppler_fonts_iter_get_encoding ()

+
const char *        poppler_fonts_iter_get_encoding     (PopplerFontsIter *iter);
+

+Returns the encoding of the font associated with iter +

+
++ + + + + + + +

iter :

a PopplerFontsIter +

Returns :

the font encoding
+

Since 0.20


poppler_fonts_iter_is_embedded ()

-
gboolean            poppler_fonts_iter_is_embedded      (PopplerFontsIter *iter);
+
gboolean            poppler_fonts_iter_is_embedded      (PopplerFontsIter *iter);

Returns whether the font associated with iter is embedded in the document

@@ -1764,7 +1815,7 @@

Returns :

-TRUE if font is emebdded, FALSE otherwise +TRUE if font is emebdded, FALSE otherwise
@@ -1772,7 +1823,7 @@

poppler_fonts_iter_is_subset ()

-
gboolean            poppler_fonts_iter_is_subset        (PopplerFontsIter *iter);
+
gboolean            poppler_fonts_iter_is_subset        (PopplerFontsIter *iter);

Returns whether the font associated with iter is a subset of another font

@@ -1787,7 +1838,7 @@

Returns :

-TRUE if font is a subset, FALSE otherwise +TRUE if font is a subset, FALSE otherwise
@@ -1795,7 +1846,7 @@

poppler_fonts_iter_next ()

-
gboolean            poppler_fonts_iter_next             (PopplerFontsIter *iter);
+
gboolean            poppler_fonts_iter_next             (PopplerFontsIter *iter);

Sets iter to point to the next font

@@ -1810,7 +1861,7 @@

Returns :

-TRUE, if iter was set to the next font +TRUE, if iter was set to the next font
@@ -1875,7 +1926,7 @@

poppler_layers_iter_get_child ()

PopplerLayersIter * poppler_layers_iter_get_child       (PopplerLayersIter *parent);

-Returns a newly created child of parent, or NULL if the iter has no child. +Returns a newly created child of parent, or NULL if the iter has no child. See poppler_layers_iter_new() for more information on this function.

@@ -1888,7 +1939,7 @@ - @@ -1912,7 +1963,7 @@ - @@ -1923,10 +1974,10 @@

poppler_layers_iter_get_title ()

-
gchar *             poppler_layers_iter_get_title       (PopplerLayersIter *iter);
+
gchar *             poppler_layers_iter_get_title       (PopplerLayersIter *iter);

Returns the title associated with iter. It must be freed with -g_free(). +g_free().

Returns :

a new PopplerLayersIter, or NULL +a new PopplerLayersIter, or NULL

Returns :

a new PopplerLayer, or NULL if +a new PopplerLayer, or NULL if there isn't any layer associated with iter. [transfer full]
@@ -1938,8 +1989,8 @@ - +

Returns :

a new string containing the iter's title or NULL if iter doesn't have a title. -The returned string should be freed with g_free() when no longer needed.a new string containing the iter's title or NULL if iter doesn't have a title. +The returned string should be freed with g_free() when no longer needed.
@@ -1948,7 +1999,7 @@

poppler_layers_iter_next ()

-
gboolean            poppler_layers_iter_next            (PopplerLayersIter *iter);
+
gboolean            poppler_layers_iter_next            (PopplerLayersIter *iter);

Sets iter to point to the next action at the current level, if valid. See poppler_layers_iter_new() for more information. @@ -1964,7 +2015,7 @@

Returns :

-TRUE, if iter was set to the next action +TRUE, if iter was set to the next action
@@ -2055,7 +2106,7 @@

poppler_ps_file_set_duplex ()

void                poppler_ps_file_set_duplex          (PopplerPSFile *ps_file,
-                                                         gboolean duplex);
+ gboolean duplex);

Enable or disable Duplex printing.

@@ -2078,7 +2129,7 @@

Property Details

The "author" property

-
  "author"                   gchar*                : Read
+
  "author"                   gchar*                : Read

The author of the document

@@ -2087,7 +2138,7 @@

The "creation-date" property

-
  "creation-date"            gint                  : Read
+
  "creation-date"            gint                  : Read

The date the document was created as seconds since the Epoch, or -1

@@ -2097,7 +2148,7 @@

The "creator" property

-
  "creator"                  gchar*                : Read
+
  "creator"                  gchar*                : Read

The creator of the document. See also poppler_document_get_creator()

@@ -2106,7 +2157,7 @@

The "format" property

-
  "format"                   gchar*                : Read
+
  "format"                   gchar*                : Read

The PDF version as string. See also poppler_document_get_pdf_version_string()

@@ -2115,7 +2166,7 @@

The "format-major" property

-
  "format-major"             guint                 : Read
+
  "format-major"             guint                 : Read

The PDF major version number. See also poppler_document_get_pdf_version()

@@ -2124,7 +2175,7 @@

The "format-minor" property

-
  "format-minor"             guint                 : Read
+
  "format-minor"             guint                 : Read

The PDF minor version number. See also poppler_document_get_pdf_version()

@@ -2133,7 +2184,7 @@

The "keywords" property

-
  "keywords"                 gchar*                : Read
+
  "keywords"                 gchar*                : Read

The keywords associated to the document

@@ -2142,7 +2193,7 @@

The "linearized" property

-
  "linearized"               gboolean              : Read
+
  "linearized"               gboolean              : Read

Whether document is linearized. See also poppler_document_is_linearized()

@@ -2151,16 +2202,16 @@

The "metadata" property

-
  "metadata"                 gchar*                : Read
+
  "metadata"                 gchar*                : Read

-Document metadata in XML format, or NULL +Document metadata in XML format, or NULL

Default value: NULL


The "mod-date" property

-
  "mod-date"                 gint                  : Read
+
  "mod-date"                 gint                  : Read

The date the document was most recently modified as seconds since the Epoch, or -1

@@ -2197,7 +2248,7 @@

The "producer" property

-
  "producer"                 gchar*                : Read
+
  "producer"                 gchar*                : Read

The producer of the document. See also poppler_document_get_producer()

@@ -2206,7 +2257,7 @@

The "subject" property

-
  "subject"                  gchar*                : Read
+
  "subject"                  gchar*                : Read

The subject of the document

@@ -2215,9 +2266,9 @@

The "title" property

-
  "title"                    gchar*                : Read
+
  "title"                    gchar*                : Read

-The document's title or NULL +The document's title or NULL

Default value: NULL

diff -Nru poppler-0.18.4/glib/reference/html/PopplerFormField.html poppler-0.20.5/glib/reference/html/PopplerFormField.html --- poppler-0.18.4/glib/reference/html/PopplerFormField.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerFormField.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PoppplerFormField - + @@ -48,64 +48,64 @@ enum PopplerFormChoiceType; enum PopplerFormTextType; PopplerFormFieldType poppler_form_field_get_field_type (PopplerFormField *field); -gint poppler_form_field_get_id (PopplerFormField *field); -gboolean poppler_form_field_is_read_only (PopplerFormField *field); -gdouble poppler_form_field_get_font_size (PopplerFormField *field); -gchar * poppler_form_field_get_partial_name (PopplerFormField *field); -gchar * poppler_form_field_get_mapping_name (PopplerFormField *field); -gchar * poppler_form_field_get_name (PopplerFormField *field); +gint poppler_form_field_get_id (PopplerFormField *field); +gboolean poppler_form_field_is_read_only (PopplerFormField *field); +gdouble poppler_form_field_get_font_size (PopplerFormField *field); +gchar * poppler_form_field_get_partial_name (PopplerFormField *field); +gchar * poppler_form_field_get_mapping_name (PopplerFormField *field); +gchar * poppler_form_field_get_name (PopplerFormField *field); PopplerAction * poppler_form_field_get_action (PopplerFormField *field); PopplerFormButtonType poppler_form_field_button_get_button_type (PopplerFormField *field); -gboolean poppler_form_field_button_get_state (PopplerFormField *field); +gboolean poppler_form_field_button_get_state (PopplerFormField *field); void poppler_form_field_button_set_state (PopplerFormField *field, - gboolean state); + gboolean state); PopplerFormChoiceType poppler_form_field_choice_get_choice_type (PopplerFormField *field); -gboolean poppler_form_field_choice_can_select_multiple +gboolean poppler_form_field_choice_can_select_multiple (PopplerFormField *field); -gboolean poppler_form_field_choice_commit_on_change +gboolean poppler_form_field_choice_commit_on_change (PopplerFormField *field); -gboolean poppler_form_field_choice_do_spell_check +gboolean poppler_form_field_choice_do_spell_check (PopplerFormField *field); -gchar * poppler_form_field_choice_get_item (PopplerFormField *field, - gint index); -gint poppler_form_field_choice_get_n_items +gchar * poppler_form_field_choice_get_item (PopplerFormField *field, + gint index); +gint poppler_form_field_choice_get_n_items (PopplerFormField *field); -gchar * poppler_form_field_choice_get_text (PopplerFormField *field); +gchar * poppler_form_field_choice_get_text (PopplerFormField *field); void poppler_form_field_choice_set_text (PopplerFormField *field, - const gchar *text); -gboolean poppler_form_field_choice_is_editable + const gchar *text); +gboolean poppler_form_field_choice_is_editable (PopplerFormField *field); -gboolean poppler_form_field_choice_is_item_selected +gboolean poppler_form_field_choice_is_item_selected (PopplerFormField *field, - gint index); + gint index); void poppler_form_field_choice_select_item (PopplerFormField *field, - gint index); + gint index); void poppler_form_field_choice_toggle_item (PopplerFormField *field, - gint index); + gint index); void poppler_form_field_choice_unselect_all (PopplerFormField *field); PopplerFormTextType poppler_form_field_text_get_text_type (PopplerFormField *field); -gchar * poppler_form_field_text_get_text (PopplerFormField *field); +gchar * poppler_form_field_text_get_text (PopplerFormField *field); void poppler_form_field_text_set_text (PopplerFormField *field, - const gchar *text); -gint poppler_form_field_text_get_max_len (PopplerFormField *field); -gboolean poppler_form_field_text_do_scroll (PopplerFormField *field); -gboolean poppler_form_field_text_do_spell_check + const gchar *text); +gint poppler_form_field_text_get_max_len (PopplerFormField *field); +gboolean poppler_form_field_text_do_scroll (PopplerFormField *field); +gboolean poppler_form_field_text_do_spell_check (PopplerFormField *field); -gboolean poppler_form_field_text_is_password (PopplerFormField *field); -gboolean poppler_form_field_text_is_rich_text +gboolean poppler_form_field_text_is_password (PopplerFormField *field); +gboolean poppler_form_field_text_is_rich_text (PopplerFormField *field);

Object Hierarchy

-  GObject
+  GObject
    +----PopplerFormField
 
@@ -186,7 +186,7 @@

poppler_form_field_get_id ()

-
gint                poppler_form_field_get_id           (PopplerFormField *field);
+
gint                poppler_form_field_get_id           (PopplerFormField *field);

Gets the id of field

@@ -209,7 +209,7 @@

poppler_form_field_is_read_only ()

-
gboolean            poppler_form_field_is_read_only     (PopplerFormField *field);
+
gboolean            poppler_form_field_is_read_only     (PopplerFormField *field);

Checks whether field is read only

@@ -224,7 +224,7 @@

Returns :

-TRUE if field is read only +TRUE if field is read only
@@ -232,7 +232,7 @@

poppler_form_field_get_font_size ()

-
gdouble             poppler_form_field_get_font_size    (PopplerFormField *field);
+
gdouble             poppler_form_field_get_font_size    (PopplerFormField *field);

Gets the font size of field

@@ -255,7 +255,7 @@

poppler_form_field_get_partial_name ()

-
gchar *             poppler_form_field_get_partial_name (PopplerFormField *field);
+
gchar *             poppler_form_field_get_partial_name (PopplerFormField *field);

Gets the partial name of field.

@@ -269,7 +269,7 @@

Returns :

-a new allocated string. It must be freed with g_free() when done. +a new allocated string. It must be freed with g_free() when done.
@@ -278,7 +278,7 @@

poppler_form_field_get_mapping_name ()

-
gchar *             poppler_form_field_get_mapping_name (PopplerFormField *field);
+
gchar *             poppler_form_field_get_mapping_name (PopplerFormField *field);

Gets the mapping name of field that is used when exporting interactive form field data from the document @@ -293,7 +293,7 @@

Returns :

-a new allocated string. It must be freed with g_free() when done. +a new allocated string. It must be freed with g_free() when done.
@@ -302,7 +302,7 @@

poppler_form_field_get_name ()

-
gchar *             poppler_form_field_get_name         (PopplerFormField *field);
+
gchar *             poppler_form_field_get_name         (PopplerFormField *field);

Gets the fully qualified name of field. It's constructed by concatenating the partial field names of the field and all of its ancestors. @@ -317,7 +317,7 @@

Returns :

-a new allocated string. It must be freed with g_free() when done. +a new allocated string. It must be freed with g_free() when done.
@@ -329,7 +329,7 @@
PopplerAction *     poppler_form_field_get_action       (PopplerFormField *field);

Retrieves the action (PopplerAction) that shall be -performed when field is activated, or NULL +performed when field is activated, or NULL

@@ -377,10 +377,10 @@

poppler_form_field_button_get_state ()

-
gboolean            poppler_form_field_button_get_state (PopplerFormField *field);
+
gboolean            poppler_form_field_button_get_state (PopplerFormField *field);

-Queries a PopplerFormField and returns its current state. Returns TRUE if -field is pressed in and FALSE if it is raised. +Queries a PopplerFormField and returns its current state. Returns TRUE if +field is pressed in and FALSE if it is raised.

@@ -402,10 +402,10 @@

poppler_form_field_button_set_state ()

void                poppler_form_field_button_set_state (PopplerFormField *field,
-                                                         gboolean state);
+ gboolean state);

-Sets the status of field. Set to TRUE if you want the PopplerFormField -to be 'pressed in', and FALSE to raise it. +Sets the status of field. Set to TRUE if you want the PopplerFormField +to be 'pressed in', and FALSE to raise it.

@@ -418,7 +418,7 @@ @@ -452,7 +452,7 @@

poppler_form_field_choice_can_select_multiple ()

-
gboolean            poppler_form_field_choice_can_select_multiple
+
gboolean            poppler_form_field_choice_can_select_multiple
                                                         (PopplerFormField *field);

Checks whether field allows multiple choices to be selected @@ -468,7 +468,7 @@

+TRUE if field allows multiple choices to be selected

state :

-TRUE or FALSE +TRUE or FALSE

Returns :

-TRUE if field allows multiple choices to be selected
@@ -476,13 +476,13 @@

poppler_form_field_choice_commit_on_change ()

-
gboolean            poppler_form_field_choice_commit_on_change
+
gboolean            poppler_form_field_choice_commit_on_change
                                                         (PopplerFormField *field);

poppler_form_field_choice_do_spell_check ()

-
gboolean            poppler_form_field_choice_do_spell_check
+
gboolean            poppler_form_field_choice_do_spell_check
                                                         (PopplerFormField *field);

Checks whether spell checking should be done for the contents of field @@ -498,7 +498,7 @@

Returns :

-TRUE if spell checking should be done for field +TRUE if spell checking should be done for field @@ -507,8 +507,8 @@

poppler_form_field_choice_get_item ()

-
gchar *             poppler_form_field_choice_get_item  (PopplerFormField *field,
-                                                         gint index);
+
gchar *             poppler_form_field_choice_get_item  (PopplerFormField *field,
+                                                         gint index);

Returns the contents of the item on field at the given index

@@ -526,7 +526,7 @@

Returns :

-a new allocated string. It must be freed with g_free() when done. +a new allocated string. It must be freed with g_free() when done.
@@ -534,7 +534,7 @@

poppler_form_field_choice_get_n_items ()

-
gint                poppler_form_field_choice_get_n_items
+
gint                poppler_form_field_choice_get_n_items
                                                         (PopplerFormField *field);

Returns the number of items on field @@ -558,7 +558,7 @@


poppler_form_field_choice_get_text ()

-
gchar *             poppler_form_field_choice_get_text  (PopplerFormField *field);
+
gchar *             poppler_form_field_choice_get_text  (PopplerFormField *field);

Retrieves the contents of field.

@@ -572,7 +572,7 @@

Returns :

-a new allocated string. It must be freed with g_free() when done. +a new allocated string. It must be freed with g_free() when done.
@@ -581,7 +581,7 @@

poppler_form_field_choice_set_text ()

void                poppler_form_field_choice_set_text  (PopplerFormField *field,
-                                                         const gchar *text);
+ const gchar *text);

Sets the text in field to the given value, replacing the current contents

@@ -603,7 +603,7 @@

poppler_form_field_choice_is_editable ()

-
gboolean            poppler_form_field_choice_is_editable
+
gboolean            poppler_form_field_choice_is_editable
                                                         (PopplerFormField *field);

Checks whether field is editable @@ -619,7 +619,7 @@

Returns :

-TRUE if field is editable +TRUE if field is editable
@@ -627,9 +627,9 @@

poppler_form_field_choice_is_item_selected ()

-
gboolean            poppler_form_field_choice_is_item_selected
+
gboolean            poppler_form_field_choice_is_item_selected
                                                         (PopplerFormField *field,
-                                                         gint index);
+ gint index);

Checks whether the item at the given index on field is currently selected

@@ -648,7 +648,7 @@

Returns :

-TRUE if item at index is currently selected +TRUE if item at index is currently selected
@@ -658,7 +658,7 @@

poppler_form_field_choice_select_item ()

void                poppler_form_field_choice_select_item
                                                         (PopplerFormField *field,
-                                                         gint index);
+ gint index);

Selects the item at the given index on field

@@ -682,7 +682,7 @@

poppler_form_field_choice_toggle_item ()

void                poppler_form_field_choice_toggle_item
                                                         (PopplerFormField *field,
-                                                         gint index);
+ gint index);

Changes the state of the item at the given index

@@ -746,7 +746,7 @@

poppler_form_field_text_get_text ()

-
gchar *             poppler_form_field_text_get_text    (PopplerFormField *field);
+
gchar *             poppler_form_field_text_get_text    (PopplerFormField *field);

Retrieves the contents of field.

@@ -760,7 +760,7 @@

Returns :

-a new allocated string. It must be freed with g_free() when done. +a new allocated string. It must be freed with g_free() when done.
@@ -769,7 +769,7 @@

poppler_form_field_text_set_text ()

void                poppler_form_field_text_set_text    (PopplerFormField *field,
-                                                         const gchar *text);
+ const gchar *text);

Sets the text in field to the given value, replacing the current contents.

@@ -791,7 +791,7 @@

poppler_form_field_text_get_max_len ()

-
gint                poppler_form_field_text_get_max_len (PopplerFormField *field);
+
gint                poppler_form_field_text_get_max_len (PopplerFormField *field);

Retrieves the maximum allowed length of the text in field

@@ -813,12 +813,12 @@

poppler_form_field_text_do_scroll ()

-
gboolean            poppler_form_field_text_do_scroll   (PopplerFormField *field);
+
gboolean            poppler_form_field_text_do_scroll   (PopplerFormField *field);

poppler_form_field_text_do_spell_check ()

-
gboolean            poppler_form_field_text_do_spell_check
+
gboolean            poppler_form_field_text_do_spell_check
                                                         (PopplerFormField *field);

Checks whether spell checking should be done for the contents of field @@ -834,7 +834,7 @@

Returns :

-TRUE if spell checking should be done for field +TRUE if spell checking should be done for field @@ -843,7 +843,7 @@

poppler_form_field_text_is_password ()

-
gboolean            poppler_form_field_text_is_password (PopplerFormField *field);
+
gboolean            poppler_form_field_text_is_password (PopplerFormField *field);

Checks whether content of field is a password and it must be hidden

@@ -858,7 +858,7 @@

Returns :

-TRUE if the content of field is a password +TRUE if the content of field is a password
@@ -866,7 +866,7 @@

poppler_form_field_text_is_rich_text ()

-
gboolean            poppler_form_field_text_is_rich_text
+
gboolean            poppler_form_field_text_is_rich_text
                                                         (PopplerFormField *field);

Checks whether the contents of field are rich text @@ -882,7 +882,7 @@

Returns :

-TRUE if the contents of field are rich text +TRUE if the contents of field are rich text
diff -Nru poppler-0.18.4/glib/reference/html/PopplerLayer.html poppler-0.20.5/glib/reference/html/PopplerLayer.html --- poppler-0.18.4/glib/reference/html/PopplerLayer.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerLayer.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerLayer - + @@ -43,19 +43,19 @@ #include <poppler.h> PopplerLayer; -const gchar * poppler_layer_get_title (PopplerLayer *layer); -gboolean poppler_layer_is_visible (PopplerLayer *layer); +const gchar * poppler_layer_get_title (PopplerLayer *layer); +gboolean poppler_layer_is_visible (PopplerLayer *layer); void poppler_layer_show (PopplerLayer *layer); void poppler_layer_hide (PopplerLayer *layer); -gboolean poppler_layer_is_parent (PopplerLayer *layer); -gint poppler_layer_get_radio_button_group_id +gboolean poppler_layer_is_parent (PopplerLayer *layer); +gint poppler_layer_get_radio_button_group_id (PopplerLayer *layer);

Object Hierarchy

-  GObject
+  GObject
    +----PopplerLayer
 
@@ -71,7 +71,7 @@

poppler_layer_get_title ()

-
const gchar *       poppler_layer_get_title             (PopplerLayer *layer);
+
const gchar *       poppler_layer_get_title             (PopplerLayer *layer);

Returns the name of the layer suitable for presentation as a title in a viewer's GUI @@ -95,7 +95,7 @@


poppler_layer_is_visible ()

-
gboolean            poppler_layer_is_visible            (PopplerLayer *layer);
+
gboolean            poppler_layer_is_visible            (PopplerLayer *layer);

Returns whether layer is visible

@@ -110,7 +110,7 @@

Returns :

-TRUE if layer is visible +TRUE if layer is visible
@@ -155,7 +155,7 @@

poppler_layer_is_parent ()

-
gboolean            poppler_layer_is_parent             (PopplerLayer *layer);
+
gboolean            poppler_layer_is_parent             (PopplerLayer *layer);

Returns whether layer is parent of other nested layers.

@@ -170,7 +170,7 @@

Returns :

-TRUE if layer is a parent layer +TRUE if layer is a parent layer
@@ -179,7 +179,7 @@

poppler_layer_get_radio_button_group_id ()

-
gint                poppler_layer_get_radio_button_group_id
+
gint                poppler_layer_get_radio_button_group_id
                                                         (PopplerLayer *layer);

Returns the numeric ID the radio button group associated with layer. diff -Nru poppler-0.18.4/glib/reference/html/PopplerMedia.html poppler-0.20.5/glib/reference/html/PopplerMedia.html --- poppler-0.18.4/glib/reference/html/PopplerMedia.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerMedia.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerMedia - + @@ -43,26 +43,26 @@ #include <poppler.h> PopplerMedia; -gboolean (*PopplerMediaSaveFunc) (const gchar *buf, +gboolean (*PopplerMediaSaveFunc) (const gchar *buf, gsize count, - gpointer data, - GError **error); -const gchar * poppler_media_get_filename (PopplerMedia *poppler_media); -const gchar * poppler_media_get_mime_type (PopplerMedia *poppler_media); -gboolean poppler_media_is_embedded (PopplerMedia *poppler_media); -gboolean poppler_media_save (PopplerMedia *poppler_media, + gpointer data, + GError **error); +const gchar * poppler_media_get_filename (PopplerMedia *poppler_media); +const gchar * poppler_media_get_mime_type (PopplerMedia *poppler_media); +gboolean poppler_media_is_embedded (PopplerMedia *poppler_media); +gboolean poppler_media_save (PopplerMedia *poppler_media, const char *filename, - GError **error); -gboolean poppler_media_save_to_callback (PopplerMedia *poppler_media, + GError **error); +gboolean poppler_media_save_to_callback (PopplerMedia *poppler_media, PopplerMediaSaveFunc save_func, - gpointer user_data, - GError **error); + gpointer user_data, + GError **error);

Object Hierarchy

-  GObject
+  GObject
    +----PopplerMedia
 
@@ -78,16 +78,16 @@

PopplerMediaSaveFunc ()

-
gboolean            (*PopplerMediaSaveFunc)             (const gchar *buf,
+
gboolean            (*PopplerMediaSaveFunc)             (const gchar *buf,
                                                          gsize count,
-                                                         gpointer data,
-                                                         GError **error);
+ gpointer data, + GError **error);

Specifies the type of the function passed to poppler_media_save_to_callback(). It is called once for each block of bytes that is "written" by poppler_media_save_to_callback(). If -successful it should return TRUE. If an error occurs it should set -error and return FALSE, in which case poppler_media_save_to_callback() +successful it should return TRUE. If an error occurs it should set +error and return FALSE, in which case poppler_media_save_to_callback() will fail with the same error.

@@ -110,13 +110,13 @@ - +TRUE if successful, FALSE (with error set) if failed.

error :

GError to set on error, or NULL +GError to set on error, or NULL

Returns :

-TRUE if successful, FALSE (with error set) if failed.
@@ -125,7 +125,7 @@

poppler_media_get_filename ()

-
const gchar *       poppler_media_get_filename          (PopplerMedia *poppler_media);
+
const gchar *       poppler_media_get_filename          (PopplerMedia *poppler_media);

Returns the media clip filename, in case of non-embedded media. filename might be a local relative or absolute path or a URI @@ -149,7 +149,7 @@


poppler_media_get_mime_type ()

-
const gchar *       poppler_media_get_mime_type         (PopplerMedia *poppler_media);
+
const gchar *       poppler_media_get_mime_type         (PopplerMedia *poppler_media);

Returns the media clip mime-type

@@ -172,11 +172,11 @@

poppler_media_is_embedded ()

-
gboolean            poppler_media_is_embedded           (PopplerMedia *poppler_media);
+
gboolean            poppler_media_is_embedded           (PopplerMedia *poppler_media);

-Whether the media clip is embedded in the PDF. If the result is TRUE, the embedded stream +Whether the media clip is embedded in the PDF. If the result is TRUE, the embedded stream can be saved with poppler_media_save() or poppler_media_save_to_callback() function. -If the result is FALSE, the media clip filename can be retrieved with +If the result is FALSE, the media clip filename can be retrieved with poppler_media_get_filename() function.

@@ -190,7 +190,7 @@ +TRUE if media clip is embedded, FALSE otherwise

Returns :

-TRUE if media clip is embedded, FALSE otherwise
@@ -199,13 +199,13 @@

poppler_media_save ()

-
gboolean            poppler_media_save                  (PopplerMedia *poppler_media,
+
gboolean            poppler_media_save                  (PopplerMedia *poppler_media,
                                                          const char *filename,
-                                                         GError **error);
+ GError **error);

Saves embedded stream of poppler_media to a file indicated by filename. -If error is set, FALSE will be returned. -Possible errors include those in the G_FILE_ERROR domain +If error is set, FALSE will be returned. +Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.

@@ -222,13 +222,13 @@ - +TRUE, if the file successfully saved

error :

return location for error, or NULL. [allow-none] +return location for error, or NULL. [allow-none]

Returns :

-TRUE, if the file successfully saved
@@ -237,15 +237,15 @@

poppler_media_save_to_callback ()

-
gboolean            poppler_media_save_to_callback      (PopplerMedia *poppler_media,
+
gboolean            poppler_media_save_to_callback      (PopplerMedia *poppler_media,
                                                          PopplerMediaSaveFunc save_func,
-                                                         gpointer user_data,
-                                                         GError **error);
+ gpointer user_data, + GError **error);

Saves embedded stream of poppler_media by feeding the produced data to save_func. Can be used when you want to store the media clip stream to something other than a file, such as -an in-memory buffer or a socket. If error is set, FALSE will be -returned. Possible errors include those in the G_FILE_ERROR domain and +an in-memory buffer or a socket. If error is set, FALSE will be +returned. Possible errors include those in the G_FILE_ERROR domain and whatever the save function generates.

@@ -267,13 +267,13 @@ - +TRUE, if the save successfully completed

error :

return location for error, or NULL. [allow-none] +return location for error, or NULL. [allow-none]

Returns :

-TRUE, if the save successfully completed
diff -Nru poppler-0.18.4/glib/reference/html/PopplerMovie.html poppler-0.20.5/glib/reference/html/PopplerMovie.html --- poppler-0.18.4/glib/reference/html/PopplerMovie.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerMovie.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerMovie - + @@ -43,15 +43,15 @@ #include <poppler.h> PopplerMovie; -const gchar * poppler_movie_get_filename (PopplerMovie *poppler_movie); -gboolean poppler_movie_need_poster (PopplerMovie *poppler_movie); -gboolean poppler_movie_show_controls (PopplerMovie *poppler_movie); +const gchar * poppler_movie_get_filename (PopplerMovie *poppler_movie); +gboolean poppler_movie_need_poster (PopplerMovie *poppler_movie); +gboolean poppler_movie_show_controls (PopplerMovie *poppler_movie);

Object Hierarchy

-  GObject
+  GObject
    +----PopplerMovie
 
@@ -67,7 +67,7 @@

poppler_movie_get_filename ()

-
const gchar *       poppler_movie_get_filename          (PopplerMovie *poppler_movie);
+
const gchar *       poppler_movie_get_filename          (PopplerMovie *poppler_movie);

Returns the local filename identifying a self-describing movie file

@@ -91,7 +91,7 @@

poppler_movie_need_poster ()

-
gboolean            poppler_movie_need_poster           (PopplerMovie *poppler_movie);
+
gboolean            poppler_movie_need_poster           (PopplerMovie *poppler_movie);

Returns whether a poster image representing the Movie shall be displayed. The poster image must be retrieved @@ -108,7 +108,7 @@

Returns :

-TRUE if move needs a poster image, FALSE otherwise +TRUE if move needs a poster image, FALSE otherwise
@@ -117,7 +117,7 @@

poppler_movie_show_controls ()

-
gboolean            poppler_movie_show_controls         (PopplerMovie *poppler_movie);
+
gboolean            poppler_movie_show_controls         (PopplerMovie *poppler_movie);

Returns whether to display a movie controller bar while playing the movie

@@ -132,7 +132,7 @@

Returns :

-TRUE if controller bar should be displayed, FALSE otherwise +TRUE if controller bar should be displayed, FALSE otherwise
diff -Nru poppler-0.18.4/glib/reference/html/PopplerPage.html poppler-0.20.5/glib/reference/html/PopplerPage.html --- poppler-0.18.4/glib/reference/html/PopplerPage.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/PopplerPage.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerPage - + @@ -57,7 +57,7 @@ enum PopplerSelectionStyle; PopplerTextAttributes; int poppler_page_get_index (PopplerPage *page); -gchar * poppler_page_get_label (PopplerPage *page); +gchar * poppler_page_get_label (PopplerPage *page); void poppler_page_get_size (PopplerPage *page, double *width, double *height); @@ -65,58 +65,58 @@ PopplerRectangle *rect); double poppler_page_get_duration (PopplerPage *page); PopplerPageTransition * poppler_page_get_transition (PopplerPage *page); -gboolean poppler_page_get_thumbnail_size (PopplerPage *page, +gboolean poppler_page_get_thumbnail_size (PopplerPage *page, int *width, int *height); -cairo_surface_t * poppler_page_get_thumbnail (PopplerPage *page); +cairo_surface_t * poppler_page_get_thumbnail (PopplerPage *page); void poppler_page_render (PopplerPage *page, - cairo_t *cairo); + cairo_t *cairo); void poppler_page_render_for_printing (PopplerPage *page, - cairo_t *cairo); + cairo_t *cairo); void poppler_page_render_for_printing_with_options (PopplerPage *page, - cairo_t *cairo, + cairo_t *cairo, PopplerPrintFlags options); void poppler_page_render_to_ps (PopplerPage *page, PopplerPSFile *ps_file); void poppler_page_render_selection (PopplerPage *page, - cairo_t *cairo, + cairo_t *cairo, PopplerRectangle *selection, PopplerRectangle *old_selection, PopplerSelectionStyle style, PopplerColor *glyph_color, PopplerColor *background_color); -cairo_region_t * poppler_page_get_selected_region (PopplerPage *page, - gdouble scale, +cairo_region_t * poppler_page_get_selected_region (PopplerPage *page, + gdouble scale, PopplerSelectionStyle style, PopplerRectangle *selection); -GList * poppler_page_get_selection_region (PopplerPage *page, - gdouble scale, +GList * poppler_page_get_selection_region (PopplerPage *page, + gdouble scale, PopplerSelectionStyle style, PopplerRectangle *selection); -void poppler_page_selection_region_free (GList *region); +void poppler_page_selection_region_free (GList *region); char * poppler_page_get_selected_text (PopplerPage *page, PopplerSelectionStyle style, PopplerRectangle *selection); -GList * poppler_page_find_text (PopplerPage *page, +GList * poppler_page_find_text (PopplerPage *page, const char *text); char * poppler_page_get_text (PopplerPage *page); -gboolean poppler_page_get_text_layout (PopplerPage *page, +gboolean poppler_page_get_text_layout (PopplerPage *page, PopplerRectangle **rectangles, - guint *n_rectangles); -GList * poppler_page_get_text_attributes (PopplerPage *page); -void poppler_page_free_text_attributes (GList *list); -GList * poppler_page_get_link_mapping (PopplerPage *page); -void poppler_page_free_link_mapping (GList *list); -GList * poppler_page_get_image_mapping (PopplerPage *page); -cairo_surface_t * poppler_page_get_image (PopplerPage *page, - gint image_id); -void poppler_page_free_image_mapping (GList *list); -GList * poppler_page_get_form_field_mapping (PopplerPage *page); + guint *n_rectangles); +GList * poppler_page_get_text_attributes (PopplerPage *page); +void poppler_page_free_text_attributes (GList *list); +GList * poppler_page_get_link_mapping (PopplerPage *page); +void poppler_page_free_link_mapping (GList *list); +GList * poppler_page_get_image_mapping (PopplerPage *page); +cairo_surface_t * poppler_page_get_image (PopplerPage *page, + gint image_id); +void poppler_page_free_image_mapping (GList *list); +GList * poppler_page_get_form_field_mapping (PopplerPage *page); void poppler_page_free_form_field_mapping - (GList *list); -GList * poppler_page_get_annot_mapping (PopplerPage *page); -void poppler_page_free_annot_mapping (GList *list); + (GList *list); +GList * poppler_page_get_annot_mapping (PopplerPage *page); +void poppler_page_free_annot_mapping (GList *list); void poppler_page_add_annot (PopplerPage *page, PopplerAnnot *annot); PopplerRectangle * poppler_rectangle_new (void); @@ -147,14 +147,14 @@

Object Hierarchy

-  GObject
+  GObject
    +----PopplerPage
 

Properties

-  "label"                    gchar*                : Read
+  "label"                    gchar*                : Read
 
@@ -184,19 +184,19 @@ -

gdouble x1;

+

gdouble x1;

x coordinate of lower left corner -

gdouble y1;

+

gdouble y1;

y coordinate of lower left corner -

gdouble x2;

+

gdouble x2;

x coordinate of upper right corner -

gdouble y2;

+

gdouble y2;

y coordinate of upper right corner @@ -238,11 +238,11 @@ transition types -

gint duration;

+

gint duration;

the duration of the transition effect -

gint angle;

+

gint angle;

the direction in which the specified transition effect shall moves, expressed in degrees counterclockwise starting from a left-to-right direction. Only for POPPLER_PAGE_TRANSITION_WIPE, POPPLER_PAGE_TRANSITION_GLITTER, POPPLER_PAGE_TRANSITION_FLY, @@ -250,12 +250,12 @@ transition types -

gdouble scale;

+

gdouble scale;

the starting or ending scale at which the changes shall be drawn. Only for POPPLER_PAGE_TRANSITION_FLY transition type -

gboolean rectangular;

+

gboolean rectangular;

whether the area that will be flown is rectangular and opaque. Only for POPPLER_PAGE_TRANSITION_FLY transition type @@ -309,7 +309,7 @@ a PopplerRectangle representing an area of the page -

gint image_id;

+

gint image_id;

an image identifier @@ -569,15 +569,15 @@ -

gchar *font_name;

+

gchar *font_name;

font name -

gdouble font_size;

+

gdouble font_size;

font size -

gboolean is_underlined;

+

gboolean is_underlined;

if text is underlined @@ -585,11 +585,11 @@ a PopplerColor, the foreground color -

gint start_index;

+

gint start_index;

start position this text attributes apply -

gint end_index;

+

gint end_index;

end position this text text attributes apply @@ -622,7 +622,7 @@

poppler_page_get_label ()

-
gchar *             poppler_page_get_label              (PopplerPage *page);
+
gchar *             poppler_page_get_label              (PopplerPage *page);

Returns the label of page. Note that page labels and page indices might not coincide. @@ -638,7 +638,7 @@

Returns :

a new allocated string containing the label of page, -or NULL if page doesn't have a label +or NULL if page doesn't have a label
@@ -737,7 +737,7 @@

Returns :

-a PopplerPageTransition or NULL. +a PopplerPageTransition or NULL.
@@ -745,11 +745,11 @@

poppler_page_get_thumbnail_size ()

-
gboolean            poppler_page_get_thumbnail_size     (PopplerPage *page,
+
gboolean            poppler_page_get_thumbnail_size     (PopplerPage *page,
                                                          int *width,
                                                          int *height);

-Returns TRUE if page has a thumbnail associated with it. It also +Returns TRUE if page has a thumbnail associated with it. It also fills in width and height with the width and height of the thumbnail. The values of width and height are not changed if no appropriate thumbnail exists. @@ -773,7 +773,7 @@

Returns :

-TRUE, if page has a thumbnail associated with it. +TRUE, if page has a thumbnail associated with it.
@@ -781,11 +781,11 @@

poppler_page_get_thumbnail ()

-
cairo_surface_t *   poppler_page_get_thumbnail          (PopplerPage *page);
+
cairo_surface_t *   poppler_page_get_thumbnail          (PopplerPage *page);

Get the embedded thumbnail for the specified page. If the document doesn't have an embedded thumbnail for the page, this function -returns NULL. +returns NULL.

@@ -796,7 +796,7 @@ - @@ -806,7 +806,7 @@

poppler_page_render ()

void                poppler_page_render                 (PopplerPage *page,
-                                                         cairo_t *cairo);
+ cairo_t *cairo);

Render the page to the given cairo context. This function is for rendering a page that will be displayed. If you want @@ -831,7 +831,7 @@

poppler_page_render_for_printing ()

void                poppler_page_render_for_printing    (PopplerPage *page,
-                                                         cairo_t *cairo);
+ cairo_t *cairo);

Render the page to the given cairo context for printing.

@@ -854,7 +854,7 @@

poppler_page_render_for_printing_with_options ()

void                poppler_page_render_for_printing_with_options
                                                         (PopplerPage *page,
-                                                         cairo_t *cairo,
+                                                         cairo_t *cairo,
                                                          PopplerPrintFlags options);

Render the page to the given cairo context for printing @@ -906,7 +906,7 @@

poppler_page_render_selection ()

void                poppler_page_render_selection       (PopplerPage *page,
-                                                         cairo_t *cairo,
+                                                         cairo_t *cairo,
                                                          PopplerRectangle *selection,
                                                          PopplerRectangle *old_selection,
                                                          PopplerSelectionStyle style,
@@ -961,14 +961,14 @@
 

poppler_page_get_selected_region ()

-
cairo_region_t *    poppler_page_get_selected_region    (PopplerPage *page,
-                                                         gdouble scale,
+
cairo_region_t *    poppler_page_get_selected_region    (PopplerPage *page,
+                                                         gdouble scale,
                                                          PopplerSelectionStyle style,
                                                          PopplerRectangle *selection);

Returns a region containing the area that would be rendered by poppler_page_render_selection(). -The returned region must be freed with cairo_region_destroy() +The returned region must be freed with cairo_region_destroy()

Returns :

the tumbnail as a cairo_surface_t or NULL if the document +the tumbnail as a cairo_surface_t or NULL if the document doesn't have a thumbnail for this page.
@@ -1003,8 +1003,8 @@

poppler_page_get_selection_region ()

-
GList *             poppler_page_get_selection_region   (PopplerPage *page,
-                                                         gdouble scale,
+
GList *             poppler_page_get_selection_region   (PopplerPage *page,
+                                                         gdouble scale,
                                                          PopplerSelectionStyle style,
                                                          PopplerRectangle *selection);
@@ -1013,7 +1013,7 @@

Returns a region containing the area that would be rendered by -poppler_page_render_selection() as a GList of +poppler_page_render_selection() as a GList of PopplerRectangle. The returned list must be freed with poppler_page_selection_region_free().

@@ -1040,7 +1040,7 @@
- @@ -1049,7 +1049,7 @@

poppler_page_selection_region_free ()

-
void                poppler_page_selection_region_free  (GList *region);
+
void                poppler_page_selection_region_free  (GList *region);

Warning

poppler_page_selection_region_free is deprecated and should not be used in newly-written code. 0.16

@@ -1061,7 +1061,7 @@
- @@ -1105,10 +1105,10 @@

poppler_page_find_text ()

-
GList *             poppler_page_find_text              (PopplerPage *page,
+
GList *             poppler_page_find_text              (PopplerPage *page,
                                                          const char *text);

-A GList of rectangles for each occurance of the text on the page. +A GList of rectangles for each occurance of the text on the page. The coordinates are in PDF points.

Returns :

a GList of PopplerRectangle. [element-type PopplerRectangle][transfer full] +a GList of PopplerRectangle. [element-type PopplerRectangle][transfer full]

region :

a GList of +a GList of PopplerRectangle. [element-type PopplerRectangle]
@@ -1125,7 +1125,7 @@ - @@ -1158,12 +1158,12 @@

poppler_page_get_text_layout ()

-
gboolean            poppler_page_get_text_layout        (PopplerPage *page,
+
gboolean            poppler_page_get_text_layout        (PopplerPage *page,
                                                          PopplerRectangle **rectangles,
-                                                         guint *n_rectangles);
+ guint *n_rectangles);

Obtains the layout of the text as a list of PopplerRectangle -This array must be freed with g_free() when done. +This array must be freed with g_free() when done.

The position in the array represents an offset in the text returned by @@ -1189,7 +1189,7 @@

+TRUE if the page contains text, FALSE otherwise

Returns :

a GList of PopplerRectangle,. [element-type PopplerRectangle][transfer full] +a GList of PopplerRectangle,. [element-type PopplerRectangle][transfer full]

Returns :

-TRUE if the page contains text, FALSE otherwise
@@ -1198,7 +1198,7 @@

poppler_page_get_text_attributes ()

-
GList *             poppler_page_get_text_attributes    (PopplerPage *page);
+
GList *             poppler_page_get_text_attributes    (PopplerPage *page);

Obtains the attributes of the text as a GList of PopplerTextAttributes. This list must be freed with poppler_page_free_text_attributes() when done. @@ -1218,7 +1218,7 @@

Returns :

-A GList of PopplerTextAttributes. [element-type PopplerTextAttributes][transfer full] +A GList of PopplerTextAttributes. [element-type PopplerTextAttributes][transfer full] @@ -1228,7 +1228,7 @@

poppler_page_free_text_attributes ()

-
void                poppler_page_free_text_attributes   (GList *list);
+
void                poppler_page_free_text_attributes   (GList *list);

Frees a list of PopplerTextAttributess allocated by poppler_page_get_text_attributes(). @@ -1247,7 +1247,7 @@


poppler_page_get_link_mapping ()

-
GList *             poppler_page_get_link_mapping       (PopplerPage *page);
+
GList *             poppler_page_get_link_mapping       (PopplerPage *page);

Returns a list of PopplerLinkMapping items that map from a location on page to a PopplerAction. This list must be freed @@ -1263,7 +1263,7 @@

Returns :

-A GList of PopplerLinkMapping. [element-type PopplerLinkMapping][transfer full] +A GList of PopplerLinkMapping. [element-type PopplerLinkMapping][transfer full] @@ -1272,7 +1272,7 @@

poppler_page_free_link_mapping ()

-
void                poppler_page_free_link_mapping      (GList *list);
+
void                poppler_page_free_link_mapping      (GList *list);

Frees a list of PopplerLinkMappings allocated by poppler_page_get_link_mapping(). It also frees the PopplerActions @@ -1292,7 +1292,7 @@


poppler_page_get_image_mapping ()

-
GList *             poppler_page_get_image_mapping      (PopplerPage *page);
+
GList *             poppler_page_get_image_mapping      (PopplerPage *page);

Returns a list of PopplerImageMapping items that map from a location on page to an image of the page. This list must be freed @@ -1308,7 +1308,7 @@

Returns :

-A GList of PopplerImageMapping. [element-type PopplerImageMapping][transfer full] +A GList of PopplerImageMapping. [element-type PopplerImageMapping][transfer full] @@ -1317,8 +1317,8 @@

poppler_page_get_image ()

-
cairo_surface_t *   poppler_page_get_image              (PopplerPage *page,
-                                                         gint image_id);
+
cairo_surface_t *   poppler_page_get_image              (PopplerPage *page,
+                                                         gint image_id);

Returns a cairo surface for the image of the page

@@ -1332,7 +1332,7 @@

image_id :

-The image identificator +The image identifier

Returns :

@@ -1344,7 +1344,7 @@

poppler_page_free_image_mapping ()

-
void                poppler_page_free_image_mapping     (GList *list);
+
void                poppler_page_free_image_mapping     (GList *list);

Frees a list of PopplerImageMappings allocated by poppler_page_get_image_mapping(). @@ -1362,7 +1362,7 @@


poppler_page_get_form_field_mapping ()

-
GList *             poppler_page_get_form_field_mapping (PopplerPage *page);
+
GList *             poppler_page_get_form_field_mapping (PopplerPage *page);

Returns a list of PopplerFormFieldMapping items that map from a location on page to a form field. This list must be freed @@ -1378,7 +1378,7 @@

Returns :

-A GList of PopplerFormFieldMapping. [element-type PopplerFormFieldMapping][transfer full] +A GList of PopplerFormFieldMapping. [element-type PopplerFormFieldMapping][transfer full] @@ -1388,7 +1388,7 @@

poppler_page_free_form_field_mapping ()

void                poppler_page_free_form_field_mapping
-                                                        (GList *list);
+ (GList *list);

Frees a list of PopplerFormFieldMappings allocated by poppler_page_get_form_field_mapping(). @@ -1406,7 +1406,7 @@


poppler_page_get_annot_mapping ()

-
GList *             poppler_page_get_annot_mapping      (PopplerPage *page);
+
GList *             poppler_page_get_annot_mapping      (PopplerPage *page);

Returns a list of PopplerAnnotMapping items that map from a location on page to a PopplerAnnot. This list must be freed with @@ -1422,7 +1422,7 @@

Returns :

-A GList of PopplerAnnotMapping. [element-type PopplerAnnotMapping][transfer full] +A GList of PopplerAnnotMapping. [element-type PopplerAnnotMapping][transfer full] @@ -1431,12 +1431,12 @@

poppler_page_free_annot_mapping ()

-
void                poppler_page_free_annot_mapping     (GList *list);
+
void                poppler_page_free_annot_mapping     (GList *list);

Frees a list of PopplerAnnotMappings allocated by poppler_page_get_annot_mapping(). It also unreferences the PopplerAnnots that each mapping contains, so if you want to keep them around, you need to -reference them with g_object_ref(). +reference them with g_object_ref().

@@ -1853,9 +1853,9 @@

Property Details

The "label" property

-
  "label"                    gchar*                : Read
+
  "label"                    gchar*                : Read

-The label of the page or NULL. See also poppler_page_get_label() +The label of the page or NULL. See also poppler_page_get_label()

Default value: NULL

diff -Nru poppler-0.18.4/glib/reference/html/annotation-glossary.html poppler-0.20.5/glib/reference/html/annotation-glossary.html --- poppler-0.18.4/glib/reference/html/annotation-glossary.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/annotation-glossary.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,17 +3,17 @@ Annotation Glossary - + - +
- + diff -Nru poppler-0.18.4/glib/reference/html/api-index-0-12.html poppler-0.20.5/glib/reference/html/api-index-0-12.html --- poppler-0.18.4/glib/reference/html/api-index-0-12.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/api-index-0-12.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ Index of new symbols in 0.12 - + diff -Nru poppler-0.18.4/glib/reference/html/api-index-0-14.html poppler-0.20.5/glib/reference/html/api-index-0-14.html --- poppler-0.18.4/glib/reference/html/api-index-0-14.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/api-index-0-14.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ Index of new symbols in 0.14 - + diff -Nru poppler-0.18.4/glib/reference/html/api-index-0-16.html poppler-0.20.5/glib/reference/html/api-index-0-16.html --- poppler-0.18.4/glib/reference/html/api-index-0-16.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/api-index-0-16.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ Index of new symbols in 0.16 - + diff -Nru poppler-0.18.4/glib/reference/html/api-index-0-18.html poppler-0.20.5/glib/reference/html/api-index-0-18.html --- poppler-0.18.4/glib/reference/html/api-index-0-18.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/api-index-0-18.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,11 +3,11 @@ Index of new symbols in 0.18 - + - + @@ -18,7 +18,7 @@ - +

-Poppler

+Poppler
poppler diff -Nru poppler-0.18.4/glib/reference/html/index.html poppler-0.20.5/glib/reference/html/index.html --- poppler-0.18.4/glib/reference/html/index.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/index.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ Poppler Reference Manual - + @@ -15,7 +15,7 @@

- for Poppler 0.18.4 + for Poppler 0.20.5

@@ -64,6 +64,7 @@
Index of new symbols in 0.14
Index of new symbols in 0.16
Index of new symbols in 0.18
+
Index of new symbols in 0.20
Annotation Glossary
diff -Nru poppler-0.18.4/glib/reference/html/index.sgml poppler-0.20.5/glib/reference/html/index.sgml --- poppler-0.18.4/glib/reference/html/index.sgml 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/index.sgml 2012-10-10 17:42:55.000000000 +0000 @@ -126,7 +126,9 @@ + + diff -Nru poppler-0.18.4/glib/reference/html/poppler-PopplerAction.html poppler-0.20.5/glib/reference/html/poppler-PopplerAction.html --- poppler-0.18.4/glib/reference/html/poppler-PopplerAction.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/poppler-PopplerAction.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ PopplerAction - + @@ -142,19 +142,19 @@ scale factor -

gchar *named_dest;

+

gchar *named_dest;

name of the destination (POPPLER_DEST_NAMED only) -

guint change_left : 1;

+

guint change_left : 1;

whether left coordinate should be changed -

guint change_top : 1;

+

guint change_top : 1;

whether top coordinate should be changed -

guint change_zoom : 1;

+

guint change_zoom : 1;

whether scale factor should be changed @@ -505,7 +505,7 @@ -

GList *layers;

+

GList *layers;

list of PopplerLayers diff -Nru poppler-0.18.4/glib/reference/html/poppler-Version-and-Features-Information.html poppler-0.20.5/glib/reference/html/poppler-Version-and-Features-Information.html --- poppler-0.18.4/glib/reference/html/poppler-Version-and-Features-Information.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/poppler-Version-and-Features-Information.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ Version and Features Information - + @@ -82,7 +82,7 @@

POPPLER_MINOR_VERSION

-
#define POPPLER_MINOR_VERSION (18)
+
#define POPPLER_MINOR_VERSION (20)
 

The major version number of the poppler header files (e.g. in poppler version @@ -93,7 +93,7 @@


POPPLER_MICRO_VERSION

-
#define POPPLER_MICRO_VERSION (4)
+
#define POPPLER_MICRO_VERSION (5)
 

The micro version number of the poppler header files (e.g. in poppler version @@ -126,7 +126,7 @@

Returns :

-TRUE if the version of the poppler header files is the same +TRUE if the version of the poppler header files is the same as or newer than the passed-in version diff -Nru poppler-0.18.4/glib/reference/html/poppler-poppler.html poppler-0.20.5/glib/reference/html/poppler-poppler.html --- poppler-0.18.4/glib/reference/html/poppler-poppler.html 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/poppler-poppler.html 2012-10-10 17:42:55.000000000 +0000 @@ -3,7 +3,7 @@ poppler - + @@ -48,7 +48,7 @@ enum PopplerPrintFlags; PopplerBackend poppler_get_backend (void); const char * poppler_get_version (void); -gboolean poppler_date_parse (const gchar *date, +gboolean poppler_date_parse (const gchar *date, time_t *timet); PopplerColor * poppler_color_new (void); PopplerColor * poppler_color_copy (PopplerColor *color); @@ -190,7 +190,7 @@

POPPLER_PRINT_STAMP_ANNOTS_ONLY

-print doucment and only stamp annotations +print document and only stamp annotations @@ -235,10 +235,10 @@

poppler_date_parse ()

-
gboolean            poppler_date_parse                  (const gchar *date,
+
gboolean            poppler_date_parse                  (const gchar *date,
                                                          time_t *timet);

-Parses a PDF format date string and converts it to a time_t. Returns FALSE +Parses a PDF format date string and converts it to a time_t. Returns FALSE if the parsing fails or the input string is not a valid PDF format date string

@@ -256,7 +256,7 @@ +TRUE, if timet was set

Returns :

-TRUE, if timet was set
diff -Nru poppler-0.18.4/glib/reference/html/poppler.devhelp2 poppler-0.20.5/glib/reference/html/poppler.devhelp2 --- poppler-0.18.4/glib/reference/html/poppler.devhelp2 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/html/poppler.devhelp2 2012-10-10 17:42:55.000000000 +0000 @@ -21,6 +21,7 @@ + @@ -90,7 +91,9 @@ + + diff -Nru poppler-0.18.4/glib/reference/poppler-docs.sgml poppler-0.20.5/glib/reference/poppler-docs.sgml --- poppler-0.18.4/glib/reference/poppler-docs.sgml 2012-01-26 23:38:42.000000000 +0000 +++ poppler-0.20.5/glib/reference/poppler-docs.sgml 2012-06-11 13:19:41.000000000 +0000 @@ -50,6 +50,10 @@ Index of new symbols in 0.18 + + Index of new symbols in 0.20 + + diff -Nru poppler-0.18.4/glib/reference/poppler-sections.txt poppler-0.20.5/glib/reference/poppler-sections.txt --- poppler-0.18.4/glib/reference/poppler-sections.txt 2012-02-15 17:24:15.000000000 +0000 +++ poppler-0.20.5/glib/reference/poppler-sections.txt 2012-10-10 17:42:55.000000000 +0000 @@ -156,7 +156,9 @@ poppler_fonts_iter_get_name poppler_fonts_iter_get_full_name poppler_fonts_iter_get_font_type +poppler_fonts_iter_get_substitute_name poppler_fonts_iter_get_file_name +poppler_fonts_iter_get_encoding poppler_fonts_iter_is_embedded poppler_fonts_iter_is_subset poppler_fonts_iter_next diff -Nru poppler-0.18.4/glib/reference/version.xml poppler-0.20.5/glib/reference/version.xml --- poppler-0.18.4/glib/reference/version.xml 2012-02-15 17:22:54.000000000 +0000 +++ poppler-0.20.5/glib/reference/version.xml 2012-10-10 17:35:04.000000000 +0000 @@ -1 +1 @@ -0.18.4 +0.20.5 diff -Nru poppler-0.18.4/goo/FixedPoint.cc poppler-0.20.5/goo/FixedPoint.cc --- poppler-0.18.4/goo/FixedPoint.cc 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/FixedPoint.cc 2012-05-10 20:05:44.000000000 +0000 @@ -82,28 +82,32 @@ } int FixedPoint::mul(int x, int y) { -#if 1 //~tmp - return ((FixPtInt64)x * y) >> fixptShift; -#else - int ah0, ah, bh, al, bl; - ah0 = x & fixptMaskH; - ah = x >> fixptShift; - al = x - ah0; - bh = y >> fixptShift; - bl = y - (bh << fixptShift); - return ah0 * bh + ah * bl + al * bh + ((al * bl) >> fixptShift); -#endif + FixPtInt64 z; + + z = ((FixPtInt64)x * y) >> fixptShift; + if (z > 0x7fffffffLL) { + return 0x7fffffff; + } else if (z < -0x80000000LL) { + return 0x80000000; + } else { + return (int)z; + } } int FixedPoint::div(int x, int y) { -#if 1 //~tmp - return ((FixPtInt64)x << fixptShift) / y; -#else -#endif + FixPtInt64 z; + + z = ((FixPtInt64)x << fixptShift) / y; + if (z > 0x7fffffffLL) { + return 0x7fffffff; + } else if (z < -0x80000000LL) { + return 0x80000000; + } else { + return (int)z; + } } GBool FixedPoint::divCheck(FixedPoint x, FixedPoint y, FixedPoint *result) { -#if 1 //~tmp FixPtInt64 z; z = ((FixPtInt64)x.val << fixptShift) / y.val; @@ -113,8 +117,19 @@ } result->val = z; return gTrue; -#else -#endif +} + +GBool FixedPoint::checkDet(FixedPoint m11, FixedPoint m12, + FixedPoint m21, FixedPoint m22, + FixedPoint epsilon) { + FixPtInt64 det, e; + + det = (FixPtInt64)m11.val * (FixPtInt64)m22.val + - (FixPtInt64)m12.val * (FixPtInt64)m21.val; + e = (FixPtInt64)epsilon.val << fixptShift; + // NB: this comparison has to be >= not > because epsilon can be + // truncated to zero as a fixed point value. + return det >= e || det <= -e; } #endif // USE_FIXEDPOINT diff -Nru poppler-0.18.4/goo/FixedPoint.h poppler-0.20.5/goo/FixedPoint.h --- poppler-0.18.4/goo/FixedPoint.h 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/FixedPoint.h 2012-08-15 13:31:38.000000000 +0000 @@ -11,7 +11,7 @@ #ifndef FIXEDPOINT_H #define FIXEDPOINT_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #if USE_FIXEDPOINT @@ -45,7 +45,7 @@ operator int() { return val >> fixptShift; } - int getRaw() { return val; } + int get16Dot16() { return val; } FixedPoint operator =(FixedPoint x) { val = x.val; return *this; } @@ -132,6 +132,11 @@ static int round(FixedPoint x) { return (x.val + (1 << (fixptShift - 1))) >> fixptShift; } + // Computes (x+y)/2 avoiding overflow and LSbit accuracy issues. + static FixedPoint avg(FixedPoint x, FixedPoint y) + { return make((x.val >> 1) + (y.val >> 1) + ((x.val | y.val) & 1)); } + + static FixedPoint sqrt(FixedPoint x); static FixedPoint pow(FixedPoint x, FixedPoint y); @@ -140,6 +145,12 @@ // overflow. static GBool divCheck(FixedPoint x, FixedPoint y, FixedPoint *result); + // Compute abs(m11*m22 - m12*m21) >= epsilon, handling the case + // where the multiplications overflow. + static GBool checkDet(FixedPoint m11, FixedPoint m12, + FixedPoint m21, FixedPoint m22, + FixedPoint epsilon); + private: static FixedPoint make(int valA) { FixedPoint x; x.val = valA; return x; } @@ -147,7 +158,7 @@ static int mul(int x, int y); static int div(int x, int y); - int val; // 16.16 fixed point + int val; // fixed point: (n-fixptShift).(fixptShift) }; #endif // USE_FIXEDPOINT diff -Nru poppler-0.18.4/goo/GooHash.cc poppler-0.20.5/goo/GooHash.cc --- poppler-0.18.4/goo/GooHash.cc 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/GooHash.cc 2012-05-10 20:05:44.000000000 +0000 @@ -107,7 +107,9 @@ if ((p = find(key, &h))) { p->val.p = val; - delete key; + if (deleteKeys) { + delete key; + } } else { add(key, val); } @@ -119,7 +121,9 @@ if ((p = find(key, &h))) { p->val.i = val; - delete key; + if (deleteKeys) { + delete key; + } } else { add(key, val); } @@ -145,7 +149,7 @@ return p->val.i; } -void *GooHash::lookup(char *key) { +void *GooHash::lookup(const char *key) { GooHashBucket *p; int h; @@ -155,7 +159,7 @@ return p->val.p; } -int GooHash::lookupInt(char *key) { +int GooHash::lookupInt(const char *key) { GooHashBucket *p; int h; @@ -211,7 +215,7 @@ return val; } -void *GooHash::remove(char *key) { +void *GooHash::remove(const char *key) { GooHashBucket *p; GooHashBucket **q; void *val; @@ -234,7 +238,7 @@ return val; } -int GooHash::removeInt(char *key) { +int GooHash::removeInt(const char *key) { GooHashBucket *p; GooHashBucket **q; int val; @@ -344,7 +348,7 @@ return NULL; } -GooHashBucket *GooHash::find(char *key, int *h) { +GooHashBucket *GooHash::find(const char *key, int *h) { GooHashBucket *p; *h = hash(key); @@ -357,7 +361,7 @@ } int GooHash::hash(GooString *key) { - char *p; + const char *p; unsigned int h; int i; @@ -368,8 +372,8 @@ return (int)(h % size); } -int GooHash::hash(char *key) { - char *p; +int GooHash::hash(const char *key) { + const char *p; unsigned int h; h = 0; diff -Nru poppler-0.18.4/goo/GooHash.h poppler-0.20.5/goo/GooHash.h --- poppler-0.18.4/goo/GooHash.h 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/GooHash.h 2012-05-10 20:05:44.000000000 +0000 @@ -32,12 +32,12 @@ void replace(GooString *key, int val); void *lookup(GooString *key); int lookupInt(GooString *key); - void *lookup(char *key); - int lookupInt(char *key); + void *lookup(const char *key); + int lookupInt(const char *key); void *remove(GooString *key); int removeInt(GooString *key); - void *remove(char *key); - int removeInt(char *key); + void *remove(const char *key); + int removeInt(const char *key); int getLength() { return len; } void startIter(GooHashIter **iter); GBool getNext(GooHashIter **iter, GooString **key, void **val); @@ -48,9 +48,9 @@ void expand(); GooHashBucket *find(GooString *key, int *h); - GooHashBucket *find(char *key, int *h); + GooHashBucket *find(const char *key, int *h); int hash(GooString *key); - int hash(char *key); + int hash(const char *key); GBool deleteKeys; // set if key strings should be deleted int size; // number of buckets diff -Nru poppler-0.18.4/goo/GooList.cc poppler-0.20.5/goo/GooList.cc --- poppler-0.18.4/goo/GooList.cc 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/GooList.cc 2012-05-10 20:05:44.000000000 +0000 @@ -29,7 +29,7 @@ } GooList::GooList(int sizeA) { - size = sizeA; + size = sizeA ? sizeA : 8; data = (void **)gmallocn(size, sizeof(void*)); length = 0; inc = 0; @@ -39,6 +39,16 @@ gfree(data); } +GooList *GooList::copy() { + GooList *ret; + + ret = new GooList(length); + ret->length = length; + memcpy(ret->data, data, length * sizeof(void *)); + ret->inc = inc; + return ret; +} + void GooList::append(void *p) { if (length >= size) { expand(); @@ -61,6 +71,9 @@ if (length >= size) { expand(); } + if (i < 0) { + i = 0; + } if (i < length) { memmove(data+i+1, data+i, (length - i) * sizeof(void *)); } @@ -86,6 +99,18 @@ qsort(data, length, sizeof(void *), cmp); } +void GooList::reverse() { + void *t; + int n, i; + + n = length / 2; + for (i = 0; i < n; ++i) { + t = data[i]; + data[i] = data[length - 1 - i]; + data[length - 1 - i] = t; + } +} + void GooList::expand() { size += (inc > 0) ? inc : size; data = (void **)greallocn(data, size, sizeof(void*)); diff -Nru poppler-0.18.4/goo/GooList.h poppler-0.20.5/goo/GooList.h --- poppler-0.18.4/goo/GooList.h 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/GooList.h 2012-05-10 20:05:44.000000000 +0000 @@ -36,12 +36,19 @@ // Get the number of elements. int getLength() { return length; } + // Returns a (shallow) copy of this list. + GooList *copy(); + //----- ordered list support // Return the th element. // Assumes 0 <= i < length. void *get(int i) { return data[i]; } + // Replace the th element. + // Assumes 0 <= i < length. + void put(int i, void *p) { data[i] = p; } + // Append an element to the end of the list. void append(void *p); @@ -61,6 +68,9 @@ // be double-dereferenced. void sort(int (*cmp)(const void *ptr1, const void *ptr2)); + // Reverse the list. + void reverse(); + //----- control // Set allocation increment to . If inc > 0, that many diff -Nru poppler-0.18.4/goo/GooString.cc poppler-0.20.5/goo/GooString.cc --- poppler-0.18.4/goo/GooString.cc 2011-11-22 21:33:05.000000000 +0000 +++ poppler-0.20.5/goo/GooString.cc 2012-08-30 20:31:05.000000000 +0000 @@ -50,6 +50,12 @@ Guint ui; long l; Gulong ul; +#ifdef LLONG_MAX + long long ll; +#endif +#ifdef ULLONG_MAX + unsigned long long ull; +#endif double f; char c; char *s; @@ -73,6 +79,18 @@ fmtULongHex, fmtULongOctal, fmtULongBinary, +#ifdef LLONG_MAX + fmtLongLongDecimal, + fmtLongLongHex, + fmtLongLongOctal, + fmtLongLongBinary, +#endif +#ifdef ULLONG_MAX + fmtULongLongDecimal, + fmtULongLongHex, + fmtULongLongOctal, + fmtULongLongBinary, +#endif fmtDouble, fmtDoubleTrimSmallAware, fmtDoubleTrim, @@ -82,9 +100,15 @@ fmtSpace }; -static char *formatStrings[] = { +static const char *formatStrings[] = { "d", "x", "o", "b", "ud", "ux", "uo", "ub", "ld", "lx", "lo", "lb", "uld", "ulx", "ulo", "ulb", +#ifdef LLONG_MAX + "lld", "llx", "llo", "llb", +#endif +#ifdef ULLONG_MAX + "ulld", "ullx", "ullo", "ullb", +#endif "f", "gs", "g", "c", "s", @@ -220,7 +244,7 @@ return new GooString(p, len); } -GooString *GooString::format(char *fmt, ...) { +GooString *GooString::format(const char *fmt, ...) { va_list argList; GooString *s; @@ -231,7 +255,7 @@ return s; } -GooString *GooString::formatv(char *fmt, va_list argList) { +GooString *GooString::formatv(const char *fmt, va_list argList) { GooString *s; s = new GooString(); @@ -266,7 +290,7 @@ return this; } -GooString *GooString::appendf(char *fmt, ...) { +GooString *GooString::appendf(const char *fmt, ...) { va_list argList; va_start(argList, fmt); @@ -275,7 +299,7 @@ return this; } -GooString *GooString::appendfv(char *fmt, va_list argList) { +GooString *GooString::appendfv(const char *fmt, va_list argList) { GooStringFormatArg *args; int argsLen, argsSize; GooStringFormatArg arg; @@ -284,7 +308,8 @@ GooStringFormatType ft; char buf[65]; int len, i; - char *p0, *p1, *str; + const char *p0, *p1; + char *str; argsLen = 0; argsSize = 8; @@ -322,6 +347,9 @@ for (; *p0 >= '0' && *p0 <= '9'; ++p0) { width = 10 * width + (*p0 - '0'); } + if (width < 0) { + width = 0; + } if (*p0 == '.') { ++p0; prec = 0; @@ -383,6 +411,22 @@ case fmtULongBinary: args[argsLen].ul = va_arg(argList, Gulong); break; +#ifdef LLONG_MAX + case fmtLongLongDecimal: + case fmtLongLongHex: + case fmtLongLongOctal: + case fmtLongLongBinary: + args[argsLen].ll = va_arg(argList, long long); + break; +#endif +#ifdef ULLONG_MAX + case fmtULongLongDecimal: + case fmtULongLongHex: + case fmtULongLongOctal: + case fmtULongLongBinary: + args[argsLen].ull = va_arg(argList, unsigned long long); + break; +#endif case fmtDouble: case fmtDoubleTrim: case fmtDoubleTrimSmallAware: @@ -456,6 +500,38 @@ case fmtULongBinary: formatUInt(arg.ul, buf, sizeof(buf), zeroFill, width, 2, &str, &len); break; +#ifdef LLONG_MAX + case fmtLongLongDecimal: + formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 10, &str, &len); + break; + case fmtLongLongHex: + formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 16, &str, &len); + break; + case fmtLongLongOctal: + formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 8, &str, &len); + break; + case fmtLongLongBinary: + formatInt(arg.ll, buf, sizeof(buf), zeroFill, width, 2, &str, &len); + break; +#endif +#ifdef ULLONG_MAX + case fmtULongLongDecimal: + formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 10, + &str, &len); + break; + case fmtULongLongHex: + formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 16, + &str, &len); + break; + case fmtULongLongOctal: + formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 8, + &str, &len); + break; + case fmtULongLongBinary: + formatUInt(arg.ull, buf, sizeof(buf), zeroFill, width, 2, + &str, &len); + break; +#endif case fmtDouble: formatDouble(arg.f, buf, sizeof(buf), prec, gFalse, &str, &len); break; @@ -519,10 +595,15 @@ gfree(args); return this; } - +#ifdef LLONG_MAX +void GooString::formatInt(long long x, char *buf, int bufSize, + GBool zeroFill, int width, int base, + char **p, int *len) { +#else void GooString::formatInt(long x, char *buf, int bufSize, - GBool zeroFill, int width, int base, - char **p, int *len) { + GBool zeroFill, int width, int base, + char **p, int *len) { +#endif static char vals[17] = "0123456789abcdef"; GBool neg; int start, i, j; @@ -552,9 +633,15 @@ *len = bufSize - i; } +#ifdef ULLONG_MAX +void GooString::formatUInt(unsigned long long x, char *buf, int bufSize, + GBool zeroFill, int width, int base, + char **p, int *len) { +#else void GooString::formatUInt(Gulong x, char *buf, int bufSize, - GBool zeroFill, int width, int base, - char **p, int *len) { + GBool zeroFill, int width, int base, + char **p, int *len) { +#endif static char vals[17] = "0123456789abcdef"; int i, j; @@ -585,7 +672,7 @@ if ((neg = x < 0)) { x = -x; } - x = floor(x * pow((double)10, prec) + 0.5); + x = floor(x * pow(10.0, prec) + 0.5); i = bufSize; started = !trim; for (j = 0; j < prec && i > 1; ++j) { @@ -655,7 +742,7 @@ GooString *GooString::del(int i, int n) { int j; - if (n > 0) { + if (i >= 0 && n > 0 && i + n > 0) { if (i + n > length) { n = length - i; } diff -Nru poppler-0.18.4/goo/GooString.h poppler-0.20.5/goo/GooString.h --- poppler-0.18.4/goo/GooString.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/GooString.h 2012-06-11 13:19:41.000000000 +0000 @@ -17,7 +17,7 @@ // // Copyright (C) 2006 Kristian Høgsberg // Copyright (C) 2006 Krzysztof Kowalczyk -// Copyright (C) 2008-2010 Albert Astals Cid +// Copyright (C) 2008-2010, 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -31,6 +31,7 @@ #pragma interface #endif +#include // for LLONG_MAX and ULLONG_MAX #include #include // for NULL #include "gtypes.h" @@ -82,14 +83,16 @@ // d, x, o, b -- int in decimal, hex, octal, binary // ud, ux, uo, ub -- unsigned int // ld, lx, lo, lb, uld, ulx, ulo, ulb -- long, unsigned long + // lld, llx, llo, llb, ulld, ullx, ullo, ullb + // -- long long, unsigned long long // f, g -- double // c -- char // s -- string (char *) // t -- GooString * // w -- blank space; arg determines width // To get literal curly braces, use {{ or }}. - static GooString *format(char *fmt, ...); - static GooString *formatv(char *fmt, va_list argList); + static GooString *format(const char *fmt, ...); + static GooString *formatv(const char *fmt, va_list argList); // Destructor. ~GooString(); @@ -115,8 +118,8 @@ GooString *append(const char *str, int lengthA=CALC_STRING_LEN); // Append a formatted string. - GooString *appendf(char *fmt, ...); - GooString *appendfv(char *fmt, va_list argList); + GooString *appendf(const char *fmt, ...); + GooString *appendfv(const char *fmt, va_list argList); // Insert a character or string. GooString *insert(int i, char c); @@ -164,12 +167,24 @@ char *s; void resize(int newLength); +#ifdef LLONG_MAX + static void formatInt(long long x, char *buf, int bufSize, + GBool zeroFill, int width, int base, + char **p, int *len); +#else static void formatInt(long x, char *buf, int bufSize, GBool zeroFill, int width, int base, char **p, int *len); +#endif +#ifdef ULLONG_MAX + static void formatUInt(unsigned long long x, char *buf, int bufSize, + GBool zeroFill, int width, int base, + char **p, int *len); +#else static void formatUInt(Gulong x, char *buf, int bufSize, GBool zeroFill, int width, int base, char **p, int *len); +#endif static void formatDouble(double x, char *buf, int bufSize, int prec, GBool trim, char **p, int *len); static void formatDoubleSmallAware(double x, char *buf, int bufSize, int prec, diff -Nru poppler-0.18.4/goo/GooTimer.h poppler-0.20.5/goo/GooTimer.h --- poppler-0.18.4/goo/GooTimer.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/GooTimer.h 2012-08-15 13:31:38.000000000 +0000 @@ -19,7 +19,7 @@ #pragma interface #endif -#include "poppler/poppler-config.h" +#include "poppler-config.h" #include "gtypes.h" #ifdef HAVE_GETTIMEOFDAY #include diff -Nru poppler-0.18.4/goo/JpegWriter.cc poppler-0.20.5/goo/JpegWriter.cc --- poppler-0.18.4/goo/JpegWriter.cc 2012-02-15 17:08:01.000000000 +0000 +++ poppler-0.20.5/goo/JpegWriter.cc 2012-05-10 20:05:44.000000000 +0000 @@ -25,7 +25,7 @@ (*cinfo->err->format_message) (cinfo, buffer); // Send it to poppler's error handler - error(-1, "%s", buffer); + error(errInternal, -1, "{0:s}", buffer); } JpegWriter::JpegWriter(int q, bool p, J_COLOR_SPACE cm) diff -Nru poppler-0.18.4/goo/JpegWriter.h poppler-0.20.5/goo/JpegWriter.h --- poppler-0.18.4/goo/JpegWriter.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/JpegWriter.h 2012-08-15 13:31:38.000000000 +0000 @@ -17,7 +17,7 @@ #ifndef JPEGWRITER_H #define JPEGWRITER_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #ifdef ENABLE_LIBJPEG diff -Nru poppler-0.18.4/goo/Makefile.am poppler-0.20.5/goo/Makefile.am --- poppler-0.18.4/goo/Makefile.am 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/Makefile.am 2012-09-08 16:07:00.000000000 +0000 @@ -22,12 +22,27 @@ endif +if BUILD_LIBJPEG +libjpeg_includes = $(LIBJPEG_CFLAGS) +endif + +if BUILD_LIBTIFF +libtiff_includes = $(LIBTIFF_CFLAGS) +endif + +if BUILD_LIBOPENJPEG +libjpeg2000_includes = $(LIBOPENJPEG_CFLAGS) +endif + if BUILD_LIBPNG libpng_includes = $(LIBPNG_CFLAGS) endif INCLUDES = \ -I$(top_srcdir) \ + $(libjpeg_includes) \ + $(libtiff_includes) \ + $(libjpeg2000_includes) \ $(libpng_includes) libgoo_la_SOURCES = \ diff -Nru poppler-0.18.4/goo/Makefile.in poppler-0.20.5/goo/Makefile.in --- poppler-0.18.4/goo/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/goo/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -59,8 +76,8 @@ GooTimer.lo GooString.lo gmem.lo FixedPoint.lo PNGWriter.lo \ JpegWriter.lo TiffWriter.lo ImgWriter.lo gstrtod.lo libgoo_la_OBJECTS = $(am_libgoo_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -72,18 +89,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -91,21 +108,26 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libgoo_la_SOURCES) DIST_SOURCES = $(libgoo_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__poppler_goo_include_HEADERS_DIST = GooHash.h GooList.h GooTimer.h \ GooMutex.h GooString.h gtypes.h gmem.h gfile.h FixedPoint.h \ PNGWriter.h JpegWriter.h TiffWriter.h ImgWriter.h GooLikely.h \ @@ -131,6 +153,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(poppler_goo_includedir)" HEADERS = $(poppler_goo_include_HEADERS) ETAGS = etags @@ -208,12 +236,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -267,6 +299,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -350,9 +383,15 @@ @ENABLE_XPDF_HEADERS_TRUE@ GooLikely.h \ @ENABLE_XPDF_HEADERS_TRUE@ gstrtod.h +@BUILD_LIBJPEG_TRUE@libjpeg_includes = $(LIBJPEG_CFLAGS) +@BUILD_LIBTIFF_TRUE@libtiff_includes = $(LIBTIFF_CFLAGS) +@BUILD_LIBOPENJPEG_TRUE@libjpeg2000_includes = $(LIBOPENJPEG_CFLAGS) @BUILD_LIBPNG_TRUE@libpng_includes = $(LIBPNG_CFLAGS) INCLUDES = \ -I$(top_srcdir) \ + $(libjpeg_includes) \ + $(libtiff_includes) \ + $(libjpeg2000_includes) \ $(libpng_includes) libgoo_la_SOURCES = \ @@ -414,7 +453,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libgoo.la: $(libgoo_la_OBJECTS) $(libgoo_la_DEPENDENCIES) +libgoo.la: $(libgoo_la_OBJECTS) $(libgoo_la_DEPENDENCIES) $(EXTRA_libgoo_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libgoo_la_OBJECTS) $(libgoo_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -440,26 +479,23 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -468,8 +504,11 @@ -rm -rf .libs _libs install-poppler_goo_includeHEADERS: $(poppler_goo_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_goo_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_goo_includedir)" @list='$(poppler_goo_include_HEADERS)'; test -n "$(poppler_goo_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_goo_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_goo_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -483,9 +522,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_goo_include_HEADERS)'; test -n "$(poppler_goo_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_goo_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_goo_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_goo_includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -586,10 +623,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/goo/PNGWriter.cc poppler-0.20.5/goo/PNGWriter.cc --- poppler-0.18.4/goo/PNGWriter.cc 2011-12-06 22:22:47.000000000 +0000 +++ poppler-0.20.5/goo/PNGWriter.cc 2012-05-10 20:05:44.000000000 +0000 @@ -67,25 +67,25 @@ /* initialize stuff */ png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); if (!png_ptr) { - error(-1, "png_create_write_struct failed"); + error(errInternal, -1, "png_create_write_struct failed"); return false; } info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { - error(-1, "png_create_info_struct failed"); + error(errInternal, -1, "png_create_info_struct failed"); return false; } if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "png_jmpbuf failed"); + error(errInternal, -1, "png_jmpbuf failed"); return false; } /* write header */ png_init_io(png_ptr, f); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "Error during writing header"); + error(errInternal, -1, "Error during writing header"); return false; } @@ -126,7 +126,7 @@ png_write_info(png_ptr, info_ptr); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "error during writing png info bytes"); + error(errInternal, -1, "error during writing png info bytes"); return false; } @@ -142,7 +142,7 @@ png_write_image(png_ptr, rowPointers); /* write bytes */ if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "Error during writing bytes"); + error(errInternal, -1, "Error during writing bytes"); return false; } @@ -154,7 +154,7 @@ // Write the row to the file png_write_rows(png_ptr, row, 1); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "error during png row write"); + error(errInternal, -1, "error during png row write"); return false; } @@ -166,7 +166,7 @@ /* end write */ png_write_end(png_ptr, info_ptr); if (setjmp(png_jmpbuf(png_ptr))) { - error(-1, "Error during end of write"); + error(errInternal, -1, "Error during end of write"); return false; } diff -Nru poppler-0.18.4/goo/PNGWriter.h poppler-0.20.5/goo/PNGWriter.h --- poppler-0.18.4/goo/PNGWriter.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/PNGWriter.h 2012-08-15 13:31:38.000000000 +0000 @@ -15,7 +15,7 @@ #ifndef PNGWRITER_H #define PNGWRITER_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #ifdef ENABLE_LIBPNG diff -Nru poppler-0.18.4/goo/TiffWriter.h poppler-0.20.5/goo/TiffWriter.h --- poppler-0.18.4/goo/TiffWriter.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/TiffWriter.h 2012-08-15 13:31:38.000000000 +0000 @@ -12,7 +12,7 @@ #ifndef TIFFWRITER_H #define TIFFWRITER_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #ifdef ENABLE_LIBTIFF diff -Nru poppler-0.18.4/goo/gfile.cc poppler-0.20.5/goo/gfile.cc --- poppler-0.18.4/goo/gfile.cc 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/gfile.cc 2012-06-11 13:19:41.000000000 +0000 @@ -39,6 +39,7 @@ # include # include # endif +# include # include # include # if !defined(VMS) && !defined(ACORN) && !defined(MACOS) @@ -123,7 +124,7 @@ return new GooString(); } -GooString *appendToPath(GooString *path, char *fileName) { +GooString *appendToPath(GooString *path, const char *fileName) { #if defined(VMS) //---------- VMS ---------- //~ this should handle everything necessary for file @@ -458,7 +459,7 @@ #endif } -GBool openTempFile(GooString **name, FILE **f, char *mode) { +GBool openTempFile(GooString **name, FILE **f, const char *mode) { #if defined(_WIN32) //---------- Win32 ---------- char *tempDir; @@ -476,11 +477,11 @@ } else { s = new GooString(); } - s->append("x"); + s->appendf("x_{0:d}_{1:d}_", + (int)GetCurrentProcessId(), (int)GetCurrentThreadId()); t = (int)time(NULL); for (i = 0; i < 1000; ++i) { - sprintf(buf, "%d", t + i); - s2 = s->copy()->append(buf); + s2 = s->copy()->appendf("{0:d}", t + i); if (!(f2 = fopen(s2->getCString(), "r"))) { if (!(f2 = fopen(s2->getCString(), mode))) { delete s2; @@ -511,6 +512,7 @@ *name = new GooString(s); if (!(*f = fopen((*name)->getCString(), mode))) { delete (*name); + *name = NULL; return gFalse; } return gTrue; @@ -536,6 +538,7 @@ #endif // HAVE_MKSTEMP if (fd < 0 || !(*f = fdopen(fd, mode))) { delete *name; + *name = NULL; return gFalse; } return gTrue; @@ -550,6 +553,107 @@ #endif } +#ifdef WIN32 +GooString *fileNameToUTF8(char *path) { + GooString *s; + char *p; + + s = new GooString(); + for (p = path; *p; ++p) { + if (*p & 0x80) { + s->append((char)(0xc0 | ((*p >> 6) & 0x03))); + s->append((char)(0x80 | (*p & 0x3f))); + } else { + s->append(*p); + } + } + return s; +} + +GooString *fileNameToUTF8(wchar_t *path) { + GooString *s; + wchar_t *p; + + s = new GooString(); + for (p = path; *p; ++p) { + if (*p < 0x80) { + s->append((char)*p); + } else if (*p < 0x800) { + s->append((char)(0xc0 | ((*p >> 6) & 0x1f))); + s->append((char)(0x80 | (*p & 0x3f))); + } else { + s->append((char)(0xe0 | ((*p >> 12) & 0x0f))); + s->append((char)(0x80 | ((*p >> 6) & 0x3f))); + s->append((char)(0x80 | (*p & 0x3f))); + } + } + return s; +} +#endif + +FILE *openFile(const char *path, const char *mode) { +#ifdef WIN32 + OSVERSIONINFO version; + wchar_t wPath[_MAX_PATH + 1]; + char nPath[_MAX_PATH + 1]; + wchar_t wMode[8]; + const char *p; + int i; + + // NB: _wfopen is only available in NT + version.dwOSVersionInfoSize = sizeof(version); + GetVersionEx(&version); + if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { + for (p = path, i = 0; *p && i < _MAX_PATH; ++i) { + if ((p[0] & 0xe0) == 0xc0 && + p[1] && (p[1] & 0xc0) == 0x80) { + wPath[i] = (wchar_t)(((p[0] & 0x1f) << 6) | + (p[1] & 0x3f)); + p += 2; + } else if ((p[0] & 0xf0) == 0xe0 && + p[1] && (p[1] & 0xc0) == 0x80 && + p[2] && (p[2] & 0xc0) == 0x80) { + wPath[i] = (wchar_t)(((p[0] & 0x0f) << 12) | + ((p[1] & 0x3f) << 6) | + (p[2] & 0x3f)); + p += 3; + } else { + wPath[i] = (wchar_t)(p[0] & 0xff); + p += 1; + } + } + wPath[i] = (wchar_t)0; + for (i = 0; mode[i] && i < sizeof(mode) - 1; ++i) { + wMode[i] = (wchar_t)(mode[i] & 0xff); + } + wMode[i] = (wchar_t)0; + return _wfopen(wPath, wMode); + } else { + for (p = path, i = 0; *p && i < _MAX_PATH; ++i) { + if ((p[0] & 0xe0) == 0xc0 && + p[1] && (p[1] & 0xc0) == 0x80) { + nPath[i] = (char)(((p[0] & 0x1f) << 6) | + (p[1] & 0x3f)); + p += 2; + } else if ((p[0] & 0xf0) == 0xe0 && + p[1] && (p[1] & 0xc0) == 0x80 && + p[2] && (p[2] & 0xc0) == 0x80) { + nPath[i] = (char)(((p[1] & 0x3f) << 6) | + (p[2] & 0x3f)); + p += 3; + } else { + nPath[i] = p[0]; + p += 1; + } + } + nPath[i] = '\0'; + return fopen(nPath, mode); + } +#else + return fopen(path, mode); +#endif +} + char *getLine(char *buf, int size, FILE *f) { int c, i; diff -Nru poppler-0.18.4/goo/gfile.h poppler-0.20.5/goo/gfile.h --- poppler-0.18.4/goo/gfile.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/gfile.h 2012-08-15 13:31:38.000000000 +0000 @@ -27,7 +27,7 @@ #ifndef GFILE_H #define GFILE_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #include #include #include @@ -79,7 +79,7 @@ // Append a file name to a path string. may be an empty // string, denoting the current directory). Returns . -extern GooString *appendToPath(GooString *path, char *fileName); +extern GooString *appendToPath(GooString *path, const char *fileName); // Grab the path from the front of the file name. If there is no // directory component in , returns an empty string. @@ -102,11 +102,24 @@ // should be done to the returned file pointer; the file may be // reopened later for reading, but not for writing. The string // should be "w" or "wb". Returns true on success. -extern GBool openTempFile(GooString **name, FILE **f, char *mode); +extern GBool openTempFile(GooString **name, FILE **f, const char *mode); // Execute . Returns true on success. extern GBool executeCommand(char *cmd); +#ifdef WIN32 +// Convert a file name from Latin-1 to UTF-8. +extern GooString *fileNameToUTF8(char *path); + +// Convert a file name from UCS-2 to UTF-8. +extern GooString *fileNameToUTF8(wchar_t *path); +#endif + +// Open a file. On Windows, this converts the path from UTF-8 to +// UCS-2 and calls _wfopen (if available). On other OSes, this simply +// calls fopen. +extern FILE *openFile(const char *path, const char *mode); + // Just like fgets, but handles Unix, Mac, and/or DOS end-of-line // conventions. extern char *getLine(char *buf, int size, FILE *f); diff -Nru poppler-0.18.4/goo/gmem.cc poppler-0.20.5/goo/gmem.cc --- poppler-0.18.4/goo/gmem.cc 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/gmem.cc 2012-05-10 20:05:44.000000000 +0000 @@ -71,7 +71,12 @@ void *data; unsigned long *trl, *p; - if (size <= 0) { + if (size < 0) { + fprintf(stderr, "Invalid memory allocation size\n"); + if (checkoverflow) return NULL; + else exit(1); + } + if (size == 0) { return NULL; } size1 = gMemDataSize(size); @@ -104,7 +109,12 @@ #else void *p; - if (size <= 0) { + if (size < 0) { + fprintf(stderr, "Invalid memory allocation size\n"); + if (checkoverflow) return NULL; + else exit(1); + } + if (size == 0) { return NULL; } if (!(p = malloc(size))) { @@ -130,7 +140,12 @@ void *q; int oldSize; - if (size <= 0) { + if (size < 0) { + fprintf(stderr, "Invalid memory allocation size\n"); + if (checkoverflow) return NULL; + else exit(1); + } + if (size == 0) { if (p) { gfree(p); } @@ -149,7 +164,12 @@ #else void *q; - if (size <= 0) { + if (size < 0) { + fprintf(stderr, "Invalid memory allocation size\n"); + if (checkoverflow) return NULL; + else exit(1); + } + if (size == 0) { if (p) { free(p); } @@ -310,7 +330,7 @@ } #endif -char *copyString(char *s) { +char *copyString(const char *s) { char *s1; s1 = (char *)gmalloc(strlen(s) + 1); diff -Nru poppler-0.18.4/goo/gmem.h poppler-0.20.5/goo/gmem.h --- poppler-0.18.4/goo/gmem.h 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/gmem.h 2012-08-15 13:31:38.000000000 +0000 @@ -26,7 +26,7 @@ #define GMEM_H #include -#include "poppler/poppler-config.h" +#include "poppler-config.h" #ifdef __cplusplus extern "C" { @@ -78,7 +78,7 @@ /* * Allocate memory and copy a string into it. */ -extern char *copyString(char *s); +extern char *copyString(const char *s); /* * Allocate memory and copy a limited-length string to it. diff -Nru poppler-0.18.4/goo/gstrtod.cc poppler-0.20.5/goo/gstrtod.cc --- poppler-0.18.4/goo/gstrtod.cc 2011-11-22 21:33:06.000000000 +0000 +++ poppler-0.20.5/goo/gstrtod.cc 2012-08-15 13:31:38.000000000 +0000 @@ -1,6 +1,6 @@ /* This file is part of Libspectre. * - * Copyright (C) 2007 Albert Astals Cid + * Copyright (C) 2007, 2012 Albert Astals Cid * Copyright (C) 2007 Carlos Garcia Campos * * Libspectre is free software; you can redistribute it and/or modify @@ -22,10 +22,10 @@ #include "gstrtod.h" -#include -#include -#include -#include +#include +#include +#include +#include #define ascii_isspace(c) \ (c == ' ' || c == '\f' || c == '\n' || c == '\r' || c == '\t' || c == '\v') diff -Nru poppler-0.18.4/install-sh poppler-0.20.5/install-sh --- poppler-0.18.4/install-sh 2011-11-22 21:37:10.000000000 +0000 +++ poppler-0.20.5/install-sh 2012-10-10 17:34:06.000000000 +0000 @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2009-04-28.21; # UTC +scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -156,6 +156,10 @@ -s) stripcmd=$stripprog;; -t) dst_arg=$2 + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac shift;; -T) no_target_directory=true;; @@ -186,6 +190,10 @@ fi shift # arg dst_arg=$arg + # Protect names problematic for `test' and other utilities. + case $dst_arg in + -* | [=\(\)!]) dst_arg=./$dst_arg;; + esac done fi @@ -200,7 +208,11 @@ fi if test -z "$dir_arg"; then - trap '(exit $?); exit' 1 2 13 15 + do_exit='(exit $ret); exit $ret' + trap "ret=129; $do_exit" 1 + trap "ret=130; $do_exit" 2 + trap "ret=141; $do_exit" 13 + trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. @@ -228,9 +240,9 @@ for src do - # Protect names starting with `-'. + # Protect names problematic for `test' and other utilities. case $src in - -*) src=./$src;; + -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then @@ -252,12 +264,7 @@ echo "$0: no destination specified." >&2 exit 1 fi - dst=$dst_arg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst;; - esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. @@ -385,7 +392,7 @@ case $dstdir in /*) prefix='/';; - -*) prefix='./';; + [-=\(\)!]*) prefix='./';; *) prefix='';; esac @@ -403,7 +410,7 @@ for d do - test -z "$d" && continue + test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then diff -Nru poppler-0.18.4/ltmain.sh poppler-0.20.5/ltmain.sh --- poppler-0.18.4/ltmain.sh 2011-11-22 21:37:09.000000000 +0000 +++ poppler-0.20.5/ltmain.sh 2012-06-10 18:43:14.000000000 +0000 @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION=2.4.2 +VERSION="2.4.2 Debian-2.4.2-1ubuntu1" TIMESTAMP="" package_revision=1.3337 @@ -6124,7 +6124,10 @@ case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; + link) + libs="$deplibs %DEPLIBS%" + test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" + ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then @@ -6444,19 +6447,19 @@ # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" + tmp_libs= + for deplib in $dependency_libs; do + deplibs="$deplib $deplibs" + if $opt_preserve_dup_deps ; then + case "$tmp_libs " in + *" $deplib "*) func_append specialdeplibs " $deplib" ;; + esac + fi + func_append tmp_libs " $deplib" + done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if $opt_preserve_dup_deps ; then - case "$tmp_libs " in - *" $deplib "*) func_append specialdeplibs " $deplib" ;; - esac - fi - func_append tmp_libs " $deplib" - done continue fi # $pass = conv @@ -7349,6 +7352,9 @@ revision="$number_minor" lt_irix_increment=no ;; + *) + func_fatal_configuration "$modename: unknown library version type \`$version_type'" + ;; esac ;; no) diff -Nru poppler-0.18.4/m4/libjpeg.m4 poppler-0.20.5/m4/libjpeg.m4 --- poppler-0.18.4/m4/libjpeg.m4 2011-11-22 21:33:08.000000000 +0000 +++ poppler-0.20.5/m4/libjpeg.m4 2012-05-10 20:05:44.000000000 +0000 @@ -68,7 +68,13 @@ dnl then search the headers (can't use simply AC_TRY_xxx, as jpeglib.h dnl requires system dependent includes loaded before it) +ac_save_CPPFLAGS="$CPPFLAGS" +ac_save_CFLAGS="$CFLAGS" +CPPFLAGS="$CFLAGS $all_includes $USER_INCLUDES" +CFLAGS="$CFLAGS $all_includes $USER_INCLUDES" AC_CHECK_HEADER([jpeglib.h], [jpeg_incdir=yes], [jpeg_incdir=NO]) +CPPFLAGS="$ac_save_CPPFLAGS" +CFLAGS="$ac_save_CFLAGS" test "x$jpeg_incdir" = xNO && jpeg_incdir= dnl if headers _and_ libraries are missing, this is no error, and we diff -Nru poppler-0.18.4/m4/libtool.m4 poppler-0.20.5/m4/libtool.m4 --- poppler-0.18.4/m4/libtool.m4 2011-11-22 21:33:08.000000000 +0000 +++ poppler-0.20.5/m4/libtool.m4 2012-06-10 18:43:14.000000000 +0000 @@ -2684,6 +2684,18 @@ dynamic_linker='GNU/Linux ld.so' ;; +netbsdelf*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='NetBSD ld.elf_so' + ;; + netbsd*) version_type=sunos need_lib_prefix=no @@ -3289,7 +3301,7 @@ lt_cv_deplibs_check_method=pass_all ;; -netbsd*) +netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else @@ -4101,7 +4113,7 @@ ;; esac ;; - netbsd*) + netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise @@ -4578,6 +4590,9 @@ ;; esac ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; @@ -4640,6 +4655,9 @@ openbsd*) with_gnu_ld=no ;; + linux* | k*bsd*-gnu | gnu*) + _LT_TAGVAR(link_all_deplibs, $1)=no + ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes @@ -4861,7 +4879,7 @@ fi ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= @@ -5038,6 +5056,7 @@ if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi + _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then @@ -5342,7 +5361,7 @@ _LT_TAGVAR(link_all_deplibs, $1)=yes ;; - netbsd*) + netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else diff -Nru poppler-0.18.4/missing poppler-0.20.5/missing --- poppler-0.18.4/missing 2011-11-22 21:37:10.000000000 +0000 +++ poppler-0.20.5/missing 2012-06-10 18:43:18.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Common stub for a few missing GNU programs while installing. -scriptversion=2009-04-28.21; # UTC +scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009 Free Software Foundation, Inc. +# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify @@ -84,7 +84,6 @@ help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and @@ -122,15 +121,6 @@ # Not GNU programs, they don't have --version. ;; - tar*) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. @@ -226,7 +216,7 @@ \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` @@ -256,7 +246,7 @@ \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then - eval LASTARG="\${$#}" + eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` @@ -318,41 +308,6 @@ touch $file ;; - tar*) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case $firstarg in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case $firstarg in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. diff -Nru poppler-0.18.4/poppler/Annot.cc poppler-0.20.5/poppler/Annot.cc --- poppler-0.18.4/poppler/Annot.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/Annot.cc 2012-09-21 19:16:53.000000000 +0000 @@ -15,7 +15,7 @@ // // Copyright (C) 2006 Scott Turner // Copyright (C) 2007, 2008 Julien Rebetez -// Copyright (C) 2007-2011 Albert Astals Cid +// Copyright (C) 2007-2012 Albert Astals Cid // Copyright (C) 2007-2011 Carlos Garcia Campos // Copyright (C) 2007, 2008 Iñigo Martínez // Copyright (C) 2007 Jeff Muizelaar @@ -24,6 +24,8 @@ // Copyright (C) 2008 Hugo Mercier // Copyright (C) 2009 Ilya Gorenbein // Copyright (C) 2011 José Aliste +// Copyright (C) 2012 Fabio D'Urso +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -47,6 +49,7 @@ #include "Catalog.h" #include "Gfx.h" #include "Lexer.h" +#include "PDFDoc.h" #include "Page.h" #include "Annot.h" #include "GfxFont.h" @@ -91,10 +94,6 @@ // = (4 * (sqrt(2) - 1) / 3) * r #define bezierCircle 0.55228475 -// Ensures that x is between the limits set by low and high. -// If low is greater than high the result is undefined. -#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) - AnnotLineEndingStyle parseAnnotLineEndingStyle(GooString *string) { if (string != NULL) { if (!string->cmp("Square")) { @@ -123,6 +122,31 @@ } } +const char* convertAnnotLineEndingStyle(AnnotLineEndingStyle style) { + switch (style) { + case annotLineEndingSquare: + return "Square"; + case annotLineEndingCircle: + return "Circle"; + case annotLineEndingDiamond: + return "Diamond"; + case annotLineEndingOpenArrow: + return "OpenArrow"; + case annotLineEndingClosedArrow: + return "ClosedArrow"; + case annotLineEndingButt: + return "Butt"; + case annotLineEndingROpenArrow: + return "ROpenArrow"; + case annotLineEndingRClosedArrow: + return "RClosedArrow"; + case annotLineEndingSlash: + return "Slash"; + default: + return "None"; + } +} + static AnnotExternalDataType parseAnnotExternalData(Dict* dict) { Object obj1; AnnotExternalDataType type; @@ -251,7 +275,7 @@ GBool correct = gTrue; if (array->getLength() % 2) { - error(-1, "Bad Annot Path"); + error(errSyntaxError, -1, "Bad Annot Path"); return; } @@ -334,14 +358,11 @@ for (int j = 0; j < 8; j++) { Object obj; if (array->get(i * 8 + j, &obj)->isNum()) { - if (j % 2 == 1) - quadArray[j] = CLAMP (obj.getNum(), rect->y1, rect->y2); - else - quadArray[j] = CLAMP (obj.getNum(), rect->x1, rect->x2); + quadArray[j] = obj.getNum(); } else { correct = gFalse; obj.free(); - error (-1, "Invalid QuadPoint in annot"); + error (errSyntaxError, -1, "Invalid QuadPoint in annot"); break; } obj.free(); @@ -367,6 +388,11 @@ } } +AnnotQuadrilaterals::AnnotQuadrilaterals(AnnotQuadrilaterals::AnnotQuadrilateral **quads, int quadsLength) { + quadrilaterals = quads; + quadrilateralsLength = quadsLength; +} + AnnotQuadrilaterals::~AnnotQuadrilaterals() { if (quadrilaterals) { for(int i = 0; i < quadrilateralsLength; i++) @@ -525,6 +551,16 @@ } } +void AnnotBorderArray::writeToObject(XRef *xref, Object *obj1) const { + Object obj2; + + obj1->initArray(xref); + obj1->arrayAdd(obj2.initReal( horizontalCorner )); + obj1->arrayAdd(obj2.initReal( verticalCorner )); + obj1->arrayAdd(obj2.initReal( width )); + // TODO: Dash array +} + //------------------------------------------------------------------------ // AnnotBorderBS //------------------------------------------------------------------------ @@ -657,6 +693,19 @@ } } +void AnnotColor::writeToObject(XRef *xref, Object *obj1) const { + Object obj2; + int i; + + if (length == 0) { + obj1->initNull(); // Transparent (no color) + } else { + obj1->initArray(xref); + for (i = 0; i < length; ++i) + obj1->arrayAdd( obj2.initReal( values[i] ) ); + } +} + //------------------------------------------------------------------------ // AnnotIconFit //------------------------------------------------------------------------ @@ -721,6 +770,181 @@ } //------------------------------------------------------------------------ +// AnnotAppearance +//------------------------------------------------------------------------ + +AnnotAppearance::AnnotAppearance(PDFDoc *docA, Object *dict) { + assert(dict->isDict()); + doc = docA; + xref = docA->getXRef(); + dict->copy(&appearDict); +} + +AnnotAppearance::~AnnotAppearance() { + appearDict.free(); +} + +void AnnotAppearance::getAppearanceStream(AnnotAppearance::AnnotAppearanceType type, const char *state, Object *dest) { + Object apData, stream; + apData.initNull(); + + // Obtain dictionary or stream associated to appearance type + if (type == appearRollover) { + appearDict.dictLookupNF("R", &apData); + } else if (type == appearDown) { + appearDict.dictLookupNF("D", &apData); + } + if (apData.isNull()) { // Normal appearance, also used as fallback + appearDict.dictLookupNF("N", &apData); + } + + // Search state if it's a subdictionary + if (apData.isDict() && state) { + Object obj1; + apData.dictLookupNF(state, &obj1); + apData.free(); + obj1.copy(&apData); + obj1.free(); + } + + dest->initNull(); + // Sanity check on the value we are about to return: it must be a ref to stream + if (apData.isRef()) { + apData.fetch(xref, &stream); + if (stream.isStream()) { + apData.copy(dest); + } else { + error(errSyntaxWarning, -1, "AP points to a non-stream object"); + } + stream.free(); + } + apData.free(); +} + +GooString * AnnotAppearance::getStateKey(int i) { + Object obj1; + GooString * res = NULL; + appearDict.dictLookupNF("N", &obj1); + if (obj1.isDict()) { + res = new GooString(obj1.dictGetKey(i)); + } + obj1.free(); + return res; +} + +int AnnotAppearance::getNumStates() { + Object obj1; + int res = 0; + appearDict.dictLookupNF("N", &obj1); + if (obj1.isDict()) { + res = obj1.dictGetLength(); + } + obj1.free(); + return res; +} + +// Test if stateObj (a Ref or a Dict) points to the specified stream +GBool AnnotAppearance::referencesStream(Object *stateObj, Ref refToStream) { + if (stateObj->isRef()) { + Ref r = stateObj->getRef(); + if (r.num == refToStream.num && r.gen == refToStream.gen) { + return gTrue; + } + } else if (stateObj->isDict()) { // Test each value + const int size = stateObj->dictGetLength(); + for (int i = 0; i < size; ++i) { + Object obj1; + stateObj->dictGetValNF(i, &obj1); + if (obj1.isRef()) { + Ref r = obj1.getRef(); + if (r.num == refToStream.num && r.gen == refToStream.gen) { + return gTrue; + } + } + obj1.free(); + } + } + return gFalse; // Not found +} + +// Test if this AnnotAppearance references the specified stream +GBool AnnotAppearance::referencesStream(Ref refToStream) { + Object obj1; + GBool found; + + // Scan each state's ref/subdictionary + appearDict.dictLookupNF("N", &obj1); + found = referencesStream(&obj1, refToStream); + obj1.free(); + if (found) + return gTrue; + + appearDict.dictLookupNF("R", &obj1); + found = referencesStream(&obj1, refToStream); + obj1.free(); + if (found) + return gTrue; + + appearDict.dictLookupNF("D", &obj1); + found = referencesStream(&obj1, refToStream); + obj1.free(); + return found; +} + +// If this is the only annotation in the document that references the +// specified appearance stream, remove the appearance stream +void AnnotAppearance::removeStream(Ref refToStream) { + const int lastpage = doc->getNumPages(); + for (int pg = 1; pg <= lastpage; ++pg) { // Scan all annotations in the document + Page *page = doc->getPage(pg); + if (!page) { + error(errSyntaxError, -1, "Failed check for shared annotation stream at page {0:d}", pg); + continue; + } + Annots *annots = page->getAnnots(); + for (int i = 0; i < annots->getNumAnnots(); ++i) { + AnnotAppearance *annotAp = annots->getAnnot(i)->getAppearStreams(); + if (annotAp && annotAp != this && annotAp->referencesStream(refToStream)) { + return; // Another annotation points to the stream -> Don't delete it + } + } + } + + // TODO: stream resources (e.g. font), AP name tree + xref->removeIndirectObject(refToStream); +} + +// Removes stream if obj is a Ref, or removes pointed streams if obj is a Dict +void AnnotAppearance::removeStateStreams(Object *obj1) { + if (obj1->isRef()) { + removeStream(obj1->getRef()); + } else if (obj1->isDict()) { + const int size = obj1->dictGetLength(); + for (int i = 0; i < size; ++i) { + Object obj2; + obj1->dictGetValNF(i, &obj2); + if (obj2.isRef()) { + removeStream(obj2.getRef()); + } + obj2.free(); + } + } +} + +void AnnotAppearance::removeAllStreams() { + Object obj1; + appearDict.dictLookupNF("N", &obj1); + removeStateStreams(&obj1); + obj1.free(); + appearDict.dictLookupNF("R", &obj1); + removeStateStreams(&obj1); + obj1.free(); + appearDict.dictLookupNF("D", &obj1); + removeStateStreams(&obj1); + obj1.free(); +} + +//------------------------------------------------------------------------ // AnnotAppearanceCharacs //------------------------------------------------------------------------ @@ -805,17 +1029,70 @@ } //------------------------------------------------------------------------ +// AnnotAppearanceBBox +//------------------------------------------------------------------------ + +AnnotAppearanceBBox::AnnotAppearanceBBox(PDFRectangle *rect) { + origX = rect->x1; + origY = rect->y1; + borderWidth = 0; + + // Initially set the same size as rect + minX = 0; + minY = 0; + maxX = rect->x2 - rect->x1; + maxY = rect->y2 - rect->y1; +} + +void AnnotAppearanceBBox::extendTo(double x, double y) { + if (x < minX) { + minX = x; + } else if (x > maxX) { + maxX = x; + } + if (y < minY) { + minY = y; + } else if (y > maxY) { + maxY = y; + } +} + +void AnnotAppearanceBBox::getBBoxRect(double bbox[4]) const { + Object obj2; + bbox[0] = minX - borderWidth; + bbox[1] = minY - borderWidth; + bbox[2] = maxX + borderWidth; + bbox[3] = maxY + borderWidth; +} + +double AnnotAppearanceBBox::getPageXMin() const { + return origX + minX - borderWidth; +} + +double AnnotAppearanceBBox::getPageYMin() const { + return origY + minY - borderWidth; +} + +double AnnotAppearanceBBox::getPageXMax() const { + return origX + maxX + borderWidth; +} + +double AnnotAppearanceBBox::getPageYMax() const { + return origY + maxY + borderWidth; +} + +//------------------------------------------------------------------------ // Annot //------------------------------------------------------------------------ -Annot::Annot(XRef *xrefA, PDFRectangle *rectA, Catalog *catalog) { +Annot::Annot(PDFDoc *docA, PDFRectangle *rectA) { Object obj1; refCnt = 1; flags = flagUnknown; type = typeUnknown; - obj1.initArray (xrefA); + obj1.initArray (docA->getXRef()); Object obj2; obj1.arrayAdd (obj2.initReal (rectA->x1)); obj1.arrayAdd (obj2.initReal (rectA->y1)); @@ -823,26 +1100,26 @@ obj1.arrayAdd (obj2.initReal (rectA->y2)); obj2.free (); - annotObj.initDict (xrefA); + annotObj.initDict (docA->getXRef()); annotObj.dictSet ("Type", obj2.initName ("Annot")); annotObj.dictSet ("Rect", &obj1); // obj1 is owned by the dict - ref = xrefA->addIndirectObject (&annotObj); + ref = docA->getXRef()->addIndirectObject (&annotObj); - initialize (xrefA, annotObj.getDict(), catalog); + initialize (docA, annotObj.getDict()); } -Annot::Annot(XRef *xrefA, Dict *dict, Catalog* catalog) { +Annot::Annot(PDFDoc *docA, Dict *dict) { refCnt = 1; hasRef = false; flags = flagUnknown; type = typeUnknown; annotObj.initDict (dict); - initialize (xrefA, dict, catalog); + initialize (docA, dict); } -Annot::Annot(XRef *xrefA, Dict *dict, Catalog* catalog, Object *obj) { +Annot::Annot(PDFDoc *docA, Dict *dict, Object *obj) { refCnt = 1; if (obj->isRef()) { hasRef = gTrue; @@ -853,16 +1130,18 @@ flags = flagUnknown; type = typeUnknown; annotObj.initDict (dict); - initialize (xrefA, dict, catalog); + initialize (docA, dict); } -void Annot::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) { - Object asObj, obj1, obj2, obj3; +void Annot::initialize(PDFDoc *docA, Dict *dict) { + Object apObj, asObj, obj1, obj2; - appRef.num = 0; - appRef.gen = 65535; ok = gTrue; - xref = xrefA; + doc = docA; + xref = doc->getXRef(); + appearStreams = NULL; + appearBBox = NULL; + appearState = NULL; appearBuf = NULL; fontSize = 0; @@ -895,7 +1174,7 @@ } else { rect->x1 = rect->y1 = 0; rect->x2 = rect->y2 = 1; - error(-1, "Bad bounding box for annotation"); + error(errSyntaxError, -1, "Bad bounding box for annotation"); ok = gFalse; } obj1.free(); @@ -910,7 +1189,7 @@ if (dict->lookupNF("P", &obj1)->isRef()) { Ref ref = obj1.getRef(); - page = catalog ? catalog->findPage (ref.num, ref.gen) : -1; + page = doc->getCatalog()->findPage (ref.num, ref.gen); } else { page = 0; } @@ -938,40 +1217,35 @@ } obj1.free(); - if (dict->lookup("AP", &obj1)->isDict()) { - Object obj2; - - if (dict->lookup("AS", &obj2)->isName()) { - Object obj3; - - appearState = new GooString(obj2.getName()); - if (obj1.dictLookup("N", &obj3)->isDict()) { - Object obj4; - - if (obj3.dictLookupNF(appearState->getCString(), &obj4)->isRef()) { - obj4.copy(&appearance); - } else { - obj4.free(); - if (obj3.dictLookupNF("Off", &obj4)->isRef()) { - obj4.copy(&appearance); - } - } - obj4.free(); - } - obj3.free(); - } else { - obj2.free(); - - appearState = NULL; - if (obj1.dictLookupNF("N", &obj2)->isRef()) { - obj2.copy(&appearance); - } - } - obj2.free(); - } else { - appearState = NULL; + //----- get the annotation appearance dictionary + dict->lookup("AP", &apObj); + if (apObj.isDict()) { + appearStreams = new AnnotAppearance(doc, &apObj); + } + apObj.free(); + + //----- get the appearance state + dict->lookup("AS", &asObj); + if (asObj.isName()) { + appearState = new GooString(asObj.getName()); + } else if (appearStreams && appearStreams->getNumStates() != 0) { + error (errSyntaxError, -1, "Invalid or missing AS value in annotation containing one or more appearance subdictionaries"); + // AS value is required in this case, but if the + // N dictionary contains only one entry + // take it as default appearance. + if (appearStreams->getNumStates() == 1) { + appearState = appearStreams->getStateKey(0); + } + } + if (!appearState) { + appearState = new GooString("Off"); + } + asObj.free(); + + //----- get the annotation appearance + if (appearStreams) { + appearStreams->getAppearanceStream(AnnotAppearance::appearNormal, appearState->getCString(), &appearance); } - obj1.free(); //----- parse the border style if (dict->lookup("BS", &obj1)->isDict()) { @@ -1002,11 +1276,7 @@ } obj1.free(); - optContentConfig = catalog ? catalog->getOptContentConfig() : NULL; dict->lookupNF("OC", &oc); - if (!oc.isRef() && !oc.isNull()) { - error (-1, "Annotation OC value not null or dict: %i", oc.getType()); - } } void Annot::getRect(double *x1, double *y1, double *x2, double *y2) const { @@ -1016,18 +1286,52 @@ *y2 = rect->y2; } +void Annot::setRect(PDFRectangle *rect) { + setRect(rect->x1, rect->y1, rect->x2, rect->y2); +} + +void Annot::setRect(double x1, double y1, double x2, double y2) { + Object obj1, obj2; + + if (x1 < x2) { + rect->x1 = x1; + rect->x2 = x2; + } else { + rect->x1 = x2; + rect->x2 = x1; + } + + if (y1 < y2) { + rect->y1 = y1; + rect->y2 = y2; + } else { + rect->y1 = y2; + rect->y2 = y1; + } + + obj1.initArray (xref); + obj1.arrayAdd (obj2.initReal (rect->x1)); + obj1.arrayAdd (obj2.initReal (rect->y1)); + obj1.arrayAdd (obj2.initReal (rect->x2)); + obj1.arrayAdd (obj2.initReal (rect->y2)); + + update("Rect", &obj1); +} + GBool Annot::inRect(double x, double y) const { return rect->contains(x, y); } void Annot::update(const char *key, Object *value) { - /* Set M to current time */ - delete modified; - modified = timeToDateString(NULL); + /* Set M to current time, unless we are updating M itself */ + if (strcmp(key, "M") != 0) { + delete modified; + modified = timeToDateString(NULL); - Object obj1; - obj1.initString (modified->copy()); - annotObj.dictSet("M", &obj1); + Object obj1; + obj1.initString (modified->copy()); + annotObj.dictSet("M", &obj1); + } annotObj.dictSet(const_cast(key), value); @@ -1053,16 +1357,59 @@ update ("Contents", &obj1); } +void Annot::setName(GooString *new_name) { + delete name; + + if (new_name) { + name = new GooString(new_name); + } else { + name = new GooString(); + } + + Object obj1; + obj1.initString(name->copy()); + update ("NM", &obj1); +} + +void Annot::setModified(GooString *new_modified) { + delete modified; + + if (new_modified) + modified = new GooString(new_modified); + else + modified = new GooString(); + + Object obj1; + obj1.initString(modified->copy()); + update ("M", &obj1); +} + +void Annot::setFlags(Guint new_flags) { + Object obj1; + flags = new_flags; + obj1.initInt(flags); + update ("F", &obj1); +} + +void Annot::setBorder(AnnotBorderArray *new_border) { + delete border; + + if (new_border) { + Object obj1; + new_border->writeToObject(xref, &obj1); + update ("Border", &obj1); + border = new_border; + } else { + border = NULL; + } +} + void Annot::setColor(AnnotColor *new_color) { delete color; if (new_color) { - Object obj1, obj2; - const double *values = new_color->getValues(); - - obj1.initArray(xref); - for (int i = 0; i < (int)new_color->getSpace(); i++) - obj1.arrayAdd(obj2.initReal (values[i])); + Object obj1; + new_color->writeToObject(xref, &obj1); update ("C", &obj1); color = new_color; } else { @@ -1079,38 +1426,42 @@ page = pageIndex; } -void Annot::setAppearanceState(char *state) { +void Annot::setAppearanceState(const char *state) { if (!state) return; - if (appearState && appearState->cmp(state) == 0) - return; - delete appearState; appearState = new GooString(state); + delete appearBBox; + appearBBox = NULL; + Object obj1; obj1.initName(state); update ("AS", &obj1); // The appearance state determines the current appearance stream - Object obj2; - if (annotObj.dictLookup("AP", &obj2)->isDict()) { - Object obj3; - - if (obj2.dictLookup("N", &obj3)->isDict()) { - Object obj4; + appearance.free(); + if (appearStreams) { + appearStreams->getAppearanceStream(AnnotAppearance::appearNormal, appearState->getCString(), &appearance); + } else { + appearance.initNull(); + } +} - appearance.free(); - if (obj3.dictLookupNF(state, &obj4)->isRef()) - obj4.copy(&appearance); - else - appearance.initNull(); - obj4.free(); - } - obj3.free(); +void Annot::invalidateAppearance() { + if (appearStreams) { // Remove existing appearance streams + appearStreams->removeAllStreams(); } - obj2.free(); + delete appearStreams; + appearStreams = NULL; + + setAppearanceState("Off"); // Default appearance state + + Object obj1; + obj1.initNull(); + update ("AP", &obj1); // Remove AP + update ("AS", &obj1); // Remove AS } double Annot::getXMin() { @@ -1157,6 +1508,8 @@ if (modified) delete modified; + delete appearStreams; + delete appearBBox; appearance.free(); if (appearState) @@ -1298,9 +1651,9 @@ aStream->initStream(mStream); } -void Annot::createResourcesDict(char *formName, Object *formStream, - char *stateName, - double opacity, char *blendMode, +void Annot::createResourcesDict(const char *formName, Object *formStream, + const char *stateName, + double opacity, const char *blendMode, Object *resDict) { Object gsDict, stateDict, formDict, obj1; @@ -1321,6 +1674,25 @@ resDict->dictSet("XObject", &formDict); } +Object *Annot::getAppearanceResDict(Object *dest) { + Object obj1, obj2; + + dest->initNull(); // Default value + + // Fetch appearance's resource dict (if any) + appearance.fetch(xref, &obj1); + if (obj1.isStream()) { + obj1.streamGetDict()->lookup("Resources", &obj2); + if (obj2.isDict()) { + obj2.copy(dest); + } + obj2.free(); + } + obj1.free(); + + return dest; +} + GBool Annot::isVisible(GBool printing) { // check the flags if ((flags & flagHidden) || @@ -1330,7 +1702,8 @@ } // check the OC - if (optContentConfig && oc.isRef()) { + OCGs *optContentConfig = doc->getCatalog()->getOptContentConfig(); + if (optContentConfig) { if (! optContentConfig->optContentIsVisible(&oc)) return gFalse; } @@ -1355,27 +1728,27 @@ // AnnotPopup //------------------------------------------------------------------------ -AnnotPopup::AnnotPopup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - Annot(xrefA, rect, catalog) { +AnnotPopup::AnnotPopup(PDFDoc *docA, PDFRectangle *rect) : + Annot(docA, rect) { Object obj1; type = typePopup; annotObj.dictSet ("Subtype", obj1.initName ("Popup")); - initialize (xrefA, annotObj.getDict(), catalog); + initialize (docA, annotObj.getDict()); } -AnnotPopup::AnnotPopup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { +AnnotPopup::AnnotPopup(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { type = typePopup; - initialize(xrefA, dict, catalog); + initialize(docA, dict); } AnnotPopup::~AnnotPopup() { parent.free(); } -void AnnotPopup::initialize(XRef *xrefA, Dict *dict, Catalog *catalog) { +void AnnotPopup::initialize(PDFDoc *docA, Dict *dict) { Object obj1; if (!dict->lookupNF("Parent", &parent)->isRef()) { @@ -1412,14 +1785,14 @@ //------------------------------------------------------------------------ // AnnotMarkup //------------------------------------------------------------------------ -AnnotMarkup::AnnotMarkup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - Annot(xrefA, rect, catalog) { - initialize(xrefA, annotObj.getDict(), catalog, &annotObj); +AnnotMarkup::AnnotMarkup(PDFDoc *docA, PDFRectangle *rect) : + Annot(docA, rect) { + initialize(docA, annotObj.getDict(), &annotObj); } -AnnotMarkup::AnnotMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { - initialize(xrefA, dict, catalog, obj); +AnnotMarkup::AnnotMarkup(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { + initialize(docA, dict, obj); } AnnotMarkup::~AnnotMarkup() { @@ -1436,8 +1809,8 @@ delete subject; } -void AnnotMarkup::initialize(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) { - Object obj1; +void AnnotMarkup::initialize(PDFDoc *docA, Dict *dict, Object *obj) { + Object obj1, obj2; if (dict->lookup("T", &obj1)->isString()) { label = obj1.getString()->copy(); @@ -1446,8 +1819,8 @@ } obj1.free(); - if (dict->lookup("Popup", &obj1)->isDict()) { - popup = new AnnotPopup(xrefA, obj1.getDict(), catalog, obj); + if (dict->lookup("Popup", &obj1)->isDict() && dict->lookupNF("Popup", &obj2)->isRef()) { + popup = new AnnotPopup(docA, obj1.getDict(), &obj2); } else { popup = NULL; } @@ -1549,34 +1922,47 @@ update ("CA", &obj1); } +void AnnotMarkup::setDate(GooString *new_date) { + delete date; + + if (new_date) + date = new GooString(new_date); + else + date = new GooString(); + + Object obj1; + obj1.initString(date->copy()); + update ("CreationDate", &obj1); +} + //------------------------------------------------------------------------ // AnnotText //------------------------------------------------------------------------ -AnnotText::AnnotText(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotText::AnnotText(PDFDoc *docA, PDFRectangle *rect) : + AnnotMarkup(docA, rect) { Object obj1; type = typeText; flags |= flagNoZoom | flagNoRotate; annotObj.dictSet ("Subtype", obj1.initName ("Text")); - initialize (xrefA, catalog, annotObj.getDict()); + initialize (docA, annotObj.getDict()); } -AnnotText::AnnotText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotText::AnnotText(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeText; flags |= flagNoZoom | flagNoRotate; - initialize (xrefA, catalog, dict); + initialize (docA, dict); } AnnotText::~AnnotText() { delete icon; } -void AnnotText::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) { +void AnnotText::initialize(PDFDoc *docA, Dict *dict) { Object obj1; if (dict->lookup("Open", &obj1)->isBool()) @@ -1933,8 +2319,6 @@ if (!isVisible (printing)) return; - double rectx2 = rect->x2; - double recty2 = rect->y2; if (appearance.isNull()) { ca = opacity; @@ -1965,9 +2349,11 @@ appearBuf->append (ANNOT_TEXT_AP_CIRCLE); appearBuf->append ("Q\n"); + // Force 24x24 rectangle + PDFRectangle fixedRect(rect->x1, rect->y1, rect->x1 + 24, rect->y1 + 24); + appearBBox = new AnnotAppearanceBBox(&fixedRect); double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = bbox[3] = 24; + appearBBox->getBBoxRect(bbox); if (ca == 1) { createForm(bbox, gFalse, NULL, &appearance); } else { @@ -1981,35 +2367,38 @@ createForm(bbox, gFalse, &resDict, &appearance); } delete appearBuf; - - rectx2 = rect->x1 + 24; - recty2 = rect->y1 + 24; } // draw the appearance stream appearance.fetch(xref, &obj); - gfx->drawAnnot(&obj, border, color, - rect->x1, rect->y1, rectx2, recty2); + if (appearBBox) { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + appearBBox->getPageXMin(), appearBBox->getPageYMin(), + appearBBox->getPageXMax(), appearBBox->getPageYMax()); + } else { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + rect->x1, rect->y1, rect->x2, rect->y2); + } obj.free(); } //------------------------------------------------------------------------ // AnnotLink //------------------------------------------------------------------------ -AnnotLink::AnnotLink(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - Annot(xrefA, rect, catalog) { +AnnotLink::AnnotLink(PDFDoc *docA, PDFRectangle *rect) : + Annot(docA, rect) { Object obj1; type = typeLink; annotObj.dictSet ("Subtype", obj1.initName ("Link")); - initialize (xrefA, catalog, annotObj.getDict()); + initialize (docA, annotObj.getDict()); } -AnnotLink::AnnotLink(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { +AnnotLink::AnnotLink(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { type = typeLink; - initialize (xrefA, catalog, dict); + initialize (docA, dict); } AnnotLink::~AnnotLink() { @@ -2022,7 +2411,7 @@ delete quadrilaterals; } -void AnnotLink::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) { +void AnnotLink::initialize(PDFDoc *docA, Dict *dict) { Object obj1; action = NULL; @@ -2034,7 +2423,7 @@ } else { obj1.free(); if (dict->lookup("A", &obj1)->isDict()) { - action = LinkAction::parseAction(&obj1, catalog->getBaseURI()); + action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI()); } } obj1.free(); @@ -2089,8 +2478,8 @@ //------------------------------------------------------------------------ // AnnotFreeText //------------------------------------------------------------------------ -AnnotFreeText::AnnotFreeText(XRef *xrefA, PDFRectangle *rect, GooString *da, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotFreeText::AnnotFreeText(PDFDoc *docA, PDFRectangle *rect, GooString *da) : + AnnotMarkup(docA, rect) { Object obj1; type = typeFreeText; @@ -2101,13 +2490,13 @@ obj2.initString (da->copy()); annotObj.dictSet("DA", &obj2); - initialize (xrefA, catalog, annotObj.getDict()); + initialize (docA, annotObj.getDict()); } -AnnotFreeText::AnnotFreeText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotFreeText::AnnotFreeText(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeFreeText; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotFreeText::~AnnotFreeText() { @@ -2126,14 +2515,14 @@ delete rectangle; } -void AnnotFreeText::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) { +void AnnotFreeText::initialize(PDFDoc *docA, Dict *dict) { Object obj1; if (dict->lookup("DA", &obj1)->isString()) { appearanceString = obj1.getString()->copy(); } else { appearanceString = new GooString(); - error(-1, "Bad appearance for annotation"); + error(errSyntaxError, -1, "Bad appearance for annotation"); ok = gFalse; } obj1.free(); @@ -2220,32 +2609,340 @@ obj1.free(); } +void AnnotFreeText::setAppearanceString(GooString *new_string) { + delete appearanceString; + + if (new_string) { + appearanceString = new GooString(new_string); + } else { + appearanceString = new GooString(); + } + + Object obj1; + obj1.initString(appearanceString->copy()); + update ("DA", &obj1); +} + +void AnnotFreeText::setQuadding(AnnotFreeTextQuadding new_quadding) { + Object obj1; + quadding = new_quadding; + obj1.initInt((int)quadding); + update ("Q", &obj1); +} + +void AnnotFreeText::setStyleString(GooString *new_string) { + delete styleString; + + if (new_string) { + styleString = new GooString(new_string); + //append the unicode marker if needed + if (!styleString->hasUnicodeMarker()) { + styleString->insert(0, 0xff); + styleString->insert(0, 0xfe); + } + } else { + styleString = new GooString(); + } + + Object obj1; + obj1.initString(styleString->copy()); + update ("DS", &obj1); +} + +void AnnotFreeText::setCalloutLine(AnnotCalloutLine *line) { + delete calloutLine; + + Object obj1; + if (line == NULL) { + obj1.initNull(); + calloutLine = NULL; + } else { + double x1 = line->getX1(), y1 = line->getY1(); + double x2 = line->getX2(), y2 = line->getY2(); + Object obj2; + obj1.initArray(xref); + obj1.arrayAdd( obj2.initReal(x1) ); + obj1.arrayAdd( obj2.initReal(y1) ); + obj1.arrayAdd( obj2.initReal(x2) ); + obj1.arrayAdd( obj2.initReal(y2) ); + + AnnotCalloutMultiLine *mline = dynamic_cast(line); + if (mline) { + double x3 = mline->getX3(), y3 = mline->getY3(); + obj1.arrayAdd( obj2.initReal(x3) ); + obj1.arrayAdd( obj2.initReal(y3) ); + calloutLine = new AnnotCalloutMultiLine(x1, y1, x2, y2, x3, y3); + } else { + calloutLine = new AnnotCalloutLine(x1, y1, x2, y2); + } + } + + update("CL", &obj1); +} + +void AnnotFreeText::setIntent(AnnotFreeTextIntent new_intent) { + Object obj1; + + intent = new_intent; + if (new_intent == intentFreeText) + obj1.initName("FreeText"); + else if (new_intent == intentFreeTextCallout) + obj1.initName("FreeTextCallout"); + else // intentFreeTextTypeWriter + obj1.initName("FreeTextTypeWriter"); + update ("IT", &obj1); +} + +static GfxFont * createAnnotDrawFont(XRef * xref, Object *fontResDict) +{ + Ref dummyRef = { -1, -1 }; + + Object baseFontObj, subtypeObj, encodingObj; + baseFontObj.initName("Helvetica"); + subtypeObj.initName("Type0"); + encodingObj.initName("WinAnsiEncoding"); + + Object fontDictObj; + Dict *fontDict = new Dict(xref); + fontDict->decRef(); + fontDict->add(copyString("BaseFont"), &baseFontObj); + fontDict->add(copyString("Subtype"), &subtypeObj); + fontDict->add(copyString("Encoding"), &encodingObj); + fontDictObj.initDict(fontDict); + + Object fontsDictObj; + Dict *fontsDict = new Dict(xref); + fontsDict->decRef(); + fontsDict->add(copyString("AnnotDrawFont"), &fontDictObj); + fontsDictObj.initDict(fontsDict); + + Dict *dict = new Dict(xref); + dict->add(copyString("Font"), &fontsDictObj); + + fontResDict->initDict(dict); + return GfxFont::makeFont(xref, "AnnotDrawFont", dummyRef, fontDict); +} + +void AnnotFreeText::parseAppearanceString(GooString *da, double &fontsize, AnnotColor* &fontcolor) { + fontsize = -1; + fontcolor = NULL; + if (da) { + GooList * daToks = new GooList(); + int j, i = 0; + + // Tokenize + while (i < da->getLength()) { + while (i < da->getLength() && Lexer::isSpace(da->getChar(i))) { + ++i; + } + if (i < da->getLength()) { + for (j = i + 1; j < da->getLength() && !Lexer::isSpace(da->getChar(j)); ++j) { + } + daToks->append(new GooString(da, i, j - i)); + i = j; + } + } + + // Scan backwards: we are looking for the last set value + for (i = daToks->getLength()-1; i >= 0; --i) { + if (fontsize == -1) { + if (!((GooString *)daToks->get(i))->cmp("Tf") && i >= 2) { + // TODO: Font name + fontsize = gatof(( (GooString *)daToks->get(i-1) )->getCString()); + } + } + if (fontcolor == NULL) { + if (!((GooString *)daToks->get(i))->cmp("g") && i >= 1) { + fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-1) )->getCString())); + } else if (!((GooString *)daToks->get(i))->cmp("rg") && i >= 3) { + fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-3) )->getCString()), + gatof(( (GooString *)daToks->get(i-2) )->getCString()), + gatof(( (GooString *)daToks->get(i-1) )->getCString())); + } else if (!((GooString *)daToks->get(i))->cmp("k") && i >= 4) { + fontcolor = new AnnotColor(gatof(( (GooString *)daToks->get(i-4) )->getCString()), + gatof(( (GooString *)daToks->get(i-3) )->getCString()), + gatof(( (GooString *)daToks->get(i-2) )->getCString()), + gatof(( (GooString *)daToks->get(i-1) )->getCString())); + } + } + } + deleteGooList(daToks, GooString); + } +} + +void AnnotFreeText::generateFreeTextAppearance() +{ + double borderWidth, ca = opacity; + + appearBuf = new GooString (); + appearBuf->append ("q\n"); + + if (border) { + int i, dashLength; + double *dash; + borderWidth = border->getWidth(); + + switch (border->getStyle()) { + case AnnotBorder::borderDashed: + appearBuf->append("["); + dashLength = border->getDashLength(); + dash = border->getDash(); + for (i = 0; i < dashLength; ++i) + appearBuf->appendf(" {0:.2f}", dash[i]); + appearBuf->append(" ] 0 d\n"); + break; + default: + appearBuf->append("[] 0 d\n"); + break; + } + appearBuf->appendf("{0:.2f} w\n", borderWidth); + } else { + borderWidth = 0; // No border + } + + // Box size + const double width = rect->x2 - rect->x1; + const double height = rect->y2 - rect->y1; + + // Parse some properties from the appearance string + double fontsize; + AnnotColor *fontcolor; + parseAppearanceString(appearanceString, fontsize, fontcolor); + // Default values + if (fontsize <= 0) + fontsize = 10; + if (fontcolor == NULL) + fontcolor = new AnnotColor(0, 0, 0); // Black + + // Draw box + GBool doFill = (color && color->getSpace() != AnnotColor::colorTransparent); + GBool doStroke = (borderWidth != 0); + if (doFill || doStroke) { + if (doStroke) { + setColor(fontcolor, gFalse); // Border color: same as font color + } + appearBuf->appendf ("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re\n", borderWidth/2, width-borderWidth, height-borderWidth); + if (doFill) { + setColor(color, gTrue); + appearBuf->append(doStroke ? "B\n" : "f\n"); + } else { + appearBuf->append("S\n"); + } + } + + // Setup text clipping + const double textmargin = borderWidth * 2; + const double textwidth = width - 2*textmargin; + appearBuf->appendf ("{0:.2f} {0:.2f} {1:.2f} {2:.2f} re W n\n", textmargin, textwidth, height - 2*textmargin); + + Object fontResDict; + GfxFont *font = createAnnotDrawFont(xref, &fontResDict); + + // Set font state + setColor(fontcolor, gTrue); + appearBuf->appendf ("BT 1 0 0 1 {0:.2f} {1:.2f} Tm\n", textmargin, height - textmargin - fontsize * font->getDescent()); + appearBuf->appendf ("/AnnotDrawFont {0:.2f} Tf\n", fontsize); + + int i = 0; + double xposPrev = 0; + while (i < contents->getLength()) { + GooString out; + double linewidth, xpos; + layoutText(contents, &out, &i, font, &linewidth, textwidth/fontsize, NULL, gFalse); + linewidth *= fontsize; + switch (quadding) { + case quaddingCentered: + xpos = (textwidth - linewidth) / 2; + break; + case quaddingRightJustified: + xpos = textwidth - linewidth; + break; + default: // quaddingLeftJustified: + xpos = 0; + break; + } + appearBuf->appendf("{0:.2f} {1:.2f} Td\n", xpos - xposPrev, -fontsize); + writeString(&out, appearBuf); + appearBuf->append("Tj\n"); + xposPrev = xpos; + } + + font->decRefCnt(); + delete fontcolor; + appearBuf->append ("ET Q\n"); + + double bbox[4]; + bbox[0] = bbox[1] = 0; + bbox[2] = rect->x2 - rect->x1; + bbox[3] = rect->y2 - rect->y1; + + if (ca == 1) { + createForm(bbox, gFalse, &fontResDict, &appearance); + } else { + Object aStream, resDict; + + createForm(bbox, gTrue, &fontResDict, &aStream); + delete appearBuf; + + appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); + createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); + createForm(bbox, gFalse, &resDict, &appearance); + } + delete appearBuf; +} + +void AnnotFreeText::draw(Gfx *gfx, GBool printing) { + Object obj; + + if (!isVisible (printing)) + return; + + if (appearance.isNull()) { + generateFreeTextAppearance(); + } + + // draw the appearance stream + appearance.fetch(xref, &obj); + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + rect->x1, rect->y1, rect->x2, rect->y2); + obj.free(); +} + +// Before retrieving the res dict, regenerate the appearance stream if needed, +// because AnnotFreeText::draw needs to store font info in the res dict +Object *AnnotFreeText::getAppearanceResDict(Object *dest) { + if (appearance.isNull()) { + generateFreeTextAppearance(); + } + return Annot::getAppearanceResDict(dest); +} + //------------------------------------------------------------------------ // AnnotLine //------------------------------------------------------------------------ -AnnotLine::AnnotLine(XRef *xrefA, PDFRectangle *rect, PDFRectangle *lRect, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotLine::AnnotLine(PDFDoc *docA, PDFRectangle *rect, PDFRectangle *lRect) : + AnnotMarkup(docA, rect) { Object obj1; type = typeLine; annotObj.dictSet ("Subtype", obj1.initName ("Line")); Object obj2, obj3; - obj2.initArray (xrefA); + obj2.initArray (doc->getXRef()); obj2.arrayAdd (obj3.initReal (lRect->x1)); obj2.arrayAdd (obj3.initReal (lRect->y1)); obj2.arrayAdd (obj3.initReal (lRect->x2)); obj2.arrayAdd (obj3.initReal (lRect->y2)); annotObj.dictSet ("L", &obj2); - initialize (xrefA, catalog, annotObj.getDict()); + initialize (docA, annotObj.getDict()); } -AnnotLine::AnnotLine(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotLine::AnnotLine(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeLine; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotLine::~AnnotLine() { @@ -2259,7 +2956,7 @@ delete measure; } -void AnnotLine::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) { +void AnnotLine::initialize(PDFDoc *docA, Dict *dict) { Object obj1; if (dict->lookup("L", &obj1)->isArray() && obj1.arrayGetLength() == 4) { @@ -2396,88 +3093,314 @@ obj1.free(); } -void AnnotLine::draw(Gfx *gfx, GBool printing) { - Object obj; - double ca = 1; +void AnnotLine::setVertices(double x1, double y1, double x2, double y2) { + Object obj1, obj2; - if (!isVisible (printing)) - return; + delete coord1; + coord1 = new AnnotCoord(x1, y1); + delete coord2; + coord2 = new AnnotCoord(x2, y2); - /* Some documents like pdf_commenting_new.pdf, - * have y1 = y2 but line_width > 0, acroread - * renders the lines in such cases even though - * the annot bbox is empty. We adjust the bbox here - * to avoid having an empty bbox so that lines - * are rendered - */ - if (rect->y1 == rect->y2) - rect->y2 += border ? border->getWidth() : 1; + obj1.initArray(xref); + obj1.arrayAdd( obj2.initReal(x1) ); + obj1.arrayAdd( obj2.initReal(y1) ); + obj1.arrayAdd( obj2.initReal(x2) ); + obj1.arrayAdd( obj2.initReal(y2) ); - if (appearance.isNull()) { - ca = opacity; + update("L", &obj1); +} - appearBuf = new GooString (); - appearBuf->append ("q\n"); - if (color) - setColor(color, gFalse); +void AnnotLine::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end) { + Object obj1, obj2; - if (border) { - int i, dashLength; - double *dash; + startStyle = start; + endStyle = end; - switch (border->getStyle()) { - case AnnotBorder::borderDashed: - appearBuf->append("["); - dashLength = border->getDashLength(); - dash = border->getDash(); - for (i = 0; i < dashLength; ++i) - appearBuf->appendf(" {0:.2f}", dash[i]); - appearBuf->append(" ] 0 d\n"); - break; - default: - appearBuf->append("[] 0 d\n"); - break; - } - appearBuf->appendf("{0:.2f} w\n", border->getWidth()); + obj1.initArray(xref); + obj1.arrayAdd( obj2.initName(convertAnnotLineEndingStyle( startStyle )) ); + obj1.arrayAdd( obj2.initName(convertAnnotLineEndingStyle( endStyle )) ); + + update("LE", &obj1); +} + +void AnnotLine::setInteriorColor(AnnotColor *new_color) { + delete interiorColor; + + if (new_color) { + Object obj1; + new_color->writeToObject(xref, &obj1); + update ("IC", &obj1); + interiorColor = new_color; + } else { + interiorColor = NULL; + } +} + +void AnnotLine::setLeaderLineLength(double len) { + Object obj1; + + leaderLineLength = len; + obj1.initReal(len); + update ("LL", &obj1); +} + +void AnnotLine::setLeaderLineExtension(double len) { + Object obj1; + + leaderLineExtension = len; + obj1.initReal(len); + update ("LLE", &obj1); + + // LL is required if LLE is present + obj1.initReal(leaderLineLength); + update ("LL", &obj1); +} + +void AnnotLine::setCaption(bool new_cap) { + Object obj1; + + caption = new_cap; + obj1.initBool(new_cap); + update ("Cap", &obj1); +} + +void AnnotLine::setIntent(AnnotLineIntent new_intent) { + Object obj1; + + intent = new_intent; + if (new_intent == intentLineArrow) + obj1.initName("LineArrow"); + else // intentLineDimension + obj1.initName("LineDimension"); + update ("IT", &obj1); +} + +void AnnotLine::generateLineAppearance() +{ + double borderWidth, ca = opacity; + + appearBBox = new AnnotAppearanceBBox(rect); + appearBuf = new GooString (); + appearBuf->append ("q\n"); + if (color) { + setColor(color, gFalse); + } + + if (border) { + int i, dashLength; + double *dash; + + switch (border->getStyle()) { + case AnnotBorder::borderDashed: + appearBuf->append("["); + dashLength = border->getDashLength(); + dash = border->getDash(); + for (i = 0; i < dashLength; ++i) + appearBuf->appendf(" {0:.2f}", dash[i]); + appearBuf->append(" ] 0 d\n"); + break; + default: + appearBuf->append("[] 0 d\n"); + break; } - appearBuf->appendf ("{0:.2f} {1:.2f} m\n", coord1->getX() - rect->x1, coord1->getY() - rect->y1); - appearBuf->appendf ("{0:.2f} {1:.2f} l\n", coord2->getX() - rect->x1, coord2->getY() - rect->y1); - // TODO: Line ending, caption, leader lines - appearBuf->append ("S\n"); - appearBuf->append ("Q\n"); + borderWidth = border->getWidth(); + appearBuf->appendf("{0:.2f} w\n", borderWidth); + appearBBox->setBorderWidth(borderWidth); + } else { + borderWidth = 0; + } + + const double x1 = coord1->getX(); + const double y1 = coord1->getY(); + const double x2 = coord2->getX(); + const double y2 = coord2->getY(); + + // Main segment length + const double main_len = sqrt((x2-x1)*(x2-x1) + (y2-y1)*(y2-y1)); + + // Main segment becomes positive x direction, coord1 becomes (0,0) + Matrix matr; + const double angle = atan2(y2 - y1, x2 - x1); + matr.m[0] = matr.m[3] = cos(angle); + matr.m[1] = sin(angle); + matr.m[2] = -matr.m[1]; + matr.m[4] = x1-rect->x1; + matr.m[5] = y1-rect->y1; + + double tx, ty, captionwidth = 0, captionheight = 0; + AnnotLineCaptionPos actualCaptionPos = captionPos; + const double fontsize = 9; + const double captionhmargin = 2; // Left and right margin (inline caption only) + const double captionmaxwidth = main_len - 2 * captionhmargin; - double bbox[4]; - bbox[0] = bbox[1] = 0; - bbox[2] = rect->x2 - rect->x1; - bbox[3] = rect->y2 - rect->y1; - if (ca == 1) { - createForm(bbox, gFalse, NULL, &appearance); + Object fontResDict; + GfxFont *font; + + // Calculate caption width and height + if (caption) { + font = createAnnotDrawFont(xref, &fontResDict); + int lines = 0; + int i = 0; + while (i < contents->getLength()) { + GooString out; + double linewidth; + layoutText(contents, &out, &i, font, &linewidth, 0, NULL, gFalse); + linewidth *= fontsize; + if (linewidth > captionwidth) { + captionwidth = linewidth; + } + ++lines; + } + captionheight = lines * fontsize; + // If text is longer than available space, turn into captionPosTop + if (captionwidth > captionmaxwidth) { + actualCaptionPos = captionPosTop; + } + } else { + fontResDict.initNull(); + font = NULL; + } + + // Draw main segment + matr.transform (0, leaderLineLength, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", tx, ty); + appearBBox->extendTo (tx, ty); + + if (captionwidth != 0 && actualCaptionPos == captionPosInline) { // Break in the middle + matr.transform ((main_len-captionwidth)/2 - captionhmargin, leaderLineLength, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); + + matr.transform ((main_len+captionwidth)/2 + captionhmargin, leaderLineLength, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", tx, ty); + } + + matr.transform (main_len, leaderLineLength, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); + appearBBox->extendTo (tx, ty); + + // TODO: Line endings + + // Draw caption text + if (caption) { + double tlx = (main_len - captionwidth) / 2, tly; // Top-left coords + if (actualCaptionPos == captionPosInline) { + tly = leaderLineLength + captionheight / 2; } else { - Object aStream, resDict; + tly = leaderLineLength + captionheight + 2*borderWidth; + } - createForm(bbox, gTrue, NULL, &aStream); - delete appearBuf; + tlx += captionTextHorizontal; + tly += captionTextVertical; - appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); - createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); - createForm(bbox, gFalse, &resDict, &appearance); + // Adjust bounding box + matr.transform (tlx, tly-captionheight, &tx, &ty); + appearBBox->extendTo (tx, ty); + matr.transform (tlx+captionwidth, tly-captionheight, &tx, &ty); + appearBBox->extendTo (tx, ty); + matr.transform (tlx+captionwidth, tly, &tx, &ty); + appearBBox->extendTo (tx, ty); + matr.transform (tlx, tly, &tx, &ty); + appearBBox->extendTo (tx, ty); + + // Setup text state (reusing transformed top-left coord) + appearBuf->appendf ("0 g BT /AnnotDrawFont {0:.2f} Tf\n", fontsize); // Font color: black + appearBuf->appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} Tm\n", + matr.m[0], matr.m[1], matr.m[2], matr.m[3], tx, ty); + appearBuf->appendf ("0 {0:.2f} Td\n", -fontsize * font->getDescent()); + // Draw text + int i = 0; + double xposPrev = 0; + while (i < contents->getLength()) { + GooString out; + double linewidth, xpos; + layoutText(contents, &out, &i, font, &linewidth, 0, NULL, gFalse); + linewidth *= fontsize; + xpos = (captionwidth - linewidth) / 2; + appearBuf->appendf("{0:.2f} {1:.2f} Td\n", xpos - xposPrev, -fontsize); + writeString(&out, appearBuf); + appearBuf->append ("Tj\n"); + xposPrev = xpos; } + appearBuf->append ("ET\n"); + font->decRefCnt(); + } + + // Draw leader lines + double ll_len = fabs(leaderLineLength) + leaderLineExtension; + double sign = leaderLineLength >= 0 ? 1 : -1; + if (ll_len != 0) { + matr.transform (0, 0, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", tx, ty); + appearBBox->extendTo (tx, ty); + matr.transform (0, sign*ll_len, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); + appearBBox->extendTo (tx, ty); + + matr.transform (main_len, 0, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", tx, ty); + appearBBox->extendTo (tx, ty); + matr.transform (main_len, sign*ll_len, &tx, &ty); + appearBuf->appendf ("{0:.2f} {1:.2f} l S\n", tx, ty); + appearBBox->extendTo (tx, ty); + } + + appearBuf->append ("Q\n"); + + double bbox[4]; + appearBBox->getBBoxRect(bbox); + if (ca == 1) { + createForm(bbox, gFalse, &fontResDict, &appearance); + } else { + Object aStream, resDict; + + createForm(bbox, gTrue, &fontResDict, &aStream); delete appearBuf; + + appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); + createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); + createForm(bbox, gFalse, &resDict, &appearance); + } + delete appearBuf; +} + +void AnnotLine::draw(Gfx *gfx, GBool printing) { + Object obj; + + if (!isVisible (printing)) + return; + + if (appearance.isNull()) { + generateLineAppearance(); } // draw the appearance stream appearance.fetch(xref, &obj); - gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, - rect->x1, rect->y1, rect->x2, rect->y2); + if (appearBBox) { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + appearBBox->getPageXMin(), appearBBox->getPageYMin(), + appearBBox->getPageXMax(), appearBBox->getPageYMax()); + } else { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + rect->x1, rect->y1, rect->x2, rect->y2); + } obj.free(); } +// Before retrieving the res dict, regenerate the appearance stream if needed, +// because AnnotLine::draw may need to store font info in the res dict +Object *AnnotLine::getAppearanceResDict(Object *dest) { + if (appearance.isNull()) { + generateLineAppearance(); + } + return Annot::getAppearanceResDict(dest); +} + //------------------------------------------------------------------------ // AnnotTextMarkup //------------------------------------------------------------------------ -AnnotTextMarkup::AnnotTextMarkup(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, - AnnotQuadrilaterals *quadPoints, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType, + AnnotQuadrilaterals *quadPoints) : + AnnotMarkup(docA, rect) { Object obj1; switch (subType) { @@ -2498,7 +3421,7 @@ } Object obj2; - obj2.initArray (xrefA); + obj2.initArray (doc->getXRef()); for (int i = 0; i < quadPoints->getQuadrilateralsLength(); ++i) { Object obj3; @@ -2515,17 +3438,17 @@ annotObj.dictSet ("QuadPoints", &obj2); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotTextMarkup::AnnotTextMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotTextMarkup::AnnotTextMarkup(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { // the real type will be read in initialize() type = typeHighlight; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } -void AnnotTextMarkup::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) { +void AnnotTextMarkup::initialize(PDFDoc *docA, Dict *dict) { Object obj1; if (dict->lookup("Subtype", &obj1)->isName()) { @@ -2545,7 +3468,7 @@ if(dict->lookup("QuadPoints", &obj1)->isArray()) { quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect); } else { - error(-1, "Bad Annot Text Markup QuadPoints"); + error(errSyntaxError, -1, "Bad Annot Text Markup QuadPoints"); quadrilaterals = NULL; ok = gFalse; } @@ -2558,7 +3481,49 @@ } } +void AnnotTextMarkup::setType(AnnotSubtype new_type) { + Object obj1; + + switch (new_type) { + case typeHighlight: + obj1.initName("Highlight"); + break; + case typeUnderline: + obj1.initName("Underline"); + break; + case typeSquiggly: + obj1.initName("Squiggly"); + break; + case typeStrikeOut: + obj1.initName("StrikeOut"); + break; + default: + assert(!"Invalid subtype"); + } + + type = new_type; + update("Subtype", &obj1); +} + +void AnnotTextMarkup::setQuadrilaterals(AnnotQuadrilaterals *quadPoints) { + Object obj1, obj2; + obj1.initArray (xref); + + for (int i = 0; i < quadPoints->getQuadrilateralsLength(); ++i) { + obj1.arrayAdd (obj2.initReal (quadPoints->getX1(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getY1(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getX2(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getY2(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getX3(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getY3(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getX4(i))); + obj1.arrayAdd (obj2.initReal (quadPoints->getY4(i))); + } + + quadrilaterals = new AnnotQuadrilaterals(obj1.getArray(), rect); + annotObj.dictSet ("QuadPoints", &obj1); +} void AnnotTextMarkup::draw(Gfx *gfx, GBool printing) { Object obj; @@ -2570,42 +3535,50 @@ return; if (appearance.isNull() || type == typeHighlight) { + GBool blendMultiply = gTrue; ca = opacity; appearBuf = new GooString (); + appearBuf->append ("q\n"); + + /* Adjust BBox */ + delete appearBBox; + appearBBox = new AnnotAppearanceBBox(rect); + for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { + appearBBox->extendTo (quadrilaterals->getX1(i) - rect->x1, quadrilaterals->getY1(i) - rect->y1); + appearBBox->extendTo (quadrilaterals->getX2(i) - rect->x1, quadrilaterals->getY2(i) - rect->y1); + appearBBox->extendTo (quadrilaterals->getX3(i) - rect->x1, quadrilaterals->getY3(i) - rect->y1); + appearBBox->extendTo (quadrilaterals->getX4(i) - rect->x1, quadrilaterals->getY4(i) - rect->y1); + } switch (type) { case typeUnderline: if (color) { setColor(color, gFalse); - setColor(color, gTrue); } + appearBuf->append ("[] 0 d 1 w\n"); for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { double x1, x2, y3; - double x, y; x1 = quadrilaterals->getX1(i); x2 = quadrilaterals->getX2(i); y3 = quadrilaterals->getY3(i); - x = x1 - rect->x1; - y = y3 - rect->y1; - appearBuf->append ("[]0 d 2 w\n"); - appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x, y); - appearBuf->appendf ("{0:.2f} {1:.2f} l\n", x + (x2 - x1), y); + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x1, y3); + appearBuf->appendf ("{0:.2f} {1:.2f} l\n", x2, y3); appearBuf->append ("S\n"); } break; case typeStrikeOut: if (color) { setColor(color, gFalse); - setColor(color, gTrue); } + blendMultiply = gFalse; + appearBuf->append ("[] 0 d 1 w\n"); for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { double x1, y1, x2, y3; - double x, y; double h2; x1 = quadrilaterals->getX1(i); @@ -2614,16 +3587,37 @@ y3 = quadrilaterals->getY3(i); h2 = (y1 - y3) / 2.0; - x = x1 - rect->x1; - y = (y3 - rect->y1) + h2; - appearBuf->append ("[]0 d 2 w\n"); - appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x, y); - appearBuf->appendf ("{0:.2f} {1:.2f} l\n", x + (x2 - x1), y); + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x1, y3+h2); + appearBuf->appendf ("{0:.2f} {1:.2f} l\n", x2, y3+h2); appearBuf->append ("S\n"); } break; case typeSquiggly: - // TODO + if (color) { + setColor(color, gFalse); + } + appearBuf->append ("[] 0 d 1 w\n"); + + for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { + double x1, y1, x2, y3; + double h6; + + x1 = quadrilaterals->getX1(i); + y1 = quadrilaterals->getY1(i); + x2 = quadrilaterals->getX2(i); + y3 = quadrilaterals->getY3(i); + h6 = (y1 - y3) / 6.0; + + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x1, y3+h6); + bool down = false; + do { + down = !down; // Zigzag line + x1 += 2; + appearBuf->appendf ("{0:.2f} {1:.2f} l\n", x1, y3 + (down ? 0 : h6)); + } while (x1 < x2); + appearBuf->append ("S\n"); + } + break; default: case typeHighlight: appearance.free(); @@ -2631,6 +3625,7 @@ if (color) setColor(color, gTrue); + double biggestBorder = 0; for (i = 0; i < quadrilaterals->getQuadrilateralsLength(); ++i) { double x1, y1, x2, y2, x3, y3, x4, y4; double h4; @@ -2643,7 +3638,11 @@ y3 = quadrilaterals->getY3(i); x4 = quadrilaterals->getX4(i); y4 = quadrilaterals->getY4(i); - h4 = abs(y1 - y3) / 4.0; + h4 = fabs(y1 - y3) / 4.0; + + if (h4 > biggestBorder) { + biggestBorder = h4; + } appearBuf->appendf ("{0:.2f} {1:.2f} m\n", x3, y3); appearBuf->appendf ("{0:.2f} {1:.2f} {2:.2f} {3:.2f} {4:.2f} {5:.2f} c\n", @@ -2653,37 +3652,45 @@ x2 + h4, y2 - h4, x4 + h4, y4 + h4, x4, y4); appearBuf->append ("f\n"); } + appearBBox->setBorderWidth(biggestBorder); + break; + } + appearBuf->append ("Q\n"); - Object aStream, resDict; - double bbox[4]; - bbox[0] = rect->x1; - bbox[1] = rect->y1; - bbox[2] = rect->x2; - bbox[3] = rect->y2; - createForm(bbox, gTrue, NULL, &aStream); - delete appearBuf; - - appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); - createResourcesDict("Fm0", &aStream, "GS0", 1, "Multiply", &resDict); - if (ca == 1) { - createForm(bbox, gFalse, &resDict, &appearance); - } else { - createForm(bbox, gTrue, &resDict, &aStream); - delete appearBuf; + Object aStream, resDict; + double bbox[4]; + bbox[0] = appearBBox->getPageXMin(); + bbox[1] = appearBBox->getPageYMin(); + bbox[2] = appearBBox->getPageXMax(); + bbox[3] = appearBBox->getPageYMax(); + createForm(bbox, gTrue, NULL, &aStream); + delete appearBuf; - appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); - createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); - createForm(bbox, gFalse, &resDict, &appearance); - } + appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); + createResourcesDict("Fm0", &aStream, "GS0", 1, blendMultiply ? "Multiply" : NULL, &resDict); + if (ca == 1) { + createForm(bbox, gFalse, &resDict, &appearance); + } else { + createForm(bbox, gTrue, &resDict, &aStream); delete appearBuf; - break; + + appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); + createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); + createForm(bbox, gFalse, &resDict, &appearance); } + delete appearBuf; } // draw the appearance stream appearance.fetch(xref, &obj); - gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, - rect->x1, rect->y1, rect->x2, rect->y2); + if (appearBBox) { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + appearBBox->getPageXMin(), appearBBox->getPageYMin(), + appearBBox->getPageXMax(), appearBBox->getPageYMax()); + } else { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + rect->x1, rect->y1, rect->x2, rect->y2); + } obj.free(); } @@ -2691,18 +3698,18 @@ // AnnotWidget //------------------------------------------------------------------------ -AnnotWidget::AnnotWidget(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { +AnnotWidget::AnnotWidget(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { type = typeWidget; field = NULL; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } -AnnotWidget::AnnotWidget(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj, FormField *fieldA) : - Annot(xrefA, dict, catalog, obj) { +AnnotWidget::AnnotWidget(PDFDoc *docA, Dict *dict, Object *obj, FormField *fieldA) : + Annot(docA, dict, obj) { type = typeWidget; field = fieldA; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotWidget::~AnnotWidget() { @@ -2719,10 +3726,10 @@ delete parent; } -void AnnotWidget::initialize(XRef *xrefA, Catalog *catalog, Dict *dict) { +void AnnotWidget::initialize(PDFDoc *docA, Dict *dict) { Object obj1; - form = catalog->getForm(); + form = doc->getCatalog()->getForm(); if(dict->lookup("H", &obj1)->isName()) { const char *modeName = obj1.getName(); @@ -2750,7 +3757,7 @@ action = NULL; if(dict->lookup("A", &obj1)->isDict()) { - action = LinkAction::parseAction(&obj1, catalog->getBaseURI()); + action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI()); } obj1.free(); @@ -2793,7 +3800,7 @@ // TODO: Handle surrogate pairs in UTF-16. // Should be able to generate output for any CID-keyed font. // Doesn't handle vertical fonts--should it? -void AnnotWidget::layoutText(GooString *text, GooString *outBuf, int *i, +void Annot::layoutText(GooString *text, GooString *outBuf, int *i, GfxFont *font, double *width, double widthLimit, int *charCount, GBool noReencode) { @@ -2815,7 +3822,7 @@ int last_i1, last_i2, last_o1, last_o2; if (unicode && text->getLength() % 2 != 0) { - error(-1, "AnnotWidget::layoutText, bad unicode string"); + error(errSyntaxError, -1, "AnnotWidget::layoutText, bad unicode string"); return; } @@ -2987,7 +3994,7 @@ // Copy the given string to appearBuf, adding parentheses around it and // escaping characters as appropriate. -void AnnotWidget::writeString(GooString *str, GooString *appearBuf) +void Annot::writeString(GooString *str, GooString *appearBuf) { char c; int i; @@ -3017,8 +4024,10 @@ GooList *daToks; GooString *tok, *convertedText; GfxFont *font; + double dx, dy; double fontSize, fontSize2, borderWidth, x, xPrev, y, w, wMax; int tfPos, tmPos, i, j; + int rot; GBool freeText = gFalse; // true if text should be freed before return GBool freeFont = gFalse; @@ -3075,24 +4084,24 @@ // We are forcing ZaDb but the font does not exist // so create a fake one Ref r; // dummy Ref, it's not used at all in this codepath - r.num = 0; - r.gen = 0; + r.num = -1; + r.gen = -1; Dict *d = new Dict(xref); - font = new Gfx8BitFont(xref, "ZaDb", r, new GooString("ZapfDingbats"), fontType1, d); + font = new Gfx8BitFont(xref, "ZaDb", r, new GooString("ZapfDingbats"), fontType1, r, d); delete d; freeFont = gTrue; addDingbatsResource = gTrue; } else { - error(-1, "Unknown font in field's DA string"); + error(errSyntaxError, -1, "Unknown font in field's DA string"); } } } else { - error(-1, "Invalid font name in 'Tf' operator in field's DA string"); + error(errSyntaxError, -1, "Invalid font name in 'Tf' operator in field's DA string"); } tok = (GooString *)daToks->get(tfPos + 1); fontSize = gatof(tok->getCString()); } else { - error(-1, "Missing 'Tf' operator in field's DA string"); + error(errSyntaxError, -1, "Missing 'Tf' operator in field's DA string"); } if (!font) { if (daToks) { @@ -3125,17 +4134,40 @@ appearBuf->append("/Tx BMC\n"); } appearBuf->append("q\n"); + rot = appearCharacs ? appearCharacs->getRotation() : 0; + switch (rot) { + case 90: + appearBuf->appendf("0 1 -1 0 {0:.2f} 0 cm\n", rect->x2 - rect->x1); + dx = rect->y2 - rect->y1; + dy = rect->x2 - rect->x1; + break; + case 180: + appearBuf->appendf("-1 0 0 -1 {0:.2f} {1:.2f} cm\n", + rect->x2 - rect->x1, rect->y2 - rect->y1); + dx = rect->x2 - rect->y2; + dy = rect->y2 - rect->y1; + break; + case 270: + appearBuf->appendf("0 -1 1 0 0 {0:.2f} cm\n", rect->y2 - rect->y1); + dx = rect->y2 - rect->y1; + dy = rect->x2 - rect->x1; + break; + default: // assume rot == 0 + dx = rect->x2 - rect->x1; + dy = rect->y2 - rect->y1; + break; + } appearBuf->append("BT\n"); // multi-line text if (multiline) { // note: the comb flag is ignored in multiline mode - wMax = rect->x2 - rect->x1 - 2 * borderWidth - 4; + wMax = dx - 2 * borderWidth - 4; // compute font autosize if (fontSize == 0) { for (fontSize = 20; fontSize > 1; --fontSize) { - y = rect->y2 - rect->y1; + y = dy - 3; i = 0; while (i < text->getLength()) { layoutText(text, convertedText, &i, font, &w, wMax / fontSize, NULL, @@ -3157,7 +4189,7 @@ // starting y coordinate // (note: each line of text starts with a Td operator that moves // down a line) - y = rect->y2 - rect->y1; + y = dy - 3; // set the font matrix if (tmPos >= 0) { @@ -3196,10 +4228,10 @@ x = borderWidth + 2; break; case quaddingCentered: - x = (rect->x2 - rect->x1 - w) / 2; + x = (dx - w) / 2; break; case quaddingRightJustified: - x = rect->x2 - rect->x1 - borderWidth - 2 - w; + x = dx - borderWidth - 2 - w; break; } @@ -3221,11 +4253,11 @@ int charCount; // compute comb spacing - w = (rect->x2 - rect->x1 - 2 * borderWidth) / comb; + w = (dx - 2 * borderWidth) / comb; // compute font autosize if (fontSize == 0) { - fontSize = rect->y2 - rect->y1 - 2 * borderWidth; + fontSize = dy - 2 * borderWidth; if (w < fontSize) { fontSize = w; } @@ -3256,7 +4288,7 @@ x = borderWidth + (comb - charCount) * w; break; } - y = 0.5 * (rect->y2 - rect->y1) - 0.4 * fontSize; + y = 0.5 * dy - 0.4 * fontSize; // set the font matrix if (tmPos >= 0) { @@ -3320,8 +4352,8 @@ // compute font autosize if (fontSize == 0) { - fontSize = rect->y2 - rect->y1 - 2 * borderWidth; - fontSize2 = (rect->x2 - rect->x1 - 4 - 2 * borderWidth) / w; + fontSize = dy - 2 * borderWidth; + fontSize2 = (dx - 4 - 2 * borderWidth) / w; if (fontSize2 < fontSize) { fontSize = fontSize2; } @@ -3341,13 +4373,13 @@ x = borderWidth + 2; break; case quaddingCentered: - x = (rect->x2 - rect->x1 - w) / 2; + x = (dx - w) / 2; break; case quaddingRightJustified: - x = rect->x2 - rect->x1 - borderWidth - 2 - w; + x = dx - borderWidth - 2 - w; break; } - y = 0.5 * (rect->y2 - rect->y1) - 0.4 * fontSize; + y = 0.5 * dy - 0.4 * fontSize; // set the font matrix if (tmPos >= 0) { @@ -3442,15 +4474,15 @@ tok = (GooString *)daToks->get(tfPos); if (tok->getLength() >= 1 && tok->getChar(0) == '/') { if (!resources || !(font = resources->lookupFont(tok->getCString() + 1))) { - error(-1, "Unknown font in field's DA string"); + error(errSyntaxError, -1, "Unknown font in field's DA string"); } } else { - error(-1, "Invalid font name in 'Tf' operator in field's DA string"); + error(errSyntaxError, -1, "Invalid font name in 'Tf' operator in field's DA string"); } tok = (GooString *)daToks->get(tfPos + 1); fontSize = gatof(tok->getCString()); } else { - error(-1, "Missing 'Tf' operator in field's DA string"); + error(errSyntaxError, -1, "Missing 'Tf' operator in field's DA string"); } if (!font) { if (daToks) { @@ -3469,6 +4501,14 @@ wMax = 0; for (i = 0; i < fieldChoice->getNumChoices(); ++i) { j = 0; + if (fieldChoice->getChoice(i) == NULL) { + error(errSyntaxError, -1, "Invalid annotation listbox"); + if (daToks) { + deleteGooList(daToks, GooString); + } + delete convertedText; + return; + } layoutText(fieldChoice->getChoice(i), convertedText, &j, font, &w, 0.0, NULL, gFalse); if (w > wMax) { wMax = w; @@ -3794,7 +4834,7 @@ break; case formUndef: default: - error(-1, "Unknown field type"); + error(errSyntaxError, -1, "Unknown field type"); } // build the appearance stream dictionary @@ -3885,8 +4925,8 @@ //------------------------------------------------------------------------ // AnnotMovie //------------------------------------------------------------------------ -AnnotMovie::AnnotMovie(XRef *xrefA, PDFRectangle *rect, Movie *movieA, Catalog *catalog) : - Annot(xrefA, rect, catalog) { +AnnotMovie::AnnotMovie(PDFDoc *docA, PDFRectangle *rect, Movie *movieA) : + Annot(docA, rect) { Object obj1; type = typeMovie; @@ -3895,13 +4935,13 @@ movie = movieA->copy(); // TODO: create movie dict from movieA - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotMovie::AnnotMovie(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { +AnnotMovie::AnnotMovie(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { type = typeMovie; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotMovie::~AnnotMovie() { @@ -3910,7 +4950,7 @@ delete movie; } -void AnnotMovie::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotMovie::initialize(PDFDoc *docA, Dict* dict) { Object obj1; if (dict->lookup("T", &obj1)->isString()) { @@ -3935,7 +4975,7 @@ } obj2.free(); } else { - error(-1, "Bad Annot Movie"); + error(errSyntaxError, -1, "Bad Annot Movie"); movie = NULL; ok = gFalse; } @@ -4036,20 +5076,20 @@ //------------------------------------------------------------------------ // AnnotScreen //------------------------------------------------------------------------ -AnnotScreen::AnnotScreen(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - Annot(xrefA, rect, catalog) { +AnnotScreen::AnnotScreen(PDFDoc *docA, PDFRectangle *rect) : + Annot(docA, rect) { Object obj1; type = typeScreen; annotObj.dictSet ("Subtype", obj1.initName ("Screen")); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotScreen::AnnotScreen(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { +AnnotScreen::AnnotScreen(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { type = typeScreen; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotScreen::~AnnotScreen() { @@ -4063,7 +5103,7 @@ additionAction.free(); } -void AnnotScreen::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotScreen::initialize(PDFDoc *docA, Dict* dict) { Object obj1; title = NULL; @@ -4074,9 +5114,9 @@ action = NULL; if (dict->lookup("A", &obj1)->isDict()) { - action = LinkAction::parseAction(&obj1, catalog->getBaseURI()); + action = LinkAction::parseAction(&obj1, doc->getCatalog()->getBaseURI()); if (action->getKind() == actionRendition && page == 0) { - error (-1, "Invalid Rendition action: associated screen annotation without P"); + error (errSyntaxError, -1, "Invalid Rendition action: associated screen annotation without P"); delete action; action = NULL; ok = gFalse; @@ -4097,26 +5137,26 @@ //------------------------------------------------------------------------ // AnnotStamp //------------------------------------------------------------------------ -AnnotStamp::AnnotStamp(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotStamp::AnnotStamp(PDFDoc *docA, PDFRectangle *rect) : + AnnotMarkup(docA, rect) { Object obj1; type = typeStamp; annotObj.dictSet ("Subtype", obj1.initName ("Stamp")); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotStamp::AnnotStamp(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotStamp::AnnotStamp(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeStamp; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotStamp::~AnnotStamp() { delete icon; } -void AnnotStamp::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotStamp::initialize(PDFDoc *docA, Dict* dict) { Object obj1; if (dict->lookup("Name", &obj1)->isName()) { @@ -4128,11 +5168,25 @@ } +void AnnotStamp::setIcon(GooString *new_icon) { + delete icon; + + if (new_icon) { + icon = new GooString (new_icon); + } else { + icon = new GooString(); + } + + Object obj1; + obj1.initName (icon->getCString()); + update("Name", &obj1); +} + //------------------------------------------------------------------------ // AnnotGeometry //------------------------------------------------------------------------ -AnnotGeometry::AnnotGeometry(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotGeometry::AnnotGeometry(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType) : + AnnotMarkup(docA, rect) { Object obj1; switch (subType) { @@ -4146,14 +5200,14 @@ assert (0 && "Invalid subtype for AnnotGeometry\n"); } - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotGeometry::AnnotGeometry(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotGeometry::AnnotGeometry(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { // the real type will be read in initialize() type = typeSquare; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotGeometry::~AnnotGeometry() { @@ -4162,7 +5216,7 @@ delete geometryRect; } -void AnnotGeometry::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotGeometry::initialize(PDFDoc *docA, Dict* dict) { Object obj1; if (dict->lookup("Subtype", &obj1)->isName()) { @@ -4197,6 +5251,37 @@ } +void AnnotGeometry::setType(AnnotSubtype new_type) { + Object obj1; + + switch (new_type) { + case typeSquare: + obj1.initName("Square"); + break; + case typeCircle: + obj1.initName("Circle"); + break; + default: + assert(!"Invalid subtype"); + } + + type = new_type; + update("Subtype", &obj1); +} + +void AnnotGeometry::setInteriorColor(AnnotColor *new_color) { + delete interiorColor; + + if (new_color) { + Object obj1; + new_color->writeToObject(xref, &obj1); + update ("IC", &obj1); + interiorColor = new_color; + } else { + interiorColor = NULL; + } +} + void AnnotGeometry::draw(Gfx *gfx, GBool printing) { Object obj; double ca = 1; @@ -4289,7 +5374,7 @@ } - if (interiorColor) + if (interiorColor && interiorColor->getSpace() != AnnotColor::colorTransparent) appearBuf->append ("b\n"); else appearBuf->append ("S\n"); @@ -4326,9 +5411,8 @@ //------------------------------------------------------------------------ // AnnotPolygon //------------------------------------------------------------------------ -AnnotPolygon::AnnotPolygon(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, - AnnotPath *path, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotPolygon::AnnotPolygon(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType, AnnotPath *path) : + AnnotMarkup(docA, rect) { Object obj1; switch (subType) { @@ -4343,7 +5427,7 @@ } Object obj2; - obj2.initArray (xrefA); + obj2.initArray (doc->getXRef()); for (int i = 0; i < path->getCoordsLength(); ++i) { Object obj3; @@ -4354,14 +5438,14 @@ annotObj.dictSet ("Vertices", &obj2); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotPolygon::AnnotPolygon(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotPolygon::AnnotPolygon(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { // the real type will be read in initialize() type = typePolygon; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotPolygon::~AnnotPolygon() { @@ -4374,7 +5458,7 @@ delete borderEffect; } -void AnnotPolygon::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotPolygon::initialize(PDFDoc *docA, Dict* dict) { Object obj1; if (dict->lookup("Subtype", &obj1)->isName()) { @@ -4391,7 +5475,7 @@ vertices = new AnnotPath(obj1.getArray()); } else { vertices = new AnnotPath(); - error(-1, "Bad Annot Polygon Vertices"); + error(errSyntaxError, -1, "Bad Annot Polygon Vertices"); ok = gFalse; } obj1.free(); @@ -4446,30 +5530,198 @@ obj1.free(); } +void AnnotPolygon::setType(AnnotSubtype new_type) { + Object obj1; + + switch (new_type) { + case typePolygon: + obj1.initName("Polygon"); + break; + case typePolyLine: + obj1.initName("PolyLine"); + break; + default: + assert(!"Invalid subtype"); + } + + type = new_type; + update("Subtype", &obj1); +} + +void AnnotPolygon::setVertices(AnnotPath *path) { + Object obj1, obj2; + delete vertices; + + obj1.initArray(xref); + + for (int i = 0; i < path->getCoordsLength(); i++) { + obj1.arrayAdd (obj2.initReal (path->getX(i))); + obj1.arrayAdd (obj2.initReal (path->getY(i))); + } + + vertices = new AnnotPath(obj1.getArray()); + + update("Vertices", &obj1); +} + +void AnnotPolygon::setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end) { + Object obj1, obj2; + + startStyle = start; + endStyle = end; + + obj1.initArray(xref); + obj1.arrayAdd( obj2.initName(convertAnnotLineEndingStyle( startStyle )) ); + obj1.arrayAdd( obj2.initName(convertAnnotLineEndingStyle( endStyle )) ); + + update("LE", &obj1); +} + +void AnnotPolygon::setInteriorColor(AnnotColor *new_color) { + delete interiorColor; + + if (new_color) { + Object obj1; + new_color->writeToObject(xref, &obj1); + update ("IC", &obj1); + interiorColor = new_color; + } else { + interiorColor = NULL; + } +} + +void AnnotPolygon::setIntent(AnnotPolygonIntent new_intent) { + Object obj1; + + intent = new_intent; + if (new_intent == polygonCloud) + obj1.initName("PolygonCloud"); + else if (new_intent == polylineDimension) + obj1.initName("PolyLineDimension"); + else // polygonDimension + obj1.initName("PolygonDimension"); + update ("IT", &obj1); +} + +void AnnotPolygon::draw(Gfx *gfx, GBool printing) { + Object obj; + double ca = 1; + + if (!isVisible (printing)) + return; + + if (appearance.isNull()) { + appearBBox = new AnnotAppearanceBBox(rect); + ca = opacity; + + appearBuf = new GooString (); + appearBuf->append ("q\n"); + + if (color) { + setColor(color, gFalse); + } + + if (border) { + int i, dashLength; + double *dash; + + switch (border->getStyle()) { + case AnnotBorder::borderDashed: + appearBuf->append("["); + dashLength = border->getDashLength(); + dash = border->getDash(); + for (i = 0; i < dashLength; ++i) + appearBuf->appendf(" {0:.2f}", dash[i]); + appearBuf->append(" ] 0 d\n"); + break; + default: + appearBuf->append("[] 0 d\n"); + break; + } + appearBuf->appendf("{0:.2f} w\n", border->getWidth()); + appearBBox->setBorderWidth(border->getWidth()); + } + + if (interiorColor) { + setColor(interiorColor, gTrue); + } + + if (vertices->getCoordsLength() != 0) { + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", vertices->getX(0) - rect->x1, vertices->getY(0) - rect->y1); + appearBBox->extendTo (vertices->getX(0) - rect->x1, vertices->getY(0) - rect->y1); + + for (int i = 1; i < vertices->getCoordsLength(); ++i) { + appearBuf->appendf ("{0:.2f} {1:.2f} l\n", vertices->getX(i) - rect->x1, vertices->getY(i) - rect->y1); + appearBBox->extendTo (vertices->getX(i) - rect->x1, vertices->getY(i) - rect->y1); + } + + if (type == typePolygon) { + if (interiorColor && interiorColor->getSpace() != AnnotColor::colorTransparent) { + appearBuf->append ("b\n"); + } else { + appearBuf->append ("s\n"); + } + } else { + appearBuf->append ("S\n"); + } + } + + appearBuf->append ("Q\n"); + + double bbox[4]; + appearBBox->getBBoxRect(bbox); + if (ca == 1) { + createForm(bbox, gFalse, NULL, &appearance); + } else { + Object aStream, resDict; + + createForm(bbox, gTrue, NULL, &aStream); + delete appearBuf; + + appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); + createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); + createForm(bbox, gFalse, &resDict, &appearance); + } + delete appearBuf; + } + + // draw the appearance stream + appearance.fetch(xref, &obj); + if (appearBBox) { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + appearBBox->getPageXMin(), appearBBox->getPageYMin(), + appearBBox->getPageXMax(), appearBBox->getPageYMax()); + } else { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + rect->x1, rect->y1, rect->x2, rect->y2); + } + obj.free(); +} + //------------------------------------------------------------------------ // AnnotCaret //------------------------------------------------------------------------ -AnnotCaret::AnnotCaret(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotCaret::AnnotCaret(PDFDoc *docA, PDFRectangle *rect) : + AnnotMarkup(docA, rect) { Object obj1; type = typeCaret; annotObj.dictSet ("Subtype", obj1.initName ("Caret")); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotCaret::AnnotCaret(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotCaret::AnnotCaret(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeCaret; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotCaret::~AnnotCaret() { delete caretRect; } -void AnnotCaret::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotCaret::initialize(PDFDoc *docA, Dict* dict) { Object obj1; symbol = symbolNone; @@ -4492,11 +5744,18 @@ } +void AnnotCaret::setSymbol(AnnotCaretSymbol new_symbol) { + Object obj1; + obj1.initName( new_symbol == symbolP ? "P" : "None" ); + symbol = new_symbol; + update("Sy", &obj1); +} + //------------------------------------------------------------------------ // AnnotInk //------------------------------------------------------------------------ -AnnotInk::AnnotInk(XRef *xrefA, PDFRectangle *rect, AnnotPath **paths, int n_paths, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotInk::AnnotInk(PDFDoc *docA, PDFRectangle *rect, AnnotPath **paths, int n_paths) : + AnnotMarkup(docA, rect) { Object obj1; type = typeInk; @@ -4504,35 +5763,64 @@ annotObj.dictSet ("Subtype", obj1.initName ("Ink")); Object obj2; - obj2.initArray (xrefA); + obj2.initArray (doc->getXRef()); + writeInkList(paths, n_paths, obj2.getArray()); - for (int i = 0; i < n_paths; ++i) { - AnnotPath *path = paths[i]; - Object obj3; - obj3.initArray (xrefA); + annotObj.dictSet ("InkList", &obj2); - for (int j = 0; j < path->getCoordsLength(); ++j) { - Object obj4; + initialize(docA, annotObj.getDict()); +} - obj3.arrayAdd (obj4.initReal (path->getX(j))); - obj3.arrayAdd (obj4.initReal (path->getY(j))); - } +AnnotInk::AnnotInk(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { + type = typeInk; + initialize(docA, dict); +} - obj2.arrayAdd (&obj3); - } +AnnotInk::~AnnotInk() { + freeInkList(); +} - annotObj.dictSet ("InkList", &obj2); +void AnnotInk::initialize(PDFDoc *docA, Dict* dict) { + Object obj1; - initialize(xrefA, catalog, annotObj.getDict()); + if (dict->lookup("InkList", &obj1)->isArray()) { + parseInkList(obj1.getArray()); + } else { + inkListLength = 0; + inkList = NULL; + error(errSyntaxError, -1, "Bad Annot Ink List"); + ok = gFalse; + } + obj1.free(); } -AnnotInk::AnnotInk(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { - type = typeInk; - initialize(xrefA, catalog, dict); +void AnnotInk::writeInkList(AnnotPath **paths, int n_paths, Array *dest_array) { + Object obj1, obj2; + for (int i = 0; i < n_paths; ++i) { + AnnotPath *path = paths[i]; + obj1.initArray (xref); + for (int j = 0; j < path->getCoordsLength(); ++j) { + obj1.arrayAdd (obj2.initReal (path->getX(j))); + obj1.arrayAdd (obj2.initReal (path->getY(j))); + } + dest_array->add (&obj1); + } } -AnnotInk::~AnnotInk() { +void AnnotInk::parseInkList(Array *array) { + inkListLength = array->getLength(); + inkList = (AnnotPath **) gmallocn ((inkListLength), sizeof(AnnotPath *)); + memset(inkList, 0, inkListLength * sizeof(AnnotPath *)); + for (int i = 0; i < inkListLength; i++) { + Object obj2; + if (array->get(i, &obj2)->isArray()) + inkList[i] = new AnnotPath(obj2.getArray()); + obj2.free(); + } +} + +void AnnotInk::freeInkList() { if (inkList) { for (int i = 0; i < inkListLength; ++i) delete inkList[i]; @@ -4540,34 +5828,93 @@ } } -void AnnotInk::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotInk::setInkList(AnnotPath **paths, int n_paths) { Object obj1; - if (dict->lookup("InkList", &obj1)->isArray()) { - Array *array = obj1.getArray(); - inkListLength = array->getLength(); - inkList = (AnnotPath **) gmallocn ((inkListLength), sizeof(AnnotPath *)); - memset(inkList, 0, inkListLength * sizeof(AnnotPath *)); - for (int i = 0; i < inkListLength; i++) { - Object obj2; - if (array->get(i, &obj2)->isArray()) - inkList[i] = new AnnotPath(obj2.getArray()); - obj2.free(); + freeInkList(); + + obj1.initArray (xref); + writeInkList(paths, n_paths, obj1.getArray()); + + parseInkList(obj1.getArray()); + annotObj.dictSet ("InkList", &obj1); +} + +void AnnotInk::draw(Gfx *gfx, GBool printing) { + Object obj; + double ca = 1; + + if (!isVisible (printing)) + return; + + if (appearance.isNull()) { + appearBBox = new AnnotAppearanceBBox(rect); + ca = opacity; + + appearBuf = new GooString (); + appearBuf->append ("q\n"); + + if (color) { + setColor(color, gFalse); + } + + if (border) { + appearBuf->appendf("{0:.2f} w\n", border->getWidth()); + appearBBox->setBorderWidth(border->getWidth()); + } + + for (int i = 0; i < inkListLength; ++i) { + const AnnotPath * path = inkList[i]; + if (path->getCoordsLength() != 0) { + appearBuf->appendf ("{0:.2f} {1:.2f} m\n", path->getX(0) - rect->x1, path->getY(0) - rect->y1); + appearBBox->extendTo (path->getX(0) - rect->x1, path->getY(0) - rect->y1); + + for (int j = 1; j < path->getCoordsLength(); ++j) { + appearBuf->appendf ("{0:.2f} {1:.2f} l\n", path->getX(j) - rect->x1, path->getY(j) - rect->y1); + appearBBox->extendTo (path->getX(j) - rect->x1, path->getY(j) - rect->y1); + } + + appearBuf->append ("S\n"); + } + } + + appearBuf->append ("Q\n"); + + double bbox[4]; + appearBBox->getBBoxRect(bbox); + if (ca == 1) { + createForm(bbox, gFalse, NULL, &appearance); + } else { + Object aStream, resDict; + + createForm(bbox, gTrue, NULL, &aStream); + delete appearBuf; + + appearBuf = new GooString ("/GS0 gs\n/Fm0 Do"); + createResourcesDict("Fm0", &aStream, "GS0", ca, NULL, &resDict); + createForm(bbox, gFalse, &resDict, &appearance); } + delete appearBuf; + } + + // draw the appearance stream + appearance.fetch(xref, &obj); + if (appearBBox) { + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + appearBBox->getPageXMin(), appearBBox->getPageYMin(), + appearBBox->getPageXMax(), appearBBox->getPageYMax()); } else { - inkListLength = 0; - inkList = NULL; - error(-1, "Bad Annot Ink List"); - ok = gFalse; + gfx->drawAnnot(&obj, (AnnotBorder *)NULL, color, + rect->x1, rect->y1, rect->x2, rect->y2); } - obj1.free(); + obj.free(); } //------------------------------------------------------------------------ // AnnotFileAttachment //------------------------------------------------------------------------ -AnnotFileAttachment::AnnotFileAttachment(XRef *xrefA, PDFRectangle *rect, GooString *filename, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, PDFRectangle *rect, GooString *filename) : + AnnotMarkup(docA, rect) { Object obj1; type = typeFileAttachment; @@ -4578,13 +5925,13 @@ obj2.initString(filename->copy()); annotObj.dictSet ("FS", &obj2); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotFileAttachment::AnnotFileAttachment(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotFileAttachment::AnnotFileAttachment(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeFileAttachment; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotFileAttachment::~AnnotFileAttachment() { @@ -4594,13 +5941,13 @@ delete name; } -void AnnotFileAttachment::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotFileAttachment::initialize(PDFDoc *docA, Dict* dict) { Object obj1; if (dict->lookup("FS", &obj1)->isDict() || dict->lookup("FS", &obj1)->isString()) { obj1.copy(&file); } else { - error(-1, "Bad Annot File Attachment"); + error(errSyntaxError, -1, "Bad Annot File Attachment"); ok = gFalse; } obj1.free(); @@ -4781,8 +6128,8 @@ //------------------------------------------------------------------------ // AnnotSound //------------------------------------------------------------------------ -AnnotSound::AnnotSound(XRef *xrefA, PDFRectangle *rect, Sound *soundA, Catalog *catalog) : - AnnotMarkup(xrefA, rect, catalog) { +AnnotSound::AnnotSound(PDFDoc *docA, PDFRectangle *rect, Sound *soundA) : + AnnotMarkup(docA, rect) { Object obj1; type = typeSound; @@ -4795,13 +6142,13 @@ str->incRef(); //FIXME: initStream should do this? annotObj.dictSet ("Sound", &obj2); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -AnnotSound::AnnotSound(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - AnnotMarkup(xrefA, dict, catalog, obj) { +AnnotSound::AnnotSound(PDFDoc *docA, Dict *dict, Object *obj) : + AnnotMarkup(docA, dict, obj) { type = typeSound; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } AnnotSound::~AnnotSound() { @@ -4810,12 +6157,12 @@ delete name; } -void AnnotSound::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void AnnotSound::initialize(PDFDoc *docA, Dict* dict) { Object obj1; sound = Sound::parseSound(dict->lookup("Sound", &obj1)); if (!sound) { - error(-1, "Bad Annot Sound"); + error(errSyntaxError, -1, "Bad Annot Sound"); ok = gFalse; } obj1.free(); @@ -4942,21 +6289,21 @@ //------------------------------------------------------------------------ // Annot3D //------------------------------------------------------------------------ -Annot3D::Annot3D(XRef *xrefA, PDFRectangle *rect, Catalog *catalog) : - Annot(xrefA, rect, catalog) { +Annot3D::Annot3D(PDFDoc *docA, PDFRectangle *rect) : + Annot(docA, rect) { Object obj1; type = type3D; annotObj.dictSet ("Subtype", obj1.initName ("3D")); - initialize(xrefA, catalog, annotObj.getDict()); + initialize(docA, annotObj.getDict()); } -Annot3D::Annot3D(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj) : - Annot(xrefA, dict, catalog, obj) { +Annot3D::Annot3D(PDFDoc *docA, Dict *dict, Object *obj) : + Annot(docA, dict, obj) { type = type3D; - initialize(xrefA, catalog, dict); + initialize(docA, dict); } Annot3D::~Annot3D() { @@ -4964,7 +6311,7 @@ delete activation; } -void Annot3D::initialize(XRef *xrefA, Catalog *catalog, Dict* dict) { +void Annot3D::initialize(PDFDoc *docA, Dict* dict) { Object obj1; if (dict->lookup("3DA", &obj1)->isDict()) { @@ -5063,11 +6410,12 @@ // Annots //------------------------------------------------------------------------ -Annots::Annots(XRef *xref, Catalog *catalog, Object *annotsObj) { +Annots::Annots(PDFDoc *docA, Object *annotsObj) { Annot *annot; Object obj1; int i; + doc = docA; annots = NULL; size = 0; nAnnots = 0; @@ -5080,7 +6428,7 @@ Object obj2; if (annotsObj->arrayGet(i, &obj1)->isDict()) { annotsObj->arrayGetNF(i, &obj2); - annot = createAnnot (xref, obj1.getDict(), catalog, &obj2); + annot = createAnnot (obj1.getDict(), &obj2); if (annot) { if (annot->isOk()) { appendAnnot(annot); @@ -5105,7 +6453,25 @@ } } -Annot *Annots::createAnnot(XRef *xref, Dict* dict, Catalog *catalog, Object *obj) { +GBool Annots::removeAnnot(Annot *annot) { + int idx = -1; + // Search annot and determine its index + for (int i = 0; idx == -1 && i < nAnnots; i++) { + if (annots[i] == annot) { + idx = i; + } + } + if (idx == -1) { + return gFalse; + } else { + --nAnnots; + memmove( annots + idx, annots + idx + 1, sizeof(annots[0]) * (nAnnots - idx) ); + annot->decRefCnt(); + return gTrue; + } +} + +Annot *Annots::createAnnot(Dict* dict, Object *obj) { Annot *annot = NULL; Object obj1; @@ -5113,45 +6479,45 @@ const char *typeName = obj1.getName(); if (!strcmp(typeName, "Text")) { - annot = new AnnotText(xref, dict, catalog, obj); + annot = new AnnotText(doc, dict, obj); } else if (!strcmp(typeName, "Link")) { - annot = new AnnotLink(xref, dict, catalog, obj); + annot = new AnnotLink(doc, dict, obj); } else if (!strcmp(typeName, "FreeText")) { - annot = new AnnotFreeText(xref, dict, catalog, obj); + annot = new AnnotFreeText(doc, dict, obj); } else if (!strcmp(typeName, "Line")) { - annot = new AnnotLine(xref, dict, catalog, obj); + annot = new AnnotLine(doc, dict, obj); } else if (!strcmp(typeName, "Square")) { - annot = new AnnotGeometry(xref, dict, catalog, obj); + annot = new AnnotGeometry(doc, dict, obj); } else if (!strcmp(typeName, "Circle")) { - annot = new AnnotGeometry(xref, dict, catalog, obj); + annot = new AnnotGeometry(doc, dict, obj); } else if (!strcmp(typeName, "Polygon")) { - annot = new AnnotPolygon(xref, dict, catalog, obj); + annot = new AnnotPolygon(doc, dict, obj); } else if (!strcmp(typeName, "PolyLine")) { - annot = new AnnotPolygon(xref, dict, catalog, obj); + annot = new AnnotPolygon(doc, dict, obj); } else if (!strcmp(typeName, "Highlight")) { - annot = new AnnotTextMarkup(xref, dict, catalog, obj); + annot = new AnnotTextMarkup(doc, dict, obj); } else if (!strcmp(typeName, "Underline")) { - annot = new AnnotTextMarkup(xref, dict, catalog, obj); + annot = new AnnotTextMarkup(doc, dict, obj); } else if (!strcmp(typeName, "Squiggly")) { - annot = new AnnotTextMarkup(xref, dict, catalog, obj); + annot = new AnnotTextMarkup(doc, dict, obj); } else if (!strcmp(typeName, "StrikeOut")) { - annot = new AnnotTextMarkup(xref, dict, catalog, obj); + annot = new AnnotTextMarkup(doc, dict, obj); } else if (!strcmp(typeName, "Stamp")) { - annot = new AnnotStamp(xref, dict, catalog, obj); + annot = new AnnotStamp(doc, dict, obj); } else if (!strcmp(typeName, "Caret")) { - annot = new AnnotCaret(xref, dict, catalog, obj); + annot = new AnnotCaret(doc, dict, obj); } else if (!strcmp(typeName, "Ink")) { - annot = new AnnotInk(xref, dict, catalog, obj); + annot = new AnnotInk(doc, dict, obj); } else if (!strcmp(typeName, "FileAttachment")) { - annot = new AnnotFileAttachment(xref, dict, catalog, obj); + annot = new AnnotFileAttachment(doc, dict, obj); } else if (!strcmp(typeName, "Sound")) { - annot = new AnnotSound(xref, dict, catalog, obj); + annot = new AnnotSound(doc, dict, obj); } else if(!strcmp(typeName, "Movie")) { - annot = new AnnotMovie(xref, dict, catalog, obj); + annot = new AnnotMovie(doc, dict, obj); } else if(!strcmp(typeName, "Widget")) { // Find the annot in forms if (obj->isRef()) { - Form *form = catalog->getForm(); + Form *form = doc->getCatalog()->getForm(); if (form) { FormWidget *widget = form->findWidgetByRef(obj->getRef()); if (widget) { @@ -5161,17 +6527,17 @@ } } if (!annot) - annot = new AnnotWidget(xref, dict, catalog, obj); + annot = new AnnotWidget(doc, dict, obj); } else if(!strcmp(typeName, "Screen")) { - annot = new AnnotScreen(xref, dict, catalog, obj); + annot = new AnnotScreen(doc, dict, obj); } else if(!strcmp(typeName, "PrinterMark")) { - annot = new Annot(xref, dict, catalog, obj); + annot = new Annot(doc, dict, obj); } else if (!strcmp(typeName, "TrapNet")) { - annot = new Annot(xref, dict, catalog, obj); + annot = new Annot(doc, dict, obj); } else if (!strcmp(typeName, "Watermark")) { - annot = new Annot(xref, dict, catalog, obj); + annot = new Annot(doc, dict, obj); } else if (!strcmp(typeName, "3D")) { - annot = new Annot3D(xref, dict, catalog, obj); + annot = new Annot3D(doc, dict, obj); } else if (!strcmp(typeName, "Popup")) { /* Popup annots are already handled by markup annots * Here we only care about popup annots without a @@ -5180,13 +6546,13 @@ Object obj2; if (dict->lookup("Parent", &obj2)->isNull()) - annot = new AnnotPopup(xref, dict, catalog, obj); + annot = new AnnotPopup(doc, dict, obj); else annot = NULL; obj2.free(); } else { - annot = new Annot(xref, dict, catalog, obj); + annot = new Annot(doc, dict, obj); } } obj1.free(); diff -Nru poppler-0.18.4/poppler/Annot.h poppler-0.20.5/poppler/Annot.h --- poppler-0.18.4/poppler/Annot.h 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/Annot.h 2012-09-21 19:16:53.000000000 +0000 @@ -22,6 +22,7 @@ // Copyright (C) 2008 Pino Toscano // Copyright (C) 2008 Tomas Are Haavet // Copyright (C) 2009-2011 Albert Astals Cid +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -39,10 +40,10 @@ class XRef; class Gfx; -class Catalog; class CharCodeToUnicode; class GfxFont; class GfxResources; +class PDFDoc; class Form; class FormWidget; class FormField; @@ -50,7 +51,6 @@ class PDFRectangle; class Movie; class LinkAction; -class OCGs; class Sound; enum AnnotLineEndingStyle { @@ -177,6 +177,7 @@ //------------------------------------------------------------------------ class AnnotQuadrilaterals { +public: class AnnotQuadrilateral { public: AnnotQuadrilateral(double x1, double y1, double x2, double y2, double x3, @@ -185,9 +186,8 @@ AnnotCoord coord1, coord2, coord3, coord4; }; -public: - AnnotQuadrilaterals(Array *array, PDFRectangle *rect); + AnnotQuadrilaterals(AnnotQuadrilateral **quads, int quadsLength); ~AnnotQuadrilaterals(); double getX1(int quadrilateral); @@ -228,6 +228,8 @@ AnnotBorder(); virtual ~AnnotBorder(); + virtual void setWidth(double new_width) { width = new_width; } + virtual AnnotBorderType getType() const { return type; } virtual double getWidth() const { return width; } virtual int getDashLength() const { return dashLength; } @@ -254,6 +256,11 @@ AnnotBorderArray(); AnnotBorderArray(Array *array); + void writeToObject(XRef *xref, Object *dest) const; + + void setHorizontalCorner(double hc) { horizontalCorner = hc; } + void setVerticalCorner(double vc) { verticalCorner = vc; } + double getHorizontalCorner() const { return horizontalCorner; } double getVerticalCorner() const { return verticalCorner; } @@ -304,6 +311,8 @@ AnnotColorSpace getSpace() const { return (AnnotColorSpace) length; } const double *getValues() const { return values; } + void writeToObject(XRef *xref, Object *dest) const; + private: double values[4]; @@ -359,7 +368,32 @@ appearDown }; - AnnotAppearance(Dict *dict); + AnnotAppearance(PDFDoc *docA, Object *dict); + ~AnnotAppearance(); + + // State is ignored if no subdictionary is present + void getAppearanceStream(AnnotAppearanceType type, const char *state, Object *dest); + + // Access keys in normal appearance subdictionary (N) + GooString * getStateKey(int i); + int getNumStates(); + + // Removes all associated streams in the xref table. Caller is required to + // reset parent annotation's AP and AS after this call. + void removeAllStreams(); + + // Test if this AnnotAppearance references the specified stream + GBool referencesStream(Ref targetStreamRef); + +private: + static GBool referencesStream(Object *stateObj, Ref targetStreamRef); + void removeStream(Ref refToStream); + void removeStateStreams(Object *state); + +protected: + PDFDoc *doc; + XRef *xref; // the xref table for this PDF file + Object appearDict; // Annotation's AP }; //------------------------------------------------------------------------ @@ -407,6 +441,32 @@ }; //------------------------------------------------------------------------ +// AnnotAppearanceBBox +//------------------------------------------------------------------------ + +class AnnotAppearanceBBox +{ +public: + AnnotAppearanceBBox(PDFRectangle *init); + + void setBorderWidth(double w) { borderWidth = w; } + + // The following functions operate on coords relative to [origX origY] + void extendTo(double x, double y); + void getBBoxRect(double bbox[4]) const; + + // Get boundaries in page coordinates + double getPageXMin() const; + double getPageYMin() const; + double getPageXMax() const; + double getPageYMax() const; + +private: + double origX, origY, borderWidth; + double minX, minY, maxX, maxY; +}; + +//------------------------------------------------------------------------ // Annot //------------------------------------------------------------------------ @@ -455,17 +515,17 @@ type3D // 3D 25 }; - Annot(XRef *xrefA, PDFRectangle *rectA, Catalog *catalog); - Annot(XRef *xrefA, Dict *dict, Catalog *catalog); - Annot(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + Annot(PDFDoc *docA, PDFRectangle *rectA); + Annot(PDFDoc *docA, Dict *dict); + Annot(PDFDoc *docA, Dict *dict, Object *obj); GBool isOk() { return ok; } void incRefCnt(); void decRefCnt(); virtual void draw(Gfx *gfx, GBool printing); - // Get appearance object. - Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); } + // Get the resource dict of the appearance stream + virtual Object *getAppearanceResDict(Object *dest); GBool match(Ref *refA) { return ref.num == refA->num && ref.gen == refA->gen; } @@ -475,9 +535,17 @@ double getFontSize() { return fontSize; } + void setRect(PDFRectangle *rect); + void setRect(double x1, double y1, double x2, double y2); + // Sets the annot contents to new_content // new_content should never be NULL void setContents(GooString *new_content); + void setName(GooString *new_name); + void setModified(GooString *new_date); + void setFlags(Guint new_flags); + + void setBorder(AnnotBorderArray *new_border); // Takes ownership // The annotation takes the ownership of // new_color. @@ -485,9 +553,13 @@ void setPage(Ref *pageRef, int pageIndex); - void setAppearanceState(char *state); + void setAppearanceState(const char *state); + + // Delete appearance streams and reset appearance state + void invalidateAppearance(); // getters + PDFDoc *getDoc() const { return doc; } XRef *getXRef() const { return xref; } GBool getHasRef() const { return hasRef; } Ref getRef() const { return ref; } @@ -499,7 +571,7 @@ GooString *getName() const { return name; } GooString *getModified() const { return modified; } Guint getFlags() const { return flags; } - /*Dict *getAppearDict() const { return appearDict; }*/ + AnnotAppearance *getAppearStreams() const { return appearStreams; } GooString *getAppearState() const { return appearState; } AnnotBorder *getBorder() const { return border; } AnnotColor *getColor() const { return color; } @@ -514,7 +586,7 @@ void readArrayNum(Object *pdfArray, int key, double *value); // write vStr[i:j[ in appearBuf - void initialize (XRef *xrefA, Dict *dict, Catalog *catalog); + void initialize (PDFDoc *docA, Dict *dict); protected: @@ -523,9 +595,13 @@ void drawCircle(double cx, double cy, double r, GBool fill); void drawCircleTopLeft(double cx, double cy, double r); void drawCircleBottomRight(double cx, double cy, double r); + void layoutText(GooString *text, GooString *outBuf, int *i, GfxFont *font, + double *width, double widthLimit, int *charCount, + GBool noReencode); + void writeString(GooString *str, GooString *appearBuf); void createForm(double *bbox, GBool transparencyGroup, Object *resDict, Object *aStream); - void createResourcesDict(char *formName, Object *formStream, char *stateName, - double opacity, char *blendMode, Object *resDict); + void createResourcesDict(const char *formName, Object *formStream, const char *stateName, + double opacity, const char *blendMode, Object *resDict); GBool isVisible(GBool printing); // Updates the field key of the annotation dictionary @@ -546,15 +622,15 @@ GooString *name; // NM GooString *modified; // M Guint flags; // F (must be a 32 bit unsigned int) - //Dict *appearDict; // AP (should be correctly parsed) - Ref appRef; //the reference to the indirect appearance object in XRef + AnnotAppearance *appearStreams; // AP Object appearance; // a reference to the Form XObject stream // for the normal appearance + AnnotAppearanceBBox *appearBBox; // BBox of generated appearance GooString *appearState; // AS int treeKey; // Struct Parent; - OCGs *optContentConfig; // Optional content config Object oc; // OC + PDFDoc *doc; XRef *xref; // the xref table for this PDF file Ref ref; // object ref identifying this annotation GooString *appearBuf; @@ -572,8 +648,8 @@ class AnnotPopup: public Annot { public: - AnnotPopup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotPopup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotPopup(PDFDoc *docA, PDFRectangle *rect); + AnnotPopup(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotPopup(); Object *getParent(Object *obj) { return parent.fetch (xref, obj); } @@ -584,7 +660,7 @@ void setOpen(GBool openA); protected: - void initialize(XRef *xrefA, Dict *dict, Catalog *catalog); + void initialize(PDFDoc *docA, Dict *dict); Object parent; // Parent GBool open; // Open @@ -601,8 +677,8 @@ replyTypeGroup // Group }; - AnnotMarkup(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotMarkup(PDFDoc *docA, PDFRectangle *rect); + AnnotMarkup(PDFDoc *docA, Dict *dict, Object *obj); virtual ~AnnotMarkup(); // getters @@ -620,6 +696,7 @@ void setPopup(AnnotPopup *new_popup); void setLabel(GooString *new_label); void setOpacity(double opacityA); + void setDate(GooString *new_date); protected: GooString *label; // T (Default autor) @@ -636,7 +713,7 @@ AnnotExternalDataType exData; // ExData private: - void initialize(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + void initialize(PDFDoc *docA, Dict *dict, Object *obj); }; //------------------------------------------------------------------------ @@ -658,8 +735,8 @@ stateNone // None }; - AnnotText(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotText(PDFDoc *docA, PDFRectangle *rect); + AnnotText(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotText(); virtual void draw(Gfx *gfx, GBool printing); @@ -674,7 +751,7 @@ private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); GBool open; // Open (Default false) GooString *icon; // Name (Default Note) @@ -691,8 +768,8 @@ class AnnotMovie: public Annot { public: - AnnotMovie(XRef *xrefA, PDFRectangle *rect, Movie *movieA, Catalog *catalog); - AnnotMovie(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotMovie(PDFDoc *docA, PDFRectangle *rect, Movie *movieA); + AnnotMovie(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotMovie(); virtual void draw(Gfx *gfx, GBool printing); @@ -701,7 +778,7 @@ Movie* getMovie() { return movie; } private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); GooString* title; // T Movie* movie; // Movie + A @@ -715,8 +792,8 @@ class AnnotScreen: public Annot { public: - AnnotScreen(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotScreen(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotScreen(PDFDoc *docA, PDFRectangle *rect); + AnnotScreen(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotScreen(); GooString* getTitle() { return title; } @@ -726,7 +803,7 @@ Object* getAdditionActions() { return &additionAction; } private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); GooString* title; // T @@ -751,8 +828,8 @@ effectPush // P }; - AnnotLink(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotLink(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotLink(PDFDoc *docA, PDFRectangle *rect); + AnnotLink(PDFDoc *docA, Dict *dict, Object *obj); virtual ~AnnotLink(); virtual void draw(Gfx *gfx, GBool printing); @@ -765,7 +842,7 @@ protected: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); LinkAction *action; // A, Dest AnnotLinkEffect linkEffect; // H (Default I) @@ -793,10 +870,19 @@ intentFreeTextTypeWriter // FreeTextTypeWriter }; - AnnotFreeText(XRef *xrefA, PDFRectangle *rect, GooString *da, Catalog *catalog); - AnnotFreeText(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotFreeText(PDFDoc *docA, PDFRectangle *rect, GooString *da); + AnnotFreeText(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotFreeText(); + virtual void draw(Gfx *gfx, GBool printing); + virtual Object *getAppearanceResDict(Object *dest); + + void setAppearanceString(GooString *new_string); + void setQuadding(AnnotFreeTextQuadding new_quadding); + void setStyleString(GooString *new_string); + void setCalloutLine(AnnotCalloutLine *line); + void setIntent(AnnotFreeTextIntent new_intent); + // getters GooString *getAppearanceString() const { return appearanceString; } AnnotFreeTextQuadding getQuadding() const { return quadding; } @@ -810,7 +896,9 @@ protected: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); + static void parseAppearanceString(GooString *da, double &fontsize, AnnotColor* &fontcolor); + void generateFreeTextAppearance(); // required GooString *appearanceString; // DA @@ -845,11 +933,20 @@ captionPosTop // Top }; - AnnotLine(XRef *xrefA, PDFRectangle *rect, PDFRectangle *lRect, Catalog *catalog); - AnnotLine(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotLine(PDFDoc *docA, PDFRectangle *rect, PDFRectangle *lRect); + AnnotLine(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotLine(); virtual void draw(Gfx *gfx, GBool printing); + virtual Object *getAppearanceResDict(Object *dest); + + void setVertices(double x1, double y1, double x2, double y2); + void setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end); + void setInteriorColor(AnnotColor *new_color); + void setLeaderLineLength(double len); + void setLeaderLineExtension(double len); + void setCaption(bool new_cap); + void setIntent(AnnotLineIntent new_intent); // getters AnnotLineEndingStyle getStartStyle() const { return startStyle; } @@ -871,7 +968,8 @@ protected: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); + void generateLineAppearance(); // required AnnotCoord *coord1, *coord2; @@ -900,18 +998,23 @@ class AnnotTextMarkup: public AnnotMarkup { public: - AnnotTextMarkup(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, - AnnotQuadrilaterals *quadPoints, Catalog *catalog); - AnnotTextMarkup(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotTextMarkup(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType, + AnnotQuadrilaterals *quadPoints); + AnnotTextMarkup(PDFDoc *docA, Dict *dict, Object *obj); virtual ~AnnotTextMarkup(); virtual void draw(Gfx *gfx, GBool printing); + // typeHighlight, typeUnderline, typeSquiggly or typeStrikeOut + void setType(AnnotSubtype new_type); + + void setQuadrilaterals(AnnotQuadrilaterals *quadPoints); + AnnotQuadrilaterals *getQuadrilaterals() const { return quadrilaterals; } protected: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); AnnotQuadrilaterals *quadrilaterals; // QuadPoints }; @@ -923,16 +1026,18 @@ class AnnotStamp: public AnnotMarkup { public: - AnnotStamp(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotStamp(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotStamp(PDFDoc *docA, PDFRectangle *rect); + AnnotStamp(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotStamp(); + void setIcon(GooString *new_icon); + // getters GooString *getIcon() const { return icon; } private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); GooString *icon; // Name (Default Draft) }; @@ -944,12 +1049,15 @@ class AnnotGeometry: public AnnotMarkup { public: - AnnotGeometry(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, Catalog *catalog); - AnnotGeometry(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotGeometry(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType); + AnnotGeometry(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotGeometry(); virtual void draw(Gfx *gfx, GBool printing); + void setType(AnnotSubtype new_type); // typeSquare or typeCircle + void setInteriorColor(AnnotColor *new_color); + // getters AnnotColor *getInteriorColor() const { return interiorColor; } AnnotBorderEffect *getBorderEffect() const { return borderEffect; } @@ -957,7 +1065,7 @@ private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); AnnotColor *interiorColor; // IC AnnotBorderEffect *borderEffect; // BE @@ -977,11 +1085,18 @@ polygonDimension // PolygonDimension }; - AnnotPolygon(XRef *xrefA, PDFRectangle *rect, AnnotSubtype subType, - AnnotPath *path, Catalog *catalog); - AnnotPolygon(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotPolygon(PDFDoc *docA, PDFRectangle *rect, AnnotSubtype subType, AnnotPath *path); + AnnotPolygon(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotPolygon(); + virtual void draw(Gfx *gfx, GBool printing); + + void setType(AnnotSubtype new_type); // typePolygon or typePolyLine + void setVertices(AnnotPath *path); + void setStartEndStyle(AnnotLineEndingStyle start, AnnotLineEndingStyle end); + void setInteriorColor(AnnotColor *new_color); + void setIntent(AnnotPolygonIntent new_intent); + // getters AnnotPath *getVertices() const { return vertices; } AnnotLineEndingStyle getStartStyle() const { return startStyle; } @@ -992,7 +1107,7 @@ private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); // required AnnotPath *vertices; // Vertices @@ -1020,17 +1135,19 @@ symbolP // P }; - AnnotCaret(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - AnnotCaret(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotCaret(PDFDoc *docA, PDFRectangle *rect); + AnnotCaret(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotCaret(); + void setSymbol(AnnotCaretSymbol new_symbol); + // getters AnnotCaretSymbol getSymbol() const { return symbol; } PDFRectangle *getCaretRect() const { return caretRect; } private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); AnnotCaretSymbol symbol; // Sy (Default None) PDFRectangle *caretRect; // RD (combined with Rect) @@ -1043,17 +1160,24 @@ class AnnotInk: public AnnotMarkup { public: - AnnotInk(XRef *xrefA, PDFRectangle *rect, AnnotPath **paths, int n_paths, Catalog *catalog); - AnnotInk(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotInk(PDFDoc *docA, PDFRectangle *rect, AnnotPath **paths, int n_paths); + AnnotInk(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotInk(); + virtual void draw(Gfx *gfx, GBool printing); + + void setInkList(AnnotPath **paths, int n_paths); + // getters AnnotPath **getInkList() const { return inkList; } int getInkListLength() const { return inkListLength; } private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); + void writeInkList(AnnotPath **paths, int n_paths, Array *dest_array); + void parseInkList(Array *src_array); + void freeInkList(); // required AnnotPath **inkList; // InkList @@ -1071,8 +1195,8 @@ class AnnotFileAttachment: public AnnotMarkup { public: - AnnotFileAttachment(XRef *xrefA, PDFRectangle *rect, GooString *filename, Catalog *catalog); - AnnotFileAttachment(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotFileAttachment(PDFDoc *docA, PDFRectangle *rect, GooString *filename); + AnnotFileAttachment(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotFileAttachment(); virtual void draw(Gfx *gfx, GBool printing); @@ -1083,7 +1207,7 @@ private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); // required Object file; // FS @@ -1099,8 +1223,8 @@ class AnnotSound: public AnnotMarkup { public: - AnnotSound(XRef *xrefA, PDFRectangle *rect, Sound *soundA, Catalog *catalog); - AnnotSound(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + AnnotSound(PDFDoc *docA, PDFRectangle *rect, Sound *soundA); + AnnotSound(PDFDoc *docA, Dict *dict, Object *obj); ~AnnotSound(); virtual void draw(Gfx *gfx, GBool printing); @@ -1111,7 +1235,7 @@ private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); // required Sound *sound; // Sound @@ -1134,8 +1258,8 @@ highlightModePush // P,T }; - AnnotWidget(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); - AnnotWidget(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj, FormField *fieldA); + AnnotWidget(PDFDoc *docA, Dict *dict, Object *obj); + AnnotWidget(PDFDoc *docA, Dict *dict, Object *obj, FormField *fieldA); virtual ~AnnotWidget(); virtual void draw(Gfx *gfx, GBool printing); @@ -1154,7 +1278,7 @@ private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); void drawText(GooString *text, GooString *da, GfxResources *resources, GBool multiline, int comb, int quadding, @@ -1162,10 +1286,6 @@ GBool password=false); void drawListBox(FormFieldChoice *fieldChoice, GooString *da, GfxResources *resources, int quadding); - void layoutText(GooString *text, GooString *outBuf, int *i, GfxFont *font, - double *width, double widthLimit, int *charCount, - GBool noReencode); - void writeString(GooString *str, GooString *appearBuf); Form *form; FormField *field; // FormField object for this annotation @@ -1225,15 +1345,15 @@ }; public: - Annot3D(XRef *xrefA, PDFRectangle *rect, Catalog *catalog); - Annot3D(XRef *xrefA, Dict *dict, Catalog *catalog, Object *obj); + Annot3D(PDFDoc *docA, PDFRectangle *rect); + Annot3D(PDFDoc *docA, Dict *dict, Object *obj); ~Annot3D(); // getters private: - void initialize(XRef *xrefA, Catalog *catalog, Dict *dict); + void initialize(PDFDoc *docA, Dict *dict); Activation *activation; // 3DA }; @@ -1246,7 +1366,7 @@ public: // Build a list of Annot objects. - Annots(XRef *xref, Catalog *catalog, Object *annotsObj); + Annots(PDFDoc *docA, Object *annotsObj); ~Annots(); @@ -1254,11 +1374,13 @@ int getNumAnnots() { return nAnnots; } Annot *getAnnot(int i) { return annots[i]; } void appendAnnot(Annot *annot); + GBool removeAnnot(Annot *annot); private: - Annot* createAnnot(XRef *xref, Dict* dict, Catalog *catalog, Object *obj); + Annot* createAnnot(Dict* dict, Object *obj); Annot *findAnnot(Ref *ref); + PDFDoc *doc; Annot **annots; int nAnnots; int size; diff -Nru poppler-0.18.4/poppler/Array.cc poppler-0.20.5/poppler/Array.cc --- poppler-0.18.4/poppler/Array.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/Array.cc 2012-05-10 20:05:44.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Kristian Høgsberg +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -64,6 +65,18 @@ ++length; } +void Array::remove(int i) { + if (i < 0 || i >= length) { +#ifdef DEBUG_MEM + abort(); +#else + return; +#endif + } + --length; + memmove( elems + i, elems + i + 1, sizeof(elems[0]) * (length - i) ); +} + Object *Array::get(int i, Object *obj) { if (i < 0 || i >= length) { #ifdef DEBUG_MEM diff -Nru poppler-0.18.4/poppler/Array.h poppler-0.20.5/poppler/Array.h --- poppler-0.18.4/poppler/Array.h 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/Array.h 2012-05-10 20:05:44.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Kristian Høgsberg +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -54,6 +55,9 @@ // Add an element. void add(Object *elem); + // Remove an element by position + void remove(int i); + // Accessors. Object *get(int i, Object *obj); Object *getNF(int i, Object *obj); diff -Nru poppler-0.18.4/poppler/ArthurOutputDev.cc poppler-0.20.5/poppler/ArthurOutputDev.cc --- poppler-0.18.4/poppler/ArthurOutputDev.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/ArthurOutputDev.cc 2012-05-10 20:05:44.000000000 +0000 @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Brad Hards -// Copyright (C) 2005-2009, 2011 Albert Astals Cid +// Copyright (C) 2005-2009, 2011, 2012 Albert Astals Cid // Copyright (C) 2008, 2010 Pino Toscano // Copyright (C) 2009, 2011 Carlos Garcia Campos // Copyright (C) 2009 Petr Gajdos @@ -42,7 +42,6 @@ #include "GfxState.h" #include "GfxFont.h" #include "Link.h" -#include "CharCodeToUnicode.h" #include "FontEncodingTables.h" #include #include "ArthurOutputDev.h" @@ -269,18 +268,17 @@ { #ifdef HAVE_SPLASH GfxFont *gfxFont; + GfxFontLoc *fontLoc; GfxFontType fontType; SplashOutFontFileID *id; SplashFontFile *fontFile; SplashFontSrc *fontsrc = NULL; FoFiTrueType *ff; - Ref embRef; Object refObj, strObj; GooString *fileName; char *tmpBuf; int tmpBufLen; - Gushort *codeToGID; - DisplayFontParam *dfp; + int *codeToGID; double *textMat; double m11, m12, m21, m22, fontSize; SplashCoord mat[4]; @@ -292,6 +290,7 @@ m_font = NULL; fileName = NULL; tmpBuf = NULL; + fontLoc = NULL; if (!(gfxFont = state->getFont())) { goto err1; @@ -308,36 +307,24 @@ } else { - // if there is an embedded font, write it to disk - if (gfxFont->getEmbeddedFontID(&embRef)) { + if (!(fontLoc = gfxFont->locateFont(xref, gFalse))) { + error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", + gfxFont->getName() ? gfxFont->getName()->getCString() + : "(unnamed)"); + goto err2; + } + + // embedded font + if (fontLoc->locType == gfxFontLocEmbedded) { + // if there is an embedded font, read it to memory tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen); if (! tmpBuf) goto err2; - // if there is an external font file, use it - } else if (!(fileName = gfxFont->getExtFontFile())) { - // look for a display font mapping or a substitute font - dfp = NULL; - if (gfxFont->getName()) { - dfp = globalParams->getDisplayFont(gfxFont); - } - if (!dfp) { - error(-1, "Couldn't find a font for '%s'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - goto err2; - } - switch (dfp->kind) { - case displayFontT1: - fileName = dfp->t1.fileName; - fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1; - break; - case displayFontTT: - fileName = dfp->tt.fileName; - fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType; - faceIndex = dfp->tt.faceIndex; - break; - } + // external font + } else { // gfxFontLocExternal + fileName = fontLoc->path; + fontType = fontLoc->fontType; } fontsrc = new SplashFontSrc; @@ -345,15 +332,15 @@ fontsrc->setFile(fileName, gFalse); else fontsrc->setBuf(tmpBuf, tmpBufLen, gTrue); - + // load the font file switch (fontType) { case fontType1: if (!(fontFile = m_fontEngine->loadType1Font( id, fontsrc, - ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(-1, "Couldn't create a font for '%s'", + (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -363,8 +350,8 @@ if (!(fontFile = m_fontEngine->loadType1CFont( id, fontsrc, - ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(-1, "Couldn't create a font for '%s'", + (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -374,8 +361,8 @@ if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont( id, fontsrc, - ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(-1, "Couldn't create a font for '%s'", + (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -399,7 +386,7 @@ id, fontsrc, codeToGID, n))) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -410,17 +397,27 @@ if (!(fontFile = m_fontEngine->loadCIDFont( id, fontsrc))) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; } break; case fontCIDType0COT: + if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); + codeToGID = (int *)gmallocn(n, sizeof(int)); + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), + n * sizeof(int)); + } else { + codeToGID = NULL; + n = 0; + } if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont( id, - fontsrc))) { - error(-1, "Couldn't create a font for '%s'", + fontsrc, + codeToGID, n))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -433,7 +430,7 @@ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); if (n) { - codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); + codeToGID = (int *)gmallocn(n, sizeof(int)); memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(Gushort)); } @@ -451,7 +448,7 @@ id, fontsrc, codeToGID, n, faceIndex))) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -486,12 +483,14 @@ mat[2] = m21; mat[3] = -m22; m_font = m_fontEngine->getFont(fontFile, mat, matrix); + delete fontLoc; if (fontsrc && !fontsrc->isFile) fontsrc->unref(); return; err2: delete id; + delete fontLoc; err1: if (fontsrc && !fontsrc->isFile) fontsrc->unref(); diff -Nru poppler-0.18.4/poppler/BuiltinFont.cc poppler-0.20.5/poppler/BuiltinFont.cc --- poppler-0.18.4/poppler/BuiltinFont.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/BuiltinFont.cc 2012-05-10 20:05:44.000000000 +0000 @@ -39,7 +39,7 @@ gfree(tab); } -GBool BuiltinFontWidths::getWidth(char *name, Gushort *width) { +GBool BuiltinFontWidths::getWidth(const char *name, Gushort *width) { int h; BuiltinFontWidth *p; @@ -53,8 +53,8 @@ return gFalse; } -int BuiltinFontWidths::hash(char *name) { - char *p; +int BuiltinFontWidths::hash(const char *name) { + const char *p; unsigned int h; h = 0; diff -Nru poppler-0.18.4/poppler/BuiltinFont.h poppler-0.20.5/poppler/BuiltinFont.h --- poppler-0.18.4/poppler/BuiltinFont.h 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/BuiltinFont.h 2012-05-10 20:05:44.000000000 +0000 @@ -21,8 +21,8 @@ //------------------------------------------------------------------------ struct BuiltinFont { - char *name; - char **defaultBaseEnc; + const char *name; + const char **defaultBaseEnc; short ascent; short descent; short bbox[4]; @@ -32,7 +32,7 @@ //------------------------------------------------------------------------ struct BuiltinFontWidth { - char *name; + const char *name; Gushort width; BuiltinFontWidth *next; }; @@ -42,11 +42,11 @@ BuiltinFontWidths(BuiltinFontWidth *widths, int sizeA); ~BuiltinFontWidths(); - GBool getWidth(char *name, Gushort *width); + GBool getWidth(const char *name, Gushort *width); private: - int hash(char *name); + int hash(const char *name); BuiltinFontWidth **tab; int size; diff -Nru poppler-0.18.4/poppler/CMap.cc poppler-0.20.5/poppler/CMap.cc --- poppler-0.18.4/poppler/CMap.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/CMap.cc 2012-05-10 20:05:44.000000000 +0000 @@ -62,6 +62,75 @@ //------------------------------------------------------------------------ +CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Object *obj) { + CMap *cMap; + GooString *cMapNameA; + + if (obj->isName()) { + cMapNameA = new GooString(obj->getName()); + if (!(cMap = globalParams->getCMap(collectionA, cMapNameA))) { + error(errSyntaxError, -1, + "Unknown CMap '{0:t}' for character collection '{1:t}'", + cMapNameA, collectionA); + } + delete cMapNameA; + } else if (obj->isStream()) { + if (!(cMap = CMap::parse(NULL, collectionA, obj->getStream()))) { + error(errSyntaxError, -1, "Invalid CMap in Type 0 font"); + } + } else { + error(errSyntaxError, -1, "Invalid Encoding in Type 0 font"); + return NULL; + } + return cMap; +} + +CMap *CMap::parse(CMapCache *cache, GooString *collectionA, + GooString *cMapNameA) { + FILE *f; + CMap *cMap; + + if (!(f = globalParams->findCMapFile(collectionA, cMapNameA))) { + + // Check for an identity CMap. + if (!cMapNameA->cmp("Identity") || !cMapNameA->cmp("Identity-H")) { + return new CMap(collectionA->copy(), cMapNameA->copy(), 0); + } + if (!cMapNameA->cmp("Identity-V")) { + return new CMap(collectionA->copy(), cMapNameA->copy(), 1); + } + + error(errSyntaxError, -1, + "Couldn't find '{0:t}' CMap file for '{1:t}' collection", + cMapNameA, collectionA); + return NULL; + } + + cMap = new CMap(collectionA->copy(), cMapNameA->copy()); + cMap->parse2(cache, &getCharFromFile, f); + + fclose(f); + + return cMap; +} + +CMap *CMap::parse(CMapCache *cache, GooString *collectionA, Stream *str) { + Object obj1; + CMap *cMap; + + cMap = new CMap(collectionA->copy(), NULL); + + if (!str->getDict()->lookup("UseCMap", &obj1)->isNull()) { + cMap->useCMap(cache, &obj1); + } + obj1.free(); + + str->reset(); + cMap->parse2(cache, &getCharFromStream, str); + str->close(); + return cMap; +} + CMap *CMap::parse(CMapCache *cache, GooString *collectionA, GooString *cMapNameA, Stream *stream) { FILE *f = NULL; @@ -85,8 +154,8 @@ return new CMap(collectionA->copy(), cMapNameA->copy(), 1); } - error(-1, "Couldn't find '%s' CMap file for '%s' collection", - cMapNameA->getCString(), collectionA->getCString()); + error(errSyntaxError, -1, "Couldn't find '{0:t}' CMap file for '{1:t}' collection", + cMapNameA, collectionA); return NULL; } pst = new PSTokenizer(&getCharFromFile, f); @@ -104,14 +173,40 @@ } else if (!strcmp(tok1, "/WMode")) { cmap->wMode = atoi(tok2); pst->getToken(tok1, sizeof(tok1), &n1); - } else if (!strcmp(tok2, "begincodespacerange")) { + } else if (!strcmp(tok2, "begincidchar")) { + while (pst->getToken(tok1, sizeof(tok1), &n1)) { + if (!strcmp(tok1, "endcidchar")) { + break; + } + if (!pst->getToken(tok2, sizeof(tok2), &n2) || + !strcmp(tok2, "endcidchar")) { + error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); + break; + } + if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && + n1 >= 4 && (n1 & 1) == 0)) { + error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); + continue; + } + tok1[n1 - 1] = '\0'; + if (sscanf(tok1 + 1, "%x", &code) != 1) { + error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); + continue; + } + n1 = (n1 - 2) / 2; + cmap->addCIDs(code, code, n1, (CID)atoi(tok2)); + } + pst->getToken(tok1, sizeof(tok1), &n1); + } else if (!strcmp(tok2, "begincidrange")) { while (pst->getToken(tok1, sizeof(tok1), &n1)) { - if (!strcmp(tok1, "endcodespacerange")) { + if (!strcmp(tok1, "endcidrange")) { break; } if (!pst->getToken(tok2, sizeof(tok2), &n2) || - !strcmp(tok2, "endcodespacerange")) { - error(-1, "Illegal entry in codespacerange block in CMap"); + !strcmp(tok2, "endcidrange") || + !pst->getToken(tok3, sizeof(tok3), &n3) || + !strcmp(tok3, "endcidrange")) { + error(errSyntaxError, -1, "Illegal entry in cidrange block in CMap"); break; } if (tok1[0] == '<' && tok2[0] == '<' && @@ -120,10 +215,40 @@ sscanf(tok1 + 1, "%x", &start); sscanf(tok2 + 1, "%x", &end); n1 = (n1 - 2) / 2; - cmap->addCodeSpace(cmap->vector, start, end, n1); + cmap->addCIDs(start, end, n1, (CID)atoi(tok3)); } } pst->getToken(tok1, sizeof(tok1), &n1); + } else { + strcpy(tok1, tok2); + } + } + delete pst; + + if (f) { + fclose(f); + } + + return cmap; +} + +void CMap::parse2(CMapCache *cache, int (*getCharFunc)(void *), void *data) { + PSTokenizer *pst; + char tok1[256], tok2[256], tok3[256]; + int n1, n2, n3; + Guint start, end, code; + + pst = new PSTokenizer(getCharFunc, data); + pst->getToken(tok1, sizeof(tok1), &n1); + while (pst->getToken(tok2, sizeof(tok2), &n2)) { + if (!strcmp(tok2, "usecmap")) { + if (tok1[0] == '/') { + useCMap(cache, tok1 + 1); + } + pst->getToken(tok1, sizeof(tok1), &n1); + } else if (!strcmp(tok1, "/WMode")) { + wMode = atoi(tok2); + pst->getToken(tok1, sizeof(tok1), &n1); } else if (!strcmp(tok2, "begincidchar")) { while (pst->getToken(tok1, sizeof(tok1), &n1)) { if (!strcmp(tok1, "endcidchar")) { @@ -131,21 +256,21 @@ } if (!pst->getToken(tok2, sizeof(tok2), &n2) || !strcmp(tok2, "endcidchar")) { - error(-1, "Illegal entry in cidchar block in CMap"); + error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); break; } if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && n1 >= 4 && (n1 & 1) == 0)) { - error(-1, "Illegal entry in cidchar block in CMap"); + error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); continue; } tok1[n1 - 1] = '\0'; if (sscanf(tok1 + 1, "%x", &code) != 1) { - error(-1, "Illegal entry in cidchar block in CMap"); + error(errSyntaxError, -1, "Illegal entry in cidchar block in CMap"); continue; } n1 = (n1 - 2) / 2; - cmap->addCIDs(code, code, n1, (CID)atoi(tok2)); + addCIDs(code, code, n1, (CID)atoi(tok2)); } pst->getToken(tok1, sizeof(tok1), &n1); } else if (!strcmp(tok2, "begincidrange")) { @@ -157,7 +282,7 @@ !strcmp(tok2, "endcidrange") || !pst->getToken(tok3, sizeof(tok3), &n3) || !strcmp(tok3, "endcidrange")) { - error(-1, "Illegal entry in cidrange block in CMap"); + error(errSyntaxError, -1, "Illegal entry in cidrange block in CMap"); break; } if (tok1[0] == '<' && tok2[0] == '<' && @@ -166,7 +291,7 @@ sscanf(tok1 + 1, "%x", &start); sscanf(tok2 + 1, "%x", &end); n1 = (n1 - 2) / 2; - cmap->addCIDs(start, end, n1, (CID)atoi(tok3)); + addCIDs(start, end, n1, (CID)atoi(tok3)); } } pst->getToken(tok1, sizeof(tok1), &n1); @@ -175,12 +300,6 @@ } } delete pst; - - if (f) { - fclose(f); - } - - return cmap; } CMap::CMap(GooString *collectionA, GooString *cMapNameA) { @@ -188,6 +307,7 @@ collection = collectionA; cMapName = cMapNameA; + isIdent = gFalse; wMode = 0; vector = (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry)); for (i = 0; i < 256; ++i) { @@ -203,6 +323,7 @@ CMap::CMap(GooString *collectionA, GooString *cMapNameA, int wModeA) { collection = collectionA; cMapName = cMapNameA; + isIdent = gTrue; wMode = wModeA; vector = NULL; refCnt = 1; @@ -216,12 +337,37 @@ CMap *subCMap; useNameStr = new GooString(useName); - subCMap = cache->getCMap(collection, useNameStr, NULL); + // if cache is non-NULL, we already have a lock, and we can use + // CMapCache::getCMap() directly; otherwise, we need to use + // GlobalParams::getCMap() in order to acqure the lock need to use + // GlobalParams::getCMap + if (cache) { + subCMap = cache->getCMap(collection, useNameStr, NULL); + } else { + subCMap = globalParams->getCMap(collection, useNameStr); + } delete useNameStr; if (!subCMap) { return; } - copyVector(vector, subCMap->vector); + isIdent = subCMap->isIdent; + if (subCMap->vector) { + copyVector(vector, subCMap->vector); + } + subCMap->decRefCnt(); +} + +void CMap::useCMap(CMapCache *cache, Object *obj) { + CMap *subCMap; + + subCMap = CMap::parse(cache, collection, obj); + if (!subCMap) { + return; + } + isIdent = subCMap->isIdent; + if (subCMap->vector) { + copyVector(vector, subCMap->vector); + } subCMap->decRefCnt(); } @@ -242,7 +388,7 @@ copyVector(dest[i].vector, src[i].vector); } else { if (dest[i].isVector) { - error(-1, "Collision in usecmap"); + error(errSyntaxError, -1, "Collision in usecmap"); } else { dest[i].cid = src[i].cid; } @@ -250,52 +396,32 @@ } } -void CMap::addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end, - Guint nBytes) { - Guint start2, end2; - int startByte, endByte, i, j; - - if (nBytes > 1) { - startByte = (start >> (8 * (nBytes - 1))) & 0xff; - endByte = (end >> (8 * (nBytes - 1))) & 0xff; - start2 = start & ((1 << (8 * (nBytes - 1))) - 1); - end2 = end & ((1 << (8 * (nBytes - 1))) - 1); - for (i = startByte; i <= endByte; ++i) { - if (!vec[i].isVector) { - vec[i].isVector = gTrue; - vec[i].vector = - (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry)); - for (j = 0; j < 256; ++j) { - vec[i].vector[j].isVector = gFalse; - vec[i].vector[j].cid = 0; - } - } - addCodeSpace(vec[i].vector, start2, end2, nBytes - 1); - } - } -} - void CMap::addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID) { CMapVectorEntry *vec; CID cid; int byte; - Guint i; + Guint i, j; vec = vector; for (i = nBytes - 1; i >= 1; --i) { byte = (start >> (8 * i)) & 0xff; if (!vec[byte].isVector) { - error(-1, "Invalid CID (%0*x - %0*x) in CMap", - 2*nBytes, start, 2*nBytes, end); - return; + vec[byte].isVector = gTrue; + vec[byte].vector = + (CMapVectorEntry *)gmallocn(256, sizeof(CMapVectorEntry)); + for (j = 0; j < 256; ++j) { + vec[byte].vector[j].isVector = gFalse; + vec[byte].vector[j].cid = 0; + } } vec = vec[byte].vector; } cid = firstCID; for (byte = (int)(start & 0xff); byte <= (int)(end & 0xff); ++byte) { if (vec[byte].isVector) { - error(-1, "Invalid CID (%0*x - %0*x) in CMap", - 2*nBytes, start, 2*nBytes, end); + error(errSyntaxError, -1, + "Invalid CID ({0:x} - {1:x} [{2:d} bytes]) in CMap", + start, end, nBytes); } else { vec[byte].cid = cid; } @@ -354,31 +480,33 @@ return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA); } -CID CMap::getCID(char *s, int len, int *nUsed) { +CID CMap::getCID(char *s, int len, CharCode *c, int *nUsed) { CMapVectorEntry *vec; + CharCode cc; int n, i; - if (!(vec = vector)) { - // identity CMap - *nUsed = 2; - if (len < 2) { - return 0; - } - return ((s[0] & 0xff) << 8) + (s[1] & 0xff); - } + vec = vector; + cc = 0; n = 0; - while (1) { - if (n >= len) { - *nUsed = n; - return 0; - } + while (vec && n < len) { i = s[n++] & 0xff; + cc = (cc << 8) | i; if (!vec[i].isVector) { + *c = cc; *nUsed = n; return vec[i].cid; } vec = vec[i].vector; } + if (isIdent && len >= 2) { + // identity CMap + *nUsed = 2; + *c = cc = ((s[0] & 0xff) << 8) + (s[1] & 0xff); + return cc; + } + *nUsed = 1; + *c = s[0] & 0xff; + return 0; } void CMap::setReverseMapVector(Guint startCode, CMapVectorEntry *vec, diff -Nru poppler-0.18.4/poppler/CMap.h poppler-0.20.5/poppler/CMap.h --- poppler-0.18.4/poppler/CMap.h 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/CMap.h 2012-05-10 20:05:44.000000000 +0000 @@ -15,6 +15,7 @@ // // Copyright (C) 2008 Koji Otani // Copyright (C) 2009 Albert Astals Cid +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -37,6 +38,7 @@ #endif class GooString; +class Object; struct CMapVectorEntry; class CMapCache; class Stream; @@ -46,6 +48,19 @@ class CMap { public: + // Parse a CMap from , which can be a name or a stream. Sets + // the initial reference count to 1. Returns NULL on failure. + static CMap *parse(CMapCache *cache, GooString *collectionA, Object *obj); + + // Create the CMap specified by and . Sets + // the initial reference count to 1. Returns NULL on failure. + static CMap *parse(CMapCache *cache, GooString *collectionA, + GooString *cMapNameA); + + // Parse a CMap from . Sets the initial reference count to 1. + // Returns NULL on failure. + static CMap *parse(CMapCache *cache, GooString *collectionA, Stream *str); + // Create the CMap specified by and . Sets // the initial reference count to 1. // Stream is a stream containing the CMap, can be NULL and @@ -62,14 +77,16 @@ // Return collection name (-). GooString *getCollection() { return collection; } + GooString *getCMapName() { return cMapName; } + // Return true if this CMap matches the specified , and // . GBool match(GooString *collectionA, GooString *cMapNameA); // Return the CID corresponding to the character code starting at - // , which contains bytes. Sets * to the number of - // bytes used by the char code. - CID getCID(char *s, int len, int *nUsed); + // , which contains bytes. Sets * to the char code, and + // * to the number of bytes used by the char code. + CID getCID(char *s, int len, CharCode *c, int *nUsed); // Return the writing mode (0=horizontal, 1=vertical). int getWMode() { return wMode; } @@ -78,12 +95,12 @@ private: + void parse2(CMapCache *cache, int (*getCharFunc)(void *), void *data); CMap(GooString *collectionA, GooString *cMapNameA); CMap(GooString *collectionA, GooString *cMapNameA, int wModeA); void useCMap(CMapCache *cache, char *useName); + void useCMap(CMapCache *cache, Object *obj); void copyVector(CMapVectorEntry *dest, CMapVectorEntry *src); - void addCodeSpace(CMapVectorEntry *vec, Guint start, Guint end, - Guint nBytes); void addCIDs(Guint start, Guint end, Guint nBytes, CID firstCID); void freeCMapVector(CMapVectorEntry *vec); void setReverseMapVector(Guint startCode, CMapVectorEntry *vec, @@ -91,6 +108,8 @@ GooString *collection; GooString *cMapName; + GBool isIdent; // true if this CMap is an identity mapping, + // or is based on one (via usecmap) int wMode; // writing mode (0=horizontal, 1=vertical) CMapVectorEntry *vector; // vector for first byte (NULL for // identity CMap) diff -Nru poppler-0.18.4/poppler/CachedFile.cc poppler-0.20.5/poppler/CachedFile.cc --- poppler-0.18.4/poppler/CachedFile.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/CachedFile.cc 2012-05-10 20:05:44.000000000 +0000 @@ -33,7 +33,7 @@ chunks->resize(length/CachedFileChunkSize + 1); } else { - error(-1, "Failed to initialize file cache for '%s'.", uri->getCString()); + error(errInternal, -1, "Failed to initialize file cache for '{0:t}'.", uri); chunks->resize(0); } } diff -Nru poppler-0.18.4/poppler/CairoFontEngine.cc poppler-0.20.5/poppler/CairoFontEngine.cc --- poppler-0.18.4/poppler/CairoFontEngine.cc 2012-02-15 17:09:38.000000000 +0000 +++ poppler-0.20.5/poppler/CairoFontEngine.cc 2012-05-10 20:05:44.000000000 +0000 @@ -17,11 +17,11 @@ // Copyright (C) 2005-2007 Jeff Muizelaar // Copyright (C) 2005, 2006 Kristian Høgsberg // Copyright (C) 2005 Martin Kretzschmar -// Copyright (C) 2005, 2009 Albert Astals Cid +// Copyright (C) 2005, 2009, 2012 Albert Astals Cid // Copyright (C) 2006, 2007, 2010, 2011 Carlos Garcia Campos // Copyright (C) 2007 Koji Otani // Copyright (C) 2008, 2009 Chris Wilson -// Copyright (C) 2008 Adrian Johnson +// Copyright (C) 2008, 2012 Adrian Johnson // Copyright (C) 2009 Darren Kenny // Copyright (C) 2010 Suzuki Toshiya // Copyright (C) 2010 Jan Kümmel @@ -38,7 +38,6 @@ #include #include "CairoFontEngine.h" #include "CairoOutputDev.h" -#include "CharCodeToUnicode.h" #include "GlobalParams.h" #include #include @@ -66,7 +65,7 @@ CairoFont::CairoFont(Ref ref, cairo_font_face_t *cairo_font_face, - Gushort *codeToGID, + int *codeToGID, Guint codeToGIDLen, GBool substitute, GBool printing) : ref(ref), @@ -368,7 +367,7 @@ CairoFreeTypeFont::CairoFreeTypeFont(Ref ref, cairo_font_face_t *cairo_font_face, - Gushort *codeToGID, + int *codeToGID, Guint codeToGIDLen, GBool substitute) : CairoFont(ref, cairo_font_face, @@ -381,15 +380,14 @@ CairoFreeTypeFont *CairoFreeTypeFont::create(GfxFont *gfxFont, XRef *xref, FT_Library lib, GBool useCIDs) { - Ref embRef; Object refObj, strObj; GooString *fileName; char *fileNameC; char *font_data; int font_data_len; - DisplayFontParam *dfp; int i, n; GfxFontType fontType; + GfxFontLoc *fontLoc; char **enc; char *name; FoFiTrueType *ff; @@ -398,10 +396,9 @@ FT_Face face; cairo_font_face_t *font_face; - Gushort *codeToGID; + int *codeToGID; Guint codeToGIDLen; - dfp = NULL; codeToGID = NULL; codeToGIDLen = 0; font_data = NULL; @@ -414,32 +411,23 @@ ref = *gfxFont->getID(); fontType = gfxFont->getType(); - if (gfxFont->getEmbeddedFontID(&embRef)) { + if (!(fontLoc = gfxFont->locateFont(xref, gFalse))) { + error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", + gfxFont->getName() ? gfxFont->getName()->getCString() + : "(unnamed)"); + goto err2; + } + + // embedded font + if (fontLoc->locType == gfxFontLocEmbedded) { font_data = gfxFont->readEmbFontFile(xref, &font_data_len); if (NULL == font_data) goto err2; - } else if (!(fileName = gfxFont->getExtFontFile())) { - // look for a display font mapping or a substitute font - dfp = NULL; - if (gfxFont->getName()) { - dfp = globalParams->getDisplayFont(gfxFont); - } - if (!dfp) { - error(-1, "Couldn't find a font for '%s'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - goto err2; - } - switch (dfp->kind) { - case displayFontT1: - fileName = dfp->t1.fileName; - fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1; - break; - case displayFontTT: - fileName = dfp->tt.fileName; - fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType; - break; - } + + // external font + } else { // gfxFontLocExternal + fileName = fontLoc->path; + fontType = fontLoc->fontType; substitute = gTrue; } @@ -452,18 +440,18 @@ case fontType1C: case fontType1COT: if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { - error(-1, "could not create type1 face"); + error(errSyntaxError, -1, "could not create type1 face"); goto err2; } enc = ((Gfx8BitFont *)gfxFont)->getEncoding(); - codeToGID = (Gushort *)gmallocn(256, sizeof(int)); + codeToGID = (int *)gmallocn(256, sizeof(int)); codeToGIDLen = 256; for (i = 0; i < 256; ++i) { codeToGID[i] = 0; if ((name = enc[i])) { - codeToGID[i] = (Gushort)FT_Get_Name_Index(face, name); + codeToGID[i] = FT_Get_Name_Index(face, name); } } break; @@ -474,9 +462,9 @@ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); if (n) { - codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); + codeToGID = (int *)gmallocn(n, sizeof(int)); memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(Gushort)); + n * sizeof(int)); } } else { if (font_data != NULL) { @@ -498,7 +486,7 @@ ff = FoFiTrueType::load(fileNameC); } if (! ff) { - error(-1, "failed to load truetype font\n"); + error(errSyntaxError, -1, "failed to load truetype font\n"); goto err2; } /* This might be set already for the CIDType2 case */ @@ -508,7 +496,7 @@ } delete ff; if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { - error(-1, "could not create truetype face\n"); + error(errSyntaxError, -1, "could not create truetype face\n"); goto err2; } break; @@ -535,7 +523,7 @@ if (! _ft_new_face (lib, fileNameC, font_data, font_data_len, &face, &font_face)) { gfree(codeToGID); codeToGID = NULL; - error(-1, "could not create cid face\n"); + error(errSyntaxError, -1, "could not create cid face\n"); goto err2; } break; @@ -546,6 +534,7 @@ break; } + delete fontLoc; return new CairoFreeTypeFont(ref, font_face, codeToGID, codeToGIDLen, @@ -553,6 +542,7 @@ err2: /* hmm? */ + delete fontLoc; fprintf (stderr, "some font thing failed\n"); return NULL; } @@ -565,8 +555,7 @@ typedef struct _type3_font_info { GfxFont *font; - XRef *xref; - Catalog *catalog; + PDFDoc *doc; CairoFontEngine *fontEngine; GBool printing; } type3_font_info_t; @@ -581,6 +570,29 @@ } static cairo_status_t +_init_type3_glyph (cairo_scaled_font_t *scaled_font, + cairo_t *cr, + cairo_font_extents_t *extents) +{ + type3_font_info_t *info; + GfxFont *font; + double *mat; + + info = (type3_font_info_t *) + cairo_font_face_get_user_data (cairo_scaled_font_get_font_face (scaled_font), + &type3_font_key); + font = info->font; + mat = font->getFontBBox(); + extents->ascent = mat[3]; /* y2 */ + extents->descent = -mat[3]; /* -y1 */ + extents->height = extents->ascent + extents->descent; + extents->max_x_advance = mat[2] - mat[1]; /* x2 - x1 */ + extents->max_y_advance = 0; + + return CAIRO_STATUS_SUCCESS; +} + +static cairo_status_t _render_type3_glyph (cairo_scaled_font_t *scaled_font, unsigned long glyph, cairo_t *cr, @@ -631,8 +643,8 @@ box.y1 = mat[1]; box.x2 = mat[2]; box.y2 = mat[3]; - gfx = new Gfx(info->xref, output_dev, resDict, info->catalog, &box, NULL); - output_dev->startDoc(info->xref, info->catalog, info->fontEngine); + gfx = new Gfx(info->doc, output_dev, resDict, &box, NULL); + output_dev->startDoc(info->doc, info->fontEngine); output_dev->startPage (1, gfx->getState()); output_dev->setInType3Char(gTrue); gfx->display(charProcs->getVal(glyph, &charProc)); @@ -660,14 +672,14 @@ } -CairoType3Font *CairoType3Font::create(GfxFont *gfxFont, XRef *xref, - Catalog *catalog, CairoFontEngine *fontEngine, +CairoType3Font *CairoType3Font::create(GfxFont *gfxFont, PDFDoc *doc, + CairoFontEngine *fontEngine, GBool printing) { Object refObj, strObj; type3_font_info_t *info; cairo_font_face_t *font_face; Ref ref; - Gushort *codeToGID; + int *codeToGID; Guint codeToGIDLen; int i, j; char **enc; @@ -678,38 +690,37 @@ info = (type3_font_info_t *) malloc(sizeof(*info)); ref = *gfxFont->getID(); font_face = cairo_user_font_face_create(); + cairo_user_font_face_set_init_func (font_face, _init_type3_glyph); cairo_user_font_face_set_render_glyph_func (font_face, _render_type3_glyph); gfxFont->incRefCnt(); info->font = gfxFont; - info->xref = xref; - info->catalog = catalog; + info->doc = doc; info->fontEngine = fontEngine; info->printing = printing; cairo_font_face_set_user_data (font_face, &type3_font_key, (void *) info, _free_type3_font_info); enc = ((Gfx8BitFont *)gfxFont)->getEncoding(); - codeToGID = (Gushort *)gmallocn(256, sizeof(int)); + codeToGID = (int *)gmallocn(256, sizeof(int)); codeToGIDLen = 256; for (i = 0; i < 256; ++i) { codeToGID[i] = 0; if (charProcs && (name = enc[i])) { for (j = 0; j < charProcs->getLength(); j++) { if (strcmp(name, charProcs->getKey(j)) == 0) { - codeToGID[i] = (Gushort) j; + codeToGID[i] = j; } } } } - return new CairoType3Font(ref, xref, catalog, font_face, codeToGID, codeToGIDLen, printing); + return new CairoType3Font(ref, doc, font_face, codeToGID, codeToGIDLen, printing); } CairoType3Font::CairoType3Font(Ref ref, - XRef *xref, - Catalog *catalog, + PDFDoc *doc, cairo_font_face_t *cairo_font_face, - Gushort *codeToGID, + int *codeToGID, Guint codeToGIDLen, GBool printing) : CairoFont(ref, cairo_font_face, @@ -717,8 +728,7 @@ codeToGIDLen, gFalse, printing), - xref(xref), - catalog(catalog) { } + doc(doc) { } CairoType3Font::~CairoType3Font() { } @@ -757,7 +767,7 @@ } CairoFont * -CairoFontEngine::getFont(GfxFont *gfxFont, XRef *xref, Catalog *catalog, GBool printing) { +CairoFontEngine::getFont(GfxFont *gfxFont, PDFDoc *doc, GBool printing) { int i, j; Ref ref; CairoFont *font; @@ -778,9 +788,9 @@ fontType = gfxFont->getType(); if (fontType == fontType3) - font = CairoType3Font::create (gfxFont, xref, catalog, this, printing); + font = CairoType3Font::create (gfxFont, doc, this, printing); else - font = CairoFreeTypeFont::create (gfxFont, xref, lib, useCIDs); + font = CairoFreeTypeFont::create (gfxFont, doc->getXRef(), lib, useCIDs); //XXX: if font is null should we still insert it into the cache? if (fontCache[cairoFontCacheSize - 1]) { diff -Nru poppler-0.18.4/poppler/CairoFontEngine.h poppler-0.20.5/poppler/CairoFontEngine.h --- poppler-0.18.4/poppler/CairoFontEngine.h 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/CairoFontEngine.h 2012-05-10 20:05:44.000000000 +0000 @@ -36,7 +36,7 @@ #include #include "GfxFont.h" -#include "Catalog.h" +#include "PDFDoc.h" class CairoFontEngine; @@ -44,7 +44,7 @@ public: CairoFont(Ref ref, cairo_font_face_t *face, - Gushort *codeToGID, + int *codeToGID, Guint codeToGIDLen, GBool substitute, GBool printing); @@ -60,7 +60,7 @@ Ref ref; cairo_font_face_t *cairo_font_face; - Gushort *codeToGID; + int *codeToGID; Guint codeToGIDLen; GBool substitute; @@ -76,27 +76,26 @@ private: CairoFreeTypeFont(Ref ref, cairo_font_face_t *cairo_font_face, - Gushort *codeToGID, Guint codeToGIDLen, GBool substitute); + int *codeToGID, Guint codeToGIDLen, GBool substitute); }; //------------------------------------------------------------------------ class CairoType3Font : public CairoFont { public: - static CairoType3Font *create(GfxFont *gfxFont, XRef *xref, - Catalog *catalog, CairoFontEngine *fontEngine, + static CairoType3Font *create(GfxFont *gfxFont, PDFDoc *doc, + CairoFontEngine *fontEngine, GBool printing); virtual ~CairoType3Font(); virtual GBool matches(Ref &other, GBool printing); private: - CairoType3Font(Ref ref, XRef *xref, Catalog *catalog, + CairoType3Font(Ref ref, PDFDoc *doc, cairo_font_face_t *cairo_font_face, - Gushort *codeToGID, Guint codeToGIDLen, + int *codeToGID, Guint codeToGIDLen, GBool printing); - XRef *xref; - Catalog *catalog; + PDFDoc *doc; }; //------------------------------------------------------------------------ @@ -114,7 +113,7 @@ CairoFontEngine(FT_Library libA); ~CairoFontEngine(); - CairoFont *getFont(GfxFont *gfxFont, XRef *xref, Catalog *catalog, GBool printing); + CairoFont *getFont(GfxFont *gfxFont, PDFDoc *doc, GBool printing); private: CairoFont *fontCache[cairoFontCacheSize]; diff -Nru poppler-0.18.4/poppler/CairoOutputDev.cc poppler-0.20.5/poppler/CairoOutputDev.cc --- poppler-0.18.4/poppler/CairoOutputDev.cc 2012-02-15 17:06:48.000000000 +0000 +++ poppler-0.20.5/poppler/CairoOutputDev.cc 2012-08-30 20:31:05.000000000 +0000 @@ -16,7 +16,7 @@ // // Copyright (C) 2005-2008 Jeff Muizelaar // Copyright (C) 2005, 2006 Kristian Høgsberg -// Copyright (C) 2005, 2009 Albert Astals Cid +// Copyright (C) 2005, 2009, 2012 Albert Astals Cid // Copyright (C) 2005 Nickolay V. Shmyrev // Copyright (C) 2006-2011 Carlos Garcia Campos // Copyright (C) 2008 Carl Worth @@ -25,7 +25,8 @@ // Copyright (C) 2008, 2009 Chris Wilson // Copyright (C) 2008 Hib Eris // Copyright (C) 2009, 2010 David Benjamin -// Copyright (C) 2011 Thomas Freitag +// Copyright (C) 2011, 2012 Thomas Freitag +// Copyright (C) 2012 Patrick Pfeifer // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -53,7 +54,6 @@ #include "GfxFont.h" #include "Page.h" #include "Link.h" -#include "CharCodeToUnicode.h" #include "FontEncodingTables.h" #include "PDFDocEncoding.h" #include @@ -120,8 +120,7 @@ GBool CairoOutputDev::ft_lib_initialized = gFalse; CairoOutputDev::CairoOutputDev() { - xref = NULL; - catalog = NULL; + doc = NULL; if (!ft_lib_initialized) { FT_Init_FreeType(&ft_lib); @@ -139,7 +138,6 @@ fill_opacity = 1.0; textClipPath = NULL; strokePathClip = NULL; - haveCSPattern = gFalse; cairo = NULL; currentFont = NULL; prescaleImages = gTrue; @@ -192,7 +190,7 @@ if (this->cairo != NULL) { cairo_status_t status = cairo_status (this->cairo); if (status) { - warning("cairo context error: %s\n", cairo_status_to_string(status)); + error(errInternal, -1, "cairo context error: {0:s}\n", cairo_status_to_string(status)); } cairo_destroy (this->cairo); assert(!cairo_shape); @@ -224,10 +222,9 @@ } } -void CairoOutputDev::startDoc(XRef *xrefA, Catalog *catalogA, +void CairoOutputDev::startDoc(PDFDoc *docA, CairoFontEngine *parentFontEngine) { - xref = xrefA; - catalog = catalogA; + doc = docA; if (parentFontEngine) { fontEngine = parentFontEngine; } else { @@ -254,7 +251,7 @@ void CairoOutputDev::endPage() { if (text) { text->endPage(); - text->coalesce(gTrue, gFalse); + text->coalesce(gTrue, 0, gFalse); } } @@ -351,7 +348,7 @@ * instead of having to invert the matrix. */ invert_matrix = matrix; if (cairo_matrix_invert(&invert_matrix)) { - warning("matrix not invertible\n"); + error(errSyntaxWarning, -1, "matrix not invertible\n"); return; } @@ -420,9 +417,25 @@ void CairoOutputDev::updateLineWidth(GfxState *state) { LOG(printf ("line width: %f\n", state->getLineWidth())); adjusted_stroke_width = gFalse; - if (state->getLineWidth() == 0.0) { - /* find out how big pixels (device unit) are in the x and y directions - * choose the smaller of the two as our line width */ + double width = state->getLineWidth(); + if (stroke_adjust && !printing) { + double x, y; + x = y = width; + + /* find out line width in device units */ + cairo_user_to_device_distance(cairo, &x, &y); + if (fabs(x) <= 1.0 && fabs(y) <= 1.0) { + /* adjust width to at least one device pixel */ + x = y = 1.0; + cairo_device_to_user_distance(cairo, &x, &y); + width = MIN(fabs(x),fabs(y)); + adjusted_stroke_width = gTrue; + } + } else if (width == 0.0) { + /* Cairo does not support 0 line width == 1 device pixel. Find out + * how big pixels (device unit) are in the x and y + * directions. Choose the smaller of the two as our line width. + */ double x = 1.0, y = 1.0; if (printing) { // assume printer pixel size is 1/600 inch @@ -430,25 +443,9 @@ y = 72.0/600; } cairo_device_to_user_distance(cairo, &x, &y); - cairo_set_line_width (cairo, MIN(fabs(x),fabs(y))); - } else { - double width = state->getLineWidth(); - if (stroke_adjust && !printing) { - double x, y; - x = y = width; - - /* find out line width in device units */ - cairo_user_to_device_distance(cairo, &x, &y); - if (fabs(x) <= 1.0 && fabs(y) <= 1.0) { - /* adjust width to at least one device pixel */ - x = y = 1.0; - cairo_device_to_user_distance(cairo, &x, &y); - width = MIN(fabs(x),fabs(y)); - adjusted_stroke_width = gTrue; - } - } - cairo_set_line_width (cairo, width); + width = MIN(fabs(x),fabs(y)); } + cairo_set_line_width (cairo, width); if (cairo_shape) cairo_set_line_width (cairo_shape, cairo_get_line_width (cairo)); } @@ -457,7 +454,8 @@ GfxRGB color = fill_color; state->getFillRGB(&fill_color); - if (color.r != fill_color.r || + if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID || + color.r != fill_color.r || color.g != fill_color.g || color.b != fill_color.b) { @@ -476,7 +474,8 @@ GfxRGB color = stroke_color; state->getStrokeRGB(&stroke_color); - if (color.r != stroke_color.r || + if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID || + color.r != stroke_color.r || color.g != stroke_color.g || color.b != stroke_color.b) { @@ -600,7 +599,7 @@ if (text) text->updateFont(state); - currentFont = fontEngine->getFont (state->getFont(), xref, catalog, printing); + currentFont = fontEngine->getFont (state->getFont(), doc, printing); if (!currentFont) return; @@ -634,55 +633,97 @@ */ invert_matrix = matrix; if (cairo_matrix_invert(&invert_matrix)) { - warning("font matrix not invertible\n"); + error(errSyntaxWarning, -1, "font matrix not invertible\n"); return; } cairo_set_font_matrix (cairo, &matrix); } -void CairoOutputDev::alignStrokeCoords(double *x, double *y) +/* Tolerance in pixels for checking if strokes are horizontal or vertical + * lines in device space */ +#define STROKE_COORD_TOLERANCE 0.5 + +/* Align stroke coordinate i if the point is the start or end of a + * horizontal or vertical line */ +void CairoOutputDev::alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y) { - /* see http://www.cairographics.org/FAQ/#sharp_lines */ - cairo_user_to_device (cairo, x, y); - *x = floor(*x) + 0.5; - *y = floor(*y) + 0.5; - cairo_device_to_user (cairo, x, y); + double x1, y1, x2, y2; + GBool align = gFalse; + + x1 = subpath->getX(i); + y1 = subpath->getY(i); + cairo_user_to_device (cairo, &x1, &y1); + + // Does the current coord and prev coord form a horiz or vert line? + if (i > 0 && !subpath->getCurve(i - 1)) { + x2 = subpath->getX(i - 1); + y2 = subpath->getY(i - 1); + cairo_user_to_device (cairo, &x2, &y2); + if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE) + align = gTrue; + } + + // Does the current coord and next coord form a horiz or vert line? + if (i < subpath->getNumPoints() - 1 && !subpath->getCurve(i + 1)) { + x2 = subpath->getX(i + 1); + y2 = subpath->getY(i + 1); + cairo_user_to_device (cairo, &x2, &y2); + if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE) + align = gTrue; + } + + *x = subpath->getX(i); + *y = subpath->getY(i); + if (align) { + /* see http://www.cairographics.org/FAQ/#sharp_lines */ + cairo_user_to_device (cairo, x, y); + *x = floor(*x) + 0.5; + *y = floor(*y) + 0.5; + cairo_device_to_user (cairo, x, y); + } } +#undef STROKE_COORD_TOLERANCE + void CairoOutputDev::doPath(cairo_t *cairo, GfxState *state, GfxPath *path) { GfxSubpath *subpath; int i, j; + double x, y; cairo_new_path (cairo); for (i = 0; i < path->getNumSubpaths(); ++i) { subpath = path->getSubpath(i); if (subpath->getNumPoints() > 0) { if (align_stroke_coords) { - double x = subpath->getX(0); - double y = subpath->getY(0); - alignStrokeCoords(&x, &y); - cairo_move_to (cairo, x, y); + alignStrokeCoords(subpath, 0, &x, &y); } else { - cairo_move_to (cairo, subpath->getX(0), subpath->getY(0)); + x = subpath->getX(0); + y = subpath->getY(0); } + cairo_move_to (cairo, x, y); j = 1; while (j < subpath->getNumPoints()) { if (subpath->getCurve(j)) { + if (align_stroke_coords) { + alignStrokeCoords(subpath, j + 2, &x, &y); + } else { + x = subpath->getX(j+2); + y = subpath->getY(j+2); + } cairo_curve_to( cairo, subpath->getX(j), subpath->getY(j), subpath->getX(j+1), subpath->getY(j+1), - subpath->getX(j+2), subpath->getY(j+2)); + x, y); j += 3; } else { if (align_stroke_coords) { - double x = subpath->getX(j); - double y = subpath->getY(j); - alignStrokeCoords(&x, &y); - cairo_line_to (cairo, x, y); - } else { - cairo_line_to (cairo, subpath->getX(j), subpath->getY(j)); - } + alignStrokeCoords(subpath, j, &x, &y); + } else { + x = subpath->getX(j); + y = subpath->getY(j); + } + cairo_line_to (cairo, x, y); ++j; } } @@ -735,7 +776,7 @@ cairo_mask (cairo, mask); cairo_restore (cairo); } else if (strokePathClip) { - fillToStrokePathClip(); + fillToStrokePathClip(state); } else { cairo_fill (cairo); } @@ -761,7 +802,7 @@ } -GBool CairoOutputDev::tilingPatternFill(GfxState *state, Catalog *cat, Object *str, +GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *cat, Object *str, double *pmat, int paintType, int /*tilingType*/, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, @@ -802,7 +843,7 @@ box.x2 = bbox[2]; box.y2 = bbox[3]; strokePathTmp = strokePathClip; strokePathClip = NULL; - gfx = new Gfx(xref, this, resDict, catalog, &box, NULL); + gfx = new Gfx(doc, this, resDict, &box, NULL); gfx->display(str); delete gfx; strokePathClip = strokePathTmp; @@ -824,7 +865,7 @@ cairo_set_source (cairo, pattern); cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT); if (strokePathClip) { - fillToStrokePathClip(); + fillToStrokePathClip(state); } else { cairo_fill (cairo); } @@ -892,7 +933,7 @@ return (shading->getExtend0() == shading->getExtend1()); } -#if CAIRO_VERSION == CAIRO_VERSION_ENCODE(1, 11, 2) +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) GBool CairoOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) { double x0, y0, x1, y1, x2, y2; @@ -909,21 +950,21 @@ &x1, &y1, &color[1], &x2, &y2, &color[2]); - cairo_pattern_mesh_begin_patch (fill_pattern); + cairo_mesh_pattern_begin_patch (fill_pattern); - cairo_pattern_mesh_move_to (fill_pattern, x0, y0); - cairo_pattern_mesh_line_to (fill_pattern, x1, y1); - cairo_pattern_mesh_line_to (fill_pattern, x2, y2); + cairo_mesh_pattern_move_to (fill_pattern, x0, y0); + cairo_mesh_pattern_line_to (fill_pattern, x1, y1); + cairo_mesh_pattern_line_to (fill_pattern, x2, y2); for (j = 0; j < 3; j++) { shading->getColorSpace()->getRGB(&color[j], &rgb); - cairo_pattern_mesh_set_corner_color_rgb (fill_pattern, j, + cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j, colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b)); } - cairo_pattern_mesh_end_patch (fill_pattern); + cairo_mesh_pattern_end_patch (fill_pattern); } double xMin, yMin, xMax, yMax; @@ -952,33 +993,33 @@ GfxColor color; GfxRGB rgb; - cairo_pattern_mesh_begin_patch (fill_pattern); + cairo_mesh_pattern_begin_patch (fill_pattern); - cairo_pattern_mesh_move_to (fill_pattern, patch->x[0][0], patch->y[0][0]); - cairo_pattern_mesh_curve_to (fill_pattern, + cairo_mesh_pattern_move_to (fill_pattern, patch->x[0][0], patch->y[0][0]); + cairo_mesh_pattern_curve_to (fill_pattern, patch->x[0][1], patch->y[0][1], patch->x[0][2], patch->y[0][2], patch->x[0][3], patch->y[0][3]); - cairo_pattern_mesh_curve_to (fill_pattern, + cairo_mesh_pattern_curve_to (fill_pattern, patch->x[1][3], patch->y[1][3], patch->x[2][3], patch->y[2][3], patch->x[3][3], patch->y[3][3]); - cairo_pattern_mesh_curve_to (fill_pattern, + cairo_mesh_pattern_curve_to (fill_pattern, patch->x[3][2], patch->y[3][2], patch->x[3][1], patch->y[3][1], patch->x[3][0], patch->y[3][0]); - cairo_pattern_mesh_curve_to (fill_pattern, + cairo_mesh_pattern_curve_to (fill_pattern, patch->x[2][0], patch->y[2][0], patch->x[1][0], patch->y[1][0], patch->x[0][0], patch->y[0][0]); - cairo_pattern_mesh_set_control_point (fill_pattern, 0, patch->x[1][1], patch->y[1][1]); - cairo_pattern_mesh_set_control_point (fill_pattern, 1, patch->x[1][2], patch->y[1][2]); - cairo_pattern_mesh_set_control_point (fill_pattern, 2, patch->x[2][2], patch->y[2][2]); - cairo_pattern_mesh_set_control_point (fill_pattern, 3, patch->x[2][1], patch->y[2][1]); + cairo_mesh_pattern_set_control_point (fill_pattern, 0, patch->x[1][1], patch->y[1][1]); + cairo_mesh_pattern_set_control_point (fill_pattern, 1, patch->x[1][2], patch->y[1][2]); + cairo_mesh_pattern_set_control_point (fill_pattern, 2, patch->x[2][2], patch->y[2][2]); + cairo_mesh_pattern_set_control_point (fill_pattern, 3, patch->x[2][1], patch->y[2][1]); for (j = 0; j < 4; j++) { int u, v; @@ -1008,12 +1049,12 @@ } shading->getColorSpace()->getRGB(&color, &rgb); - cairo_pattern_mesh_set_corner_color_rgb (fill_pattern, j, + cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j, colToDbl(rgb.r), colToDbl(rgb.g), colToDbl(rgb.b)); } - cairo_pattern_mesh_end_patch (fill_pattern); + cairo_mesh_pattern_end_patch (fill_pattern); } double xMin, yMin, xMax, yMax; @@ -1029,7 +1070,7 @@ return gTrue; } -#endif /* CAIRO_VERSION == CAIRO_VERSION_ENCODE(1, 11, 2) */ +#endif /* CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) */ void CairoOutputDev::clip(GfxState *state) { doPath (cairo, state, state->getPath()); @@ -1059,8 +1100,7 @@ void CairoOutputDev::clipToStrokePath(GfxState *state) { LOG(printf("clip-to-stroke-path\n")); strokePathClip = (StrokePathClip*)gmalloc (sizeof(*strokePathClip)); - doPath (cairo, state, state->getPath()); - strokePathClip->path = cairo_copy_path (cairo); + strokePathClip->path = state->getPath()->copy(); cairo_get_matrix (cairo, &strokePathClip->ctm); strokePathClip->line_width = cairo_get_line_width (cairo); strokePathClip->dash_count = cairo_get_dash_count (cairo); @@ -1075,7 +1115,7 @@ strokePathClip->miter = cairo_get_miter_limit (cairo); } -void CairoOutputDev::fillToStrokePathClip() { +void CairoOutputDev::fillToStrokePathClip(GfxState *state) { cairo_save (cairo); cairo_set_matrix (cairo, &strokePathClip->ctm); @@ -1085,14 +1125,12 @@ cairo_set_line_cap (cairo, strokePathClip->cap); cairo_set_line_join (cairo, strokePathClip->join); cairo_set_miter_limit (cairo, strokePathClip->miter); - - cairo_new_path (cairo); - cairo_append_path (cairo, strokePathClip->path); + doPath (cairo, state, strokePathClip->path); cairo_stroke (cairo); cairo_restore (cairo); - cairo_path_destroy (strokePathClip->path); + delete strokePathClip->path; if (strokePathClip->dashes) gfree (strokePathClip->dashes); gfree (strokePathClip); @@ -1177,7 +1215,7 @@ return; } - if (!(render & 1) && !haveCSPattern) { + if (!(render & 1)) { LOG (printf ("fill string\n")); cairo_set_source (cairo, fill_pattern); if (use_show_text_glyphs) @@ -1201,7 +1239,7 @@ } // clip - if (haveCSPattern || (render & 4)) { + if ((render & 4)) { LOG (printf ("clip string\n")); // append the glyph path to textClipPath. @@ -1291,36 +1329,9 @@ } void CairoOutputDev::beginTextObject(GfxState *state) { - if (!(state->getRender() & 4) && state->getFillColorSpace()->getMode() == csPattern) { - haveCSPattern = gTrue; - saveState(state); - } } void CairoOutputDev::endTextObject(GfxState *state) { - if (haveCSPattern) { - haveCSPattern = gFalse; - if (state->getFillColorSpace()->getMode() != csPattern) { - if (textClipPath) { - cairo_new_path (cairo); - cairo_append_path (cairo, textClipPath); - cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING); - cairo_set_source (cairo, fill_pattern); - cairo_fill (cairo); - if (cairo_shape) { - cairo_new_path (cairo_shape); - cairo_append_path (cairo_shape, textClipPath); - cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING); - cairo_fill (cairo_shape); - } - cairo_path_destroy (textClipPath); - textClipPath = NULL; - } - restoreState(state); - updateFillColor(state); - } - } - if (textClipPath) { // clip the accumulated text path cairo_append_path (cairo, textClipPath); @@ -1334,16 +1345,16 @@ } } -void CairoOutputDev::beginMarkedContent(char *name, Dict *properties) +void CairoOutputDev::beginActualText(GfxState *state, GooString *text) { - if (text) - actualText->beginMC(properties); + if (this->text) + actualText->begin(state, text); } -void CairoOutputDev::endMarkedContent(GfxState *state) +void CairoOutputDev::endActualText(GfxState *state) { if (text) - actualText->endMC(state); + actualText->end(state); } static inline int splashRound(SplashCoord x) { @@ -1488,11 +1499,17 @@ if (status) printf("BAD status: %s\n", cairo_status_to_string(status)); } else { + if (fill_opacity < 1.0) { + cairo_push_group(cairo); + } cairo_save(cairo); cairo_set_matrix(cairo, &mask_matrix); cairo_mask(cairo, mask); cairo_restore(cairo); - + if (fill_opacity < 1.0) { + cairo_pop_group_to_source(cairo); + cairo_paint_with_alpha (cairo, fill_opacity); + } cairo_pattern_destroy(mask); mask = NULL; } @@ -1654,10 +1671,6 @@ mask = NULL; } -void CairoOutputDev::endMaskClip(GfxState *state) { - clearSoftMask(state); -} - /* Taken from cairo/doc/tutorial/src/singular.c */ static void get_singular_values (const cairo_matrix_t *matrix, @@ -1825,27 +1838,97 @@ return; } - if (state->getFillColorSpace()->getMode() == csPattern) - cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA); - /* shape is 1.0 for painted areas, 0.0 for unpainted ones */ cairo_matrix_t matrix; cairo_get_matrix (cairo, &matrix); //XXX: it is possible that we should only do sub pixel positioning if // we are rendering fonts */ - if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) { + if (!printing && prescaleImages + /* not rotated */ + && matrix.xy == 0 && matrix.yx == 0 + /* axes not flipped / not 180 deg rotated */ + && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) { drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg); } else { drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg); } +} + +void CairoOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix) { + + /* FIXME: Doesn't the image mask support any colorspace? */ + cairo_set_source (cairo, fill_pattern); + + /* work around a cairo bug when scaling 1x1 surfaces */ + if (width == 1 && height == 1) { + ImageStream *imgStr; + Guchar pix; + int invert_bit; + + imgStr = new ImageStream(str, width, 1, 1); + imgStr->reset(); + imgStr->getPixel(&pix); + imgStr->close(); + delete imgStr; + + invert_bit = invert ? 1 : 0; + if (pix ^ invert_bit) + return; + + cairo_save (cairo); + cairo_rectangle (cairo, 0., 0., width, height); + cairo_fill (cairo); + cairo_restore (cairo); + if (cairo_shape) { + cairo_save (cairo_shape); + cairo_rectangle (cairo_shape, 0., 0., width, height); + cairo_fill (cairo_shape); + cairo_restore (cairo_shape); + } + return; + } + + cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA); + + /* shape is 1.0 for painted areas, 0.0 for unpainted ones */ + + cairo_matrix_t matrix; + cairo_get_matrix (cairo, &matrix); + //XXX: it is possible that we should only do sub pixel positioning if + // we are rendering fonts */ + if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) { + drawImageMaskPrescaled(state, ref, str, width, height, invert, gFalse, inlineImg); + } else { + drawImageMaskRegular(state, ref, str, width, height, invert, gFalse, inlineImg); + } + if (state->getFillColorSpace()->getMode() == csPattern) { - if (mask) - cairo_pattern_destroy (mask); - mask = cairo_pop_group (cairo); - cairo_get_matrix (cairo, &mask_matrix); + cairo_set_source_rgb (cairo, 1, 1, 1); + cairo_set_matrix (cairo, &mask_matrix); + cairo_mask (cairo, mask); } + + if (mask) + cairo_pattern_destroy (mask); + mask = cairo_pop_group (cairo); + + saveState(state); + double bbox[4] = {0,0,1,1}; // dummy + beginTransparencyGroup(state, bbox, state->getFillColorSpace(), + gTrue, gFalse, gFalse); +} + +void CairoOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { + double bbox[4] = {0,0,1,1}; // dummy + + endTransparencyGroup(state); + restoreState(state); + paintTransparencyGroup(state, bbox); + clearSoftMask(state); } void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *str, @@ -1969,6 +2052,8 @@ /* cairo does a very poor job of scaling down images so we scale them ourselves */ + LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height)); + /* this scaling code is adopted from the splash image scaling code */ cairo_get_matrix(cairo, &matrix); #if 0 @@ -2753,7 +2838,8 @@ cairo_surface_mark_dirty (image); - setMimeData(str, ref, image); + if (!inlineImg) /* don't read stream twice if it is an inline image */ + setMimeData(str, ref, image); pattern = cairo_pattern_create_for_surface (image); cairo_surface_destroy (image); @@ -2783,15 +2869,18 @@ cairo_save (cairo); cairo_set_source (cairo, pattern); - if (printing) - cairo_rectangle (cairo, 0., 0., width, height); - else + if (!printing) cairo_rectangle (cairo, 0., 0., 1., 1.); if (maskPattern) { - cairo_clip (cairo); + if (!printing) + cairo_clip (cairo); + cairo_set_matrix (cairo, &mask_matrix); cairo_mask (cairo, maskPattern); } else { - cairo_fill (cairo); + if (printing) + cairo_paint (cairo); + else + cairo_fill (cairo); } cairo_restore (cairo); @@ -2800,11 +2889,12 @@ if (cairo_shape) { cairo_save (cairo_shape); cairo_set_source (cairo_shape, pattern); - if (printing) - cairo_rectangle (cairo_shape, 0., 0., width, height); - else + if (printing) { + cairo_paint (cairo_shape); + } else { cairo_rectangle (cairo_shape, 0., 0., 1., 1.); - cairo_fill (cairo_shape); + cairo_fill (cairo_shape); + } cairo_restore (cairo_shape); } diff -Nru poppler-0.18.4/poppler/CairoOutputDev.h poppler-0.20.5/poppler/CairoOutputDev.h --- poppler-0.18.4/poppler/CairoOutputDev.h 2012-02-15 17:07:11.000000000 +0000 +++ poppler-0.20.5/poppler/CairoOutputDev.h 2012-05-10 20:05:44.000000000 +0000 @@ -20,7 +20,7 @@ // Copyright (C) 2006-2011 Carlos Garcia Campos // Copyright (C) 2008, 2009, 2011, 2012 Adrian Johnson // Copyright (C) 2008 Michael Vrable -// Copyright (C) 2010, 2011 Thomas Freitag +// Copyright (C) 2010-2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -40,6 +40,7 @@ #include "TextOutputDev.h" #include "GfxState.h" +class PDFDoc; class GfxState; class GfxPath; class Gfx8BitFont; @@ -107,7 +108,7 @@ // Does this device use functionShadedFill(), axialShadedFill(), and // radialShadedFill()? If this returns false, these shaded fills // will be reduced to a series of other drawing operations. -#if CAIRO_VERSION == CAIRO_VERSION_ENCODE(1, 11, 2) +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) virtual GBool useShadedFills(int type) { return type <= 7; } #else virtual GBool useShadedFills(int type) { return type < 4; } @@ -158,7 +159,7 @@ virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); virtual void clipToStrokePath(GfxState *state); - virtual GBool tilingPatternFill(GfxState *state, Catalog *cat, Object *str, + virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, @@ -167,7 +168,7 @@ virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading); virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax); virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading); -#if CAIRO_VERSION == CAIRO_VERSION_ENCODE(1, 11, 2) +#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading); virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading); #endif @@ -183,35 +184,26 @@ double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen); + void beginActualText(GfxState *state, GooString *text); + void endActualText(GfxState *state); virtual GBool beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen); virtual void endType3Char(GfxState *state); virtual void beginTextObject(GfxState *state); - virtual GBool deviceHasTextClip(GfxState *state) { return textClipPath && haveCSPattern; } + virtual GBool deviceHasTextClip(GfxState *state) { return textClipPath; } virtual void endTextObject(GfxState *state); - // If current colorspace is pattern, - // does this device support text in pattern colorspace? - virtual GBool supportTextCSPattern(GfxState *state) { - return state->getFillColorSpace()->getMode() == csPattern; } - - // If current colorspace is pattern, - // need this device special handling for masks in pattern colorspace? - virtual GBool fillMaskCSPattern(GfxState * state) { - return state->getFillColorSpace()->getMode() == csPattern; } - - virtual void endMaskClip(GfxState *state); - - //----- grouping operators - virtual void beginMarkedContent(char *name, Dict *properties); - virtual void endMarkedContent(GfxState *state); - //----- image drawing virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg); + virtual void setSoftMaskFromImageMask(GfxState *state, + Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix); + virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix); void drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg); @@ -259,7 +251,7 @@ //----- special access // Called to indicate that a new PDF document has been loaded. - void startDoc(XRef *xrefA, Catalog *catalogA, CairoFontEngine *fontEngine = NULL); + void startDoc(PDFDoc *docA, CairoFontEngine *fontEngine = NULL); GBool isReverseVideo() { return gFalse; } @@ -281,8 +273,8 @@ GBool interpolate); GBool getStreamData (Stream *str, char **buffer, int *length); void setMimeData(Stream *str, Object *ref, cairo_surface_t *image); - void fillToStrokePathClip(); - void alignStrokeCoords(double *x, double *y); + void fillToStrokePathClip(GfxState *state); + void alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y); GfxRGB fill_color, stroke_color; cairo_pattern_t *fill_pattern, *stroke_pattern; @@ -294,7 +286,7 @@ CairoFont *currentFont; struct StrokePathClip { - cairo_path_t *path; + GfxPath *path; cairo_matrix_t ctm; double line_width; double *dashes; @@ -305,8 +297,7 @@ double miter; } *strokePathClip; - XRef *xref; // xref table for current document - Catalog *catalog; + PDFDoc *doc; // the current document static FT_Library ft_lib; static GBool ft_lib_initialized; @@ -358,8 +349,6 @@ struct MaskStack *next; } *maskStack; - GBool haveCSPattern; // set if text has been drawn with a - // clipping render mode because of pattern colorspace }; //------------------------------------------------------------------------ @@ -438,7 +427,7 @@ virtual void fill(GfxState *state) { } virtual void eoFill(GfxState *state) { } virtual void clipToStrokePath(GfxState *state) { } - virtual GBool tilingPatternFill(GfxState *state, Catalog *cat, Object *str, + virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, diff -Nru poppler-0.18.4/poppler/CairoRescaleBox.cc poppler-0.20.5/poppler/CairoRescaleBox.cc --- poppler-0.18.4/poppler/CairoRescaleBox.cc 2012-02-15 17:09:16.000000000 +0000 +++ poppler-0.20.5/poppler/CairoRescaleBox.cc 2012-05-10 20:05:44.000000000 +0000 @@ -37,6 +37,7 @@ // //======================================================================== + /* This implements a box filter that supports non-integer box sizes */ #ifdef HAVE_CONFIG_H diff -Nru poppler-0.18.4/poppler/Catalog.cc poppler-0.20.5/poppler/Catalog.cc --- poppler-0.18.4/poppler/Catalog.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/Catalog.cc 2012-08-29 22:46:02.000000000 +0000 @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Kristian Høgsberg -// Copyright (C) 2005-2011 Albert Astals Cid +// Copyright (C) 2005-2012 Albert Astals Cid // Copyright (C) 2005 Jeff Muizelaar // Copyright (C) 2005 Jonathan Blandford // Copyright (C) 2005 Marco Pesenti Gritti @@ -40,6 +40,7 @@ #include #include "goo/gmem.h" #include "Object.h" +#include "PDFDoc.h" #include "XRef.h" #include "Array.h" #include "Dict.h" @@ -57,13 +58,14 @@ // Catalog //------------------------------------------------------------------------ -Catalog::Catalog(XRef *xrefA) { +Catalog::Catalog(PDFDoc *docA) { Object catDict, pagesDict, pagesDictRef; Object obj, obj2; Object optContentProps; ok = gTrue; - xref = xrefA; + doc = docA; + xref = doc->getXRef(); pages = NULL; pageRefs = NULL; numPages = -1; @@ -87,7 +89,7 @@ xref->getCatalog(&catDict); if (!catDict.isDict()) { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); goto err1; } // get the AcroForm dictionary @@ -114,11 +116,6 @@ // get the ViewerPreferences dictionary catDict.dictLookup("ViewerPreferences", &viewerPreferences); - - // perform form-related loading after all widgets have been loaded - if (getForm()) - getForm()->postWidgetsLoad(this); - catDict.free(); return; @@ -186,7 +183,7 @@ if (catDict.isDict()) { catDict.dictLookup("Metadata", &metadata); } else { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); metadata.initNull(); } catDict.free(); @@ -197,7 +194,7 @@ } dict = metadata.streamGetDict(); if (!dict->lookup("Subtype", &obj)->isName("XML")) { - error(-1, "Unknown Metadata type: '%s'", + error(errSyntaxWarning, -1, "Unknown Metadata type: '{0:s}'", obj.isName() ? obj.getName() : "???"); } obj.free(); @@ -246,13 +243,13 @@ pagesRef = pagesDictRef.getRef(); pagesDictRef.free(); } else { - error(-1, "Catalog dictionary does not contain a valid \"Pages\" entry"); + error(errSyntaxError, -1, "Catalog dictionary does not contain a valid \"Pages\" entry"); pagesDictRef.free(); catDict.free(); return gFalse; } } else { - error(-1, "Could not find catalog dictionary"); + error(errSyntaxError, -1, "Could not find catalog dictionary"); catDict.free(); return gFalse; } @@ -268,7 +265,7 @@ obj.free(); } else { - error(-1, "Top-level pages object is wrong type (%s)", obj.getTypeName()); + error(errSyntaxError, -1, "Top-level pages object is wrong type ({0:s})", obj.getTypeName()); obj.free(); return gFalse; } @@ -304,7 +301,7 @@ Object kids; pagesDict->lookup("Kids", &kids); if (!kids.isArray()) { - error(-1, "Kids object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Kids object (page {0:d}) is wrong type ({1:s})", lastCachedPage+1, kids.getTypeName()); kids.free(); return gFalse; @@ -328,7 +325,7 @@ Object kidRef; kids.arrayGetNF(kidsIdx, &kidRef); if (!kidRef.isRef()) { - error(-1, "Kid object (page %d) is not an indirect reference (%s)", + error(errSyntaxError, -1, "Kid object (page {0:d}) is not an indirect reference ({1:s})", lastCachedPage+1, kidRef.getTypeName()); kidRef.free(); kids.free(); @@ -343,7 +340,7 @@ } } if (loop) { - error(-1, "Loop in Pages tree"); + error(errSyntaxError, -1, "Loop in Pages tree"); kidRef.free(); kids.free(); kidsIdxList->back()++; @@ -355,10 +352,10 @@ kids.free(); if (kid.isDict("Page") || (kid.isDict() && !kid.getDict()->hasKey("Kids"))) { PageAttrs *attrs = new PageAttrs(attrsList->back(), kid.getDict()); - Page *p = new Page(xref, lastCachedPage+1, kid.getDict(), + Page *p = new Page(doc, lastCachedPage+1, kid.getDict(), kidRef.getRef(), attrs, form); if (!p->isOk()) { - error(-1, "Failed to create page (page %d)", lastCachedPage+1); + error(errSyntaxError, -1, "Failed to create page (page {0:d})", lastCachedPage+1); delete p; kidRef.free(); kid.free(); @@ -366,7 +363,7 @@ } if (lastCachedPage >= numPages) { - error(-1, "Page count in top-level pages object is incorrect"); + error(errSyntaxError, -1, "Page count in top-level pages object is incorrect"); kidRef.free(); kid.free(); return gFalse; @@ -388,7 +385,7 @@ pagesList->push_back(kid.getDict()); kidsIdxList->push_back(0); } else { - error(-1, "Kid object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Kid object (page {0:d}) is wrong type ({1:s})", lastCachedPage+1, kid.getTypeName()); kidsIdxList->back()++; } @@ -441,10 +438,10 @@ if (obj1.dictLookup("D", &obj2)->isArray()) dest = new LinkDest(obj2.getArray()); else - error(-1, "Bad named destination value"); + error(errSyntaxWarning, -1, "Bad named destination value"); obj2.free(); } else { - error(-1, "Bad named destination value"); + error(errSyntaxWarning, -1, "Bad named destination value"); } obj1.free(); if (dest && !dest->isOk()) { @@ -465,6 +462,8 @@ Object fsDict; embeddedFile = new FileSpec(obj.fetch(xref, &fsDict)); fsDict.free(); + } else if (obj.isDict()) { + embeddedFile = new FileSpec(&obj); } else { Object null; embeddedFile = new FileSpec(&null); @@ -520,7 +519,7 @@ xref->getCatalog(&catDict); if (!catDict.isDict()) { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); catDict.free(); return pageMode; } @@ -555,7 +554,7 @@ xref->getCatalog(&catDict); if (!catDict.isDict()) { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); catDict.free(); return pageLayout; } @@ -607,7 +606,7 @@ name.append(aux.getString()); } else - error(-1, "Invalid page tree"); + error(errSyntaxError, -1, "Invalid page tree"); } } @@ -752,7 +751,7 @@ xref->getCatalog(&catDict); if (!catDict.isDict()) { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); catDict.free(); return 0; } @@ -762,7 +761,7 @@ // This should really be isDict("Pages"), but I've seen at least one // PDF file where the /Type entry is missing. if (!pagesDict.isDict()) { - error(-1, "Top-level pages object is wrong type (%s)", + error(errSyntaxError, -1, "Top-level pages object is wrong type ({0:s})", pagesDict.getTypeName()); pagesDict.free(); return 0; @@ -771,7 +770,7 @@ pagesDict.dictLookup("Count", &obj); // some PDF files actually use real numbers here ("/Count 9.0") if (!obj.isNum()) { - error(-1, "Page count in top-level pages object is wrong type (%s)", + error(errSyntaxError, -1, "Page count in top-level pages object is wrong type ({0:s})", obj.getTypeName()); numPages = 0; } else { @@ -793,7 +792,7 @@ xref->getCatalog(&catDict); if (!catDict.isDict()) { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); catDict.free(); return NULL; } @@ -818,7 +817,7 @@ if (catDict.isDict()) { catDict.dictLookup("StructTreeRoot", &structTreeRoot); } else { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); structTreeRoot.initNull(); } catDict.free(); @@ -837,7 +836,7 @@ if (catDict.isDict()) { catDict.dictLookup("Outlines", &outline); } else { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); outline.initNull(); } catDict.free(); @@ -856,7 +855,7 @@ if (catDict.isDict()) { catDict.dictLookup("Dests", &dests); } else { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); dests.initNull(); } catDict.free(); @@ -869,7 +868,9 @@ { if (!form) { if (acroForm.isDict()) { - form = new Form(xref,&acroForm); + form = new Form(doc, &acroForm); + // perform form-related loading after all widgets have been loaded + form->postWidgetsLoad(); } } @@ -897,7 +898,7 @@ if (catDict.isDict()) { catDict.dictLookup("Names", &names); } else { - error(-1, "Catalog object is wrong type (%s)", catDict.getTypeName()); + error(errSyntaxError, -1, "Catalog object is wrong type ({0:s})", catDict.getTypeName()); names.initNull(); } catDict.free(); diff -Nru poppler-0.18.4/poppler/Catalog.h poppler-0.20.5/poppler/Catalog.h --- poppler-0.18.4/poppler/Catalog.h 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/Catalog.h 2012-05-10 20:05:44.000000000 +0000 @@ -37,6 +37,7 @@ #include +class PDFDoc; class XRef; class Object; class Page; @@ -93,7 +94,7 @@ public: // Constructor. - Catalog(XRef *xrefA); + Catalog(PDFDoc *docA); // Destructor. ~Catalog(); @@ -185,6 +186,7 @@ // Get page label info. PageLabelInfo *getPageLabelInfo(); + PDFDoc *doc; XRef *xref; // the xref table for this PDF file Page **pages; // array of pages Ref *pageRefs; // object ID for each page diff -Nru poppler-0.18.4/poppler/CharCodeToUnicode.cc poppler-0.20.5/poppler/CharCodeToUnicode.cc --- poppler-0.18.4/poppler/CharCodeToUnicode.cc 2011-11-22 21:33:10.000000000 +0000 +++ poppler-0.20.5/poppler/CharCodeToUnicode.cc 2012-08-30 20:31:05.000000000 +0000 @@ -13,13 +13,14 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2006, 2008-2010 Albert Astals Cid +// Copyright (C) 2006, 2008-2010, 2012 Albert Astals Cid // Copyright (C) 2007 Julien Rebetez // Copyright (C) 2007 Koji Otani // Copyright (C) 2008 Michael Vrable // Copyright (C) 2008 Vasile Gaburici // Copyright (C) 2010 William Bader // Copyright (C) 2010 Jakub Wilk +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -73,6 +74,51 @@ //------------------------------------------------------------------------ +static int hexCharVals[256] = { + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 0x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 1x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 2x + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, // 3x + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 4x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 5x + -1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 6x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 7x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 8x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 9x + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Ax + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Bx + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Cx + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Dx + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // Ex + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 // Fx +}; + +// Parse a -byte hex string into *. Returns false on +// error. +static GBool parseHex(char *s, int len, Guint *val) { + int i, x; + + *val = 0; + for (i = 0; i < len; ++i) { + x = hexCharVals[s[i] & 0xff]; + if (x < 0) { + return gFalse; + } + *val = (*val << 4) + x; + } + return gTrue; +} + +//------------------------------------------------------------------------ + +CharCodeToUnicode *CharCodeToUnicode::makeIdentityMapping() { + CharCodeToUnicode *ctu = new CharCodeToUnicode(); + ctu->isIdentity = gTrue; + ctu->mapLen = 1; + ctu->map = (Unicode *)gmallocn(ctu->mapLen, sizeof(Unicode)); + return ctu; +} + CharCodeToUnicode *CharCodeToUnicode::parseCIDToUnicode(GooString *fileName, GooString *collection) { FILE *f; @@ -82,9 +128,9 @@ Unicode u; CharCodeToUnicode *ctu; - if (!(f = fopen(fileName->getCString(), "r"))) { - error(-1, "Couldn't open cidToUnicode file '%s'", - fileName->getCString()); + if (!(f = openFile(fileName->getCString(), "r"))) { + error(errIO, -1, "Couldn't open cidToUnicode file '{0:t}'", + fileName); return NULL; } @@ -100,8 +146,8 @@ if (sscanf(buf, "%x", &u) == 1) { mapA[mapLenA] = u; } else { - error(-1, "Bad line (%d) in cidToUnicode file '%s'", - (int)(mapLenA + 1), fileName->getCString()); + error(errSyntaxWarning, -1, "Bad line ({0:d}) in cidToUnicode file '{1:t}'", + (int)(mapLenA + 1), fileName); mapA[mapLenA] = 0; } ++mapLenA; @@ -129,10 +175,10 @@ int line, n, i; char *tokptr; - if (!(f = fopen(fileName->getCString(), "r"))) { + if (!(f = openFile(fileName->getCString(), "r"))) { gfree(uBuf); - error(-1, "Couldn't open unicodeToUnicode file '%s'", - fileName->getCString()); + error(errIO, -1, "Couldn't open unicodeToUnicode file '{0:t}'", + fileName); return NULL; } @@ -147,9 +193,9 @@ while (getLine(buf, sizeof(buf), f)) { ++line; if (!(tok = strtok_r(buf, " \t\r\n", &tokptr)) || - sscanf(tok, "%x", &u0) != 1) { - error(-1, "Bad line (%d) in unicodeToUnicode file '%s'", - line, fileName->getCString()); + !parseHex(tok, strlen(tok), &u0)) { + error(errSyntaxWarning, -1, "Bad line ({0:d}) in unicodeToUnicode file '{1:t}'", + line, fileName); continue; } n = 0; @@ -159,16 +205,16 @@ uBufSize += 8; uBuf = (Unicode *)greallocn(uBuf, uBufSize, sizeof(Unicode)); } - if (sscanf(tok, "%x", &uBuf[n]) != 1) { - error(-1, "Bad line (%d) in unicodeToUnicode file '%s'", - line, fileName->getCString()); + if (!parseHex(tok, strlen(tok), &uBuf[n])) { + error(errSyntaxWarning, -1, "Bad line ({0:d}) in unicodeToUnicode file '{1:t}'", + line, fileName); break; } ++n; } if (n < 1) { - error(-1, "Bad line (%d) in unicodeToUnicode file '%s'", - line, fileName->getCString()); + error(errSyntaxWarning, -1, "Bad line ({0:d}) in unicodeToUnicode file '{1:t}'", + line, fileName); continue; } if (u0 >= size) { @@ -233,8 +279,8 @@ ctu->parseCMap1(&getCharFromFile, f, nBits); fclose(f); } else { - error(-1, "Couldn't find ToUnicode CMap file for '%s'", - fileName->getCString()); + error(errSyntaxError, -1, "Couldn't find ToUnicode CMap file for '{0:t}'", + fileName); } return ctu; } @@ -250,13 +296,13 @@ int nBits) { PSTokenizer *pst; char tok1[256], tok2[256], tok3[256]; - int nDigits, n1, n2, n3; + int n1, n2, n3; CharCode i; - CharCode code1, code2; + CharCode maxCode, code1, code2; GooString *name; FILE *f; - nDigits = nBits / 4; + maxCode = (nBits == 8) ? 0xff : (nBits == 16) ? 0xffff : 0xffffffff; pst = new PSTokenizer(getCharFunc, data); pst->getToken(tok1, sizeof(tok1), &n1); while (pst->getToken(tok2, sizeof(tok2), &n2)) { @@ -267,8 +313,8 @@ parseCMap1(&getCharFromFile, f, nBits); fclose(f); } else { - error(-1, "Couldn't find ToUnicode CMap file for '%s'", - name->getCString()); + error(errSyntaxError, -1, "Couldn't find ToUnicode CMap file for '{0:t}'", + name); } delete name; } @@ -280,22 +326,23 @@ } if (!pst->getToken(tok2, sizeof(tok2), &n2) || !strcmp(tok2, "endbfchar")) { - error(-1, "Illegal entry in bfchar block in ToUnicode CMap"); + error(errSyntaxWarning, -1, "Illegal entry in bfchar block in ToUnicode CMap"); break; } - if (!(n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && + if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && tok2[0] == '<' && tok2[n2 - 1] == '>')) { - if (!(n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0' && - tok2[0] == '<' && tok2[n2 - 1] == '>')) { - error(-1, "Illegal entry in bfchar block in ToUnicode CMap"); - continue; - } + error(errSyntaxWarning, -1, "Illegal entry in bfchar block in ToUnicode CMap"); + continue; } tok1[n1 - 1] = tok2[n2 - 1] = '\0'; - if (sscanf(tok1 + 1, "%x", &code1) != 1) { - error(-1, "Illegal entry in bfchar block in ToUnicode CMap"); + if (!parseHex(tok1 + 1, n1 - 2, &code1)) { + error(errSyntaxWarning, -1, "Illegal entry in bfchar block in ToUnicode CMap"); continue; } + if (code1 > maxCode) { + error(errSyntaxWarning, -1, + "Invalid entry in bfchar block in ToUnicode CMap"); + } addMapping(code1, tok2 + 1, n2 - 2, 0); } pst->getToken(tok1, sizeof(tok1), &n1); @@ -308,22 +355,30 @@ !strcmp(tok2, "endbfrange") || !pst->getToken(tok3, sizeof(tok3), &n3) || !strcmp(tok3, "endbfrange")) { - error(-1, "Illegal entry in bfrange block in ToUnicode CMap"); + error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); break; } - if (!(((n1 == 2 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>') || - (n1 == 4 + nDigits && tok1[0] == '<' && tok1[n1 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')) && - ((n2 == 2 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>') || - (n2 == 4 + nDigits && tok2[0] == '<' && tok2[n2 - 1] == '>' && tok1[1] == '0' && tok1[2] == '0')))) { - error(-1, "Illegal entry in bfrange block in ToUnicode CMap"); + if (!(tok1[0] == '<' && tok1[n1 - 1] == '>' && + tok2[0] == '<' && tok2[n2 - 1] == '>')) { + error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); continue; } tok1[n1 - 1] = tok2[n2 - 1] = '\0'; - if (sscanf(tok1 + 1, "%x", &code1) != 1 || - sscanf(tok2 + 1, "%x", &code2) != 1) { - error(-1, "Illegal entry in bfrange block in ToUnicode CMap"); + if (!parseHex(tok1 + 1, n1 - 2, &code1) || + !parseHex(tok2 + 1, n2 - 2, &code2)) { + error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); continue; } + if (code1 > maxCode || code2 > maxCode) { + error(errSyntaxWarning, -1, + "Invalid entry in bfrange block in ToUnicode CMap"); + if (code1 > maxCode) { + code1 = maxCode; + } + if (code2 > maxCode) { + code2 = maxCode; + } + } if (!strcmp(tok3, "[")) { i = 0; while (pst->getToken(tok1, sizeof(tok1), &n1) && @@ -335,7 +390,7 @@ tok1[n1 - 1] = '\0'; addMapping(code1 + i, tok1 + 1, n1 - 2, 0); } else { - error(-1, "Illegal entry in bfrange block in ToUnicode CMap"); + error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); } ++i; } @@ -346,7 +401,7 @@ } } else { - error(-1, "Illegal entry in bfrange block in ToUnicode CMap"); + error(errSyntaxWarning, -1, "Illegal entry in bfrange block in ToUnicode CMap"); } } pst->getToken(tok1, sizeof(tok1), &n1); @@ -361,14 +416,21 @@ int offset) { CharCode oldLen, i; Unicode u; - char uHex[5]; int j; + if (code > 0xffffff) { + // This is an arbitrary limit to avoid integer overflow issues. + // (I've seen CMaps with mappings for .) + return; + } if (code >= mapLen) { oldLen = mapLen; - mapLen = (code + 256) & ~255; + mapLen = mapLen ? 2 * mapLen : 256; + if (code >= mapLen) { + mapLen = (code + 256) & ~255; + } if (unlikely(code >= mapLen)) { - error(-1, "Illegal code value in CharCodeToUnicode::addMapping"); + error(errSyntaxWarning, -1, "Illegal code value in CharCodeToUnicode::addMapping"); return; } else { map = (Unicode *)greallocn(map, mapLen, sizeof(Unicode)); @@ -378,8 +440,8 @@ } } if (n <= 4) { - if (sscanf(uStr, "%x", &u) != 1) { - error(-1, "Illegal entry in ToUnicode CMap"); + if (!parseHex(uStr, n, &u)) { + error(errSyntaxWarning, -1, "Illegal entry in ToUnicode CMap"); return; } map[code] = u + offset; @@ -394,10 +456,9 @@ sMap[sMapLen].len = n / 4; sMap[sMapLen].u = (Unicode*)gmallocn(sMap[sMapLen].len, sizeof(Unicode)); for (j = 0; j < sMap[sMapLen].len; ++j) { - strncpy(uHex, uStr + j*4, 4); - uHex[4] = '\0'; - if (sscanf(uHex, "%x", &sMap[sMapLen].u[j]) != 1) { - error(-1, "Illegal entry in ToUnicode CMap"); + if (!parseHex(uStr + j*4, 4, &sMap[sMapLen].u[j])) { + error(errSyntaxWarning, -1, "Illegal entry in ToUnicode CMap"); + return; } } sMap[sMapLen].u[sMap[sMapLen].len - 1] += offset; @@ -405,6 +466,19 @@ } } +CharCodeToUnicode::CharCodeToUnicode() { + tag = NULL; + map = NULL; + mapLen = 0; + sMap = NULL; + sMapLen = sMapSize = 0; + refCnt = 1; + isIdentity = gFalse; +#if MULTITHREADED + gInitMutex(&mutex); +#endif +} + CharCodeToUnicode::CharCodeToUnicode(GooString *tagA) { CharCode i; @@ -417,6 +491,7 @@ sMap = NULL; sMapLen = sMapSize = 0; refCnt = 1; + isIdentity = gFalse; #if MULTITHREADED gInitMutex(&mutex); #endif @@ -438,6 +513,7 @@ sMapLen = sMapLenA; sMapSize = sMapSizeA; refCnt = 1; + isIdentity = gFalse; #if MULTITHREADED gInitMutex(&mutex); #endif @@ -489,6 +565,9 @@ void CharCodeToUnicode::setMapping(CharCode c, Unicode *u, int len) { int i, j; + if (!map || isIdentity) { + return; + } if (len == 1) { map[c] = u[0]; } else { @@ -519,6 +598,11 @@ int CharCodeToUnicode::mapToUnicode(CharCode c, Unicode **u) { int i; + if (isIdentity) { + map[0] = (Unicode)c; + *u = map; + return 1; + } if (c >= mapLen) { return 0; } @@ -538,6 +622,10 @@ int CharCodeToUnicode::mapToCharCode(Unicode* u, CharCode *c, int usize) { //look for charcode in map if (usize == 1) { + if (isIdentity) { + *c = (CharCode) *u; + return 1; + } for (CharCode i=0; i // Copyright (C) 2007 Koji Otani -// Copyright (C) 2008, 2011 Albert Astals Cid +// Copyright (C) 2008, 2011, 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -48,6 +48,9 @@ friend class UnicodeToCharCode; public: + // Create an identity mapping (Unicode = CharCode). + static CharCodeToUnicode *makeIdentityMapping(); + // Read the CID-to-Unicode mapping for from the file // specified by . Sets the initial reference count to 1. // Returns NULL on failure. @@ -83,9 +86,12 @@ // Set the mapping for . void setMapping(CharCode c, Unicode *u, int len); - // Map a CharCode to Unicode. + // Map a CharCode to Unicode. Returns a pointer in u to internal storage + // so never store the pointers it returns, just the data, otherwise + // your pointed values might get changed by future calls int mapToUnicode(CharCode c, Unicode **u); + // Map a Unicode to CharCode. int mapToCharCode(Unicode* u, CharCode *c, int usize); // Return the mapping's length, i.e., one more than the max char @@ -96,6 +102,7 @@ void parseCMap1(int (*getCharFunc)(void *), void *data, int nBits); void addMapping(CharCode code, char *uStr, int n, int offset); + CharCodeToUnicode(); CharCodeToUnicode(GooString *tagA); CharCodeToUnicode(GooString *tagA, Unicode *mapA, CharCode mapLenA, GBool copyMap, @@ -108,6 +115,7 @@ CharCodeToUnicodeString *sMap; int sMapLen, sMapSize; int refCnt; + GBool isIdentity; #if MULTITHREADED GooMutex mutex; #endif diff -Nru poppler-0.18.4/poppler/CurlCachedFile.cc poppler-0.20.5/poppler/CurlCachedFile.cc --- poppler-0.18.4/poppler/CurlCachedFile.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/CurlCachedFile.cc 2012-05-10 20:05:44.000000000 +0000 @@ -56,7 +56,7 @@ curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD, &contentLength); size = contentLength; } else { - error(-1, "Failed to get size of '%s'.", url->getCString()); + error(errInternal, -1, "Failed to get size of '{0:t}'.", url); size = -1; } curl_easy_reset(curl); diff -Nru poppler-0.18.4/poppler/DCTStream.cc poppler-0.20.5/poppler/DCTStream.cc --- poppler-0.18.4/poppler/DCTStream.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/DCTStream.cc 2012-09-09 21:24:04.000000000 +0000 @@ -5,11 +5,12 @@ // This file is licensed under the GPLv2 or later // // Copyright 2005 Jeff Muizelaar -// Copyright 2005-2010 Albert Astals Cid +// Copyright 2005-2010, 2012 Albert Astals Cid // Copyright 2009 Ryszard Trojnacki // Copyright 2010 Carlos Garcia Campos // Copyright 2011 Daiki Ueno // Copyright 2011 Tomas Hoger +// Copyright 2012 Thomas Freitag // //======================================================================== @@ -125,7 +126,7 @@ c = str->getChar(); if (c == -1) { - error(-1, "Could not find start of jpeg data"); + error(errSyntaxError, -1, "Could not find start of jpeg data"); return; } if (c != 0xFF) c = 0; @@ -222,10 +223,13 @@ } int DCTStream::lookChar() { + if (unlikely(current == NULL)) { + return EOF; + } return *current; } -GooString *DCTStream::getPSFilter(int psLevel, char *indent) { +GooString *DCTStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 2) { diff -Nru poppler-0.18.4/poppler/DCTStream.h poppler-0.20.5/poppler/DCTStream.h --- poppler-0.18.4/poppler/DCTStream.h 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/DCTStream.h 2012-05-10 20:05:44.000000000 +0000 @@ -66,7 +66,7 @@ virtual void reset(); virtual int getChar(); virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: diff -Nru poppler-0.18.4/poppler/Decrypt.cc poppler-0.20.5/poppler/Decrypt.cc --- poppler-0.18.4/poppler/Decrypt.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/Decrypt.cc 2012-09-08 16:07:00.000000000 +0000 @@ -34,11 +34,13 @@ #include "Decrypt.h" #include "Error.h" -static void rc4InitKey(Guchar *key, int keyLen, Guchar *state); -static Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c); static void aesKeyExpansion(DecryptAESState *s, Guchar *objKey, int objKeyLen); static void aesDecryptBlock(DecryptAESState *s, Guchar *in, GBool last); +static void aes256KeyExpansion(DecryptAES256State *s, + Guchar *objKey, int objKeyLen); +static void aes256DecryptBlock(DecryptAES256State *s, Guchar *in, GBool last); +static void sha256(Guchar *msg, int msgLen, Guchar *hash); static const Guchar passwordPad[32] = { 0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, @@ -53,67 +55,139 @@ GBool Decrypt::makeFileKey(int encVersion, int encRevision, int keyLength, GooString *ownerKey, GooString *userKey, + GooString *ownerEnc, GooString *userEnc, int permissions, GooString *fileID, GooString *ownerPassword, GooString *userPassword, Guchar *fileKey, GBool encryptMetadata, GBool *ownerPasswordOk) { - Guchar test[32], test2[32]; + DecryptAES256State state; + Guchar test[127 + 56], test2[32]; GooString *userPassword2; Guchar fState[256]; Guchar tmpKey[16]; Guchar fx, fy; int len, i, j; - // try using the supplied owner password to generate the user password *ownerPasswordOk = gFalse; - if (ownerPassword) { - len = ownerPassword->getLength(); - if (len < 32) { + + if (encRevision == 5) { + + // check the owner password + if (ownerPassword) { + //~ this is supposed to convert the password to UTF-8 using "SASLprep" + len = ownerPassword->getLength(); + if (len > 127) { + len = 127; + } memcpy(test, ownerPassword->getCString(), len); - memcpy(test + len, passwordPad, 32 - len); - } else { - memcpy(test, ownerPassword->getCString(), 32); + memcpy(test + len, ownerKey->getCString() + 32, 8); + memcpy(test + len + 8, userKey->getCString(), 48); + sha256(test, len + 56, test); + if (!memcmp(test, ownerKey->getCString(), 32)) { + + // compute the file key from the owner password + memcpy(test, ownerPassword->getCString(), len); + memcpy(test + len, ownerKey->getCString() + 40, 8); + memcpy(test + len + 8, userKey->getCString(), 48); + sha256(test, len + 56, test); + aes256KeyExpansion(&state, test, 32); + for (i = 0; i < 16; ++i) { + state.cbc[i] = 0; + } + aes256DecryptBlock(&state, (Guchar *)ownerEnc->getCString(), gFalse); + memcpy(fileKey, state.buf, 16); + aes256DecryptBlock(&state, (Guchar *)ownerEnc->getCString() + 16, + gFalse); + memcpy(fileKey + 16, state.buf, 16); + + *ownerPasswordOk = gTrue; + return gTrue; + } } - md5(test, 32, test); - if (encRevision == 3) { - for (i = 0; i < 50; ++i) { - md5(test, keyLength, test); + + // check the user password + if (userPassword) { + //~ this is supposed to convert the password to UTF-8 using "SASLprep" + len = userPassword->getLength(); + if (len > 127) { + len = 127; + } + memcpy(test, userPassword->getCString(), len); + memcpy(test + len, userKey->getCString() + 32, 8); + sha256(test, len + 8, test); + if (!memcmp(test, userKey->getCString(), 32)) { + + // compute the file key from the user password + memcpy(test, userPassword->getCString(), len); + memcpy(test + len, userKey->getCString() + 40, 8); + sha256(test, len + 8, test); + aes256KeyExpansion(&state, test, 32); + for (i = 0; i < 16; ++i) { + state.cbc[i] = 0; + } + aes256DecryptBlock(&state, (Guchar *)userEnc->getCString(), gFalse); + memcpy(fileKey, state.buf, 16); + aes256DecryptBlock(&state, (Guchar *)userEnc->getCString() + 16, + gFalse); + memcpy(fileKey + 16, state.buf, 16); + + return gTrue; } } - if (encRevision == 2) { - rc4InitKey(test, keyLength, fState); - fx = fy = 0; - for (i = 0; i < 32; ++i) { - test2[i] = rc4DecryptByte(fState, &fx, &fy, ownerKey->getChar(i)); + + return gFalse; + } else { + + // try using the supplied owner password to generate the user password + if (ownerPassword) { + len = ownerPassword->getLength(); + if (len < 32) { + memcpy(test, ownerPassword->getCString(), len); + memcpy(test + len, passwordPad, 32 - len); + } else { + memcpy(test, ownerPassword->getCString(), 32); } - } else { - memcpy(test2, ownerKey->getCString(), 32); - for (i = 19; i >= 0; --i) { - for (j = 0; j < keyLength; ++j) { - tmpKey[j] = test[j] ^ i; + md5(test, 32, test); + if (encRevision == 3) { + for (i = 0; i < 50; ++i) { + md5(test, keyLength, test); } - rc4InitKey(tmpKey, keyLength, fState); + } + if (encRevision == 2) { + rc4InitKey(test, keyLength, fState); fx = fy = 0; - for (j = 0; j < 32; ++j) { - test2[j] = rc4DecryptByte(fState, &fx, &fy, test2[j]); + for (i = 0; i < 32; ++i) { + test2[i] = rc4DecryptByte(fState, &fx, &fy, ownerKey->getChar(i)); + } + } else { + memcpy(test2, ownerKey->getCString(), 32); + for (i = 19; i >= 0; --i) { + for (j = 0; j < keyLength; ++j) { + tmpKey[j] = test[j] ^ i; + } + rc4InitKey(tmpKey, keyLength, fState); + fx = fy = 0; + for (j = 0; j < 32; ++j) { + test2[j] = rc4DecryptByte(fState, &fx, &fy, test2[j]); + } } } - } - userPassword2 = new GooString((char *)test2, 32); - if (makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey, - permissions, fileID, userPassword2, fileKey, - encryptMetadata)) { - *ownerPasswordOk = gTrue; + userPassword2 = new GooString((char *)test2, 32); + if (makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey, + permissions, fileID, userPassword2, fileKey, + encryptMetadata)) { + *ownerPasswordOk = gTrue; + delete userPassword2; + return gTrue; + } delete userPassword2; - return gTrue; } - delete userPassword2; - } - // try using the supplied user password - return makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey, - permissions, fileID, userPassword, fileKey, - encryptMetadata); + // try using the supplied user password + return makeFileKey2(encVersion, encRevision, keyLength, ownerKey, userKey, + permissions, fileID, userPassword, fileKey, + encryptMetadata); + } } GBool Decrypt::makeFileKey2(int encVersion, int encRevision, int keyLength, @@ -203,7 +277,7 @@ int objNum, int objGen): FilterStream(strA) { - int n, i; + int i; algo = algoA; @@ -211,23 +285,36 @@ for (i = 0; i < keyLength; ++i) { objKey[i] = fileKey[i]; } - objKey[keyLength] = objNum & 0xff; - objKey[keyLength + 1] = (objNum >> 8) & 0xff; - objKey[keyLength + 2] = (objNum >> 16) & 0xff; - objKey[keyLength + 3] = objGen & 0xff; - objKey[keyLength + 4] = (objGen >> 8) & 0xff; - if (algo == cryptAES) { + switch (algo) { + case cryptRC4: + objKey[keyLength] = objNum & 0xff; + objKey[keyLength + 1] = (objNum >> 8) & 0xff; + objKey[keyLength + 2] = (objNum >> 16) & 0xff; + objKey[keyLength + 3] = objGen & 0xff; + objKey[keyLength + 4] = (objGen >> 8) & 0xff; + md5(objKey, keyLength + 5, objKey); + if ((objKeyLength = keyLength + 5) > 16) { + objKeyLength = 16; + } + break; + case cryptAES: + objKey[keyLength] = objNum & 0xff; + objKey[keyLength + 1] = (objNum >> 8) & 0xff; + objKey[keyLength + 2] = (objNum >> 16) & 0xff; + objKey[keyLength + 3] = objGen & 0xff; + objKey[keyLength + 4] = (objGen >> 8) & 0xff; objKey[keyLength + 5] = 0x73; // 's' objKey[keyLength + 6] = 0x41; // 'A' objKey[keyLength + 7] = 0x6c; // 'l' objKey[keyLength + 8] = 0x54; // 'T' - n = keyLength + 9; - } else { - n = keyLength + 5; - } - Decrypt::md5(objKey, n, objKey); - if ((objKeyLength = keyLength + 5) > 16) { - objKeyLength = 16; + md5(objKey, keyLength + 9, objKey); + if ((objKeyLength = keyLength + 5) > 16) { + objKeyLength = 16; + } + break; + case cryptAES256: + objKeyLength = keyLength; + break; } charactersRead = 0; @@ -255,6 +342,13 @@ } state.aes.bufIdx = 16; break; + case cryptAES256: + aes256KeyExpansion(&state.aes256, objKey, objKeyLength); + for (i = 0; i < 16; ++i) { + state.aes256.cbc[i] = str->getChar(); + } + state.aes256.bufIdx = 16; + break; } } @@ -295,6 +389,22 @@ c = state.aes.buf[state.aes.bufIdx++]; } break; + case cryptAES256: + if (state.aes256.bufIdx == 16) { + for (i = 0; i < 16; ++i) { + if ((c = str->getChar()) == EOF) { + return EOF; + } + in[i] = (Guchar)c; + } + aes256DecryptBlock(&state.aes256, in, str->lookChar() == EOF); + } + if (state.aes256.bufIdx == 16) { + c = EOF; + } else { + c = state.aes256.buf[state.aes256.bufIdx++]; + } + break; } if (c != EOF) charactersRead++; @@ -333,6 +443,22 @@ c = state.aes.buf[state.aes.bufIdx]; } break; + case cryptAES256: + if (state.aes256.bufIdx == 16) { + for (i = 0; i < 16; ++i) { + if ((c = str->getChar()) == EOF) { + return EOF; + } + in[i] = c; + } + aes256DecryptBlock(&state.aes256, in, str->lookChar() == EOF); + } + if (state.aes256.bufIdx == 16) { + c = EOF; + } else { + c = state.aes256.buf[state.aes256.bufIdx]; + } + break; } return c; } @@ -345,7 +471,7 @@ // RC4-compatible decryption //------------------------------------------------------------------------ -static void rc4InitKey(Guchar *key, int keyLen, Guchar *state) { +void rc4InitKey(Guchar *key, int keyLen, Guchar *state) { Guchar index1, index2; Guchar t; int i; @@ -366,7 +492,7 @@ } } -static Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c) { +Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c) { Guchar x1, y1, tx, ty; x1 = *x = (*x + 1) % 256; @@ -626,13 +752,99 @@ s->bufIdx = 0; if (last) { n = s->buf[15]; + if (n < 1 || n > 16) { // this should never happen + n = 16; + } + for (i = 15; i >= n; --i) { + s->buf[i] = s->buf[i-n]; + } + s->bufIdx = n; + } +} + +//------------------------------------------------------------------------ +// AES-256 decryption +//------------------------------------------------------------------------ + +static void aes256KeyExpansion(DecryptAES256State *s, + Guchar *objKey, int objKeyLen) { + Guint temp; + int i, round; + + //~ this assumes objKeyLen == 32 + + for (i = 0; i < 8; ++i) { + s->w[i] = (objKey[4*i] << 24) + (objKey[4*i+1] << 16) + + (objKey[4*i+2] << 8) + objKey[4*i+3]; + } + for (i = 8; i < 60; ++i) { + temp = s->w[i-1]; + if ((i & 7) == 0) { + temp = subWord(rotWord(temp)) ^ rcon[i/8]; + } else if ((i & 7) == 4) { + temp = subWord(temp); + } + s->w[i] = s->w[i-8] ^ temp; + } + for (round = 1; round <= 13; ++round) { + invMixColumnsW(&s->w[round * 4]); + } +} + +static void aes256DecryptBlock(DecryptAES256State *s, Guchar *in, GBool last) { + int c, round, n, i; + + // initial state + for (c = 0; c < 4; ++c) { + s->state[c] = in[4*c]; + s->state[4+c] = in[4*c+1]; + s->state[8+c] = in[4*c+2]; + s->state[12+c] = in[4*c+3]; + } + + // round 0 + addRoundKey(s->state, &s->w[14 * 4]); + + // rounds 13-1 + for (round = 13; round >= 1; --round) { + invSubBytes(s->state); + invShiftRows(s->state); + invMixColumns(s->state); + addRoundKey(s->state, &s->w[round * 4]); + } + + // round 14 + invSubBytes(s->state); + invShiftRows(s->state); + addRoundKey(s->state, &s->w[0]); + + // CBC + for (c = 0; c < 4; ++c) { + s->buf[4*c] = s->state[c] ^ s->cbc[4*c]; + s->buf[4*c+1] = s->state[4+c] ^ s->cbc[4*c+1]; + s->buf[4*c+2] = s->state[8+c] ^ s->cbc[4*c+2]; + s->buf[4*c+3] = s->state[12+c] ^ s->cbc[4*c+3]; + } + + // save the input block for the next CBC + for (i = 0; i < 16; ++i) { + s->cbc[i] = in[i]; + } + + // remove padding + s->bufIdx = 0; + if (last) { + n = s->buf[15]; + if (n < 1 || n > 16) { // this should never happen + n = 16; + } for (i = 15; i >= n; --i) { s->buf[i] = s->buf[i-n]; } s->bufIdx = n; if (n > 16) { - error(-1, "Reducing bufIdx from %d to 16 to not crash", n); + error(errSyntaxError, -1, "Reducing bufIdx from {0:d} to 16 to not crash", n); s->bufIdx = 16; } } @@ -668,12 +880,17 @@ return b + rotateLeft((a + (c ^ (b | ~d)) + Xk + Ti), s); } -void Decrypt::md5(Guchar *msg, int msgLen, Guchar *digest) { +void md5(Guchar *msg, int msgLen, Guchar *digest) { Gulong x[16]; Gulong a, b, c, d, aa, bb, cc, dd; int n64; int i, j, k; + // sanity check + if (msgLen < 0) { + return; + } + // compute number of 64-byte blocks // (length + pad byte (0x80) + 8 bytes for length) n64 = (msgLen + 1 + 8 + 63) / 64; @@ -809,3 +1026,160 @@ digest[14] = (Guchar)((d >>= 8) & 0xff); digest[15] = (Guchar)((d >>= 8) & 0xff); } + +//------------------------------------------------------------------------ +// SHA-256 hash +//------------------------------------------------------------------------ + +static Guint sha256K[64] = { + 0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5, + 0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5, + 0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3, + 0x72be5d74, 0x80deb1fe, 0x9bdc06a7, 0xc19bf174, + 0xe49b69c1, 0xefbe4786, 0x0fc19dc6, 0x240ca1cc, + 0x2de92c6f, 0x4a7484aa, 0x5cb0a9dc, 0x76f988da, + 0x983e5152, 0xa831c66d, 0xb00327c8, 0xbf597fc7, + 0xc6e00bf3, 0xd5a79147, 0x06ca6351, 0x14292967, + 0x27b70a85, 0x2e1b2138, 0x4d2c6dfc, 0x53380d13, + 0x650a7354, 0x766a0abb, 0x81c2c92e, 0x92722c85, + 0xa2bfe8a1, 0xa81a664b, 0xc24b8b70, 0xc76c51a3, + 0xd192e819, 0xd6990624, 0xf40e3585, 0x106aa070, + 0x19a4c116, 0x1e376c08, 0x2748774c, 0x34b0bcb5, + 0x391c0cb3, 0x4ed8aa4a, 0x5b9cca4f, 0x682e6ff3, + 0x748f82ee, 0x78a5636f, 0x84c87814, 0x8cc70208, + 0x90befffa, 0xa4506ceb, 0xbef9a3f7, 0xc67178f2 +}; + +static inline Guint rotr(Guint x, Guint n) { + return (x >> n) | (x << (32 - n)); +} + +static inline Guint sha256Ch(Guint x, Guint y, Guint z) { + return (x & y) ^ (~x & z); +} + +static inline Guint sha256Maj(Guint x, Guint y, Guint z) { + return (x & y) ^ (x & z) ^ (y & z); +} + +static inline Guint sha256Sigma0(Guint x) { + return rotr(x, 2) ^ rotr(x, 13) ^ rotr(x, 22); +} + +static inline Guint sha256Sigma1(Guint x) { + return rotr(x, 6) ^ rotr(x, 11) ^ rotr(x, 25); +} + +static inline Guint sha256sigma0(Guint x) { + return rotr(x, 7) ^ rotr(x, 18) ^ (x >> 3); +} + +static inline Guint sha256sigma1(Guint x) { + return rotr(x, 17) ^ rotr(x, 19) ^ (x >> 10); +} + +void sha256HashBlock(Guchar *blk, Guint *H) { + Guint W[64]; + Guint a, b, c, d, e, f, g, h; + Guint T1, T2; + Guint t; + + // 1. prepare the message schedule + for (t = 0; t < 16; ++t) { + W[t] = (blk[t*4] << 24) | + (blk[t*4 + 1] << 16) | + (blk[t*4 + 2] << 8) | + blk[t*4 + 3]; + } + for (t = 16; t < 64; ++t) { + W[t] = sha256sigma1(W[t-2]) + W[t-7] + sha256sigma0(W[t-15]) + W[t-16]; + } + + // 2. initialize the eight working variables + a = H[0]; + b = H[1]; + c = H[2]; + d = H[3]; + e = H[4]; + f = H[5]; + g = H[6]; + h = H[7]; + + // 3. + for (t = 0; t < 64; ++t) { + T1 = h + sha256Sigma1(e) + sha256Ch(e,f,g) + sha256K[t] + W[t]; + T2 = sha256Sigma0(a) + sha256Maj(a,b,c); + h = g; + g = f; + f = e; + e = d + T1; + d = c; + c = b; + b = a; + a = T1 + T2; + } + + // 4. compute the intermediate hash value + H[0] += a; + H[1] += b; + H[2] += c; + H[3] += d; + H[4] += e; + H[5] += f; + H[6] += g; + H[7] += h; +} + +static void sha256(Guchar *msg, int msgLen, Guchar *hash) { + Guchar blk[64]; + Guint H[8]; + int blkLen, i; + + H[0] = 0x6a09e667; + H[1] = 0xbb67ae85; + H[2] = 0x3c6ef372; + H[3] = 0xa54ff53a; + H[4] = 0x510e527f; + H[5] = 0x9b05688c; + H[6] = 0x1f83d9ab; + H[7] = 0x5be0cd19; + + blkLen = 0; + for (i = 0; i + 64 <= msgLen; i += 64) { + sha256HashBlock(msg + i, H); + } + blkLen = msgLen - i; + if (blkLen > 0) { + memcpy(blk, msg + i, blkLen); + } + + // pad the message + blk[blkLen++] = 0x80; + if (blkLen > 56) { + while (blkLen < 64) { + blk[blkLen++] = 0; + } + sha256HashBlock(blk, H); + blkLen = 0; + } + while (blkLen < 56) { + blk[blkLen++] = 0; + } + blk[56] = 0; + blk[57] = 0; + blk[58] = 0; + blk[59] = 0; + blk[60] = (Guchar)(msgLen >> 21); + blk[61] = (Guchar)(msgLen >> 13); + blk[62] = (Guchar)(msgLen >> 5); + blk[63] = (Guchar)(msgLen << 3); + sha256HashBlock(blk, H); + + // copy the output into the buffer (convert words to bytes) + for (i = 0; i < 8; ++i) { + hash[i*4] = (Guchar)(H[i] >> 24); + hash[i*4 + 1] = (Guchar)(H[i] >> 16); + hash[i*4 + 2] = (Guchar)(H[i] >> 8); + hash[i*4 + 3] = (Guchar)H[i]; + } +} diff -Nru poppler-0.18.4/poppler/Decrypt.h poppler-0.20.5/poppler/Decrypt.h --- poppler-0.18.4/poppler/Decrypt.h 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/Decrypt.h 2012-09-08 16:07:00.000000000 +0000 @@ -39,7 +39,6 @@ class Decrypt { public: - static void md5(Guchar *msg, int msgLen, Guchar *digest); // Generate a file key. The buffer must have space for at // least 16 bytes. Checks and then @@ -48,6 +47,7 @@ // may be NULL, which is treated as an empty string. static GBool makeFileKey(int encVersion, int encRevision, int keyLength, GooString *ownerKey, GooString *userKey, + GooString *ownerEnc, GooString *userEnc, int permissions, GooString *fileID, GooString *ownerPassword, GooString *userPassword, Guchar *fileKey, GBool encryptMetadata, @@ -80,6 +80,14 @@ int bufIdx; }; +struct DecryptAES256State { + Guint w[60]; + Guchar state[16]; + Guchar cbc[16]; + Guchar buf[16]; + int bufIdx; +}; + class DecryptStream: public FilterStream { public: @@ -99,13 +107,20 @@ CryptAlgorithm algo; int objKeyLength; - Guchar objKey[16 + 9]; + Guchar objKey[32]; int charactersRead; // so that getPos() can be correct union { DecryptRC4State rc4; DecryptAESState aes; + DecryptAES256State aes256; } state; }; + +//------------------------------------------------------------------------ + +extern void rc4InitKey(Guchar *key, int keyLen, Guchar *state); +extern Guchar rc4DecryptByte(Guchar *state, Guchar *x, Guchar *y, Guchar c); +extern void md5(Guchar *msg, int msgLen, Guchar *digest); #endif diff -Nru poppler-0.18.4/poppler/Dict.cc poppler-0.20.5/poppler/Dict.cc --- poppler-0.18.4/poppler/Dict.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/Dict.cc 2012-09-09 19:12:56.000000000 +0000 @@ -18,6 +18,7 @@ // Copyright (C) 2007-2008 Julien Rebetez // Copyright (C) 2008, 2010 Albert Astals Cid // Copyright (C) 2010 Paweł Wiejacha +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -118,7 +119,7 @@ ++length; } -inline DictEntry *Dict::find(char *key) { +inline DictEntry *Dict::find(const char *key) { if (!sorted && length >= SORT_LENGTH_LOWER_LIMIT) { sorted = gTrue; @@ -141,11 +142,11 @@ return NULL; } -GBool Dict::hasKey(char *key) { +GBool Dict::hasKey(const char *key) { return find(key) != NULL; } -void Dict::remove(char *key) { +void Dict::remove(const char *key) { if (sorted) { const int pos = binarySearch(key, entries, length); if (pos != -1) { @@ -175,8 +176,12 @@ } } -void Dict::set(char *key, Object *val) { +void Dict::set(const char *key, Object *val) { DictEntry *e; + if (val->isNull()) { + remove(key); + return; + } e = find (key); if (e) { e->val.free(); @@ -187,19 +192,19 @@ } -GBool Dict::is(char *type) { +GBool Dict::is(const char *type) { DictEntry *e; return (e = find("Type")) && e->val.isName(type); } -Object *Dict::lookup(char *key, Object *obj, std::set *fetchOriginatorNums) { +Object *Dict::lookup(const char *key, Object *obj, int recursion) { DictEntry *e; - return (e = find(key)) ? e->val.fetch(xref, obj, fetchOriginatorNums) : obj->initNull(); + return (e = find(key)) ? e->val.fetch(xref, obj, recursion) : obj->initNull(); } -Object *Dict::lookupNF(char *key, Object *obj) { +Object *Dict::lookupNF(const char *key, Object *obj) { DictEntry *e; return (e = find(key)) ? e->val.copy(obj) : obj->initNull(); diff -Nru poppler-0.18.4/poppler/Dict.h poppler-0.20.5/poppler/Dict.h --- poppler-0.18.4/poppler/Dict.h 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/Dict.h 2012-05-10 20:05:44.000000000 +0000 @@ -63,17 +63,17 @@ void add(char *key, Object *val); // Update the value of an existing entry, otherwise create it - void set(char *key, Object *val); + void set(const char *key, Object *val); // Remove an entry. This invalidate indexes - void remove(char *key); + void remove(const char *key); // Check if dictionary is of specified type. - GBool is(char *type); + GBool is(const char *type); // Look up an entry and return the value. Returns a null object // if is not in the dictionary. - Object *lookup(char *key, Object *obj, std::set *fetchOriginatorNums = NULL); - Object *lookupNF(char *key, Object *obj); + Object *lookup(const char *key, Object *obj, int recursion = 0); + Object *lookupNF(const char *key, Object *obj); GBool lookupInt(const char *key, const char *alt_key, int *value); // Iterative accessors. @@ -88,7 +88,7 @@ XRef *getXRef() { return xref; } - GBool hasKey(char *key); + GBool hasKey(const char *key); private: @@ -99,7 +99,7 @@ int length; // number of entries in dictionary int ref; // reference count - DictEntry *find(char *key); + DictEntry *find(const char *key); }; #endif diff -Nru poppler-0.18.4/poppler/Error.cc poppler-0.20.5/poppler/Error.cc --- poppler-0.18.4/poppler/Error.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/Error.cc 2012-05-10 20:05:44.000000000 +0000 @@ -31,42 +31,54 @@ #include #include #include +#include "GooString.h" #include "GlobalParams.h" #include "Error.h" -static void defaultErrorFunction(int pos, char *msg, va_list args) -{ - if (pos >= 0) { - fprintf(stderr, "Error (%d): ", pos); - } else { - fprintf(stderr, "Error: "); - } - vfprintf(stderr, msg, args); - fprintf(stderr, "\n"); - fflush(stderr); -} +static const char *errorCategoryNames[] = { + "Syntax Warning", + "Syntax Error", + "Config Error", + "Command Line Error", + "I/O Error", + "Permission Error", + "Unimplemented Feature", + "Internal Error" +}; -static void (*errorFunction)(int, char *, va_list args) = defaultErrorFunction; +static void (*errorCbk)(void *data, ErrorCategory category, + int pos, char *msg) = NULL; +static void *errorCbkData = NULL; -void setErrorFunction(void (* f)(int, char *, va_list args)) -{ - errorFunction = f; +void setErrorCallback(void (*cbk)(void *data, ErrorCategory category, + int pos, char *msg), + void *data) { + errorCbk = cbk; + errorCbkData = data; } -void CDECL error(int pos, char *msg, ...) { +void CDECL error(ErrorCategory category, int pos, const char *msg, ...) { va_list args; + GooString *s; + // NB: this can be called before the globalParams object is created - if (globalParams && globalParams->getErrQuiet()) { + if (!errorCbk && globalParams && globalParams->getErrQuiet()) { return; } va_start(args, msg); - (*errorFunction)(pos, msg, args); - va_end(args); -} - -void warning(char *msg, ...) { - va_list args; - va_start(args, msg); - vprintf(msg, args); + s = GooString::formatv(msg, args); va_end(args); + if (errorCbk) { + (*errorCbk)(errorCbkData, category, pos, s->getCString()); + } else { + if (pos >= 0) { + fprintf(stderr, "%s (%d): %s\n", + errorCategoryNames[category], pos, s->getCString()); + } else { + fprintf(stderr, "%s: %s\n", + errorCategoryNames[category], s->getCString()); + } + fflush(stderr); + } + delete s; } diff -Nru poppler-0.18.4/poppler/Error.h poppler-0.20.5/poppler/Error.h --- poppler-0.18.4/poppler/Error.h 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/Error.h 2012-05-10 20:05:44.000000000 +0000 @@ -32,9 +32,25 @@ #include #include "poppler-config.h" -extern void CDECL error(int pos, char *msg, ...) GCC_PRINTF_FORMAT (2, 3); -void warning(char *msg, ...) GCC_PRINTF_FORMAT (1, 2); +enum ErrorCategory { + errSyntaxWarning, // PDF syntax error which can be worked around; + // output will probably be correct + errSyntaxError, // PDF syntax error which can be worked around; + // output will probably be incorrect + errConfig, // error in Xpdf config info (xpdfrc file, etc.) + errCommandLine, // error in user-supplied parameters, action not + // allowed, etc. (only used by command-line tools) + errIO, // error in file I/O + errNotAllowed, // action not allowed by PDF permission bits + errUnimplemented, // unimplemented PDF feature - display will be + // incorrect + errInternal // internal error - malfunction within the Xpdf code +}; -void setErrorFunction(void (* f)(int , char *, va_list args)); +extern void setErrorCallback(void (*cbk)(void *data, ErrorCategory category, + int pos, char *msg), + void *data); + +extern void CDECL error(ErrorCategory category, int pos, const char *msg, ...); #endif diff -Nru poppler-0.18.4/poppler/FileSpec.cc poppler-0.20.5/poppler/FileSpec.cc --- poppler-0.18.4/poppler/FileSpec.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/FileSpec.cc 2012-08-29 22:45:54.000000000 +0000 @@ -7,6 +7,7 @@ // // Copyright (C) 2008-2009 Carlos Garcia Campos // Copyright (C) 2009 Kovid Goyal +// Copyright (C) 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -79,6 +80,28 @@ m_objStr.free(); } +GBool EmbFile::save(const char *path) { + FILE *f; + GBool ret; + + if (!(f = fopen(path, "wb"))) { + return gFalse; + } + ret = save2(f); + fclose(f); + return ret; +} + +GBool EmbFile::save2(FILE *f) { + int c; + + m_objStr.streamReset(); + while ((c = m_objStr.streamGetChar()) != EOF) { + fputc(c, f); + } + return gTrue; +} + FileSpec::FileSpec(Object *fileSpecA) { ok = gTrue; @@ -92,7 +115,7 @@ if (!getFileSpecName(fileSpecA, &obj1)) { ok = gFalse; obj1.free(); - error(-1, "Invalid FileSpec"); + error(errSyntaxError, -1, "Invalid FileSpec"); return; } @@ -104,7 +127,7 @@ if (!obj1.dictLookupNF("F", &fileStream)->isRef()) { ok = gFalse; fileStream.free(); - error(-1, "Invalid FileSpec: Embedded file stream is not an indirect reference"); + error(errSyntaxError, -1, "Invalid FileSpec: Embedded file stream is not an indirect reference"); obj1.free(); return; } @@ -129,6 +152,9 @@ EmbFile *FileSpec::getEmbeddedFile() { + if(!ok) + return NULL; + if (embFile) return embFile; @@ -205,17 +231,17 @@ #ifdef _WIN32 char *platform = "DOS"; #else - char *platform = "Unix"; + const char *platform = "Unix"; #endif if (!fileSpec->dictLookup(platform, fileName)->isString ()) { fileName->free(); - error(-1, "Illegal file spec"); + error(errSyntaxError, -1, "Illegal file spec"); return gFalse; } } } } else { - error(-1, "Illegal file spec"); + error(errSyntaxError, -1, "Illegal file spec"); return gFalse; } diff -Nru poppler-0.18.4/poppler/FileSpec.h poppler-0.20.5/poppler/FileSpec.h --- poppler-0.18.4/poppler/FileSpec.h 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/FileSpec.h 2012-05-10 20:05:44.000000000 +0000 @@ -33,8 +33,11 @@ GooString *mimeType() { return m_mimetype; } Stream *stream() { return isOk() ? m_objStr.getStream() : NULL; } GBool isOk() { return m_objStr.isStream(); } + GBool save(const char *path); private: + GBool save2(FILE *f); + int m_size; GooString *m_createDate; GooString *m_modDate; diff -Nru poppler-0.18.4/poppler/FlateStream.cc poppler-0.20.5/poppler/FlateStream.cc --- poppler-0.18.4/poppler/FlateStream.cc 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/FlateStream.cc 2012-05-10 20:05:44.000000000 +0000 @@ -110,7 +110,7 @@ return 0; } -GooString *FlateStream::getPSFilter(int psLevel, char *indent) { +GooString *FlateStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 3 || pred) { diff -Nru poppler-0.18.4/poppler/FlateStream.h poppler-0.20.5/poppler/FlateStream.h --- poppler-0.18.4/poppler/FlateStream.h 2011-11-22 21:33:11.000000000 +0000 +++ poppler-0.20.5/poppler/FlateStream.h 2012-05-10 20:05:44.000000000 +0000 @@ -52,7 +52,7 @@ virtual int lookChar(); virtual int getRawChar(); virtual void getRawChars(int nChars, int *buffer); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: diff -Nru poppler-0.18.4/poppler/FontEncodingTables.cc poppler-0.20.5/poppler/FontEncodingTables.cc --- poppler-0.18.4/poppler/FontEncodingTables.cc 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/FontEncodingTables.cc 2012-05-10 20:05:44.000000000 +0000 @@ -10,7 +10,7 @@ #include #include "FontEncodingTables.h" -char *macRomanEncoding[256] = { +const char *macRomanEncoding[256] = { NULL, NULL, NULL, @@ -269,7 +269,7 @@ "caron" }; -char *macExpertEncoding[256] = { +const char *macExpertEncoding[256] = { NULL, NULL, NULL, @@ -528,7 +528,7 @@ NULL }; -char *winAnsiEncoding[256] = { +const char *winAnsiEncoding[256] = { NULL, NULL, NULL, @@ -787,7 +787,7 @@ "ydieresis" }; -char *standardEncoding[256] = { +const char *standardEncoding[256] = { NULL, NULL, NULL, @@ -1046,7 +1046,7 @@ NULL }; -char *expertEncoding[256] = { +const char *expertEncoding[256] = { NULL, NULL, NULL, @@ -1305,7 +1305,7 @@ "Ydieresissmall" }; -char *symbolEncoding[256] = { +const char *symbolEncoding[256] = { NULL, NULL, NULL, @@ -1564,7 +1564,7 @@ NULL }; -char *zapfDingbatsEncoding[256] = { +const char *zapfDingbatsEncoding[256] = { NULL, NULL, NULL, diff -Nru poppler-0.18.4/poppler/FontEncodingTables.h poppler-0.20.5/poppler/FontEncodingTables.h --- poppler-0.18.4/poppler/FontEncodingTables.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/FontEncodingTables.h 2012-05-10 20:05:44.000000000 +0000 @@ -9,12 +9,12 @@ #ifndef FONTENCODINGTABLES_H #define FONTENCODINGTABLES_H -extern char *macRomanEncoding[]; -extern char *macExpertEncoding[]; -extern char *winAnsiEncoding[]; -extern char *standardEncoding[]; -extern char *expertEncoding[]; -extern char *symbolEncoding[]; -extern char *zapfDingbatsEncoding[]; +extern const char *macRomanEncoding[]; +extern const char *macExpertEncoding[]; +extern const char *winAnsiEncoding[]; +extern const char *standardEncoding[]; +extern const char *expertEncoding[]; +extern const char *symbolEncoding[]; +extern const char *zapfDingbatsEncoding[]; #endif diff -Nru poppler-0.18.4/poppler/FontInfo.cc poppler-0.20.5/poppler/FontInfo.cc --- poppler-0.18.4/poppler/FontInfo.cc 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/FontInfo.cc 2012-08-15 13:31:38.000000000 +0000 @@ -8,9 +8,10 @@ // Copyright (C) 2006 Kouhei Sutou // Copyright (C) 2009 Pino Toscano // Copyright (C) 2010 Hib Eris -// Copyright (C) 2010 Adrian Johnson +// Copyright (C) 2010, 2012 Adrian Johnson // Copyright (C) 2010 Thomas Freitag // Copyright (C) 2011 Carlos Garcia Campos +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -53,7 +54,7 @@ Page *page; Dict *resDict; Annots *annots; - Object obj1, obj2; + Object obj1; int lastPage; if (currentPage > doc->getNumPages()) { @@ -74,14 +75,10 @@ if ((resDict = page->getResourceDict())) { scanFonts(resDict, result); } - annots = page->getAnnots(doc->getCatalog()); + annots = page->getAnnots(); for (int i = 0; i < annots->getNumAnnots(); ++i) { - if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) { - obj1.streamGetDict()->lookup("Resources", &obj2); - if (obj2.isDict()) { - scanFonts(obj2.getDict(), result); - } - obj2.free(); + if (annots->getAnnot(i)->getAppearanceResDict(&obj1)->isDict()) { + scanFonts(obj1.getDict(), result); } obj1.free(); } @@ -130,7 +127,7 @@ // recursively scan any resource dictionaries in objects in this // resource dictionary - char *resTypes[] = { "XObject", "Pattern" }; + const char *resTypes[] = { "XObject", "Pattern" }; for (Guint resType = 0; resType < sizeof(resTypes) / sizeof(resTypes[0]); ++resType) { resDict->lookup(resTypes[resType], &objDict); if (objDict.isDict()) { @@ -172,9 +169,9 @@ fontRef = *font->getID(); // font name - origName = font->getOrigName(); + origName = font->getName(); if (origName != NULL) { - name = font->getOrigName()->copy(); + name = font->getName()->copy(); } else { name = NULL; } @@ -189,17 +186,18 @@ emb = font->getEmbeddedFontID(&embRef); } + file = NULL; + substituteName = NULL; if (!emb) { - DisplayFontParam *dfp = globalParams->getDisplayFont(font); - if (dfp) - { - if (dfp->kind == displayFontT1) file = dfp->t1.fileName->copy(); - else file = dfp->tt.fileName->copy(); - } - else file = NULL; + SysFontType dummy; + int dummy2; + GooString substituteNameAux; + file = globalParams->findSystemFontFile(font, &dummy, &dummy2, &substituteNameAux); + if (substituteNameAux.getLength() > 0) + substituteName = substituteNameAux.copy(); } - else file = NULL; + encoding = font->getEncodingName()->copy(); // look for a ToUnicode map hasToUnicode = gFalse; @@ -225,6 +223,8 @@ FontInfo::FontInfo(FontInfo& f) { name = f.name ? f.name->copy() : NULL; file = f.file ? f.file->copy() : NULL; + encoding = f.encoding ? f.encoding->copy() : NULL; + substituteName = f.substituteName ? f.substituteName->copy() : NULL; type = f.type; emb = f.emb; subset = f.subset; @@ -236,4 +236,7 @@ FontInfo::~FontInfo() { delete name; delete file; + delete encoding; + if (substituteName) + delete substituteName; } diff -Nru poppler-0.18.4/poppler/FontInfo.h poppler-0.20.5/poppler/FontInfo.h --- poppler-0.18.4/poppler/FontInfo.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/FontInfo.h 2012-05-10 20:05:44.000000000 +0000 @@ -6,6 +6,7 @@ // Copyright (C) 2005-2008, 2010, 2011 Albert Astals Cid // Copyright (C) 2005 Brad Hards // Copyright (C) 2009 Pino Toscano +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -55,7 +56,9 @@ ~FontInfo(); GooString *getName() { return name; }; + GooString *getSubstituteName() { return substituteName; }; GooString *getFile() { return file; }; + GooString *getEncoding() { return encoding; }; Type getType() { return type; }; GBool getEmbedded() { return emb; }; GBool getSubset() { return subset; }; @@ -65,7 +68,9 @@ private: GooString *name; + GooString *substituteName; GooString *file; + GooString *encoding; Type type; GBool emb; GBool subset; diff -Nru poppler-0.18.4/poppler/Form.cc poppler-0.20.5/poppler/Form.cc --- poppler-0.18.4/poppler/Form.cc 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/Form.cc 2012-09-21 19:16:53.000000000 +0000 @@ -5,7 +5,7 @@ // This file is licensed under the GPLv2 or later // // Copyright 2006-2008 Julien Rebetez -// Copyright 2007-2011 Albert Astals Cid +// Copyright 2007-2012 Albert Astals Cid // Copyright 2007-2008, 2011 Carlos Garcia Campos // Copyright 2007 Adrian Johnson // Copyright 2007 Iñigo Martínez @@ -13,7 +13,7 @@ // Copyright 2008 Michael Vrable // Copyright 2009 Matthias Drochner // Copyright 2009 KDAB via Guillermo Amaral -// Copyright 2010 Mark Riedesel +// Copyright 2010, 2012 Mark Riedesel // //======================================================================== @@ -34,10 +34,10 @@ #include "Dict.h" #include "Gfx.h" #include "Form.h" +#include "PDFDoc.h" #include "XRef.h" #include "PDFDocEncoding.h" #include "Annot.h" -#include "Catalog.h" #include "Link.h" //return a newly allocated char* containing an UTF16BE string of size length @@ -59,14 +59,24 @@ return result; } +static GooString *convertToUtf16(GooString *pdfDocEncodingString) +{ + int tmp_length; + char* tmp_str = pdfDocEncodingToUTF16(pdfDocEncodingString, &tmp_length); + delete pdfDocEncodingString; + pdfDocEncodingString = new GooString(tmp_str, tmp_length); + delete [] tmp_str; + return pdfDocEncodingString; +} -FormWidget::FormWidget(XRef *xrefA, Object *aobj, unsigned num, Ref aref, FormField *fieldA) +FormWidget::FormWidget(PDFDoc *docA, Object *aobj, unsigned num, Ref aref, FormField *fieldA) { ref = aref; ID = 0; childNum = num; - xref = xrefA; + doc = docA; + xref = doc->getXRef(); aobj->copy(&obj); type = formUndef; field = fieldA; @@ -86,13 +96,13 @@ } #endif -void FormWidget::createWidgetAnnotation(Catalog *catalog) { +void FormWidget::createWidgetAnnotation() { if (widget) return; Object obj1; obj1.initRef(ref.num, ref.gen); - widget = new AnnotWidget(xref, obj.getDict(), catalog, &obj1, field); + widget = new AnnotWidget(doc, obj.getDict(), &obj1, field); obj1.free(); } @@ -149,8 +159,8 @@ return widget ? widget->getAction() : NULL; } -FormWidgetButton::FormWidgetButton (XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(xrefA, aobj, num, ref, p) +FormWidgetButton::FormWidgetButton (PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : + FormWidget(docA, aobj, num, ref, p) { type = formButton; parent = static_cast(field); @@ -199,7 +209,7 @@ return parent->getButtonType (); } -void FormWidgetButton::setAppearanceState(char *state) { +void FormWidgetButton::setAppearanceState(const char *state) { if (!widget) return; widget->setAppearanceState(state); @@ -231,8 +241,8 @@ } -FormWidgetText::FormWidgetText (XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(xrefA, aobj, num, ref, p) +FormWidgetText::FormWidgetText (PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : + FormWidget(docA, aobj, num, ref, p) { type = formText; parent = static_cast(field); @@ -291,15 +301,15 @@ void FormWidgetText::setContent(GooString* new_content) { if (isReadOnly()) { - error(-1, "FormWidgetText::setContentCopy called on a read only field\n"); + error(errInternal, -1, "FormWidgetText::setContentCopy called on a read only field\n"); return; } parent->setContentCopy(new_content); } -FormWidgetChoice::FormWidgetChoice(XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(xrefA, aobj, num, ref, p) +FormWidgetChoice::FormWidgetChoice(PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : + FormWidget(docA, aobj, num, ref, p) { type = formChoice; parent = static_cast(field); @@ -312,7 +322,7 @@ bool FormWidgetChoice::_checkRange (int i) { if (i < 0 || i >= parent->getNumChoices()) { - error(-1, "FormWidgetChoice::_checkRange i out of range : %i", i); + error(errInternal, -1, "FormWidgetChoice::_checkRange i out of range : {0:d}", i); return false; } return true; @@ -321,7 +331,7 @@ void FormWidgetChoice::select (int i) { if (isReadOnly()) { - error(-1, "FormWidgetChoice::select called on a read only field\n"); + error(errInternal, -1, "FormWidgetChoice::select called on a read only field\n"); return; } if (!_checkRange(i)) return; @@ -331,7 +341,7 @@ void FormWidgetChoice::toggle (int i) { if (isReadOnly()) { - error(-1, "FormWidgetChoice::toggle called on a read only field\n"); + error(errInternal, -1, "FormWidgetChoice::toggle called on a read only field\n"); return; } if (!_checkRange(i)) return; @@ -341,7 +351,7 @@ void FormWidgetChoice::deselectAll () { if (isReadOnly()) { - error(-1, "FormWidgetChoice::deselectAll called on a read only field\n"); + error(errInternal, -1, "FormWidgetChoice::deselectAll called on a read only field\n"); return; } parent->deselectAll(); @@ -350,7 +360,7 @@ GooString* FormWidgetChoice::getEditChoice () { if (!hasEdit()) { - error(-1, "FormFieldChoice::getEditChoice called on a non-editable choice\n"); + error(errInternal, -1, "FormFieldChoice::getEditChoice called on a non-editable choice\n"); return NULL; } return parent->getEditChoice(); @@ -365,11 +375,11 @@ void FormWidgetChoice::setEditChoice (GooString* new_content) { if (isReadOnly()) { - error(-1, "FormWidgetText::setEditChoice called on a read only field\n"); + error(errInternal, -1, "FormWidgetText::setEditChoice called on a read only field\n"); return; } if (!hasEdit()) { - error(-1, "FormFieldChoice::setEditChoice : trying to edit an non-editable choice\n"); + error(errInternal, -1, "FormFieldChoice::setEditChoice : trying to edit an non-editable choice\n"); return; } @@ -416,8 +426,8 @@ return parent->isListBox(); } -FormWidgetSignature::FormWidgetSignature(XRef *xrefA, Object *aobj, unsigned num, Ref ref, FormField *p) : - FormWidget(xrefA, aobj, num, ref, p) +FormWidgetSignature::FormWidgetSignature(PDFDoc *docA, Object *aobj, unsigned num, Ref ref, FormField *p) : + FormWidget(docA, aobj, num, ref, p) { type = formSignature; parent = static_cast(field); @@ -428,9 +438,10 @@ // FormField //======================================================================== -FormField::FormField(XRef* xrefA, Object *aobj, const Ref& aref, FormField *parentA, std::set *usedParents, FormFieldType ty) +FormField::FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parentA, std::set *usedParents, FormFieldType ty) { - xref = xrefA; + doc = docA; + xref = doc->getXRef(); aobj->copy(&obj); Dict* dict = obj.getDict(); ref.num = ref.gen = 0; @@ -457,12 +468,12 @@ Object childRef, childObj; if (!obj1.arrayGetNF(i, &childRef)->isRef()) { - error (-1, "Invalid form field renference"); + error (errSyntaxError, -1, "Invalid form field renference"); childRef.free(); continue; } if (!obj1.arrayGet(i, &childObj)->isDict()) { - error (-1, "Form field child is not a dictionary"); + error (errSyntaxError, -1, "Form field child is not a dictionary"); childObj.free(); childRef.free(); continue; @@ -482,17 +493,17 @@ obj3.free(); if (terminal) { - error(-1, "Field can't have both Widget AND Field as kids\n"); + error(errSyntaxWarning, -1, "Field can't have both Widget AND Field as kids\n"); continue; } numChildren++; children = (FormField**)greallocn(children, numChildren, sizeof(FormField*)); - children[numChildren - 1] = Form::createFieldFromDict(&childObj, xref, ref, this, &usedParentsAux); + children[numChildren - 1] = Form::createFieldFromDict(&childObj, doc, ref, this, &usedParentsAux); } else if (childObj.dictLookup("Subtype", &obj2)->isName("Widget")) { // Child is a widget annotation if (!terminal && numChildren > 0) { - error(-1, "Field can't have both Widget AND Field as kids\n"); + error(errSyntaxWarning, -1, "Field can't have both Widget AND Field as kids\n"); obj2.free(); obj3.free(); continue; @@ -510,8 +521,8 @@ obj1.free(); if (dict->lookup("Subtype", &obj1)->isName("Widget")) _createWidget(&obj, ref); - obj1.free(); } + obj1.free(); //flags if (Form::fieldLookup(dict, "Ff", &obj1)->isInt()) { @@ -612,13 +623,13 @@ } } -void FormField::createWidgetAnnotations(Catalog *catalog) { +void FormField::createWidgetAnnotations() { if (terminal) { for (int i = 0; i < numChildren; i++) - widgets[i]->createWidgetAnnotation(catalog); + widgets[i]->createWidgetAnnotation(); } else { for (int i = 0; i < numChildren; i++) - children[i]->createWidgetAnnotations(catalog); + children[i]->createWidgetAnnotations(); } } @@ -634,19 +645,19 @@ //ID = index in "widgets" table switch (type) { case formButton: - widgets[numChildren-1] = new FormWidgetButton(xref, obj, numChildren-1, aref, this); + widgets[numChildren-1] = new FormWidgetButton(doc, obj, numChildren-1, aref, this); break; case formText: - widgets[numChildren-1] = new FormWidgetText(xref, obj, numChildren-1, aref, this); + widgets[numChildren-1] = new FormWidgetText(doc, obj, numChildren-1, aref, this); break; case formChoice: - widgets[numChildren-1] = new FormWidgetChoice(xref, obj, numChildren-1, aref, this); + widgets[numChildren-1] = new FormWidgetChoice(doc, obj, numChildren-1, aref, this); break; case formSignature: - widgets[numChildren-1] = new FormWidgetSignature(xref, obj, numChildren-1, aref, this); + widgets[numChildren-1] = new FormWidgetSignature(doc, obj, numChildren-1, aref, this); break; default: - error(-1, "SubType on non-terminal field, invalid document?"); + error(errSyntaxWarning, -1, "SubType on non-terminal field, invalid document?"); numChildren--; terminal = false; } @@ -674,6 +685,7 @@ Object parent; GooString *parent_name; GooString *full_name; + GBool unicode_encoded = gFalse; if (fullyQualifiedName) return fullyQualifiedName; @@ -685,14 +697,26 @@ if (parent.dictLookup("T", &obj2)->isString()) { parent_name = obj2.getString(); - if (parent_name->hasUnicodeMarker()) { - parent_name->del(0, 2); // Remove the unicode BOM - full_name->insert(0, "\0.", 2); // 2-byte unicode period + if (unicode_encoded) { + full_name->insert(0, "\0.", 2); // 2-byte unicode period + if (parent_name->hasUnicodeMarker()) { + full_name->insert(0, parent_name->getCString() + 2, parent_name->getLength() - 2); // Remove the unicode BOM + } else { + int tmp_length; + char* tmp_str = pdfDocEncodingToUTF16(parent_name, &tmp_length); + full_name->insert(0, tmp_str + 2, tmp_length - 2); // Remove the unicode BOM + delete [] tmp_str; + } } else { full_name->insert(0, '.'); // 1-byte ascii period + if (parent_name->hasUnicodeMarker()) { + unicode_encoded = gTrue; + full_name = convertToUtf16(full_name); + full_name->insert(0, parent_name->getCString() + 2, parent_name->getLength() - 2); // Remove the unicode BOM + } else { + full_name->insert(0, parent_name); + } } - - full_name->insert(0, parent_name); obj2.free(); } obj1.free(); @@ -703,12 +727,41 @@ parent.free(); if (partialName) { - full_name->append(partialName); + if (unicode_encoded) { + if (partialName->hasUnicodeMarker()) { + full_name->append(partialName->getCString() + 2, partialName->getLength() - 2); // Remove the unicode BOM + } else { + int tmp_length; + char* tmp_str = pdfDocEncodingToUTF16(partialName, &tmp_length); + full_name->append(tmp_str + 2, tmp_length - 2); // Remove the unicode BOM + delete [] tmp_str; + } + } else { + if (partialName->hasUnicodeMarker()) { + unicode_encoded = gTrue; + full_name = convertToUtf16(full_name); + full_name->append(partialName->getCString() + 2, partialName->getLength() - 2); // Remove the unicode BOM + } else { + full_name->append(partialName); + } + } } else { int len = full_name->getLength(); // Remove the last period - if (len > 0) - full_name->del(len - 1, 1); + if (unicode_encoded) { + if (len > 1) { + full_name->del(len - 2, 2); + } + } else { + if (len > 0) { + full_name->del(len - 1, 1); + } + } + } + + if (unicode_encoded) { + full_name->insert(0, 0xff); + full_name->insert(0, 0xfe); } fullyQualifiedName = full_name; @@ -718,8 +771,8 @@ //------------------------------------------------------------------------ // FormFieldButton //------------------------------------------------------------------------ -FormFieldButton::FormFieldButton(XRef *xrefA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents) - : FormField(xrefA, aobj, ref, parent, usedParents, formButton) +FormFieldButton::FormFieldButton(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents) + : FormField(docA, aobj, ref, parent, usedParents, formButton) { Dict* dict = obj.getDict(); active_child = -1; @@ -740,7 +793,7 @@ } } if (flags & 0x1000000) { // 26 -> radiosInUnison - error(-1, "FormFieldButton:: radiosInUnison flag unimplemented, please report a bug with a testcase\n"); + error(errUnimplemented, -1, "FormFieldButton:: radiosInUnison flag unimplemented, please report a bug with a testcase\n"); } } @@ -796,7 +849,7 @@ GBool FormFieldButton::setState(char *state) { if (readOnly) { - error(-1, "FormFieldButton::setState called on a readOnly field\n"); + error(errInternal, -1, "FormFieldButton::setState called on a readOnly field\n"); return gFalse; } @@ -885,8 +938,8 @@ //------------------------------------------------------------------------ // FormFieldText //------------------------------------------------------------------------ -FormFieldText::FormFieldText(XRef *xrefA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents) - : FormField(xrefA, aobj, ref, parent, usedParents, formText) +FormFieldText::FormFieldText(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents) + : FormField(docA, aobj, ref, parent, usedParents, formText) { Dict* dict = obj.getDict(); Object obj1; @@ -978,8 +1031,8 @@ //------------------------------------------------------------------------ // FormFieldChoice //------------------------------------------------------------------------ -FormFieldChoice::FormFieldChoice(XRef *xrefA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents) - : FormField(xrefA, aobj, ref, parent, usedParents, formChoice) +FormFieldChoice::FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents) + : FormField(docA, aobj, ref, parent, usedParents, formChoice) { numChoices = 0; choices = NULL; @@ -1024,22 +1077,22 @@ Object obj3; if (obj2.arrayGetLength() < 2) { - error(-1, "FormWidgetChoice:: invalid Opt entry -- array's length < 2\n"); + error(errSyntaxError, -1, "FormWidgetChoice:: invalid Opt entry -- array's length < 2\n"); continue; } if (obj2.arrayGet(0, &obj3)->isString()) choices[i].exportVal = obj3.getString()->copy(); else - error(-1, "FormWidgetChoice:: invalid Opt entry -- exported value not a string\n"); + error(errSyntaxError, -1, "FormWidgetChoice:: invalid Opt entry -- exported value not a string\n"); obj3.free(); if (obj2.arrayGet(1, &obj3)->isString()) choices[i].optionName = obj3.getString()->copy(); else - error(-1, "FormWidgetChoice:: invalid Opt entry -- choice name not a string\n"); + error(errSyntaxError, -1, "FormWidgetChoice:: invalid Opt entry -- choice name not a string\n"); obj3.free(); } else { - error(-1, "FormWidgetChoice:: invalid %d Opt entry\n", i); + error(errSyntaxError, -1, "FormWidgetChoice:: invalid {0:d} Opt entry\n", i); } obj2.free(); } @@ -1219,8 +1272,8 @@ //------------------------------------------------------------------------ // FormFieldSignature //------------------------------------------------------------------------ -FormFieldSignature::FormFieldSignature(XRef *xrefA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents) - : FormField(xrefA, dict, ref, parent, usedParents, formSignature) +FormFieldSignature::FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents) + : FormField(docA, dict, ref, parent, usedParents, formSignature) { } @@ -1241,11 +1294,12 @@ // Form //------------------------------------------------------------------------ -Form::Form(XRef *xrefA, Object* acroFormA) +Form::Form(PDFDoc *docA, Object* acroFormA) { Object obj1; - xref = xrefA; + doc = docA; + xref = doc->getXRef(); acroForm = acroFormA; size = 0; @@ -1289,14 +1343,14 @@ array->get(i, &obj2); array->getNF(i, &oref); if (!oref.isRef()) { - error(-1, "Direct object in rootFields"); + error(errSyntaxWarning, -1, "Direct object in rootFields"); obj2.free(); oref.free(); continue; } if (!obj2.isDict()) { - error(-1, "Reference in Fields array to an invalid or non existant object"); + error(errSyntaxWarning, -1, "Reference in Fields array to an invalid or non existant object"); obj2.free(); oref.free(); continue; @@ -1308,13 +1362,13 @@ } std::set usedParents; - rootFields[numFields++] = createFieldFromDict (&obj2, xrefA, oref.getRef(), NULL, &usedParents); + rootFields[numFields++] = createFieldFromDict (&obj2, doc, oref.getRef(), NULL, &usedParents); obj2.free(); oref.free(); } } else { - error(-1, "Can't get Fields array\n"); + error(errSyntaxError, -1, "Can't get Fields array\n"); } obj1.free (); @@ -1335,7 +1389,7 @@ } // Look up an inheritable field dictionary entry. -static Object *fieldLookup(Dict *field, char *key, Object *obj, std::set *usedParents) { +static Object *fieldLookup(Dict *field, const char *key, Object *obj, std::set *usedParents) { Dict *dict; Object parent; @@ -1368,33 +1422,33 @@ return obj; } -Object *Form::fieldLookup(Dict *field, char *key, Object *obj) { +Object *Form::fieldLookup(Dict *field, const char *key, Object *obj) { std::set usedParents; return ::fieldLookup(field, key, obj, &usedParents); } -FormField *Form::createFieldFromDict (Object* obj, XRef *xrefA, const Ref& pref, FormField *parent, std::set *usedParents) +FormField *Form::createFieldFromDict (Object* obj, PDFDoc *docA, const Ref& pref, FormField *parent, std::set *usedParents) { Object obj2; FormField *field; if (Form::fieldLookup(obj->getDict (), "FT", &obj2)->isName("Btn")) { - field = new FormFieldButton(xrefA, obj, pref, parent, usedParents); + field = new FormFieldButton(docA, obj, pref, parent, usedParents); } else if (obj2.isName("Tx")) { - field = new FormFieldText(xrefA, obj, pref, parent, usedParents); + field = new FormFieldText(docA, obj, pref, parent, usedParents); } else if (obj2.isName("Ch")) { - field = new FormFieldChoice(xrefA, obj, pref, parent, usedParents); + field = new FormFieldChoice(docA, obj, pref, parent, usedParents); } else if (obj2.isName("Sig")) { - field = new FormFieldSignature(xrefA, obj, pref, parent, usedParents); + field = new FormFieldSignature(docA, obj, pref, parent, usedParents); } else { //we don't have an FT entry => non-terminal field - field = new FormField(xrefA, obj, pref, parent, usedParents); + field = new FormField(docA, obj, pref, parent, usedParents); } obj2.free(); return field; } -void Form::postWidgetsLoad (Catalog *catalog) +void Form::postWidgetsLoad() { // We create the widget annotations associated to // every form widget here, because the AnnotWidget constructor @@ -1402,7 +1456,7 @@ // a FormWidget the Catalog is still creating the form object for (int i = 0; i < numFields; i++) { rootFields[i]->fillChildrenSiblingsID(); - rootFields[i]->createWidgetAnnotations(catalog); + rootFields[i]->createWidgetAnnotations(); } } diff -Nru poppler-0.18.4/poppler/Form.h poppler-0.20.5/poppler/Form.h --- poppler-0.18.4/poppler/Form.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/Form.h 2012-09-21 19:16:53.000000000 +0000 @@ -29,9 +29,9 @@ class Annot; class AnnotWidget; class Annots; -class Catalog; class LinkAction; class GfxResources; +class PDFDoc; enum FormFieldType { formButton, @@ -106,7 +106,7 @@ // decode id and retrieve pageNum and fieldNum static void decodeID (unsigned id, unsigned* pageNum, unsigned* fieldNum); - void createWidgetAnnotation(Catalog *catalog); + void createWidgetAnnotation(); AnnotWidget *getWidgetAnnotation() const { return widget; } #ifdef DEBUG_FORMS @@ -114,13 +114,14 @@ #endif protected: - FormWidget(XRef *xrefA, Object *aobj, unsigned num, Ref aref, FormField *fieldA); + FormWidget(PDFDoc *docA, Object *aobj, unsigned num, Ref aref, FormField *fieldA); AnnotWidget *widget; FormField* field; FormFieldType type; Object obj; Ref ref; + PDFDoc *doc; XRef *xref; //index of this field in the parent's child list @@ -143,7 +144,7 @@ class FormWidgetButton: public FormWidget { public: - FormWidgetButton(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p); + FormWidgetButton(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); ~FormWidgetButton (); FormButtonType getButtonType() const; @@ -152,7 +153,7 @@ GBool getState (); char* getOnStr(); - void setAppearanceState(char *state); + void setAppearanceState(const char *state); void setNumSiblingsID (int i); void setSiblingsID (int i, unsigned id) { siblingsID[i] = id; } @@ -175,7 +176,7 @@ class FormWidgetText: public FormWidget { public: - FormWidgetText(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p); + FormWidgetText(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); //return the field's content (UTF16BE) GooString* getContent() ; //return a copy of the field's content (UTF16BE) @@ -202,7 +203,7 @@ class FormWidgetChoice: public FormWidget { public: - FormWidgetChoice(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p); + FormWidgetChoice(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); ~FormWidgetChoice(); int getNumChoices(); @@ -242,7 +243,7 @@ class FormWidgetSignature: public FormWidget { public: - FormWidgetSignature(XRef *xrefA, Object *dict, unsigned num, Ref ref, FormField *p); + FormWidgetSignature(PDFDoc *docA, Object *dict, unsigned num, Ref ref, FormField *p); protected: FormFieldSignature *parent; }; @@ -256,7 +257,7 @@ class FormField { public: - FormField(XRef* xrefa, Object *aobj, const Ref& aref, FormField *parent, std::set *usedParents, FormFieldType t=formUndef); + FormField(PDFDoc *docA, Object *aobj, const Ref& aref, FormField *parent, std::set *usedParents, FormFieldType t=formUndef); virtual ~FormField(); @@ -285,7 +286,7 @@ // only implemented in FormFieldButton virtual void fillChildrenSiblingsID (); - void createWidgetAnnotations(Catalog *catalog); + void createWidgetAnnotations(); #ifdef DEBUG_FORMS void printTree(int indent = 0); @@ -301,6 +302,7 @@ Ref ref; bool terminal; Object obj; + PDFDoc *doc; XRef *xref; FormField **children; FormField *parent; @@ -330,7 +332,7 @@ class FormFieldButton: public FormField { public: - FormFieldButton(XRef *xrefA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents); + FormFieldButton(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents); FormButtonType getButtonType () { return btype; } @@ -365,7 +367,7 @@ class FormFieldText: public FormField { public: - FormFieldText(XRef *xrefA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents); + FormFieldText(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents); GooString* getContent () { return content; } GooString* getContentCopy (); @@ -403,7 +405,7 @@ class FormFieldChoice: public FormField { public: - FormFieldChoice(XRef *xrefA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents); + FormFieldChoice(PDFDoc *docA, Object *aobj, const Ref& ref, FormField *parent, std::set *usedParents); virtual ~FormFieldChoice(); @@ -472,7 +474,7 @@ class FormFieldSignature: public FormField { public: - FormFieldSignature(XRef *xrefA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents); + FormFieldSignature(PDFDoc *docA, Object *dict, const Ref& ref, FormField *parent, std::set *usedParents); virtual ~FormFieldSignature(); @@ -489,16 +491,16 @@ class Form { public: - Form(XRef *xrefA, Object* acroForm); + Form(PDFDoc *docA, Object* acroForm); ~Form(); // Look up an inheritable field dictionary entry. - static Object *fieldLookup(Dict *field, char *key, Object *obj); + static Object *fieldLookup(Dict *field, const char *key, Object *obj); /* Creates a new Field of the type specified in obj's dict. used in Form::Form and FormField::FormField */ - static FormField *createFieldFromDict (Object* obj, XRef *xref, const Ref& aref, FormField *parent, std::set *usedParents); + static FormField *createFieldFromDict (Object* obj, PDFDoc *docA, const Ref& aref, FormField *parent, std::set *usedParents); Object *getObj () const { return acroForm; } GBool getNeedAppearances () const { return needAppearances; } @@ -511,11 +513,12 @@ FormWidget* findWidgetByRef (Ref aref); - void postWidgetsLoad(Catalog *catalog); + void postWidgetsLoad(); private: FormField** rootFields; int numFields; int size; + PDFDoc *doc; XRef* xref; Object *acroForm; GBool needAppearances; diff -Nru poppler-0.18.4/poppler/Function.cc poppler-0.20.5/poppler/Function.cc --- poppler-0.18.4/poppler/Function.cc 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/Function.cc 2012-09-09 21:24:04.000000000 +0000 @@ -17,6 +17,7 @@ // Copyright (C) 2006 Jeff Muizelaar // Copyright (C) 2010 Christian Feuersnger // Copyright (C) 2011 Andrea Canciani +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -73,12 +74,12 @@ } else if (funcObj->isName("Identity")) { return new IdentityFunction(); } else { - error(-1, "Expected function dictionary or stream"); + error(errSyntaxError, -1, "Expected function dictionary or stream"); return NULL; } if (!dict->lookup("FunctionType", &obj1)->isInt()) { - error(-1, "Function type is missing or wrong type"); + error(errSyntaxError, -1, "Function type is missing or wrong type"); obj1.free(); return NULL; } @@ -94,7 +95,7 @@ } else if (funcType == 4) { func = new PostScriptFunction(funcObj, dict); } else { - error(-1, "Unimplemented function type (%d)", funcType); + error(errSyntaxError, -1, "Unimplemented function type ({0:d})", funcType); return NULL; } if (!func->isOk()) { @@ -111,26 +112,26 @@ //----- Domain if (!dict->lookup("Domain", &obj1)->isArray()) { - error(-1, "Function is missing domain"); + error(errSyntaxError, -1, "Function is missing domain"); goto err2; } m = obj1.arrayGetLength() / 2; if (m > funcMaxInputs) { - error(-1, "Functions with more than %d inputs are unsupported", + error(errSyntaxError, -1, "Functions with more than {0:d} inputs are unsupported", funcMaxInputs); goto err2; } for (i = 0; i < m; ++i) { obj1.arrayGet(2*i, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function domain array"); + error(errSyntaxError, -1, "Illegal value in function domain array"); goto err1; } domain[i][0] = obj2.getNum(); obj2.free(); obj1.arrayGet(2*i+1, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function domain array"); + error(errSyntaxError, -1, "Illegal value in function domain array"); goto err1; } domain[i][1] = obj2.getNum(); @@ -145,21 +146,21 @@ hasRange = gTrue; n = obj1.arrayGetLength() / 2; if (n > funcMaxOutputs) { - error(-1, "Functions with more than %d outputs are unsupported", + error(errSyntaxError, -1, "Functions with more than {0:d} outputs are unsupported", funcMaxOutputs); goto err2; } for (i = 0; i < n; ++i) { obj1.arrayGet(2*i, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function range array"); + error(errSyntaxError, -1, "Illegal value in function range array"); goto err1; } range[i][0] = obj2.getNum(); obj2.free(); obj1.arrayGet(2*i+1, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function range array"); + error(errSyntaxError, -1, "Illegal value in function range array"); goto err1; } range[i][1] = obj2.getNum(); @@ -218,8 +219,10 @@ Guint buf, bitMask; int bits; Guint s; - int i; + double in[funcMaxInputs]; + int i, j, t, bit, idx; + idxOffset = NULL; samples = NULL; sBuf = NULL; ok = gFalse; @@ -229,11 +232,11 @@ goto err1; } if (!hasRange) { - error(-1, "Type 0 function is missing range"); + error(errSyntaxError, -1, "Type 0 function is missing range"); goto err1; } if (m > sampledFuncMaxInputs) { - error(-1, "Sampled functions with more than %d inputs are unsupported", + error(errSyntaxError, -1, "Sampled functions with more than {0:d} inputs are unsupported", sampledFuncMaxInputs); goto err1; } @@ -243,7 +246,7 @@ //----- get the stream if (!funcObj->isStream()) { - error(-1, "Type 0 function isn't a stream"); + error(errSyntaxError, -1, "Type 0 function isn't a stream"); goto err1; } str = funcObj->getStream(); @@ -251,27 +254,45 @@ //----- Size if (!dict->lookup("Size", &obj1)->isArray() || obj1.arrayGetLength() != m) { - error(-1, "Function has missing or invalid size array"); + error(errSyntaxError, -1, "Function has missing or invalid size array"); goto err2; } for (i = 0; i < m; ++i) { obj1.arrayGet(i, &obj2); if (!obj2.isInt()) { - error(-1, "Illegal value in function size array"); + error(errSyntaxError, -1, "Illegal value in function size array"); goto err3; } sampleSize[i] = obj2.getInt(); + if (sampleSize[i] <= 0) { + error(errSyntaxError, -1, "Illegal non-positive value in function size array"); + goto err3; + } obj2.free(); } obj1.free(); - idxMul[0] = n; - for (i = 1; i < m; ++i) { - idxMul[i] = idxMul[i-1] * sampleSize[i-1]; + idxOffset = (int *)gmallocn(1 << m, sizeof(int)); + for (i = 0; i < (1<= 1; --j, t <<= 1) { + if (sampleSize[j] == 1) { + bit = 0; + } else { + bit = (t >> (m - 1)) & 1; + } + idx = (idx + bit) * sampleSize[j-1]; + } + if (sampleSize[0] == 1) { + bit = 0; + } else { + bit = (t >> (m - 1)) & 1; + } + idxOffset[i] = (idx + bit) * n; } //----- BitsPerSample if (!dict->lookup("BitsPerSample", &obj1)->isInt()) { - error(-1, "Function has missing or invalid BitsPerSample"); + error(errSyntaxError, -1, "Function has missing or invalid BitsPerSample"); goto err2; } sampleBits = obj1.getInt(); @@ -284,14 +305,14 @@ for (i = 0; i < m; ++i) { obj1.arrayGet(2*i, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function encode array"); + error(errSyntaxError, -1, "Illegal value in function encode array"); goto err3; } encode[i][0] = obj2.getNum(); obj2.free(); obj1.arrayGet(2*i+1, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function encode array"); + error(errSyntaxError, -1, "Illegal value in function encode array"); goto err3; } encode[i][1] = obj2.getNum(); @@ -315,14 +336,14 @@ for (i = 0; i < n; ++i) { obj1.arrayGet(2*i, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function decode array"); + error(errSyntaxError, -1, "Illegal value in function decode array"); goto err3; } decode[i][0] = obj2.getNum(); obj2.free(); obj1.arrayGet(2*i+1, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function decode array"); + error(errSyntaxError, -1, "Illegal value in function decode array"); goto err3; } decode[i][1] = obj2.getNum(); @@ -368,6 +389,13 @@ } str->close(); + // set up the cache + for (i = 0; i < m; ++i) { + in[i] = domain[i][0]; + cacheIn[i] = in[i] - 1; + } + transform(in, cacheOut); + ok = gTrue; return; @@ -380,6 +408,9 @@ } SampledFunction::~SampledFunction() { + if (idxOffset) { + gfree(idxOffset); + } if (samples) { gfree(samples); } @@ -390,6 +421,8 @@ SampledFunction::SampledFunction(SampledFunction *func) { memcpy(this, func, sizeof(SampledFunction)); + idxOffset = (int *)gmallocn(1 << m, sizeof(int)); + memcpy(idxOffset, func->idxOffset, (1 << m) * (int)sizeof(int)); samples = (double *)gmallocn(nSamples, sizeof(double)); memcpy(samples, func->samples, nSamples * sizeof(double)); sBuf = (double *)gmallocn(1 << m, sizeof(double)); @@ -397,37 +430,54 @@ void SampledFunction::transform(double *in, double *out) { double x; - int e[funcMaxInputs][2]; + int e[funcMaxInputs]; double efrac0[funcMaxInputs]; double efrac1[funcMaxInputs]; - int i, j, k, idx, t; + int i, j, k, idx0, t; + + // check the cache + for (i = 0; i < m; ++i) { + if (in[i] != cacheIn[i]) { + break; + } + } + if (i == m) { + for (i = 0; i < n; ++i) { + out[i] = cacheOut[i]; + } + return; + } // map input values into sample array for (i = 0; i < m; ++i) { x = (in[i] - domain[i][0]) * inputMul[i] + encode[i][0]; - if (x < 0) { + if (x < 0 || x != x) { // x!=x is a more portable version of isnan(x) x = 0; } else if (x > sampleSize[i] - 1) { x = sampleSize[i] - 1; } - e[i][0] = (int)x; - if ((e[i][1] = e[i][0] + 1) >= sampleSize[i]) { + e[i] = (int)x; + if (e[i] == sampleSize[i] - 1 && sampleSize[i] > 1) { // this happens if in[i] = domain[i][1] - e[i][1] = e[i][0]; + e[i] = sampleSize[i] - 2; } - efrac1[i] = x - e[i][0]; + efrac1[i] = x - e[i]; efrac0[i] = 1 - efrac1[i]; } + // compute index for the first sample to be used + idx0 = 0; + for (k = m - 1; k >= 1; --k) { + idx0 = (idx0 + e[k]) * sampleSize[k-1]; + } + idx0 = (idx0 + e[0]) * n; + // for each output, do m-linear interpolation for (i = 0; i < n; ++i) { // pull 2^m values out of the sample array for (j = 0; j < (1<>= 1) { - idx += idxMul[k] * (e[k][t & 1]); - } + int idx = idx0 + idxOffset[j] + i; if (likely(idx >= 0 && idx < nSamples)) { sBuf[j] = samples[idx]; } else { @@ -450,6 +500,14 @@ out[i] = range[i][1]; } } + + // save current result in the cache + for (i = 0; i < m; ++i) { + cacheIn[i] = in[i]; + } + for (i = 0; i < n; ++i) { + cacheOut[i] = out[i]; + } } //------------------------------------------------------------------------ @@ -467,21 +525,21 @@ goto err1; } if (m != 1) { - error(-1, "Exponential function with more than one input"); + error(errSyntaxError, -1, "Exponential function with more than one input"); goto err1; } //----- C0 if (dict->lookup("C0", &obj1)->isArray()) { if (hasRange && obj1.arrayGetLength() != n) { - error(-1, "Function's C0 array is wrong length"); + error(errSyntaxError, -1, "Function's C0 array is wrong length"); goto err2; } n = obj1.arrayGetLength(); for (i = 0; i < n; ++i) { obj1.arrayGet(i, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function C0 array"); + error(errSyntaxError, -1, "Illegal value in function C0 array"); goto err3; } c0[i] = obj2.getNum(); @@ -489,7 +547,7 @@ } } else { if (hasRange && n != 1) { - error(-1, "Function's C0 array is wrong length"); + error(errSyntaxError, -1, "Function's C0 array is wrong length"); goto err2; } n = 1; @@ -500,13 +558,13 @@ //----- C1 if (dict->lookup("C1", &obj1)->isArray()) { if (obj1.arrayGetLength() != n) { - error(-1, "Function's C1 array is wrong length"); + error(errSyntaxError, -1, "Function's C1 array is wrong length"); goto err2; } for (i = 0; i < n; ++i) { obj1.arrayGet(i, &obj2); if (!obj2.isNum()) { - error(-1, "Illegal value in function C1 array"); + error(errSyntaxError, -1, "Illegal value in function C1 array"); goto err3; } c1[i] = obj2.getNum(); @@ -514,7 +572,7 @@ } } else { if (n != 1) { - error(-1, "Function's C1 array is wrong length"); + error(errSyntaxError, -1, "Function's C1 array is wrong length"); goto err2; } c1[0] = 1; @@ -523,7 +581,7 @@ //----- N (exponent) if (!dict->lookup("N", &obj1)->isNum()) { - error(-1, "Function has missing or invalid N"); + error(errSyntaxError, -1, "Function has missing or invalid N"); goto err2; } e = obj1.getNum(); @@ -591,13 +649,13 @@ goto err1; } if (m != 1) { - error(-1, "Stitching function with more than one input"); + error(errSyntaxError, -1, "Stitching function with more than one input"); goto err1; } //----- Functions if (!dict->lookup("Functions", &obj1)->isArray()) { - error(-1, "Missing 'Functions' entry in stitching function"); + error(errSyntaxError, -1, "Missing 'Functions' entry in stitching function"); goto err1; } k = obj1.arrayGetLength(); @@ -624,9 +682,10 @@ if (!(funcs[i] = Function::parse(&obj2, &usedParentsAux))) { goto err2; } - if (i > 0 && (funcs[i]->getInputSize() != 1 || - funcs[i]->getOutputSize() != funcs[0]->getOutputSize())) { - error(-1, "Incompatible subfunctions in stitching function"); + if (funcs[i]->getInputSize() != 1 || + (i > 0 && funcs[i]->getOutputSize() != funcs[0]->getOutputSize())) { + error(errSyntaxError, -1, + "Incompatible subfunctions in stitching function"); goto err2; } obj2.free(); @@ -636,13 +695,13 @@ //----- Bounds if (!dict->lookup("Bounds", &obj1)->isArray() || obj1.arrayGetLength() != k - 1) { - error(-1, "Missing or invalid 'Bounds' entry in stitching function"); + error(errSyntaxError, -1, "Missing or invalid 'Bounds' entry in stitching function"); goto err1; } bounds[0] = domain[0][0]; for (i = 1; i < k; ++i) { if (!obj1.arrayGet(i - 1, &obj2)->isNum()) { - error(-1, "Invalid type in 'Bounds' array in stitching function"); + error(errSyntaxError, -1, "Invalid type in 'Bounds' array in stitching function"); goto err2; } bounds[i] = obj2.getNum(); @@ -654,12 +713,12 @@ //----- Encode if (!dict->lookup("Encode", &obj1)->isArray() || obj1.arrayGetLength() != 2 * k) { - error(-1, "Missing or invalid 'Encode' entry in stitching function"); + error(errSyntaxError, -1, "Missing or invalid 'Encode' entry in stitching function"); goto err1; } for (i = 0; i < 2 * k; ++i) { if (!obj1.arrayGet(i, &obj2)->isNum()) { - error(-1, "Invalid type in 'Encode' array in stitching function"); + error(errSyntaxError, -1, "Invalid type in 'Encode' array in stitching function"); goto err2; } encode[i] = obj2.getNum(); @@ -692,8 +751,6 @@ int i; memcpy(this, func, sizeof(StitchingFunction)); - - k = func->k; funcs = (Function **)gmallocn(k, sizeof(Function *)); for (i = 0; i < k; ++i) { funcs[i] = func->funcs[i]->copy(); @@ -954,6 +1011,10 @@ return; } --sp; + if (sp + i + 1 >= psStackSize) { + error(errSyntaxError, -1, "Stack underflow in PostScript function"); + return; + } stack[sp] = stack[sp + 1 + i]; } void pop() @@ -969,7 +1030,7 @@ GBool checkOverflow(int n = 1) { if (sp - n < 0) { - error(-1, "Stack overflow in PostScript function"); + error(errSyntaxError, -1, "Stack overflow in PostScript function"); return gFalse; } return gTrue; @@ -977,7 +1038,7 @@ GBool checkUnderflow() { if (sp == psStackSize) { - error(-1, "Stack underflow in PostScript function"); + error(errSyntaxError, -1, "Stack underflow in PostScript function"); return gFalse; } return gTrue; @@ -985,7 +1046,7 @@ GBool checkType(PSObjectType t1, PSObjectType t2) { if (stack[sp].type != t1 && stack[sp].type != t2) { - error(-1, "Type mismatch in PostScript function"); + error(errSyntaxError, -1, "Type mismatch in PostScript function"); return gFalse; } return gTrue; @@ -999,7 +1060,7 @@ int i; if (sp + n > psStackSize) { - error(-1, "Stack underflow in PostScript function"); + error(errSyntaxError, -1, "Stack underflow in PostScript function"); return; } if (!checkOverflow(n)) { @@ -1026,7 +1087,7 @@ j = n - j; } } - if (n <= 0 || j == 0) { + if (n <= 0 || j == 0 || n > psStackSize || sp + n > psStackSize) { return; } if (j <= n / 2) { @@ -1053,6 +1114,8 @@ Stream *str; int codePtr; GooString *tok; + double in[funcMaxInputs]; + int i; code = NULL; codeString = NULL; @@ -1064,13 +1127,13 @@ goto err1; } if (!hasRange) { - error(-1, "Type 4 function is missing range"); + error(errSyntaxError, -1, "Type 4 function is missing range"); goto err1; } //----- get the stream if (!funcObj->isStream()) { - error(-1, "Type 4 function isn't a stream"); + error(errSyntaxError, -1, "Type 4 function isn't a stream"); goto err1; } str = funcObj->getStream(); @@ -1079,7 +1142,7 @@ codeString = new GooString(); str->reset(); if (!(tok = getToken(str)) || tok->cmp("{")) { - error(-1, "Expected '{' at start of PostScript function"); + error(errSyntaxError, -1, "Expected '{' at start of PostScript function"); if (tok) { delete tok; } @@ -1092,6 +1155,13 @@ } str->close(); + //----- set up the cache + for (i = 0; i < m; ++i) { + in[i] = domain[i][0]; + cacheIn[i] = in[i] - 1; + } + transform(in, cacheOut); + ok = gTrue; err2: @@ -1115,7 +1185,20 @@ void PostScriptFunction::transform(double *in, double *out) { PSStack stack; int i; - + + // check the cache + for (i = 0; i < m; ++i) { + if (in[i] != cacheIn[i]) { + break; + } + } + if (i == m) { + for (i = 0; i < n; ++i) { + out[i] = cacheOut[i]; + } + return; + } + for (i = 0; i < m; ++i) { //~ may need to check for integers here stack.pushReal(in[i]); @@ -1131,9 +1214,18 @@ } stack.clear(); - // if (!stack.empty()) { - // error(-1, "Extra values on stack at end of PostScript function"); + // if (!stack->empty()) { + // error(errSyntaxWarning, -1, + // "Extra values on stack at end of PostScript function"); // } + + // save current result in the cache + for (i = 0; i < m; ++i) { + cacheIn[i] = in[i]; + } + for (i = 0; i < n; ++i) { + cacheOut[i] = out[i]; + } } GBool PostScriptFunction::parseCode(Stream *str, int *codePtr) { @@ -1145,13 +1237,13 @@ while (1) { if (!(tok = getToken(str))) { - error(-1, "Unexpected end of PostScript function stream"); + error(errSyntaxError, -1, "Unexpected end of PostScript function stream"); return gFalse; } p = tok->getCString(); if (isdigit(*p) || *p == '.' || *p == '-') { isReal = gFalse; - for (++p; *p; ++p) { + for (; *p; ++p) { if (*p == '.') { isReal = gTrue; break; @@ -1176,7 +1268,7 @@ return gFalse; } if (!(tok = getToken(str))) { - error(-1, "Unexpected end of PostScript function stream"); + error(errSyntaxError, -1, "Unexpected end of PostScript function stream"); return gFalse; } if (!tok->cmp("{")) { @@ -1186,7 +1278,7 @@ } delete tok; if (!(tok = getToken(str))) { - error(-1, "Unexpected end of PostScript function stream"); + error(errSyntaxError, -1, "Unexpected end of PostScript function stream"); return gFalse; } } else { @@ -1194,7 +1286,8 @@ } if (!tok->cmp("if")) { if (elsePtr >= 0) { - error(-1, "Got 'if' operator with two blocks in PostScript function"); + error(errSyntaxError, -1, + "Got 'if' operator with two blocks in PostScript function"); return gFalse; } code[opPtr].type = psOperator; @@ -1203,7 +1296,8 @@ code[opPtr+2].blk = *codePtr; } else if (!tok->cmp("ifelse")) { if (elsePtr < 0) { - error(-1, "Got 'ifelse' operator with one blocks in PostScript function"); + error(errSyntaxError, -1, + "Got 'ifelse' operator with one block in PostScript function"); return gFalse; } code[opPtr].type = psOperator; @@ -1213,7 +1307,8 @@ code[opPtr+2].type = psBlock; code[opPtr+2].blk = *codePtr; } else { - error(-1, "Expected if/ifelse operator in PostScript function"); + error(errSyntaxError, -1, + "Expected if/ifelse operator in PostScript function"); delete tok; return gFalse; } @@ -1228,6 +1323,7 @@ } else { a = -1; b = nPSOps; + cmp = 0; // make gcc happy // invariant: psOpNames[a] < tok < psOpNames[b] while (b - a > 1) { mid = (a + b) / 2; @@ -1241,8 +1337,9 @@ } } if (cmp != 0) { - error(-1, "Unknown operator '%s' in PostScript function", - tok->getCString()); + error(errSyntaxError, -1, + "Unknown operator '{0:t}' in PostScript function", + tok); delete tok; return gFalse; } @@ -1368,7 +1465,7 @@ if (i2 > 0) { stack->pushInt(i1 << i2); } else if (i2 < 0) { - stack->pushInt((int)((Guint)i1 >> i2)); + stack->pushInt((int)((Guint)i1 >> -i2)); } else { stack->pushInt(i1); } @@ -1620,7 +1717,7 @@ } break; default: - error(-1, "Internal: bad object in PostScript function code"); + error(errSyntaxError, -1, "Internal: bad object in PostScript function code"); break; } } diff -Nru poppler-0.18.4/poppler/Function.h poppler-0.20.5/poppler/Function.h --- poppler-0.18.4/poppler/Function.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/Function.h 2012-05-10 20:05:44.000000000 +0000 @@ -146,10 +146,12 @@ decode[funcMaxOutputs][2]; double // input multipliers inputMul[funcMaxInputs]; - int idxMul[funcMaxInputs]; // sample array index multipliers + int *idxOffset; double *samples; // the samples int nSamples; // size of the samples array double *sBuf; // buffer for the transform function + double cacheIn[funcMaxInputs]; + double cacheOut[funcMaxOutputs]; GBool ok; }; @@ -241,6 +243,8 @@ GooString *codeString; PSObject *code; int codeSize; + double cacheIn[funcMaxInputs]; + double cacheOut[funcMaxOutputs]; GBool ok; }; diff -Nru poppler-0.18.4/poppler/Gfx.cc poppler-0.20.5/poppler/Gfx.cc --- poppler-0.18.4/poppler/Gfx.cc 2012-01-26 18:30:28.000000000 +0000 +++ poppler-0.20.5/poppler/Gfx.cc 2012-09-09 21:24:04.000000000 +0000 @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jonathan Blandford -// Copyright (C) 2005-2010 Albert Astals Cid +// Copyright (C) 2005-2012 Albert Astals Cid // Copyright (C) 2006 Thorkild Stray // Copyright (C) 2006 Kristian Høgsberg // Copyright (C) 2006-2011 Carlos Garcia Campos @@ -28,12 +28,14 @@ // Copyright (C) 2008 Michael Vrable // Copyright (C) 2008 Hib Eris // Copyright (C) 2009 M Joonas Pihlaja -// Copyright (C) 2009-2011 Thomas Freitag +// Copyright (C) 2009-2012 Thomas Freitag // Copyright (C) 2009 William Bader // Copyright (C) 2009, 2010 David Benjamin // Copyright (C) 2010 Nils Höglund // Copyright (C) 2010 Christian Feuersänger // Copyright (C) 2011 Axel Strübing +// Copyright (C) 2012 Even Rouault +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -57,6 +59,7 @@ #include "GlobalParams.h" #include "CharTypes.h" #include "Object.h" +#include "PDFDoc.h" #include "Array.h" #include "Dict.h" #include "Stream.h" @@ -393,7 +396,7 @@ return font; } } - error(-1, "Unknown font tag '%s'", name); + error(errSyntaxError, -1, "Unknown font tag '{0:s}'", name); return NULL; } @@ -407,7 +410,7 @@ obj->free(); } } - error(-1, "XObject '%s' is unknown", name); + error(errSyntaxError, -1, "XObject '{0:s}' is unknown", name); return gFalse; } @@ -421,7 +424,7 @@ obj->free(); } } - error(-1, "XObject '%s' is unknown", name); + error(errSyntaxError, -1, "XObject '{0:s}' is unknown", name); return gFalse; } @@ -435,11 +438,11 @@ obj->free(); } } - error(-1, "Marked Content '%s' is unknown", name); + error(errSyntaxError, -1, "Marked Content '{0:s}' is unknown", name); return gFalse; } -void GfxResources::lookupColorSpace(char *name, Object *obj) { +void GfxResources::lookupColorSpace(const char *name, Object *obj) { GfxResources *resPtr; for (resPtr = this; resPtr; resPtr = resPtr->next) { @@ -468,7 +471,7 @@ obj.free(); } } - error(-1, "Unknown pattern '%s'", name); + error(errSyntaxError, -1, "Unknown pattern '{0:s}'", name); return NULL; } @@ -487,7 +490,7 @@ obj.free(); } } - error(-1, "Unknown shading '%s'", name); + error(errSyntaxError, -1, "ExtGState '{0:s}' is unknown", name); return NULL; } @@ -518,7 +521,7 @@ obj->free(); } } - error(-1, "ExtGState '%s' is unknown", name); + error(errSyntaxError, -1, "ExtGState '{0:s}' is unknown", name); return gFalse; } @@ -526,7 +529,7 @@ // Gfx //------------------------------------------------------------------------ -Gfx::Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, Catalog *catalogA, +Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, double hDPI, double vDPI, PDFRectangle *box, PDFRectangle *cropBox, int rotate, GBool (*abortCheckCbkA)(void *data), @@ -537,14 +540,12 @@ { int i; - xref = xrefA; - catalog = catalogA; + doc = docA; + xref = doc->getXRef(); + catalog = doc->getCatalog(); subPage = gFalse; printCommands = globalParams->getPrintCommands(); profileCommands = globalParams->getProfileCommands(); - textHaveCSPattern = gFalse; - drawText = gFalse; - maskHaveCSPattern = gFalse; mcStack = NULL; parser = NULL; @@ -566,6 +567,9 @@ baseMatrix[i] = state->getCTM()[i]; } formDepth = 0; + textClipBBoxEmpty = gTrue; + ocState = gTrue; + parser = NULL; abortCheckCbk = abortCheckCbkA; abortCheckCbkData = abortCheckCbkDataA; @@ -582,7 +586,7 @@ } } -Gfx::Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, Catalog *catalogA, +Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict, PDFRectangle *box, PDFRectangle *cropBox, GBool (*abortCheckCbkA)(void *data), void *abortCheckCbkDataA) @@ -592,14 +596,12 @@ { int i; - xref = xrefA; - catalog = catalogA; + doc = docA; + xref = doc->getXRef(); + catalog = doc->getCatalog(); subPage = gTrue; printCommands = globalParams->getPrintCommands(); profileCommands = globalParams->getProfileCommands(); - textHaveCSPattern = gFalse; - drawText = gFalse; - maskHaveCSPattern = gFalse; mcStack = NULL; parser = NULL; @@ -618,6 +620,9 @@ baseMatrix[i] = state->getCTM()[i]; } formDepth = 0; + textClipBBoxEmpty = gTrue; + ocState = gTrue; + parser = NULL; abortCheckCbk = abortCheckCbkA; abortCheckCbkData = abortCheckCbkDataA; @@ -638,20 +643,18 @@ while (stateGuards.size()) { popStateGuard(); } + if (!subPage) { + out->endPage(); + } // There shouldn't be more saves, but pop them if there were any while (state->hasSaves()) { - error(-1, "Found state under last state guard. Popping."); + error(errSyntaxError, -1, "Found state under last state guard. Popping."); restoreState(); } - if (!subPage) { - out->endPage(); - } + delete state; while (res) { popResources(); } - if (state) { - delete state; - } while (mcStack) { popMarkedContent(); } @@ -665,14 +668,14 @@ for (i = 0; i < obj->arrayGetLength(); ++i) { obj->arrayGet(i, &obj2); if (!obj2.isStream()) { - error(-1, "Weird page contents"); + error(errSyntaxError, -1, "Weird page contents"); obj2.free(); return; } obj2.free(); } } else if (!obj->isStream()) { - error(-1, "Weird page contents"); + error(errSyntaxError, -1, "Weird page contents"); return; } parser = new Parser(xref, new Lexer(xref, obj), gFalse); @@ -689,7 +692,8 @@ // scan a sequence of objects pushStateGuard(); - updateLevel = lastAbortCheck = 0; + updateLevel = 1; // make sure even empty pages trigger a call to dump() + lastAbortCheck = 0; numArgs = 0; parser->getObj(&obj); while (!obj.isEOF()) { @@ -765,7 +769,7 @@ // too many arguments - something is wrong } else { - error(getPos(), "Too many args in content stream"); + error(errSyntaxError, getPos(), "Too many args in content stream"); if (printCommands) { printf("throwing away arg: "); obj.print(stdout); @@ -782,7 +786,7 @@ // args at end with no command if (numArgs > 0) { - error(getPos(), "Leftover args in content stream"); + error(errSyntaxError, getPos(), "Leftover args in content stream"); if (printCommands) { printf("%d leftovers:", numArgs); for (i = 0; i < numArgs; ++i) { @@ -814,7 +818,7 @@ name = cmd->getCmd(); if (!(op = findOp(name))) { if (ignoreUndef == 0) - error(getPos(), "Unknown operator '%s'", name); + error(errSyntaxError, getPos(), "Unknown operator '{0:s}'", name); return; } @@ -822,27 +826,28 @@ argPtr = args; if (op->numArgs >= 0) { if (numArgs < op->numArgs) { - error(getPos(), "Too few (%d) args to '%s' operator", numArgs, name); + error(errSyntaxError, getPos(), "Too few ({0:d}) args to '{1:s}' operator", numArgs, name); commandAborted = gTrue; return; } if (numArgs > op->numArgs) { #if 0 - error(getPos(), "Too many (%d) args to '%s' operator", numArgs, name); + error(errSyntaxWarning, getPos(), + "Too many ({0:d}) args to '{1:s}' operator", numArgs, name); #endif argPtr += numArgs - op->numArgs; numArgs = op->numArgs; } } else { if (numArgs > -op->numArgs) { - error(getPos(), "Too many (%d) args to '%s' operator", + error(errSyntaxError, getPos(), "Too many ({0:d}) args to '{1:s}' operator", numArgs, name); return; } } for (i = 0; i < numArgs; ++i) { if (!checkArg(&argPtr[i], op->tchk[i])) { - error(getPos(), "Arg #%d to '%s' operator is wrong type (%s)", + error(errSyntaxError, getPos(), "Arg #{0:d} to '{1:s}' operator is wrong type ({2:s})", i, name, argPtr[i].getTypeName()); return; } @@ -857,6 +862,7 @@ a = -1; b = numOps; + cmp = 0; // make gcc happy // invariant: opTab[a] < name < opTab[b] while (b - a > 1) { m = (a + b) / 2; @@ -963,6 +969,7 @@ void Gfx::opSetExtGState(Object args[], int numArgs) { Object obj1, obj2, obj3, obj4, obj5; + Object args2[2]; GfxBlendMode mode; GBool haveFillOP; Function *funcs[4]; @@ -970,13 +977,14 @@ GBool haveBackdropColor; GfxColorSpace *blendingColorSpace; GBool alpha, isolated, knockout; + double opac; int i; if (!res->lookupGState(args[0].getName(), &obj1)) { return; } if (!obj1.isDict()) { - error(getPos(), "ExtGState '%s' is wrong type", args[0].getName()); + error(errSyntaxError, getPos(), "ExtGState '{0:s}' is wrong type", args[0].getName()); obj1.free(); return; } @@ -986,28 +994,77 @@ printf("\n"); } + // parameters that are also set by individual PDF operators + if (obj1.dictLookup("LW", &obj2)->isNum()) { + opSetLineWidth(&obj2, 1); + } + obj2.free(); + if (obj1.dictLookup("LC", &obj2)->isInt()) { + opSetLineCap(&obj2, 1); + } + obj2.free(); + if (obj1.dictLookup("LJ", &obj2)->isInt()) { + opSetLineJoin(&obj2, 1); + } + obj2.free(); + if (obj1.dictLookup("ML", &obj2)->isNum()) { + opSetMiterLimit(&obj2, 1); + } + obj2.free(); + if (obj1.dictLookup("D", &obj2)->isArray() && + obj2.arrayGetLength() == 2) { + obj2.arrayGet(0, &args2[0]); + obj2.arrayGet(1, &args2[1]); + if (args2[0].isArray() && args2[1].isNum()) { + opSetDash(args2, 2); + } + args2[0].free(); + args2[1].free(); + } + obj2.free(); +#if 0 //~ need to add a new version of GfxResources::lookupFont() that + //~ takes an indirect ref instead of a name + if (obj1.dictLookup("Font", &obj2)->isArray() && + obj2.arrayGetLength() == 2) { + obj2.arrayGet(0, &args2[0]); + obj2.arrayGet(1, &args2[1]); + if (args2[0].isDict() && args2[1].isNum()) { + opSetFont(args2, 2); + } + args2[0].free(); + args2[1].free(); + } + obj2.free(); +#endif + if (obj1.dictLookup("FL", &obj2)->isNum()) { + opSetFlat(&obj2, 1); + } + obj2.free(); + // transparency support: blend mode, fill/stroke opacity if (!obj1.dictLookup("BM", &obj2)->isNull()) { if (state->parseBlendMode(&obj2, &mode)) { state->setBlendMode(mode); out->updateBlendMode(state); } else { - error(getPos(), "Invalid blend mode in ExtGState"); + error(errSyntaxError, getPos(), "Invalid blend mode in ExtGState"); } } obj2.free(); if (obj1.dictLookup("ca", &obj2)->isNum()) { - state->setFillOpacity(obj2.getNum()); + opac = obj2.getNum(); + state->setFillOpacity(opac < 0 ? 0 : opac > 1 ? 1 : opac); out->updateFillOpacity(state); } obj2.free(); if (obj1.dictLookup("CA", &obj2)->isNum()) { - state->setStrokeOpacity(obj2.getNum()); + opac = obj2.getNum(); + state->setStrokeOpacity(opac < 0 ? 0 : opac > 1 ? 1 : opac); out->updateStrokeOpacity(state); } obj2.free(); - // fill/stroke overprint + // fill/stroke overprint, overprint mode if ((haveFillOP = (obj1.dictLookup("op", &obj2)->isBool()))) { state->setFillOverprint(obj2.getBool()); out->updateFillOverprint(state); @@ -1065,7 +1122,7 @@ out->updateTransfer(state); } } else if (!obj2.isNull()) { - error(getPos(), "Invalid transfer function in ExtGState"); + error(errSyntaxError, getPos(), "Invalid transfer function in ExtGState"); } obj2.free(); @@ -1096,13 +1153,19 @@ obj3.free(); funcs[0] = NULL; if (!obj2.dictLookup("TR", &obj3)->isNull()) { - funcs[0] = Function::parse(&obj3); - if (funcs[0]->getInputSize() != 1 || - funcs[0]->getOutputSize() != 1) { - error(getPos(), - "Invalid transfer function in soft mask in ExtGState"); - delete funcs[0]; + if (obj3.isName("Default") || + obj3.isName("Identity")) { funcs[0] = NULL; + } else { + funcs[0] = Function::parse(&obj3); + if (funcs[0] == NULL || + funcs[0]->getInputSize() != 1 || + funcs[0]->getOutputSize() != 1) { + error(errSyntaxError, getPos(), + "Invalid transfer function in soft mask in ExtGState"); + delete funcs[0]; + funcs[0] = NULL; + } } } obj3.free(); @@ -1151,15 +1214,15 @@ delete funcs[0]; } } else { - error(getPos(), "Invalid soft mask in ExtGState - missing group"); + error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group"); } obj4.free(); } else { - error(getPos(), "Invalid soft mask in ExtGState - missing group"); + error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState - missing group"); } obj3.free(); } else if (!obj2.isNull()) { - error(getPos(), "Invalid soft mask in ExtGState"); + error(errSyntaxError, getPos(), "Invalid soft mask in ExtGState"); } } obj2.free(); @@ -1186,7 +1249,7 @@ fargs0.free(); fargs1.free(); } else { - error(getPos(), "Number of args mismatch for /Font in ExtGState"); + error(errSyntaxError, getPos(), "Number of args mismatch for /Font in ExtGState"); } } obj2.free(); @@ -1218,7 +1281,7 @@ dargs[0].free(); dargs[1].free(); } else { - error(getPos(), "Number of args mismatch for /D in ExtGState"); + error(errSyntaxError, getPos(), "Number of args mismatch for /D in ExtGState"); } } obj2.free(); @@ -1254,7 +1317,7 @@ // check form type dict->lookup("FormType", &obj1); if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) { - error(getPos(), "Unknown form type"); + error(errSyntaxError, getPos(), "Unknown form type"); } obj1.free(); @@ -1262,7 +1325,7 @@ dict->lookup("BBox", &obj1); if (!obj1.isArray()) { obj1.free(); - error(getPos(), "Bad form bounding box"); + error(errSyntaxError, getPos(), "Bad form bounding box"); return; } for (i = 0; i < 4; ++i) { @@ -1271,7 +1334,7 @@ else { obj2.free(); obj1.free(); - error(getPos(), "Bad form bounding box (non number)"); + error(errSyntaxError, getPos(), "Bad form bounding box (non number)"); return; } obj2.free(); @@ -1300,7 +1363,7 @@ // draw it ++formDepth; - doForm1(str, resDict, m, bbox, gTrue, gTrue, + drawForm(str, resDict, m, bbox, gTrue, gTrue, blendingColorSpace, isolated, knockout, alpha, transferFunc, backdropColor); --formDepth; @@ -1323,14 +1386,6 @@ GfxColorSpace *colorSpace = NULL; Object obj; - if (textHaveCSPattern && drawText) { - GBool needFill = out->deviceHasTextClip(state); - out->endTextObject(state); - if (needFill) { - doPatternFill(gTrue); - } - out->restoreState(state); - } state->setFillPattern(NULL); res->lookupColorSpace("DefaultGray", &obj); if (!obj.isNull()) { @@ -1345,13 +1400,6 @@ color.c[0] = dblToCol(args[0].getNum()); state->setFillColor(&color); out->updateFillColor(state); - if (textHaveCSPattern) { - out->beginTextObject(state); - out->updateRender(state); - out->updateTextMat(state); - out->updateTextPos(state); - textHaveCSPattern = gFalse; - } } void Gfx::opSetStrokeGray(Object args[], int numArgs) { @@ -1381,14 +1429,6 @@ Object obj; int i; - if (textHaveCSPattern && drawText) { - GBool needFill = out->deviceHasTextClip(state); - out->endTextObject(state); - if (needFill) { - doPatternFill(gTrue); - } - out->restoreState(state); - } res->lookupColorSpace("DefaultCMYK", &obj); if (!obj.isNull()) { colorSpace = GfxColorSpace::parse(&obj, this); @@ -1405,13 +1445,6 @@ } state->setFillColor(&color); out->updateFillColor(state); - if (textHaveCSPattern) { - out->beginTextObject(state); - out->updateRender(state); - out->updateTextMat(state); - out->updateTextPos(state); - textHaveCSPattern = gFalse; - } } void Gfx::opSetStrokeCMYKColor(Object args[], int numArgs) { @@ -1444,14 +1477,6 @@ GfxColor color; int i; - if (textHaveCSPattern && drawText) { - GBool needFill = out->deviceHasTextClip(state); - out->endTextObject(state); - if (needFill) { - doPatternFill(gTrue); - } - out->restoreState(state); - } state->setFillPattern(NULL); res->lookupColorSpace("DefaultRGB", &obj); if (!obj.isNull()) { @@ -1468,13 +1493,6 @@ } state->setFillColor(&color); out->updateFillColor(state); - if (textHaveCSPattern) { - out->beginTextObject(state); - out->updateRender(state); - out->updateTextMat(state); - out->updateTextPos(state); - textHaveCSPattern = gFalse; - } } void Gfx::opSetStrokeRGBColor(Object args[], int numArgs) { @@ -1514,32 +1532,14 @@ } obj.free(); if (colorSpace) { - if (textHaveCSPattern && drawText) { - GBool needFill = out->deviceHasTextClip(state); - out->endTextObject(state); - if (needFill) { - doPatternFill(gTrue); - } - out->restoreState(state); - } state->setFillPattern(NULL); state->setFillColorSpace(colorSpace); out->updateFillColorSpace(state); colorSpace->getDefaultColor(&color); state->setFillColor(&color); out->updateFillColor(state); - if (textHaveCSPattern) { - out->beginTextObject(state); - out->updateRender(state); - out->updateTextMat(state); - out->updateTextPos(state); - textHaveCSPattern = colorSpace->getMode() == csPattern; - } else if (drawText && out->supportTextCSPattern(state)) { - out->beginTextObject(state); - textHaveCSPattern = gTrue; - } } else { - error(getPos(), "Bad color space (fill)"); + error(errSyntaxError, getPos(), "Bad color space (fill)"); } } @@ -1563,7 +1563,7 @@ state->setStrokeColor(&color); out->updateStrokeColor(state); } else { - error(getPos(), "Bad color space (stroke)"); + error(errSyntaxError, getPos(), "Bad color space (stroke)"); } } @@ -1572,7 +1572,7 @@ int i; if (numArgs != state->getFillColorSpace()->getNComps()) { - error(getPos(), "Incorrect number of arguments in 'sc' command"); + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'sc' command"); return; } state->setFillPattern(NULL); @@ -1588,7 +1588,7 @@ int i; if (numArgs != state->getStrokeColorSpace()->getNComps()) { - error(getPos(), "Incorrect number of arguments in 'SC' command"); + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SC' command"); return; } state->setStrokePattern(NULL); @@ -1609,7 +1609,7 @@ if (!((GfxPatternColorSpace *)state->getFillColorSpace())->getUnder() || numArgs - 1 != ((GfxPatternColorSpace *)state->getFillColorSpace()) ->getUnder()->getNComps()) { - error(getPos(), "Incorrect number of arguments in 'scn' command"); + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command"); return; } for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) { @@ -1622,14 +1622,16 @@ state->setFillColor(&color); out->updateFillColor(state); } - if (args[numArgs-1].isName() && - (pattern = res->lookupPattern(args[numArgs-1].getName(), this))) { - state->setFillPattern(pattern); + if (numArgs > 0) { + if (args[numArgs-1].isName() && + (pattern = res->lookupPattern(args[numArgs-1].getName(), this))) { + state->setFillPattern(pattern); + } } } else { if (numArgs != state->getFillColorSpace()->getNComps()) { - error(getPos(), "Incorrect number of arguments in 'scn' command"); + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'scn' command"); return; } state->setFillPattern(NULL); @@ -1656,7 +1658,7 @@ ->getUnder() || numArgs - 1 != ((GfxPatternColorSpace *)state->getStrokeColorSpace()) ->getUnder()->getNComps()) { - error(getPos(), "Incorrect number of arguments in 'SCN' command"); + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); return; } for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) { @@ -1669,6 +1671,10 @@ state->setStrokeColor(&color); out->updateStrokeColor(state); } + if (unlikely(numArgs <= 0)) { + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); + return; + } if (args[numArgs-1].isName() && (pattern = res->lookupPattern(args[numArgs-1].getName(), this))) { state->setStrokePattern(pattern); @@ -1676,7 +1682,7 @@ } else { if (numArgs != state->getStrokeColorSpace()->getNComps()) { - error(getPos(), "Incorrect number of arguments in 'SCN' command"); + error(errSyntaxError, getPos(), "Incorrect number of arguments in 'SCN' command"); return; } state->setStrokePattern(NULL); @@ -1702,7 +1708,7 @@ void Gfx::opLineTo(Object args[], int numArgs) { if (!state->isCurPt()) { - error(getPos(), "No current point in lineto"); + error(errSyntaxError, getPos(), "No current point in lineto"); return; } state->lineTo(args[0].getNum(), args[1].getNum()); @@ -1712,7 +1718,7 @@ double x1, y1, x2, y2, x3, y3; if (!state->isCurPt()) { - error(getPos(), "No current point in curveto"); + error(errSyntaxError, getPos(), "No current point in curveto"); return; } x1 = args[0].getNum(); @@ -1728,7 +1734,7 @@ double x1, y1, x2, y2, x3, y3; if (!state->isCurPt()) { - error(getPos(), "No current point in curveto1"); + error(errSyntaxError, getPos(), "No current point in curveto1"); return; } x1 = state->getCurX(); @@ -1744,7 +1750,7 @@ double x1, y1, x2, y2, x3, y3; if (!state->isCurPt()) { - error(getPos(), "No current point in curveto2"); + error(errSyntaxError, getPos(), "No current point in curveto2"); return; } x1 = args[0].getNum(); @@ -1772,7 +1778,7 @@ void Gfx::opClosePath(Object args[], int numArgs) { if (!state->isCurPt()) { - error(getPos(), "No current point in closepath"); + error(errSyntaxError, getPos(), "No current point in closepath"); return; } state->closePath(); @@ -1788,14 +1794,16 @@ void Gfx::opStroke(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in stroke"); + //error(errSyntaxError, getPos(), "No path in stroke"); return; } - if (state->isPath() && !contentIsHidden()) { - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); + if (state->isPath()) { + if (ocState) { + if (state->getStrokeColorSpace()->getMode() == csPattern) { + doPatternStroke(); + } else { + out->stroke(state); + } } } doEndPath(); @@ -1803,15 +1811,17 @@ void Gfx::opCloseStroke(Object * /*args[]*/, int /*numArgs*/) { if (!state->isCurPt()) { - //error(getPos(), "No path in closepath/stroke"); + //error(errSyntaxError, getPos(), "No path in closepath/stroke"); return; } - state->closePath(); - if (state->isPath() && !contentIsHidden()) { - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); + if (state->isPath()) { + state->closePath(); + if (ocState) { + if (state->getStrokeColorSpace()->getMode() == csPattern) { + doPatternStroke(); + } else { + out->stroke(state); + } } } doEndPath(); @@ -1819,14 +1829,16 @@ void Gfx::opFill(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in fill"); + //error(errSyntaxError, getPos(), "No path in fill"); return; } - if (state->isPath() && !contentIsHidden()) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gFalse); - } else { - out->fill(state); + if (state->isPath()) { + if (ocState) { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternFill(gFalse); + } else { + out->fill(state); + } } } doEndPath(); @@ -1834,14 +1846,16 @@ void Gfx::opEOFill(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in eofill"); + //error(errSyntaxError, getPos(), "No path in eofill"); return; } - if (state->isPath() && !contentIsHidden()) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gTrue); - } else { - out->eoFill(state); + if (state->isPath()) { + if (ocState) { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternFill(gTrue); + } else { + out->eoFill(state); + } } } doEndPath(); @@ -1849,19 +1863,21 @@ void Gfx::opFillStroke(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in fill/stroke"); + //error(errSyntaxError, getPos(), "No path in fill/stroke"); return; } - if (state->isPath() && !contentIsHidden()) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gFalse); - } else { - out->fill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); + if (state->isPath()) { + if (ocState) { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternFill(gFalse); + } else { + out->fill(state); + } + if (state->getStrokeColorSpace()->getMode() == csPattern) { + doPatternStroke(); + } else { + out->stroke(state); + } } } doEndPath(); @@ -1869,20 +1885,22 @@ void Gfx::opCloseFillStroke(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in closepath/fill/stroke"); + //error(errSyntaxError, getPos(), "No path in closepath/fill/stroke"); return; } - if (state->isPath() && !contentIsHidden()) { + if (state->isPath()) { state->closePath(); - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gFalse); - } else { - out->fill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); + if (ocState) { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternFill(gFalse); + } else { + out->fill(state); + } + if (state->getStrokeColorSpace()->getMode() == csPattern) { + doPatternStroke(); + } else { + out->stroke(state); + } } } doEndPath(); @@ -1890,19 +1908,21 @@ void Gfx::opEOFillStroke(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in eofill/stroke"); + //error(errSyntaxError, getPos(), "No path in eofill/stroke"); return; } - if (state->isPath() && !contentIsHidden()) { - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gTrue); - } else { - out->eoFill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); + if (state->isPath()) { + if (ocState) { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternFill(gTrue); + } else { + out->eoFill(state); + } + if (state->getStrokeColorSpace()->getMode() == csPattern) { + doPatternStroke(); + } else { + out->stroke(state); + } } } doEndPath(); @@ -1910,20 +1930,22 @@ void Gfx::opCloseEOFillStroke(Object args[], int numArgs) { if (!state->isCurPt()) { - //error(getPos(), "No path in closepath/eofill/stroke"); + //error(errSyntaxError, getPos(), "No path in closepath/eofill/stroke"); return; } - if (state->isPath() && !contentIsHidden()) { + if (state->isPath()) { state->closePath(); - if (state->getFillColorSpace()->getMode() == csPattern) { - doPatternFill(gTrue); - } else { - out->eoFill(state); - } - if (state->getStrokeColorSpace()->getMode() == csPattern) { - doPatternStroke(); - } else { - out->stroke(state); + if (ocState) { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternFill(gTrue); + } else { + out->eoFill(state); + } + if (state->getStrokeColorSpace()->getMode() == csPattern) { + doPatternStroke(); + } else { + out->stroke(state); + } } } doEndPath(); @@ -1944,13 +1966,13 @@ } switch (pattern->getType()) { case 1: - doTilingPatternFill((GfxTilingPattern *)pattern, gFalse, eoFill); + doTilingPatternFill((GfxTilingPattern *)pattern, gFalse, eoFill, gFalse); break; case 2: - doShadingPatternFill((GfxShadingPattern *)pattern, gFalse, eoFill); + doShadingPatternFill((GfxShadingPattern *)pattern, gFalse, eoFill, gFalse); break; default: - error(getPos(), "Unimplemented pattern type (%d) in fill", + error(errSyntaxError, getPos(), "Unknown pattern type ({0:d}) in fill", pattern->getType()); break; } @@ -1971,24 +1993,70 @@ } switch (pattern->getType()) { case 1: - doTilingPatternFill((GfxTilingPattern *)pattern, gTrue, gFalse); + doTilingPatternFill((GfxTilingPattern *)pattern, gTrue, gFalse, gFalse); break; case 2: - doShadingPatternFill((GfxShadingPattern *)pattern, gTrue, gFalse); + doShadingPatternFill((GfxShadingPattern *)pattern, gTrue, gFalse, gFalse); break; default: - error(getPos(), "Unimplemented pattern type (%d) in stroke", + error(errSyntaxError, getPos(), "Unknown pattern type ({0:d}) in stroke", pattern->getType()); break; } } +void Gfx::doPatternText() { + GfxPattern *pattern; + + // this is a bit of a kludge -- patterns can be really slow, so we + // skip them if we're only doing text extraction, since they almost + // certainly don't contain any text + if (!out->needNonText()) { + return; + } + + if (!(pattern = state->getFillPattern())) { + return; + } + switch (pattern->getType()) { + case 1: + doTilingPatternFill((GfxTilingPattern *)pattern, gFalse, gFalse, gTrue); + break; + case 2: + doShadingPatternFill((GfxShadingPattern *)pattern, gFalse, gFalse, gTrue); + break; + default: + error(errSyntaxError, getPos(), "Unknown pattern type ({0:d}) in fill", + pattern->getType()); + break; + } +} + +void Gfx::doPatternImageMask(Object *ref, Stream *str, int width, int height, + GBool invert, GBool inlineImg) { + saveState(); + + out->setSoftMaskFromImageMask(state, ref, str, + width, height, invert, inlineImg, baseMatrix); + + state->clearPath(); + state->moveTo(0, 0); + state->lineTo(1, 0); + state->lineTo(1, 1); + state->lineTo(0, 1); + state->closePath(); + doPatternText(); + + out->unsetSoftMaskFromImageMask(state, baseMatrix); + restoreState(); +} + void Gfx::doTilingPatternFill(GfxTilingPattern *tPat, - GBool stroke, GBool eoFill) { + GBool stroke, GBool eoFill, GBool text) { GfxPatternColorSpace *patCS; GfxColorSpace *cs; GfxColor color; - GfxPath *savedPath; + GfxState *savedState; double xMin, yMin, xMax, yMax, x, y, x1, y1; double cxMin, cyMin, cxMax, cyMax; int xi0, yi0, xi1, yi1, xi, yi; @@ -2039,12 +2107,13 @@ imb[5] = (m1[1] * m1[4] - m1[0] * m1[5]) * det; // save current graphics state - savedPath = state->getPath()->copy(); - saveState(); + savedState = saveStateStack(); // set underlying color space (for uncolored tiling patterns); set // various other parameters (stroke color, line width) to match // Adobe's behavior + state->setFillPattern(NULL); + state->setStrokePattern(NULL); if (tPat->getPaintType() == 2 && (cs = patCS->getUnder())) { state->setFillColorSpace(cs->copy()); out->updateFillColorSpace(state); @@ -2055,6 +2124,8 @@ } else { state->setStrokeColor(state->getFillColor()); } + out->updateFillColor(state); + out->updateStrokeColor(state); } else { cs = new GfxDeviceGrayColorSpace(); state->setFillColorSpace(cs); @@ -2065,16 +2136,16 @@ state->setStrokeColor(&color); out->updateStrokeColorSpace(state); } - state->setFillPattern(NULL); - out->updateFillColor(state); - state->setStrokePattern(NULL); - out->updateStrokeColor(state); + if (!stroke) { + state->setLineWidth(0); + out->updateLineWidth(state); + } // clip to current path if (stroke) { state->clipToStrokePath(); out->clipToStrokePath(state); - } else if (!textHaveCSPattern && !maskHaveCSPattern) { + } else if (!text) { state->clip(); if (eoFill) { out->eoClip(state); @@ -2083,8 +2154,6 @@ } } state->clearPath(); - state->setLineWidth(0); - out->updateLineWidth(state); // get the clip region, check for empty state->getClipBBox(&cxMin, &cyMin, &cxMax, &cyMax); @@ -2144,39 +2213,36 @@ for (i = 0; i < 4; ++i) { m1[i] = m[i]; } - if (!contentIsHidden()) { - m1[4] = m[4]; - m1[5] = m[5]; - if (out->useTilingPatternFill() && - out->tilingPatternFill(state, catalog, tPat->getContentStream(), - tPat->getMatrix(), tPat->getPaintType(), tPat->getTilingType(), - tPat->getResDict(), m1, tPat->getBBox(), - xi0, yi0, xi1, yi1, xstep, ystep)) { - goto restore; - } else { - for (yi = yi0; yi < yi1; ++yi) { - for (xi = xi0; xi < xi1; ++xi) { - x = xi * xstep; - y = yi * ystep; - m1[4] = x * m[0] + y * m[2] + m[4]; - m1[5] = x * m[1] + y * m[3] + m[5]; - doForm1(tPat->getContentStream(), tPat->getResDict(), - m1, tPat->getBBox()); - } + m1[4] = m[4]; + m1[5] = m[5]; + if (out->useTilingPatternFill() && + out->tilingPatternFill(state, this, catalog, tPat->getContentStream(), + tPat->getMatrix(), tPat->getPaintType(), tPat->getTilingType(), + tPat->getResDict(), m1, tPat->getBBox(), + xi0, yi0, xi1, yi1, xstep, ystep)) { + goto restore; + } else { + for (yi = yi0; yi < yi1; ++yi) { + for (xi = xi0; xi < xi1; ++xi) { + x = xi * xstep; + y = yi * ystep; + m1[4] = x * m[0] + y * m[2] + m[4]; + m1[5] = x * m[1] + y * m[3] + m[5]; + drawForm(tPat->getContentStream(), tPat->getResDict(), + m1, tPat->getBBox()); } } } // restore graphics state restore: - restoreState(); - state->setPath(savedPath); + restoreStateStack(savedState); } void Gfx::doShadingPatternFill(GfxShadingPattern *sPat, - GBool stroke, GBool eoFill) { + GBool stroke, GBool eoFill, GBool text) { GfxShading *shading; - GfxPath *savedPath; + GfxState *savedState; double *ctm, *btm, *ptm; double m[6], ictm[6], m1[6]; double xMin, yMin, xMax, yMax; @@ -2185,28 +2251,13 @@ shading = sPat->getShading(); // save current graphics state - savedPath = state->getPath()->copy(); - saveState(); - - // clip to bbox - if (shading->getHasBBox()) { - shading->getBBox(&xMin, &yMin, &xMax, &yMax); - state->moveTo(xMin, yMin); - state->lineTo(xMax, yMin); - state->lineTo(xMax, yMax); - state->lineTo(xMin, yMax); - state->closePath(); - state->clip(); - if (!textHaveCSPattern && !maskHaveCSPattern) - out->clip(state); - state->setPath(savedPath->copy()); - } + savedState = saveStateStack(); // clip to current path if (stroke) { state->clipToStrokePath(); out->clipToStrokePath(state); - } else if (!textHaveCSPattern && !maskHaveCSPattern) { + } else if (!text) { state->clip(); if (eoFill) { out->eoClip(state); @@ -2214,18 +2265,6 @@ out->clip(state); } } - - // set the color space - state->setFillColorSpace(shading->getColorSpace()->copy()); - out->updateFillColorSpace(state); - - // background color fill - if (shading->getHasBackground()) { - state->setFillColor(shading->getBackground()); - out->updateFillColor(state); - if (!contentIsHidden()) - out->fill(state); - } state->clearPath(); // construct a (pattern space) -> (current space) transform matrix @@ -2259,6 +2298,37 @@ state->concatCTM(m[0], m[1], m[2], m[3], m[4], m[5]); out->updateCTM(state, m[0], m[1], m[2], m[3], m[4], m[5]); + // clip to bbox + if (shading->getHasBBox()) { + shading->getBBox(&xMin, &yMin, &xMax, &yMax); + state->moveTo(xMin, yMin); + state->lineTo(xMax, yMin); + state->lineTo(xMax, yMax); + state->lineTo(xMin, yMax); + state->closePath(); + state->clip(); + out->clip(state); + state->clearPath(); + } + + // set the color space + state->setFillColorSpace(shading->getColorSpace()->copy()); + out->updateFillColorSpace(state); + + // background color fill + if (shading->getHasBackground()) { + state->setFillColor(shading->getBackground()); + out->updateFillColor(state); + state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); + state->moveTo(xMin, yMin); + state->lineTo(xMax, yMin); + state->lineTo(xMax, yMax); + state->lineTo(xMin, yMax); + state->closePath(); + out->fill(state); + state->clearPath(); + } + #if 1 //~tmp: turn off anti-aliasing temporarily GBool vaa = out->getVectorAntialias(); if (vaa) { @@ -2294,22 +2364,24 @@ #endif // restore graphics state - restoreState(); - state->setPath(savedPath); + restoreStateStack(savedState); } void Gfx::opShFill(Object args[], int numArgs) { GfxShading *shading; - GfxPath *savedPath; + GfxState *savedState; double xMin, yMin, xMax, yMax; + if (!ocState) { + return; + } + if (!(shading = res->lookupShading(args[0].getName(), this))) { return; } // save current graphics state - savedPath = state->getPath()->copy(); - saveState(); + savedState = saveStateStack(); // clip to bbox if (shading->getHasBBox()) { @@ -2363,8 +2435,7 @@ #endif // restore graphics state - restoreState(); - state->setPath(savedPath); + restoreStateStack(savedState); delete shading; } @@ -2437,8 +2508,7 @@ state->lineTo(x0 * matrix[0] + y1 * matrix[2] + matrix[4], x0 * matrix[1] + y1 * matrix[3] + matrix[5]); state->closePath(); - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); // the four corner colors are not close enough -- subdivide the @@ -2771,8 +2841,7 @@ } if (!out->useFillColorStop()) { - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } @@ -2793,8 +2862,7 @@ state->lineTo(xMax, yMin); state->closePath(); } - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } } @@ -3082,8 +3150,7 @@ if (!out->useFillColorStop()) { // fill the path - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } @@ -3109,8 +3176,7 @@ state->lineTo(xMax, yMin); state->closePath(); - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } @@ -3141,8 +3207,7 @@ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); } state->closePath(); - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } @@ -3174,8 +3239,7 @@ state->lineTo(xa + ra * cos(angle), ya + ra * sin(angle)); } state->closePath(); - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } } @@ -3185,7 +3249,7 @@ double x0, y0, x1, y1, x2, y2; int i; - if (out->useShadedFills( shading->getType()) && !contentIsHidden()) { + if (out->useShadedFills( shading->getType())) { if (out->gouraudTriangleShadedFill( state, shading)) return; } @@ -3248,14 +3312,13 @@ state->setFillColor(color0); out->updateFillColor(state); - path->reset(); assert(!path->isEnd()); - path->setCoord(x0,y0); path->next(); assert(!path->isEnd()); - path->setCoord(x1,y1); path->next(); assert(!path->isEnd()); - path->setCoord(x2,y2); path->next(); assert(!path->isEnd()); - path->setCoord(x0,y0); path->next(); assert( path->isEnd()); + path->reset(); assert(!path->isEnd()); + path->setCoord(x0,y0); path->next(); assert(!path->isEnd()); + path->setCoord(x1,y1); path->next(); assert(!path->isEnd()); + path->setCoord(x2,y2); path->next(); assert(!path->isEnd()); + path->setCoord(x0,y0); path->next(); assert( path->isEnd()); + out->fill(state); - if (!contentIsHidden()) - out->fill(state); } else { x01 = 0.5 * (x0 + x1); y01 = 0.5 * (y0 + y1); @@ -3296,14 +3359,13 @@ state->setFillColor(&color); out->updateFillColor(state); - path->reset(); assert(!path->isEnd()); - path->setCoord(x0,y0); path->next(); assert(!path->isEnd()); - path->setCoord(x1,y1); path->next(); assert(!path->isEnd()); - path->setCoord(x2,y2); path->next(); assert(!path->isEnd()); - path->setCoord(x0,y0); path->next(); assert( path->isEnd()); + path->reset(); assert(!path->isEnd()); + path->setCoord(x0,y0); path->next(); assert(!path->isEnd()); + path->setCoord(x1,y1); path->next(); assert(!path->isEnd()); + path->setCoord(x2,y2); path->next(); assert(!path->isEnd()); + path->setCoord(x0,y0); path->next(); assert( path->isEnd()); + out->fill(state); - if (!contentIsHidden()) - out->fill(state); } else { const double x01 = 0.5 * (x0 + x1); const double y01 = 0.5 * (y0 + y1); @@ -3337,7 +3399,7 @@ void Gfx::doPatchMeshShFill(GfxPatchMeshShading *shading) { int start, i; - if (out->useShadedFills( shading->getType()) && !contentIsHidden()) { + if (out->useShadedFills( shading->getType())) { if (out->patchMeshShadedFill( state, shading)) return; } @@ -3428,8 +3490,7 @@ patch->x[1][0], patch->y[1][0], patch->x[0][0], patch->y[0][0]); state->closePath(); - if (!contentIsHidden()) - out->fill(state); + out->fill(state); state->clearPath(); } else { for (i = 0; i < 4; ++i) { @@ -3551,28 +3612,16 @@ void Gfx::opBeginText(Object args[], int numArgs) { out->beginTextObject(state); - drawText = gTrue; state->setTextMat(1, 0, 0, 1, 0, 0); state->textMoveTo(0, 0); out->updateTextMat(state); out->updateTextPos(state); fontChanged = gTrue; - if (!(state->getRender() & 4) && out->supportTextCSPattern(state)) { - textHaveCSPattern = gTrue; - } + textClipBBoxEmpty = gTrue; } void Gfx::opEndText(Object args[], int numArgs) { - GBool needFill = out->deviceHasTextClip(state); out->endTextObject(state); - drawText = gFalse; - if (textHaveCSPattern) { - if (needFill) { - doPatternFill(gTrue); - } - out->restoreState(state); - } - textHaveCSPattern = gFalse; } //------------------------------------------------------------------------ @@ -3612,23 +3661,7 @@ } void Gfx::opSetTextRender(Object args[], int numArgs) { - int rm = state->getRender(); state->setRender(args[0].getInt()); - if ((args[0].getInt() & 4) && textHaveCSPattern && drawText) { - GBool needFill = out->deviceHasTextClip(state); - out->endTextObject(state); - if (needFill) { - doPatternFill(gTrue); - } - out->restoreState(state); - out->beginTextObject(state); - out->updateTextMat(state); - out->updateTextPos(state); - textHaveCSPattern = gFalse; - } else if ((rm & 4) && !(args[0].getInt() & 4) && out->supportTextCSPattern(state) && drawText) { - out->beginTextObject(state); - textHaveCSPattern = gTrue; - } out->updateRender(state); } @@ -3697,7 +3730,7 @@ void Gfx::opShowText(Object args[], int numArgs) { if (!state->getFont()) { - error(getPos(), "No font in show"); + error(errSyntaxError, getPos(), "No font in show"); return; } if (fontChanged) { @@ -3707,13 +3740,16 @@ out->beginStringOp(state); doShowText(args[0].getString()); out->endStringOp(state); + if (!ocState) { + doIncCharCount(args[0].getString()); + } } void Gfx::opMoveShowText(Object args[], int numArgs) { double tx, ty; if (!state->getFont()) { - error(getPos(), "No font in move/show"); + error(errSyntaxError, getPos(), "No font in move/show"); return; } if (fontChanged) { @@ -3727,13 +3763,16 @@ out->beginStringOp(state); doShowText(args[0].getString()); out->endStringOp(state); + if (!ocState) { + doIncCharCount(args[0].getString()); + } } void Gfx::opMoveSetShowText(Object args[], int numArgs) { double tx, ty; if (!state->getFont()) { - error(getPos(), "No font in move/set/show"); + error(errSyntaxError, getPos(), "No font in move/set/show"); return; } if (fontChanged) { @@ -3751,6 +3790,9 @@ out->beginStringOp(state); doShowText(args[2].getString()); out->endStringOp(state); + if (ocState) { + doIncCharCount(args[2].getString()); + } } void Gfx::opShowSpaceText(Object args[], int numArgs) { @@ -3760,7 +3802,7 @@ int i; if (!state->getFont()) { - error(getPos(), "No font in show/space"); + error(errSyntaxError, getPos(), "No font in show/space"); return; } if (fontChanged) { @@ -3776,21 +3818,33 @@ // this uses the absolute value of the font size to match // Acrobat's behavior if (wMode) { - state->textShift(0, -obj.getNum() * 0.001 * - fabs(state->getFontSize())); + state->textShift(0, -obj.getNum() * 0.001 * + state->getFontSize()); } else { - state->textShift(-obj.getNum() * 0.001 * - fabs(state->getFontSize()), 0); + state->textShift(-obj.getNum() * 0.001 * + state->getFontSize() * + state->getHorizScaling(), 0); } out->updateTextShift(state, obj.getNum()); } else if (obj.isString()) { doShowText(obj.getString()); } else { - error(getPos(), "Element of show/space array must be number or string"); + error(errSyntaxError, getPos(), + "Element of show/space array must be number or string"); } obj.free(); } out->endStringOp(state); + if (!ocState) { + a = args[0].getArray(); + for (i = 0; i < a->getLength(); ++i) { + a->get(i, &obj); + if (obj.isString()) { + doIncCharCount(obj.getString()); + } + obj.free(); + } + } } void Gfx::doShowText(GooString *s) { @@ -3799,14 +3853,18 @@ double riseX, riseY; CharCode code; Unicode *u = NULL; - double x, y, dx, dy, dx2, dy2, curX, curY, tdx, tdy, lineX, lineY; + double x, y, dx, dy, dx2, dy2, curX, curY, tdx, tdy, ddx, ddy; double originX, originY, tOriginX, tOriginY; + double x0, y0, x1, y1; double oldCTM[6], newCTM[6]; double *mat; Object charProc; Dict *resDict; Parser *oldParser; + GfxState *savedState; char *p; + int render; + GBool patternFill; int len, n, uLen, nChars, nSpaces, i; font = state->getFont(); @@ -3816,6 +3874,28 @@ out->beginString(state, s); } + // if we're doing a pattern fill, set up clipping + render = state->getRender(); + if (!(render & 1) && + state->getFillColorSpace()->getMode() == csPattern) { + patternFill = gTrue; + saveState(); + // disable fill, enable clipping, leave stroke unchanged + if ((render ^ (render >> 1)) & 1) { + render = 5; + } else { + render = 7; + } + state->setRender(render); + out->updateRender(state); + } else { + patternFill = gFalse; + } + + state->textTransformDelta(0, state->getRise(), &riseX, &riseY); + x0 = state->getCurX() + riseX; + y0 = state->getCurY() + riseY; + // handle a Type 3 char if (font->getType() == fontType3 && out->interpretType3Chars()) { mat = state->getCTM(); @@ -3838,11 +3918,8 @@ newCTM[3] *= state->getFontSize(); newCTM[0] *= state->getHorizScaling(); newCTM[2] *= state->getHorizScaling(); - state->textTransformDelta(0, state->getRise(), &riseX, &riseY); curX = state->getCurX(); curY = state->getCurY(); - lineX = state->getLineX(); - lineY = state->getLineY(); oldParser = parser; p = s->getCString(); len = s->getLength(); @@ -3858,11 +3935,12 @@ dy *= state->getFontSize(); state->textTransformDelta(dx, dy, &tdx, &tdy); state->transform(curX + riseX, curY + riseY, &x, &y); - saveState(); + savedState = saveStateStack(); state->setCTM(newCTM[0], newCTM[1], newCTM[2], newCTM[3], x, y); //~ the CTM concat values here are wrong (but never used) out->updateCTM(state, 1, 0, 0, 1, 0, 0); - if (!out->beginType3Char(state, curX + riseX, curY + riseY, tdx, tdy, + state->transformDelta(dx, dy, &ddx, &ddy); + if (!out->beginType3Char(state, curX + riseX, curY + riseY, ddx, ddy, code, u, uLen)) { ((Gfx8BitFont *)font)->getCharProc(code, &charProc); if ((resDict = ((Gfx8BitFont *)font)->getResources())) { @@ -3871,7 +3949,7 @@ if (charProc.isStream()) { display(&charProc, gFalse); } else { - error(getPos(), "Missing or bad Type3 CharProc entry"); + error(errSyntaxError, getPos(), "Missing or bad Type3 CharProc entry"); } out->endType3Char(state); if (resDict) { @@ -3879,20 +3957,18 @@ } charProc.free(); } - restoreState(); + restoreStateStack(savedState); // GfxState::restore() does *not* restore the current position, // so we deal with it here using (curX, curY) and (lineX, lineY) curX += tdx; curY += tdy; state->moveTo(curX, curY); - state->textSetPos(lineX, lineY); p += n; len -= n; } parser = oldParser; } else if (out->useDrawChar()) { - state->textTransformDelta(0, state->getRise(), &riseX, &riseY); p = s->getCString(); len = s->getLength(); while (len > 0) { @@ -3917,15 +3993,13 @@ originX *= state->getFontSize(); originY *= state->getFontSize(); state->textTransformDelta(originX, originY, &tOriginX, &tOriginY); - if (!contentIsHidden()) { + if (ocState) out->drawChar(state, state->getCurX() + riseX, state->getCurY() + riseY, tdx, tdy, tOriginX, tOriginY, code, n, u, uLen); - } state->shift(tdx, tdy); p += n; len -= n; } - } else { dx = dy = 0; p = s->getCString(); @@ -3957,7 +4031,7 @@ dy *= state->getFontSize(); } state->textTransformDelta(dx, dy, &tdx, &tdy); - if (!contentIsHidden()) + if (ocState) out->drawString(state, s); state->shift(tdx, tdy); } @@ -3966,9 +4040,52 @@ out->endString(state); } + if (patternFill && ocState) { + out->saveTextPos(state); + // tell the OutputDev to do the clipping + out->endTextObject(state); + // set up a clipping bbox so doPatternText will work -- assume + // that the text bounding box does not extend past the baseline in + // any direction by more than twice the font size + x1 = state->getCurX() + riseX; + y1 = state->getCurY() + riseY; + if (x0 > x1) { + x = x0; x0 = x1; x1 = x; + } + if (y0 > y1) { + y = y0; y0 = y1; y1 = y; + } + state->textTransformDelta(0, state->getFontSize(), &dx, &dy); + state->textTransformDelta(state->getFontSize(), 0, &dx2, &dy2); + dx = fabs(dx); + dx2 = fabs(dx2); + if (dx2 > dx) { + dx = dx2; + } + dy = fabs(dy); + dy2 = fabs(dy2); + if (dy2 > dy) { + dy = dy2; + } + state->clipToRect(x0 - 2 * dx, y0 - 2 * dy, x1 + 2 * dx, y1 + 2 * dy); + // set render mode to fill-only + state->setRender(0); + out->updateRender(state); + doPatternText(); + restoreState(); + out->restoreTextPos(state); + } + updateLevel += 10 * s->getLength(); } +// NB: this is only called when ocState is false. +void Gfx::doIncCharCount(GooString *s) { + if (out->needCharCount()) { + out->incCharCount(s->getLength()); + } +} + //------------------------------------------------------------------------ // XObject operators //------------------------------------------------------------------------ @@ -3980,30 +4097,19 @@ Object opiDict; #endif + if (!ocState && !out->needCharCount()) { + return; + } name = args[0].getName(); if (!res->lookupXObject(name, &obj1)) { return; } if (!obj1.isStream()) { - error(getPos(), "XObject '%s' is wrong type", name); + error(errSyntaxError, getPos(), "XObject '{0:s}' is wrong type", name); obj1.free(); return; } - obj1.streamGetDict()->lookupNF("OC", &obj2); - if (obj2.isNull()) { - // No OC entry - so we proceed as normal - } else if (obj2.isRef()) { - if ( catalog->getOptContentConfig() && ! catalog->getOptContentConfig()->optContentIsVisible( &obj2 ) ) { - obj2.free(); - obj1.free(); - return; - } - } else { - error(getPos(), "XObject OC value not null or dict: %i", obj2.getType()); - } - obj2.free(); - #if OPI_SUPPORT obj1.streamGetDict()->lookup("OPI", &opiDict); if (opiDict.isDict()) { @@ -4030,9 +4136,9 @@ out->psXObject(obj1.getStream(), obj3.isStream() ? obj3.getStream() : (Stream *)NULL); } else if (obj2.isName()) { - error(getPos(), "Unknown XObject subtype '%s'", obj2.getName()); + error(errSyntaxError, getPos(), "Unknown XObject subtype '{0:s}'", obj2.getName()); } else { - error(getPos(), "XObject subtype is missing or wrong type"); + error(errSyntaxError, getPos(), "XObject subtype is missing or wrong type"); } obj2.free(); #if OPI_SUPPORT @@ -4062,7 +4168,7 @@ GBool maskInterpolate; Stream *maskStr; Object obj1, obj2; - int i; + int i, n; // get info from the stream bits = 0; @@ -4072,6 +4178,16 @@ // get stream dict dict = str->getDict(); + // check for optional content key + if (ref) { + dict->lookupNF("OC", &obj1); + if (catalog->getOptContentConfig() && !catalog->getOptContentConfig()->optContentIsVisible(&obj1)) { + obj1.free(); + return; + } + obj1.free(); + } + // get size dict->lookup("Width", &obj1); if (obj1.isNull()) { @@ -4168,14 +4284,21 @@ } obj1.free(); + // if drawing is disabled, skip over inline image data + if (!ocState) { + str->reset(); + n = height * ((width + 7) / 8); + for (i = 0; i < n; ++i) { + str->getChar(); + } + str->close(); + // draw it - if (!contentIsHidden()) { + } else { + if (state->getFillColorSpace()->getMode() == csPattern) { + doPatternImageMask(ref, str, width, height, invert, inlineImg); + } else { out->drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); - if (out->fillMaskCSPattern(state)) { - maskHaveCSPattern = gTrue; - doPatternFill(gTrue); - out->endMaskClip(state); - maskHaveCSPattern = gFalse; } } } else { @@ -4236,6 +4359,10 @@ obj1.free(); dict->lookup("D", &obj1); } + if (bits == 0) { + delete colorSpace; + goto err2; + } colorMap = new GfxImageColorMap(bits, &obj1, colorSpace); obj1.free(); if (!colorMap->isOk()) { @@ -4339,10 +4466,10 @@ if (obj1.isInt()) { maskColors[i] = obj1.getInt(); } else if (obj1.isReal()) { - error(-1, "Mask entry should be an integer but it's a real, trying to use it"); + error(errSyntaxError, -1, "Mask entry should be an integer but it's a real, trying to use it"); maskColors[i] = (int) obj1.getReal(); } else { - error(-1, "Mask entry should be an integer but it's of type %d", obj1.getType()); + error(errSyntaxError, -1, "Mask entry should be an integer but it's of type {0:d}", obj1.getType()); obj1.free(); goto err1; } @@ -4416,19 +4543,29 @@ haveExplicitMask = gTrue; } + // if drawing is disabled, skip over inline image data + if (!ocState) { + str->reset(); + n = height * ((width * colorMap->getNumPixelComps() * + colorMap->getBits() + 7) / 8); + for (i = 0; i < n; ++i) { + str->getChar(); + } + str->close(); + // draw it - if (haveSoftMask) { - if (!contentIsHidden()) { - out->drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate, + } else { + if (haveSoftMask) { + out->drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate, maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate); + delete maskColorMap; + } else if (haveExplicitMask) { + out->drawMaskedImage(state, ref, str, width, height, colorMap, interpolate, + maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate); + } else { + out->drawImage(state, ref, str, width, height, colorMap, interpolate, + haveColorKeyMask ? maskColors : (int *)NULL, inlineImg); } - delete maskColorMap; - } else if (haveExplicitMask && !contentIsHidden ()) { - out->drawMaskedImage(state, ref, str, width, height, colorMap, interpolate, - maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate); - } else if (!contentIsHidden()) { - out->drawImage(state, ref, str, width, height, colorMap, interpolate, - haveColorKeyMask ? maskColors : (int *)NULL, inlineImg); } delete colorMap; @@ -4446,7 +4583,69 @@ err2: obj1.free(); err1: - error(getPos(), "Bad image parameters"); + error(errSyntaxError, getPos(), "Bad image parameters"); +} + +GBool Gfx::checkTransparencyGroup(Dict *resDict) { + // check the effect of compositing objects as a group: + // look for ExtGState entries with ca != 1 or CA != 1 or BM != normal + Object extGStates; + GBool transpGroup = gFalse; + double opac; + + if (resDict == NULL) + return gFalse; + pushResources(resDict); + resDict->lookup("ExtGState", &extGStates); + if (extGStates.isDict()) { + Dict *dict = extGStates.getDict(); + for (int i = 0; i < dict->getLength() && !transpGroup; i++) { + Object obj1, obj2; + GfxBlendMode mode; + + if (res->lookupGState(dict->getKey(i), &obj1)) { + if (!obj1.dictLookup("BM", &obj2)->isNull()) { + if (state->parseBlendMode(&obj2, &mode)) { + if (mode != gfxBlendNormal) + transpGroup = gTrue; + } else { + error(errSyntaxError, getPos(), "Invalid blend mode in ExtGState"); + } + } + obj2.free(); + if (obj1.dictLookup("ca", &obj2)->isNum()) { + opac = obj2.getNum(); + opac = opac < 0 ? 0 : opac > 1 ? 1 : opac; + if (opac != 1) + transpGroup = gTrue; + } + obj2.free(); + if (obj1.dictLookup("CA", &obj2)->isNum()) { + opac = obj2.getNum(); + opac = opac < 0 ? 0 : opac > 1 ? 1 : opac; + if (opac != 1) + transpGroup = gTrue; + } + obj2.free(); + // alpha is shape + if (!transpGroup && obj1.dictLookup("AIS", &obj2)->isBool()) { + transpGroup = obj2.getBool(); + } + obj2.free(); + // soft mask + if (!transpGroup && !obj1.dictLookup("SMask", &obj2)->isNull()) { + if (!obj2.isName("None")) { + transpGroup = gTrue; + } + } + obj2.free(); + } + obj1.free(); + } + } + extGStates.free(); + popResources(); + return transpGroup; } void Gfx::doForm(Object *str) { @@ -4457,11 +4656,12 @@ double m[6], bbox[4]; Object resObj; Dict *resDict; + GBool ocSaved; Object obj1, obj2, obj3; int i; // check for excessive recursion - if (formDepth > 20) { + if (formDepth > 100) { return; } @@ -4471,7 +4671,20 @@ // check form type dict->lookup("FormType", &obj1); if (!(obj1.isNull() || (obj1.isInt() && obj1.getInt() == 1))) { - error(getPos(), "Unknown form type"); + error(errSyntaxError, getPos(), "Unknown form type"); + } + obj1.free(); + + // check for optional content key + ocSaved = ocState; + dict->lookupNF("OC", &obj1); + if (catalog->getOptContentConfig() && !catalog->getOptContentConfig()->optContentIsVisible(&obj1)) { + obj1.free(); + if (out->needCharCount()) { + ocState = gFalse; + } else { + return; + } } obj1.free(); @@ -4479,7 +4692,8 @@ dict->lookup("BBox", &bboxObj); if (!bboxObj.isArray()) { bboxObj.free(); - error(getPos(), "Bad form bounding box"); + error(errSyntaxError, getPos(), "Bad form bounding box"); + ocState = ocSaved; return; } for (i = 0; i < 4; ++i) { @@ -4489,7 +4703,7 @@ obj1.free(); } else { obj1.free(); - error(getPos(), "Bad form bounding box value"); + error(errSyntaxError, getPos(), "Bad form bounding box value"); return; } } @@ -4520,7 +4734,6 @@ blendingColorSpace = NULL; if (dict->lookup("Group", &obj1)->isDict()) { if (obj1.dictLookup("S", &obj2)->isName("Transparency")) { - transpGroup = gTrue; if (!obj1.dictLookup("CS", &obj3)->isNull()) { blendingColorSpace = GfxColorSpace::parse(&obj3, this); } @@ -4533,6 +4746,7 @@ knockout = obj3.getBool(); } obj3.free(); + transpGroup = isolated || out->checkTransparencyGroup(state, knockout) || checkTransparencyGroup(resDict); } obj2.free(); } @@ -4540,7 +4754,7 @@ // draw it ++formDepth; - doForm1(str, resDict, m, bbox, + drawForm(str, resDict, m, bbox, transpGroup, gFalse, blendingColorSpace, isolated, knockout); --formDepth; @@ -4548,15 +4762,18 @@ delete blendingColorSpace; } resObj.free(); + + ocState = ocSaved; } -void Gfx::doForm1(Object *str, Dict *resDict, double *matrix, double *bbox, +void Gfx::drawForm(Object *str, Dict *resDict, double *matrix, double *bbox, GBool transpGroup, GBool softMask, GfxColorSpace *blendingColorSpace, GBool isolated, GBool knockout, GBool alpha, Function *transferFunc, GfxColor *backdropColor) { Parser *oldParser; + GfxState *savedState; double oldBaseMatrix[6]; int i; @@ -4564,7 +4781,7 @@ pushResources(resDict); // save current graphics state - saveState(); + savedState = saveStateStack(); // kill any pre-existing path state->clearPath(); @@ -4619,12 +4836,12 @@ if (stateBefore != state) { if (state->isParentState(stateBefore)) { - error(-1, "There's a form with more q than Q, trying to fix"); + error(errSyntaxError, -1, "There's a form with more q than Q, trying to fix"); while (stateBefore != state) { restoreState(); } } else { - error(-1, "There's a form with more Q than q"); + error(errSyntaxError, -1, "There's a form with more Q than q"); } } @@ -4641,7 +4858,7 @@ parser = oldParser; // restore graphics state - restoreState(); + restoreStateStack(savedState); // pop resource stack popResources(); @@ -4663,6 +4880,9 @@ Stream *str; int c1, c2; + // NB: this function is run even if ocState is false -- doImage() is + // responsible for skipping over the inline image data + // build dict/stream str = buildImageStream(); @@ -4692,7 +4912,7 @@ parser->getObj(&obj); while (!obj.isCmd("ID") && !obj.isEOF()) { if (!obj.isName()) { - error(getPos(), "Inline image dictionary key must be a name object"); + error(errSyntaxError, getPos(), "Inline image dictionary key must be a name object"); obj.free(); } else { key = copyString(obj.getName()); @@ -4707,7 +4927,7 @@ parser->getObj(&obj); } if (obj.isEOF()) { - error(getPos(), "End of file in inline image"); + error(errSyntaxError, getPos(), "End of file in inline image"); obj.free(); dict.free(); return NULL; @@ -4727,11 +4947,11 @@ } void Gfx::opImageData(Object args[], int numArgs) { - error(getPos(), "Internal: got 'ID' operator"); + error(errInternal, getPos(), "Got 'ID' operator"); } void Gfx::opEndImage(Object args[], int numArgs) { - error(getPos(), "Internal: got 'EI' operator"); + error(errInternal, getPos(), "Got 'EI' operator"); } //------------------------------------------------------------------------ @@ -4765,7 +4985,14 @@ // marked content operators //------------------------------------------------------------------------ +enum GfxMarkedContentKind { + gfxMCOptionalContent, + gfxMCActualText, + gfxMCOther +}; + struct MarkedContentStack { + GfxMarkedContentKind kind; GBool ocSuppressed; // are we ignoring content based on OptionalContent? MarkedContentStack *next; // next object on stack }; @@ -4779,6 +5006,7 @@ void Gfx::pushMarkedContent() { MarkedContentStack *mc = new MarkedContentStack(); mc->ocSuppressed = gFalse; + mc->kind = gfxMCOther; mc->next = mcStack; mcStack = mc; } @@ -4802,23 +5030,30 @@ if ( strncmp( name0, "OC", 2) == 0 && contentConfig) { if ( numArgs >= 2 ) { if (!args[1].isName()) { - error(getPos(), "Unexpected MC Type: %i", args[1].getType()); + error(errSyntaxError, getPos(), "Unexpected MC Type: {0:d}", args[1].getType()); } char* name1 = args[1].getName(); Object markedContent; + MarkedContentStack *mc = mcStack; + mc->kind = gfxMCOptionalContent; if ( res->lookupMarkedContentNF( name1, &markedContent ) ) { - if ( markedContent.isRef() ) { - bool visible = contentConfig->optContentIsVisible( &markedContent ); - MarkedContentStack *mc = mcStack; - mc->ocSuppressed = !(visible); - } - markedContent.free(); + bool visible = contentConfig->optContentIsVisible(&markedContent); + mc->ocSuppressed = !(visible); } else { - error(getPos(), "DID NOT find %s", name1); + error(errSyntaxError, getPos(), "DID NOT find {0:s}", name1); } + markedContent.free(); } else { - error(getPos(), "insufficient arguments for Marked Content"); + error(errSyntaxError, getPos(), "insufficient arguments for Marked Content"); } + } else if (args[0].isName("Span") && numArgs == 2 && args[1].isDict()) { + Object obj; + if (args[1].dictLookup("ActualText", &obj)->isString()) { + out->beginActualText(state, obj.getString()); + MarkedContentStack *mc = mcStack; + mc->kind = gfxMCActualText; + } + obj.free(); } if (printCommands) { @@ -4828,18 +5063,31 @@ printf("\n"); fflush(stdout); } - - if(numArgs == 2 && args[1].isDict ()) { - out->beginMarkedContent(args[0].getName(),args[1].getDict()); + ocState = !contentIsHidden(); + + if (numArgs == 2 && args[1].isDict()) { + out->beginMarkedContent(args[0].getName(), args[1].getDict()); } else if(numArgs == 1) { - out->beginMarkedContent(args[0].getName(),NULL); + out->beginMarkedContent(args[0].getName(), NULL); } } void Gfx::opEndMarkedContent(Object args[], int numArgs) { + if (!mcStack) { + error(errSyntaxWarning, getPos(), "Mismatched EMC operator"); + return; + } + + MarkedContentStack *mc = mcStack; + GfxMarkedContentKind mcKind = mc->kind; + // pop the stack - if (mcStack) - popMarkedContent(); + popMarkedContent(); + + if (mcKind == gfxMCActualText) + out->endActualText(state); + ocState = !contentIsHidden(); + out->endMarkedContent(state); } @@ -4867,45 +5115,23 @@ void Gfx::drawAnnot(Object *str, AnnotBorder *border, AnnotColor *aColor, double xMin, double yMin, double xMax, double yMax) { Dict *dict, *resDict; - Object matrixObj, bboxObj, resObj; - Object obj1; - double m[6], bbox[4], ictm[6]; - double *ctm; - double formX0, formY0, formX1, formY1; - double annotX0, annotY0, annotX1, annotY1; - double det, x, y, sx, sy; + Object matrixObj, bboxObj, resObj, obj1; + double formXMin, formYMin, formXMax, formYMax; + double x, y, sx, sy, tx, ty; + double m[6], bbox[4]; double r, g, b; GfxColor color; double *dash, *dash2; int dashLength; int i; - //~ can we assume that we're in default user space? - //~ (i.e., baseMatrix = ctm) + // this function assumes that we are in the default user space, + // i.e., baseMatrix = ctm - // transform the annotation bbox from default user space to user - // space: (bbox * baseMatrix) * iCTM - ctm = state->getCTM(); - det = 1 / (ctm[0] * ctm[3] - ctm[1] * ctm[2]); - ictm[0] = ctm[3] * det; - ictm[1] = -ctm[1] * det; - ictm[2] = -ctm[2] * det; - ictm[3] = ctm[0] * det; - ictm[4] = (ctm[2] * ctm[5] - ctm[3] * ctm[4]) * det; - ictm[5] = (ctm[1] * ctm[4] - ctm[0] * ctm[5]) * det; - x = baseMatrix[0] * xMin + baseMatrix[2] * yMin + baseMatrix[4]; - y = baseMatrix[1] * xMin + baseMatrix[3] * yMin + baseMatrix[5]; - annotX0 = ictm[0] * x + ictm[2] * y + ictm[4]; - annotY0 = ictm[1] * x + ictm[3] * y + ictm[5]; - x = baseMatrix[0] * xMax + baseMatrix[2] * yMax + baseMatrix[4]; - y = baseMatrix[1] * xMax + baseMatrix[3] * yMax + baseMatrix[5]; - annotX1 = ictm[0] * x + ictm[2] * y + ictm[4]; - annotY1 = ictm[1] * x + ictm[3] * y + ictm[5]; - if (annotX0 > annotX1) { - x = annotX0; annotX0 = annotX1; annotX1 = x; - } - if (annotY0 > annotY1) { - y = annotY0; annotY0 = annotY1; annotY1 = y; + // if the bounding box has zero width or height, don't draw anything + // at all + if (xMin == xMax || yMin == yMax) { + return; } // draw the appearance stream (if there is one) @@ -4918,7 +5144,7 @@ dict->lookup("BBox", &bboxObj); if (!bboxObj.isArray()) { bboxObj.free(); - error(getPos(), "Bad form bounding box"); + error(errSyntaxError, getPos(), "Bad form bounding box"); return; } for (i = 0; i < 4; ++i) { @@ -4928,7 +5154,7 @@ obj1.free(); } else { obj1.free(); - error(getPos(), "Bad form bounding box value"); + error(errSyntaxError, getPos(), "Bad form bounding box value"); return; } } @@ -4949,50 +5175,89 @@ } matrixObj.free(); - // transform the form bbox from form space to user space - formX0 = bbox[0] * m[0] + bbox[1] * m[2] + m[4]; - formY0 = bbox[0] * m[1] + bbox[1] * m[3] + m[5]; - formX1 = bbox[2] * m[0] + bbox[3] * m[2] + m[4]; - formY1 = bbox[2] * m[1] + bbox[3] * m[3] + m[5]; - if (formX0 > formX1) { - x = formX0; formX0 = formX1; formX1 = x; - } - if (formY0 > formY1) { - y = formY0; formY0 = formY1; formY1 = y; - } - - // scale the form to fit the annotation bbox - if (formX1 == formX0) { + // transform the four corners of the form bbox to default user + // space, and construct the transformed bbox + x = bbox[0] * m[0] + bbox[1] * m[2] + m[4]; + y = bbox[0] * m[1] + bbox[1] * m[3] + m[5]; + formXMin = formXMax = x; + formYMin = formYMax = y; + x = bbox[0] * m[0] + bbox[3] * m[2] + m[4]; + y = bbox[0] * m[1] + bbox[3] * m[3] + m[5]; + if (x < formXMin) { + formXMin = x; + } else if (x > formXMax) { + formXMax = x; + } + if (y < formYMin) { + formYMin = y; + } else if (y > formYMax) { + formYMax = y; + } + x = bbox[2] * m[0] + bbox[1] * m[2] + m[4]; + y = bbox[2] * m[1] + bbox[1] * m[3] + m[5]; + if (x < formXMin) { + formXMin = x; + } else if (x > formXMax) { + formXMax = x; + } + if (y < formYMin) { + formYMin = y; + } else if (y > formYMax) { + formYMax = y; + } + x = bbox[2] * m[0] + bbox[3] * m[2] + m[4]; + y = bbox[2] * m[1] + bbox[3] * m[3] + m[5]; + if (x < formXMin) { + formXMin = x; + } else if (x > formXMax) { + formXMax = x; + } + if (y < formYMin) { + formYMin = y; + } else if (y > formYMax) { + formYMax = y; + } + + // construct a mapping matrix, [sx 0 0], which maps the transformed + // [0 sy 0] + // [tx ty 1] + // bbox to the annotation rectangle + if (formXMin == formXMax) { // this shouldn't happen sx = 1; } else { - sx = (annotX1 - annotX0) / (formX1 - formX0); + sx = (xMax - xMin) / (formXMax - formXMin); } - if (formY1 == formY0) { + if (formYMin == formYMax) { // this shouldn't happen sy = 1; } else { - sy = (annotY1 - annotY0) / (formY1 - formY0); + sy = (yMax - yMin) / (formYMax - formYMin); } + tx = -formXMin * sx + xMin; + ty = -formYMin * sy + yMin; + + // the final transform matrix is (form matrix) * (mapping matrix) m[0] *= sx; - m[2] *= sx; - m[4] = (m[4] - formX0) * sx + annotX0; m[1] *= sy; + m[2] *= sx; m[3] *= sy; - m[5] = (m[5] - formY0) * sy + annotY0; + m[4] = m[4] * sx + tx; + m[5] = m[5] * sy + ty; - // get resources + // get the resources dict->lookup("Resources", &resObj); resDict = resObj.isDict() ? resObj.getDict() : (Dict *)NULL; // draw it - doForm1(str, resDict, m, bbox); + drawForm(str, resDict, m, bbox); resObj.free(); } // draw the border if (border && border->getWidth() > 0) { + saveState(); if (state->getStrokeColorSpace()->getMode() != csDeviceRGB) { state->setStrokePattern(NULL); state->setStrokeColorSpace(new GfxDeviceRGBColorSpace()); @@ -5011,35 +5276,27 @@ color.c[2] = dblToCol(b); state->setStrokeColor(&color); out->updateStrokeColor(state); - // compute the width scale factor when going from default user - // space to user space - x = (baseMatrix[0] + baseMatrix[2]) * ictm[0] + - (baseMatrix[1] + baseMatrix[3]) * ictm[2]; - y = (baseMatrix[0] + baseMatrix[2]) * ictm[1] + - (baseMatrix[1] + baseMatrix[3]) * ictm[3]; - x = sqrt(0.5 * (x * x + y * y)); - state->setLineWidth(x * border->getWidth()); + state->setLineWidth(border->getWidth()); out->updateLineWidth(state); dashLength = border->getDashLength(); dash = border->getDash(); if (border->getStyle() == AnnotBorder::borderDashed && dashLength > 0) { dash2 = (double *)gmallocn(dashLength, sizeof(double)); - for (i = 0; i < dashLength; ++i) { - dash2[i] = x * dash[i]; - } + memcpy(dash2, dash, dashLength * sizeof(double)); state->setLineDash(dash2, dashLength, 0); out->updateLineDash(state); } //~ this doesn't currently handle the beveled and engraved styles state->clearPath(); - state->moveTo(annotX0, out->upsideDown() ? annotY0 : annotY1); - state->lineTo(annotX1, out->upsideDown() ? annotY0 : annotY1); + state->moveTo(xMin, yMin); + state->lineTo(xMax, yMin); if (border->getStyle() != AnnotBorder::borderUnderlined) { - state->lineTo(annotX1, out->upsideDown() ? annotY1 : annotY0); - state->lineTo(annotX0, out->upsideDown() ? annotY1 : annotY0); + state->lineTo(xMax, yMax); + state->lineTo(xMin, yMax); state->closePath(); } out->stroke(state); + restoreState(); } } @@ -5065,7 +5322,7 @@ void Gfx::restoreState() { if (stackHeight <= bottomGuard() || !state->hasSaves()) { - error(-1, "Restoring state when no valid states to pop"); + error(errSyntaxError, -1, "Restoring state when no valid states to pop"); commandAborted = gTrue; return; } @@ -5074,6 +5331,27 @@ stackHeight--; } +// Create a new state stack, and initialize it with a copy of the +// current state. +GfxState *Gfx::saveStateStack() { + GfxState *oldState; + + out->saveState(state); + oldState = state; + state = state->copy(gTrue); + return oldState; +} + +// Switch back to the previous state stack. +void Gfx::restoreStateStack(GfxState *oldState) { + while (state->hasSaves()) { + restoreState(); + } + delete state; + state = oldState; + out->restoreState(state); +} + void Gfx::pushResources(Dict *resDict) { res = new GfxResources(xref, resDict, res); } diff -Nru poppler-0.18.4/poppler/Gfx.h poppler-0.20.5/poppler/Gfx.h --- poppler-0.18.4/poppler/Gfx.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/Gfx.h 2012-08-15 13:31:38.000000000 +0000 @@ -18,7 +18,7 @@ // Copyright (C) 2008 Brad Hards // Copyright (C) 2008, 2010 Carlos Garcia Campos // Copyright (C) 2009-2011 Albert Astals Cid -// Copyright (C) 2009, 2010 Thomas Freitag +// Copyright (C) 2009, 2010, 2012 Thomas Freitag // Copyright (C) 2010 David Benjamin // Copyright (C) 2010 Christian Feuersänger // @@ -44,6 +44,7 @@ #include class GooString; +class PDFDoc; class XRef; class Array; class Stream; @@ -114,7 +115,7 @@ GBool lookupXObject(char *name, Object *obj); GBool lookupXObjectNF(char *name, Object *obj); GBool lookupMarkedContentNF(char *name, Object *obj); - void lookupColorSpace(char *name, Object *obj); + void lookupColorSpace(const char *name, Object *obj); GfxPattern *lookupPattern(char *name, Gfx *gfx); GfxShading *lookupShading(char *name, Gfx *gfx); GBool lookupGState(char *name, Object *obj); @@ -143,14 +144,14 @@ public: // Constructor for regular output. - Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, Catalog *catalog, + Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, double hDPI, double vDPI, PDFRectangle *box, PDFRectangle *cropBox, int rotate, GBool (*abortCheckCbkA)(void *data) = NULL, void *abortCheckCbkDataA = NULL); // Constructor for a sub-page object. - Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, Catalog *catalog, + Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict, PDFRectangle *box, PDFRectangle *cropBox, GBool (*abortCheckCbkA)(void *data) = NULL, void *abortCheckCbkDataA = NULL); @@ -180,24 +181,31 @@ // Get the current graphics state object. GfxState *getState() { return state; } + GBool checkTransparencyGroup(Dict *resDict); + + void drawForm(Object *str, Dict *resDict, double *matrix, double *bbox, + GBool transpGroup = gFalse, GBool softMask = gFalse, + GfxColorSpace *blendingColorSpace = NULL, + GBool isolated = gFalse, GBool knockout = gFalse, + GBool alpha = gFalse, Function *transferFunc = NULL, + GfxColor *backdropColor = NULL); + void pushResources(Dict *resDict); void popResources(); - + #ifdef USE_CMS PopplerCache *getIccColorSpaceCache(); #endif private: + PDFDoc *doc; XRef *xref; // the xref table for this PDF file Catalog *catalog; // the Catalog for this PDF file OutputDev *out; // output device GBool subPage; // is this a sub-page object? GBool printCommands; // print the drawing commands (for debugging) GBool profileCommands; // profile the drawing commands (for debugging) - GBool textHaveCSPattern; // in text drawing and text has pattern colorspace - GBool drawText; // in text drawing - GBool maskHaveCSPattern; // in mask drawing and mask has pattern colorspace GBool commandAborted; // did the previous command abort the drawing? GfxResources *res; // resource stack int updateLevel; @@ -211,11 +219,16 @@ double baseMatrix[6]; // default matrix for most recent // page/form/pattern int formDepth; + double textClipBBox[4]; // text clipping bounding box + GBool textClipBBoxEmpty; // true if textClipBBox has not been + // initialized yet + GBool ocState; // true if drawing is enabled, false if + // disabled MarkedContentStack *mcStack; // current BMC/EMC stack Parser *parser; // parser for page content stream(s) - + #ifdef USE_CMS PopplerCache iccColorSpaceCache; #endif @@ -286,10 +299,13 @@ void opCloseEOFillStroke(Object args[], int numArgs); void doPatternFill(GBool eoFill); void doPatternStroke(); + void doPatternText(); + void doPatternImageMask(Object *ref, Stream *str, int width, int height, + GBool invert, GBool inlineImg); void doTilingPatternFill(GfxTilingPattern *tPat, - GBool stroke, GBool eoFill); + GBool stroke, GBool eoFill, GBool text); void doShadingPatternFill(GfxShadingPattern *sPat, - GBool stroke, GBool eoFill); + GBool stroke, GBool eoFill, GBool text); void opShFill(Object args[], int numArgs); void doFunctionShFill(GfxFunctionShading *shading); void doFunctionShFill1(GfxFunctionShading *shading, @@ -340,17 +356,12 @@ void opMoveSetShowText(Object args[], int numArgs); void opShowSpaceText(Object args[], int numArgs); void doShowText(GooString *s); + void doIncCharCount(GooString *s); // XObject operators void opXObject(Object args[], int numArgs); void doImage(Object *ref, Stream *str, GBool inlineImg); void doForm(Object *str); - void doForm1(Object *str, Dict *resDict, double *matrix, double *bbox, - GBool transpGroup = gFalse, GBool softMask = gFalse, - GfxColorSpace *blendingColorSpace = NULL, - GBool isolated = gFalse, GBool knockout = gFalse, - GBool alpha = gFalse, Function *transferFunc = NULL, - GfxColor *backdropColor = NULL); // in-line image operators void opBeginImage(Object args[], int numArgs); @@ -370,6 +381,8 @@ void opBeginMarkedContent(Object args[], int numArgs); void opEndMarkedContent(Object args[], int numArgs); void opMarkPoint(Object args[], int numArgs); + GfxState *saveStateStack(); + void restoreStateStack(GfxState *oldState); GBool contentIsHidden(); void pushMarkedContent(); void popMarkedContent(); diff -Nru poppler-0.18.4/poppler/GfxFont.cc poppler-0.20.5/poppler/GfxFont.cc --- poppler-0.18.4/poppler/GfxFont.cc 2012-01-15 14:13:00.000000000 +0000 +++ poppler-0.20.5/poppler/GfxFont.cc 2012-09-09 20:28:08.000000000 +0000 @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2005, 2006, 2008-2010 Albert Astals Cid +// Copyright (C) 2005, 2006, 2008-2010, 2012 Albert Astals Cid // Copyright (C) 2005, 2006 Kristian Høgsberg // Copyright (C) 2006 Takashi Iwai // Copyright (C) 2007 Julien Rebetez @@ -26,8 +26,10 @@ // Copyright (C) 2009 Peter Kerzum // Copyright (C) 2009, 2010 David Benjamin // Copyright (C) 2011 Axel Strübing -// Copyright (C) 2011 Adrian Johnson +// Copyright (C) 2011, 2012 Adrian Johnson // Copyright (C) 2012 Yi Yang +// Copyright (C) 2012 Suzuki Toshiya +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -44,6 +46,8 @@ #include #include #include +#include +#include #include #include "goo/gmem.h" #include "Error.h" @@ -54,6 +58,8 @@ #include "CharCodeToUnicode.h" #include "FontEncodingTables.h" #include "BuiltinFontTables.h" +#include "UnicodeTypeTable.h" +#include #include #include #include @@ -61,17 +67,12 @@ //------------------------------------------------------------------------ -struct StdFontMapEntry { - char *altName; - char *properName; +struct Base14FontMapEntry { + const char *altName; + const char *base14Name; }; -// Acrobat 4.0 and earlier substituted Base14-compatible fonts without -// providing Widths and a FontDescriptor, so we munge the names into -// the proper Base14 names. This table is from implementation note 44 -// in the PDF 1.4 spec, with some additions based on empirical -// evidence. -static const StdFontMapEntry stdFontMap[] = { +static const Base14FontMapEntry base14FontMap[] = { { "Arial", "Helvetica" }, { "Arial,Bold", "Helvetica-Bold" }, { "Arial,BoldItalic", "Helvetica-BoldOblique" }, @@ -83,9 +84,13 @@ { "Arial-Italic", "Helvetica-Oblique" }, { "Arial-ItalicMT", "Helvetica-Oblique" }, { "ArialMT", "Helvetica" }, + { "Courier", "Courier" }, { "Courier,Bold", "Courier-Bold" }, { "Courier,BoldItalic", "Courier-BoldOblique" }, { "Courier,Italic", "Courier-Oblique" }, + { "Courier-Bold", "Courier-Bold" }, + { "Courier-BoldOblique", "Courier-BoldOblique" }, + { "Courier-Oblique", "Courier-Oblique" }, { "CourierNew", "Courier" }, { "CourierNew,Bold", "Courier-Bold" }, { "CourierNew,BoldItalic", "Courier-BoldOblique" }, @@ -97,14 +102,23 @@ { "CourierNewPS-BoldMT", "Courier-Bold" }, { "CourierNewPS-ItalicMT", "Courier-Oblique" }, { "CourierNewPSMT", "Courier" }, + { "Helvetica", "Helvetica" }, { "Helvetica,Bold", "Helvetica-Bold" }, { "Helvetica,BoldItalic", "Helvetica-BoldOblique" }, { "Helvetica,Italic", "Helvetica-Oblique" }, + { "Helvetica-Bold", "Helvetica-Bold" }, { "Helvetica-BoldItalic", "Helvetica-BoldOblique" }, + { "Helvetica-BoldOblique", "Helvetica-BoldOblique" }, { "Helvetica-Italic", "Helvetica-Oblique" }, + { "Helvetica-Oblique", "Helvetica-Oblique" }, + { "Symbol", "Symbol" }, { "Symbol,Bold", "Symbol" }, { "Symbol,BoldItalic", "Symbol" }, { "Symbol,Italic", "Symbol" }, + { "Times-Bold", "Times-Bold" }, + { "Times-BoldItalic", "Times-BoldItalic" }, + { "Times-Italic", "Times-Italic" }, + { "Times-Roman", "Times-Roman" }, { "TimesNewRoman", "Times-Roman" }, { "TimesNewRoman,Bold", "Times-Bold" }, { "TimesNewRoman,BoldItalic", "Times-BoldItalic" }, @@ -122,19 +136,72 @@ { "TimesNewRomanPSMT", "Times-Roman" }, { "TimesNewRomanPSMT,Bold", "Times-Bold" }, { "TimesNewRomanPSMT,BoldItalic", "Times-BoldItalic" }, - { "TimesNewRomanPSMT,Italic", "Times-Italic" } + { "TimesNewRomanPSMT,Italic", "Times-Italic" }, + { "ZapfDingbats", "ZapfDingbats" } }; +//------------------------------------------------------------------------ + +// index: {fixed:0, sans-serif:4, serif:8} + bold*2 + italic +// NB: must be in same order as psSubstFonts in PSOutputDev.cc +static const char *base14SubstFonts[14] = { + "Courier", + "Courier-Oblique", + "Courier-Bold", + "Courier-BoldOblique", + "Helvetica", + "Helvetica-Oblique", + "Helvetica-Bold", + "Helvetica-BoldOblique", + "Times-Roman", + "Times-Italic", + "Times-Bold", + "Times-BoldItalic", + // the last two are never used for substitution + "Symbol", + "ZapfDingbats" +}; + +//------------------------------------------------------------------------ + static int parseCharName(char *charName, Unicode *uBuf, int uLen, GBool names, GBool ligatures, GBool numeric, GBool hex, GBool variants); //------------------------------------------------------------------------ + +static int readFromStream(void *data) { + return ((Stream *)data)->getChar(); +} + +//------------------------------------------------------------------------ +// GfxFontLoc +//------------------------------------------------------------------------ + +GfxFontLoc::GfxFontLoc() { + path = NULL; + fontNum = 0; + encoding = NULL; + substIdx = -1; +} + +GfxFontLoc::~GfxFontLoc() { + if (path) { + delete path; + } + if (encoding) { + delete encoding; + } +} + +//------------------------------------------------------------------------ // GfxFont //------------------------------------------------------------------------ -GfxFont *GfxFont::makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict) { +GfxFont *GfxFont::makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict) { GooString *nameA; + Ref embFontIDA; + GfxFontType typeA; GfxFont *font; Object obj1; @@ -146,61 +213,51 @@ } obj1.free(); - // get font type + // get embedded font ID and font type + typeA = getFontType(xref, fontDict, &embFontIDA); + + // create the font object font = NULL; - fontDict->lookup("Subtype", &obj1); - if (obj1.isName("Type1") || obj1.isName("MMType1")) { - font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType1, fontDict); - } else if (obj1.isName("Type1C")) { - font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType1C, fontDict); - } else if (obj1.isName("Type3")) { - font = new Gfx8BitFont(xref, tagA, idA, nameA, fontType3, fontDict); - } else if (obj1.isName("TrueType")) { - font = new Gfx8BitFont(xref, tagA, idA, nameA, fontTrueType, fontDict); - } else if (obj1.isName("Type0")) { - font = new GfxCIDFont(xref, tagA, idA, nameA, fontDict); + if (typeA < fontCIDType0) { + font = new Gfx8BitFont(xref, tagA, idA, nameA, typeA, embFontIDA, + fontDict); } else { - error(-1, "Unknown font type: '%s'", - obj1.isName() ? obj1.getName() : "???"); - font = new Gfx8BitFont(xref, tagA, idA, nameA, fontUnknownType, fontDict); + font = new GfxCIDFont(xref, tagA, idA, nameA, typeA, embFontIDA, + fontDict); } - obj1.free(); return font; } -GfxFont::GfxFont(char *tagA, Ref idA, GooString *nameA) { +GfxFont::GfxFont(const char *tagA, Ref idA, GooString *nameA, + GfxFontType typeA, Ref embFontIDA) { ok = gFalse; tag = new GooString(tagA); id = idA; name = nameA; - origName = nameA; + type = typeA; + embFontID = embFontIDA; embFontName = NULL; - extFontFile = NULL; family = NULL; stretch = StretchNotDefined; weight = WeightNotDefined; refCnt = 1; - dfp = NULL; + encodingName = new GooString(""); hasToUnicode = gFalse; } GfxFont::~GfxFont() { delete tag; delete family; - if (origName && origName != name) { - delete origName; - } if (name) { delete name; } if (embFontName) { delete embFontName; } - if (extFontFile) { - delete extFontFile; + if (encodingName) { + delete encodingName; } - delete dfp; } void GfxFont::incRefCnt() { @@ -212,6 +269,200 @@ delete this; } +// This function extracts three pieces of information: +// 1. the "expected" font type, i.e., the font type implied by +// Font.Subtype, DescendantFont.Subtype, and +// FontDescriptor.FontFile3.Subtype +// 2. the embedded font object ID +// 3. the actual font type - determined by examining the embedded font +// if there is one, otherwise equal to the expected font type +// If the expected and actual font types don't match, a warning +// message is printed. The expected font type is not used for +// anything else. +GfxFontType GfxFont::getFontType(XRef *xref, Dict *fontDict, Ref *embID) { + GfxFontType t, expectedType; + FoFiIdentifierType fft; + Dict *fontDict2; + Object subtype, fontDesc, obj1, obj2, obj3, obj4; + GBool isType0, err; + + t = fontUnknownType; + embID->num = embID->gen = -1; + err = gFalse; + + fontDict->lookup("Subtype", &subtype); + expectedType = fontUnknownType; + isType0 = gFalse; + if (subtype.isName("Type1") || subtype.isName("MMType1")) { + expectedType = fontType1; + } else if (subtype.isName("Type1C")) { + expectedType = fontType1C; + } else if (subtype.isName("Type3")) { + expectedType = fontType3; + } else if (subtype.isName("TrueType")) { + expectedType = fontTrueType; + } else if (subtype.isName("Type0")) { + isType0 = gTrue; + } else { + error(errSyntaxWarning, -1, "Unknown font type: '{0:s}'", + subtype.isName() ? subtype.getName() : "???"); + } + subtype.free(); + + fontDict2 = fontDict; + if (fontDict->lookup("DescendantFonts", &obj1)->isArray()) { + if (obj1.arrayGetLength() == 0) { + error(errSyntaxWarning, -1, "Empty DescendantFonts array in font"); + obj2.initNull(); + } else if (obj1.arrayGet(0, &obj2)->isDict()) { + if (!isType0) { + error(errSyntaxWarning, -1, "Non-CID font with DescendantFonts array"); + } + fontDict2 = obj2.getDict(); + fontDict2->lookup("Subtype", &subtype); + if (subtype.isName("CIDFontType0")) { + if (isType0) { + expectedType = fontCIDType0; + } + } else if (subtype.isName("CIDFontType2")) { + if (isType0) { + expectedType = fontCIDType2; + } + } + subtype.free(); + } + } else { + obj2.initNull(); + } + + if (fontDict2->lookup("FontDescriptor", &fontDesc)->isDict()) { + if (fontDesc.dictLookupNF("FontFile", &obj3)->isRef()) { + *embID = obj3.getRef(); + if (expectedType != fontType1) { + err = gTrue; + } + } + obj3.free(); + if (embID->num == -1 && + fontDesc.dictLookupNF("FontFile2", &obj3)->isRef()) { + *embID = obj3.getRef(); + if (isType0) { + expectedType = fontCIDType2; + } else if (expectedType != fontTrueType) { + err = gTrue; + } + } + obj3.free(); + if (embID->num == -1 && + fontDesc.dictLookupNF("FontFile3", &obj3)->isRef()) { + *embID = obj3.getRef(); + if (obj3.fetch(xref, &obj4)->isStream()) { + obj4.streamGetDict()->lookup("Subtype", &subtype); + if (subtype.isName("Type1")) { + if (expectedType != fontType1) { + err = gTrue; + expectedType = isType0 ? fontCIDType0 : fontType1; + } + } else if (subtype.isName("Type1C")) { + if (expectedType == fontType1) { + expectedType = fontType1C; + } else if (expectedType != fontType1C) { + err = gTrue; + expectedType = isType0 ? fontCIDType0C : fontType1C; + } + } else if (subtype.isName("TrueType")) { + if (expectedType != fontTrueType) { + err = gTrue; + expectedType = isType0 ? fontCIDType2 : fontTrueType; + } + } else if (subtype.isName("CIDFontType0C")) { + if (expectedType == fontCIDType0) { + expectedType = fontCIDType0C; + } else { + err = gTrue; + expectedType = isType0 ? fontCIDType0C : fontType1C; + } + } else if (subtype.isName("OpenType")) { + if (expectedType == fontTrueType) { + expectedType = fontTrueTypeOT; + } else if (expectedType == fontType1) { + expectedType = fontType1COT; + } else if (expectedType == fontCIDType0) { + expectedType = fontCIDType0COT; + } else if (expectedType == fontCIDType2) { + expectedType = fontCIDType2OT; + } else { + err = gTrue; + } + } else { + error(errSyntaxError, -1, "Unknown font type '{0:s}'", + subtype.isName() ? subtype.getName() : "???"); + } + subtype.free(); + } + obj4.free(); + } + obj3.free(); + } + fontDesc.free(); + + t = fontUnknownType; + if (embID->num >= 0) { + obj3.initRef(embID->num, embID->gen); + obj3.fetch(xref, &obj4); + if (obj4.isStream()) { + obj4.streamReset(); + fft = FoFiIdentifier::identifyStream(&readFromStream, obj4.getStream()); + obj4.streamClose(); + switch (fft) { + case fofiIdType1PFA: + case fofiIdType1PFB: + t = fontType1; + break; + case fofiIdCFF8Bit: + t = isType0 ? fontCIDType0C : fontType1C; + break; + case fofiIdCFFCID: + t = fontCIDType0C; + break; + case fofiIdTrueType: + case fofiIdTrueTypeCollection: + t = isType0 ? fontCIDType2 : fontTrueType; + break; + case fofiIdOpenTypeCFF8Bit: + t = expectedType; // hack: open type always == expected type? s. bug-poppler20605.pdf + break; + case fofiIdOpenTypeCFFCID: + t = fontCIDType0COT; + break; + default: + error(errSyntaxError, -1, "Embedded font file may be invalid"); + break; + } + } + obj4.free(); + obj3.free(); + } + + if (t == fontUnknownType) { + t = expectedType; + } + + if (t != expectedType) { + err = gTrue; + } + + if (err) { + error(errSyntaxWarning, -1, + "Mismatch between font type and embedded font file"); + } + + obj2.free(); + obj1.free(); + + return t; +} + void GfxFont::readFontDescriptor(XRef *xref, Dict *fontDict) { Object obj1, obj2, obj3, obj4; double t; @@ -220,8 +471,6 @@ // assume Times-Roman by default (for substitution purposes) flags = fontSerif; - embFontID.num = -1; - embFontID.gen = -1; missingWidth = 0; if (fontDict->lookup("FontDescriptor", &obj1)->isDict()) { @@ -243,7 +492,7 @@ obj1.dictLookup("Fontname", &obj2); if (obj2.isName()) { embFontName = new GooString(obj2.getName()); - error(-1, "The file uses Fontname instead of FontName please notify the creator that the file is broken"); + error(errSyntaxWarning, -1, "The file uses Fontname instead of FontName please notify the creator that the file is broken"); } obj2.free(); } @@ -265,7 +514,7 @@ else if (strcmp(obj2.getName(), "Expanded") == 0) stretch = Expanded; else if (strcmp(obj2.getName(), "ExtraExpanded") == 0) stretch = ExtraExpanded; else if (strcmp(obj2.getName(), "UltraExpanded") == 0) stretch = UltraExpanded; - else error(-1, "Invalid Font Stretch"); + else error(errSyntaxWarning, -1, "Invalid Font Stretch"); } obj2.free(); @@ -281,101 +530,7 @@ else if (obj2.getNum() == 700) weight = W700; else if (obj2.getNum() == 800) weight = W800; else if (obj2.getNum() == 900) weight = W900; - else error(-1, "Invalid Font Weight"); - } - obj2.free(); - - // look for embedded font file - if (obj1.dictLookupNF("FontFile", &obj2)->isRef()) { - embFontID = obj2.getRef(); - if (type != fontType1) { - error(-1, "Mismatch between font type and embedded font file"); - if (isCIDFont()) { - error(-1, "CID font has FontFile attribute; assuming CIDType0"); - type = fontCIDType0; - } else { - type = fontType1; - } - } - } - obj2.free(); - if (embFontID.num == -1 && - obj1.dictLookupNF("FontFile2", &obj2)->isRef()) { - embFontID = obj2.getRef(); - if (type != fontTrueType && type != fontCIDType2) { - error(-1, "Mismatch between font type and embedded font file"); - type = isCIDFont() ? fontCIDType2 : fontTrueType; - } - } - obj2.free(); - if (embFontID.num == -1 && - obj1.dictLookupNF("FontFile3", &obj2)->isRef()) { - if (obj2.fetch(xref, &obj3)->isStream()) { - obj3.streamGetDict()->lookup("Subtype", &obj4); - if (obj4.isName("Type1")) { - embFontID = obj2.getRef(); - if (type != fontType1) { - error(-1, "Mismatch between font type and embedded font file"); - if (isCIDFont()) { - error(-1, "Embedded CID font has type Type1; assuming CIDType0"); - type = fontCIDType0; - } else { - type = fontType1; - } - } - } else if (obj4.isName("Type1C")) { - embFontID = obj2.getRef(); - if (type != fontType1 && type != fontType1C) { - error(-1, "Mismatch between font type and embedded font file"); - } - if (isCIDFont()) { - error(-1, "Embedded CID font has type Type1C; assuming CIDType0C"); - type = fontCIDType0C; - } else { - type = fontType1C; - } - } else if (obj4.isName("TrueType")) { - embFontID = obj2.getRef(); - if (type != fontTrueType) { - error(-1, "Mismatch between font type and embedded font file"); - if (isCIDFont()) { - error(-1, "Embedded CID font has type TrueType; assuming CIDType2"); - type = fontCIDType2; - } else { - type = fontTrueType; - } - } - } else if (obj4.isName("CIDFontType0C")) { - embFontID = obj2.getRef(); - if (type != fontCIDType0) { - error(-1, "Mismatch between font type and embedded font file"); - } - if (isCIDFont()) { - type = fontCIDType0C; - } else { - error(-1, "Embedded non-CID font has type CIDFontType0c; assuming Type1C"); - type = fontType1C; - } - } else if (obj4.isName("OpenType")) { - embFontID = obj2.getRef(); - if (type == fontTrueType) { - type = fontTrueTypeOT; - } else if (type == fontType1) { - type = fontType1COT; - } else if (type == fontCIDType0) { - type = fontCIDType0COT; - } else if (type == fontCIDType2) { - type = fontCIDType2OT; - } else { - error(-1, "Mismatch between font type and embedded font file"); - } - } else { - error(-1, "Unknown embedded font type '%s'", - obj4.isName() ? obj4.getName() : "???"); - } - obj4.free(); - } - obj3.free(); + else error(errSyntaxWarning, -1, "Invalid Font Weight"); } obj2.free(); @@ -390,8 +545,13 @@ obj1.dictLookup("Ascent", &obj2); if (obj2.isNum()) { t = 0.001 * obj2.getNum(); - // some broken font descriptors set ascent and descent to 0 - if (t != 0) { + // some broken font descriptors specify a negative ascent + if (t < 0) { + t = -t; + } + // some broken font descriptors set ascent and descent to 0; + // others set it to ridiculous values (e.g., 32768) + if (t != 0 && t < 3) { ascent = t; } } @@ -399,14 +559,14 @@ obj1.dictLookup("Descent", &obj2); if (obj2.isNum()) { t = 0.001 * obj2.getNum(); + // some broken font descriptors specify a positive descent + if (t > 0) { + t = -t; + } // some broken font descriptors set ascent and descent to 0 - if (t != 0) { + if (t != 0 && t > -3) { descent = t; } - // some broken font descriptors specify a positive descent - if (descent > 0) { - descent = -descent; - } } obj2.free(); @@ -448,45 +608,281 @@ return ctu; } -void GfxFont::findExtFontFile() { - static char *type1Exts[] = { ".pfa", ".pfb", ".ps", "", NULL }; - static char *ttExts[] = { ".ttf", ".ttc", ".otf", NULL }; +GfxFontLoc *GfxFont::locateFont(XRef *xref, GBool ps) { + GfxFontLoc *fontLoc; + SysFontType sysFontType; + GooString *path, *base14Name, *substName; + PSFontParam16 *psFont16; + Object refObj, embFontObj; + int substIdx, fontNum; + GBool embed; - if (name) { - if (type == fontType1) { - extFontFile = globalParams->findFontFile(name, type1Exts); - } else if (type == fontTrueType) { - extFontFile = globalParams->findFontFile(name, ttExts); - } + if (type == fontType3) { + return NULL; } -} -char *GfxFont::readExtFontFile(int *len) { - FILE *f; - char *buf; + //----- embedded font + if (embFontID.num >= 0) { + embed = gTrue; + refObj.initRef(embFontID.num, embFontID.gen); + refObj.fetch(xref, &embFontObj); + if (!embFontObj.isStream()) { + error(errSyntaxError, -1, "Embedded font object is wrong type"); + embed = gFalse; + } + embFontObj.free(); + refObj.free(); + if (embed) { + if (ps) { + switch (type) { + case fontType1: + case fontType1C: + case fontType1COT: + embed = globalParams->getPSEmbedType1(); + break; + case fontTrueType: + case fontTrueTypeOT: + embed = globalParams->getPSEmbedTrueType(); + break; + case fontCIDType0C: + case fontCIDType0COT: + embed = globalParams->getPSEmbedCIDPostScript(); + break; + case fontCIDType2: + case fontCIDType2OT: + embed = globalParams->getPSEmbedCIDTrueType(); + break; + default: + break; + } + } + if (embed) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocEmbedded; + fontLoc->fontType = type; + fontLoc->embFontID = embFontID; + return fontLoc; + } + } + } + + //----- PS passthrough + if (ps && !isCIDFont() && globalParams->getPSFontPassthrough()) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocResident; + fontLoc->fontType = fontType1; + fontLoc->path = name->copy(); + return fontLoc; + } + + //----- PS resident Base-14 font + if (ps && !isCIDFont() && ((Gfx8BitFont *)this)->base14) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocResident; + fontLoc->fontType = fontType1; + fontLoc->path = new GooString(((Gfx8BitFont *)this)->base14->base14Name); + return fontLoc; + } + + //----- external font file (fontFile, fontDir) + if (name && (path = globalParams->findFontFile(name))) { + if ((fontLoc = getExternalFont(path, isCIDFont()))) { + return fontLoc; + } + } + + //----- external font file for Base-14 font + if (!ps && !isCIDFont() && ((Gfx8BitFont *)this)->base14) { + base14Name = new GooString(((Gfx8BitFont *)this)->base14->base14Name); + if ((path = globalParams->findBase14FontFile(base14Name, this))) { + if ((fontLoc = getExternalFont(path, gFalse))) { + delete base14Name; + return fontLoc; + } + } + delete base14Name; + } + + //----- system font + if ((path = globalParams->findSystemFontFile(this, &sysFontType, + &fontNum))) { + if (isCIDFont()) { + if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocExternal; + fontLoc->fontType = fontCIDType2; + fontLoc->path = path; + fontLoc->fontNum = fontNum; + return fontLoc; + } + } else { + if (sysFontType == sysFontTTF || sysFontType == sysFontTTC) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocExternal; + fontLoc->fontType = fontTrueType; + fontLoc->path = path; + return fontLoc; + } else if (sysFontType == sysFontPFA || sysFontType == sysFontPFB) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocExternal; + fontLoc->fontType = fontType1; + fontLoc->path = path; + fontLoc->fontNum = fontNum; + return fontLoc; + } + } + delete path; + } + + if (!isCIDFont()) { + + //----- 8-bit PS resident font + if (name && ps) { + if ((path = globalParams->getPSResidentFont(name))) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocResident; + fontLoc->fontType = fontType1; + fontLoc->path = path; + return fontLoc; + } + } - if (!(f = fopen(extFontFile->getCString(), "rb"))) { - error(-1, "External font file '%s' vanished", extFontFile->getCString()); + //----- 8-bit font substitution + if (flags & fontFixedWidth) { + substIdx = 0; + } else if (flags & fontSerif) { + substIdx = 8; + } else { + substIdx = 4; + } + if (isBold()) { + substIdx += 2; + } + if (isItalic()) { + substIdx += 1; + } + substName = new GooString(base14SubstFonts[substIdx]); + if (ps) { + error(errSyntaxWarning, -1, "Substituting font '{0:s}' for '{1:t}'", + base14SubstFonts[substIdx], name ? name : new GooString("null")); + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocResident; + fontLoc->fontType = fontType1; + fontLoc->path = substName; + fontLoc->substIdx = substIdx; + return fontLoc; + } else { + path = globalParams->findFontFile(substName); + delete substName; + if (path) { + if ((fontLoc = getExternalFont(path, gFalse))) { + error(errSyntaxWarning, -1, "Substituting font '{0:s}' for '{1:t}'", + base14SubstFonts[substIdx], (name == NULL) ? new GooString("") : name); + name = new GooString(base14SubstFonts[substIdx]); + fontLoc->substIdx = substIdx; + return fontLoc; + } + } + } + + // failed to find a substitute font return NULL; } - if (fseek(f, 0, SEEK_END) != 0) { - error(-1, "Cannot seek to end of '%s'", extFontFile->getCString()); - fclose(f); - return NULL; + + //----- 16-bit PS resident font + if (ps && ((psFont16 = globalParams->getPSResidentFont16( + name, + ((GfxCIDFont *)this)->getWMode())))) { + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocResident; + fontLoc->fontType = fontCIDType0; // this is not used + fontLoc->path = psFont16->psFontName->copy(); + fontLoc->encoding = psFont16->encoding->copy(); + fontLoc->wMode = psFont16->wMode; + return fontLoc; + } + if (ps && ((psFont16 = globalParams->getPSResidentFontCC( + ((GfxCIDFont *)this)->getCollection(), + ((GfxCIDFont *)this)->getWMode())))) { + error(errSyntaxWarning, -1, "Substituting font '{0:t}' for '{1:t}'", + psFont16->psFontName, name); + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocResident; + fontLoc->fontType = fontCIDType0; // this is not used + fontLoc->path = psFont16->psFontName->copy(); + fontLoc->encoding = psFont16->encoding->copy(); + fontLoc->wMode = psFont16->wMode; + return fontLoc; + } + + //----- CID font substitution + if ((path = globalParams->findCCFontFile( + ((GfxCIDFont *)this)->getCollection()))) { + if ((fontLoc = getExternalFont(path, gTrue))) { + error(errSyntaxWarning, -1, "Substituting font '{0:t}' for '{1:t}'", + fontLoc->path, name); + return fontLoc; + } } - *len = (int)ftell(f); - if (fseek(f, 0, SEEK_SET) != 0) { - error(-1, "Cannot seek to start of '%s'", extFontFile->getCString()); - fclose(f); + + // failed to find a substitute font + return NULL; +} + +GfxFontLoc *GfxFont::locateBase14Font(GooString *base14Name) { + GooString *path; + + path = globalParams->findFontFile(base14Name); + if (!path) { return NULL; } - buf = (char *)gmalloc(*len); - if ((int)fread(buf, 1, *len, f) != *len) { - error(-1, "Error reading external font file '%s'", - extFontFile->getCString()); + return getExternalFont(path, gFalse); +} + +GfxFontLoc *GfxFont::getExternalFont(GooString *path, GBool cid) { + FoFiIdentifierType fft; + GfxFontType fontType; + GfxFontLoc *fontLoc; + + fft = FoFiIdentifier::identifyFile(path->getCString()); + switch (fft) { + case fofiIdType1PFA: + case fofiIdType1PFB: + fontType = fontType1; + break; + case fofiIdCFF8Bit: + fontType = fontType1C; + break; + case fofiIdCFFCID: + fontType = fontCIDType0C; + break; + case fofiIdTrueType: + case fofiIdTrueTypeCollection: + fontType = cid ? fontCIDType2 : fontTrueType; + break; + case fofiIdOpenTypeCFF8Bit: + fontType = fontType1COT; + break; + case fofiIdOpenTypeCFFCID: + fontType = fontCIDType0COT; + break; + case fofiIdUnknown: + case fofiIdError: + default: + fontType = fontUnknownType; + break; + } + if (fontType == fontUnknownType || + (cid ? (fontType < fontCIDType0) + : (fontType >= fontCIDType0))) { + delete path; + return NULL; } - fclose(f); - return buf; + fontLoc = new GfxFontLoc(); + fontLoc->locType = gfxFontLocExternal; + fontLoc->fontType = fontType; + fontLoc->path = path; + return fontLoc; } char *GfxFont::readEmbFontFile(XRef *xref, int *len) { @@ -497,7 +893,7 @@ obj1.initRef(embFontID.num, embFontID.gen); obj1.fetch(xref, &obj2); if (!obj2.isStream()) { - error(-1, "Embedded font file is not a stream"); + error(errSyntaxError, -1, "Embedded font file is not a stream"); obj2.free(); obj1.free(); embFontID.num = -1; @@ -519,13 +915,12 @@ // Gfx8BitFont //------------------------------------------------------------------------ -Gfx8BitFont::Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Dict *fontDict): - GfxFont(tagA, idA, nameA) -{ +Gfx8BitFont::Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, + GfxFontType typeA, Ref embFontIDA, Dict *fontDict): + GfxFont(tagA, idA, nameA, typeA, embFontIDA) { GooString *name2; BuiltinFont *builtinFont; - char **baseEnc; + const char **baseEnc; GBool baseEncFromFontFile; char *buf; int len; @@ -544,11 +939,11 @@ int n, i, a, b, m; refCnt = 1; - type = typeA; ctu = NULL; // do font name substitution for various aliases of the Base 14 font // names + base14 = NULL; if (name) { name2 = name->copy(); i = 0; @@ -560,27 +955,27 @@ } } a = 0; - b = sizeof(stdFontMap) / sizeof(StdFontMapEntry); - // invariant: stdFontMap[a].altName <= name2 < stdFontMap[b].altName + b = sizeof(base14FontMap) / sizeof(Base14FontMapEntry); + // invariant: base14FontMap[a].altName <= name2 < base14FontMap[b].altName while (b - a > 1) { m = (a + b) / 2; - if (name2->cmp(stdFontMap[m].altName) >= 0) { + if (name2->cmp(base14FontMap[m].altName) >= 0) { a = m; } else { b = m; } } - if (!name2->cmp(stdFontMap[a].altName)) { - name = new GooString(stdFontMap[a].properName); + if (!name2->cmp(base14FontMap[a].altName)) { + base14 = &base14FontMap[a]; } delete name2; } // is it a built-in font? builtinFont = NULL; - if (name) { + if (base14) { for (i = 0; i < nBuiltinFonts; ++i) { - if (!name->cmp(builtinFonts[i].name)) { + if (!strcmp(base14->base14Name, builtinFonts[i].name)) { builtinFont = &builtinFonts[i]; break; } @@ -615,9 +1010,6 @@ fontBBox[3] = 0.001 * builtinFont->bbox[3]; } - // look for an external font file - findExtFontFile(); - // get font matrix fontMat[0] = fontMat[3] = 1; fontMat[1] = fontMat[2] = fontMat[4] = fontMat[5] = 0; @@ -643,7 +1035,8 @@ } obj1.free(); if (!fontDict->lookup("CharProcs", &charProcs)->isDict()) { - error(-1, "Missing or invalid CharProcs dictionary in Type 3 font"); + error(errSyntaxError, -1, + "Missing or invalid CharProcs dictionary in Type 3 font"); charProcs.free(); } if (!fontDict->lookup("Resources", &resources)->isDict()) { @@ -697,54 +1090,45 @@ baseEnc = winAnsiEncoding; } - // check embedded or external font file for base encoding + // check embedded font file for base encoding // (only for Type 1 fonts - trying to get an encoding out of a // TrueType font is a losing proposition) ffT1 = NULL; ffT1C = NULL; buf = NULL; - if (type == fontType1 && (extFontFile || embFontID.num >= 0)) { - if (extFontFile) { - ffT1 = FoFiType1::load(extFontFile->getCString()); - } else { - buf = readEmbFontFile(xref, &len); - ffT1 = FoFiType1::make(buf, len); - } - if (ffT1) { - if (ffT1->getName()) { - if (embFontName) { - delete embFontName; + if (type == fontType1 && embFontID.num >= 0) { + if ((buf = readEmbFontFile(xref, &len))) { + if ((ffT1 = FoFiType1::make(buf, len))) { + if (ffT1->getName()) { + if (embFontName) { + delete embFontName; + } + embFontName = new GooString(ffT1->getName()); + } + if (!baseEnc) { + baseEnc = (const char **)ffT1->getEncoding(); + baseEncFromFontFile = gTrue; } - embFontName = new GooString(ffT1->getName()); - } - if (!baseEnc) { - baseEnc = ffT1->getEncoding(); - baseEncFromFontFile = gTrue; } + gfree(buf); } - } else if (type == fontType1C && (extFontFile || embFontID.num >= 0)) { - if (extFontFile) { - ffT1C = FoFiType1C::load(extFontFile->getCString()); - } else { - buf = readEmbFontFile(xref, &len); - ffT1C = FoFiType1C::make(buf, len); - } - if (ffT1C) { - if (ffT1C->getName()) { - if (embFontName) { - delete embFontName; + } else if (type == fontType1C && embFontID.num >= 0) { + if ((buf = readEmbFontFile(xref, &len))) { + if ((ffT1C = FoFiType1C::make(buf, len))) { + if (ffT1C->getName()) { + if (embFontName) { + delete embFontName; + } + embFontName = new GooString(ffT1C->getName()); + } + if (!baseEnc) { + baseEnc = (const char **)ffT1C->getEncoding(); + baseEncFromFontFile = gTrue; } - embFontName = new GooString(ffT1C->getName()); - } - if (!baseEnc) { - baseEnc = ffT1C->getEncoding(); - baseEncFromFontFile = gTrue; } + gfree(buf); } } - if (buf) { - gfree(buf); - } // get default base encoding if (!baseEnc) { @@ -758,9 +1142,25 @@ } } + if (baseEncFromFontFile) { + encodingName->Set("Builtin"); + } else if (baseEnc == winAnsiEncoding) { + encodingName->Set("WinAnsi"); + } else if (baseEnc == macRomanEncoding) { + encodingName->Set("MacRoman"); + } else if (baseEnc == macExpertEncoding) { + encodingName->Set("MacExpert"); + } else if (baseEnc == symbolEncoding) { + encodingName->Set("Symbol"); + } else if (baseEnc == zapfDingbatsEncoding) { + encodingName->Set("ZapfDingbats"); + } else { + encodingName->Set("Standard"); + } + // copy the base encoding for (i = 0; i < 256; ++i) { - enc[i] = baseEnc[i]; + enc[i] = (char *)baseEnc[i]; if ((encFree[i] = baseEncFromFontFile) && enc[i]) { enc[i] = copyString(baseEnc[i]); } @@ -770,11 +1170,10 @@ // T1C->T1 conversion (since the 'seac' operator depends on having // the accents in the encoding), so we fill in any gaps from // StandardEncoding - if (type == fontType1C && (extFontFile || embFontID.num >= 0) && - baseEncFromFontFile) { + if (type == fontType1C && embFontID.num >= 0 && baseEncFromFontFile) { for (i = 0; i < 256; ++i) { if (!enc[i] && standardEncoding[i]) { - enc[i] = standardEncoding[i]; + enc[i] = (char *)standardEncoding[i]; encFree[i] = gFalse; } } @@ -784,6 +1183,7 @@ if (obj1.isDict()) { obj1.dictLookup("Differences", &obj2); if (obj2.isArray()) { + encodingName->Set("Custom"); hasEncoding = gTrue; code = 0; for (i = 0; i < obj2.arrayGetLength(); ++i) { @@ -800,7 +1200,8 @@ } ++code; } else { - error(-1, "Wrong type in font encoding resource differences (%s)", + error(errSyntaxError, -1, + "Wrong type in font encoding resource differences ({0:s})", obj3.getTypeName()); } obj3.free(); @@ -852,6 +1253,17 @@ // construct the char code -> Unicode mapping object ctu = CharCodeToUnicode::make8BitToUnicode(toUnicode); + // pass 1a: Expand ligatures in the Alphabetic Presentation Form + // block (eg "fi", "ffi") to normal form + for (code = 0; code < 256; ++code) { + if (unicodeIsAlphabeticPresentationForm(toUnicode[code])) { + Unicode *normalized = unicodeNormalizeNFKC(&toUnicode[code], 1, &len, NULL); + if (len > 1) + ctu->setMapping((CharCode)code, normalized, len); + gfree(normalized); + } + } + // pass 2: try to fill in the missing chars, looking for ligatures, numeric // references and variants if (missing) { @@ -940,7 +1352,7 @@ obj1.arrayGet(code - firstChar, &obj2); if (obj2.isNum()) { widths[code] = obj2.getNum() * mul; - if (widths[code] != widths[firstChar]) { + if (fabs(widths[code] - widths[firstChar]) > 0.00001) { flags &= ~fontFixedWidth; } } @@ -1021,8 +1433,8 @@ GBool numeric, GBool hex, GBool variants) { if (uLen <= 0) { - error(-1, "Zero-length output buffer (recursion overflow?) in " - "parseCharName, component \"%s\"", charName); + error(errInternal, -1, "Zero-length output buffer (recursion overflow?) in " + "parseCharName, component \"{0:s}\"", charName); return 0; } // Step 1: drop all the characters from the glyph name starting with the @@ -1057,7 +1469,7 @@ ligaturesRecurse, numeric, hex, variants))) n += m; else - error(-1, "Could not parse ligature component \"%s\" of \"%s\" in " + error(errSyntaxWarning, -1, "Could not parse ligature component \"{0:s}\" of \"{1:s}\" in " "parseCharName", lig_part, charName); } lig_part = lig_end + 1; @@ -1165,8 +1577,8 @@ return ctu; } -Gushort *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) { - Gushort *map; +int *Gfx8BitFont::getCodeToGIDMap(FoFiTrueType *ff) { + int *map; int cmapPlatform, cmapEncoding; int unicodeCmap, macRomanCmap, msSymbolCmap, cmap; GBool useMacRoman, useUnicode; @@ -1174,7 +1586,7 @@ Unicode u; int code, i, n; - map = (Gushort *)gmallocn(256, sizeof(Gushort)); + map = (int *)gmallocn(256, sizeof(int)); for (i = 0; i < 256; ++i) { map[i] = 0; } @@ -1186,9 +1598,10 @@ // TrueType font has a Macintosh Roman cmap, use it, and // reverse map the char names through MacRomanEncoding to // get char codes. - // 1b. If the TrueType font has a Microsoft Unicode cmap or a - // non-Microsoft Unicode cmap, use it, and use the Unicode - // indexes, not the char codes. + // 1b. If the PDF font is not symbolic or the PDF font is not + // embedded, and the TrueType font has a Microsoft Unicode + // cmap or a non-Microsoft Unicode cmap, use it, and use the + // Unicode indexes, not the char codes. // 1c. If the PDF font is symbolic and the TrueType font has a // Microsoft Symbol cmap, use it, and use char codes // directly (possibly with an offset of 0xf000). @@ -1224,7 +1637,8 @@ if (usesMacRomanEnc && macRomanCmap >= 0) { cmap = macRomanCmap; useMacRoman = gTrue; - } else if (unicodeCmap >= 0) { + } else if ((!(flags & fontSymbolic) || embFontID.num < 0) && + unicodeCmap >= 0) { cmap = unicodeCmap; useUnicode = gTrue; } else if ((flags & fontSymbolic) && msSymbolCmap >= 0) { @@ -1251,6 +1665,8 @@ if ((code = globalParams->getMacRomanCharCode(charName))) { map[i] = ff->mapCodeToGID(cmap, code); } + } else { + map[i] = -1; } } @@ -1264,6 +1680,7 @@ { n = ctu->mapToUnicode((CharCode)i, &uAux); if (n > 0) map[i] = ff->mapCodeToGID(cmap, uAux[0]); + else map[i] = -1; } } @@ -1279,8 +1696,8 @@ // try the TrueType 'post' table to handle any unmapped characters for (i = 0; i < 256; ++i) { - if (!map[i] && (charName = enc[i])) { - map[i] = (Gushort)(int)ff->mapNameToGID(charName); + if (map[i] <= 0 && (charName = enc[i])) { + map[i] = ff->mapNameToGID(charName); } } @@ -1308,20 +1725,25 @@ // GfxCIDFont //------------------------------------------------------------------------ -static bool cmpWidthExcep(const GfxFontCIDWidthExcep &w1, const GfxFontCIDWidthExcep &w2) { - return w1.first < w2.first; -} +struct cmpWidthExcepFunctor { + bool operator()(const GfxFontCIDWidthExcep &w1, + const GfxFontCIDWidthExcep &w2) { + return w1.first < w2.first; + } +}; -static bool cmpWidthExcepV(const GfxFontCIDWidthExcepV &w1, const GfxFontCIDWidthExcepV &w2) { - return w1.first < w2.first; -} +struct cmpWidthExcepVFunctor { + bool operator()(const GfxFontCIDWidthExcepV &w1, + const GfxFontCIDWidthExcepV &w2) { + return w1.first < w2.first; + } +}; -GfxCIDFont::GfxCIDFont(XRef *xref, char *tagA, Ref idA, GooString *nameA, - Dict *fontDict): - GfxFont(tagA, idA, nameA) +GfxCIDFont::GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, + GfxFontType typeA, Ref embFontIDA, Dict *fontDict): + GfxFont(tagA, idA, nameA, typeA, embFontIDA) { Dict *desFontDict; - GooString *collection, *cMapName; Object desFontDictObj; Object obj1, obj2, obj3, obj4, obj5, obj6; CharCodeToUnicode *utu; @@ -1334,9 +1756,10 @@ ascent = 0.95; descent = -0.35; fontBBox[0] = fontBBox[1] = fontBBox[2] = fontBBox[3] = 0; + collection = NULL; cMap = NULL; - cMapName = NULL; ctu = NULL; + ctuUsesCharCode = gTrue; widths.defWidth = 1.0; widths.defHeight = -1.0; widths.defVY = 0.880; @@ -1348,52 +1771,34 @@ cidToGIDLen = 0; // get the descendant font - if (!fontDict->lookup("DescendantFonts", &obj1)->isArray()) { - error(-1, "Missing DescendantFonts entry in Type 0 font"); + if (!fontDict->lookup("DescendantFonts", &obj1)->isArray() || + obj1.arrayGetLength() == 0) { + error(errSyntaxError, -1, "Missing or empty DescendantFonts entry in Type 0 font"); obj1.free(); goto err1; } if (!obj1.arrayGet(0, &desFontDictObj)->isDict()) { - error(-1, "Bad descendant font in Type 0 font"); + error(errSyntaxError, -1, "Bad descendant font in Type 0 font"); goto err3; } obj1.free(); desFontDict = desFontDictObj.getDict(); - // font type - if (!desFontDict->lookup("Subtype", &obj1)) { - error(-1, "Missing Subtype entry in Type 0 descendant font"); - goto err3; - } - if (obj1.isName("CIDFontType0")) { - type = fontCIDType0; - } else if (obj1.isName("CIDFontType2")) { - type = fontCIDType2; - } else { - error(-1, "Unknown Type 0 descendant font type '%s'", - obj1.isName() ? obj1.getName() : "???"); - goto err3; - } - obj1.free(); - // get info from font descriptor readFontDescriptor(xref, desFontDict); - // look for an external font file - findExtFontFile(); - //----- encoding info ----- // char collection if (!desFontDict->lookup("CIDSystemInfo", &obj1)->isDict()) { - error(-1, "Missing CIDSystemInfo dictionary in Type 0 descendant font"); + error(errSyntaxError, -1, "Missing CIDSystemInfo dictionary in Type 0 descendant font"); goto err3; } obj1.dictLookup("Registry", &obj2); obj1.dictLookup("Ordering", &obj3); if (!obj2.isString() || !obj3.isString()) { - error(-1, "Invalid CIDSystemInfo dictionary in Type 0 descendant font"); - goto err4; + error(errSyntaxError, -1, "Invalid CIDSystemInfo dictionary in Type 0 descendant font"); + goto err3; } collection = obj2.getString()->copy()->append('-')->append(obj3.getString()); obj3.free(); @@ -1402,12 +1807,14 @@ // look for a ToUnicode CMap if (!(ctu = readToUnicodeCMap(fontDict, 16, NULL))) { + ctuUsesCharCode = gFalse; - // the "Adobe-Identity" and "Adobe-UCS" collections don't have - // cidToUnicode files - if (collection->cmp("Adobe-Identity") && - collection->cmp("Adobe-UCS")) { - + // use an identity mapping for the "Adobe-Identity" and + // "Adobe-UCS" collections + if (!collection->cmp("Adobe-Identity") || + !collection->cmp("Adobe-UCS")) { + ctu = CharCodeToUnicode::makeIdentityMapping(); + } else { // look for a user-supplied .cidToUnicode file if (!(ctu = globalParams->getCIDToUnicode(collection))) { // I'm not completely sure that this is the best thing to do @@ -1424,13 +1831,12 @@ }; for (size_t i = 0; i < sizeof(knownCollections)/sizeof(knownCollections[0]); i++) { if (collection->cmp(knownCollections[i]) == 0) { - error(-1, "Missing language pack for '%s' mapping", collection->getCString()); - delete collection; + error(errSyntaxError, -1, "Missing language pack for '{0:t}' mapping", collection); goto err2; } } - error(-1, "Unknown character collection '%s'", - collection->getCString()); + error(errSyntaxError, -1, "Unknown character collection '{0:t}'", + collection); // fall-through, assuming the Identity mapping -- this appears // to match Adobe's behavior } @@ -1456,41 +1862,19 @@ } // encoding (i.e., CMap) - //~ also need to deal with the UseCMap entry in the stream dict - if (!fontDict->lookup("Encoding", &obj1)->isName()) { - GBool success = gFalse; - if (obj1.isStream()) { - Object objName; - Stream *s = obj1.getStream(); - s->getDict()->lookup("CMapName", &objName); - if (objName.isName()) - { - cMapName = new GooString(objName.getName()); - cMap = globalParams->getCMap(collection, cMapName, s); - success = gTrue; - } - objName.free(); - } - - if (!success) { - error(-1, "Missing or invalid Encoding entry in Type 0 font"); - delete collection; - goto err3; - } - } else { - cMapName = new GooString(obj1.getName()); - cMap = globalParams->getCMap(collection, cMapName); + if (fontDict->lookup("Encoding", &obj1)->isNull()) { + error(errSyntaxError, -1, "Missing Encoding entry in Type 0 font"); + goto err2; + } + if (!(cMap = CMap::parse(NULL, collection, &obj1))) { + goto err2; } - if (!cMap) { - error(-1, "Unknown CMap '%s' for character collection '%s'", - cMapName->getCString(), collection->getCString()); - delete collection; - delete cMapName; - goto err2; - } - delete collection; - delete cMapName; obj1.free(); + if (cMap->getCMapName()) { + encodingName->Set(cMap->getCMapName()->getCString()); + } else { + encodingName->Set("Custom"); + } // CIDToGIDMap (for embedded TrueType fonts) if (type == fontCIDType2 || type == fontCIDType2OT) { @@ -1498,18 +1882,18 @@ if (obj1.isStream()) { cidToGIDLen = 0; i = 64; - cidToGID = (Gushort *)gmallocn(i, sizeof(Gushort)); + cidToGID = (int *)gmallocn(i, sizeof(int)); obj1.streamReset(); while ((c1 = obj1.streamGetChar()) != EOF && (c2 = obj1.streamGetChar()) != EOF) { if (cidToGIDLen == i) { i *= 2; - cidToGID = (Gushort *)greallocn(cidToGID, i, sizeof(Gushort)); + cidToGID = (int *)greallocn(cidToGID, i, sizeof(int)); } - cidToGID[cidToGIDLen++] = (Gushort)((c1 << 8) + c2); + cidToGID[cidToGIDLen++] = (c1 << 8) + c2; } } else if (!obj1.isName("Identity") && !obj1.isNull()) { - error(-1, "Invalid CIDToGIDMap entry in CID font"); + error(errSyntaxError, -1, "Invalid CIDToGIDMap entry in CID font"); } obj1.free(); } @@ -1542,7 +1926,7 @@ widths.exceps[widths.nExceps].width = obj4.getNum() * 0.001; ++widths.nExceps; } else { - error(-1, "Bad widths array in Type 0 font"); + error(errSyntaxError, -1, "Bad widths array in Type 0 font"); } obj4.free(); i += 3; @@ -1562,19 +1946,20 @@ ++j; ++widths.nExceps; } else { - error(-1, "Bad widths array in Type 0 font"); + error(errSyntaxError, -1, "Bad widths array in Type 0 font"); } obj4.free(); } i += 2; } else { - error(-1, "Bad widths array in Type 0 font"); + error(errSyntaxError, -1, "Bad widths array in Type 0 font"); ++i; } obj3.free(); obj2.free(); } - std::sort(widths.exceps, widths.exceps + widths.nExceps, &cmpWidthExcep); + std::sort(widths.exceps, widths.exceps + widths.nExceps, + cmpWidthExcepFunctor()); } obj1.free(); @@ -1616,7 +2001,7 @@ widths.excepsV[widths.nExcepsV].vy = obj6.getNum() * 0.001; ++widths.nExcepsV; } else { - error(-1, "Bad widths (W2) array in Type 0 font"); + error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font"); } obj6.free(); obj5.free(); @@ -1643,7 +2028,7 @@ ++j; ++widths.nExcepsV; } else { - error(-1, "Bad widths (W2) array in Type 0 font"); + error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font"); } obj6.free(); obj5.free(); @@ -1651,13 +2036,14 @@ } i += 2; } else { - error(-1, "Bad widths (W2) array in Type 0 font"); + error(errSyntaxError, -1, "Bad widths (W2) array in Type 0 font"); ++i; } obj3.free(); obj2.free(); } - std::sort(widths.excepsV, widths.excepsV + widths.nExcepsV, &cmpWidthExcepV); + std::sort(widths.excepsV, widths.excepsV + widths.nExcepsV, + cmpWidthExcepVFunctor()); } obj1.free(); @@ -1665,17 +2051,19 @@ ok = gTrue; return; - err4: + err3: obj3.free(); obj2.free(); - err3: - obj1.free(); err2: + obj1.free(); desFontDictObj.free(); err1:; } GfxCIDFont::~GfxCIDFont() { + if (collection) { + delete collection; + } if (cMap) { cMap->decRefCnt(); } @@ -1693,6 +2081,7 @@ Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy) { CID cid; + CharCode c; double w, h, vx, vy; int n, a, b, m; @@ -1703,7 +2092,7 @@ return 1; } - *code = (CharCode)(cid = cMap->getCID(s, len, &n)); + *code = (CharCode)(cid = cMap->getCID(s, len, &c, &n)); if (ctu) { if (hasToUnicode) { int i = 0, c = 0; @@ -1789,7 +2178,7 @@ return cMap ? cMap->getCollection() : (GooString *)NULL; } -Gushort GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi, +int GfxCIDFont::mapCodeToGID(FoFiTrueType *ff, int cmapi, Unicode unicode, GBool wmode) { Gushort gid = ff->mapCodeToGID(cmapi,unicode); if (wmode) { @@ -1799,7 +2188,7 @@ return gid; } -Gushort *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) { +int *GfxCIDFont::getCodeToGIDMap(FoFiTrueType *ff, int *mapsizep) { #define N_UCS_CANDIDATES 2 /* space characters */ static const unsigned long spaces[] = { @@ -1807,35 +2196,35 @@ 0x2008,0x2009,0x200A,0x00A0,0x200B,0x2060,0x3000,0xFEFF, 0 }; - static char *adobe_cns1_cmaps[] = { + static const char *adobe_cns1_cmaps[] = { "UniCNS-UTF32-V", "UniCNS-UCS2-V", "UniCNS-UTF32-H", "UniCNS-UCS2-H", 0 }; - static char *adobe_gb1_cmaps[] = { + static const char *adobe_gb1_cmaps[] = { "UniGB-UTF32-V", "UniGB-UCS2-V", "UniGB-UTF32-H", "UniGB-UCS2-H", 0 }; - static char *adobe_japan1_cmaps[] = { + static const char *adobe_japan1_cmaps[] = { "UniJIS-UTF32-V", "UniJIS-UCS2-V", "UniJIS-UTF32-H", "UniJIS-UCS2-H", 0 }; - static char *adobe_japan2_cmaps[] = { + static const char *adobe_japan2_cmaps[] = { "UniHojo-UTF32-V", "UniHojo-UCS2-V", "UniHojo-UTF32-H", "UniHojo-UCS2-H", 0 }; - static char *adobe_korea1_cmaps[] = { + static const char *adobe_korea1_cmaps[] = { "UniKS-UTF32-V", "UniKS-UCS2-V", "UniKS-UTF32-H", @@ -1843,38 +2232,39 @@ 0 }; static struct CMapListEntry { - char *collection; - char *scriptTag; - char *toUnicodeMap; - char **CMaps; + const char *collection; + const char *scriptTag; + const char *languageTag; + const char *toUnicodeMap; + const char **CMaps; } CMapList[] = { { "Adobe-CNS1", - "kana", + "hani", "CHN ", "Adobe-CNS1-UCS2", adobe_cns1_cmaps, }, { "Adobe-GB1", - "kana", + "hani", "CHN ", "Adobe-GB1-UCS2", adobe_gb1_cmaps, }, { "Adobe-Japan1", - "kana", + "kana", "JAN ", "Adobe-Japan1-UCS2", adobe_japan1_cmaps, }, { "Adobe-Japan2", - "kana", + "kana", "JAN ", "Adobe-Japan2-UCS2", adobe_japan2_cmaps, }, { "Adobe-Korea1", - "kana", + "hang", "KOR ", "Adobe-Korea1-UCS2", adobe_korea1_cmaps, }, @@ -1883,12 +2273,12 @@ Unicode *humap = 0; Unicode *vumap = 0; Unicode *tumap = 0; - Gushort *codeToGID = 0; + int *codeToGID = 0; unsigned long n; int i; unsigned long code; int wmode; - char **cmapName; + const char **cmapName; CMap *cMap; CMapListEntry *lp; int cmap; @@ -1972,10 +2362,10 @@ cMap->decRefCnt(); } } - ff->setupGSUB(lp->scriptTag); + ff->setupGSUB(lp->scriptTag, lp->languageTag); } else { - error(-1,"Unknown character collection %s\n", - getCollection()->getCString()); + error(errSyntaxError, -1, "Unknown character collection {0:t}\n", + getCollection()); if ((ctu = getToUnicode()) != 0) { CharCode cid; for (cid = 0;cid < n ;cid++) { @@ -1993,7 +2383,7 @@ } } // map CID -> Unicode -> GID - codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); + codeToGID = (int *)gmallocn(n, sizeof(int)); for (code = 0; code < n; ++code) { Unicode unicode; unsigned long gid; @@ -2051,8 +2441,9 @@ int nUsed; double w; int a, b, m; + CharCode c; - CID cid = cMap->getCID(s, len, &nUsed); + CID cid = cMap->getCID(s, len, &c, &nUsed); w = widths.defWidth; if (widths.nExceps > 0 && cid >= widths.exceps[0].first) { @@ -2113,7 +2504,7 @@ fonts[i] = NULL; } } else { - error(-1, "font resource is not a dictionary"); + error(errSyntaxError, -1, "font resource is not a dictionary"); fonts[i] = NULL; } obj1.free(); diff -Nru poppler-0.18.4/poppler/GfxFont.h poppler-0.20.5/poppler/GfxFont.h --- poppler-0.18.4/poppler/GfxFont.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/GfxFont.h 2012-05-10 20:05:44.000000000 +0000 @@ -20,7 +20,7 @@ // Copyright (C) 2007 Jeff Muizelaar // Copyright (C) 2007 Koji Otani // Copyright (C) 2011 Axel Strübing -// Copyright (C) 2011 Adrian Johnson +// Copyright (C) 2011, 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -43,8 +43,8 @@ class CMap; class CharCodeToUnicode; class FoFiTrueType; -class DisplayFontParam; struct GfxFontCIDWidths; +struct Base14FontMapEntry; //------------------------------------------------------------------------ // GfxFontType @@ -96,6 +96,41 @@ }; //------------------------------------------------------------------------ +// GfxFontLoc +//------------------------------------------------------------------------ + +enum GfxFontLocType { + gfxFontLocEmbedded, // font embedded in PDF file + gfxFontLocExternal, // external font file + gfxFontLocResident // font resident in PS printer +}; + +class GfxFontLoc { +public: + + GfxFontLoc(); + ~GfxFontLoc(); + + GfxFontLocType locType; + GfxFontType fontType; + Ref embFontID; // embedded stream obj ID + // (if locType == gfxFontLocEmbedded) + GooString *path; // font file path + // (if locType == gfxFontLocExternal) + // PS font name + // (if locType == gfxFontLocResident) + int fontNum; // for TrueType collections + // (if locType == gfxFontLocExternal) + GooString *encoding; // PS font encoding, only for 16-bit fonts + // (if locType == gfxFontLocResident) + int wMode; // writing mode, only for 16-bit fonts + // (if locType == gfxFontLocResident) + int substIdx; // substitute font index + // (if locType == gfxFontLocExternal, + // and a Base-14 substitution was made) +}; + +//------------------------------------------------------------------------ // GfxFont //------------------------------------------------------------------------ @@ -133,9 +168,10 @@ W900 }; // Build a GfxFont object. - static GfxFont *makeFont(XRef *xref, char *tagA, Ref idA, Dict *fontDict); + static GfxFont *makeFont(XRef *xref, const char *tagA, Ref idA, Dict *fontDict); - GfxFont(char *tagA, Ref idA, GooString *nameA); + GfxFont(const char *tagA, Ref idA, GooString *nameA, + GfxFontType typeA, Ref embFontIDA); GBool isOk() { return ok; } @@ -151,9 +187,6 @@ // Does this font match the tag? GBool matches(char *tagA) { return !tag->cmp(tagA); } - // Get base font name. - GooString *getName() { return name; } - // Get font family name. GooString *getFamily() { return family; } @@ -165,7 +198,7 @@ // Get the original font name (ignornig any munging that might have // been done to map to a canonical Base-14 font name). - GooString *getOrigName() { return origName; } + GooString *getName() { return name; } // Get font type. GfxFontType getType() { return type; } @@ -180,10 +213,6 @@ // NULL if there is no embedded font. GooString *getEmbeddedFontName() { return embFontName; } - // Get the name of the external font file. Returns NULL if there - // is no external font file. - GooString *getExtFontFile() { return extFontFile; } - // Get font descriptor flags. int getFlags() { return flags; } GBool isFixedWidth() { return flags & fontFixedWidth; } @@ -208,8 +237,14 @@ // Return the writing mode (0=horizontal, 1=vertical). virtual int getWMode() { return 0; } + // Locate the font file for this font. If is true, includes PS + // printer-resident fonts. Returns NULL on failure. + GfxFontLoc *locateFont(XRef *xref, GBool ps); + + // Locate a Base-14 font file for a specified font name. + static GfxFontLoc *locateBase14Font(GooString *base14Name); + // Read an external or embedded font file into a buffer. - char *readExtFontFile(int *len); char *readEmbFontFile(XRef *xref, int *len); // Get the next char from a string of bytes, returning the @@ -225,19 +260,18 @@ // Does this font have a toUnicode map? GBool hasToUnicodeCMap() { return hasToUnicode; } - /* XXX: dfp shouldn't be public, however the font finding code is currently in - * GlobalParams. Instead it should be inside the GfxFont class. However, - * getDisplayFont currently uses FCcfg so moving it is not as simple. */ - /* XXX: related to this is the fact that all of the extFontFile stuff is dead */ - DisplayFontParam *dfp; + // Return the name of the encoding + GooString *getEncodingName() { return encodingName; } + protected: virtual ~GfxFont(); + static GfxFontType getFontType(XRef *xref, Dict *fontDict, Ref *embID); void readFontDescriptor(XRef *xref, Dict *fontDict); CharCodeToUnicode *readToUnicodeCMap(Dict *fontDict, int nBits, CharCodeToUnicode *ctu); - void findExtFontFile(); + static GfxFontLoc *getExternalFont(GooString *path, GBool cid); GooString *tag; // PDF font tag Ref id; // reference (used as unique ID) @@ -245,12 +279,10 @@ GooString *family; // font family Stretch stretch; // font stretch Weight weight; // font weight - GooString *origName; // original font name GfxFontType type; // type of font int flags; // font descriptor flags GooString *embFontName; // name of embedded font Ref embFontID; // ref to embedded font file stream - GooString *extFontFile; // external font file name double fontMat[6]; // font matrix (Type 3 only) double fontBBox[4]; // font bounding box (Type 3 only) double missingWidth; // "default" width @@ -259,6 +291,7 @@ int refCnt; GBool ok; GBool hasToUnicode; + GooString *encodingName; }; //------------------------------------------------------------------------ @@ -268,8 +301,8 @@ class Gfx8BitFont: public GfxFont { public: - Gfx8BitFont(XRef *xref, char *tagA, Ref idA, GooString *nameA, - GfxFontType typeA, Dict *fontDict); + Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, + GfxFontType typeA, Ref embFontIDA, Dict *fontDict); virtual int getNextChar(char *s, int len, CharCode *code, Unicode **u, int *uLen, @@ -295,7 +328,7 @@ // Return a char code-to-GID mapping for the provided font file. // (This is only useful for TrueType fonts.) - Gushort *getCodeToGIDMap(FoFiTrueType *ff); + int *getCodeToGIDMap(FoFiTrueType *ff); // Return the Type 3 CharProc dictionary, or NULL if none. Dict *getCharProcs(); @@ -309,6 +342,7 @@ private: virtual ~Gfx8BitFont(); + const Base14FontMapEntry *base14; // for Base-14 fonts only; NULL otherwise char *enc[256]; // char code --> char name char encFree[256]; // boolean for each char name: if set, // the string is malloc'ed @@ -318,6 +352,8 @@ double widths[256]; // character widths Object charProcs; // Type 3 CharProcs dictionary Object resources; // Type 3 Resources dictionary + + friend class GfxFont; }; //------------------------------------------------------------------------ @@ -327,8 +363,8 @@ class GfxCIDFont: public GfxFont { public: - GfxCIDFont(XRef *xref, char *tagA, Ref idA, GooString *nameA, - Dict *fontDict); + GfxCIDFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, + GfxFontType typeA, Ref embFontIDA, Dict *fontDict); virtual GBool isCIDFont() { return gTrue; } @@ -347,23 +383,26 @@ // Return the CID-to-GID mapping table. These should only be called // if type is fontCIDType2. - Gushort *getCIDToGID() { return cidToGID; } + int *getCIDToGID() { return cidToGID; } int getCIDToGIDLen() { return cidToGIDLen; } - Gushort *getCodeToGIDMap(FoFiTrueType *ff, int *length); + int *getCodeToGIDMap(FoFiTrueType *ff, int *length); double getWidth(char* s, int len); private: virtual ~GfxCIDFont(); - Gushort mapCodeToGID(FoFiTrueType *ff, int cmapi, + int mapCodeToGID(FoFiTrueType *ff, int cmapi, Unicode unicode, GBool wmode); + GooString *collection; // collection name CMap *cMap; // char code --> CID CharCodeToUnicode *ctu; // CID --> Unicode + GBool ctuUsesCharCode; // true: ctu maps char code to Unicode; + // false: ctu maps CID to Unicode GfxFontCIDWidths widths; // character widths - Gushort *cidToGID; // CID --> GID mapping (for embedded + int *cidToGID; // CID --> GID mapping (for embedded // TrueType fonts) int cidToGIDLen; }; diff -Nru poppler-0.18.4/poppler/GfxState.cc poppler-0.20.5/poppler/GfxState.cc --- poppler-0.18.4/poppler/GfxState.cc 2012-01-30 19:32:08.000000000 +0000 +++ poppler-0.20.5/poppler/GfxState.cc 2012-10-02 23:19:06.000000000 +0000 @@ -16,13 +16,14 @@ // Copyright (C) 2005 Kristian Høgsberg // Copyright (C) 2006, 2007 Jeff Muizelaar // Copyright (C) 2006, 2010 Carlos Garcia Campos -// Copyright (C) 2006-2011 Albert Astals Cid -// Copyright (C) 2009 Koji Otani -// Copyright (C) 2009, 2011 Thomas Freitag +// Copyright (C) 2006-2012 Albert Astals Cid +// Copyright (C) 2009, 2012 Koji Otani +// Copyright (C) 2009, 2011, 2012 Thomas Freitag // Copyright (C) 2009 Christian Persch // Copyright (C) 2010 Paweł Wiejacha // Copyright (C) 2010 Christian Feuersänger // Copyright (C) 2011 Andrea Canciani +// Copyright (C) 2012 William Bader // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -53,6 +54,12 @@ //------------------------------------------------------------------------ +// Max depth of nested color spaces. This is used to catch infinite +// loops in the color space object structure. +#define colorSpaceRecursionLimit 8 + +//------------------------------------------------------------------------ + GBool Matrix::invertTo(Matrix *other) const { double det; @@ -97,7 +104,7 @@ //------------------------------------------------------------------------ struct GfxBlendModeInfo { - char *name; + const char *name; GfxBlendMode mode; }; @@ -128,7 +135,7 @@ // // NB: This must match the GfxColorSpaceMode enum defined in // GfxState.h -static char *gfxColorSpaceModeNames[] = { +static const char *gfxColorSpaceModeNames[] = { "DeviceGray", "CalGray", "DeviceRGB", @@ -146,7 +153,40 @@ #ifdef USE_CMS +#ifdef USE_LCMS1 #include +#define cmsColorSpaceSignature icColorSpaceSignature +#define cmsSetLogErrorHandler cmsSetErrorHandler +#define cmsSigXYZData icSigXYZData +#define cmsSigLuvData icSigLuvData +#define cmsSigLabData icSigLabData +#define cmsSigYCbCrData icSigYCbCrData +#define cmsSigYxyData icSigYxyData +#define cmsSigRgbData icSigRgbData +#define cmsSigHsvData icSigHsvData +#define cmsSigHlsData icSigHlsData +#define cmsSigCmyData icSigCmyData +#define cmsSig3colorData icSig3colorData +#define cmsSigGrayData icSigGrayData +#define cmsSigCmykData icSigCmykData +#define cmsSig4colorData icSig4colorData +#define cmsSig2colorData icSig2colorData +#define cmsSig5colorData icSig5colorData +#define cmsSig6colorData icSig6colorData +#define cmsSig7colorData icSig7colorData +#define cmsSig8colorData icSig8colorData +#define cmsSig9colorData icSig9colorData +#define cmsSig10colorData icSig10colorData +#define cmsSig11colorData icSig11colorData +#define cmsSig12colorData icSig12colorData +#define cmsSig13colorData icSig13colorData +#define cmsSig14colorData icSig14colorData +#define cmsSig15colorData icSig15colorData +#define LCMS_FLAGS 0 +#else +#include +#define LCMS_FLAGS cmsFLAGS_NOOPTIMIZE +#endif #define COLOR_PROFILE_DIR "/ColorProfiles/" #define GLOBAL_COLOR_PROFILE_DIR POPPLER_DATADIR COLOR_PROFILE_DIR @@ -180,8 +220,8 @@ static GfxColorTransform *XYZ2DisplayTransform = NULL; // convert color space signature to cmsColor type -static unsigned int getCMSColorSpaceType(icColorSpaceSignature cs); -static unsigned int getCMSNChannels(icColorSpaceSignature cs); +static unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs); +static unsigned int getCMSNChannels(cmsColorSpaceSignature cs); static cmsHPROFILE loadColorProfile(const char *fileName); void GfxColorSpace::setDisplayProfile(void *displayProfileA) { @@ -207,15 +247,21 @@ //------------------------------------------------------------------------ GfxColorSpace::GfxColorSpace() { + overprintMask = 0x0f; } GfxColorSpace::~GfxColorSpace() { } -GfxColorSpace *GfxColorSpace::parse(Object *csObj, Gfx *gfx) { +GfxColorSpace *GfxColorSpace::parse(Object *csObj, Gfx *gfx, int recursion) { GfxColorSpace *cs; Object obj1; + if (recursion > colorSpaceRecursionLimit) { + error(errSyntaxError, -1, "Loop detected in color space objects"); + return NULL; + } + cs = NULL; if (csObj->isName()) { if (csObj->isName("DeviceGray") || csObj->isName("G")) { @@ -227,9 +273,9 @@ } else if (csObj->isName("Pattern")) { cs = new GfxPatternColorSpace(NULL); } else { - error(-1, "Bad color space '%s'", csObj->getName()); + error(errSyntaxWarning, -1, "Bad color space '{0:s}'", csObj->getName()); } - } else if (csObj->isArray()) { + } else if (csObj->isArray() && csObj->arrayGetLength() > 0) { csObj->arrayGet(0, &obj1); if (obj1.isName("DeviceGray") || obj1.isName("G")) { cs = new GfxDeviceGrayColorSpace(); @@ -244,17 +290,17 @@ } else if (obj1.isName("Lab")) { cs = GfxLabColorSpace::parse(csObj->getArray()); } else if (obj1.isName("ICCBased")) { - cs = GfxICCBasedColorSpace::parse(csObj->getArray(), gfx); + cs = GfxICCBasedColorSpace::parse(csObj->getArray(), gfx, recursion); } else if (obj1.isName("Indexed") || obj1.isName("I")) { - cs = GfxIndexedColorSpace::parse(csObj->getArray(), gfx); + cs = GfxIndexedColorSpace::parse(csObj->getArray(), gfx, recursion); } else if (obj1.isName("Separation")) { - cs = GfxSeparationColorSpace::parse(csObj->getArray(), gfx); + cs = GfxSeparationColorSpace::parse(csObj->getArray(), gfx, recursion); } else if (obj1.isName("DeviceN")) { - cs = GfxDeviceNColorSpace::parse(csObj->getArray(), gfx); + cs = GfxDeviceNColorSpace::parse(csObj->getArray(), gfx, recursion); } else if (obj1.isName("Pattern")) { - cs = GfxPatternColorSpace::parse(csObj->getArray(), gfx); + cs = GfxPatternColorSpace::parse(csObj->getArray(), gfx, recursion); } else { - error(-1, "Bad color space"); + error(errSyntaxWarning, -1, "Bad color space"); } obj1.free(); } else if (csObj->isDict()) { @@ -266,11 +312,11 @@ } else if (obj1.isName("DeviceCMYK")) { cs = new GfxDeviceCMYKColorSpace(); } else { - error(-1, "Bad color space '%s'", csObj->getName()); + error(errSyntaxWarning, -1, "Bad color space dict'"); } obj1.free(); } else { - error(-1, "Bad color space - expected name, array or dict"); + error(errSyntaxWarning, -1, "Bad color space - expected name or array or dict"); } return cs; } @@ -289,7 +335,7 @@ return nGfxColorSpaceModes; } -char *GfxColorSpace::getColorSpaceModeName(int idx) { +const char *GfxColorSpace::getColorSpaceModeName(int idx) { return gfxColorSpaceModeNames[idx]; } @@ -332,11 +378,18 @@ return hp; } +#ifdef USE_LCMS1 static int CMSError(int ecode, const char *msg) { - error(-1, "%s", msg); + error(errSyntaxWarning, -1, "{0:s}", msg); return 1; } +#else +static void CMSError(cmsContext /*contextId*/, cmsUInt32Number /*ecode*/, const char *text) +{ + error(errSyntaxWarning, -1, "{0:s}", text); +} +#endif int GfxColorSpace::setupColorProfiles() { @@ -349,7 +402,7 @@ initialized = gTrue; // set error handlor - cmsSetErrorHandler(CMSError); + cmsSetLogErrorHandler(CMSError); if (displayProfile == NULL) { // load display profile if it was not already loaded. @@ -375,8 +428,8 @@ displayProfile, COLORSPACE_SH(displayPixelType) | CHANNELS_SH(nChannels) | BYTES_SH(1), - INTENT_RELATIVE_COLORIMETRIC,0)) == 0) { - error(-1, "Can't create Lab transform"); + INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) { + error(errSyntaxWarning, -1, "Can't create Lab transform"); } else { XYZ2DisplayTransform = new GfxColorTransform(transform); } @@ -385,125 +438,124 @@ return 0; } -unsigned int getCMSColorSpaceType(icColorSpaceSignature cs) +unsigned int getCMSColorSpaceType(cmsColorSpaceSignature cs) { switch (cs) { - case icSigXYZData: + case cmsSigXYZData: return PT_XYZ; break; - case icSigLabData: + case cmsSigLabData: return PT_Lab; break; - case icSigLuvData: + case cmsSigLuvData: return PT_YUV; break; - case icSigYCbCrData: + case cmsSigYCbCrData: return PT_YCbCr; break; - case icSigYxyData: + case cmsSigYxyData: return PT_Yxy; break; - case icSigRgbData: + case cmsSigRgbData: return PT_RGB; break; - case icSigGrayData: + case cmsSigGrayData: return PT_GRAY; break; - case icSigHsvData: + case cmsSigHsvData: return PT_HSV; break; - case icSigHlsData: + case cmsSigHlsData: return PT_HLS; break; - case icSigCmykData: + case cmsSigCmykData: return PT_CMYK; break; - case icSigCmyData: + case cmsSigCmyData: return PT_CMY; break; - case icSig2colorData: - case icSig3colorData: - case icSig4colorData: - case icSig5colorData: - case icSig6colorData: - case icSig7colorData: - case icSig8colorData: - case icSig9colorData: - case icSig10colorData: - case icSig11colorData: - case icSig12colorData: - case icSig13colorData: - case icSig14colorData: - case icSig15colorData: + case cmsSig2colorData: + case cmsSig3colorData: + case cmsSig4colorData: + case cmsSig5colorData: + case cmsSig6colorData: + case cmsSig7colorData: + case cmsSig8colorData: + case cmsSig9colorData: + case cmsSig10colorData: + case cmsSig11colorData: + case cmsSig12colorData: + case cmsSig13colorData: + case cmsSig14colorData: + case cmsSig15colorData: default: break; } return PT_RGB; } -unsigned int getCMSNChannels(icColorSpaceSignature cs) +unsigned int getCMSNChannels(cmsColorSpaceSignature cs) { switch (cs) { - case icSigXYZData: - case icSigLuvData: - case icSigLabData: - case icSigYCbCrData: - case icSigYxyData: - case icSigRgbData: - case icSigHsvData: - case icSigHlsData: - case icSigCmyData: - case icSig3colorData: + case cmsSigXYZData: + case cmsSigLuvData: + case cmsSigLabData: + case cmsSigYCbCrData: + case cmsSigYxyData: + case cmsSigRgbData: + case cmsSigHsvData: + case cmsSigHlsData: + case cmsSigCmyData: + case cmsSig3colorData: return 3; break; - case icSigGrayData: + case cmsSigGrayData: return 1; break; - case icSigCmykData: - case icSig4colorData: + case cmsSigCmykData: + case cmsSig4colorData: return 4; break; - case icSig2colorData: + case cmsSig2colorData: return 2; break; - case icSig5colorData: + case cmsSig5colorData: return 5; break; - case icSig6colorData: + case cmsSig6colorData: return 6; break; - case icSig7colorData: + case cmsSig7colorData: return 7; break; - case icSig8colorData: + case cmsSig8colorData: return 8; break; - case icSig9colorData: + case cmsSig9colorData: return 9; break; - case icSig10colorData: + case cmsSig10colorData: return 10; break; - case icSig11colorData: + case cmsSig11colorData: return 11; break; - case icSig12colorData: + case cmsSig12colorData: return 12; break; - case icSig13colorData: + case cmsSig13colorData: return 13; break; - case icSig14colorData: + case cmsSig14colorData: return 14; break; - case icSig15colorData: + case cmsSig15colorData: return 15; default: break; } return 3; } - #endif //------------------------------------------------------------------------ @@ -607,7 +659,7 @@ arr->get(1, &obj1); if (!obj1.isDict()) { - error(-1, "Bad CalGray color space"); + error(errSyntaxWarning, -1, "Bad CalGray color space"); obj1.free(); return NULL; } @@ -904,7 +956,7 @@ arr->get(1, &obj1); if (!obj1.isDict()) { - error(-1, "Bad CalRGB color space"); + error(errSyntaxWarning, -1, "Bad CalRGB color space"); obj1.free(); return NULL; } @@ -1234,7 +1286,7 @@ arr->get(1, &obj1); if (!obj1.isDict()) { - error(-1, "Bad Lab color space"); + error(errSyntaxWarning, -1, "Bad Lab color space"); obj1.free(); return NULL; } @@ -1520,7 +1572,7 @@ return cs; } -GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, Gfx *gfx) { +GfxColorSpace *GfxICCBasedColorSpace::parse(Array *arr, Gfx *gfx, int recursion) { GfxICCBasedColorSpace *cs; Ref iccProfileStreamA; int nCompsA; @@ -1529,6 +1581,10 @@ Object obj1, obj2, obj3; int i; + if (arr->getLength() < 2) { + error(errSyntaxError, -1, "Bad ICCBased color space"); + return NULL; + } arr->getNF(1, &obj1); if (obj1.isRef()) { iccProfileStreamA = obj1.getRef(); @@ -1551,26 +1607,27 @@ #endif arr->get(1, &obj1); if (!obj1.isStream()) { - error(-1, "Bad ICCBased color space (stream)"); + error(errSyntaxWarning, -1, "Bad ICCBased color space (stream)"); obj1.free(); return NULL; } dict = obj1.streamGetDict(); if (!dict->lookup("N", &obj2)->isInt()) { - error(-1, "Bad ICCBased color space (N)"); + error(errSyntaxWarning, -1, "Bad ICCBased color space (N)"); obj2.free(); obj1.free(); return NULL; } nCompsA = obj2.getInt(); obj2.free(); - if (nCompsA > gfxColorMaxComps) { - error(-1, "ICCBased color space with too many (%d > %d) components", - nCompsA, gfxColorMaxComps); - nCompsA = gfxColorMaxComps; + if (nCompsA > 4) { + error(errSyntaxError, -1, + "ICCBased color space with too many ({0:d} > 4) components", + nCompsA); + nCompsA = 4; } if (dict->lookup("Alternate", &obj2)->isNull() || - !(altA = GfxColorSpace::parse(&obj2, gfx))) { + !(altA = GfxColorSpace::parse(&obj2, gfx, recursion + 1))) { switch (nCompsA) { case 1: altA = new GfxDeviceGrayColorSpace(); @@ -1582,7 +1639,7 @@ altA = new GfxDeviceCMYKColorSpace(); break; default: - error(-1, "Bad ICCBased color space - invalid N"); + error(errSyntaxWarning, -1, "Bad ICCBased color space - invalid N"); obj2.free(); obj1.free(); return NULL; @@ -1618,7 +1675,7 @@ cmsHPROFILE hp = cmsOpenProfileFromMem(profBuf,length); gfree(profBuf); if (hp == 0) { - error(-1, "read ICCBased color space profile error"); + error(errSyntaxWarning, -1, "read ICCBased color space profile error"); } else { cmsHPROFILE dhp = displayProfile; if (dhp == NULL) dhp = RGBProfile; @@ -1631,8 +1688,8 @@ dhp, COLORSPACE_SH(dcst) | CHANNELS_SH(dNChannels) | BYTES_SH(1), - INTENT_RELATIVE_COLORIMETRIC,0)) == 0) { - error(-1, "Can't create transform"); + INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) { + error(errSyntaxWarning, -1, "Can't create transform"); cs->transform = NULL; } else { cs->transform = new GfxColorTransform(transform); @@ -1641,8 +1698,8 @@ // create line transform only when the display is RGB type color space if ((transform = cmsCreateTransform(hp, CHANNELS_SH(nCompsA) | BYTES_SH(1),dhp, - TYPE_RGB_8,INTENT_RELATIVE_COLORIMETRIC,0)) == 0) { - error(-1, "Can't create transform"); + TYPE_RGB_8,INTENT_RELATIVE_COLORIMETRIC,LCMS_FLAGS)) == 0) { + error(errSyntaxWarning, -1, "Can't create transform"); cs->lineTransform = NULL; } else { cs->lineTransform = new GfxColorTransform(transform); @@ -1854,6 +1911,7 @@ indexHigh = indexHighA; lookup = (Guchar *)gmallocn((indexHigh + 1) * base->getNComps(), sizeof(Guchar)); + overprintMask = base->getOverprintMask(); } GfxIndexedColorSpace::~GfxIndexedColorSpace() { @@ -1870,7 +1928,7 @@ return cs; } -GfxColorSpace *GfxIndexedColorSpace::parse(Array *arr, Gfx *gfx) { +GfxColorSpace *GfxIndexedColorSpace::parse(Array *arr, Gfx *gfx, int recursion) { GfxIndexedColorSpace *cs; GfxColorSpace *baseA; int indexHighA; @@ -1879,17 +1937,17 @@ int n, i, j; if (arr->getLength() != 4) { - error(-1, "Bad Indexed color space"); + error(errSyntaxWarning, -1, "Bad Indexed color space"); goto err1; } arr->get(1, &obj1); - if (!(baseA = GfxColorSpace::parse(&obj1, gfx))) { - error(-1, "Bad Indexed color space (base color space)"); + if (!(baseA = GfxColorSpace::parse(&obj1, gfx, recursion + 1))) { + error(errSyntaxWarning, -1, "Bad Indexed color space (base color space)"); goto err2; } obj1.free(); if (!arr->get(2, &obj1)->isInt()) { - error(-1, "Bad Indexed color space (hival)"); + error(errSyntaxWarning, -1, "Bad Indexed color space (hival)"); delete baseA; goto err2; } @@ -1902,7 +1960,7 @@ int previousValue = indexHighA; if (indexHighA < 0) indexHighA = 0; else indexHighA = 255; - error(-1, "Bad Indexed color space (invalid indexHigh value, was %d using %d to try to recover)", previousValue, indexHighA); + error(errSyntaxWarning, -1, "Bad Indexed color space (invalid indexHigh value, was {0:d} using {1:d} to try to recover)", previousValue, indexHighA); } obj1.free(); cs = new GfxIndexedColorSpace(baseA, indexHighA); @@ -1913,14 +1971,14 @@ for (i = 0; i <= indexHighA; ++i) { const int readChars = obj1.streamGetChars(n, &cs->lookup[i*n]); for (j = readChars; j < n; ++j) { - error(-1, "Bad Indexed color space (lookup table stream too short) padding with zeroes"); + error(errSyntaxWarning, -1, "Bad Indexed color space (lookup table stream too short) padding with zeroes"); cs->lookup[i*n + j] = 0; } } obj1.streamClose(); } else if (obj1.isString()) { if (obj1.getString()->getLength() < (indexHighA + 1) * n) { - error(-1, "Bad Indexed color space (lookup table string too short)"); + error(errSyntaxWarning, -1, "Bad Indexed color space (lookup table string too short)"); goto err3; } s = obj1.getString()->getCString(); @@ -1930,7 +1988,7 @@ } } } else { - error(-1, "Bad Indexed color space (lookup table)"); + error(errSyntaxWarning, -1, "Bad Indexed color space (lookup table)"); goto err3; } obj1.free(); @@ -1952,9 +2010,16 @@ n = base->getNComps(); base->getDefaultRanges(low, range, indexHigh); - p = &lookup[(int)(colToDbl(color->c[0]) + 0.5) * n]; - for (i = 0; i < n; ++i) { - baseColor->c[i] = dblToCol(low[i] + (p[i] / 255.0) * range[i]); + const int idx = (int)(colToDbl(color->c[0]) + 0.5) * n; + if (likely(idx + n < (indexHigh + 1) * base->getNComps())) { + p = &lookup[idx]; + for (i = 0; i < n; ++i) { + baseColor->c[i] = dblToCol(low[i] + (p[i] / 255.0) * range[i]); + } + } else { + for (i = 0; i < n; ++i) { + baseColor->c[i] = 0; + } } return baseColor; } @@ -2046,6 +2111,27 @@ alt = altA; func = funcA; nonMarking = !name->cmp("None"); + if (!name->cmp("Cyan")) { + overprintMask = 0x01; + } else if (!name->cmp("Magenta")) { + overprintMask = 0x02; + } else if (!name->cmp("Yellow")) { + overprintMask = 0x04; + } else if (!name->cmp("Black")) { + overprintMask = 0x08; + } +} + +GfxSeparationColorSpace::GfxSeparationColorSpace(GooString *nameA, + GfxColorSpace *altA, + Function *funcA, + GBool nonMarkingA, + Guint overprintMaskA) { + name = nameA; + alt = altA; + func = funcA; + nonMarking = nonMarkingA; + overprintMask = overprintMaskA; } GfxSeparationColorSpace::~GfxSeparationColorSpace() { @@ -2055,11 +2141,12 @@ } GfxColorSpace *GfxSeparationColorSpace::copy() { - return new GfxSeparationColorSpace(name->copy(), alt->copy(), func->copy()); + return new GfxSeparationColorSpace(name->copy(), alt->copy(), func->copy(), + nonMarking, overprintMask); } //~ handle the 'All' and 'None' colorants -GfxColorSpace *GfxSeparationColorSpace::parse(Array *arr, Gfx *gfx) { +GfxColorSpace *GfxSeparationColorSpace::parse(Array *arr, Gfx *gfx, int recursion) { GfxSeparationColorSpace *cs; GooString *nameA; GfxColorSpace *altA; @@ -2067,18 +2154,18 @@ Object obj1; if (arr->getLength() != 4) { - error(-1, "Bad Separation color space"); + error(errSyntaxWarning, -1, "Bad Separation color space"); goto err1; } if (!arr->get(1, &obj1)->isName()) { - error(-1, "Bad Separation color space (name)"); + error(errSyntaxWarning, -1, "Bad Separation color space (name)"); goto err2; } nameA = new GooString(obj1.getName()); obj1.free(); arr->get(2, &obj1); - if (!(altA = GfxColorSpace::parse(&obj1, gfx))) { - error(-1, "Bad Separation color space (alternate color space)"); + if (!(altA = GfxColorSpace::parse(&obj1, gfx, recursion + 1))) { + error(errSyntaxWarning, -1, "Bad Separation color space (alternate color space)"); goto err3; } obj1.free(); @@ -2086,10 +2173,16 @@ if (!(funcA = Function::parse(&obj1))) { goto err4; } + if (funcA->getInputSize() != 1) { + error(errSyntaxWarning, -1, "Bad SeparationColorSpace function"); + goto err5; + } obj1.free(); cs = new GfxSeparationColorSpace(nameA, altA, funcA); return cs; + err5: + delete funcA; err4: delete altA; err3: @@ -2151,12 +2244,51 @@ //------------------------------------------------------------------------ GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA, + GooString **namesA, GfxColorSpace *altA, Function *funcA) { + int i; + + nComps = nCompsA; + alt = altA; + func = funcA; + nonMarking = gTrue; + overprintMask = 0; + for (i = 0; i < nComps; ++i) { + names[i] = namesA[i]; + if (names[i]->cmp("None")) { + nonMarking = gFalse; + } + if (!names[i]->cmp("Cyan")) { + overprintMask |= 0x01; + } else if (!names[i]->cmp("Magenta")) { + overprintMask |= 0x02; + } else if (!names[i]->cmp("Yellow")) { + overprintMask |= 0x04; + } else if (!names[i]->cmp("Black")) { + overprintMask |= 0x08; + } else { + overprintMask = 0x0f; + } + } +} + +GfxDeviceNColorSpace::GfxDeviceNColorSpace(int nCompsA, + GooString **namesA, + GfxColorSpace *altA, + Function *funcA, + GBool nonMarkingA, + Guint overprintMaskA) { + int i; + nComps = nCompsA; alt = altA; func = funcA; - nonMarking = gFalse; + nonMarking = nonMarkingA; + overprintMask = overprintMaskA; + for (i = 0; i < nComps; ++i) { + names[i] = namesA[i]->copy(); + } } GfxDeviceNColorSpace::~GfxDeviceNColorSpace() { @@ -2170,19 +2302,12 @@ } GfxColorSpace *GfxDeviceNColorSpace::copy() { - GfxDeviceNColorSpace *cs; - int i; - - cs = new GfxDeviceNColorSpace(nComps, alt->copy(), func->copy()); - for (i = 0; i < nComps; ++i) { - cs->names[i] = names[i]->copy(); - } - cs->nonMarking = nonMarking; - return cs; + return new GfxDeviceNColorSpace(nComps, names, alt->copy(), func->copy(), + nonMarking, overprintMask); } //~ handle the 'None' colorant -GfxColorSpace *GfxDeviceNColorSpace::parse(Array *arr, Gfx *gfx) { +GfxColorSpace *GfxDeviceNColorSpace::parse(Array *arr, Gfx *gfx, int recursion) { GfxDeviceNColorSpace *cs; int nCompsA; GooString *namesA[gfxColorMaxComps]; @@ -2192,22 +2317,22 @@ int i; if (arr->getLength() != 4 && arr->getLength() != 5) { - error(-1, "Bad DeviceN color space"); + error(errSyntaxWarning, -1, "Bad DeviceN color space"); goto err1; } if (!arr->get(1, &obj1)->isArray()) { - error(-1, "Bad DeviceN color space (names)"); + error(errSyntaxWarning, -1, "Bad DeviceN color space (names)"); goto err2; } nCompsA = obj1.arrayGetLength(); if (nCompsA > gfxColorMaxComps) { - error(-1, "DeviceN color space with too many (%d > %d) components", + error(errSyntaxWarning, -1, "DeviceN color space with too many ({0:d} > {1:d}) components", nCompsA, gfxColorMaxComps); nCompsA = gfxColorMaxComps; } for (i = 0; i < nCompsA; ++i) { if (!obj1.arrayGet(i, &obj2)->isName()) { - error(-1, "Bad DeviceN color space (names)"); + error(errSyntaxWarning, -1, "Bad DeviceN color space (names)"); obj2.free(); goto err2; } @@ -2216,8 +2341,8 @@ } obj1.free(); arr->get(2, &obj1); - if (!(altA = GfxColorSpace::parse(&obj1, gfx))) { - error(-1, "Bad DeviceN color space (alternate color space)"); + if (!(altA = GfxColorSpace::parse(&obj1, gfx, recursion + 1))) { + error(errSyntaxWarning, -1, "Bad DeviceN color space (alternate color space)"); goto err3; } obj1.free(); @@ -2226,14 +2351,7 @@ goto err4; } obj1.free(); - cs = new GfxDeviceNColorSpace(nCompsA, altA, funcA); - cs->nonMarking = gTrue; - for (i = 0; i < nCompsA; ++i) { - cs->names[i] = namesA[i]; - if (namesA[i]->cmp("None")) { - cs->nonMarking = gFalse; - } - } + cs = new GfxDeviceNColorSpace(nCompsA, namesA, altA, funcA); return cs; err4: @@ -2320,20 +2438,20 @@ (GfxColorSpace *)NULL); } -GfxColorSpace *GfxPatternColorSpace::parse(Array *arr, Gfx *gfx) { +GfxColorSpace *GfxPatternColorSpace::parse(Array *arr, Gfx *gfx, int recursion) { GfxPatternColorSpace *cs; GfxColorSpace *underA; Object obj1; if (arr->getLength() != 1 && arr->getLength() != 2) { - error(-1, "Bad Pattern color space"); + error(errSyntaxWarning, -1, "Bad Pattern color space"); return NULL; } underA = NULL; if (arr->getLength() == 2) { arr->get(1, &obj1); - if (!(underA = GfxColorSpace::parse(&obj1, gfx))) { - error(-1, "Bad Pattern color space (underlying color space)"); + if (!(underA = GfxColorSpace::parse(&obj1, gfx, recursion + 1))) { + error(errSyntaxWarning, -1, "Bad Pattern color space (underlying color space)"); obj1.free(); return NULL; } @@ -2415,14 +2533,14 @@ paintTypeA = obj1.getInt(); } else { paintTypeA = 1; - error(-1, "Invalid or missing PaintType in pattern"); + error(errSyntaxWarning, -1, "Invalid or missing PaintType in pattern"); } obj1.free(); if (dict->lookup("TilingType", &obj1)->isInt()) { tilingTypeA = obj1.getInt(); } else { tilingTypeA = 1; - error(-1, "Invalid or missing TilingType in pattern"); + error(errSyntaxWarning, -1, "Invalid or missing TilingType in pattern"); } obj1.free(); bboxA[0] = bboxA[1] = 0; @@ -2436,27 +2554,27 @@ obj2.free(); } } else { - error(-1, "Invalid or missing BBox in pattern"); + error(errSyntaxWarning, -1, "Invalid or missing BBox in pattern"); } obj1.free(); if (dict->lookup("XStep", &obj1)->isNum()) { xStepA = obj1.getNum(); } else { xStepA = 1; - error(-1, "Invalid or missing XStep in pattern"); + error(errSyntaxWarning, -1, "Invalid or missing XStep in pattern"); } obj1.free(); if (dict->lookup("YStep", &obj1)->isNum()) { yStepA = obj1.getNum(); } else { yStepA = 1; - error(-1, "Invalid or missing YStep in pattern"); + error(errSyntaxWarning, -1, "Invalid or missing YStep in pattern"); } obj1.free(); if (!dict->lookup("Resources", &resDictA)->isDict()) { resDictA.free(); resDictA.initNull(); - error(-1, "Invalid or missing Resources in pattern"); + error(errSyntaxWarning, -1, "Invalid or missing Resources in pattern"); } matrixA[0] = 1; matrixA[1] = 0; matrixA[2] = 0; matrixA[3] = 1; @@ -2615,7 +2733,7 @@ } if (!dict->lookup("ShadingType", &obj1)->isInt()) { - error(-1, "Invalid ShadingType in shading dictionary"); + error(errSyntaxWarning, -1, "Invalid ShadingType in shading dictionary"); obj1.free(); return NULL; } @@ -2636,7 +2754,7 @@ if (obj->isStream()) { shading = GfxGouraudTriangleShading::parse(4, dict, obj->getStream(), gfx); } else { - error(-1, "Invalid Type 4 shading object"); + error(errSyntaxWarning, -1, "Invalid Type 4 shading object"); goto err1; } break; @@ -2644,7 +2762,7 @@ if (obj->isStream()) { shading = GfxGouraudTriangleShading::parse(5, dict, obj->getStream(), gfx); } else { - error(-1, "Invalid Type 5 shading object"); + error(errSyntaxWarning, -1, "Invalid Type 5 shading object"); goto err1; } break; @@ -2652,7 +2770,7 @@ if (obj->isStream()) { shading = GfxPatchMeshShading::parse(6, dict, obj->getStream(), gfx); } else { - error(-1, "Invalid Type 6 shading object"); + error(errSyntaxWarning, -1, "Invalid Type 6 shading object"); goto err1; } break; @@ -2660,12 +2778,12 @@ if (obj->isStream()) { shading = GfxPatchMeshShading::parse(7, dict, obj->getStream(), gfx); } else { - error(-1, "Invalid Type 7 shading object"); + error(errSyntaxWarning, -1, "Invalid Type 7 shading object"); goto err1; } break; default: - error(-1, "Unimplemented shading type %d", typeA); + error(errSyntaxWarning, -1, "Unimplemented shading type {0:d}", typeA); goto err1; } @@ -2681,7 +2799,7 @@ dict->lookup("ColorSpace", &obj1); if (!(colorSpace = GfxColorSpace::parse(&obj1, gfx))) { - error(-1, "Bad color space in shading dictionary"); + error(errSyntaxWarning, -1, "Bad color space in shading dictionary"); obj1.free(); return gFalse; } @@ -2699,7 +2817,7 @@ obj2.free(); } } else { - error(-1, "Bad Background in shading dictionary"); + error(errSyntaxWarning, -1, "Bad Background in shading dictionary"); } } obj1.free(); @@ -2721,14 +2839,14 @@ xMax = obj4.getNum(); yMax = obj5.getNum(); } else { - error(-1, "Bad BBox in shading dictionary (Values not numbers)"); + error(errSyntaxWarning, -1, "Bad BBox in shading dictionary (Values not numbers)"); } obj2.free(); obj3.free(); obj4.free(); obj5.free(); } else { - error(-1, "Bad BBox in shading dictionary"); + error(errSyntaxWarning, -1, "Bad BBox in shading dictionary"); } } obj1.free(); @@ -2835,7 +2953,7 @@ if (obj1.isArray()) { nFuncsA = obj1.arrayGetLength(); if (nFuncsA > gfxColorMaxComps) { - error(-1, "Invalid Function array in shading dictionary"); + error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); goto err1; } for (i = 0; i < nFuncsA; ++i) { @@ -2984,6 +3102,10 @@ out[i] = 0; } for (i = 0; i < nFuncs; ++i) { + if (funcs[i]->getInputSize() != 1) { + error(errSyntaxWarning, -1, "Invalid shading function (input != 1)"); + break; + } funcs[i]->transform(&t, &out[i]); } } @@ -3131,7 +3253,7 @@ obj4.free(); obj5.free(); } else { - error(-1, "Missing or invalid Coords in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid Coords in shading dictionary"); goto err1; } obj1.free(); @@ -3155,8 +3277,8 @@ dict->lookup("Function", &obj1); if (obj1.isArray()) { nFuncsA = obj1.arrayGetLength(); - if (nFuncsA > gfxColorMaxComps) { - error(-1, "Invalid Function array in shading dictionary"); + if (nFuncsA > gfxColorMaxComps || nFuncsA == 0) { + error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); goto err1; } for (i = 0; i < nFuncsA; ++i) { @@ -3180,9 +3302,19 @@ extend0A = extend1A = gFalse; if (dict->lookup("Extend", &obj1)->isArray() && obj1.arrayGetLength() == 2) { - extend0A = obj1.arrayGet(0, &obj2)->getBool(); + obj1.arrayGet(0, &obj2); + if (obj2.isBool()) { + extend0A = obj2.getBool(); + } else { + error(errSyntaxWarning, -1, "Invalid axial shading extend (0)"); + } obj2.free(); - extend1A = obj1.arrayGet(1, &obj2)->getBool(); + obj1.arrayGet(1, &obj2); + if (obj2.isBool()) { + extend1A = obj2.getBool(); + } else { + error(errSyntaxWarning, -1, "Invalid axial shading extend (1)"); + } obj2.free(); } obj1.free(); @@ -3326,7 +3458,7 @@ r1A = obj1.arrayGet(5, &obj2)->getNum(); obj2.free(); } else { - error(-1, "Missing or invalid Coords in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid Coords in shading dictionary"); goto err1; } obj1.free(); @@ -3346,7 +3478,7 @@ if (obj1.isArray()) { nFuncsA = obj1.arrayGetLength(); if (nFuncsA > gfxColorMaxComps) { - error(-1, "Invalid Function array in shading dictionary"); + error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); goto err1; } for (i = 0; i < nFuncsA; ++i) { @@ -3844,14 +3976,14 @@ if (dict->lookup("BitsPerCoordinate", &obj1)->isInt()) { coordBits = obj1.getInt(); } else { - error(-1, "Missing or invalid BitsPerCoordinate in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid BitsPerCoordinate in shading dictionary"); goto err2; } obj1.free(); if (dict->lookup("BitsPerComponent", &obj1)->isInt()) { compBits = obj1.getInt(); } else { - error(-1, "Missing or invalid BitsPerComponent in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid BitsPerComponent in shading dictionary"); goto err2; } obj1.free(); @@ -3860,7 +3992,7 @@ if (dict->lookup("BitsPerFlag", &obj1)->isInt()) { flagBits = obj1.getInt(); } else { - error(-1, "Missing or invalid BitsPerFlag in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid BitsPerFlag in shading dictionary"); goto err2; } obj1.free(); @@ -3868,7 +4000,7 @@ if (dict->lookup("VerticesPerRow", &obj1)->isInt()) { vertsPerRow = obj1.getInt(); } else { - error(-1, "Missing or invalid VerticesPerRow in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid VerticesPerRow in shading dictionary"); goto err2; } obj1.free(); @@ -3894,7 +4026,7 @@ } nComps = i; } else { - error(-1, "Missing or invalid Decode array in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid Decode array in shading dictionary"); goto err2; } obj1.free(); @@ -3903,7 +4035,7 @@ if (obj1.isArray()) { nFuncsA = obj1.arrayGetLength(); if (nFuncsA > gfxColorMaxComps) { - error(-1, "Invalid Function array in shading dictionary"); + error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); goto err1; } for (i = 0; i < nFuncsA; ++i) { @@ -4181,7 +4313,7 @@ double x[16], y[16]; Guint xi, yi; double c[4][gfxColorMaxComps]; - Guint ci[4]; + Guint ci; GfxShadingBitBuf *bitBuf; Object obj1, obj2; int i, j; @@ -4189,21 +4321,21 @@ if (dict->lookup("BitsPerCoordinate", &obj1)->isInt()) { coordBits = obj1.getInt(); } else { - error(-1, "Missing or invalid BitsPerCoordinate in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid BitsPerCoordinate in shading dictionary"); goto err2; } obj1.free(); if (dict->lookup("BitsPerComponent", &obj1)->isInt()) { compBits = obj1.getInt(); } else { - error(-1, "Missing or invalid BitsPerComponent in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid BitsPerComponent in shading dictionary"); goto err2; } obj1.free(); if (dict->lookup("BitsPerFlag", &obj1)->isInt()) { flagBits = obj1.getInt(); } else { - error(-1, "Missing or invalid BitsPerFlag in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid BitsPerFlag in shading dictionary"); goto err2; } obj1.free(); @@ -4228,7 +4360,7 @@ } nComps = i; } else { - error(-1, "Missing or invalid Decode array in shading dictionary"); + error(errSyntaxWarning, -1, "Missing or invalid Decode array in shading dictionary"); goto err2; } obj1.free(); @@ -4237,7 +4369,7 @@ if (obj1.isArray()) { nFuncsA = obj1.arrayGetLength(); if (nFuncsA > gfxColorMaxComps) { - error(-1, "Invalid Function array in shading dictionary"); + error(errSyntaxWarning, -1, "Invalid Function array in shading dictionary"); goto err1; } for (i = 0; i < nFuncsA; ++i) { @@ -4299,10 +4431,10 @@ } for (i = 0; i < nColors; ++i) { for (j = 0; j < nComps; ++j) { - if (!bitBuf->getBits(compBits, &ci[j])) { + if (!bitBuf->getBits(compBits, &ci)) { break; } - c[i][j] = cMin[j] + cMul[j] * (double)ci[j]; + c[i][j] = cMin[j] + cMul[j] * (double)ci; if( nFuncsA == 0 ) { // ... and colorspace values can also be stored into doubles. // They will be casted later. @@ -4359,6 +4491,9 @@ } break; case 1: + if (nPatchesA == 0) { + goto err1; + } p->x[0][0] = patchesA[nPatchesA-1].x[0][3]; p->y[0][0] = patchesA[nPatchesA-1].y[0][3]; p->x[0][1] = patchesA[nPatchesA-1].x[1][3]; @@ -4391,6 +4526,9 @@ } break; case 2: + if (nPatchesA == 0) { + goto err1; + } p->x[0][0] = patchesA[nPatchesA-1].x[3][3]; p->y[0][0] = patchesA[nPatchesA-1].y[3][3]; p->x[0][1] = patchesA[nPatchesA-1].x[3][2]; @@ -4423,6 +4561,9 @@ } break; case 3: + if (nPatchesA == 0) { + goto err1; + } p->x[0][0] = patchesA[nPatchesA-1].x[3][0]; p->y[0][0] = patchesA[nPatchesA-1].y[3][0]; p->x[0][1] = patchesA[nPatchesA-1].x[2][0]; @@ -4498,6 +4639,9 @@ } break; case 1: + if (nPatchesA == 0) { + goto err1; + } p->x[0][0] = patchesA[nPatchesA-1].x[0][3]; p->y[0][0] = patchesA[nPatchesA-1].y[0][3]; p->x[0][1] = patchesA[nPatchesA-1].x[1][3]; @@ -4538,6 +4682,9 @@ } break; case 2: + if (nPatchesA == 0) { + goto err1; + } p->x[0][0] = patchesA[nPatchesA-1].x[3][3]; p->y[0][0] = patchesA[nPatchesA-1].y[3][3]; p->x[0][1] = patchesA[nPatchesA-1].x[3][2]; @@ -4578,6 +4725,9 @@ } break; case 3: + if (nPatchesA == 0) { + goto err1; + } p->x[0][0] = patchesA[nPatchesA-1].x[3][0]; p->y[0][0] = patchesA[nPatchesA-1].y[3][0]; p->x[0][1] = patchesA[nPatchesA-1].x[2][0]; @@ -4708,7 +4858,7 @@ GfxIndexedColorSpace *indexedCS; GfxSeparationColorSpace *sepCS; int maxPixel, indexHigh; - Guchar *lookup2; + Guchar *indexedLookup; Function *sepFunc; Object obj; double x[gfxColorMaxComps]; @@ -4733,6 +4883,7 @@ // initialize for (k = 0; k < gfxColorMaxComps; ++k) { lookup[k] = NULL; + lookup2[k] = NULL; } byte_lookup = NULL; @@ -4742,9 +4893,13 @@ colorSpace->getDefaultRanges(decodeLow, decodeRange, maxPixel); } else if (decode->isArray()) { nComps = decode->arrayGetLength() / 2; - if (nComps != colorSpace->getNComps()) { + if (nComps < colorSpace->getNComps()) { goto err1; } + if (nComps > colorSpace->getNComps()) { + error(errSyntaxWarning, -1, "Too many elements in Decode array"); + nComps = colorSpace->getNComps(); + } for (i = 0; i < nComps; ++i) { decode->arrayGet(2*i, &obj); if (!obj.isNum()) { @@ -4766,10 +4921,18 @@ // Construct a lookup table -- this stores pre-computed decoded // values for each component, i.e., the result of applying the // decode mapping to each possible image pixel component value. - // + for (k = 0; k < nComps; ++k) { + lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1, + sizeof(GfxColorComp)); + for (i = 0; i <= maxPixel; ++i) { + lookup[k][i] = dblToCol(decodeLow[k] + + (i * decodeRange[k]) / maxPixel); + } + } + // Optimization: for Indexed and Separation color spaces (which have - // only one component), we store color values in the lookup table - // rather than component values. + // only one component), we pre-compute a second lookup table with + // color values colorSpace2 = NULL; nComps2 = 0; useByteLookup = gFalse; @@ -4782,14 +4945,14 @@ colorSpace2 = indexedCS->getBase(); indexHigh = indexedCS->getIndexHigh(); nComps2 = colorSpace2->getNComps(); - lookup2 = indexedCS->getLookup(); + indexedLookup = indexedCS->getLookup(); colorSpace2->getDefaultRanges(x, y, indexHigh); if (colorSpace2->useGetGrayLine() || colorSpace2->useGetRGBLine()) { byte_lookup = (Guchar *)gmallocn ((maxPixel + 1), nComps2); useByteLookup = gTrue; } for (k = 0; k < nComps2; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1, + lookup2[k] = (GfxColorComp *)gmallocn(maxPixel + 1, sizeof(GfxColorComp)); for (i = 0; i <= maxPixel; ++i) { j = (int)(decodeLow[0] + (i * decodeRange[0]) / maxPixel + 0.5); @@ -4799,8 +4962,8 @@ j = indexHigh; } - mapped = x[k] + (lookup2[j*nComps2 + k] / 255.0) * y[k]; - lookup[k][i] = dblToCol(mapped); + mapped = x[k] + (indexedLookup[j*nComps2 + k] / 255.0) * y[k]; + lookup2[k][i] = dblToCol(mapped); if (useByteLookup) byte_lookup[i * nComps2 + k] = (Guchar) (mapped * 255); } @@ -4816,12 +4979,12 @@ useByteLookup = gTrue; } for (k = 0; k < nComps2; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1, + lookup2[k] = (GfxColorComp *)gmallocn(maxPixel + 1, sizeof(GfxColorComp)); for (i = 0; i <= maxPixel; ++i) { x[0] = decodeLow[0] + (i * decodeRange[0]) / maxPixel; sepFunc->transform(x, y); - lookup[k][i] = dblToCol(y[k]); + lookup2[k][i] = dblToCol(y[k]); if (useByteLookup) byte_lookup[i*nComps2 + k] = (Guchar) (y[k] * 255); } @@ -4833,11 +4996,11 @@ useByteLookup = gTrue; } for (k = 0; k < nComps; ++k) { - lookup[k] = (GfxColorComp *)gmallocn(maxPixel + 1, + lookup2[k] = (GfxColorComp *)gmallocn(maxPixel + 1, sizeof(GfxColorComp)); for (i = 0; i <= maxPixel; ++i) { mapped = decodeLow[k] + (i * decodeRange[k]) / maxPixel; - lookup[k][i] = dblToCol(mapped); + lookup2[k][i] = dblToCol(mapped); if (useByteLookup) { int byte; @@ -4909,6 +5072,7 @@ delete colorSpace; for (i = 0; i < gfxColorMaxComps; ++i) { gfree(lookup[i]); + gfree(lookup2[i]); } gfree(byte_lookup); } @@ -4919,12 +5083,12 @@ if (colorSpace2) { for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup[i][x[0]]; + color.c[i] = lookup2[i][x[0]]; } colorSpace2->getGray(&color, gray); } else { for (i = 0; i < nComps; ++i) { - color.c[i] = lookup[i][x[i]]; + color.c[i] = lookup2[i][x[i]]; } colorSpace->getGray(&color, gray); } @@ -4936,12 +5100,12 @@ if (colorSpace2) { for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup[i][x[0]]; + color.c[i] = lookup2[i][x[0]]; } colorSpace2->getRGB(&color, rgb); } else { for (i = 0; i < nComps; ++i) { - color.c[i] = lookup[i][x[i]]; + color.c[i] = lookup2[i][x[i]]; } colorSpace->getRGB(&color, rgb); } @@ -5130,7 +5294,7 @@ if (colorSpace2) { for (i = 0; i < nComps2; ++i) { - color.c[i] = lookup[i][x[0]]; + color.c[i] = lookup2[i][x[0]]; } colorSpace2->getCMYK(&color, cmyk); } else { @@ -5187,7 +5351,7 @@ void GfxSubpath::lineTo(double x1, double y1) { if (n >= size) { - size += 16; + size *= 2; x = (double *)greallocn(x, size, sizeof(double)); y = (double *)greallocn(y, size, sizeof(double)); curve = (GBool *)greallocn(curve, size, sizeof(GBool)); @@ -5201,7 +5365,7 @@ void GfxSubpath::curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { if (n+3 > size) { - size += 16; + size *= 2; x = (double *)greallocn(x, size, sizeof(double)); y = (double *)greallocn(y, size, sizeof(double)); curve = (GBool *)greallocn(curve, size, sizeof(GBool)); @@ -5271,13 +5435,18 @@ } void GfxPath::lineTo(double x, double y) { - if (justMoved) { + if (justMoved || (n > 0 && subpaths[n-1]->isClosed())) { if (n >= size) { - size += 16; + size *= 2; subpaths = (GfxSubpath **) greallocn(subpaths, size, sizeof(GfxSubpath *)); } - subpaths[n] = new GfxSubpath(firstX, firstY); + if (justMoved) { + subpaths[n] = new GfxSubpath(firstX, firstY); + } else { + subpaths[n] = new GfxSubpath(subpaths[n-1]->getLastX(), + subpaths[n-1]->getLastY()); + } ++n; justMoved = gFalse; } @@ -5286,13 +5455,18 @@ void GfxPath::curveTo(double x1, double y1, double x2, double y2, double x3, double y3) { - if (justMoved) { + if (justMoved || (n > 0 && subpaths[n-1]->isClosed())) { if (n >= size) { - size += 16; + size *= 2; subpaths = (GfxSubpath **) greallocn(subpaths, size, sizeof(GfxSubpath *)); } - subpaths[n] = new GfxSubpath(firstX, firstY); + if (justMoved) { + subpaths[n] = new GfxSubpath(firstX, firstY); + } else { + subpaths[n] = new GfxSubpath(subpaths[n-1]->getLastX(), + subpaths[n-1]->getLastY()); + } ++n; justMoved = gFalse; } @@ -5304,7 +5478,7 @@ // moveto/closepath/clip, which defines an empty clipping region if (justMoved) { if (n >= size) { - size += 16; + size *= 2; subpaths = (GfxSubpath **) greallocn(subpaths, size, sizeof(GfxSubpath *)); } @@ -5455,6 +5629,8 @@ lineCap = 0; miterLimit = 10; strokeAdjust = gFalse; + alphaIsShape = gFalse; + textKnockout = gFalse; font = NULL; fontSize = 0; @@ -5508,16 +5684,13 @@ // this gets set to NULL by restore() delete path; } - if (saved) { - delete saved; - } if (font) { font->decRefCnt(); } } // Used for copy(); -GfxState::GfxState(GfxState *state) { +GfxState::GfxState(GfxState *state, GBool copyPath) { int i; memcpy(this, state, sizeof(GfxState)); @@ -5545,6 +5718,9 @@ if (font) font->incRefCnt(); + if (copyPath) { + path = state->path->copy(); + } saved = NULL; } @@ -5838,6 +6014,60 @@ } } +void GfxState::clipToRect(double xMin, double yMin, double xMax, double yMax) { + double x, y, xMin1, yMin1, xMax1, yMax1; + + transform(xMin, yMin, &x, &y); + xMin1 = xMax1 = x; + yMin1 = yMax1 = y; + transform(xMax, yMin, &x, &y); + if (x < xMin1) { + xMin1 = x; + } else if (x > xMax1) { + xMax1 = x; + } + if (y < yMin1) { + yMin1 = y; + } else if (y > yMax1) { + yMax1 = y; + } + transform(xMax, yMax, &x, &y); + if (x < xMin1) { + xMin1 = x; + } else if (x > xMax1) { + xMax1 = x; + } + if (y < yMin1) { + yMin1 = y; + } else if (y > yMax1) { + yMax1 = y; + } + transform(xMin, yMax, &x, &y); + if (x < xMin1) { + xMin1 = x; + } else if (x > xMax1) { + xMax1 = x; + } + if (y < yMin1) { + yMin1 = y; + } else if (y > yMax1) { + yMax1 = y; + } + + if (xMin1 > clipXMin) { + clipXMin = xMin1; + } + if (yMin1 > clipYMin) { + clipYMin = yMin1; + } + if (xMax1 < clipXMax) { + clipXMax = xMax1; + } + if (yMax1 < clipYMax) { + clipYMax = yMax1; + } +} + void GfxState::textShift(double tx, double ty) { double dx, dy; diff -Nru poppler-0.18.4/poppler/GfxState.h poppler-0.20.5/poppler/GfxState.h --- poppler-0.18.4/poppler/GfxState.h 2011-11-22 21:33:12.000000000 +0000 +++ poppler-0.20.5/poppler/GfxState.h 2012-05-10 20:05:44.000000000 +0000 @@ -196,16 +196,16 @@ virtual GfxColorSpaceMode getMode() = 0; // Construct a color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Object *csObj, Gfx *gfx); + static GfxColorSpace *parse(Object *csObj, Gfx *gfx, int recursion = 0); // Convert to gray, RGB, or CMYK. virtual void getGray(GfxColor *color, GfxGray *gray) = 0; virtual void getRGB(GfxColor *color, GfxRGB *rgb) = 0; virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk) = 0; - virtual void getGrayLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(-1, "GfxColorSpace::getGrayLine this should not happen"); } - virtual void getRGBLine(Guchar * /*in*/, unsigned int * /*out*/, int /*length*/) { error(-1, "GfxColorSpace::getRGBLine (first variant) this should not happen"); } - virtual void getRGBLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(-1, "GfxColorSpace::getRGBLine (second variant) this should not happen"); } - virtual void getRGBXLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(-1, "GfxColorSpace::getRGBXLine this should not happen"); } + virtual void getGrayLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getGrayLine this should not happen"); } + virtual void getRGBLine(Guchar * /*in*/, unsigned int * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getRGBLine (first variant) this should not happen"); } + virtual void getRGBLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getRGBLine (second variant) this should not happen"); } + virtual void getRGBXLine(Guchar * /*in*/, Guchar * /*out*/, int /*length*/) { error(errInternal, -1, "GfxColorSpace::getRGBXLine this should not happen"); } // Does this ColorSpace support getRGBLine? virtual GBool useGetRGBLine() { return gFalse; } @@ -227,11 +227,14 @@ // mark the page (e.g., the "None" colorant). virtual GBool isNonMarking() { return gFalse; } + // Return the color space's overprint mask. + Guint getOverprintMask() { return overprintMask; } + // Return the number of color space modes static int getNumColorSpaceModes(); // Return the name of the th color space mode. - static char *getColorSpaceModeName(int idx); + static const char *getColorSpaceModeName(int idx); #ifdef USE_CMS static int setupColorProfiles(); @@ -243,6 +246,9 @@ // result will be a cmsHPROFILE static void *getDisplayProfile(); #endif +protected: + + Guint overprintMask; }; //------------------------------------------------------------------------ @@ -473,7 +479,7 @@ virtual GfxColorSpaceMode getMode() { return csICCBased; } // Construct an ICCBased color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, Gfx *gfx); + static GfxColorSpace *parse(Array *arr, Gfx *gfx, int recursion); virtual void getGray(GfxColor *color, GfxGray *gray); virtual void getRGB(GfxColor *color, GfxRGB *rgb); @@ -517,8 +523,8 @@ virtual GfxColorSpace *copy(); virtual GfxColorSpaceMode getMode() { return csIndexed; } - // Construct a Lab color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, Gfx *gfx); + // Construct an Indexed color space. Returns NULL if unsuccessful. + static GfxColorSpace *parse(Array *arr, Gfx *gfx, int recursion); virtual void getGray(GfxColor *color, GfxGray *gray); virtual void getRGB(GfxColor *color, GfxRGB *rgb); @@ -562,7 +568,7 @@ virtual GfxColorSpaceMode getMode() { return csSeparation; } // Construct a Separation color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, Gfx *gfx); + static GfxColorSpace *parse(Array *arr, Gfx *gfx, int recursion); virtual void getGray(GfxColor *color, GfxGray *gray); virtual void getRGB(GfxColor *color, GfxRGB *rgb); @@ -580,6 +586,10 @@ private: + GfxSeparationColorSpace(GooString *nameA, GfxColorSpace *altA, + Function *funcA, GBool nonMarkingA, + Guint overprintMaskA); + GooString *name; // colorant name GfxColorSpace *alt; // alternate color space Function *func; // tint transform (into alternate color space) @@ -593,13 +603,14 @@ class GfxDeviceNColorSpace: public GfxColorSpace { public: - GfxDeviceNColorSpace(int nCompsA, GfxColorSpace *alt, Function *func); + GfxDeviceNColorSpace(int nCompsA, GooString **namesA, + GfxColorSpace *alt, Function *func); virtual ~GfxDeviceNColorSpace(); virtual GfxColorSpace *copy(); virtual GfxColorSpaceMode getMode() { return csDeviceN; } // Construct a DeviceN color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, Gfx *gfx); + static GfxColorSpace *parse(Array *arr, Gfx *gfx, int recursion); virtual void getGray(GfxColor *color, GfxGray *gray); virtual void getRGB(GfxColor *color, GfxRGB *rgb); @@ -617,6 +628,10 @@ private: + GfxDeviceNColorSpace(int nCompsA, GooString **namesA, + GfxColorSpace *alt, Function *func, + GBool nonMarkingA, Guint overprintMaskA); + int nComps; // number of components GooString // colorant names *names[gfxColorMaxComps]; @@ -638,7 +653,7 @@ virtual GfxColorSpaceMode getMode() { return csPattern; } // Construct a Pattern color space. Returns NULL if unsuccessful. - static GfxColorSpace *parse(Array *arr, Gfx *gfx); + static GfxColorSpace *parse(Array *arr, Gfx *gfx, int recursion); virtual void getGray(GfxColor *color, GfxGray *gray); virtual void getRGB(GfxColor *color, GfxRGB *rgb); @@ -1105,6 +1120,8 @@ int nComps2; // number of components in colorSpace2 GfxColorComp * // lookup table lookup[gfxColorMaxComps]; + GfxColorComp * // optimized case lookup table + lookup2[gfxColorMaxComps]; Guchar *byte_lookup; double // minimum values for each component decodeLow[gfxColorMaxComps]; @@ -1298,7 +1315,8 @@ ~GfxState(); // Copy. - GfxState *copy() { return new GfxState(this); } + GfxState *copy(GBool copyPath = gFalse) + { return new GfxState(this, copyPath); } // Accessors. double getHDPI() { return hDPI; } @@ -1450,6 +1468,7 @@ // Update clip region. void clip(); void clipToStrokePath(); + void clipToRect(double xMin, double yMin, double xMax, double yMax); // Text position. void textSetPos(double tx, double ty) { lineX = tx; lineY = ty; } @@ -1524,7 +1543,7 @@ GfxState *saved; // next GfxState on stack - GfxState(GfxState *state); + GfxState(GfxState *state, GBool copyPath); }; #endif diff -Nru poppler-0.18.4/poppler/GlobalParams.cc poppler-0.20.5/poppler/GlobalParams.cc --- poppler-0.18.4/poppler/GlobalParams.cc 2012-01-15 14:12:57.000000000 +0000 +++ poppler-0.20.5/poppler/GlobalParams.cc 2012-08-30 20:31:05.000000000 +0000 @@ -15,7 +15,7 @@ // // Copyright (C) 2005 Martin Kretzschmar // Copyright (C) 2005, 2006 Kristian Høgsberg -// Copyright (C) 2005, 2007-2010 Albert Astals Cid +// Copyright (C) 2005, 2007-2010, 2012 Albert Astals Cid // Copyright (C) 2005 Jonathan Blandford // Copyright (C) 2006, 2007 Jeff Muizelaar // Copyright (C) 2006 Takashi Iwai @@ -23,7 +23,7 @@ // Copyright (C) 2007 Krzysztof Kowalczyk // Copyright (C) 2007, 2009 Jonathan Kew // Copyright (C) 2009 Petr Gajdos -// Copyright (C) 2009, 2011 William Bader +// Copyright (C) 2009, 2011, 2012 William Bader // Copyright (C) 2009 Kovid Goyal // Copyright (C) 2010 Hib Eris // Copyright (C) 2010 Patrick Spendrin @@ -31,6 +31,9 @@ // Copyright (C) 2011 Pino Toscano // Copyright (C) 2011 Koji Otani // Copyright (C) 2012 Yi Yang +// Copyright (C) 2012 Adrian Johnson +// Copyright (C) 2012 Thomas Freitag +// Copyright (C) 2012 Peter Breitenlohner // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -123,37 +126,21 @@ GlobalParams *globalParams = NULL; //------------------------------------------------------------------------ -// DisplayFontParam +// PSFontParam16 //------------------------------------------------------------------------ -DisplayFontParam::DisplayFontParam(GooString *nameA, - DisplayFontParamKind kindA) { +PSFontParam16::PSFontParam16(GooString *nameA, int wModeA, + GooString *psFontNameA, GooString *encodingA) { name = nameA; - kind = kindA; - switch (kind) { - case displayFontT1: - t1.fileName = NULL; - break; - case displayFontTT: - tt.fileName = NULL; - break; - } + wMode = wModeA; + psFontName = psFontNameA; + encoding = encodingA; } -DisplayFontParam::~DisplayFontParam() { +PSFontParam16::~PSFontParam16() { delete name; - switch (kind) { - case displayFontT1: - if (t1.fileName) { - delete t1.fileName; - } - break; - case displayFontTT: - if (tt.fileName) { - delete tt.fileName; - } - break; - } + delete psFontName; + delete encoding; } #if ENABLE_RELOCATABLE && defined(_WIN32) @@ -212,191 +199,154 @@ #endif -#ifdef _WIN32 - //------------------------------------------------------------------------ -// WinFontInfo +// SysFontInfo //------------------------------------------------------------------------ -class WinFontInfo: public DisplayFontParam { +class SysFontInfo { public: - GBool bold, italic; - - static WinFontInfo *make(GooString *nameA, GBool boldA, GBool italicA, - HKEY regKey, char *winFontDir); - WinFontInfo(GooString *nameA, GBool boldA, GBool italicA, - GooString *fileNameA); - virtual ~WinFontInfo(); - GBool equals(WinFontInfo *fi); + GooString *name; + GBool bold; + GBool italic; + GBool oblique; + GBool fixedWidth; + GooString *path; + SysFontType type; + int fontNum; // for TrueType collections + GooString *substituteName; + + SysFontInfo(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA, + GooString *pathA, SysFontType typeA, int fontNumA, GooString *substituteNameA); + ~SysFontInfo(); + GBool match(SysFontInfo *fi); + GBool match(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA); + GBool match(GooString *nameA, GBool boldA, GBool italicA); }; -WinFontInfo *WinFontInfo::make(GooString *nameA, GBool boldA, GBool italicA, - HKEY regKey, char *winFontDir) { - GooString *regName; - GooString *fileNameA; - char buf[MAX_PATH]; - DWORD n; - char c; - int i; - - //----- find the font file - fileNameA = NULL; - regName = nameA->copy(); - if (boldA) { - regName->append(" Bold"); - } - if (italicA) { - regName->append(" Italic"); - } - regName->append(" (TrueType)"); - n = sizeof(buf); - if (RegQueryValueEx(regKey, regName->getCString(), NULL, NULL, - (LPBYTE)buf, &n) == ERROR_SUCCESS) { - fileNameA = new GooString(winFontDir); - fileNameA->append('\\')->append(buf); - } - delete regName; - if (!fileNameA) { - delete nameA; - return NULL; - } - - //----- normalize the font name - i = 0; - while (i < nameA->getLength()) { - c = nameA->getChar(i); - if (c == ' ' || c == ',' || c == '-') { - nameA->del(i); - } else { - ++i; - } - } +SysFontInfo::SysFontInfo(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA, + GooString *pathA, SysFontType typeA, int fontNumA, GooString *substituteNameA) { + name = nameA; + bold = boldA; + italic = italicA; + oblique = obliqueA; + fixedWidth = fixedWidthA; + path = pathA; + type = typeA; + fontNum = fontNumA; + substituteName = substituteNameA; +} - return new WinFontInfo(nameA, boldA, italicA, fileNameA); +SysFontInfo::~SysFontInfo() { + delete name; + delete path; + delete substituteName; } -WinFontInfo::WinFontInfo(GooString *nameA, GBool boldA, GBool italicA, - GooString *fileNameA): - DisplayFontParam(nameA, displayFontTT) -{ - bold = boldA; - italic = italicA; - tt.fileName = fileNameA; +GBool SysFontInfo::match(SysFontInfo *fi) { + return !strcasecmp(name->getCString(), fi->name->getCString()) && + bold == fi->bold && italic == fi->italic && oblique == fi->oblique && fixedWidth == fi->fixedWidth; } -WinFontInfo::~WinFontInfo() { +GBool SysFontInfo::match(GooString *nameA, GBool boldA, GBool italicA, GBool obliqueA, GBool fixedWidthA) { + return !strcasecmp(name->getCString(), nameA->getCString()) && + bold == boldA && italic == italicA && oblique == obliqueA && fixedWidth == fixedWidthA; } -GBool WinFontInfo::equals(WinFontInfo *fi) { - return !name->cmp(fi->name) && bold == fi->bold && italic == fi->italic; +GBool SysFontInfo::match(GooString *nameA, GBool boldA, GBool italicA) { + return !strcasecmp(name->getCString(), nameA->getCString()) && + bold == boldA && italic == italicA; } //------------------------------------------------------------------------ -// WinFontList +// SysFontList //------------------------------------------------------------------------ -class WinFontList { +class SysFontList { public: - WinFontList(char *winFontDirA); - ~WinFontList(); - WinFontInfo *find(GooString *font); + SysFontList(); + ~SysFontList(); + SysFontInfo *find(GooString *name, GBool isFixedWidth, GBool exact); +#ifdef WIN32 + void scanWindowsFonts(GooString *winFontDir); +#endif +#ifdef WITH_FONTCONFIGURATION_FONTCONFIG + void addFcFont(SysFontInfo *si) {fonts->append(si);} +#endif private: - void add(WinFontInfo *fi); - static int CALLBACK enumFunc1(CONST LOGFONT *font, - CONST TEXTMETRIC *metrics, - DWORD type, LPARAM data); - static int CALLBACK enumFunc2(CONST LOGFONT *font, - CONST TEXTMETRIC *metrics, - DWORD type, LPARAM data); - - GooList *fonts; // [WinFontInfo] - HDC dc; // (only used during enumeration) - HKEY regKey; // (only used during enumeration) - char *winFontDir; // (only used during enumeration) -}; +#ifdef WIN32 + SysFontInfo *makeWindowsFont(char *name, int fontNum, + char *path); +#endif -WinFontList::WinFontList(char *winFontDirA) { - OSVERSIONINFO version; - char *path; + GooList *fonts; // [SysFontInfo] +}; +SysFontList::SysFontList() { fonts = new GooList(); - dc = GetDC(NULL); - winFontDir = winFontDirA; - version.dwOSVersionInfoSize = sizeof(version); - GetVersionEx(&version); - if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { - path = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\"; - } else { - path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts\\"; - } - if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, - KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, - ®Key) == ERROR_SUCCESS) { - EnumFonts(dc, NULL, &WinFontList::enumFunc1, (LPARAM)this); - RegCloseKey(regKey); - } - ReleaseDC(NULL, dc); } -WinFontList::~WinFontList() { - deleteGooList(fonts, WinFontInfo); -} - -void WinFontList::add(WinFontInfo *fi) { - int i; - - for (i = 0; i < fonts->getLength(); ++i) { - if (((WinFontInfo *)fonts->get(i))->equals(fi)) { - delete fi; - return; - } - } - fonts->append(fi); +SysFontList::~SysFontList() { + deleteGooList(fonts, SysFontInfo); } -WinFontInfo *WinFontList::find(GooString *font) { - GooString *name; - GBool bold, italic; - WinFontInfo *fi; +SysFontInfo *SysFontList::find(GooString *name, GBool fixedWidth, GBool exact) { + GooString *name2; + GBool bold, italic, oblique; + SysFontInfo *fi; char c; int n, i; - name = font->copy(); + name2 = name->copy(); // remove space, comma, dash chars i = 0; - while (i < name->getLength()) { - c = name->getChar(i); + while (i < name2->getLength()) { + c = name2->getChar(i); if (c == ' ' || c == ',' || c == '-') { - name->del(i); + name2->del(i); } else { ++i; } } - n = name->getLength(); + n = name2->getLength(); // remove trailing "MT" (Foo-MT, Foo-BoldMT, etc.) - if (!strcmp(name->getCString() + n - 2, "MT")) { - name->del(n - 2, 2); + if (n > 2 && !strcmp(name2->getCString() + n - 2, "MT")) { + name2->del(n - 2, 2); n -= 2; } + // look for "Regular" + if (n > 7 && !strcmp(name2->getCString() + n - 7, "Regular")) { + name2->del(n - 7, 7); + n -= 7; + } + // look for "Italic" - if (!strcmp(name->getCString() + n - 6, "Italic")) { - name->del(n - 6, 6); + if (n > 6 && !strcmp(name2->getCString() + n - 6, "Italic")) { + name2->del(n - 6, 6); italic = gTrue; n -= 6; } else { italic = gFalse; } + // look for "Oblique" + if (n > 6 && !strcmp(name2->getCString() + n - 7, "Oblique")) { + name2->del(n - 7, 7); + oblique = gTrue; + n -= 6; + } else { + oblique = gFalse; + } + // look for "Bold" - if (!strcmp(name->getCString() + n - 4, "Bold")) { - name->del(n - 4, 4); + if (n > 4 && !strcmp(name2->getCString() + n - 4, "Bold")) { + name2->del(n - 4, 4); bold = gTrue; n -= 4; } else { @@ -404,78 +354,57 @@ } // remove trailing "MT" (FooMT-Bold, etc.) - if (!strcmp(name->getCString() + n - 2, "MT")) { - name->del(n - 2, 2); + if (n > 2 && !strcmp(name2->getCString() + n - 2, "MT")) { + name2->del(n - 2, 2); n -= 2; } // remove trailing "PS" - if (!strcmp(name->getCString() + n - 2, "PS")) { - name->del(n - 2, 2); + if (n > 2 && !strcmp(name2->getCString() + n - 2, "PS")) { + name2->del(n - 2, 2); n -= 2; } + // remove trailing "IdentityH" + if (n > 9 && !strcmp(name2->getCString() + n - 9, "IdentityH")) { + name2->del(n - 9, 9); + n -= 9; + } + // search for the font fi = NULL; for (i = 0; i < fonts->getLength(); ++i) { - fi = (WinFontInfo *)fonts->get(i); - if (!fi->name->cmp(name) && fi->bold == bold && fi->italic == italic) { + fi = (SysFontInfo *)fonts->get(i); + if (fi->match(name2, bold, italic, oblique, fixedWidth)) { break; } fi = NULL; } - - delete name; - return fi; -} - -int CALLBACK WinFontList::enumFunc1(CONST LOGFONT *font, - CONST TEXTMETRIC *metrics, - DWORD type, LPARAM data) { - WinFontList *fl = (WinFontList *)data; - - EnumFonts(fl->dc, font->lfFaceName, &WinFontList::enumFunc2, (LPARAM)fl); - return 1; -} - -int CALLBACK WinFontList::enumFunc2(CONST LOGFONT *font, - CONST TEXTMETRIC *metrics, - DWORD type, LPARAM data) { - WinFontList *fl = (WinFontList *)data; - WinFontInfo *fi; - - if (type & TRUETYPE_FONTTYPE) { - if ((fi = WinFontInfo::make(new GooString(font->lfFaceName), - font->lfWeight >= 600, - font->lfItalic ? gTrue : gFalse, - fl->regKey, fl->winFontDir))) { - fl->add(fi); + if (!fi && !exact && bold) { + // try ignoring the bold flag + for (i = 0; i < fonts->getLength(); ++i) { + fi = (SysFontInfo *)fonts->get(i); + if (fi->match(name2, gFalse, italic)) { + break; + } + fi = NULL; + } + } + if (!fi && !exact && (bold || italic)) { + // try ignoring the bold and italic flags + for (i = 0; i < fonts->getLength(); ++i) { + fi = (SysFontInfo *)fonts->get(i); + if (fi->match(name2, gFalse, gFalse)) { + break; + } + fi = NULL; } } - return 1; -} - -#endif // _WIN32 - -//------------------------------------------------------------------------ -// PSFontParam -//------------------------------------------------------------------------ -PSFontParam::PSFontParam(GooString *pdfFontNameA, int wModeA, - GooString *psFontNameA, GooString *encodingA) { - pdfFontName = pdfFontNameA; - wMode = wModeA; - psFontName = psFontNameA; - encoding = encodingA; + delete name2; + return fi; } -PSFontParam::~PSFontParam() { - delete pdfFontName; - delete psFontName; - if (encoding) { - delete encoding; - } -} #ifdef ENABLE_PLUGINS //------------------------------------------------------------------------ @@ -518,33 +447,32 @@ #ifdef _WIN32 path->append(".dll"); if (!(libA = LoadLibrary(path->getCString()))) { - error(-1, "Failed to load plugin '%s'", - path->getCString()); + error(errIO, -1, "Failed to load plugin '{0:t}'", path); goto err1; } if (!(vt = (XpdfPluginVecTable *) GetProcAddress(libA, "xpdfPluginVecTable"))) { - error(-1, "Failed to find xpdfPluginVecTable in plugin '%s'", - path->getCString()); + error(errIO, -1, "Failed to find xpdfPluginVecTable in plugin '{0:t}'", + path); goto err2; } #else //~ need to deal with other extensions here path->append(".so"); if (!(dlA = dlopen(path->getCString(), RTLD_NOW))) { - error(-1, "Failed to load plugin '%s': %s", - path->getCString(), dlerror()); + error(errIO, -1, "Failed to load plugin '{0:t}': {1:s}", + path, dlerror()); goto err1; } if (!(vt = (XpdfPluginVecTable *)dlsym(dlA, "xpdfPluginVecTable"))) { - error(-1, "Failed to find xpdfPluginVecTable in plugin '%s'", - path->getCString()); + error(errIO, -1, "Failed to find xpdfPluginVecTable in plugin '{0:t}'", + path); goto err2; } #endif if (vt->version != xpdfPluginVecTable.version) { - error(-1, "Plugin '%s' is wrong version", path->getCString()); + error(errIO, -1, "Plugin '{0:t}' is wrong version", path); goto err2; } memcpy(vt, &xpdfPluginVecTable, sizeof(xpdfPluginVecTable)); @@ -552,21 +480,20 @@ #ifdef _WIN32 if (!(xpdfInitPlugin = (XpdfBool (*)(void)) GetProcAddress(libA, "xpdfInitPlugin"))) { - error(-1, "Failed to find xpdfInitPlugin in plugin '%s'", - path->getCString()); + error(errIO, -1, "Failed to find xpdfInitPlugin in plugin '{0:t}'", + path); goto err2; } #else if (!(xpdfInitPlugin = (XpdfBool (*)(void))dlsym(dlA, "xpdfInitPlugin"))) { - error(-1, "Failed to find xpdfInitPlugin in plugin '%s'", - path->getCString()); + error(errIO, -1, "Failed to find xpdfInitPlugin in plugin '{0:t}'", + path); goto err2; } #endif if (!(*xpdfInitPlugin)()) { - error(-1, "Initialization of plugin '%s' failed", - path->getCString()); + error(errIO, -1, "Initialization of plugin '{0:t}' failed", path); goto err2; } @@ -649,6 +576,7 @@ #ifdef _WIN32 // baseDir will be set by a call to setBaseDir baseDir = new GooString(); + substFiles = new GooHash(gTrue); #else baseDir = appendToPath(getHomeDir(), ".xpdf"); #endif @@ -659,23 +587,30 @@ unicodeMaps = new GooHash(gTrue); cMapDirs = new GooHash(gTrue); toUnicodeDirs = new GooList(); - displayFonts = new GooHash(); + fontFiles = new GooHash(gTrue); + fontDirs = new GooList(); + ccFontFiles = new GooHash(gTrue); + sysFonts = new SysFontList(); psExpandSmaller = gFalse; psShrinkLarger = gTrue; psCenter = gTrue; psLevel = psLevel2; - psFonts = new GooHash(); - psNamedFonts16 = new GooList(); - psFonts16 = new GooList(); + psFile = NULL; + psResidentFonts = new GooHash(gTrue); + psResidentFonts16 = new GooList(); + psResidentFontsCC = new GooList(); psEmbedType1 = gTrue; psEmbedTrueType = gTrue; psEmbedCIDPostScript = gTrue; psEmbedCIDTrueType = gTrue; - psSubstFonts = gTrue; + psFontPassthrough = gFalse; psPreload = gFalse; psOPI = gFalse; psASCIIHex = gFalse; psBinary = gFalse; + psUncompressPreloadedImages = gFalse; + psRasterResolution = 300; + psRasterMono = gFalse; textEncoding = new GooString("UTF-8"); #if defined(_WIN32) textEOL = eolDOS; @@ -686,10 +621,10 @@ #endif textPageBreaks = gTrue; textKeepTinyChars = gFalse; - fontDirs = new GooList(); enableFreeType = gTrue; antialias = gTrue; vectorAntialias = gTrue; + antialiasPrinting = gFalse; strokeAdjust = gTrue; screenType = screenUnset; screenSize = -1; @@ -697,12 +632,13 @@ screenGamma = 1.0; screenBlackThreshold = 0.0; screenWhiteThreshold = 1.0; + minLineWidth = 0.0; + overprintPreview = gFalse; mapNumericCharNames = gTrue; mapUnknownCharNames = gFalse; printCommands = gFalse; profileCommands = gFalse; errQuiet = gFalse; - splashResolution = 0.0; cidToUnicodeCache = new CharCodeToUnicodeCache(cidToUnicodeCacheSize); unicodeToUnicodeCache = @@ -710,11 +646,7 @@ unicodeMapCache = new UnicodeMapCache(); cMapCache = new CMapCache(); -#ifdef _WIN32 baseFontsInitialized = gFalse; - winFontList = NULL; -#endif - #ifdef ENABLE_PLUGINS plugins = new GooList(); securityHandlers = new GooList(); @@ -801,9 +733,9 @@ Unicode u; char *tokptr; - if (!(f = fopen(name->getCString(), "r"))) { - error(-1, "Couldn't open 'nameToUnicode' file '%s'", - name->getCString()); + if (!(f = openFile(name->getCString(), "r"))) { + error(errIO, -1, "Couldn't open 'nameToUnicode' file '{0:t}'", + name); return; } line = 1; @@ -814,8 +746,8 @@ sscanf(tok1, "%x", &u); nameToUnicode->add(tok2, u); } else { - error(-1, "Bad line in 'nameToUnicode' file (%s:%d)", - name->getCString(), line); + error(errConfig, -1, "Bad line in 'nameToUnicode' file ({0:t}:{1:d})", + name, line); } ++line; } @@ -852,7 +784,7 @@ list->append(dir->copy()); } -GBool GlobalParams::parseYesNo2(char *token, GBool *flag) { +GBool GlobalParams::parseYesNo2(const char *token, GBool *flag) { if (!strcmp(token, "yes")) { *flag = gTrue; } else if (!strcmp(token, "no")) { @@ -875,15 +807,20 @@ deleteGooHash(residentUnicodeMaps, UnicodeMap); deleteGooHash(unicodeMaps, GooString); deleteGooList(toUnicodeDirs, GooString); - deleteGooHash(displayFonts, DisplayFontParam); + deleteGooHash(fontFiles, GooString); + deleteGooList(fontDirs, GooString); + deleteGooHash(ccFontFiles, GooString); #ifdef _WIN32 - delete winFontList; + deleteGooHash(substFiles, GooString); #endif - deleteGooHash(psFonts, PSFontParam); - deleteGooList(psNamedFonts16, PSFontParam); - deleteGooList(psFonts16, PSFontParam); + delete sysFonts; + if (psFile) { + delete psFile; + } + deleteGooHash(psResidentFonts, GooString); + deleteGooList(psResidentFonts16, PSFontParam16); + deleteGooList(psResidentFontsCC, PSFontParam16); delete textEncoding; - deleteGooList(fontDirs, GooString); GooHashIter *iter; GooString *key; @@ -914,7 +851,7 @@ //------------------------------------------------------------------------ -void GlobalParams::setBaseDir(char *dir) { +void GlobalParams::setBaseDir(const char *dir) { delete baseDir; baseDir = new GooString(dir); } @@ -937,7 +874,7 @@ return s; } -Unicode GlobalParams::mapNameToUnicode(char *charName) { +Unicode GlobalParams::mapNameToUnicode(const char *charName) { // no need to lock - nameToUnicode is constant return nameToUnicode->lookup(charName); } @@ -960,7 +897,7 @@ lockGlobalParams; if ((fileName = (GooString *)unicodeMaps->lookup(encodingName))) { - f = fopen(fileName->getCString(), "r"); + f = openFile(fileName->getCString(), "r"); } else { f = NULL; } @@ -983,7 +920,7 @@ for (i = 0; i < list->getLength(); ++i) { dir = (GooString *)list->get(i); fileName = appendToPath(dir->copy(), cMapName->getCString()); - f = fopen(fileName->getCString(), "r"); + f = openFile(fileName->getCString(), "r"); delete fileName; if (f) { unlockGlobalParams; @@ -1003,7 +940,7 @@ for (i = 0; i < toUnicodeDirs->getLength(); ++i) { dir = (GooString *)toUnicodeDirs->get(i); fileName = appendToPath(dir->copy(), name->getCString()); - f = fopen(fileName->getCString(), "r"); + f = openFile(fileName->getCString(), "r"); delete fileName; if (f) { unlockGlobalParams; @@ -1033,9 +970,9 @@ } } -static char *getFontLang(GfxFont *font) +static const char *getFontLang(GfxFont *font) { - char *lang; + const char *lang; // find the language we want the font to support if (font->isCIDFont()) @@ -1059,7 +996,7 @@ lang = "xx"; else { - error(-1, "Unknown CID font collection, please report to poppler bugzilla."); + error(errUnimplemented, -1, "Unknown CID font collection, please report to poppler bugzilla."); lang = "xx"; } } @@ -1069,19 +1006,19 @@ return lang; } -static FcPattern *buildFcPattern(GfxFont *font) +static FcPattern *buildFcPattern(GfxFont *font, GooString *base14Name) { int weight = -1, slant = -1, width = -1, spacing = -1; bool deleteFamily = false; - char *family, *name, *lang, *modifiers; + char *family, *name, *modifiers; const char *start; FcPattern *p; // this is all heuristics will be overwritten if font had proper info - name = font->getName()->getCString(); + name = (base14Name == NULL) ? font->getName()->getCString() : base14Name->getCString(); modifiers = strchr (name, ','); if (modifiers == NULL) @@ -1170,7 +1107,7 @@ default: break; } - lang = getFontLang(font); + const char *lang = getFontLang(font); p = FcPatternBuild(NULL, FC_FAMILY, FcTypeString, family, @@ -1187,29 +1124,86 @@ } #endif +GooString *GlobalParams::findFontFile(GooString *fontName) { + static const char *exts[] = { ".pfa", ".pfb", ".ttf", ".ttc", ".otf" }; + GooString *path, *dir; +#ifdef WIN32 + GooString *fontNameU; +#endif + const char *ext; + FILE *f; + int i, j; + + setupBaseFonts(NULL); + lockGlobalParams; + if ((path = (GooString *)fontFiles->lookup(fontName))) { + path = path->copy(); + unlockGlobalParams; + return path; + } + for (i = 0; i < fontDirs->getLength(); ++i) { + dir = (GooString *)fontDirs->get(i); + for (j = 0; j < (int)(sizeof(exts) / sizeof(exts[0])); ++j) { + ext = exts[j]; +#ifdef WIN32 + fontNameU = fileNameToUTF8(fontName->getCString()); + path = appendToPath(dir->copy(), fontNameU->getCString()); + delete fontNameU; +#else + path = appendToPath(dir->copy(), fontName->getCString()); +#endif + path->append(ext); + if ((f = openFile(path->getCString(), "rb"))) { + fclose(f); + unlockGlobalParams; + return path; + } + delete path; + } + } + unlockGlobalParams; + return NULL; +} + /* if you can't or don't want to use Fontconfig, you need to implement this function for your platform. For Windows, it's in GlobalParamsWin.cc */ #if WITH_FONTCONFIGURATION_FONTCONFIG -DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) { - DisplayFontParam *dfp; - FcPattern *p=0; +// not needed for fontconfig +void GlobalParams::setupBaseFonts(char *dir) { +} +GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) { + SysFontType type; + int fontNum; + + return findSystemFontFile(font, &type, &fontNum, NULL, base14Name); +} + +GooString *GlobalParams::findSystemFontFile(GfxFont *font, + SysFontType *type, + int *fontNum, GooString *substituteFontName, GooString *base14Name) { + SysFontInfo *fi = NULL; + FcPattern *p=0; + GooString *path = NULL; GooString *fontName = font->getName(); + GooString substituteName; if (!fontName) return NULL; - lockGlobalParams; - dfp = font->dfp; - if (!dfp) - { + + if ((fi = sysFonts->find(fontName, font->isFixedWidth(), gTrue))) { + path = fi->path->copy(); + *type = fi->type; + *fontNum = fi->fontNum; + substituteName.Set(fi->substituteName->getCString()); + } else { FcChar8* s; char * ext; FcResult res; FcFontSet *set; int i; FcLangSet *lb = NULL; - char *lang; - p = buildFcPattern(font); + p = buildFcPattern(font, base14Name); if (!p) goto fin; @@ -1220,7 +1214,7 @@ goto fin; // find the language we want the font to support - lang = getFontLang(font); + const char *lang = getFontLang(font); if (strcmp(lang,"xx") != 0) { lb = FcLangSetCreate(); FcLangSetAdd(lb,(FcChar8 *)lang); @@ -1231,38 +1225,97 @@ first: fonts support the language second: all fonts (fall back) */ - while (dfp == NULL) + while (fi == NULL) { for (i = 0; i < set->nfont; ++i) { - res = FcPatternGetString(set->fonts[i], FC_FILE, 0, &s); - if (res != FcResultMatch || !s) - continue; - if (lb != NULL) { - FcLangSet *l; - res = FcPatternGetLangSet(set->fonts[i], FC_LANG, 0, &l); - if (res != FcResultMatch || !FcLangSetContains(l,lb)) { - continue; + res = FcPatternGetString(set->fonts[i], FC_FILE, 0, &s); + if (res != FcResultMatch || !s) + continue; + if (lb != NULL) { + FcLangSet *l; + res = FcPatternGetLangSet(set->fonts[i], FC_LANG, 0, &l); + if (res != FcResultMatch || !FcLangSetContains(l,lb)) { + continue; + } + } + FcChar8* s2; + res = FcPatternGetString(set->fonts[i], FC_FULLNAME, 0, &s2); + if (res == FcResultMatch && s2) { + substituteName.Set((char*)s2); + } else { + // fontconfig does not extract fullname for some fonts + // create the fullname from family and style + res = FcPatternGetString(set->fonts[i], FC_FAMILY, 0, &s2); + if (res == FcResultMatch && s2) { + substituteName.Set((char*)s2); + res = FcPatternGetString(set->fonts[i], FC_STYLE, 0, &s2); + if (res == FcResultMatch && s2) { + GooString *style = new GooString((char*)s2); + if (style->cmp("Regular") != 0) { + substituteName.append(" "); + substituteName.append(style); + } + delete style; + } } } - ext = strrchr((char*)s,'.'); - if (!ext) - continue; - if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4) || !strncasecmp(ext, ".otf", 4)) - { - dfp = new DisplayFontParam(fontName->copy(), displayFontTT); - dfp->tt.fileName = new GooString((char*)s); - FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, &(dfp->tt.faceIndex)); - } - else if (!strncasecmp(ext,".pfa",4) || !strncasecmp(ext,".pfb",4)) - { - dfp = new DisplayFontParam(fontName->copy(), displayFontT1); - dfp->t1.fileName = new GooString((char*)s); - } - else - continue; - font->dfp = dfp; - break; + ext = strrchr((char*)s,'.'); + if (!ext) + continue; + if (!strncasecmp(ext,".ttf",4) || !strncasecmp(ext, ".ttc", 4) || !strncasecmp(ext, ".otf", 4)) + { + int weight, slant; + GBool bold = font->isBold(); + GBool italic = font->isItalic(); + GBool oblique = gFalse; + FcPatternGetInteger(set->fonts[i], FC_WEIGHT, 0, &weight); + FcPatternGetInteger(set->fonts[i], FC_SLANT, 0, &slant); + if (weight == FC_WEIGHT_DEMIBOLD || weight == FC_WEIGHT_BOLD + || weight == FC_WEIGHT_EXTRABOLD || weight == FC_WEIGHT_BLACK) + { + bold = gTrue; + } + if (slant == FC_SLANT_ITALIC) + italic = gTrue; + if (slant == FC_SLANT_OBLIQUE) + oblique = gTrue; + *fontNum = 0; + *type = (!strncasecmp(ext,".ttc",4)) ? sysFontTTC : sysFontTTF; + FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, fontNum); + fi = new SysFontInfo(fontName->copy(), bold, italic, oblique, font->isFixedWidth(), + new GooString((char*)s), *type, *fontNum, substituteName.copy()); + sysFonts->addFcFont(fi); + path = new GooString((char*)s); + } + else if (!strncasecmp(ext,".pfa",4) || !strncasecmp(ext,".pfb",4)) + { + int weight, slant; + GBool bold = font->isBold(); + GBool italic = font->isItalic(); + GBool oblique = gFalse; + FcPatternGetInteger(set->fonts[i], FC_WEIGHT, 0, &weight); + FcPatternGetInteger(set->fonts[i], FC_SLANT, 0, &slant); + if (weight == FC_WEIGHT_DEMIBOLD || weight == FC_WEIGHT_BOLD + || weight == FC_WEIGHT_EXTRABOLD || weight == FC_WEIGHT_BLACK) + { + bold = gTrue; + } + if (slant == FC_SLANT_ITALIC) + italic = gTrue; + if (slant == FC_SLANT_OBLIQUE) + oblique = gTrue; + *fontNum = 0; + *type = (!strncasecmp(ext,".pfa",4)) ? sysFontPFA : sysFontPFB; + FcPatternGetInteger(set->fonts[i], FC_INDEX, 0, fontNum); + fi = new SysFontInfo(fontName->copy(), bold, italic, oblique, font->isFixedWidth(), + new GooString((char*)s), *type, *fontNum, substituteName.copy()); + sysFonts->addFcFont(fi); + path = new GooString((char*)s); + } + else + continue; + break; } if (lb != NULL) { FcLangSetDestroy(lb); @@ -1274,18 +1327,136 @@ } FcFontSetDestroy(set); } + if (path == NULL && (fi = sysFonts->find(fontName, font->isFixedWidth(), gFalse))) { + path = fi->path->copy(); + *type = fi->type; + *fontNum = fi->fontNum; + } + if (substituteFontName) { + substituteFontName->Set(substituteName.getCString()); + } fin: if (p) FcPatternDestroy(p); - unlockGlobalParams; - return dfp; + return path; } -#endif -#if WITH_FONTCONFIGURATION_WIN32 + +#elif WITH_FONTCONFIGURATION_WIN32 #include "GlobalParamsWin.cc" + +GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) { + return findFontFile(base14Name); +} +#else +GooString *GlobalParams::findBase14FontFile(GooString *base14Name, GfxFont *font) { + return findFontFile(base14Name); +} + +static struct { + const char *name; + const char *t1FileName; + const char *ttFileName; +} displayFontTab[] = { + {"Courier", "n022003l.pfb", "cour.ttf"}, + {"Courier-Bold", "n022004l.pfb", "courbd.ttf"}, + {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf"}, + {"Courier-Oblique", "n022023l.pfb", "couri.ttf"}, + {"Helvetica", "n019003l.pfb", "arial.ttf"}, + {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf"}, + {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf"}, + {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf"}, + {"Symbol", "s050000l.pfb", NULL}, + {"Times-Bold", "n021004l.pfb", "timesbd.ttf"}, + {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf"}, + {"Times-Italic", "n021023l.pfb", "timesi.ttf"}, + {"Times-Roman", "n021003l.pfb", "times.ttf"}, + {"ZapfDingbats", "d050000l.pfb", NULL}, + {NULL} +}; + +static const char *displayFontDirs[] = { + "/usr/share/ghostscript/fonts", + "/usr/local/share/ghostscript/fonts", + "/usr/share/fonts/default/Type1", + "/usr/share/fonts/default/ghostscript", + "/usr/share/fonts/type1/gsfonts", + NULL +}; + +void GlobalParams::setupBaseFonts(char *dir) { + GooString *fontName; + GooString *fileName; + FILE *f; + int i, j; + + for (i = 0; displayFontTab[i].name; ++i) { + if (fontFiles->lookup(displayFontTab[i].name)) { + continue; + } + fontName = new GooString(displayFontTab[i].name); + fileName = NULL; + if (dir) { + fileName = appendToPath(new GooString(dir), displayFontTab[i].t1FileName); + if ((f = fopen(fileName->getCString(), "rb"))) { + fclose(f); + } else { + delete fileName; + fileName = NULL; + } + } + for (j = 0; !fileName && displayFontDirs[j]; ++j) { + fileName = appendToPath(new GooString(displayFontDirs[j]), + displayFontTab[i].t1FileName); + if ((f = fopen(fileName->getCString(), "rb"))) { + fclose(f); + } else { + delete fileName; + fileName = NULL; + } + } + if (!fileName) { + error(errConfig, -1, "No display font for '{0:s}'", + displayFontTab[i].name); + delete fontName; + continue; + } + addFontFile(fontName, fileName); + } + +} + +GooString *GlobalParams::findSystemFontFile(GfxFont *font, + SysFontType *type, + int *fontNum, GooString * /*substituteFontName*/, + GooString * /*base14Name*/) { + SysFontInfo *fi; + GooString *path; + + path = NULL; + lockGlobalParams; + if ((fi = sysFonts->find(font->getName(), font->isFixedWidth(), gFalse))) { + path = fi->path->copy(); + *type = fi->type; + *fontNum = fi->fontNum; + } + unlockGlobalParams; + return path; +} #endif +GooString *GlobalParams::findCCFontFile(GooString *collection) { + GooString *path; + + lockGlobalParams; + if ((path = (GooString *)ccFontFiles->lookup(collection))) { + path = path->copy(); + } + unlockGlobalParams; + return path; +} + + GBool GlobalParams::getPSExpandSmaller() { GBool f; @@ -1322,41 +1493,62 @@ return level; } -PSFontParam *GlobalParams::getPSFont(GooString *fontName) { - PSFontParam *p; +GooString *GlobalParams::getPSResidentFont(GooString *fontName) { + GooString *psName; lockGlobalParams; - p = (PSFontParam *)psFonts->lookup(fontName); + psName = (GooString *)psResidentFonts->lookup(fontName); unlockGlobalParams; - return p; + return psName; +} + +GooList *GlobalParams::getPSResidentFonts() { + GooList *names; + GooHashIter *iter; + GooString *name; + GooString *psName; + + names = new GooList(); + lockGlobalParams; + psResidentFonts->startIter(&iter); + while (psResidentFonts->getNext(&iter, &name, (void **)&psName)) { + names->append(psName->copy()); + } + unlockGlobalParams; + return names; } -PSFontParam *GlobalParams::getPSFont16(GooString *fontName, - GooString *collection, int wMode) { - PSFontParam *p; +PSFontParam16 *GlobalParams::getPSResidentFont16(GooString *fontName, + int wMode) { + PSFontParam16 *p; int i; lockGlobalParams; p = NULL; - if (fontName) { - for (i = 0; i < psNamedFonts16->getLength(); ++i) { - p = (PSFontParam *)psNamedFonts16->get(i); - if (!p->pdfFontName->cmp(fontName) && - p->wMode == wMode) { - break; - } - p = NULL; + for (i = 0; i < psResidentFonts16->getLength(); ++i) { + p = (PSFontParam16 *)psResidentFonts16->get(i); + if (!(p->name->cmp(fontName)) && p->wMode == wMode) { + break; } + p = NULL; } - if (!p && collection) { - for (i = 0; i < psFonts16->getLength(); ++i) { - p = (PSFontParam *)psFonts16->get(i); - if (!p->pdfFontName->cmp(collection) && - p->wMode == wMode) { - break; - } - p = NULL; + unlockGlobalParams; + return p; +} + +PSFontParam16 *GlobalParams::getPSResidentFontCC(GooString *collection, + int wMode) { + PSFontParam16 *p; + int i; + + lockGlobalParams; + p = NULL; + for (i = 0; i < psResidentFontsCC->getLength(); ++i) { + p = (PSFontParam16 *)psResidentFontsCC->get(i); + if (!(p->name->cmp(collection)) && p->wMode == wMode) { + break; } + p = NULL; } unlockGlobalParams; return p; @@ -1398,11 +1590,11 @@ return e; } -GBool GlobalParams::getPSSubstFonts() { +GBool GlobalParams::getPSFontPassthrough() { GBool e; lockGlobalParams; - e = psSubstFonts; + e = psFontPassthrough; unlockGlobalParams; return e; } @@ -1443,6 +1635,33 @@ return binary; } +GBool GlobalParams::getPSUncompressPreloadedImages() { + GBool ah; + + lockGlobalParams; + ah = psUncompressPreloadedImages; + unlockGlobalParams; + return ah; +} + +double GlobalParams::getPSRasterResolution() { + double res; + + lockGlobalParams; + res = psRasterResolution; + unlockGlobalParams; + return res; +} + +GBool GlobalParams::getPSRasterMono() { + GBool mono; + + lockGlobalParams; + mono = psRasterMono; + unlockGlobalParams; + return mono; +} + GooString *GlobalParams::getTextEncodingName() { GooString *s; @@ -1479,30 +1698,6 @@ return tiny; } -GooString *GlobalParams::findFontFile(GooString *fontName, char **exts) { - GooString *dir, *fileName; - char **ext; - FILE *f; - int i; - - lockGlobalParams; - for (i = 0; i < fontDirs->getLength(); ++i) { - dir = (GooString *)fontDirs->get(i); - for (ext = exts; *ext; ++ext) { - fileName = appendToPath(dir->copy(), fontName->getCString()); - fileName->append(*ext); - if ((f = fopen(fileName->getCString(), "rb"))) { - fclose(f); - unlockGlobalParams; - return fileName; - } - delete fileName; - } - } - unlockGlobalParams; - return NULL; -} - GBool GlobalParams::getEnableFreeType() { GBool f; @@ -1512,7 +1707,6 @@ return f; } - GBool GlobalParams::getAntialias() { GBool f; @@ -1531,6 +1725,15 @@ return f; } +GBool GlobalParams::getAntialiasPrinting() { + GBool f; + + lockGlobalParams; + f = antialiasPrinting; + unlockGlobalParams; + return f; +} + GBool GlobalParams::getStrokeAdjust() { GBool f; @@ -1594,6 +1797,15 @@ return thresh; } +double GlobalParams::getMinLineWidth() { + double minLineWidthA; + + lockGlobalParams; + minLineWidthA = minLineWidth; + unlockGlobalParams; + return minLineWidthA; +} + GBool GlobalParams::getMapNumericCharNames() { GBool map; @@ -1636,14 +1848,6 @@ return errQuiet; } -double GlobalParams::getSplashResolution() { - double r; - lockGlobalParams; - r = splashResolution; - unlockGlobalParams; - return r; -} - CharCodeToUnicode *GlobalParams::getCIDToUnicode(GooString *collection) { GooString *fileName; CharCodeToUnicode *ctu; @@ -1736,6 +1940,21 @@ // functions to set parameters //------------------------------------------------------------------------ +void GlobalParams::addFontFile(GooString *fontName, GooString *path) { + lockGlobalParams; + fontFiles->add(fontName, path); + unlockGlobalParams; +} + +void GlobalParams::setPSFile(char *file) { + lockGlobalParams; + if (psFile) { + delete psFile; + } + psFile = new GooString(file); + unlockGlobalParams; +} + void GlobalParams::setPSExpandSmaller(GBool expand) { lockGlobalParams; psExpandSmaller = expand; @@ -1784,9 +2003,9 @@ unlockGlobalParams; } -void GlobalParams::setPSSubstFonts(GBool substFonts) { +void GlobalParams::setPSFontPassthrough(GBool passthrough) { lockGlobalParams; - psSubstFonts = substFonts; + psFontPassthrough = passthrough; unlockGlobalParams; } @@ -1814,6 +2033,24 @@ unlockGlobalParams; } +void GlobalParams::setPSUncompressPreloadedImages(GBool uncomp) { + lockGlobalParams; + psUncompressPreloadedImages = uncomp; + unlockGlobalParams; +} + +void GlobalParams::setPSRasterResolution(double res) { + lockGlobalParams; + psRasterResolution = res; + unlockGlobalParams; +} + +void GlobalParams::setPSRasterMono(GBool mono) { + lockGlobalParams; + psRasterMono = mono; + unlockGlobalParams; +} + void GlobalParams::setTextEncoding(char *encodingName) { lockGlobalParams; delete textEncoding; @@ -1858,6 +2095,14 @@ return ok; } +GBool GlobalParams::setDisableFreeTypeHinting(char *s) { + GBool ok; + + lockGlobalParams; + ok = parseYesNo2(s, &disableFreeTypeHinting); + unlockGlobalParams; + return ok; +} GBool GlobalParams::setAntialias(char *s) { GBool ok; @@ -1877,6 +2122,12 @@ return ok; } +void GlobalParams::setAntialiasPrinting(GBool anti) { + lockGlobalParams; + antialiasPrinting = anti; + unlockGlobalParams; +} + void GlobalParams::setStrokeAdjust(GBool adjust) { lockGlobalParams; @@ -1926,6 +2177,19 @@ unlockGlobalParams; } +void GlobalParams::setMinLineWidth(double minLineWidthA) +{ + lockGlobalParams; + minLineWidth = minLineWidthA; + unlockGlobalParams; +} + +void GlobalParams::setOverprintPreview(GBool overprintPreviewA) { + lockGlobalParams; + overprintPreview = overprintPreviewA; + unlockGlobalParams; +} + void GlobalParams::setMapNumericCharNames(GBool map) { lockGlobalParams; mapNumericCharNames = map; @@ -1956,12 +2220,6 @@ unlockGlobalParams; } -void GlobalParams::setSplashResolution(double SplashResolutionA) { - lockGlobalParams; - splashResolution = SplashResolutionA; - unlockGlobalParams; -} - void GlobalParams::addSecurityHandler(XpdfSecurityHandler *handler) { #ifdef ENABLE_PLUGINS lockGlobalParams; @@ -1988,7 +2246,6 @@ if (!loadPlugin("security", name)) { return NULL; } - deleteGooList(keyBindings, KeyBinding); lockGlobalParams; for (i = 0; i < securityHandlers->getLength(); ++i) { diff -Nru poppler-0.18.4/poppler/GlobalParams.h poppler-0.20.5/poppler/GlobalParams.h --- poppler-0.18.4/poppler/GlobalParams.h 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/GlobalParams.h 2012-06-11 13:19:41.000000000 +0000 @@ -20,9 +20,11 @@ // Copyright (C) 2007 Krzysztof Kowalczyk // Copyright (C) 2009 Jonathan Kew // Copyright (C) 2009 Petr Gajdos -// Copyright (C) 2009, 2011 William Bader +// Copyright (C) 2009, 2011, 2012 William Bader // Copyright (C) 2010 Hib Eris // Copyright (C) 2011 Pino Toscano +// Copyright (C) 2012 Adrian Johnson +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -60,9 +62,7 @@ class GlobalParams; class GfxFont; class Stream; -#ifdef _WIN32 -class WinFontList; -#endif +class SysFontList; //------------------------------------------------------------------------ @@ -71,60 +71,27 @@ //------------------------------------------------------------------------ -enum DisplayFontParamKind { - displayFontT1, - displayFontTT -}; - -struct DisplayFontParamT1 { - GooString *fileName; -}; - -struct DisplayFontParamTT { - GooString *fileName; - int faceIndex; -}; - -class DisplayFontParam { -public: - - GooString *name; // font name for 8-bit fonts and named - // CID fonts; collection name for - // generic CID fonts - DisplayFontParamKind kind; - union { - DisplayFontParamT1 t1; - DisplayFontParamTT tt; - }; - - DisplayFontParam(GooString *nameA, DisplayFontParamKind kindA); - void setFileName(GooString *fileNameA) { - if (displayFontT1 == kind) - t1.fileName = fileNameA; - else { - assert(displayFontTT == kind); - tt.fileName = fileNameA; - } - } - virtual ~DisplayFontParam(); +enum SysFontType { + sysFontPFA, + sysFontPFB, + sysFontTTF, + sysFontTTC }; //------------------------------------------------------------------------ -class PSFontParam { +class PSFontParam16 { public: - GooString *pdfFontName; // PDF font name for 8-bit fonts and - // named 16-bit fonts; char collection - // name for generic 16-bit fonts - int wMode; // writing mode (0=horiz, 1=vert) for - // 16-bit fonts + GooString *name; // PDF font name for psResidentFont16; + // char collection name for psResidentFontCC + int wMode; // writing mode (0=horiz, 1=vert) GooString *psFontName; // PostScript font name - GooString *encoding; // encoding, for 16-bit fonts only + GooString *encoding; // encoding - PSFontParam(GooString *pdfFontNameA, int wModeA, - GooString *psFontNameA, GooString *encodingA); - ~PSFontParam(); + PSFontParam16(GooString *nameA, int wModeA, + GooString *psFontNameA, GooString *encodingA); + ~PSFontParam16(); }; //------------------------------------------------------------------------ @@ -166,46 +133,53 @@ ~GlobalParams(); - void setBaseDir(char *dir); - -#if WITH_FONTCONFIGURATION_WIN32 + void setBaseDir(const char *dir); void setupBaseFonts(char *dir); -#endif //----- accessors CharCode getMacRomanCharCode(char *charName); GooString *getBaseDir(); - Unicode mapNameToUnicode(char *charName); + Unicode mapNameToUnicode(const char *charName); UnicodeMap *getResidentUnicodeMap(GooString *encodingName); FILE *getUnicodeMapFile(GooString *encodingName); FILE *findCMapFile(GooString *collection, GooString *cMapName); FILE *findToUnicodeFile(GooString *name); - DisplayFontParam *getDisplayFont(GfxFont *font); + GooString *findFontFile(GooString *fontName); + GooString *findBase14FontFile(GooString *base14Name, GfxFont *font); + GooString *findSystemFontFile(GfxFont *font, SysFontType *type, + int *fontNum, GooString *substituteFontName = NULL, + GooString *base14Name = NULL); + GooString *findCCFontFile(GooString *collection); GBool getPSExpandSmaller(); GBool getPSShrinkLarger(); GBool getPSCenter(); PSLevel getPSLevel(); - PSFontParam *getPSFont(GooString *fontName); - PSFontParam *getPSFont16(GooString *fontName, GooString *collection, int wMode); + GooString *getPSResidentFont(GooString *fontName); + GooList *getPSResidentFonts(); + PSFontParam16 *getPSResidentFont16(GooString *fontName, int wMode); + PSFontParam16 *getPSResidentFontCC(GooString *collection, int wMode); GBool getPSEmbedType1(); GBool getPSEmbedTrueType(); GBool getPSEmbedCIDPostScript(); GBool getPSEmbedCIDTrueType(); - GBool getPSSubstFonts(); + GBool getPSFontPassthrough(); GBool getPSPreload(); GBool getPSOPI(); GBool getPSASCIIHex(); GBool getPSBinary(); + GBool getPSUncompressPreloadedImages(); + double getPSRasterResolution(); + GBool getPSRasterMono(); GooString *getTextEncodingName(); EndOfLineKind getTextEOL(); GBool getTextPageBreaks(); GBool getTextKeepTinyChars(); - GooString *findFontFile(GooString *fontName, char **exts); GBool getEnableFreeType(); GBool getAntialias(); GBool getVectorAntialias(); + GBool getAntialiasPrinting(); GBool getStrokeAdjust(); ScreenType getScreenType(); int getScreenSize(); @@ -213,6 +187,8 @@ double getScreenGamma(); double getScreenBlackThreshold(); double getScreenWhiteThreshold(); + double getMinLineWidth(); + GBool getOverprintPreview() { return overprintPreview; } GBool getMapNumericCharNames(); GBool getMapUnknownCharNames(); GBool getPrintCommands(); @@ -232,6 +208,8 @@ GooList *getEncodingNames(); //----- functions to set parameters + void addFontFile(GooString *fontName, GooString *path); + void setPSFile(char *file); void setPSExpandSmaller(GBool expand); void setPSShrinkLarger(GBool shrink); void setPSCenter(GBool center); @@ -240,18 +218,23 @@ void setPSEmbedTrueType(GBool embed); void setPSEmbedCIDPostScript(GBool embed); void setPSEmbedCIDTrueType(GBool embed); - void setPSSubstFonts(GBool substFonts); + void setPSFontPassthrough(GBool passthrough); void setPSPreload(GBool preload); void setPSOPI(GBool opi); void setPSASCIIHex(GBool hex); void setPSBinary(GBool binary); + void setPSUncompressPreloadedImages(GBool uncomp); + void setPSRasterResolution(double res); + void setPSRasterMono(GBool mono); void setTextEncoding(char *encodingName); GBool setTextEOL(char *s); void setTextPageBreaks(GBool pageBreaks); void setTextKeepTinyChars(GBool keep); GBool setEnableFreeType(char *s); + GBool setDisableFreeTypeHinting(char *s); GBool setAntialias(char *s); GBool setVectorAntialias(char *s); + void setAntialiasPrinting(GBool print); void setStrokeAdjust(GBool strokeAdjust); void setScreenType(ScreenType st); void setScreenSize(int size); @@ -259,12 +242,13 @@ void setScreenGamma(double gamma); void setScreenBlackThreshold(double blackThreshold); void setScreenWhiteThreshold(double whiteThreshold); + void setMinLineWidth(double minLineWidth); + void setOverprintPreview(GBool overprintPreviewA); void setMapNumericCharNames(GBool map); void setMapUnknownCharNames(GBool map); void setPrintCommands(GBool printCommandsA); void setProfileCommands(GBool profileCommandsA); void setErrQuiet(GBool errQuietA); - void setSplashResolution(double splashResolutionA); //----- security handlers @@ -274,7 +258,7 @@ private: void parseNameToUnicode(GooString *name); - GBool parseYesNo2(char *token, GBool *flag); + GBool parseYesNo2(const char *token, GBool *flag); UnicodeMap *getUnicodeMap2(GooString *encodingName); void scanEncodingDirs(); @@ -304,40 +288,56 @@ GooHash *cMapDirs; // list of CMap dirs, indexed by collection // name [GooList[GooString]] GooList *toUnicodeDirs; // list of ToUnicode CMap dirs [GooString] - GooHash *displayFonts; // display font info, indexed by font name - // [DisplayFontParam] -#ifdef _WIN32 GBool baseFontsInitialized; - WinFontList *winFontList; // system TrueType fonts +#ifdef _WIN32 + GooHash *substFiles; // windows font substitutes (for CID fonts) #endif + GooHash *fontFiles; // font files: font name mapped to path + // [GString] + GooList *fontDirs; // list of font dirs [GString] + GooHash *ccFontFiles; // character collection font files: + // collection name mapped to path [GString] + SysFontList *sysFonts; // system fonts + GooString *psFile; // PostScript file or command (for xpdf) GBool psExpandSmaller; // expand smaller pages to fill paper GBool psShrinkLarger; // shrink larger pages to fit paper GBool psCenter; // center pages on the paper PSLevel psLevel; // PostScript level to generate - GooHash *psFonts; // PostScript font info, indexed by PDF - // font name [PSFontParam] - GooList *psNamedFonts16; // named 16-bit fonts [PSFontParam] - GooList *psFonts16; // generic 16-bit fonts [PSFontParam] + GooHash *psResidentFonts; // 8-bit fonts resident in printer: + // PDF font name mapped to PS font name + // [GString] + GooList *psResidentFonts16; // 16-bit fonts resident in printer: + // PDF font name mapped to font info + // [PSFontParam16] + GooList *psResidentFontsCC; // 16-bit character collection fonts + // resident in printer: collection name + // mapped to font info [PSFontParam16] GBool psEmbedType1; // embed Type 1 fonts? GBool psEmbedTrueType; // embed TrueType fonts? GBool psEmbedCIDPostScript; // embed CID PostScript fonts? GBool psEmbedCIDTrueType; // embed CID TrueType fonts? - GBool psSubstFonts; // substitute missing fonts? + GBool psFontPassthrough; // pass all fonts through as-is? GBool psPreload; // preload PostScript images and forms into // memory GBool psOPI; // generate PostScript OPI comments? GBool psASCIIHex; // use ASCIIHex instead of ASCII85? GBool psBinary; // use binary instead of hex + GBool psUncompressPreloadedImages; // uncompress all preloaded images + double psRasterResolution; // PostScript rasterization resolution (dpi) + GBool psRasterMono; // true to do PostScript rasterization + // in monochrome (gray); false to do it + // in color (RGB/CMYK) GooString *textEncoding; // encoding (unicodeMap) to use for text // output EndOfLineKind textEOL; // type of EOL marker to use for text // output GBool textPageBreaks; // insert end-of-page markers? GBool textKeepTinyChars; // keep all characters in text output - GooList *fontDirs; // list of font dirs [GooString] GBool enableFreeType; // FreeType enable flag + GBool disableFreeTypeHinting; // FreeType disable hinting flag GBool antialias; // anti-aliasing enable flag GBool vectorAntialias; // vector anti-aliasing enable flag + GBool antialiasPrinting; // allow anti-aliasing when printing GBool strokeAdjust; // stroke adjustment enable flag ScreenType screenType; // halftone screen type int screenSize; // screen matrix size @@ -345,6 +345,8 @@ double screenGamma; // screen gamma correction double screenBlackThreshold; // screen black clamping threshold double screenWhiteThreshold; // screen white clamping threshold + double minLineWidth; // minimum line width + GBool overprintPreview; // enable overprint preview GBool mapNumericCharNames; // map numeric char names (from font subsets)? GBool mapUnknownCharNames; // map unknown char names? GBool printCommands; // print the drawing commands @@ -358,8 +360,8 @@ CMapCache *cMapCache; #ifdef ENABLE_PLUGINS - GList *plugins; // list of plugins [Plugin] - GList *securityHandlers; // list of loaded security handlers + GooList *plugins; // list of plugins [Plugin] + GooList *securityHandlers; // list of loaded security handlers // [XpdfSecurityHandler] #endif diff -Nru poppler-0.18.4/poppler/GlobalParamsWin.cc poppler-0.20.5/poppler/GlobalParamsWin.cc --- poppler-0.18.4/poppler/GlobalParamsWin.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/GlobalParamsWin.cc 2012-08-15 13:31:38.000000000 +0000 @@ -2,6 +2,10 @@ but mostly based on xpdf code. // Copyright (C) 2010 Hib Eris + // Copyright (C) 2012 Thomas Freitag + // Copyright (C) 2012 Suzuki Toshiya + // Copyright (C) 2012 Adrian Johnson + // Copyright (C) 2012 Mark Brand TODO: instead of a fixed mapping defined in displayFontTab, it could scan the whole fonts directory, parse TTF files and build font @@ -40,6 +44,11 @@ #include "FontEncodingTables.h" #include "GlobalParams.h" #include "GfxFont.h" +#include +#include "Object.h" +#include "Stream.h" +#include "Lexer.h" +#include "Parser.h" #if MULTITHREADED # define lockGlobalParams gLockMutex(&mutex) @@ -58,96 +67,109 @@ #endif #define DEFAULT_SUBSTITUTE_FONT "Helvetica" +#define DEFAULT_CID_FONT_AC1_MSWIN "MingLiU" /* Adobe-CNS1 for Taiwan, HongKong */ +#define DEFAULT_CID_FONT_AG1_MSWIN "SimSun" /* Adobe-GB1 for PRC, Singapore */ +#define DEFAULT_CID_FONT_AJ1_MSWIN "MS-Mincho" /* Adobe-Japan1 */ +#define DEFAULT_CID_FONT_AJ2_MSWIN "MS-Mincho" /* Adobe-Japan2 (legacy) */ +#define DEFAULT_CID_FONT_AK1_MSWIN "Batang" /* Adobe-Korea1 */ +#define DEFAULT_CID_FONT_MSWIN "ArialUnicode" /* Unknown */ static struct { - char *name; - char *t1FileName; - char *ttFileName; + const char *name; + const char *t1FileName; + const char *ttFileName; + GBool warnIfMissing; } displayFontTab[] = { - {"Courier", "n022003l.pfb", "cour.ttf"}, - {"Courier-Bold", "n022004l.pfb", "courbd.ttf"}, - {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf"}, - {"Courier-Oblique", "n022023l.pfb", "couri.ttf"}, - {"Helvetica", "n019003l.pfb", "arial.ttf"}, - {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf"}, - {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf"}, - {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf"}, + {"Courier", "n022003l.pfb", "cour.ttf", gTrue}, + {"Courier-Bold", "n022004l.pfb", "courbd.ttf", gTrue}, + {"Courier-BoldOblique", "n022024l.pfb", "courbi.ttf", gTrue}, + {"Courier-Oblique", "n022023l.pfb", "couri.ttf", gTrue}, + {"Helvetica", "n019003l.pfb", "arial.ttf", gTrue}, + {"Helvetica-Bold", "n019004l.pfb", "arialbd.ttf", gTrue}, + {"Helvetica-BoldOblique", "n019024l.pfb", "arialbi.ttf", gTrue}, + {"Helvetica-Oblique", "n019023l.pfb", "ariali.ttf", gTrue}, // TODO: not sure if "symbol.ttf" is right - {"Symbol", "s050000l.pfb", "symbol.ttf"}, - {"Times-Bold", "n021004l.pfb", "timesbd.ttf"}, - {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf"}, - {"Times-Italic", "n021023l.pfb", "timesi.ttf"}, - {"Times-Roman", "n021003l.pfb", "times.ttf"}, + {"Symbol", "s050000l.pfb", "symbol.ttf", gTrue}, + {"Times-Bold", "n021004l.pfb", "timesbd.ttf", gTrue}, + {"Times-BoldItalic", "n021024l.pfb", "timesbi.ttf", gTrue}, + {"Times-Italic", "n021023l.pfb", "timesi.ttf", gTrue}, + {"Times-Roman", "n021003l.pfb", "times.ttf", gTrue}, // TODO: not sure if "wingding.ttf" is right - {"ZapfDingbats", "d050000l.pfb", "wingding.ttf"}, + {"ZapfDingbats", "d050000l.pfb", "wingding.ttf", gTrue}, // those seem to be frequently accessed by PDF files and I kind of guess // which font file do the refer to - {"Palatino", NULL, "pala.ttf"}, - {"Palatino-Roman", NULL, "pala.ttf"}, - {"Palatino-Bold", NULL, "palab.ttf"}, - {"Palatino-Italic", NULL, "palai.ttf"}, - {"Palatino,Italic", NULL, "palai.ttf"}, - {"Palatino-BoldItalic", NULL, "palabi.ttf"}, - - {"ArialBlack", NULL, "arialbd.ttf"}, - - {"ArialNarrow", NULL, "arialn.ttf"}, - {"ArialNarrow,Bold", NULL, "arialnb.ttf"}, - {"ArialNarrow,Italic", NULL, "arialni.ttf"}, - {"ArialNarrow,BoldItalic", NULL, "arialnbi.ttf"}, - {"ArialNarrow-Bold", NULL, "arialnb.ttf"}, - {"ArialNarrow-Italic", NULL, "arialni.ttf"}, - {"ArialNarrow-BoldItalic", NULL, "arialnbi.ttf"}, - - {"HelveticaNarrow", NULL, "arialn.ttf"}, - {"HelveticaNarrow,Bold", NULL, "arialnb.ttf"}, - {"HelveticaNarrow,Italic", NULL, "arialni.ttf"}, - {"HelveticaNarrow,BoldItalic", NULL, "arialnbi.ttf"}, - {"HelveticaNarrow-Bold", NULL, "arialnb.ttf"}, - {"HelveticaNarrow-Italic", NULL, "arialni.ttf"}, - {"HelveticaNarrow-BoldItalic", NULL, "arialnbi.ttf"}, - - {"BookAntiqua", NULL, "bkant.ttf"}, - {"BookAntiqua,Bold", NULL, "bkant.ttf"}, - {"BookAntiqua,Italic", NULL, "bkant.ttf"}, - {"BookAntiqua,BoldItalic", NULL, "bkant.ttf"}, - {"BookAntiqua-Bold", NULL, "bkant.ttf"}, - {"BookAntiqua-Italic", NULL, "bkant.ttf"}, - {"BookAntiqua-BoldItalic", NULL, "bkant.ttf"}, - - {"Verdana", NULL, "verdana.ttf"}, - {"Verdana,Bold", NULL, "verdanab.ttf"}, - {"Verdana,Italic", NULL, "verdanai.ttf"}, - {"Verdana,BoldItalic", NULL, "verdanaz.ttf"}, - {"Verdana-Bold", NULL, "verdanab.ttf"}, - {"Verdana-Italic", NULL, "verdanai.ttf"}, - {"Verdana-BoldItalic", NULL, "verdanaz.ttf"}, - - {"Tahoma", NULL, "tahoma.ttf"}, - {"Tahoma,Bold", NULL, "tahomabd.ttf"}, - {"Tahoma,Italic", NULL, "tahoma.ttf"}, - {"Tahoma,BoldItalic", NULL, "tahomabd.ttf"}, - {"Tahoma-Bold", NULL, "tahomabd.ttf"}, - {"Tahoma-Italic", NULL, "tahoma.ttf"}, - {"Tahoma-BoldItalic", NULL, "tahomabd.ttf"}, - - {"CCRIKH+Verdana", NULL, "verdana.ttf"}, - {"CCRIKH+Verdana,Bold", NULL, "verdanab.ttf"}, - {"CCRIKH+Verdana,Italic", NULL, "verdanai.ttf"}, - {"CCRIKH+Verdana,BoldItalic", NULL, "verdanaz.ttf"}, - {"CCRIKH+Verdana-Bold", NULL, "verdanab.ttf"}, - {"CCRIKH+Verdana-Italic", NULL, "verdanai.ttf"}, - {"CCRIKH+Verdana-BoldItalic", NULL, "verdanaz.ttf"}, - - {"Georgia", NULL, "georgia.ttf"}, - {"Georgia,Bold", NULL, "georgiab.ttf"}, - {"Georgia,Italic", NULL, "georgiai.ttf"}, - {"Georgia,BoldItalic", NULL, "georgiaz.ttf"}, - {"Georgia-Bold", NULL, "georgiab.ttf"}, - {"Georgia-Italic", NULL, "georgiai.ttf"}, - {"Georgia-BoldItalic", NULL, "georgiaz.ttf"}, - + {"Palatino", NULL, "pala.ttf", gTrue}, + {"Palatino-Roman", NULL, "pala.ttf", gTrue}, + {"Palatino-Bold", NULL, "palab.ttf", gTrue}, + {"Palatino-Italic", NULL, "palai.ttf", gTrue}, + {"Palatino,Italic", NULL, "palai.ttf", gTrue}, + {"Palatino-BoldItalic", NULL, "palabi.ttf", gTrue}, + + {"ArialBlack", NULL, "arialbd.ttf", gTrue}, + + {"ArialNarrow", NULL, "arialn.ttf", gTrue}, + {"ArialNarrow,Bold", NULL, "arialnb.ttf", gTrue}, + {"ArialNarrow,Italic", NULL, "arialni.ttf", gTrue}, + {"ArialNarrow,BoldItalic", NULL, "arialnbi.ttf", gTrue}, + {"ArialNarrow-Bold", NULL, "arialnb.ttf", gTrue}, + {"ArialNarrow-Italic", NULL, "arialni.ttf", gTrue}, + {"ArialNarrow-BoldItalic", NULL, "arialnbi.ttf", gTrue}, + + {"HelveticaNarrow", NULL, "arialn.ttf", gTrue}, + {"HelveticaNarrow,Bold", NULL, "arialnb.ttf", gTrue}, + {"HelveticaNarrow,Italic", NULL, "arialni.ttf", gTrue}, + {"HelveticaNarrow,BoldItalic", NULL, "arialnbi.ttf", gTrue}, + {"HelveticaNarrow-Bold", NULL, "arialnb.ttf", gTrue}, + {"HelveticaNarrow-Italic", NULL, "arialni.ttf", gTrue}, + {"HelveticaNarrow-BoldItalic", NULL, "arialnbi.ttf", gTrue}, + + {"BookAntiqua", NULL, "bkant.ttf", gTrue}, + {"BookAntiqua,Bold", NULL, "bkant.ttf", gTrue}, + {"BookAntiqua,Italic", NULL, "bkant.ttf", gTrue}, + {"BookAntiqua,BoldItalic", NULL, "bkant.ttf", gTrue}, + {"BookAntiqua-Bold", NULL, "bkant.ttf", gTrue}, + {"BookAntiqua-Italic", NULL, "bkant.ttf", gTrue}, + {"BookAntiqua-BoldItalic", NULL, "bkant.ttf", gTrue}, + + {"Verdana", NULL, "verdana.ttf", gTrue}, + {"Verdana,Bold", NULL, "verdanab.ttf", gTrue}, + {"Verdana,Italic", NULL, "verdanai.ttf", gTrue}, + {"Verdana,BoldItalic", NULL, "verdanaz.ttf", gTrue}, + {"Verdana-Bold", NULL, "verdanab.ttf", gTrue}, + {"Verdana-Italic", NULL, "verdanai.ttf", gTrue}, + {"Verdana-BoldItalic", NULL, "verdanaz.ttf", gTrue}, + + {"Tahoma", NULL, "tahoma.ttf", gTrue}, + {"Tahoma,Bold", NULL, "tahomabd.ttf", gTrue}, + {"Tahoma,Italic", NULL, "tahoma.ttf", gTrue}, + {"Tahoma,BoldItalic", NULL, "tahomabd.ttf", gTrue}, + {"Tahoma-Bold", NULL, "tahomabd.ttf", gTrue}, + {"Tahoma-Italic", NULL, "tahoma.ttf", gTrue}, + {"Tahoma-BoldItalic", NULL, "tahomabd.ttf", gTrue}, + + {"CCRIKH+Verdana", NULL, "verdana.ttf", gTrue}, + {"CCRIKH+Verdana,Bold", NULL, "verdanab.ttf", gTrue}, + {"CCRIKH+Verdana,Italic", NULL, "verdanai.ttf", gTrue}, + {"CCRIKH+Verdana,BoldItalic", NULL, "verdanaz.ttf", gTrue}, + {"CCRIKH+Verdana-Bold", NULL, "verdanab.ttf", gTrue}, + {"CCRIKH+Verdana-Italic", NULL, "verdanai.ttf", gTrue}, + {"CCRIKH+Verdana-BoldItalic", NULL, "verdanaz.ttf", gTrue}, + + {"Georgia", NULL, "georgia.ttf", gTrue}, + {"Georgia,Bold", NULL, "georgiab.ttf", gTrue}, + {"Georgia,Italic", NULL, "georgiai.ttf", gTrue}, + {"Georgia,BoldItalic", NULL, "georgiaz.ttf", gTrue}, + {"Georgia-Bold", NULL, "georgiab.ttf", gTrue}, + {"Georgia-Italic", NULL, "georgiai.ttf", gTrue}, + {"Georgia-BoldItalic", NULL, "georgiaz.ttf", gTrue}, + + // fallback for Adobe CID fonts: + {"MingLiU", NULL, "mingliu.ttf", gFalse}, + {"SimSun", NULL, "simsun.ttf", gFalse}, + {"MS-Mincho", NULL, "msmincho.ttf", gFalse}, + {"Batang", NULL, "batang.ttf", gFalse}, + {"ArialUnicode", NULL, "arialuni.ttf", gTrue}, {NULL} }; @@ -218,15 +240,178 @@ return false; } -static void AddFont(GooHash *displayFonts, char *fontName, GooString *fontPath, DisplayFontParamKind kind) +void SysFontList::scanWindowsFonts(GooString *winFontDir) { + OSVERSIONINFO version; + char *path; + DWORD idx, valNameLen, dataLen, type; + HKEY regKey; + char valName[1024], data[1024]; + int n, fontNum; + char *p0, *p1; + GooString *fontPath; + + version.dwOSVersionInfoSize = sizeof(version); + GetVersionEx(&version); + if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { + path = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Fonts\\"; + } else { + path = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Fonts\\"; + } + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, path, 0, + KEY_QUERY_VALUE | KEY_ENUMERATE_SUB_KEYS, + ®Key) == ERROR_SUCCESS) { + idx = 0; + while (1) { + valNameLen = sizeof(valName) - 1; + dataLen = sizeof(data) - 1; + if (RegEnumValue(regKey, idx, valName, &valNameLen, NULL, + &type, (LPBYTE)data, &dataLen) != ERROR_SUCCESS) { + break; + } + if (type == REG_SZ && + valNameLen > 0 && valNameLen < sizeof(valName) && + dataLen > 0 && dataLen < sizeof(data)) { + valName[valNameLen] = '\0'; + data[dataLen] = '\0'; + n = strlen(data); + if (!strcasecmp(data + n - 4, ".ttf") || + !strcasecmp(data + n - 4, ".ttc") || + !strcasecmp(data + n - 4, ".otf")) { + fontPath = new GooString(data); + if (!(dataLen >= 3 && data[1] == ':' && data[2] == '\\')) { + fontPath->insert(0, '\\'); + fontPath->insert(0, winFontDir); + fontPath->append('\0'); + } + p0 = valName; + fontNum = 0; + while (*p0) { + p1 = strstr(p0, " & "); + if (p1) { + *p1 = '\0'; + p1 = p1 + 3; + } else { + p1 = p0 + strlen(p0); + } + fonts->append(makeWindowsFont(p0, fontNum, + fontPath->getCString())); + p0 = p1; + ++fontNum; + } + delete fontPath; + } + } + ++idx; + } + RegCloseKey(regKey); + } +} + +SysFontInfo *SysFontList::makeWindowsFont(char *name, int fontNum, + char *path) { + int n; + GBool bold, italic, oblique, fixedWidth; + GooString *s; + char c; + int i; + SysFontType type; + GooString substituteName; + + n = strlen(name); + bold = italic = oblique = fixedWidth = gFalse; + + // remove trailing ' (TrueType)' + if (n > 11 && !strncmp(name + n - 11, " (TrueType)", 11)) { + n -= 11; + } + + // remove trailing ' (OpenType)' + if (n > 11 && !strncmp(name + n - 11, " (OpenType)", 11)) { + n -= 11; + } + + // remove trailing ' Italic' + if (n > 7 && !strncmp(name + n - 7, " Italic", 7)) { + n -= 7; + italic = gTrue; + } + + // remove trailing ' Oblique' + if (n > 7 && !strncmp(name + n - 8, " Oblique", 8)) { + n -= 8; + oblique = gTrue; + } + + // remove trailing ' Bold' + if (n > 5 && !strncmp(name + n - 5, " Bold", 5)) { + n -= 5; + bold = gTrue; + } + + // remove trailing ' Regular' + if (n > 5 && !strncmp(name + n - 8, " Regular", 8)) { + n -= 8; + } + + // the familyname cannot indicate whether a font is fixedWidth or not. + // some well-known fixedWidth typeface family names or keyword are checked. + if ( strstr(name, "Courier") || + strstr(name, "Fixed") || + (strstr(name, "Mono") && !strstr(name, "Monotype")) || + strstr(name, "Typewriter") ) + fixedWidth = gTrue; + else + fixedWidth = gFalse; + + + //----- normalize the font name + s = new GooString(name, n); + i = 0; + while (i < s->getLength()) { + c = s->getChar(i); + if (c == ' ' || c == ',' || c == '-') { + s->del(i); + } else { + ++i; + } + } + + if (!strcasecmp(path + strlen(path) - 4, ".ttc")) { + type = sysFontTTC; + } else { + type = sysFontTTF; + } + + return new SysFontInfo(s, bold, italic, oblique, fixedWidth, + new GooString(path), type, fontNum, substituteName.copy()); +} + +static GooString* replaceSuffix(GooString *path, + const char* suffixA, const char* suffixB) { - DisplayFontParam *dfp = new DisplayFontParam(new GooString(fontName), kind); - dfp->setFileName(fontPath); - displayFonts->add(dfp->name, dfp); + int suffLenA = strlen(suffixA); + int suffLenB = strlen(suffixB); + int baseLenA = path->getLength() - suffLenA; + int baseLenB = path->getLength() - suffLenB; + + if (!strcasecmp(path->getCString()+baseLenA, suffixA)) { + path->del(baseLenA,suffLenA)->append(suffixB); + } else if (!strcasecmp(path->getCString()+baseLenB, suffixB)) { + path->del(baseLenB,suffLenB)->append(suffixA); + } + + return path; } + void GlobalParams::setupBaseFonts(char * dir) { + const char *dataRoot = popplerDataDir ? popplerDataDir : POPPLER_DATADIR; + GooString *fileName = NULL; + struct stat buf; + FILE *file; + int size = 0; + if (baseFontsInitialized) return; baseFontsInitialized = true; @@ -235,14 +420,15 @@ GetWindowsFontDir(winFontDir, sizeof(winFontDir)); for (int i = 0; displayFontTab[i].name; ++i) { - char *fontName = displayFontTab[i].name; - if (displayFonts->lookup(fontName)) + GooString *fontName = new GooString(displayFontTab[i].name); + if (fontFiles->lookup(fontName)) continue; if (dir) { GooString *fontPath = appendToPath(new GooString(dir), displayFontTab[i].t1FileName); - if (FileExists(fontPath->getCString())) { - AddFont(displayFonts, fontName, fontPath, displayFontT1); + if (FileExists(fontPath->getCString()) || + FileExists(replaceSuffix(fontPath, ".pfb", ".pfa")->getCString())) { + addFontFile(fontName, fontPath); continue; } delete fontPath; @@ -250,42 +436,163 @@ if (winFontDir[0] && displayFontTab[i].ttFileName) { GooString *fontPath = appendToPath(new GooString(winFontDir), displayFontTab[i].ttFileName); - if (FileExists(fontPath->getCString())) { - AddFont(displayFonts, fontName, fontPath, displayFontTT); + if (FileExists(fontPath->getCString()) || + FileExists(replaceSuffix(fontPath, ".ttc", ".ttf")->getCString())) { + addFontFile(fontName, fontPath); continue; } delete fontPath; } - error(-1, "No display font for '%s'", fontName); + if (displayFontTab[i].warnIfMissing) + error(errSyntaxError, -1, "No display font for '{0:s}'", fontName); + } + if (winFontDir[0]) { + sysFonts->scanWindowsFonts(new GooString(winFontDir)); + } + + fileName = new GooString(dataRoot); + fileName->append("/cidfmap"); + if (stat(fileName->getCString(), &buf) == 0) { + size = buf.st_size; + } + // try to open file +#ifdef VMS + file = fopen(fileName->getCString(), "rb", "ctx=stm"); +#else + file = fopen(fileName->getCString(), "rb"); +#endif + + if (file != NULL) { + Parser *parser; + Object obj1, obj2; + + obj1.initNull(); + parser = new Parser(NULL, + new Lexer(NULL, + new FileStream(file, 0, gFalse, size, &obj1)), + gTrue); + obj1.free(); + parser->getObj(&obj1); + while (!obj1.isEOF()) { + parser->getObj(&obj2); + if (obj1.isName()) { + // Substitutions + if (obj2.isDict()) { + Object obj3; + obj2.getDict()->lookup("Path", &obj3); + if (obj3.isString()) + addFontFile(new GooString(obj1.getName()), obj3.getString()->copy()); + obj3.free(); + // Aliases + } else if (obj2.isName()) { + substFiles->add(new GooString(obj1.getName()), new GooString(obj2.getName())); + } + } + obj2.free(); + obj1.free(); + parser->getObj(&obj1); + // skip trailing ';' + while (obj1.isCmd(";")) { + obj1.free(); + parser->getObj(&obj1); + } + } + fclose(file); + delete parser; } } -static char *findSubstituteName(const char *origName) +static const char *findSubstituteName(GfxFont *font, GooHash *fontFiles, + GooHash *substFiles, + const char *origName) { assert(origName); if (!origName) return NULL; + GooString *name2 = new GooString(origName); + int n = strlen(origName); + // remove trailing "-Identity-H" + if (n > 11 && !strcmp(name2->getCString() + n - 11, "-Identity-H")) { + name2->del(n - 11, 11); + n -= 11; + } + // remove trailing "-Identity-V" + if (n > 11 && !strcmp(name2->getCString() + n - 11, "-Identity-V")) { + name2->del(n - 11, 11); + n -= 11; + } + GooString *substName = (GooString *)substFiles->lookup(name2); + if (substName != NULL) { + delete name2; + return substName->getCString(); + } + /* TODO: try to at least guess bold/italic/bolditalic from the name */ + delete name2; + if (font->isCIDFont()) { + GooString *collection = ((GfxCIDFont *)font)->getCollection(); + + const char* name3 = NULL; + if ( !collection->cmp("Adobe-CNS1") ) + name3 = DEFAULT_CID_FONT_AC1_MSWIN; + else if ( !collection->cmp("Adobe-GB1") ) + name3 = DEFAULT_CID_FONT_AG1_MSWIN; + else if ( !collection->cmp("Adobe-Japan1") ) + name3 = DEFAULT_CID_FONT_AJ1_MSWIN; + else if ( !collection->cmp("Adobe-Japan2") ) + name3 = DEFAULT_CID_FONT_AJ2_MSWIN; + else if ( !collection->cmp("Adobe-Korea1") ) + name3 = DEFAULT_CID_FONT_AK1_MSWIN; + + if (name3 && fontFiles->lookup(name3)) + return name3; + + if (fontFiles->lookup(DEFAULT_CID_FONT_MSWIN)) + return DEFAULT_CID_FONT_MSWIN; + } return DEFAULT_SUBSTITUTE_FONT; } /* Windows implementation of external font matching code */ -DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) { - DisplayFontParam * dfp; - GooString * fontName = font->getName(); - char * substFontName = NULL; - - if (!fontName) return NULL; - lockGlobalParams; - setupBaseFonts(NULL); - dfp = (DisplayFontParam *)displayFonts->lookup(fontName); - if (!dfp) { - substFontName = findSubstituteName(fontName->getCString()); - error(-1, "Couldn't find a font for '%s', subst is '%s'", fontName->getCString(), substFontName); - dfp = (DisplayFontParam *)displayFonts->lookup(substFontName); - assert(dfp); +GooString *GlobalParams::findSystemFontFile(GfxFont *font, + SysFontType *type, + int *fontNum, GooString *substituteFontName, + GooString *base14Name) { + SysFontInfo *fi; + GooString *path = NULL; + GooString *fontName = font->getName(); + if (!fontName) return NULL; + lockGlobalParams; + setupBaseFonts(NULL); + + // TODO: base14Name should be changed? + // In the system using FontConfig, findSystemFontFile() uses + // base14Name only for the creation of query pattern. + + if ((fi = sysFonts->find(fontName, gFalse, gFalse))) { + path = fi->path->copy(); + *type = fi->type; + *fontNum = fi->fontNum; + if (substituteFontName) + substituteFontName->Set(fi->substituteName->getCString()); + } else { + GooString *substFontName = new GooString(findSubstituteName(font, fontFiles, + substFiles, + fontName->getCString())); + GooString *path2 = NULL; + error(errSyntaxError, -1, "Couldn't find a font for '{0:t}', subst is '{1:t}'", fontName, substFontName); + if ((path2 = (GooString *)fontFiles->lookup(substFontName))) { + path = new GooString(path2); + if (substituteFontName) + substituteFontName->Set(path->getCString()); + if (!strcasecmp(path->getCString() + path->getLength() - 4, ".ttc")) { + *type = sysFontTTC; + } else { + *type = sysFontTTF; + } + *fontNum = 0; } - unlockGlobalParams; - return dfp; + } + unlockGlobalParams; + return path; } - diff -Nru poppler-0.18.4/poppler/Hints.cc poppler-0.20.5/poppler/Hints.cc --- poppler-0.18.4/poppler/Hints.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/Hints.cc 2012-05-10 20:05:44.000000000 +0000 @@ -4,7 +4,7 @@ // // This file is licensed under the GPLv2 or later // -// Copyright 2010 Hib Eris +// Copyright 2010, 2012 Hib Eris // Copyright 2010, 2011 Albert Astals Cid // Copyright 2010 Pino Toscano // @@ -36,7 +36,7 @@ pageEndFirst = linearization->getEndFirst(); pageObjectFirst = linearization->getObjectNumberFirst(); if (pageObjectFirst < 0 || pageObjectFirst >= xref->getNumObjects()) { - error(-1, + error(errSyntaxWarning, -1, "Invalid reference for first page object (%d) in linearization table ", pageObjectFirst); pageObjectFirst = 0; @@ -44,7 +44,7 @@ pageOffsetFirst = xref->getEntry(pageObjectFirst)->offset; if (nPages >= INT_MAX / (int)sizeof(Guint)) { - error(-1, "Invalid number of pages (%d) for hints table", nPages); + error(errSyntaxWarning, -1, "Invalid number of pages ({0:d}) for hints table", nPages); nPages = 0; } nObjects = (Guint *) gmallocn_checkoverflow(nPages, sizeof(Guint)); @@ -56,10 +56,12 @@ sharedObjectId = (Guint **) gmallocn_checkoverflow(nPages, sizeof(Guint*)); if (!nObjects || !pageObjectNum || !xRefOffset || !pageLength || !pageOffset || !numSharedObject || !sharedObjectId) { - error(-1, "Failed to allocate memory for hints tabel"); + error(errSyntaxWarning, -1, "Failed to allocate memory for hints tabel"); nPages = 0; } + memset(pageLength, 0, nPages * sizeof(Guint)); + memset(pageOffset, 0, nPages * sizeof(Guint)); memset(numSharedObject, 0, nPages * sizeof(Guint)); memset(pageObjectNum, 0, nPages * sizeof(int)); @@ -134,11 +136,11 @@ if (parser->getObj(&obj)->isInt() && (num = obj.getInt(), obj.free(), parser->getObj(&obj)->isInt()) && (gen = obj.getInt(), obj.free(), parser->getObj(&obj)->isCmd("obj")) && - (obj.free(), parser->getObj(&obj, + (obj.free(), parser->getObj(&obj, gFalse, secHdlr ? secHdlr->getFileKey() : (Guchar *)NULL, secHdlr ? secHdlr->getEncAlgorithm() : cryptRC4, secHdlr ? secHdlr->getFileKeyLength() : 0, - num, gen)->isStream())) { + num, gen, 0, gTrue)->isStream())) { Stream *hintsStream = obj.getStream(); Dict *hintsDict = obj.streamGetDict(); @@ -153,10 +155,10 @@ for (int i=0; igetChar(); readSharedObjectsTable(hintsStream); } else { - error(-1, "Invalid shared object hint table offset"); + error(errSyntaxWarning, -1, "Invalid shared object hint table offset"); } } else { - error(-1, "Failed parsing hints table object"); + error(errSyntaxWarning, -1, "Failed parsing hints table object"); } obj.free(); @@ -166,7 +168,7 @@ void Hints::readPageOffsetTable(Stream *str) { if (nPages < 1) { - error(-1, "Invalid number of pages reading page offset hints table"); + error(errSyntaxWarning, -1, "Invalid number of pages reading page offset hints table"); return; } @@ -227,13 +229,13 @@ for (int i=1; i= INT_MAX / (int)sizeof(Guint)) { - error(-1, "Invalid number of shared objects"); + error(errSyntaxWarning, -1, "Invalid number of shared objects"); numSharedObject[i] = 0; return; } sharedObjectId[i] = (Guint *) gmallocn_checkoverflow(numSharedObject[i], sizeof(Guint)); if (numSharedObject[i] && !sharedObjectId[i]) { - error(-1, "Failed to allocate memory for shared object IDs"); + error(errSyntaxWarning, -1, "Failed to allocate memory for shared object IDs"); numSharedObject[i] = 0; return; } @@ -274,12 +276,12 @@ Guint nBitsDiffGroupLength = readBits(16, str); if ((!nSharedGroups) || (nSharedGroups >= INT_MAX / (int)sizeof(Guint))) { - error(-1, "Invalid number of shared object groups"); + error(errSyntaxWarning, -1, "Invalid number of shared object groups"); nSharedGroups = 0; return; } if ((!nSharedGroupsFirst) || (nSharedGroupsFirst > nSharedGroups)) { - error(-1, "Invalid number of first page shared object groups"); + error(errSyntaxWarning, -1, "Invalid number of first page shared object groups"); nSharedGroupsFirst = nSharedGroups; } @@ -290,7 +292,7 @@ groupXRefOffset = (Guint *) gmallocn_checkoverflow(nSharedGroups, sizeof(Guint)); if (!groupLength || !groupOffset || !groupHasSignature || !groupNumObjects || !groupXRefOffset) { - error(-1, "Failed to allocate memory for shared object groups"); + error(errSyntaxWarning, -1, "Failed to allocate memory for shared object groups"); nSharedGroups = 0; return; } diff -Nru poppler-0.18.4/poppler/JArithmeticDecoder.cc poppler-0.20.5/poppler/JArithmeticDecoder.cc --- poppler-0.18.4/poppler/JArithmeticDecoder.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JArithmeticDecoder.cc 2012-05-10 20:05:44.000000000 +0000 @@ -91,6 +91,7 @@ str = NULL; dataLen = 0; limitStream = gFalse; + nBytesRead = 0; } inline Guint JArithmeticDecoder::readByte() { @@ -100,6 +101,7 @@ return 0xff; } } + ++nBytesRead; return (Guint)str->getChar() & 0xff; } @@ -120,14 +122,40 @@ } void JArithmeticDecoder::restart(int dataLenA) { - int oldDataLen; - - oldDataLen = dataLen; - dataLen = dataLenA; - if (oldDataLen == -1) { + Guint cAdd; + GBool prevFF; + int k, nBits; + + if (dataLen >= 0) { + dataLen = dataLenA; + } else if (dataLen == -1) { + dataLen = dataLenA; buf1 = readByte(); - } else if (oldDataLen <= -2) { - buf0 = readByte(); + } else { + k = (-dataLen - 1) * 8 - ct; + dataLen = dataLenA; + cAdd = 0; + prevFF = gFalse; + while (k > 0) { + buf0 = readByte(); + if (prevFF) { + cAdd += 0xfe00 - (buf0 << 9); + nBits = 7; + } else { + cAdd += 0xff00 - (buf0 << 8); + nBits = 8; + } + prevFF = buf0 == 0xff; + if (k > nBits) { + cAdd <<= nBits; + k -= nBits; + } else { + cAdd <<= k; + ct = nBits - k; + k = 0; + } + } + c += cAdd; buf1 = readByte(); } } @@ -306,6 +334,11 @@ void JArithmeticDecoder::byteIn() { if (buf0 == 0xff) { if (buf1 > 0x8f) { + if (limitStream) { + buf0 = buf1; + buf1 = readByte(); + c = c + 0xff00 - (buf0 << 8); + } ct = 8; } else { buf0 = buf1; diff -Nru poppler-0.18.4/poppler/JArithmeticDecoder.h poppler-0.20.5/poppler/JArithmeticDecoder.h --- poppler-0.18.4/poppler/JArithmeticDecoder.h 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JArithmeticDecoder.h 2012-05-10 20:05:44.000000000 +0000 @@ -82,6 +82,9 @@ Guint decodeIAID(Guint codeLen, JArithmeticDecoderStats *stats); + void resetByteCounter() { nBytesRead = 0; } + Guint getByteCounter() { return nBytesRead; } + private: Guint readByte(); @@ -100,6 +103,7 @@ Guint prev; // for the integer decoder Stream *str; + Guint nBytesRead; int dataLen; GBool limitStream; }; diff -Nru poppler-0.18.4/poppler/JBIG2Stream.cc poppler-0.20.5/poppler/JBIG2Stream.cc --- poppler-0.18.4/poppler/JBIG2Stream.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JBIG2Stream.cc 2012-09-26 10:55:07.000000000 +0000 @@ -15,9 +15,11 @@ // // Copyright (C) 2006 Raj Kumar // Copyright (C) 2006 Paul Walmsley -// Copyright (C) 2006-2010 Albert Astals Cid +// Copyright (C) 2006-2010, 2012 Albert Astals Cid // Copyright (C) 2009 David Benjamin // Copyright (C) 2011 Edward Jiang +// Copyright (C) 2012 William Bader +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -510,7 +512,7 @@ } } if (p->bits < 0) { - error(str->getPos(), "Bad two dim code in JBIG2 MMR stream"); + error(errSyntaxError, str->getPos(), "Bad two dim code in JBIG2 MMR stream"); return EOF; } bufLen -= p->bits; @@ -553,7 +555,7 @@ bufLen += 8; ++nBytesRead; } - error(str->getPos(), "Bad white code in JBIG2 MMR stream"); + error(errSyntaxError, str->getPos(), "Bad white code in JBIG2 MMR stream"); // eat a bit and return a positive number so that the caller doesn't // go into an infinite loop --bufLen; @@ -584,6 +586,9 @@ } else { code = buf >> (bufLen - 12); } + if (unlikely((code & 0xff) < 64)) { + break; + } p = &blackTab2[(code & 0xff) - 64]; } else { if (bufLen <= 6) { @@ -604,7 +609,7 @@ bufLen += 8; ++nBytesRead; } - error(str->getPos(), "Bad black code in JBIG2 MMR stream"); + error(errSyntaxError, str->getPos(), "Bad black code in JBIG2 MMR stream"); // eat a bit and return a positive number so that the caller doesn't // go into an infinite loop --bufLen; @@ -675,6 +680,7 @@ void clearToOne(); int getWidth() { return w; } int getHeight() { return h; } + int getLineSize() { return line; } int getPixel(int x, int y) { return (x < 0 || x >= w || y < 0 || y >= h) ? 0 : (data[y * line + (x >> 3)] >> (7 - (x & 7))) & 1; } @@ -706,24 +712,33 @@ line = (wA + 7) >> 3; if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) { - error(-1, "invalid width/height"); + error(errSyntaxError, -1, "invalid width/height"); data = NULL; return; } // need to allocate one extra guard byte for use in combine() - data = (Guchar *)gmalloc(h * line + 1); - data[h * line] = 0; + data = (Guchar *)gmalloc_checkoverflow(h * line + 1); + if (data != NULL) { + data[h * line] = 0; + } } JBIG2Bitmap::JBIG2Bitmap(Guint segNumA, JBIG2Bitmap *bitmap): JBIG2Segment(segNumA) { + if (unlikely(bitmap == NULL)) { + error(errSyntaxError, -1, "NULL bitmap in JBIG2Bitmap"); + w = h = line = 0; + data = NULL; + return; + } + w = bitmap->w; h = bitmap->h; line = bitmap->line; if (w <= 0 || h <= 0 || line <= 0 || h >= (INT_MAX - 1) / line) { - error(-1, "invalid width/height"); + error(errSyntaxError, -1, "invalid width/height"); data = NULL; return; } @@ -761,7 +776,7 @@ void JBIG2Bitmap::expand(int newH, Guint pixel) { if (newH <= h || line <= 0 || newH >= (INT_MAX - 1) / line) { - error(-1, "invalid width/height"); + error(errSyntaxError, -1, "invalid width/height"); gfree(data); data = NULL; return; @@ -1052,9 +1067,14 @@ JBIG2SymbolDict::JBIG2SymbolDict(Guint segNumA, Guint sizeA): JBIG2Segment(segNumA) { + Guint i; + size = sizeA; bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(size, sizeof(JBIG2Bitmap *)); if (!bitmaps) size = 0; + for (i = 0; i < size; ++i) { + bitmaps[i] = NULL; + } genericRegionStats = NULL; refinementRegionStats = NULL; } @@ -1085,8 +1105,8 @@ virtual ~JBIG2PatternDict(); virtual JBIG2SegmentType getType() { return jbig2SegPatternDict; } Guint getSize() { return size; } - void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { bitmaps[idx] = bitmap; } - JBIG2Bitmap *getBitmap(Guint idx) { return bitmaps[idx]; } + void setBitmap(Guint idx, JBIG2Bitmap *bitmap) { if (likely(idx < size)) bitmaps[idx] = bitmap; } + JBIG2Bitmap *getBitmap(Guint idx) { return (idx < size) ? bitmaps[idx] : NULL; } private: @@ -1097,8 +1117,13 @@ JBIG2PatternDict::JBIG2PatternDict(Guint segNumA, Guint sizeA): JBIG2Segment(segNumA) { - size = sizeA; - bitmaps = (JBIG2Bitmap **)gmallocn(size, sizeof(JBIG2Bitmap *)); + bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(sizeA, sizeof(JBIG2Bitmap *)); + if (bitmaps) { + size = sizeA; + } else { + size = 0; + error(errSyntaxError, -1, "JBIG2PatternDict: can't allocate bitmaps"); + } } JBIG2PatternDict::~JBIG2PatternDict() { @@ -1266,7 +1291,24 @@ return dataPtr - pageBitmap->getDataPtr(); } -GooString *JBIG2Stream::getPSFilter(int psLevel, char *indent) { +int JBIG2Stream::getChars(int nChars, Guchar *buffer) { + int n, i; + + if (nChars <= 0) { + return 0; + } + if (dataEnd - dataPtr < nChars) { + n = (int)(dataEnd - dataPtr); + } else { + n = nChars; + } + for (i = 0; i < n; ++i) { + buffer[i] = *dataPtr++ ^ 0xff; + } + return n; +} + +GooString *JBIG2Stream::getPSFilter(int psLevel, const char *indent) { return NULL; } @@ -1304,7 +1346,9 @@ refFlags = (refFlags << 24) | (c1 << 16) | (c2 << 8) | c3; nRefSegs = refFlags & 0x1fffffff; for (i = 0; i < (nRefSegs + 9) >> 3; ++i) { - c1 = curStr->getChar(); + if ((c1 = curStr->getChar()) == EOF) { + goto eofError1; + } } } @@ -1352,7 +1396,7 @@ // check for missing page information segment if (!pageBitmap && ((segType >= 4 && segType <= 7) || (segType >= 20 && segType <= 43))) { - error(curStr->getPos(), "First JBIG2 segment associated with a page must be a page information segment"); + error(errSyntaxError, curStr->getPos(), "First JBIG2 segment associated with a page must be a page information segment"); goto syntaxError; } @@ -1424,7 +1468,7 @@ readExtensionSeg(segLength); break; default: - error(curStr->getPos(), "Unknown segment type in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unknown segment type in JBIG2 stream"); for (i = 0; i < segLength; ++i) { if ((c1 = curStr->getChar()) == EOF) { goto eofError2; @@ -1450,7 +1494,7 @@ // arithmetic-coded symbol dictionary segments when numNewSyms // == 0. Segments like this often occur for blank pages. - error(curStr->getPos(), "%d extraneous byte%s after segment", + error(errSyntaxError, curStr->getPos(), "{0:d} extraneous byte{1:s} after segment", segExtraBytes, (segExtraBytes > 1) ? "s" : ""); // Burn through the remaining bytes -- inefficient, but @@ -1466,7 +1510,7 @@ // If we read more bytes than we should have, according to the // segment length field, note an error. - error(curStr->getPos(), "Previous segment handler read too many bytes"); + error(errSyntaxError, curStr->getPos(), "Previous segment handler read too many bytes"); } @@ -1484,7 +1528,7 @@ eofError2: gfree(refSegs); eofError1: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } GBool JBIG2Stream::readSymbolDictSeg(Guint segNum, Guint length, @@ -1506,7 +1550,7 @@ Guint symHeight, symWidth, totalWidth, x, symID; int dh, dw, refAggNum, refDX, refDY, bmSize; GBool ex; - int run, cnt; + int run, cnt, c; Guint i, j, k; Guchar *p; @@ -1574,7 +1618,7 @@ if (seg->getType() == jbig2SegSymbolDict) { j = ((JBIG2SymbolDict *)seg)->getSize(); if (numInputSyms > UINT_MAX - j) { - error(curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); delete codeTables; goto eofError; } @@ -1588,25 +1632,34 @@ } } if (numInputSyms > UINT_MAX - numNewSyms) { - error(curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); delete codeTables; goto eofError; } // compute symbol code length, per 6.5.8.2.3 // symCodeLen = ceil( log2( numInputSyms + numNewSyms ) ) - symCodeLen = 1; - if (likely(numInputSyms + numNewSyms > 0)) { // don't fail too badly if the sum is 0 - i = (numInputSyms + numNewSyms - 1) >> 1; - while (i) { + i = numInputSyms + numNewSyms; + if (i <= 1) { + symCodeLen = huff ? 1 : 0; + } else { + --i; + symCodeLen = 0; + // i = floor((numSyms-1) / 2^symCodeLen) + while (i > 0) { ++symCodeLen; i >>= 1; } } // get the input symbol bitmaps - bitmaps = (JBIG2Bitmap **)gmallocn(numInputSyms + numNewSyms, + bitmaps = (JBIG2Bitmap **)gmallocn_checkoverflow(numInputSyms + numNewSyms, sizeof(JBIG2Bitmap *)); + if (!bitmaps && (numInputSyms + numNewSyms > 0)) { + error(errSyntaxError, curStr->getPos(), "Too many input symbols in JBIG2 symbol dictionary"); + delete codeTables; + goto eofError; + } for (i = 0; i < numInputSyms + numNewSyms; ++i) { bitmaps[i] = NULL; } @@ -1709,10 +1762,14 @@ arithDecoder->decodeInt(&dh, iadhStats); } if (dh < 0 && (Guint)-dh >= symHeight) { - error(curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary"); goto syntaxError; } symHeight += dh; + if (unlikely(symHeight > 0x40000000)) { + error(errSyntaxError, curStr->getPos(), "Bad height value in JBIG2 symbol dictionary"); + goto syntaxError; + } symWidth = 0; totalWidth = 0; j = i; @@ -1731,12 +1788,12 @@ } } if (dw < 0 && (Guint)-dw >= symWidth) { - error(curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Bad delta-height value in JBIG2 symbol dictionary"); goto syntaxError; } symWidth += dw; if (i >= numNewSyms) { - error(curStr->getPos(), "Too many symbols in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Too many symbols in JBIG2 symbol dictionary"); goto syntaxError; } @@ -1776,10 +1833,14 @@ arithDecoder->decodeInt(&refDY, iardyStats); } if (symID >= numInputSyms + i) { - error(curStr->getPos(), "Invalid symbol ID in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Invalid symbol ID in JBIG2 symbol dictionary"); goto syntaxError; } refBitmap = bitmaps[symID]; + if (unlikely(refBitmap == NULL)) { + error(errSyntaxError, curStr->getPos(), "Invalid ref bitmap for symbol ID {0:d} in JBIG2 symbol dictionary", symID); + goto syntaxError; + } bitmaps[numInputSyms + i] = readGenericRefinementRegion(symWidth, symHeight, sdrTemplate, gFalse, @@ -1815,21 +1876,33 @@ collBitmap = new JBIG2Bitmap(0, totalWidth, symHeight); bmSize = symHeight * ((totalWidth + 7) >> 3); p = collBitmap->getDataPtr(); + if (unlikely(p == NULL)) { + delete collBitmap; + goto syntaxError; + } for (k = 0; k < (Guint)bmSize; ++k) { - *p++ = curStr->getChar(); + if ((c = curStr->getChar()) == EOF) { + break; + } + *p++ = (Guchar)c; } } else { collBitmap = readGenericBitmap(gTrue, totalWidth, symHeight, 0, gFalse, gFalse, NULL, NULL, NULL, bmSize); } - x = 0; - for (; j < i; ++j) { - bitmaps[numInputSyms + j] = - collBitmap->getSlice(x, 0, symWidths[j], symHeight); - x += symWidths[j]; + if (likely(collBitmap != NULL)) { + x = 0; + for (; j < i; ++j) { + bitmaps[numInputSyms + j] = + collBitmap->getSlice(x, 0, symWidths[j], symHeight); + x += symWidths[j]; + } + delete collBitmap; + } else { + error(errSyntaxError, curStr->getPos(), "collBitmap was null"); + goto syntaxError; } - delete collBitmap; } } @@ -1851,7 +1924,7 @@ } if (i + run > numInputSyms + numNewSyms || (ex && j + run > numExSyms)) { - error(curStr->getPos(), "Too many exported symbols in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Too many exported symbols in JBIG2 symbol dictionary"); for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, NULL); delete symbolDict; goto syntaxError; @@ -1866,7 +1939,7 @@ ex = !ex; } if (j != numExSyms) { - error(curStr->getPos(), "Too few symbols in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Too few symbols in JBIG2 symbol dictionary"); for ( ; j < numExSyms; ++j) symbolDict->setBitmap(j, NULL); delete symbolDict; goto syntaxError; @@ -1894,7 +1967,7 @@ return gTrue; codeTableError: - error(curStr->getPos(), "Missing code table in JBIG2 symbol dictionary"); + error(errSyntaxError, curStr->getPos(), "Missing code table in JBIG2 symbol dictionary"); delete codeTables; syntaxError: @@ -1910,7 +1983,7 @@ return gFalse; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); return gFalse; } @@ -1998,16 +2071,22 @@ codeTables->append(seg); } } else { - error(curStr->getPos(), "Invalid segment reference in JBIG2 text region"); + error(errSyntaxError, curStr->getPos(), "Invalid segment reference in JBIG2 text region"); delete codeTables; return; } } - symCodeLen = 0; - i = 1; - while (i < numSyms) { - ++symCodeLen; - i <<= 1; + i = numSyms; + if (i <= 1) { + symCodeLen = huff ? 1 : 0; + } else { + --i; + symCodeLen = 0; + // i = floor((numSyms-1) / 2^symCodeLen) + while (i > 0) { + ++symCodeLen; + i >>= 1; + } } // get the symbol bitmaps @@ -2150,6 +2229,7 @@ symCodeTab[i++].prefixLen = 0; } } else if (j > 0x100) { + if (unlikely(i == 0)) ++i; for (j -= 0x100; j && i < numSyms; --j) { symCodeTab[i].prefixLen = symCodeTab[i-1].prefixLen; ++i; @@ -2207,13 +2287,13 @@ return; codeTableError: - error(curStr->getPos(), "Missing code table in JBIG2 text region"); + error(errSyntaxError, curStr->getPos(), "Missing code table in JBIG2 text region"); gfree(codeTables); delete syms; return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); return; } @@ -2289,6 +2369,8 @@ s = sFirst; // read the instances + // (this loop test is here to avoid an infinite loop with damaged + // JBIG2 streams where the normal loop exit doesn't get triggered) while (inst < numInstances) { // T value @@ -2314,7 +2396,12 @@ } if (symID >= (Guint)numSyms) { - error(curStr->getPos(), "Invalid symbol number in JBIG2 text region"); + error(errSyntaxError, curStr->getPos(), "Invalid symbol number in JBIG2 text region"); + if (unlikely(numInstances - inst > 0x800)) { + // don't loop too often with damaged JBIg2 streams + delete bitmap; + return NULL; + } } else { // get the symbol bitmap @@ -2366,8 +2453,24 @@ //~ something is wrong here - refCorner shouldn't degenerate into //~ two cases bw = symbolBitmap->getWidth() - 1; + if (unlikely(symbolBitmap->getHeight() == 0)) { + error(errSyntaxError, curStr->getPos(), "Invalid symbol bitmap height"); + if (ri) { + delete symbolBitmap; + } + delete bitmap; + return NULL; + } bh = symbolBitmap->getHeight() - 1; if (transposed) { + if (unlikely(s > 2 * bitmap->getHeight())) { + error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); + if (ri) { + delete symbolBitmap; + } + delete bitmap; + return NULL; + } switch (refCorner) { case 0: // bottom left bitmap->combine(symbolBitmap, tt, s, combOp); @@ -2386,15 +2489,47 @@ } else { switch (refCorner) { case 0: // bottom left + if (unlikely(tt - (int) bh > 2 * bitmap->getHeight())) { + error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); + if (ri) { + delete symbolBitmap; + } + delete bitmap; + return NULL; + } bitmap->combine(symbolBitmap, s, tt - bh, combOp); break; case 1: // top left + if (unlikely(tt > 2 * bitmap->getHeight())) { + error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); + if (ri) { + delete symbolBitmap; + } + delete bitmap; + return NULL; + } bitmap->combine(symbolBitmap, s, tt, combOp); break; case 2: // bottom right + if (unlikely(tt - (int) bh > 2 * bitmap->getHeight())) { + error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); + if (ri) { + delete symbolBitmap; + } + delete bitmap; + return NULL; + } bitmap->combine(symbolBitmap, s, tt - bh, combOp); break; case 3: // top right + if (unlikely(tt > 2 * bitmap->getHeight())) { + error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 combine"); + if (ri) { + delete symbolBitmap; + } + delete bitmap; + return NULL; + } bitmap->combine(symbolBitmap, s, tt, combOp); break; } @@ -2470,7 +2605,7 @@ // split up the bitmap x = 0; - for (i = 0; i <= grayMax; ++i) { + for (i = 0; i <= grayMax && i < patternDict->getSize(); ++i) { patternDict->setBitmap(i, bitmap->getSlice(x, 0, patternW, patternH)); x += patternW; } @@ -2484,7 +2619,7 @@ return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } void JBIG2Stream::readHalftoneRegionSeg(Guint segNum, GBool imm, @@ -2526,31 +2661,37 @@ goto eofError; } if (w == 0 || h == 0 || w >= INT_MAX / h) { - error(curStr->getPos(), "Bad bitmap size in JBIG2 halftone segment"); + error(errSyntaxError, curStr->getPos(), "Bad bitmap size in JBIG2 halftone segment"); return; } if (gridH == 0 || gridW >= INT_MAX / gridH) { - error(curStr->getPos(), "Bad grid size in JBIG2 halftone segment"); + error(errSyntaxError, curStr->getPos(), "Bad grid size in JBIG2 halftone segment"); return; } // get pattern dictionary if (nRefSegs != 1) { - error(curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); + error(errSyntaxError, curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); return; } seg = findSegment(refSegs[0]); if (seg == NULL || seg->getType() != jbig2SegPatternDict) { - error(curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); + error(errSyntaxError, curStr->getPos(), "Bad symbol dictionary reference in JBIG2 halftone segment"); return; } patternDict = (JBIG2PatternDict *)seg; - bpp = 0; - i = 1; - while (i < patternDict->getSize()) { - ++bpp; - i <<= 1; + i = patternDict->getSize(); + if (i <= 1) { + bpp = 0; + } else { + --i; + bpp = 0; + // i = floor((size-1) / 2^bpp) + while (i > 0) { + ++bpp; + i >>= 1; + } } patW = patternDict->getBitmap(0)->getWidth(); patH = patternDict->getBitmap(0)->getHeight(); @@ -2615,6 +2756,10 @@ for (n = 0; n < gridW; ++n) { if (!(enableSkip && skipBitmap->getPixel(n, m))) { patternBitmap = patternDict->getBitmap(grayImg[i]); + if (unlikely(patternBitmap == NULL)) { + error(errSyntaxError, curStr->getPos(), "Bad pattern bitmap"); + return; + } bitmap->combine(patternBitmap, xx >> 8, yy >> 8, combOp); } xx += stepX; @@ -2644,13 +2789,13 @@ return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } void JBIG2Stream::readGenericRegionSeg(Guint segNum, GBool imm, GBool lossless, Guint length) { JBIG2Bitmap *bitmap; - Guint w, h, x, y, segInfoFlags, extCombOp; + Guint w, h, x, y, segInfoFlags, extCombOp, rowCount; Guint flags, mmr, templ, tpgdOn; int atx[4], aty[4]; @@ -2717,17 +2862,23 @@ segments->append(bitmap); } + // immediate generic segments can have an unspecified length, in + // which case, a row count is stored at the end of the segment + if (imm && length == 0xffffffff) { + readULong(&rowCount); + } + return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } inline void JBIG2Stream::mmrAddPixels(int a1, int blackPixels, int *codingLine, int *a0i, int w) { if (a1 > codingLine[*a0i]) { if (a1 > w) { - error(curStr->getPos(), "JBIG2 MMR row is wrong length (%d)", a1); + error(errSyntaxError, curStr->getPos(), "JBIG2 MMR row is wrong length ({0:d})", a1); a1 = w; } if ((*a0i & 1) ^ blackPixels) { @@ -2741,7 +2892,7 @@ int *codingLine, int *a0i, int w) { if (a1 > codingLine[*a0i]) { if (a1 > w) { - error(curStr->getPos(), "JBIG2 MMR row is wrong length (%d)", a1); + error(errSyntaxError, curStr->getPos(), "JBIG2 MMR row is wrong length ({0:d})", a1); a1 = w; } if ((*a0i & 1) ^ blackPixels) { @@ -2750,7 +2901,7 @@ codingLine[*a0i] = a1; } else if (a1 < codingLine[*a0i]) { if (a1 < 0) { - error(curStr->getPos(), "Invalid JBIG2 MMR code"); + error(errSyntaxError, curStr->getPos(), "Invalid JBIG2 MMR code"); a1 = 0; } while (*a0i > 0 && a1 <= codingLine[*a0i - 1]) { @@ -2768,11 +2919,15 @@ JBIG2Bitmap *bitmap; GBool ltp; Guint ltpCX, cx, cx0, cx1, cx2; - JBIG2BitmapPtr cxPtr0 = {0}, cxPtr1 = {0}; - JBIG2BitmapPtr atPtr0 = {0}, atPtr1 = {0}, atPtr2 = {0}, atPtr3 = {0}; int *refLine, *codingLine; int code1, code2, code3; - int x, y, a0i, b1i, blackPixels, pix, i; + Guchar *p0, *p1, *p2, *pp; + Guchar *atP0, *atP1, *atP2, *atP3; + Guint buf0, buf1, buf2; + Guint atBuf0, atBuf1, atBuf2, atBuf3; + int atShift0, atShift1, atShift2, atShift3; + Guchar mask; + int x, y, x0, x1, a0i, b1i, blackPixels, pix, i; bitmap = new JBIG2Bitmap(0, w, h); if (!bitmap->isOk()) { @@ -2787,7 +2942,7 @@ mmrDecoder->reset(); if (w > INT_MAX - 2) { - error(curStr->getPos(), "Bad width in JBIG2 generic bitmap"); + error(errSyntaxError, curStr->getPos(), "Bad width in JBIG2 generic bitmap"); // force a call to gmalloc(-1), which will throw an exception w = -3; } @@ -2797,6 +2952,7 @@ // ---> max refLine size = w + 2 codingLine = (int *)gmallocn(w + 1, sizeof(int)); refLine = (int *)gmallocn(w + 2, sizeof(int)); + memset(refLine, 0, (w + 2) * sizeof(int)); for (i = 0; i < w + 1; ++i) codingLine[i] = w; for (y = 0; y < h; ++y) { @@ -2823,6 +2979,9 @@ code1 = mmrDecoder->get2DCode(); switch (code1) { case twoDimPass: + if (unlikely(b1i + 1 >= w + 2)) { + break; + } mmrAddPixels(refLine[b1i + 1], blackPixels, codingLine, &a0i, w); if (refLine[b1i + 1] < w) { b1i += 2; @@ -2851,51 +3010,66 @@ mmrAddPixels(codingLine[a0i] + code2, blackPixels ^ 1, codingLine, &a0i, w); } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } break; case twoDimVertR3: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixels(refLine[b1i] + 3, blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } break; case twoDimVertR2: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixels(refLine[b1i] + 2, blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } break; case twoDimVertR1: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixels(refLine[b1i] + 1, blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } break; case twoDimVert0: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixels(refLine[b1i], blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { ++b1i; - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } break; case twoDimVertL3: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixelsNeg(refLine[b1i] - 3, blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { @@ -2904,12 +3078,15 @@ } else { ++b1i; } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } break; case twoDimVertL2: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixelsNeg(refLine[b1i] - 2, blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { @@ -2918,12 +3095,15 @@ } else { ++b1i; } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } break; case twoDimVertL1: + if (unlikely(b1i >= w + 2)) { + break; + } mmrAddPixelsNeg(refLine[b1i] - 1, blackPixels, codingLine, &a0i, w); blackPixels ^= 1; if (codingLine[a0i] < w) { @@ -2932,7 +3112,7 @@ } else { ++b1i; } - while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { + while (likely(b1i < w + 2) && refLine[b1i] <= codingLine[a0i] && refLine[b1i] < w) { b1i += 2; } } @@ -2941,7 +3121,7 @@ mmrAddPixels(w, 0, codingLine, &a0i, w); break; default: - error(curStr->getPos(), "Illegal code in JBIG2 MMR bitmap data"); + error(errSyntaxError, curStr->getPos(), "Illegal code in JBIG2 MMR bitmap data"); mmrAddPixels(w, 0, codingLine, &a0i, w); break; } @@ -2964,7 +3144,7 @@ mmrDecoder->skipTo(mmrDataLength); } else { if (mmrDecoder->get24Bits() != 0x001001) { - error(curStr->getPos(), "Missing EOFB in JBIG2 MMR bitmap data"); + error(errSyntaxError, curStr->getPos(), "Missing EOFB in JBIG2 MMR bitmap data"); } } @@ -3014,145 +3194,497 @@ case 0: // set up the context - bitmap->getPixelPtr(0, y-2, &cxPtr0); - cx0 = bitmap->nextPixel(&cxPtr0); - cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0); - bitmap->getPixelPtr(0, y-1, &cxPtr1); - cx1 = bitmap->nextPixel(&cxPtr1); - cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1); - cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1); - cx2 = 0; - bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0); - bitmap->getPixelPtr(atx[1], y + aty[1], &atPtr1); - bitmap->getPixelPtr(atx[2], y + aty[2], &atPtr2); - bitmap->getPixelPtr(atx[3], y + aty[3], &atPtr3); - - // decode the row - for (x = 0; x < w; ++x) { - - // build the context - cx = (cx0 << 13) | (cx1 << 8) | (cx2 << 4) | - (bitmap->nextPixel(&atPtr0) << 3) | - (bitmap->nextPixel(&atPtr1) << 2) | - (bitmap->nextPixel(&atPtr2) << 1) | - bitmap->nextPixel(&atPtr3); - - // check for a skipped pixel - if (useSkip && skip->getPixel(x, y)) { - pix = 0; + p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); + buf2 = *p2++ << 8; + if (y >= 1) { + p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); + buf1 = *p1++ << 8; + if (y >= 2) { + p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize(); + buf0 = *p0++ << 8; + } else { + p0 = NULL; + buf0 = 0; + } + } else { + p1 = p0 = NULL; + buf1 = buf0 = 0; + } - // decode the pixel - } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - bitmap->setPixel(x, y); + if (atx[0] >= -8 && atx[0] <= 8 && + atx[1] >= -8 && atx[1] <= 8 && + atx[2] >= -8 && atx[2] <= 8 && + atx[3] >= -8 && atx[3] <= 8) { + // set up the adaptive context + if (y + aty[0] >= 0 && y + aty[0] < bitmap->getHeight()) { + atP0 = bitmap->getDataPtr() + (y + aty[0]) * bitmap->getLineSize(); + atBuf0 = *atP0++ << 8; + } else { + atP0 = NULL; + atBuf0 = 0; + } + atShift0 = 15 - atx[0]; + if (y + aty[1] >= 0 && y + aty[1] < bitmap->getHeight()) { + atP1 = bitmap->getDataPtr() + (y + aty[1]) * bitmap->getLineSize(); + atBuf1 = *atP1++ << 8; + } else { + atP1 = NULL; + atBuf1 = 0; + } + atShift1 = 15 - atx[1]; + if (y + aty[2] >= 0 && y + aty[2] < bitmap->getHeight()) { + atP2 = bitmap->getDataPtr() + (y + aty[2]) * bitmap->getLineSize(); + atBuf2 = *atP2++ << 8; + } else { + atP2 = NULL; + atBuf2 = 0; + } + atShift2 = 15 - atx[2]; + if (y + aty[3] >= 0 && y + aty[3] < bitmap->getHeight()) { + atP3 = bitmap->getDataPtr() + (y + aty[3]) * bitmap->getLineSize(); + atBuf3 = *atP3++ << 8; + } else { + atP3 = NULL; + atBuf3 = 0; + } + atShift3 = 15 - atx[3]; + + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p0) { + buf0 |= *p0++; + } + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + if (atP0) { + atBuf0 |= *atP0++; + } + if (atP1) { + atBuf1 |= *atP1++; + } + if (atP2) { + atBuf2 |= *atP2++; + } + if (atP3) { + atBuf3 |= *atP3++; + } + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx0 = (buf0 >> 14) & 0x07; + cx1 = (buf1 >> 13) & 0x1f; + cx2 = (buf2 >> 16) & 0x0f; + cx = (cx0 << 13) | (cx1 << 8) | (cx2 << 4) | + (((atBuf0 >> atShift0) & 1) << 3) | + (((atBuf1 >> atShift1) & 1) << 2) | + (((atBuf2 >> atShift2) & 1) << 1) | + ((atBuf3 >> atShift3) & 1); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + if (aty[0] == 0) { + atBuf0 |= 0x8000; + } + if (aty[1] == 0) { + atBuf1 |= 0x8000; + } + if (aty[2] == 0) { + atBuf2 |= 0x8000; + } + if (aty[3] == 0) { + atBuf3 |= 0x8000; + } + } + } + + // update the context + buf0 <<= 1; + buf1 <<= 1; + buf2 <<= 1; + atBuf0 <<= 1; + atBuf1 <<= 1; + atBuf2 <<= 1; + atBuf3 <<= 1; + } } - // update the context - cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 0x07; - cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x1f; - cx2 = ((cx2 << 1) | pix) & 0x0f; + } else { + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p0) { + buf0 |= *p0++; + } + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx0 = (buf0 >> 14) & 0x07; + cx1 = (buf1 >> 13) & 0x1f; + cx2 = (buf2 >> 16) & 0x0f; + cx = (cx0 << 13) | (cx1 << 8) | (cx2 << 4) | + (bitmap->getPixel(x + atx[0], y + aty[0]) << 3) | + (bitmap->getPixel(x + atx[1], y + aty[1]) << 2) | + (bitmap->getPixel(x + atx[2], y + aty[2]) << 1) | + bitmap->getPixel(x + atx[3], y + aty[3]); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + } + } + + // update the context + buf0 <<= 1; + buf1 <<= 1; + buf2 <<= 1; + } + } } break; case 1: // set up the context - bitmap->getPixelPtr(0, y-2, &cxPtr0); - cx0 = bitmap->nextPixel(&cxPtr0); - cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0); - cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0); - bitmap->getPixelPtr(0, y-1, &cxPtr1); - cx1 = bitmap->nextPixel(&cxPtr1); - cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1); - cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1); - cx2 = 0; - bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0); - - // decode the row - for (x = 0; x < w; ++x) { - - // build the context - cx = (cx0 << 9) | (cx1 << 4) | (cx2 << 1) | - bitmap->nextPixel(&atPtr0); - - // check for a skipped pixel - if (useSkip && skip->getPixel(x, y)) { - pix = 0; + p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); + buf2 = *p2++ << 8; + if (y >= 1) { + p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); + buf1 = *p1++ << 8; + if (y >= 2) { + p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize(); + buf0 = *p0++ << 8; + } else { + p0 = NULL; + buf0 = 0; + } + } else { + p1 = p0 = NULL; + buf1 = buf0 = 0; + } - // decode the pixel - } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - bitmap->setPixel(x, y); + if (atx[0] >= -8 && atx[0] <= 8) { + // set up the adaptive context + if (y + aty[0] >= 0) { + atP0 = bitmap->getDataPtr() + (y + aty[0]) * bitmap->getLineSize(); + atBuf0 = *atP0++ << 8; + } else { + atP0 = NULL; + atBuf0 = 0; + } + atShift0 = 15 - atx[0]; + + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p0) { + buf0 |= *p0++; + } + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + if (atP0) { + atBuf0 |= *atP0++; + } + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx0 = (buf0 >> 13) & 0x0f; + cx1 = (buf1 >> 13) & 0x1f; + cx2 = (buf2 >> 16) & 0x07; + cx = (cx0 << 9) | (cx1 << 4) | (cx2 << 1) | + ((atBuf0 >> atShift0) & 1); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + if (aty[0] == 0) { + atBuf0 |= 0x8000; + } + } + } + + // update the context + buf0 <<= 1; + buf1 <<= 1; + buf2 <<= 1; + atBuf0 <<= 1; + } } - // update the context - cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 0x0f; - cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x1f; - cx2 = ((cx2 << 1) | pix) & 0x07; + } else { + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p0) { + buf0 |= *p0++; + } + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx0 = (buf0 >> 13) & 0x0f; + cx1 = (buf1 >> 13) & 0x1f; + cx2 = (buf2 >> 16) & 0x07; + cx = (cx0 << 9) | (cx1 << 4) | (cx2 << 1) | + bitmap->getPixel(x + atx[0], y + aty[0]); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + } + } + + // update the context + buf0 <<= 1; + buf1 <<= 1; + buf2 <<= 1; + } + } } break; case 2: // set up the context - bitmap->getPixelPtr(0, y-2, &cxPtr0); - cx0 = bitmap->nextPixel(&cxPtr0); - cx0 = (cx0 << 1) | bitmap->nextPixel(&cxPtr0); - bitmap->getPixelPtr(0, y-1, &cxPtr1); - cx1 = bitmap->nextPixel(&cxPtr1); - cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1); - cx2 = 0; - bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0); - - // decode the row - for (x = 0; x < w; ++x) { - - // build the context - cx = (cx0 << 7) | (cx1 << 3) | (cx2 << 1) | - bitmap->nextPixel(&atPtr0); - - // check for a skipped pixel - if (useSkip && skip->getPixel(x, y)) { - pix = 0; + p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); + buf2 = *p2++ << 8; + if (y >= 1) { + p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); + buf1 = *p1++ << 8; + if (y >= 2) { + p0 = bitmap->getDataPtr() + (y - 2) * bitmap->getLineSize(); + buf0 = *p0++ << 8; + } else { + p0 = NULL; + buf0 = 0; + } + } else { + p1 = p0 = NULL; + buf1 = buf0 = 0; + } - // decode the pixel - } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - bitmap->setPixel(x, y); + if (atx[0] >= -8 && atx[0] <= 8) { + // set up the adaptive context + if (y + aty[0] >= 0) { + atP0 = bitmap->getDataPtr() + (y + aty[0]) * bitmap->getLineSize(); + atBuf0 = *atP0++ << 8; + } else { + atP0 = NULL; + atBuf0 = 0; + } + atShift0 = 15 - atx[0]; + + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p0) { + buf0 |= *p0++; + } + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + if (atP0) { + atBuf0 |= *atP0++; + } + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx0 = (buf0 >> 14) & 0x07; + cx1 = (buf1 >> 14) & 0x0f; + cx2 = (buf2 >> 16) & 0x03; + cx = (cx0 << 7) | (cx1 << 3) | (cx2 << 1) | + ((atBuf0 >> atShift0) & 1); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + if (aty[0] == 0) { + atBuf0 |= 0x8000; + } + } + } + + // update the context + buf0 <<= 1; + buf1 <<= 1; + buf2 <<= 1; + atBuf0 <<= 1; + } } - // update the context - cx0 = ((cx0 << 1) | bitmap->nextPixel(&cxPtr0)) & 0x07; - cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x0f; - cx2 = ((cx2 << 1) | pix) & 0x03; + } else { + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p0) { + buf0 |= *p0++; + } + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx0 = (buf0 >> 14) & 0x07; + cx1 = (buf1 >> 14) & 0x0f; + cx2 = (buf2 >> 16) & 0x03; + cx = (cx0 << 7) | (cx1 << 3) | (cx2 << 1) | + bitmap->getPixel(x + atx[0], y + aty[0]); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + } + } + + // update the context + buf0 <<= 1; + buf1 <<= 1; + buf2 <<= 1; + } + } } break; case 3: // set up the context - bitmap->getPixelPtr(0, y-1, &cxPtr1); - cx1 = bitmap->nextPixel(&cxPtr1); - cx1 = (cx1 << 1) | bitmap->nextPixel(&cxPtr1); - cx2 = 0; - bitmap->getPixelPtr(atx[0], y + aty[0], &atPtr0); - - // decode the row - for (x = 0; x < w; ++x) { - - // build the context - cx = (cx1 << 5) | (cx2 << 1) | - bitmap->nextPixel(&atPtr0); - - // check for a skipped pixel - if (useSkip && skip->getPixel(x, y)) { - pix = 0; + p2 = pp = bitmap->getDataPtr() + y * bitmap->getLineSize(); + buf2 = *p2++ << 8; + if (y >= 1) { + p1 = bitmap->getDataPtr() + (y - 1) * bitmap->getLineSize(); + buf1 = *p1++ << 8; + } else { + p1 = NULL; + buf1 = 0; + } - // decode the pixel - } else if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { - bitmap->setPixel(x, y); + if (atx[0] >= -8 && atx[0] <= 8) { + // set up the adaptive context + if (y + aty[0] >= 0) { + atP0 = bitmap->getDataPtr() + (y + aty[0]) * bitmap->getLineSize(); + atBuf0 = *atP0++ << 8; + } else { + atP0 = NULL; + atBuf0 = 0; } + atShift0 = 15 - atx[0]; - // update the context - cx1 = ((cx1 << 1) | bitmap->nextPixel(&cxPtr1)) & 0x1f; - cx2 = ((cx2 << 1) | pix) & 0x0f; + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + if (atP0) { + atBuf0 |= *atP0++; + } + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx1 = (buf1 >> 14) & 0x1f; + cx2 = (buf2 >> 16) & 0x0f; + cx = (cx1 << 5) | (cx2 << 1) | + ((atBuf0 >> atShift0) & 1); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + if (aty[0] == 0) { + atBuf0 |= 0x8000; + } + } + } + + // update the context + buf1 <<= 1; + buf2 <<= 1; + atBuf0 <<= 1; + } + } + + } else { + // decode the row + for (x0 = 0, x = 0; x0 < w; x0 += 8, ++pp) { + if (x0 + 8 < w) { + if (p1) { + buf1 |= *p1++; + } + buf2 |= *p2++; + } + for (x1 = 0, mask = 0x80; x1 < 8 && x < w; ++x1, ++x, mask >>= 1) { + + // build the context + cx1 = (buf1 >> 14) & 0x1f; + cx2 = (buf2 >> 16) & 0x0f; + cx = (cx1 << 5) | (cx2 << 1) | + bitmap->getPixel(x + atx[0], y + aty[0]); + + // check for a skipped pixel + if (!(useSkip && skip->getPixel(x, y))) { + + // decode the pixel + if ((pix = arithDecoder->decodeBit(cx, genericRegionStats))) { + *pp |= mask; + buf2 |= 0x8000; + } + } + + // update the context + buf1 <<= 1; + buf2 <<= 1; + } + } } break; } @@ -3204,13 +3736,13 @@ // get referenced bitmap if (nRefSegs > 1) { - error(curStr->getPos(), "Bad reference in JBIG2 generic refinement segment"); + error(errSyntaxError, curStr->getPos(), "Bad reference in JBIG2 generic refinement segment"); return; } if (nRefSegs == 1) { seg = findSegment(refSegs[0]); if (seg == NULL || seg->getType() != jbig2SegBitmap) { - error(curStr->getPos(), "Bad bitmap reference in JBIG2 generic refinement segment"); + error(errSyntaxError, curStr->getPos(), "Bad bitmap reference in JBIG2 generic refinement segment"); return; } refBitmap = (JBIG2Bitmap *)seg; @@ -3227,7 +3759,7 @@ refBitmap, 0, 0, atx, aty); // combine the region bitmap into the page bitmap - if (imm) { + if (imm && bitmap) { pageBitmap->combine(bitmap, x, y, extCombOp); delete bitmap; @@ -3237,7 +3769,7 @@ bitmap->setSegNum(segNum); segments->append(bitmap); } else { - error(curStr->getPos(), "readGenericRefinementRegionSeg with null bitmap"); + error(errSyntaxError, curStr->getPos(), "readGenericRefinementRegionSeg with null bitmap"); } } @@ -3251,7 +3783,7 @@ return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } JBIG2Bitmap *JBIG2Stream::readGenericRefinementRegion(int w, int h, @@ -3480,7 +4012,7 @@ return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } void JBIG2Stream::readEndOfStripeSeg(Guint length) { @@ -3488,7 +4020,9 @@ // skip the segment for (i = 0; i < length; ++i) { - curStr->getChar(); + if (curStr->getChar() == EOF) { + break; + } } } @@ -3497,7 +4031,9 @@ // skip the segment for (i = 0; i < length; ++i) { - curStr->getChar(); + if (curStr->getChar() == EOF) { + break; + } } } @@ -3562,7 +4098,7 @@ return; eofError: - error(curStr->getPos(), "Unexpected EOF in JBIG2 stream"); + error(errSyntaxError, curStr->getPos(), "Unexpected EOF in JBIG2 stream"); } void JBIG2Stream::readExtensionSeg(Guint length) { @@ -3570,7 +4106,9 @@ // skip the segment for (i = 0; i < length; ++i) { - curStr->getChar(); + if (curStr->getChar() == EOF) { + break; + } } } diff -Nru poppler-0.18.4/poppler/JBIG2Stream.h poppler-0.20.5/poppler/JBIG2Stream.h --- poppler-0.18.4/poppler/JBIG2Stream.h 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JBIG2Stream.h 2012-09-26 10:38:26.000000000 +0000 @@ -53,10 +53,12 @@ virtual int getPos(); virtual int getChar(); virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: + virtual GBool hasGetChars() { return true; } + virtual int getChars(int nChars, Guchar *buffer); void readSegments(); GBool readSymbolDictSeg(Guint segNum, Guint length, diff -Nru poppler-0.18.4/poppler/JPEG2000Stream.cc poppler-0.20.5/poppler/JPEG2000Stream.cc --- poppler-0.18.4/poppler/JPEG2000Stream.cc 2012-01-26 23:38:42.000000000 +0000 +++ poppler-0.20.5/poppler/JPEG2000Stream.cc 2012-05-10 20:05:44.000000000 +0000 @@ -115,11 +115,11 @@ } static void libopenjpeg_error_callback(const char *msg, void * /*client_data*/) { - error(-1, "%s", msg); + error(errSyntaxError, -1, "{0:s}", msg); } static void libopenjpeg_warning_callback(const char *msg, void * /*client_data*/) { - error(-1, "%s", msg); + error(errSyntaxWarning, -1, "{0:s}", msg); } void JPXStream::init2(unsigned char *buf, int bufLen, OPJ_CODEC_FORMAT format) @@ -164,13 +164,13 @@ error: if (format == CODEC_JP2) { - error(-1, "Did no succeed opening JPX Stream as JP2, trying as J2K."); + error(errSyntaxWarning, -1, "Did no succeed opening JPX Stream as JP2, trying as J2K."); init2(buf, bufLen, CODEC_J2K); } else if (format == CODEC_J2K) { - error(-1, "Did no succeed opening JPX Stream as J2K, trying as JPT."); + error(errSyntaxWarning, -1, "Did no succeed opening JPX Stream as J2K, trying as JPT."); init2(buf, bufLen, CODEC_JPT); } else { - error(-1, "Did no succeed opening JPX Stream."); + error(errSyntaxError, -1, "Did no succeed opening JPX Stream."); } } @@ -178,7 +178,7 @@ return doLookChar(); } -GooString *JPXStream::getPSFilter(int psLevel, char *indent) { +GooString *JPXStream::getPSFilter(int psLevel, const char *indent) { return NULL; } diff -Nru poppler-0.18.4/poppler/JPEG2000Stream.h poppler-0.20.5/poppler/JPEG2000Stream.h --- poppler-0.18.4/poppler/JPEG2000Stream.h 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JPEG2000Stream.h 2012-05-10 20:05:44.000000000 +0000 @@ -32,7 +32,7 @@ virtual int getPos(); virtual int getChar(); virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); virtual void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode); diff -Nru poppler-0.18.4/poppler/JPXStream.cc poppler-0.20.5/poppler/JPXStream.cc --- poppler-0.18.4/poppler/JPXStream.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JPXStream.cc 2012-09-26 12:57:42.000000000 +0000 @@ -13,7 +13,8 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2008 Albert Astals Cid +// Copyright (C) 2008, 2012 Albert Astals Cid +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -21,13 +22,13 @@ //======================================================================== #include -#include #ifdef USE_GCC_PRAGMAS #pragma implementation #endif -#include "goo/gmem.h" +#include +#include "gmem.h" #include "Error.h" #include "JArithmeticDecoder.h" #include "JPXStream.h" @@ -40,16 +41,11 @@ // - support for palettes, channel maps, etc. // - make sure all needed JP2/JPX subboxes are parsed (readBoxes) // - can we assume that QCC segments must come after the QCD segment? -// - skip EPH markers (readTilePartData) // - handle tilePartToEOC in readTilePartData -// - deal with multiple codeword segments (readTilePartData, -// readCodeBlockData) // - progression orders 2, 3, and 4 // - in coefficient decoding (readCodeBlockData): -// - termination pattern: terminate after every coding pass -// - error resilience segmentation symbol // - selective arithmetic coding bypass -// - vertically causal context formation +// (this also affects reading the cb->dataLen array) // - coeffs longer than 31 bits (should just ignore the extra bits?) // - handle boxes larger than 2^32 bytes // - the fixed-point arithmetic won't handle 16-bit pixels @@ -247,6 +243,8 @@ JPXStream::JPXStream(Stream *strA): FilterStream(strA) { + bufStr = new BufStream(str, 2); + nComps = 0; bpc = NULL; width = height = 0; @@ -260,15 +258,19 @@ bitBufLen = 0; bitBufSkip = gFalse; byteCount = 0; + + curX = curY = 0; + curComp = 0; + readBufLen = 0; } JPXStream::~JPXStream() { close(); - delete str; + delete bufStr; } void JPXStream::reset() { - str->reset(); + bufStr->reset(); if (readBoxes()) { curY = img.yOffset; } else { @@ -332,7 +334,8 @@ if (subband->cbs) { for (k = 0; k < subband->nXCBs * subband->nYCBs; ++k) { cb = &subband->cbs[k]; - gfree(cb->coeffs); + gfree(cb->dataLen); + gfree(cb->touched); if (cb->arithDecoder) { delete cb->arithDecoder; } @@ -358,7 +361,7 @@ gfree(img.tiles); img.tiles = NULL; } - FilterStream::close(); + bufStr->close(); } int JPXStream::getChar() { @@ -412,12 +415,24 @@ tileIdx = ((curY - img.yTileOffset) / img.yTileSize) * img.nXTiles + (curX - img.xTileOffset) / img.xTileSize; #if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid + if (img.tiles == NULL || tileIdx >= img.nXTiles * img.nYTiles || img.tiles[tileIdx].tileComps == NULL) { + error(errSyntaxError, getPos(), "Unexpected tileIdx in fillReadBuf in JPX stream"); + return; + } tileComp = &img.tiles[tileIdx].tileComps[curComp]; #else tileComp = &img.tiles[tileIdx].tileComps[havePalette ? 0 : curComp]; #endif tx = jpxCeilDiv((curX - img.xTileOffset) % img.xTileSize, tileComp->hSep); ty = jpxCeilDiv((curY - img.yTileOffset) % img.yTileSize, tileComp->vSep); + if (unlikely(ty >= (tileComp->y1 - tileComp->y0))) { + error(errSyntaxError, getPos(), "Unexpected ty in fillReadBuf in JPX stream"); + return; + } + if (unlikely(tx >= (tileComp->x1 - tileComp->x0))) { + error(errSyntaxError, getPos(), "Unexpected tx in fillReadBuf in JPX stream"); + return; + } pix = (int)tileComp->data[ty * (tileComp->x1 - tileComp->x0) + tx]; pixBits = tileComp->prec; #if 1 //~ ignore the palette, assume the PDF ColorSpace object is valid @@ -427,7 +442,8 @@ if (pix >= 0 && pix < palette.nEntries) { pix = palette.c[pix * palette.nComps + curComp]; } else { - pix = + pix = 0; + } pixBits = palette.bpc[curComp]; } if (++curComp == (Guint)(havePalette ? palette.nComps : img.nComps)) { @@ -436,6 +452,10 @@ if (++curX == img.xSize) { curX = img.xOffset; ++curY; + if (pixBits < 8) { + pix <<= 8 - pixBits; + pixBits = 8; + } } } if (pixBits == 8) { @@ -447,7 +467,7 @@ } while (readBufLen < 8); } -GooString *JPXStream::getPSFilter(int psLevel, char *indent) { +GooString *JPXStream::getPSFilter(int psLevel, const char *indent) { return NULL; } @@ -465,8 +485,8 @@ csPrec = 0; // make gcc happy haveBPC = haveCSMode = gFalse; - str->reset(); - if (str->lookChar() == 0xff) { + bufStr->reset(); + if (bufStr->lookChar() == 0xff) { getImageParams2(bitsPerComponent, csMode); } else { while (readBoxHdr(&boxType, &boxLen, &dataLen)) { @@ -510,12 +530,12 @@ haveCSMode = gTrue; } for (i = 0; i < dataLen - 7; ++i) { - str->getChar(); + bufStr->getChar(); } } } else { for (i = 0; i < dataLen - 3; ++i) { - str->getChar(); + bufStr->getChar(); } } } @@ -528,12 +548,15 @@ } else { cover(4); for (i = 0; i < dataLen; ++i) { - str->getChar(); + if (unlikely(bufStr->getChar() == EOF)) { + error(errSyntaxError, getPos(), "Unexpected EOF in getImageParams in JPX stream"); + break; + } } } } } - str->close(); + bufStr->close(); } // Get image parameters from the codestream. @@ -571,7 +594,7 @@ cover(6); if (segLen > 2) { for (i = 0; i < segLen - 2; ++i) { - str->getChar(); + bufStr->getChar(); } } } @@ -585,13 +608,23 @@ haveImgHdr = gFalse; + // initialize in case there is a parse error + img.xSize = img.ySize = 0; + img.xOffset = img.yOffset = 0; + img.xTileSize = img.yTileSize = 0; + img.xTileOffset = img.yTileOffset = 0; + img.nComps = 0; + // check for a naked JPEG 2000 codestream (without the JP2/JPX // wrapper) -- this appears to be a violation of the PDF spec, but // Acrobat allows it - if (str->lookChar() == 0xff) { + if (bufStr->lookChar() == 0xff) { cover(7); - error(getPos(), "Naked JPEG 2000 codestream, missing JP2/JPX wrapper"); - readCodestream(0); + error(errSyntaxWarning, getPos(), + "Naked JPEG 2000 codestream, missing JP2/JPX wrapper"); + if (!readCodestream(0)) { + return gFalse; + } nComps = img.nComps; bpc = (Guint *)gmallocn(nComps, sizeof(Guint)); for (i = 0; i < nComps; ++i) { @@ -621,11 +654,12 @@ !readUByte(&compression) || !readUByte(&unknownColorspace) || !readUByte(&ipr)) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } if (compression != 7) { - error(getPos(), "Unknown compression type in JPX stream"); + error(errSyntaxError, getPos(), + "Unknown compression type in JPX stream"); return gFalse; } bpc = (Guint *)gmallocn(nComps, sizeof(Guint)); @@ -637,16 +671,18 @@ case 0x62706363: // bits per component cover(10); if (!haveImgHdr) { - error(getPos(), "Found bits per component box before image header box in JPX stream"); + error(errSyntaxError, getPos(), + "Found bits per component box before image header box in JPX stream"); return gFalse; } if (dataLen != nComps) { - error(getPos(), "Invalid bits per component box in JPX stream"); + error(errSyntaxError, getPos(), + "Invalid bits per component box in JPX stream"); return gFalse; } for (i = 0; i < nComps; ++i) { if (!readUByte(&bpc[i])) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } } @@ -661,7 +697,7 @@ cover(12); if (!readUWord(&palette.nEntries) || !readUByte(&palette.nComps)) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } palette.bpc = (Guint *)gmallocn(palette.nComps, sizeof(Guint)); @@ -669,7 +705,7 @@ (int *)gmallocn(palette.nEntries * palette.nComps, sizeof(int)); for (i = 0; i < palette.nComps; ++i) { if (!readUByte(&palette.bpc[i])) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } ++palette.bpc[i]; @@ -679,7 +715,7 @@ if (!readNBytes(((palette.bpc[j] & 0x7f) + 7) >> 3, (palette.bpc[j] & 0x80) ? gTrue : gFalse, &palette.c[i * palette.nComps + j])) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } } @@ -696,7 +732,7 @@ if (!readUWord(&compMap.comp[i]) || !readUByte(&compMap.type[i]) || !readUByte(&compMap.pComp[i])) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } } @@ -705,7 +741,7 @@ case 0x63646566: // channel definition cover(14); if (!readUWord(&channelDefn.nChannels)) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } channelDefn.idx = @@ -718,7 +754,7 @@ if (!readUWord(&channelDefn.idx[i]) || !readUWord(&channelDefn.type[i]) || !readUWord(&channelDefn.assoc[i])) { - error(getPos(), "Unexpected EOF in JPX stream"); + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } } @@ -727,10 +763,12 @@ case 0x6A703263: // contiguous codestream cover(15); if (!bpc) { - error(getPos(), "JPX stream is missing the image header box"); + error(errSyntaxError, getPos(), + "JPX stream is missing the image header box"); } if (!haveCS) { - error(getPos(), "JPX stream has no supported color spec"); + error(errSyntaxError, getPos(), + "JPX stream has no supported color spec"); } if (!readCodestream(dataLen)) { return gFalse; @@ -739,8 +777,8 @@ default: cover(16); for (i = 0; i < dataLen; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Unexpected EOF in JPX stream"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Unexpected EOF in JPX stream"); return gFalse; } } @@ -856,7 +894,7 @@ case 4: // vendor color (JPX) cover(18); for (i = 0; i < dataLen - 3; ++i) { - if (str->getChar() == EOF) { + if (bufStr->getChar() == EOF) { goto err; } } @@ -871,7 +909,7 @@ return gTrue; err: - error(getPos(), "Error in JPX color spec"); + error(errSyntaxError, getPos(), "Error in JPX color spec"); return gFalse; } @@ -880,14 +918,14 @@ JPXTileComp *tileComp; int segType; GBool haveSIZ, haveCOD, haveQCD, haveSOT; - Guint precinctSize, style; + Guint precinctSize, style, nDecompLevels; Guint segLen, capabilities, comp, i, j, r; //----- main header haveSIZ = haveCOD = haveQCD = haveSOT = gFalse; do { if (!readMarkerHdr(&segType, &segLen)) { - error(getPos(), "Error in JPX codestream"); + error(errSyntaxError, getPos(), "Error in JPX codestream"); return gFalse; } switch (segType) { @@ -897,6 +935,11 @@ break; case 0x51: // SIZ - image and tile size cover(20); + if (haveSIZ) { + error(errSyntaxError, getPos(), + "Duplicate SIZ marker segment in JPX stream"); + return gFalse; + } if (!readUWord(&capabilities) || !readULong(&img.xSize) || !readULong(&img.ySize) || @@ -907,11 +950,22 @@ !readULong(&img.xTileOffset) || !readULong(&img.yTileOffset) || !readUWord(&img.nComps)) { - error(getPos(), "Error in JPX SIZ marker segment"); + error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); return gFalse; } if (haveImgHdr && img.nComps != nComps) { - error(getPos(), "Different number of components in JPX SIZ marker segment"); + error(errSyntaxError, getPos(), + "Different number of components in JPX SIZ marker segment"); + return gFalse; + } + if (img.xSize == 0 || img.ySize == 0 || + img.xOffset >= img.xSize || img.yOffset >= img.ySize || + img.xTileSize == 0 || img.yTileSize == 0 || + img.xTileOffset > img.xOffset || + img.yTileOffset > img.yOffset || + img.xTileSize + img.xTileOffset <= img.xOffset || + img.yTileSize + img.yTileOffset <= img.yOffset) { + error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); return gFalse; } img.nXTiles = (img.xSize - img.xTileOffset + img.xTileSize - 1) @@ -921,12 +975,14 @@ // check for overflow before allocating memory if (img.nXTiles <= 0 || img.nYTiles <= 0 || img.nXTiles >= INT_MAX / img.nYTiles) { - error(getPos(), "Bad tile count in JPX SIZ marker segment"); + error(errSyntaxError, getPos(), + "Bad tile count in JPX SIZ marker segment"); return gFalse; } img.tiles = (JPXTile *)gmallocn(img.nXTiles * img.nYTiles, sizeof(JPXTile)); for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { + img.tiles[i].init = gFalse; img.tiles[i].tileComps = (JPXTileComp *)gmallocn(img.nComps, sizeof(JPXTileComp)); for (comp = 0; comp < img.nComps; ++comp) { @@ -940,7 +996,12 @@ if (!readUByte(&img.tiles[0].tileComps[comp].prec) || !readUByte(&img.tiles[0].tileComps[comp].hSep) || !readUByte(&img.tiles[0].tileComps[comp].vSep)) { - error(getPos(), "Error in JPX SIZ marker segment"); + error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); + return gFalse; + } + if (img.tiles[0].tileComps[comp].hSep == 0 || + img.tiles[0].tileComps[comp].vSep == 0) { + error(errSyntaxError, getPos(), "Error in JPX SIZ marker segment"); return gFalse; } img.tiles[0].tileComps[comp].sgned = @@ -955,18 +1016,34 @@ break; case 0x52: // COD - coding style default cover(21); + if (!haveSIZ) { + error(errSyntaxError, getPos(), + "JPX COD marker segment before SIZ segment"); + return gFalse; + } + if (img.tiles == NULL || img.nXTiles * img.nYTiles == 0 || img.tiles[0].tileComps == NULL) { + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); + return gFalse; + } if (!readUByte(&img.tiles[0].tileComps[0].style) || !readUByte(&img.tiles[0].progOrder) || !readUWord(&img.tiles[0].nLayers) || !readUByte(&img.tiles[0].multiComp) || - !readUByte(&img.tiles[0].tileComps[0].nDecompLevels) || + !readUByte(&nDecompLevels) || !readUByte(&img.tiles[0].tileComps[0].codeBlockW) || !readUByte(&img.tiles[0].tileComps[0].codeBlockH) || !readUByte(&img.tiles[0].tileComps[0].codeBlockStyle) || !readUByte(&img.tiles[0].tileComps[0].transform)) { - error(getPos(), "Error in JPX COD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); + return gFalse; + } + if (nDecompLevels > 32 || + img.tiles[0].tileComps[0].codeBlockW > 8 || + img.tiles[0].tileComps[0].codeBlockH > 8) { + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } + img.tiles[0].tileComps[0].nDecompLevels = nDecompLevels; img.tiles[0].tileComps[0].codeBlockW += 2; img.tiles[0].tileComps[0].codeBlockH += 2; for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { @@ -991,9 +1068,13 @@ img.tiles[0].tileComps[0].transform; } img.tiles[i].tileComps[comp].resLevels = - (JPXResLevel *)gmallocn( + (JPXResLevel *)gmallocn_checkoverflow( (img.tiles[i].tileComps[comp].nDecompLevels + 1), sizeof(JPXResLevel)); + if (img.tiles[i].tileComps[comp].resLevels == NULL) { + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); + return gFalse; + } for (r = 0; r <= img.tiles[i].tileComps[comp].nDecompLevels; ++r) { img.tiles[i].tileComps[comp].resLevels[r].precincts = NULL; } @@ -1003,7 +1084,7 @@ if (img.tiles[0].tileComps[0].style & 0x01) { cover(91); if (!readUByte(&precinctSize)) { - error(getPos(), "Error in JPX COD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } img.tiles[0].tileComps[0].resLevels[r].precinctWidth = @@ -1032,21 +1113,29 @@ case 0x53: // COC - coding style component cover(22); if (!haveCOD) { - error(getPos(), "JPX COC marker segment before COD segment"); + error(errSyntaxError, getPos(), + "JPX COC marker segment before COD segment"); return gFalse; } if ((img.nComps > 256 && !readUWord(&comp)) || (img.nComps <= 256 && !readUByte(&comp)) || comp >= img.nComps || !readUByte(&style) || - !readUByte(&img.tiles[0].tileComps[comp].nDecompLevels) || + !readUByte(&nDecompLevels) || !readUByte(&img.tiles[0].tileComps[comp].codeBlockW) || !readUByte(&img.tiles[0].tileComps[comp].codeBlockH) || !readUByte(&img.tiles[0].tileComps[comp].codeBlockStyle) || !readUByte(&img.tiles[0].tileComps[comp].transform)) { - error(getPos(), "Error in JPX COC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COC marker segment"); return gFalse; } + if (nDecompLevels > 32 || + img.tiles[0].tileComps[comp].codeBlockW > 8 || + img.tiles[0].tileComps[comp].codeBlockH > 8) { + error(errSyntaxError, getPos(), "Error in JPX COC marker segment"); + return gFalse; + } + img.tiles[0].tileComps[comp].nDecompLevels = nDecompLevels; img.tiles[0].tileComps[comp].style = (img.tiles[0].tileComps[comp].style & ~1) | (style & 1); img.tiles[0].tileComps[comp].codeBlockW += 2; @@ -1078,7 +1167,7 @@ for (r = 0; r <= img.tiles[0].tileComps[comp].nDecompLevels; ++r) { if (img.tiles[0].tileComps[comp].style & 0x01) { if (!readUByte(&precinctSize)) { - error(getPos(), "Error in JPX COD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } img.tiles[0].tileComps[comp].resLevels[r].precinctWidth = @@ -1101,11 +1190,20 @@ break; case 0x5c: // QCD - quantization default cover(23); + if (!haveSIZ) { + error(errSyntaxError, getPos(), + "JPX QCD marker segment before SIZ segment"); + return gFalse; + } if (!readUByte(&img.tiles[0].tileComps[0].quantStyle)) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x00) { + if (segLen <= 3) { + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); + return gFalse; + } img.tiles[0].tileComps[0].nQuantSteps = segLen - 3; img.tiles[0].tileComps[0].quantSteps = (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps, @@ -1113,7 +1211,7 @@ sizeof(Guint)); for (i = 0; i < img.tiles[0].tileComps[0].nQuantSteps; ++i) { if (!readUByte(&img.tiles[0].tileComps[0].quantSteps[i])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } @@ -1124,10 +1222,14 @@ img.tiles[0].tileComps[0].nQuantSteps, sizeof(Guint)); if (!readUWord(&img.tiles[0].tileComps[0].quantSteps[0])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } else if ((img.tiles[0].tileComps[0].quantStyle & 0x1f) == 0x02) { + if (segLen < 5) { + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); + return gFalse; + } img.tiles[0].tileComps[0].nQuantSteps = (segLen - 3) / 2; img.tiles[0].tileComps[0].quantSteps = (Guint *)greallocn(img.tiles[0].tileComps[0].quantSteps, @@ -1135,12 +1237,12 @@ sizeof(Guint)); for (i = 0; i < img.tiles[0].tileComps[0].nQuantSteps; ++i) { if (!readUWord(&img.tiles[0].tileComps[0].quantSteps[i])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } } else { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { @@ -1166,17 +1268,22 @@ case 0x5d: // QCC - quantization component cover(24); if (!haveQCD) { - error(getPos(), "JPX QCC marker segment before QCD segment"); + error(errSyntaxError, getPos(), + "JPX QCC marker segment before QCD segment"); return gFalse; } if ((img.nComps > 256 && !readUWord(&comp)) || (img.nComps <= 256 && !readUByte(&comp)) || comp >= img.nComps || !readUByte(&img.tiles[0].tileComps[comp].quantStyle)) { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x00) { + if (segLen <= (img.nComps > 256 ? 5U : 4U)) { + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); + return gFalse; + } img.tiles[0].tileComps[comp].nQuantSteps = segLen - (img.nComps > 256 ? 5 : 4); img.tiles[0].tileComps[comp].quantSteps = @@ -1185,7 +1292,7 @@ sizeof(Guint)); for (i = 0; i < img.tiles[0].tileComps[comp].nQuantSteps; ++i) { if (!readUByte(&img.tiles[0].tileComps[comp].quantSteps[i])) { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } } @@ -1196,10 +1303,14 @@ img.tiles[0].tileComps[comp].nQuantSteps, sizeof(Guint)); if (!readUWord(&img.tiles[0].tileComps[comp].quantSteps[0])) { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } } else if ((img.tiles[0].tileComps[comp].quantStyle & 0x1f) == 0x02) { + if (segLen < (img.nComps > 256 ? 5U : 4U) + 2) { + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); + return gFalse; + } img.tiles[0].tileComps[comp].nQuantSteps = (segLen - (img.nComps > 256 ? 5 : 4)) / 2; img.tiles[0].tileComps[comp].quantSteps = @@ -1208,12 +1319,12 @@ sizeof(Guint)); for (i = 0; i < img.tiles[0].tileComps[comp].nQuantSteps; ++i) { if (!readUWord(&img.tiles[0].tileComps[comp].quantSteps[i])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } } else { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } for (i = 1; i < img.nXTiles * img.nYTiles; ++i) { @@ -1234,10 +1345,10 @@ case 0x5e: // RGN - region of interest cover(25); #if 1 //~ ROI is unimplemented - fprintf(stderr, "RGN\n"); + error(errUnimplemented, -1, "got a JPX RGN segment"); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PPM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); return gFalse; } } @@ -1247,7 +1358,7 @@ comp >= img.nComps || !readUByte(&compInfo[comp].defROI.style) || !readUByte(&compInfo[comp].defROI.shift)) { - error(getPos(), "Error in JPX RGN marker segment"); + error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); return gFalse; } #endif @@ -1255,10 +1366,10 @@ case 0x5f: // POC - progression order change cover(26); #if 1 //~ progression order changes are unimplemented - fprintf(stderr, "POC\n"); + error(errUnimplemented, -1, "got a JPX POC segment"); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PPM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); return gFalse; } } @@ -1274,7 +1385,7 @@ !(img.nComps > 256 && readUWord(&progs[i].endComp)) || !(img.nComps <= 256 && readUByte(&progs[i].endComp)) || !readUByte(&progs[i].progOrder)) { - error(getPos(), "Error in JPX POC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); return gFalse; } } @@ -1283,10 +1394,10 @@ case 0x60: // PPM - packed packet headers, main header cover(27); #if 1 //~ packed packet headers are unimplemented - fprintf(stderr, "PPM\n"); + error(errUnimplemented, -1, "Got a JPX PPM segment"); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PPM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX PPM marker segment"); return gFalse; } } @@ -1296,8 +1407,8 @@ // skipped cover(28); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX TLM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX TLM marker segment"); return gFalse; } } @@ -1306,8 +1417,8 @@ // skipped cover(29); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PLM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX PLM marker segment"); return gFalse; } } @@ -1316,8 +1427,8 @@ // skipped cover(30); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX CRG marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX CRG marker segment"); return gFalse; } } @@ -1326,8 +1437,8 @@ // skipped cover(31); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX COM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX COM marker segment"); return gFalse; } } @@ -1338,9 +1449,10 @@ break; default: cover(33); - error(getPos(), "Unknown marker segment %02x in JPX stream", segType); + error(errSyntaxError, getPos(), + "Unknown marker segment {0:02x} in JPX stream", segType); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { + if (bufStr->getChar() == EOF) { break; } } @@ -1349,15 +1461,18 @@ } while (!haveSOT); if (!haveSIZ) { - error(getPos(), "Missing SIZ marker segment in JPX stream"); + error(errSyntaxError, getPos(), + "Missing SIZ marker segment in JPX stream"); return gFalse; } if (!haveCOD) { - error(getPos(), "Missing COD marker segment in JPX stream"); + error(errSyntaxError, getPos(), + "Missing COD marker segment in JPX stream"); return gFalse; } if (!haveQCD) { - error(getPos(), "Missing QCD marker segment in JPX stream"); + error(errSyntaxError, getPos(), + "Missing QCD marker segment in JPX stream"); return gFalse; } @@ -1367,7 +1482,7 @@ return gFalse; } if (!readMarkerHdr(&segType, &segLen)) { - error(getPos(), "Error in JPX codestream"); + error(errSyntaxError, getPos(), "Error in JPX codestream"); return gFalse; } if (segType != 0x90) { // SOT - start of tile @@ -1376,13 +1491,17 @@ } if (segType != 0xd9) { // EOC - end of codestream - error(getPos(), "Missing EOC marker in JPX codestream"); + error(errSyntaxError, getPos(), "Missing EOC marker in JPX codestream"); return gFalse; } //----- finish decoding the image for (i = 0; i < img.nXTiles * img.nYTiles; ++i) { tile = &img.tiles[i]; + if (!tile->init) { + error(errSyntaxError, getPos(), "Uninitialized tile in JPX codestream"); + return gFalse; + } for (comp = 0; comp < img.nComps; ++comp) { tileComp = &tile->tileComps[comp]; inverseTransform(tileComp); @@ -1404,12 +1523,13 @@ JPXPrecinct *precinct; JPXSubband *subband; JPXCodeBlock *cb; + int *sbCoeffs; GBool haveSOD; Guint tileIdx, tilePartLen, tilePartIdx, nTileParts; GBool tilePartToEOC; - Guint precinctSize, style; + Guint precinctSize, style, nDecompLevels; Guint n, nSBs, nx, ny, sbx0, sby0, comp, segLen; - Guint i, j, k, cbX, cbY, r, pre, sb, cbi; + Guint i, j, k, cbX, cbY, r, pre, sb, cbi, cbj; int segType, level; // process the SOT marker segment @@ -1417,12 +1537,13 @@ !readULong(&tilePartLen) || !readUByte(&tilePartIdx) || !readUByte(&nTileParts)) { - error(getPos(), "Error in JPX SOT marker segment"); + error(errSyntaxError, getPos(), "Error in JPX SOT marker segment"); return gFalse; } - if (tileIdx >= img.nXTiles * img.nYTiles) { - error(getPos(), "Weird tile index in JPX stream"); + if (tileIdx >= img.nXTiles * img.nYTiles || + (tilePartIdx > 0 && !img.tiles[tileIdx].init)) { + error(errSyntaxError, getPos(), "Weird tile index in JPX stream"); return gFalse; } @@ -1432,7 +1553,7 @@ haveSOD = gFalse; do { if (!readMarkerHdr(&segType, &segLen)) { - error(getPos(), "Error in JPX tile-part codestream"); + error(errSyntaxError, getPos(), "Error in JPX tile-part codestream"); return gFalse; } tilePartLen -= 2 + segLen; @@ -1443,14 +1564,21 @@ !readUByte(&img.tiles[tileIdx].progOrder) || !readUWord(&img.tiles[tileIdx].nLayers) || !readUByte(&img.tiles[tileIdx].multiComp) || - !readUByte(&img.tiles[tileIdx].tileComps[0].nDecompLevels) || + !readUByte(&nDecompLevels) || !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockW) || !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockH) || !readUByte(&img.tiles[tileIdx].tileComps[0].codeBlockStyle) || !readUByte(&img.tiles[tileIdx].tileComps[0].transform)) { - error(getPos(), "Error in JPX COD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); + return gFalse; + } + if (nDecompLevels > 32 || + img.tiles[tileIdx].tileComps[0].codeBlockW > 8 || + img.tiles[tileIdx].tileComps[0].codeBlockH > 8) { + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } + img.tiles[tileIdx].tileComps[0].nDecompLevels = nDecompLevels; img.tiles[tileIdx].tileComps[0].codeBlockW += 2; img.tiles[tileIdx].tileComps[0].codeBlockH += 2; for (comp = 0; comp < img.nComps; ++comp) { @@ -1482,7 +1610,7 @@ for (r = 0; r <= img.tiles[tileIdx].tileComps[0].nDecompLevels; ++r) { if (img.tiles[tileIdx].tileComps[0].style & 0x01) { if (!readUByte(&precinctSize)) { - error(getPos(), "Error in JPX COD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } img.tiles[tileIdx].tileComps[0].resLevels[r].precinctWidth = @@ -1511,14 +1639,21 @@ (img.nComps <= 256 && !readUByte(&comp)) || comp >= img.nComps || !readUByte(&style) || - !readUByte(&img.tiles[tileIdx].tileComps[comp].nDecompLevels) || + !readUByte(&nDecompLevels) || !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockW) || !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockH) || !readUByte(&img.tiles[tileIdx].tileComps[comp].codeBlockStyle) || !readUByte(&img.tiles[tileIdx].tileComps[comp].transform)) { - error(getPos(), "Error in JPX COC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COC marker segment"); + return gFalse; + } + if (nDecompLevels > 32 || + img.tiles[tileIdx].tileComps[comp].codeBlockW > 8 || + img.tiles[tileIdx].tileComps[comp].codeBlockH > 8) { + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } + img.tiles[tileIdx].tileComps[comp].nDecompLevels = nDecompLevels; img.tiles[tileIdx].tileComps[comp].style = (img.tiles[tileIdx].tileComps[comp].style & ~1) | (style & 1); img.tiles[tileIdx].tileComps[comp].codeBlockW += 2; @@ -1534,7 +1669,7 @@ for (r = 0; r <= img.tiles[tileIdx].tileComps[comp].nDecompLevels; ++r) { if (img.tiles[tileIdx].tileComps[comp].style & 0x01) { if (!readUByte(&precinctSize)) { - error(getPos(), "Error in JPX COD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX COD marker segment"); return gFalse; } img.tiles[tileIdx].tileComps[comp].resLevels[r].precinctWidth = @@ -1550,19 +1685,22 @@ case 0x5c: // QCD - quantization default cover(36); if (!readUByte(&img.tiles[tileIdx].tileComps[0].quantStyle)) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x00) { - img.tiles[tileIdx].tileComps[0].nQuantSteps = - segLen - 3; + if (segLen <= 3) { + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); + return gFalse; + } + img.tiles[tileIdx].tileComps[0].nQuantSteps = segLen - 3; img.tiles[tileIdx].tileComps[0].quantSteps = (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps, img.tiles[tileIdx].tileComps[0].nQuantSteps, sizeof(Guint)); for (i = 0; i < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++i) { if (!readUByte(&img.tiles[tileIdx].tileComps[0].quantSteps[i])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } @@ -1573,10 +1711,14 @@ img.tiles[tileIdx].tileComps[0].nQuantSteps, sizeof(Guint)); if (!readUWord(&img.tiles[tileIdx].tileComps[0].quantSteps[0])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } else if ((img.tiles[tileIdx].tileComps[0].quantStyle & 0x1f) == 0x02) { + if (segLen < 5) { + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); + return gFalse; + } img.tiles[tileIdx].tileComps[0].nQuantSteps = (segLen - 3) / 2; img.tiles[tileIdx].tileComps[0].quantSteps = (Guint *)greallocn(img.tiles[tileIdx].tileComps[0].quantSteps, @@ -1584,12 +1726,12 @@ sizeof(Guint)); for (i = 0; i < img.tiles[tileIdx].tileComps[0].nQuantSteps; ++i) { if (!readUWord(&img.tiles[tileIdx].tileComps[0].quantSteps[i])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } } else { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } for (comp = 1; comp < img.nComps; ++comp) { @@ -1613,10 +1755,14 @@ (img.nComps <= 256 && !readUByte(&comp)) || comp >= img.nComps || !readUByte(&img.tiles[tileIdx].tileComps[comp].quantStyle)) { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f) == 0x00) { + if (segLen <= (img.nComps > 256 ? 5U : 4U)) { + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); + return gFalse; + } img.tiles[tileIdx].tileComps[comp].nQuantSteps = segLen - (img.nComps > 256 ? 5 : 4); img.tiles[tileIdx].tileComps[comp].quantSteps = @@ -1625,7 +1771,7 @@ sizeof(Guint)); for (i = 0; i < img.tiles[tileIdx].tileComps[comp].nQuantSteps; ++i) { if (!readUByte(&img.tiles[tileIdx].tileComps[comp].quantSteps[i])) { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } } @@ -1637,11 +1783,15 @@ img.tiles[tileIdx].tileComps[comp].nQuantSteps, sizeof(Guint)); if (!readUWord(&img.tiles[tileIdx].tileComps[comp].quantSteps[0])) { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } } else if ((img.tiles[tileIdx].tileComps[comp].quantStyle & 0x1f) == 0x02) { + if (segLen < (img.nComps > 256 ? 5U : 4U) + 2) { + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); + return gFalse; + } img.tiles[tileIdx].tileComps[comp].nQuantSteps = (segLen - (img.nComps > 256 ? 5 : 4)) / 2; img.tiles[tileIdx].tileComps[comp].quantSteps = @@ -1650,22 +1800,22 @@ sizeof(Guint)); for (i = 0; i < img.tiles[tileIdx].tileComps[comp].nQuantSteps; ++i) { if (!readUWord(&img.tiles[tileIdx].tileComps[comp].quantSteps[i])) { - error(getPos(), "Error in JPX QCD marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCD marker segment"); return gFalse; } } } else { - error(getPos(), "Error in JPX QCC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX QCC marker segment"); return gFalse; } break; case 0x5e: // RGN - region of interest cover(38); #if 1 //~ ROI is unimplemented - fprintf(stderr, "RGN\n"); + error(errUnimplemented, -1, "Got a JPX RGN segment"); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PPM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); return gFalse; } } @@ -1675,7 +1825,7 @@ comp >= img.nComps || !readUByte(&compInfo[comp].roi.style) || !readUByte(&compInfo[comp].roi.shift)) { - error(getPos(), "Error in JPX RGN marker segment"); + error(errSyntaxError, getPos(), "Error in JPX RGN marker segment"); return gFalse; } #endif @@ -1683,10 +1833,10 @@ case 0x5f: // POC - progression order change cover(39); #if 1 //~ progression order changes are unimplemented - fprintf(stderr, "POC\n"); + error(errUnimplemented, -1, "Got a JPX POC segment"); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PPM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); return gFalse; } } @@ -1702,7 +1852,7 @@ !(img.nComps > 256 && readUWord(&tileProgs[i].endComp)) || !(img.nComps <= 256 && readUByte(&tileProgs[i].endComp)) || !readUByte(&tileProgs[i].progOrder)) { - error(getPos(), "Error in JPX POC marker segment"); + error(errSyntaxError, getPos(), "Error in JPX POC marker segment"); return gFalse; } } @@ -1711,10 +1861,10 @@ case 0x61: // PPT - packed packet headers, tile-part hdr cover(40); #if 1 //~ packed packet headers are unimplemented - fprintf(stderr, "PPT\n"); + error(errUnimplemented, -1, "Got a JPX PPT segment"); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PPT marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX PPT marker segment"); return gFalse; } } @@ -1723,8 +1873,8 @@ // skipped cover(41); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX PLT marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX PLT marker segment"); return gFalse; } } @@ -1733,8 +1883,8 @@ // skipped cover(42); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { - error(getPos(), "Error in JPX COM marker segment"); + if (bufStr->getChar() == EOF) { + error(errSyntaxError, getPos(), "Error in JPX COM marker segment"); return gFalse; } } @@ -1745,10 +1895,11 @@ break; default: cover(44); - error(getPos(), "Unknown marker segment %02x in JPX tile-part stream", + error(errSyntaxError, getPos(), + "Unknown marker segment {0:02x} in JPX tile-part stream", segType); for (i = 0; i < segLen - 2; ++i) { - if (str->getChar() == EOF) { + if (bufStr->getChar() == EOF) { break; } } @@ -1759,6 +1910,7 @@ //----- initialize the tile, precincts, and code-blocks if (tilePartIdx == 0) { tile = &img.tiles[tileIdx]; + tile->init = gTrue; i = tileIdx / img.nXTiles; j = tileIdx % img.nXTiles; if ((tile->x0 = img.xTileOffset + j * img.xTileSize) < img.xOffset) { @@ -1784,9 +1936,10 @@ tile->maxNDecompLevels = tileComp->nDecompLevels; } tileComp->x0 = jpxCeilDiv(tile->x0, tileComp->hSep); - tileComp->y0 = jpxCeilDiv(tile->y0, tileComp->hSep); + tileComp->y0 = jpxCeilDiv(tile->y0, tileComp->vSep); tileComp->x1 = jpxCeilDiv(tile->x1, tileComp->hSep); - tileComp->y1 = jpxCeilDiv(tile->y1, tileComp->hSep); + tileComp->y1 = jpxCeilDiv(tile->y1, tileComp->vSep); + tileComp->w = tileComp->x1 - tileComp->x0; tileComp->cbW = 1 << tileComp->codeBlockW; tileComp->cbH = 1 << tileComp->codeBlockH; tileComp->data = (int *)gmallocn((tileComp->x1 - tileComp->x0) * @@ -1875,6 +2028,19 @@ sizeof(JPXCodeBlock)); sbx0 = jpxFloorDivPow2(subband->x0, tileComp->codeBlockW); sby0 = jpxFloorDivPow2(subband->y0, tileComp->codeBlockH); + if (r == 0) { // (NL)LL + sbCoeffs = tileComp->data; + } else if (sb == 0) { // (NL-r+1)HL + sbCoeffs = tileComp->data + + resLevel->bx1[1] - resLevel->bx0[1]; + } else if (sb == 1) { // (NL-r+1)LH + sbCoeffs = tileComp->data + + (resLevel->by1[0] - resLevel->by0[0]) * tileComp->w; + } else { // (NL-r+1)HH + sbCoeffs = tileComp->data + + (resLevel->by1[0] - resLevel->by0[0]) * tileComp->w + + resLevel->bx1[1] - resLevel->bx0[1]; + } cb = subband->cbs; for (cbY = 0; cbY < subband->nYCBs; ++cbY) { for (cbX = 0; cbX < subband->nXCBs; ++cbX) { @@ -1898,18 +2064,21 @@ cb->lBlock = 3; cb->nextPass = jpxPassCleanup; cb->nZeroBitPlanes = 0; - cb->coeffs = - (JPXCoeff *)gmallocn((1 << (tileComp->codeBlockW - + tileComp->codeBlockH)), - sizeof(JPXCoeff)); - for (cbi = 0; - cbi < (Guint)(1 << (tileComp->codeBlockW - + tileComp->codeBlockH)); - ++cbi) { - cb->coeffs[cbi].flags = 0; - cb->coeffs[cbi].len = 0; - cb->coeffs[cbi].mag = 0; + cb->dataLenSize = 1; + cb->dataLen = (Guint *)gmalloc(sizeof(Guint)); + cb->coeffs = sbCoeffs + + (cb->y0 - subband->y0) * tileComp->w + + (cb->x0 - subband->x0); + cb->touched = (char *)gmalloc(1 << (tileComp->codeBlockW + + tileComp->codeBlockH)); + cb->len = 0; + for (cbj = 0; cbj < cb->y1 - cb->y0; ++cbj) { + for (cbi = 0; cbi < cb->x1 - cb->x0; ++cbi) { + cb->coeffs[cbj * tileComp->w + cbi] = 0; + } } + memset(cb->touched, 0, + (1 << (tileComp->codeBlockW + tileComp->codeBlockH))); cb->arithDecoder = NULL; cb->stats = NULL; ++cb; @@ -1955,6 +2124,9 @@ // setup startBitBuf(tilePartLen); + if (tileComp->style & 0x02) { + skipSOP(); + } // zero-length flag if (!readBits(1, &bits)) { @@ -2113,19 +2285,41 @@ ++cb->lBlock; } - // length of compressed data - //~ deal with multiple codeword segments - for (n = cb->lBlock, i = cb->nCodingPasses >> 1; - i; - ++n, i >>= 1) ; - if (!readBits(n, &cb->dataLen)) { - goto err; + // one codeword segment for each of the coding passes + if (tileComp->codeBlockStyle & 0x04) { + if (cb->nCodingPasses > cb->dataLenSize) { + cb->dataLenSize = cb->nCodingPasses; + cb->dataLen = (Guint *)greallocn(cb->dataLen, + cb->dataLenSize, + sizeof(Guint)); + } + + // read the lengths + for (i = 0; i < cb->nCodingPasses; ++i) { + if (!readBits(cb->lBlock, &cb->dataLen[i])) { + goto err; + } + } + + // one codeword segment for all of the coding passes + } else { + + // read the length + for (n = cb->lBlock, i = cb->nCodingPasses >> 1; + i; + ++n, i >>= 1) ; + if (!readBits(n, &cb->dataLen[0])) { + goto err; + } } } } } } } + if (tileComp->style & 0x04) { + skipEPH(); + } tilePartLen = finishBitBuf(); //----- packet data @@ -2140,7 +2334,13 @@ tile->res, sb, cb)) { return gFalse; } - tilePartLen -= cb->dataLen; + if (tileComp->codeBlockStyle & 0x04) { + for (i = 0; i < cb->nCodingPasses; ++i) { + tilePartLen -= cb->dataLen[i]; + } + } else { + tilePartLen -= cb->dataLen[0]; + } cb->seen = gTrue; } } @@ -2185,6 +2385,12 @@ tile->res = 0; } } + tileComp = &tile->tileComps[tile->comp]; + if (tile->res >= tileComp->nDecompLevels + 1) { + if (++tile->comp == img.nComps) { + return gTrue; + } + } } break; case 3: // precinct, component, resolution level, layer @@ -2219,7 +2425,7 @@ return gTrue; err: - error(getPos(), "Error in JPX stream"); + error(errSyntaxError, getPos(), "Error in JPX stream"); return gFalse; } @@ -2229,18 +2435,20 @@ JPXSubband *subband, Guint res, Guint sb, JPXCodeBlock *cb) { - JPXCoeff *coeff0, *coeff1, *coeff; + int *coeff0, *coeff1, *coeff; + char *touched0, *touched1, *touched; Guint horiz, vert, diag, all, cx, xorBit; - int horizSign, vertSign; - Guint i, x, y0, y1, y2; + int horizSign, vertSign, bit; + int segSym; + Guint i, x, y0, y1; if (cb->arithDecoder) { cover(63); - cb->arithDecoder->restart(cb->dataLen); + cb->arithDecoder->restart(cb->dataLen[0]); } else { cover(64); cb->arithDecoder = new JArithmeticDecoder(); - cb->arithDecoder->setStream(str, cb->dataLen); + cb->arithDecoder->setStream(bufStr, cb->dataLen[0]); cb->arithDecoder->start(); cb->stats = new JArithmeticDecoderStats(jpxNContexts); cb->stats->setEntry(jpxContextSigProp, 4, 0); @@ -2249,78 +2457,80 @@ } for (i = 0; i < cb->nCodingPasses; ++i) { + if ((tileComp->codeBlockStyle & 0x04) && i > 0) { + cb->arithDecoder->setStream(bufStr, cb->dataLen[i]); + cb->arithDecoder->start(); + } + switch (cb->nextPass) { //----- significance propagation pass case jpxPassSigProp: cover(65); - for (y0 = cb->y0, coeff0 = cb->coeffs; + for (y0 = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; y0 < cb->y1; - y0 += 4, coeff0 += 4 << tileComp->codeBlockW) { - for (x = cb->x0, coeff1 = coeff0; + y0 += 4, coeff0 += 4 * tileComp->w, + touched0 += 4 << tileComp->codeBlockW) { + for (x = cb->x0, coeff1 = coeff0, touched1 = touched0; x < cb->x1; - ++x, ++coeff1) { - for (y1 = 0, coeff = coeff1; + ++x, ++coeff1, ++touched1) { + for (y1 = 0, coeff = coeff1, touched = touched1; y1 < 4 && y0+y1 < cb->y1; - ++y1, coeff += tileComp->cbW) { - if (!(coeff->flags & jpxCoeffSignificant)) { + ++y1, coeff += tileComp->w, touched += tileComp->cbW) { + if (!*coeff) { horiz = vert = diag = 0; horizSign = vertSign = 2; if (x > cb->x0) { - if (coeff[-1].flags & jpxCoeffSignificant) { + if (coeff[-1]) { ++horiz; - horizSign += (coeff[-1].flags & jpxCoeffSign) ? -1 : 1; + horizSign += coeff[-1] < 0 ? -1 : 1; } if (y0+y1 > cb->y0) { - diag += (coeff[-(int)tileComp->cbW - 1].flags - >> jpxCoeffSignificantB) & 1; + diag += coeff[-(int)tileComp->w - 1] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - diag += (coeff[tileComp->cbW - 1].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + diag += coeff[tileComp->w - 1] ? 1 : 0; } } if (x < cb->x1 - 1) { - if (coeff[1].flags & jpxCoeffSignificant) { + if (coeff[1]) { ++horiz; - horizSign += (coeff[1].flags & jpxCoeffSign) ? -1 : 1; + horizSign += coeff[1] < 0 ? -1 : 1; } if (y0+y1 > cb->y0) { - diag += (coeff[-(int)tileComp->cbW + 1].flags - >> jpxCoeffSignificantB) & 1; + diag += coeff[-(int)tileComp->w + 1] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - diag += (coeff[tileComp->cbW + 1].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + diag += coeff[tileComp->w + 1] ? 1 : 0; } } if (y0+y1 > cb->y0) { - if (coeff[-(int)tileComp->cbW].flags & jpxCoeffSignificant) { + if (coeff[-(int)tileComp->w]) { ++vert; - vertSign += (coeff[-(int)tileComp->cbW].flags & jpxCoeffSign) - ? -1 : 1; + vertSign += coeff[-(int)tileComp->w] < 0 ? -1 : 1; } } - if (y0+y1 < cb->y1 - 1) { - if (coeff[tileComp->cbW].flags & jpxCoeffSignificant) { + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + if (coeff[tileComp->w]) { ++vert; - vertSign += (coeff[tileComp->cbW].flags & jpxCoeffSign) - ? -1 : 1; + vertSign += coeff[tileComp->w] < 0 ? -1 : 1; } } cx = sigPropContext[horiz][vert][diag][res == 0 ? 1 : sb]; if (cx != 0) { if (cb->arithDecoder->decodeBit(cx, cb->stats)) { - coeff->flags |= jpxCoeffSignificant | jpxCoeffFirstMagRef; - coeff->mag = (coeff->mag << 1) | 1; cx = signContext[horizSign][vertSign][0]; xorBit = signContext[horizSign][vertSign][1]; if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) { - coeff->flags |= jpxCoeffSign; + *coeff = -1; + } else { + *coeff = 1; } } - ++coeff->len; - coeff->flags |= jpxCoeffTouched; + *touched = 1; } } } @@ -2332,58 +2542,57 @@ //----- magnitude refinement pass case jpxPassMagRef: cover(66); - for (y0 = cb->y0, coeff0 = cb->coeffs; + for (y0 = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; y0 < cb->y1; - y0 += 4, coeff0 += 4 << tileComp->codeBlockW) { - for (x = cb->x0, coeff1 = coeff0; + y0 += 4, coeff0 += 4 * tileComp->w, + touched0 += 4 << tileComp->codeBlockW) { + for (x = cb->x0, coeff1 = coeff0, touched1 = touched0; x < cb->x1; - ++x, ++coeff1) { - for (y1 = 0, coeff = coeff1; + ++x, ++coeff1, ++touched1) { + for (y1 = 0, coeff = coeff1, touched = touched1; y1 < 4 && y0+y1 < cb->y1; - ++y1, coeff += tileComp->cbW) { - if ((coeff->flags & jpxCoeffSignificant) && - !(coeff->flags & jpxCoeffTouched)) { - if (coeff->flags & jpxCoeffFirstMagRef) { + ++y1, coeff += tileComp->w, touched += tileComp->cbW) { + if (*coeff && !*touched) { + if (*coeff == 1 || *coeff == -1) { all = 0; if (x > cb->x0) { - all += (coeff[-1].flags >> jpxCoeffSignificantB) & 1; + all += coeff[-1] ? 1 : 0; if (y0+y1 > cb->y0) { - all += (coeff[-(int)tileComp->cbW - 1].flags - >> jpxCoeffSignificantB) & 1; + all += coeff[-(int)tileComp->w - 1] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - all += (coeff[tileComp->cbW - 1].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + all += coeff[tileComp->w - 1] ? 1 : 0; } } if (x < cb->x1 - 1) { - all += (coeff[1].flags >> jpxCoeffSignificantB) & 1; + all += coeff[1] ? 1 : 0; if (y0+y1 > cb->y0) { - all += (coeff[-(int)tileComp->cbW + 1].flags - >> jpxCoeffSignificantB) & 1; + all += coeff[-(int)tileComp->w + 1] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - all += (coeff[tileComp->cbW + 1].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + all += coeff[tileComp->w + 1] ? 1 : 0; } } if (y0+y1 > cb->y0) { - all += (coeff[-(int)tileComp->cbW].flags - >> jpxCoeffSignificantB) & 1; + all += coeff[-(int)tileComp->w] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - all += (coeff[tileComp->cbW].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + all += coeff[tileComp->w] ? 1 : 0; } cx = all ? 15 : 14; } else { cx = 16; } - coeff->mag = (coeff->mag << 1) | - cb->arithDecoder->decodeBit(cx, cb->stats); - ++coeff->len; - coeff->flags |= jpxCoeffTouched; - coeff->flags &= ~jpxCoeffFirstMagRef; + bit = cb->arithDecoder->decodeBit(cx, cb->stats); + if (*coeff < 0) { + *coeff = (*coeff << 1) - bit; + } else { + *coeff = (*coeff << 1) + bit; + } + *touched = 1; } } } @@ -2394,145 +2603,153 @@ //----- cleanup pass case jpxPassCleanup: cover(67); - for (y0 = cb->y0, coeff0 = cb->coeffs; + for (y0 = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; y0 < cb->y1; - y0 += 4, coeff0 += 4 << tileComp->codeBlockW) { - for (x = cb->x0, coeff1 = coeff0; + y0 += 4, coeff0 += 4 * tileComp->w, + touched0 += 4 << tileComp->codeBlockW) { + for (x = cb->x0, coeff1 = coeff0, touched1 = touched0; x < cb->x1; - ++x, ++coeff1) { + ++x, ++coeff1, ++touched1) { y1 = 0; if (y0 + 3 < cb->y1 && - !(coeff1->flags & jpxCoeffTouched) && - !(coeff1[tileComp->cbW].flags & jpxCoeffTouched) && - !(coeff1[2 * tileComp->cbW].flags & jpxCoeffTouched) && - !(coeff1[3 * tileComp->cbW].flags & jpxCoeffTouched) && + !(*touched1) && + !(touched1[tileComp->cbW]) && + !(touched1[2 * tileComp->cbW]) && + !(touched1[3 * tileComp->cbW]) && (x == cb->x0 || y0 == cb->y0 || - !(coeff1[-(int)tileComp->cbW - 1].flags - & jpxCoeffSignificant)) && + !coeff1[-(int)tileComp->w - 1]) && (y0 == cb->y0 || - !(coeff1[-(int)tileComp->cbW].flags - & jpxCoeffSignificant)) && + !coeff1[-(int)tileComp->w]) && (x == cb->x1 - 1 || y0 == cb->y0 || - !(coeff1[-(int)tileComp->cbW + 1].flags - & jpxCoeffSignificant)) && + !coeff1[-(int)tileComp->w + 1]) && (x == cb->x0 || - (!(coeff1[-1].flags & jpxCoeffSignificant) && - !(coeff1[tileComp->cbW - 1].flags - & jpxCoeffSignificant) && - !(coeff1[2 * tileComp->cbW - 1].flags - & jpxCoeffSignificant) && - !(coeff1[3 * tileComp->cbW - 1].flags - & jpxCoeffSignificant))) && + (!coeff1[-1] && + !coeff1[tileComp->w - 1] && + !coeff1[2 * tileComp->w - 1] && + !coeff1[3 * tileComp->w - 1])) && (x == cb->x1 - 1 || - (!(coeff1[1].flags & jpxCoeffSignificant) && - !(coeff1[tileComp->cbW + 1].flags - & jpxCoeffSignificant) && - !(coeff1[2 * tileComp->cbW + 1].flags - & jpxCoeffSignificant) && - !(coeff1[3 * tileComp->cbW + 1].flags - & jpxCoeffSignificant))) && - (x == cb->x0 || y0+4 == cb->y1 || - !(coeff1[4 * tileComp->cbW - 1].flags & jpxCoeffSignificant)) && - (y0+4 == cb->y1 || - !(coeff1[4 * tileComp->cbW].flags & jpxCoeffSignificant)) && - (x == cb->x1 - 1 || y0+4 == cb->y1 || - !(coeff1[4 * tileComp->cbW + 1].flags - & jpxCoeffSignificant))) { + (!coeff1[1] && + !coeff1[tileComp->w + 1] && + !coeff1[2 * tileComp->w + 1] && + !coeff1[3 * tileComp->w + 1])) && + ((tileComp->codeBlockStyle & 0x08) || + ((x == cb->x0 || y0+4 == cb->y1 || + !coeff1[4 * tileComp->w - 1]) && + (y0+4 == cb->y1 || + !coeff1[4 * tileComp->w]) && + (x == cb->x1 - 1 || y0+4 == cb->y1 || + !coeff1[4 * tileComp->w + 1])))) { if (cb->arithDecoder->decodeBit(jpxContextRunLength, cb->stats)) { y1 = cb->arithDecoder->decodeBit(jpxContextUniform, cb->stats); y1 = (y1 << 1) | cb->arithDecoder->decodeBit(jpxContextUniform, cb->stats); - for (y2 = 0, coeff = coeff1; - y2 < y1; - ++y2, coeff += tileComp->cbW) { - ++coeff->len; - } - coeff->flags |= jpxCoeffSignificant | jpxCoeffFirstMagRef; - coeff->mag = (coeff->mag << 1) | 1; - ++coeff->len; + coeff = &coeff1[y1 * tileComp->w]; cx = signContext[2][2][0]; xorBit = signContext[2][2][1]; if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) { - coeff->flags |= jpxCoeffSign; + *coeff = -1; + } else { + *coeff = 1; } ++y1; } else { - for (y1 = 0, coeff = coeff1; - y1 < 4; - ++y1, coeff += tileComp->cbW) { - ++coeff->len; - } y1 = 4; } } - for (coeff = &coeff1[y1 << tileComp->codeBlockW]; + for (coeff = &coeff1[y1 * tileComp->w], + touched = &touched1[y1 << tileComp->codeBlockW]; y1 < 4 && y0 + y1 < cb->y1; - ++y1, coeff += tileComp->cbW) { - if (!(coeff->flags & jpxCoeffTouched)) { + ++y1, coeff += tileComp->w, touched += tileComp->cbW) { + if (!*touched) { horiz = vert = diag = 0; horizSign = vertSign = 2; if (x > cb->x0) { - if (coeff[-1].flags & jpxCoeffSignificant) { + if (coeff[-1]) { ++horiz; - horizSign += (coeff[-1].flags & jpxCoeffSign) ? -1 : 1; + horizSign += coeff[-1] < 0 ? -1 : 1; } if (y0+y1 > cb->y0) { - diag += (coeff[-(int)tileComp->cbW - 1].flags - >> jpxCoeffSignificantB) & 1; + diag += coeff[-(int)tileComp->w - 1] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - diag += (coeff[tileComp->cbW - 1].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + diag += coeff[tileComp->w - 1] ? 1 : 0; } } if (x < cb->x1 - 1) { - if (coeff[1].flags & jpxCoeffSignificant) { + if (coeff[1]) { ++horiz; - horizSign += (coeff[1].flags & jpxCoeffSign) ? -1 : 1; + horizSign += coeff[1] < 0 ? -1 : 1; } if (y0+y1 > cb->y0) { - diag += (coeff[-(int)tileComp->cbW + 1].flags - >> jpxCoeffSignificantB) & 1; + diag += coeff[-(int)tileComp->w + 1] ? 1 : 0; } - if (y0+y1 < cb->y1 - 1) { - diag += (coeff[tileComp->cbW + 1].flags - >> jpxCoeffSignificantB) & 1; + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + diag += coeff[tileComp->w + 1] ? 1 : 0; } } if (y0+y1 > cb->y0) { - if (coeff[-(int)tileComp->cbW].flags & jpxCoeffSignificant) { + if (coeff[-(int)tileComp->w]) { ++vert; - vertSign += (coeff[-(int)tileComp->cbW].flags & jpxCoeffSign) - ? -1 : 1; + vertSign += coeff[-(int)tileComp->w] < 0 ? -1 : 1; } } - if (y0+y1 < cb->y1 - 1) { - if (coeff[tileComp->cbW].flags & jpxCoeffSignificant) { + if (y0+y1 < cb->y1 - 1 && + (!(tileComp->codeBlockStyle & 0x08) || y1 < 3)) { + if (coeff[tileComp->w]) { ++vert; - vertSign += (coeff[tileComp->cbW].flags & jpxCoeffSign) - ? -1 : 1; + vertSign += coeff[tileComp->w] < 0 ? -1 : 1; } } cx = sigPropContext[horiz][vert][diag][res == 0 ? 1 : sb]; if (cb->arithDecoder->decodeBit(cx, cb->stats)) { - coeff->flags |= jpxCoeffSignificant | jpxCoeffFirstMagRef; - coeff->mag = (coeff->mag << 1) | 1; cx = signContext[horizSign][vertSign][0]; xorBit = signContext[horizSign][vertSign][1]; if (cb->arithDecoder->decodeBit(cx, cb->stats) ^ xorBit) { - coeff->flags |= jpxCoeffSign; + *coeff = -1; + } else { + *coeff = 1; } } - ++coeff->len; } else { - coeff->flags &= ~jpxCoeffTouched; + *touched = 0; } } } } + ++cb->len; + // look for a segmentation symbol + if (tileComp->codeBlockStyle & 0x20) { + segSym = cb->arithDecoder->decodeBit(jpxContextUniform, + cb->stats) << 3; + segSym |= cb->arithDecoder->decodeBit(jpxContextUniform, + cb->stats) << 2; + segSym |= cb->arithDecoder->decodeBit(jpxContextUniform, + cb->stats) << 1; + segSym |= cb->arithDecoder->decodeBit(jpxContextUniform, + cb->stats); + if (segSym != 0x0a) { + // in theory this should be a fatal error, but it seems to + // be problematic + error(errSyntaxWarning, getPos(), + "Missing or invalid segmentation symbol in JPX stream"); + } + } cb->nextPass = jpxPassSigProp; break; } + + if (tileComp->codeBlockStyle & 0x02) { + cb->stats->reset(); + cb->stats->setEntry(jpxContextSigProp, 4, 0); + cb->stats->setEntry(jpxContextRunLength, 3, 0); + cb->stats->setEntry(jpxContextUniform, 46, 0); + } + + if (tileComp->codeBlockStyle & 0x04) { + cb->arithDecoder->cleanup(); + } } cb->arithDecoder->cleanup(); @@ -2546,13 +2763,12 @@ JPXPrecinct *precinct; JPXSubband *subband; JPXCodeBlock *cb; - JPXCoeff *coeff0, *coeff; + int *coeff0, *coeff; + char *touched0, *touched; Guint qStyle, guard, eps, shift; int shift2; double mu; int val; - int *dataPtr; - Guint nx0, ny0, nx1, ny1; Guint r, cbX, cbY, x, y; cover(68); @@ -2581,24 +2797,26 @@ shift += fracBits; } - // copy (NL)LL into the upper-left corner of the data array, doing - // the fixed point adjustment and dequantization along the way + // do fixed point adjustment and dequantization on (NL)LL cb = subband->cbs; for (cbY = 0; cbY < subband->nYCBs; ++cbY) { for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - for (y = cb->y0, coeff0 = cb->coeffs; + for (y = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; y < cb->y1; - ++y, coeff0 += tileComp->cbW) { - dataPtr = &tileComp->data[(y - subband->y0) - * (tileComp->x1 - tileComp->x0) - + (cb->x0 - subband->x0)]; - for (x = cb->x0, coeff = coeff0; x < cb->x1; ++x, ++coeff) { - val = (int)coeff->mag; + ++y, coeff0 += tileComp->w, touched0 += tileComp->cbW) { + for (x = cb->x0, coeff = coeff0, touched = touched0; + x < cb->x1; + ++x, ++coeff, ++touched) { + val = *coeff; if (val != 0) { - shift2 = shift - (cb->nZeroBitPlanes + coeff->len); + shift2 = shift - (cb->nZeroBitPlanes + cb->len + *touched); if (shift2 > 0) { cover(94); - val = (val << shift2) + (1 << (shift2 - 1)); + if (val < 0) { + val = (val << shift2) - (1 << (shift2 - 1)); + } else { + val = (val << shift2) + (1 << (shift2 - 1)); + } } else { cover(95); val >>= -shift2; @@ -2613,12 +2831,8 @@ cover(98); val = (int)((double)val * mu); } - if (coeff->flags & jpxCoeffSign) { - cover(99); - val = -val; - } } - *dataPtr++ = val; + *coeff = val; } } ++cb; @@ -2634,68 +2848,46 @@ // tile-component data array -- interleave with (n)HL/LH/HH // and inverse transform to get (n-1)LL, which will be stored // in the upper-left corner of the tile-component data array - if (r == tileComp->nDecompLevels) { - cover(72); - nx0 = tileComp->x0; - ny0 = tileComp->y0; - nx1 = tileComp->x1; - ny1 = tileComp->y1; - } else { - cover(73); - nx0 = tileComp->resLevels[r+1].x0; - ny0 = tileComp->resLevels[r+1].y0; - nx1 = tileComp->resLevels[r+1].x1; - ny1 = tileComp->resLevels[r+1].y1; - } - inverseTransformLevel(tileComp, r, resLevel, nx0, ny0, nx1, ny1); + inverseTransformLevel(tileComp, r, resLevel); } } // Do one level of the inverse transform: -// - take (n)LL from the tile-component data array -// - take (n)HL/LH/HH from -// - leave the resulting (n-1)LL in the tile-component data array +// - take (n)LL, (n)HL, (n)LH, and (n)HH from the upper-left corner +// of the tile-component data array +// - leave the resulting (n-1)LL in the same place void JPXStream::inverseTransformLevel(JPXTileComp *tileComp, - Guint r, JPXResLevel *resLevel, - Guint nx0, Guint ny0, - Guint nx1, Guint ny1) { + Guint r, JPXResLevel *resLevel) { JPXPrecinct *precinct; JPXSubband *subband; JPXCodeBlock *cb; - JPXCoeff *coeff0, *coeff; + int *coeff0, *coeff; + char *touched0, *touched; Guint qStyle, guard, eps, shift, t; int shift2; double mu; int val; - int *dataPtr; - Guint xo, yo; + int *dataPtr, *bufPtr; + Guint nx1, nx2, ny1, ny2, offset; Guint x, y, sb, cbX, cbY; - int xx, yy; - //----- interleave + //----- fixed-point adjustment and dequantization - // spread out LL - for (yy = resLevel->y1 - 1; yy >= (int)resLevel->y0; --yy) { - for (xx = resLevel->x1 - 1; xx >= (int)resLevel->x0; --xx) { - tileComp->data[(2 * yy - ny0) * (tileComp->x1 - tileComp->x0) - + (2 * xx - nx0)] = - tileComp->data[(yy - resLevel->y0) * (tileComp->x1 - tileComp->x0) - + (xx - resLevel->x0)]; - } - } - - // i-quant parameters qStyle = tileComp->quantStyle & 0x1f; guard = (tileComp->quantStyle >> 5) & 7; - - // interleave HL/LH/HH precinct = &resLevel->precincts[0]; for (sb = 0; sb < 3; ++sb) { // i-quant parameters if (qStyle == 0) { cover(100); - eps = (tileComp->quantSteps[3*r - 2 + sb] >> 3) & 0x1f; + const Guint stepIndex = 3*r - 2 + sb; + if (unlikely(stepIndex >= tileComp->nQuantSteps)) { + error(errSyntaxError, getPos(), + "Wrong index for quantSteps in inverseTransformLevel in JPX stream"); + break; + } + eps = (tileComp->quantSteps[stepIndex] >> 3) & 0x1f; shift = guard + eps - 1; mu = 0; // make gcc happy } else { @@ -2705,7 +2897,13 @@ cover(102); ++shift; } - t = tileComp->quantSteps[qStyle == 1 ? 0 : (3*r - 2 + sb)]; + const Guint stepIndex = qStyle == 1 ? 0 : (3*r - 2 + sb); + if (unlikely(stepIndex >= tileComp->nQuantSteps)) { + error(errSyntaxError, getPos(), + "Wrong index for quantSteps in inverseTransformLevel in JPX stream"); + break; + } + t = tileComp->quantSteps[stepIndex]; mu = (double)(0x800 + (t & 0x7ff)) / 2048.0; } if (tileComp->transform == 0) { @@ -2713,27 +2911,27 @@ shift += fracBits; } - // copy the subband coefficients into the data array, doing the - // fixed point adjustment and dequantization along the way - xo = (sb & 1) ? 0 : 1; - yo = (sb > 0) ? 1 : 0; + // fixed point adjustment and dequantization subband = &precinct->subbands[sb]; cb = subband->cbs; for (cbY = 0; cbY < subband->nYCBs; ++cbY) { for (cbX = 0; cbX < subband->nXCBs; ++cbX) { - for (y = cb->y0, coeff0 = cb->coeffs; + for (y = cb->y0, coeff0 = cb->coeffs, touched0 = cb->touched; y < cb->y1; - ++y, coeff0 += tileComp->cbW) { - dataPtr = &tileComp->data[(2 * y + yo - ny0) - * (tileComp->x1 - tileComp->x0) - + (2 * cb->x0 + xo - nx0)]; - for (x = cb->x0, coeff = coeff0; x < cb->x1; ++x, ++coeff) { - val = (int)coeff->mag; + ++y, coeff0 += tileComp->w, touched0 += tileComp->cbW) { + for (x = cb->x0, coeff = coeff0, touched = touched0; + x < cb->x1; + ++x, ++coeff, ++touched) { + val = *coeff; if (val != 0) { - shift2 = shift - (cb->nZeroBitPlanes + coeff->len); + shift2 = shift - (cb->nZeroBitPlanes + cb->len + *touched); if (shift2 > 0) { cover(74); - val = (val << shift2) + (1 << (shift2 - 1)); + if (val < 0) { + val = (val << shift2) - (1 << (shift2 - 1)); + } else { + val = (val << shift2) + (1 << (shift2 - 1)); + } } else { cover(75); val >>= -shift2; @@ -2747,13 +2945,8 @@ cover(77); val = (int)((double)val * mu); } - if (coeff->flags & jpxCoeffSign) { - cover(78); - val = -val; - } } - *dataPtr = val; - dataPtr += 2; + *coeff = val; } } ++cb; @@ -2761,32 +2954,132 @@ } } - //----- horizontal (row) transforms - dataPtr = tileComp->data; - for (y = 0; y < ny1 - ny0; ++y) { - inverseTransform1D(tileComp, dataPtr, 1, nx0, nx1); - dataPtr += tileComp->x1 - tileComp->x0; - } - - //----- vertical (column) transforms - dataPtr = tileComp->data; - for (x = 0; x < nx1 - nx0; ++x) { - inverseTransform1D(tileComp, dataPtr, - tileComp->x1 - tileComp->x0, ny0, ny1); - ++dataPtr; + //----- inverse transform + + // compute the subband bounds: + // 0 nx1 nx2 + // | | | + // v v v + // +----+----+ + // | LL | HL | <- 0 + // +----+----+ + // | LH | HH | <- ny1 + // +----+----+ + // <- ny2 + nx1 = precinct->subbands[1].x1 - precinct->subbands[1].x0; + nx2 = nx1 + precinct->subbands[0].x1 - precinct->subbands[0].x0; + ny1 = precinct->subbands[0].y1 - precinct->subbands[0].y0; + ny2 = ny1 + precinct->subbands[1].y1 - precinct->subbands[1].y0; + + // horizontal (row) transforms + if (r == tileComp->nDecompLevels) { + offset = 3 + (tileComp->x0 & 1); + } else { + offset = 3 + (tileComp->resLevels[r+1].x0 & 1); + } + for (y = 0, dataPtr = tileComp->data; y < ny2; ++y, dataPtr += tileComp->w) { + if (precinct->subbands[0].x0 == precinct->subbands[1].x0) { + // fetch LL/LH + for (x = 0, bufPtr = tileComp->buf + offset; + x < nx1; + ++x, bufPtr += 2) { + *bufPtr = dataPtr[x]; + } + // fetch HL/HH + for (x = nx1, bufPtr = tileComp->buf + offset + 1; + x < nx2; + ++x, bufPtr += 2) { + *bufPtr = dataPtr[x]; + } + } else { + // fetch LL/LH + for (x = 0, bufPtr = tileComp->buf + offset + 1; + x < nx1; + ++x, bufPtr += 2) { + *bufPtr = dataPtr[x]; + } + // fetch HL/HH + for (x = nx1, bufPtr = tileComp->buf + offset; + x < nx2; + ++x, bufPtr += 2) { + *bufPtr = dataPtr[x]; + } + } + if (tileComp->x1 - tileComp->x0 > tileComp->y1 - tileComp->y0) { + x = tileComp->x1 - tileComp->x0 + 5; + } else { + x = tileComp->y1 - tileComp->y0 + 5; + } + if (offset + nx2 > x || nx2 == 0) { + error(errSyntaxError, getPos(), + "Invalid call of inverseTransform1D in inverseTransformLevel in JPX stream"); + return; + } + inverseTransform1D(tileComp, tileComp->buf, offset, nx2); + for (x = 0, bufPtr = tileComp->buf + offset; x < nx2; ++x, ++bufPtr) { + dataPtr[x] = *bufPtr; + } + } + + // vertical (column) transforms + if (r == tileComp->nDecompLevels) { + offset = 3 + (tileComp->y0 & 1); + } else { + offset = 3 + (tileComp->resLevels[r+1].y0 & 1); + } + for (x = 0, dataPtr = tileComp->data; x < nx2; ++x, ++dataPtr) { + if (precinct->subbands[1].y0 == precinct->subbands[0].y0) { + // fetch LL/HL + for (y = 0, bufPtr = tileComp->buf + offset; + y < ny1; + ++y, bufPtr += 2) { + *bufPtr = dataPtr[y * tileComp->w]; + } + // fetch LH/HH + for (y = ny1, bufPtr = tileComp->buf + offset + 1; + y < ny2; + ++y, bufPtr += 2) { + *bufPtr = dataPtr[y * tileComp->w]; + } + } else { + // fetch LL/HL + for (y = 0, bufPtr = tileComp->buf + offset + 1; + y < ny1; + ++y, bufPtr += 2) { + *bufPtr = dataPtr[y * tileComp->w]; + } + // fetch LH/HH + for (y = ny1, bufPtr = tileComp->buf + offset; + y < ny2; + ++y, bufPtr += 2) { + *bufPtr = dataPtr[y * tileComp->w]; + } + } + if (tileComp->x1 - tileComp->x0 > tileComp->y1 - tileComp->y0) { + y = tileComp->x1 - tileComp->x0 + 5; + } else { + y = tileComp->y1 - tileComp->y0 + 5; + } + if (offset + ny2 > y || ny2 == 0) { + error(errSyntaxError, getPos(), + "Invalid call of inverseTransform1D in inverseTransformLevel in JPX stream"); + return; + } + inverseTransform1D(tileComp, tileComp->buf, offset, ny2); + for (y = 0, bufPtr = tileComp->buf + offset; y < ny2; ++y, ++bufPtr) { + dataPtr[y * tileComp->w] = *bufPtr; + } } } -void JPXStream::inverseTransform1D(JPXTileComp *tileComp, - int *data, Guint stride, - Guint i0, Guint i1) { - int *buf; - Guint offset, end, i; +void JPXStream::inverseTransform1D(JPXTileComp *tileComp, int *data, + Guint offset, Guint n) { + Guint end, i; //----- special case for length = 1 - if (i1 - i0 == 1) { + if (n == 1) { cover(79); - if (i0 & 1) { + if (offset == 4) { cover(104); *data >>= 1; } @@ -2794,51 +3087,42 @@ } else { cover(80); - // choose an offset: this makes even buf[] indexes correspond to - // odd values of i, and vice versa - offset = 3 + (i0 & 1); - end = offset + i1 - i0; - - //----- gather - buf = tileComp->buf; - for (i = 0; i < i1 - i0; ++i) { - buf[offset + i] = data[i * stride]; - } + end = offset + n; //----- extend right - buf[end] = buf[end - 2]; - if (i1 - i0 == 2) { + data[end] = data[end - 2]; + if (n == 2) { cover(81); - buf[end+1] = buf[offset + 1]; - buf[end+2] = buf[offset]; - buf[end+3] = buf[offset + 1]; + data[end+1] = data[offset + 1]; + data[end+2] = data[offset]; + data[end+3] = data[offset + 1]; } else { cover(82); - buf[end+1] = buf[end - 3]; - if (i1 - i0 == 3) { + data[end+1] = data[end - 3]; + if (n == 3) { cover(105); - buf[end+2] = buf[offset + 1]; - buf[end+3] = buf[offset + 2]; + data[end+2] = data[offset + 1]; + data[end+3] = data[offset + 2]; } else { cover(106); - buf[end+2] = buf[end - 4]; - if (i1 - i0 == 4) { + data[end+2] = data[end - 4]; + if (n == 4) { cover(107); - buf[end+3] = buf[offset + 1]; + data[end+3] = data[offset + 1]; } else { cover(108); - buf[end+3] = buf[end - 5]; + data[end+3] = data[end - 5]; } } } //----- extend left - buf[offset - 1] = buf[offset + 1]; - buf[offset - 2] = buf[offset + 2]; - buf[offset - 3] = buf[offset + 3]; + data[offset - 1] = data[offset + 1]; + data[offset - 2] = data[offset + 2]; + data[offset - 3] = data[offset + 3]; if (offset == 4) { cover(83); - buf[0] = buf[offset + 4]; + data[0] = data[offset + 4]; } //----- 9-7 irreversible filter @@ -2847,27 +3131,27 @@ cover(84); // step 1 (even) for (i = 1; i <= end + 2; i += 2) { - buf[i] = (int)(idwtKappa * buf[i]); + data[i] = (int)(idwtKappa * data[i]); } // step 2 (odd) for (i = 0; i <= end + 3; i += 2) { - buf[i] = (int)(idwtIKappa * buf[i]); + data[i] = (int)(idwtIKappa * data[i]); } // step 3 (even) for (i = 1; i <= end + 2; i += 2) { - buf[i] = (int)(buf[i] - idwtDelta * (buf[i-1] + buf[i+1])); + data[i] = (int)(data[i] - idwtDelta * (data[i-1] + data[i+1])); } // step 4 (odd) for (i = 2; i <= end + 1; i += 2) { - buf[i] = (int)(buf[i] - idwtGamma * (buf[i-1] + buf[i+1])); + data[i] = (int)(data[i] - idwtGamma * (data[i-1] + data[i+1])); } // step 5 (even) for (i = 3; i <= end; i += 2) { - buf[i] = (int)(buf[i] - idwtBeta * (buf[i-1] + buf[i+1])); + data[i] = (int)(data[i] - idwtBeta * (data[i-1] + data[i+1])); } // step 6 (odd) for (i = 4; i <= end - 1; i += 2) { - buf[i] = (int)(buf[i] - idwtAlpha * (buf[i-1] + buf[i+1])); + data[i] = (int)(data[i] - idwtAlpha * (data[i-1] + data[i+1])); } //----- 5-3 reversible filter @@ -2876,18 +3160,13 @@ cover(85); // step 1 (even) for (i = 3; i <= end; i += 2) { - buf[i] -= (buf[i-1] + buf[i+1] + 2) >> 2; + data[i] -= (data[i-1] + data[i+1] + 2) >> 2; } // step 2 (odd) for (i = 4; i < end; i += 2) { - buf[i] += (buf[i-1] + buf[i+1]) >> 1; + data[i] += (data[i-1] + data[i+1]) >> 1; } } - - //----- scatter - for (i = 0; i < i1 - i0; ++i) { - data[i * stride] = buf[offset + i]; - } } } @@ -3016,7 +3295,8 @@ return gFalse; } if (lenH) { - error(getPos(), "JPX stream contains a box larger than 2^32 bytes"); + error(errSyntaxError, getPos(), + "JPX stream contains a box larger than 2^32 bytes"); return gFalse; } *boxLen = len; @@ -3036,12 +3316,12 @@ do { do { - if ((c = str->getChar()) == EOF) { + if ((c = bufStr->getChar()) == EOF) { return gFalse; } } while (c != 0xff); do { - if ((c = str->getChar()) == EOF) { + if ((c = bufStr->getChar()) == EOF) { return gFalse; } } while (c == 0xff); @@ -3058,7 +3338,7 @@ GBool JPXStream::readUByte(Guint *x) { int c0; - if ((c0 = str->getChar()) == EOF) { + if ((c0 = bufStr->getChar()) == EOF) { return gFalse; } *x = (Guint)c0; @@ -3068,7 +3348,7 @@ GBool JPXStream::readByte(int *x) { int c0; - if ((c0 = str->getChar()) == EOF) { + if ((c0 = bufStr->getChar()) == EOF) { return gFalse; } *x = c0; @@ -3081,8 +3361,8 @@ GBool JPXStream::readUWord(Guint *x) { int c0, c1; - if ((c0 = str->getChar()) == EOF || - (c1 = str->getChar()) == EOF) { + if ((c0 = bufStr->getChar()) == EOF || + (c1 = bufStr->getChar()) == EOF) { return gFalse; } *x = (Guint)((c0 << 8) | c1); @@ -3092,10 +3372,10 @@ GBool JPXStream::readULong(Guint *x) { int c0, c1, c2, c3; - if ((c0 = str->getChar()) == EOF || - (c1 = str->getChar()) == EOF || - (c2 = str->getChar()) == EOF || - (c3 = str->getChar()) == EOF) { + if ((c0 = bufStr->getChar()) == EOF || + (c1 = bufStr->getChar()) == EOF || + (c2 = bufStr->getChar()) == EOF || + (c3 = bufStr->getChar()) == EOF) { return gFalse; } *x = (Guint)((c0 << 24) | (c1 << 16) | (c2 << 8) | c3); @@ -3107,7 +3387,7 @@ y = 0; for (i = 0; i < nBytes; ++i) { - if ((c = str->getChar()) == EOF) { + if ((c = bufStr->getChar()) == EOF) { return gFalse; } y = (y << 8) + c; @@ -3121,11 +3401,17 @@ return gTrue; } +void JPXStream::startBitBuf(Guint byteCountA) { + bitBufLen = 0; + bitBufSkip = gFalse; + byteCount = byteCountA; +} + GBool JPXStream::readBits(int nBits, Guint *x) { int c; while (bitBufLen < nBits) { - if (byteCount == 0 || (c = str->getChar()) == EOF) { + if (byteCount == 0 || (c = bufStr->getChar()) == EOF) { return gFalse; } --byteCount; @@ -3143,15 +3429,42 @@ return gTrue; } -void JPXStream::startBitBuf(Guint byteCountA) { - bitBufLen = 0; - bitBufSkip = gFalse; - byteCount = byteCountA; +void JPXStream::skipSOP() { + int i; + + // SOP occurs at the start of the packet header, so we don't need to + // worry about bit-stuff prior to it + if (byteCount >= 6 && + bufStr->lookChar(0) == 0xff && + bufStr->lookChar(1) == 0x91) { + for (i = 0; i < 6; ++i) { + bufStr->getChar(); + } + byteCount -= 6; + bitBufLen = 0; + bitBufSkip = gFalse; + } +} + +void JPXStream::skipEPH() { + int i, k; + + k = bitBufSkip ? 1 : 0; + if (byteCount >= (Guint)(k + 2) && + bufStr->lookChar(k) == 0xff && + bufStr->lookChar(k + 1) == 0x92) { + for (i = 0; i < k + 2; ++i) { + bufStr->getChar(); + } + byteCount -= k + 2; + bitBufLen = 0; + bitBufSkip = gFalse; + } } Guint JPXStream::finishBitBuf() { if (bitBufSkip) { - str->getChar(); + bufStr->getChar(); --byteCount; } return byteCount; diff -Nru poppler-0.18.4/poppler/JPXStream.h poppler-0.20.5/poppler/JPXStream.h --- poppler-0.18.4/poppler/JPXStream.h 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/JPXStream.h 2012-05-10 20:05:44.000000000 +0000 @@ -99,24 +99,6 @@ //------------------------------------------------------------------------ -struct JPXCoeff { - Gushort flags; // flag bits - Gushort len; // number of significant bits in mag - Guint mag; // magnitude value -}; - -// coefficient flags -#define jpxCoeffSignificantB 0 -#define jpxCoeffTouchedB 1 -#define jpxCoeffFirstMagRefB 2 -#define jpxCoeffSignB 7 -#define jpxCoeffSignificant (1 << jpxCoeffSignificantB) -#define jpxCoeffTouched (1 << jpxCoeffTouchedB) -#define jpxCoeffFirstMagRef (1 << jpxCoeffFirstMagRefB) -#define jpxCoeffSign (1 << jpxCoeffSignB) - -//------------------------------------------------------------------------ - struct JPXCodeBlock { //----- size Guint x0, y0, x1, y1; // bounds @@ -134,10 +116,13 @@ Guint included; // code-block inclusion in this packet: // 0=not included, 1=included Guint nCodingPasses; // number of coding passes in this pkt - Guint dataLen; // pkt data length + Guint *dataLen; // data lengths (one per codeword segment) + Guint dataLenSize; // size of the dataLen array //----- coefficient data - JPXCoeff *coeffs; // the coefficients + int *coeffs; + char *touched; // coefficient 'touched' flags + Gushort len; // coefficient length JArithmeticDecoder // arithmetic decoder *arithDecoder; JArithmeticDecoderStats // arithmetic decoder stats @@ -212,6 +197,7 @@ //----- computed Guint x0, y0, x1, y1; // bounds of the tile-comp, in ref coords + Guint w; // x1 - x0 Guint cbW; // code-block width Guint cbH; // code-block height @@ -228,6 +214,8 @@ //------------------------------------------------------------------------ struct JPXTile { + GBool init; + //----- from the COD segments (main and tile) Guint progOrder; // progression order Guint nLayers; // number of layers @@ -279,7 +267,7 @@ virtual void close(); virtual int getChar(); virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); virtual void getImageParams(int *bitsPerComponent, StreamColorSpaceMode *csMode); @@ -302,12 +290,9 @@ JPXCodeBlock *cb); void inverseTransform(JPXTileComp *tileComp); void inverseTransformLevel(JPXTileComp *tileComp, - Guint r, JPXResLevel *resLevel, - Guint nx0, Guint ny0, - Guint nx1, Guint ny1); - void inverseTransform1D(JPXTileComp *tileComp, - int *data, Guint stride, - Guint i0, Guint i1); + Guint r, JPXResLevel *resLevel); + void inverseTransform1D(JPXTileComp *tileComp, int *data, + Guint offset, Guint n); GBool inverseMultiCompAndDC(JPXTile *tile); GBool readBoxHdr(Guint *boxType, Guint *boxLen, Guint *dataLen); int readMarkerHdr(int *segType, Guint *segLen); @@ -316,10 +301,14 @@ GBool readUWord(Guint *x); GBool readULong(Guint *x); GBool readNBytes(int nBytes, GBool signd, int *x); - GBool readBits(int nBits, Guint *x); void startBitBuf(Guint byteCountA); + GBool readBits(int nBits, Guint *x); + void skipSOP(); + void skipEPH(); Guint finishBitBuf(); + BufStream *bufStr; // buffered stream (for lookahead) + Guint nComps; // number of components Guint *bpc; // bits per component, for each component Guint width, height; // image size diff -Nru poppler-0.18.4/poppler/Lexer.cc poppler-0.20.5/poppler/Lexer.cc --- poppler-0.18.4/poppler/Lexer.cc 2012-02-15 17:10:57.000000000 +0000 +++ poppler-0.20.5/poppler/Lexer.cc 2012-09-16 11:48:38.000000000 +0000 @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2006-2010 Albert Astals Cid +// Copyright (C) 2006-2010, 2012 Albert Astals Cid // Copyright (C) 2006 Krzysztof Kowalczyk // Copyright (C) 2010 Carlos Garcia Campos // Copyright (C) 2012 Adrian Johnson @@ -237,7 +237,17 @@ if (overflownUnsignedInteger) { obj->initReal(xf); } else { - obj->initUint(xui); + if (neg) { + if (xui-1 == INT_MAX) { + obj->initInt(INT_MIN); + } else { + xf = xui; + xf = -xf; + obj->initReal(xf); + } + } else { + obj->initUint(xui); + } } } else { obj->initInt(xi); @@ -255,7 +265,7 @@ if (c == '-') { // ignore minus signs in the middle of numbers to match // Adobe's behavior - error(getPos(), "Badly formatted number"); + error(errSyntaxWarning, getPos(), "Badly formatted number"); getChar(); continue; } @@ -266,8 +276,9 @@ xf = xf + scale * (c - '0'); scale *= 0.1; } - if (neg) + if (neg) { xf = -xf; + } obj->initReal(xf); break; @@ -288,7 +299,7 @@ case '\r': case '\n': #endif - error(getPos(), "Unterminated string"); + error(errSyntaxError, getPos(), "Unterminated string"); done = gTrue; break; @@ -350,7 +361,7 @@ case '\n': break; case EOF: - error(getPos(), "Unterminated string"); + error(errSyntaxError, getPos(), "Unterminated string"); done = gTrue; break; default: @@ -379,7 +390,7 @@ int newObjNum = xref->getNumEntry(curStr.streamGetPos()); if (newObjNum != objNum) { - error(getPos(), "Unterminated string"); + error(errSyntaxError, getPos(), "Unterminated string"); done = gTrue; delete s; n = -2; @@ -429,34 +440,31 @@ } else if (c2 >= 'a' && c2 <= 'f') { c += c2 - 'a' + 10; } else { - error(getPos(), "Illegal digit in hex char in name"); + error(errSyntaxError, getPos(), "Illegal digit in hex char in name"); } } notEscChar: - if (n == tokBufSize) { - if (!s) - { - error(getPos(), "Warning: name token is longer than what the specification says it can be"); - s = new GooString(tokBuf, tokBufSize); - } - else - { - // the spec says 127 is the maximum, we are already at 256 so bail out - error(getPos(), "Name token too long"); - break; - } - p = tokBuf; - n = 0; - } - *p++ = c; + // the PDF spec claims that names are limited to 127 chars, but + // Distiller 8 will produce longer names, and Acrobat 8 will + // accept longer names ++n; + if (n < tokBufSize) { + *p++ = c; + } else if (n == tokBufSize) { + error(errSyntaxError, getPos(), "Warning: name token is longer than what the specification says it can be"); + *p = c; + s = new GooString(tokBuf, n); + } else { + s->append((char)c); + } } - *p = '\0'; - if (s) { - s->append(tokBuf, n); + if (n < tokBufSize) { + *p = '\0'; + obj->initName(tokBuf); + } else { obj->initName(s->getCString()); delete s; - } else obj->initName(tokBuf); + } break; // array punctuation @@ -489,7 +497,7 @@ if (c == '>') { break; } else if (c == EOF) { - error(getPos(), "Unterminated hex string"); + error(errSyntaxError, getPos(), "Unterminated hex string"); break; } else if (specialChars[c] != 1) { c2 = c2 << 4; @@ -500,7 +508,7 @@ else if (c >= 'a' && c <= 'f') c2 += c - 'a' + 10; else - error(getPos(), "Illegal character <%02x> in hex string", c); + error(errSyntaxError, getPos(), "Illegal character <{0:02x}> in hex string", c); if (++m == 2) { if (n == tokBufSize) { if (!s) @@ -536,7 +544,7 @@ tokBuf[2] = '\0'; obj->initCmd(tokBuf); } else { - error(getPos(), "Illegal character '>'"); + error(errSyntaxError, getPos(), "Illegal character '>'"); obj->initError(); } break; @@ -545,7 +553,7 @@ case ')': case '{': case '}': - error(getPos(), "Illegal character '%c'", c); + error(errSyntaxError, getPos(), "Illegal character '{0:c}'", c); obj->initError(); break; @@ -557,7 +565,7 @@ while ((c = lookChar()) != EOF && !specialChars[c]) { getChar(); if (++n == tokBufSize) { - error(getPos(), "Command token too long"); + error(errSyntaxError, getPos(), "Command token too long"); break; } *p++ = c; diff -Nru poppler-0.18.4/poppler/Linearization.cc poppler-0.20.5/poppler/Linearization.cc --- poppler-0.18.4/poppler/Linearization.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/Linearization.cc 2012-08-15 13:31:38.000000000 +0000 @@ -4,7 +4,7 @@ // // This file is licensed under the GPLv2 or later // -// Copyright 2010 Hib Eris +// Copyright 2010, 2012 Hib Eris // //======================================================================== @@ -60,7 +60,7 @@ length > 0) { return length; } else { - error(-1, "Length in linearization table is invalid"); + error(errSyntaxWarning, -1, "Length in linearization table is invalid"); return 0; } } @@ -77,7 +77,7 @@ obj2.getInt() > 0) { hintsOffset = obj2.getInt(); } else { - error(-1, "Hints table offset in linearization table is invalid"); + error(errSyntaxWarning, -1, "Hints table offset in linearization table is invalid"); hintsOffset = 0; } obj2.free(); @@ -98,7 +98,7 @@ obj2.getInt() > 0) { hintsLength = obj2.getInt(); } else { - error(-1, "Hints table length in linearization table is invalid"); + error(errSyntaxWarning, -1, "Hints table length in linearization table is invalid"); hintsLength = 0; } obj2.free(); @@ -119,7 +119,7 @@ obj2.getInt() > 0) { hintsOffset2 = obj2.getInt(); } else { - error(-1, "Second hints table offset in linearization table is invalid"); + error(errSyntaxWarning, -1, "Second hints table offset in linearization table is invalid"); hintsOffset2 = 0; } } @@ -141,7 +141,7 @@ obj2.getInt() > 0) { hintsLength2 = obj2.getInt(); } else { - error(-1, "Second hints table length in linearization table is invalid"); + error(errSyntaxWarning, -1, "Second hints table length in linearization table is invalid"); hintsLength2 = 0; } } @@ -159,7 +159,7 @@ objectNumberFirst > 0) { return objectNumberFirst; } else { - error(-1, "Object number of first page in linearization table is invalid"); + error(errSyntaxWarning, -1, "Object number of first page in linearization table is invalid"); return 0; } } @@ -172,7 +172,7 @@ pageEndFirst > 0) { return pageEndFirst; } else { - error(-1, "First page end offset in linearization table is invalid"); + error(errSyntaxWarning, -1, "First page end offset in linearization table is invalid"); return 0; } } @@ -185,7 +185,7 @@ numPages > 0) { return numPages; } else { - error(-1, "Page count in linearization table is invalid"); + error(errSyntaxWarning, -1, "Page count in linearization table is invalid"); return 0; } } @@ -198,7 +198,7 @@ mainXRefEntriesOffset > 0) { return mainXRefEntriesOffset; } else { - error(-1, "Main Xref offset in linearization table is invalid"); + error(errSyntaxWarning, -1, "Main Xref offset in linearization table is invalid"); return 0; } } @@ -211,8 +211,8 @@ linDict.getDict()->lookupInt("P", NULL, &pageFirst); } - if (pageFirst < 0) { - error(-1, "First page in linearization table is invalid"); + if ((pageFirst < 0) || (pageFirst > getNumPages())) { + error(errSyntaxWarning, -1, "First page in linearization table is invalid"); return 0; } diff -Nru poppler-0.18.4/poppler/Link.cc poppler-0.20.5/poppler/Link.cc --- poppler-0.18.4/poppler/Link.cc 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/Link.cc 2012-05-10 20:05:44.000000000 +0000 @@ -16,7 +16,7 @@ // Copyright (C) 2006, 2008 Pino Toscano // Copyright (C) 2007, 2010, 2011 Carlos Garcia Campos // Copyright (C) 2008 Hugo Mercier -// Copyright (C) 2008-2010 Albert Astals Cid +// Copyright (C) 2008-2010, 2012 Albert Astals Cid // Copyright (C) 2009 Kovid Goyal // Copyright (C) 2009 Ilya Gorenbein // @@ -66,7 +66,7 @@ Object obj2, obj3, obj4; if (!obj->isDict()) { - error(-1, "parseAction: Bad annotation action for URI '%s'", + error(errSyntaxWarning, -1, "parseAction: Bad annotation action for URI '{0:s}'", baseURI ? baseURI->getCString() : "NULL"); return NULL; } @@ -131,7 +131,7 @@ // action is missing or wrong type } else { - error(-1, "parseAction: Unknown annotation action object: URI = '%s'", + error(errSyntaxWarning, -1, "parseAction: Unknown annotation action object: URI = '{0:s}'", baseURI ? baseURI->getCString() : "NULL"); action = NULL; } @@ -159,7 +159,7 @@ // get page if (a->getLength() < 2) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); return; } a->getNF(0, &obj1); @@ -171,7 +171,7 @@ pageRef.gen = obj1.getRefGen(); pageIsRef = gTrue; } else { - error(-1, "Bad annotation destination"); + error(errSyntaxWarning, -1, "Bad annotation destination"); goto err2; } obj1.free(); @@ -192,7 +192,7 @@ changeLeft = gTrue; left = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); goto err1; } obj2.free(); @@ -207,7 +207,7 @@ changeTop = gTrue; top = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); goto err1; } obj2.free(); @@ -222,7 +222,7 @@ changeZoom = gTrue; zoom = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); goto err1; } obj2.free(); @@ -231,7 +231,7 @@ // Fit link } else if (obj1.isName("Fit")) { if (a->getLength() < 2) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFit; @@ -239,7 +239,7 @@ // FitH link } else if (obj1.isName("FitH")) { if (a->getLength() < 3) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFitH; @@ -250,7 +250,7 @@ changeTop = gTrue; top = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } obj2.free(); @@ -258,7 +258,7 @@ // FitV link } else if (obj1.isName("FitV")) { if (a->getLength() < 3) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFitV; @@ -269,7 +269,7 @@ changeLeft = gTrue; left = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } obj2.free(); @@ -277,39 +277,43 @@ // FitR link } else if (obj1.isName("FitR")) { if (a->getLength() < 6) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFitR; - if (!a->get(2, &obj2)->isNum()) { - error(-1, "Bad annotation destination position"); + if (a->get(2, &obj2)->isNum()) { + left = obj2.getNum(); + } else { + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } - left = obj2.getNum(); obj2.free(); - if (!a->get(3, &obj2)->isNum()) { - error(-1, "Bad annotation destination position"); + if (a->get(3, &obj2)->isNum()) { + bottom = obj2.getNum(); + } else { + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } - bottom = obj2.getNum(); obj2.free(); - if (!a->get(4, &obj2)->isNum()) { - error(-1, "Bad annotation destination position"); + if (a->get(4, &obj2)->isNum()) { + right = obj2.getNum(); + } else { + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } - right = obj2.getNum(); obj2.free(); - if (!a->get(5, &obj2)->isNum()) { - error(-1, "Bad annotation destination position"); + if (a->get(5, &obj2)->isNum()) { + top = obj2.getNum(); + } else { + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } - top = obj2.getNum(); obj2.free(); // FitB link } else if (obj1.isName("FitB")) { if (a->getLength() < 2) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFitB; @@ -317,7 +321,7 @@ // FitBH link } else if (obj1.isName("FitBH")) { if (a->getLength() < 3) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFitBH; @@ -328,7 +332,7 @@ changeTop = gTrue; top = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } obj2.free(); @@ -336,7 +340,7 @@ // FitBV link } else if (obj1.isName("FitBV")) { if (a->getLength() < 3) { - error(-1, "Annotation destination array is too short"); + error(errSyntaxWarning, -1, "Annotation destination array is too short"); goto err2; } kind = destFitBV; @@ -347,14 +351,14 @@ changeLeft = gTrue; left = obj2.getNum(); } else { - error(-1, "Bad annotation destination position"); + error(errSyntaxWarning, -1, "Bad annotation destination position"); kind = destFit; } obj2.free(); // unknown link kind } else { - error(-1, "Unknown annotation destination type"); + error(errSyntaxWarning, -1, "Unknown annotation destination type"); goto err2; } @@ -410,7 +414,7 @@ // error } else { - error(-1, "Illegal annotation destination"); + error(errSyntaxWarning, -1, "Illegal annotation destination"); } } @@ -453,7 +457,7 @@ // error } else { - error(-1, "Illegal annotation destination"); + error(errSyntaxWarning, -1, "Illegal annotation destination"); } } @@ -498,7 +502,7 @@ } obj2.free(); } else { - error(-1, "Bad launch-type link action"); + error(errSyntaxWarning, -1, "Bad launch-type link action"); } #else //~ This hasn't been defined by Adobe yet, so assume it looks @@ -515,7 +519,7 @@ } obj2.free(); } else { - error(-1, "Bad launch-type link action"); + error(errSyntaxWarning, -1, "Bad launch-type link action"); } #endif } @@ -541,31 +545,34 @@ uri = NULL; if (uriObj->isString()) { - uri2 = uriObj->getString()->copy(); - if (baseURI && baseURI->getLength() > 0) { - n = strcspn(uri2->getCString(), "/:"); - if (n == uri2->getLength() || uri2->getChar(n) == '/') { + uri2 = uriObj->getString(); + n = (int)strcspn(uri2->getCString(), "/:"); + if (n < uri2->getLength() && uri2->getChar(n) == ':') { + // "http:..." etc. + uri = uri2->copy(); + } else if (!uri2->cmpN("www.", 4)) { + // "www.[...]" without the leading "http://" + uri = new GooString("http://"); + uri->append(uri2); + } else { + // relative URI + if (baseURI) { uri = baseURI->copy(); c = uri->getChar(uri->getLength() - 1); - if (c == '/' || c == '?') { - if (uri2->getChar(0) == '/') { - uri2->del(0); - } + if (c != '/' && c != '?') { + uri->append('/'); + } + if (uri2->getChar(0) == '/') { + uri->append(uri2->getCString() + 1, uri2->getLength() - 1); } else { - if (uri2->getChar(0) != '/') { - uri->append('/'); - } + uri->append(uri2); } - uri->append(uri2); - delete uri2; } else { - uri = uri2; + uri = uri2->copy(); } - } else { - uri = uri2; } } else { - error(-1, "Illegal URI-type link"); + error(errSyntaxWarning, -1, "Illegal URI-type link"); } } @@ -611,7 +618,8 @@ tmp.free(); if ((annotTitle == NULL) && (annotRef.num == -1)) { - error(-1, "Movie action is missing both the Annot and T keys"); + error(errSyntaxError, -1, + "Movie action is missing both the Annot and T keys"); } if (obj->dictLookup("Operation", &tmp)->isName()) { @@ -707,7 +715,7 @@ js = new GooString(); stream->fillGooString(js); } else { - error(-1, "Invalid Rendition Action: JS not string or stream"); + error(errSyntaxWarning, -1, "Invalid Rendition Action: JS not string or stream"); } } tmp.free(); @@ -715,7 +723,7 @@ if (obj->dictLookup("OP", &tmp)->isInt()) { operation = tmp.getInt(); if (!js && (operation < 0 || operation > 4)) { - error (-1, "Invalid Rendition Action: unrecognized operation valued: %d", operation); + error(errSyntaxWarning, -1, "Invalid Rendition Action: unrecognized operation valued: {0:d}", operation); } else { Object obj1; @@ -723,17 +731,17 @@ if (obj->dictLookup("R", &renditionObj)->isDict()) { media = new MediaRendition(&renditionObj); } else if (operation == 0 || operation == 4) { - error (-1, "Invalid Rendition Action: no R field with op = %d", operation); + error(errSyntaxWarning, -1, "Invalid Rendition Action: no R field with op = {0:d}", operation); renditionObj.free(); } if (!obj->dictLookupNF("AN", &screenRef)->isRef() && operation >= 0 && operation <= 4) { - error (-1, "Invalid Rendition Action: no AN field with op = %d", operation); + error(errSyntaxWarning, -1, "Invalid Rendition Action: no AN field with op = {0:d}", operation); screenRef.free(); } } } else if (!js) { - error(-1, "Invalid Rendition action: no OP or JS field defined"); + error(errSyntaxWarning, -1, "Invalid Rendition action: no OP or JS field defined"); } tmp.free(); } @@ -803,7 +811,7 @@ } else if (!strcmp (name, "Toggle")) { stList->st = Toggle; } else { - error (-1, "Invalid name '%s' in OCG Action state array", name); + error(errSyntaxWarning, -1, "Invalid name '{0:s}' in OCG Action state array", name); delete stList; stList = NULL; } @@ -815,10 +823,10 @@ item->gen = ocgRef.gen; stList->list->append(item); } else { - error (-1, "Invalid OCG Action State array, expected name instead of ref"); + error(errSyntaxWarning, -1, "Invalid OCG Action State array, expected name instead of ref"); } } else { - error (-1, "Invalid item in OCG Action State array"); + error(errSyntaxWarning, -1, "Invalid item in OCG Action State array"); } obj2.free(); } @@ -826,7 +834,7 @@ if (stList) stateList->append(stList); } else { - error (-1, "Invalid OCGState action"); + error(errSyntaxWarning, -1, "Invalid OCGState action"); delete stateList; stateList = NULL; } diff -Nru poppler-0.18.4/poppler/Link.h poppler-0.20.5/poppler/Link.h --- poppler-0.18.4/poppler/Link.h 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/Link.h 2012-05-10 20:05:44.000000000 +0000 @@ -129,8 +129,10 @@ double left, bottom; // position double right, top; double zoom; // zoom factor - GBool changeLeft, changeTop; // for destXYZ links, which position - GBool changeZoom; // components to change + GBool changeLeft, changeTop; // which position components to change: + GBool changeZoom; // destXYZ uses all three; + // destFitH/BH use changeTop; + // destFitV/BV use changeLeft GBool ok; // set if created successfully LinkDest(LinkDest *dest); diff -Nru poppler-0.18.4/poppler/Makefile.am poppler-0.20.5/poppler/Makefile.am --- poppler-0.18.4/poppler/Makefile.am 2011-11-22 21:33:13.000000000 +0000 +++ poppler-0.20.5/poppler/Makefile.am 2012-09-10 17:28:34.000000000 +0000 @@ -61,6 +61,8 @@ libjpeg_libs = \ $(LIBJPEG_LIBS) +libjpeg_includes = \ + $(LIBJPEG_CFLAGS) endif @@ -90,6 +92,8 @@ libjpeg2000_libs = \ $(LIBOPENJPEG_LIBS) +libjpeg2000_includes = \ + $(LIBOPENJPEG_CFLAGS) else @@ -141,7 +145,9 @@ $(splash_includes) \ $(cairo_includes) \ $(arthur_includes) \ + $(libjpeg_includes) \ $(libtiff_includes) \ + $(libjpeg2000_includes) \ $(libpng_includes) \ $(libcurl_includes) \ $(FREETYPE_CFLAGS) \ @@ -171,7 +177,7 @@ $(PTHREAD_LIBS) \ $(win32_libs) -libpoppler_la_LDFLAGS = -version-info 19:0:0 @create_shared_lib@ @auto_import_flags@ +libpoppler_la_LDFLAGS = -version-info 28:0:0 @create_shared_lib@ @auto_import_flags@ if ENABLE_XPDF_HEADERS diff -Nru poppler-0.18.4/poppler/Makefile.in poppler-0.20.5/poppler/Makefile.in --- poppler-0.18.4/poppler/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/poppler/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -74,6 +91,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(poppler_includedir)" \ "$(DESTDIR)$(poppler_includedir)" @@ -84,8 +107,8 @@ @BUILD_POPPLER_QT4_TRUE@am_libpoppler_arthur_la_OBJECTS = \ @BUILD_POPPLER_QT4_TRUE@ ArthurOutputDev.lo libpoppler_arthur_la_OBJECTS = $(am_libpoppler_arthur_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent @BUILD_POPPLER_QT4_TRUE@am_libpoppler_arthur_la_rpath = libpoppler_cairo_la_LIBADD = @@ -172,18 +195,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -191,24 +214,29 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpoppler_arthur_la_SOURCES) \ $(libpoppler_cairo_la_SOURCES) $(libpoppler_la_SOURCES) DIST_SOURCES = $(am__libpoppler_arthur_la_SOURCES_DIST) \ $(am__libpoppler_cairo_la_SOURCES_DIST) \ $(am__libpoppler_la_SOURCES_DIST) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__poppler_include_HEADERS_DIST = SplashOutputDev.h CurlCachedFile.h \ CurlPDFDocBuilder.h Annot.h Array.h BuiltinFont.h \ BuiltinFontTables.h CachedFile.h Catalog.h CharCodeToUnicode.h \ @@ -303,12 +331,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -362,6 +394,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -472,6 +505,9 @@ @BUILD_LIBJPEG_TRUE@libjpeg_libs = \ @BUILD_LIBJPEG_TRUE@ $(LIBJPEG_LIBS) +@BUILD_LIBJPEG_TRUE@libjpeg_includes = \ +@BUILD_LIBJPEG_TRUE@ $(LIBJPEG_CFLAGS) + @BUILD_LIBPNG_TRUE@libpng_libs = \ @BUILD_LIBPNG_TRUE@ $(LIBPNG_LIBS) @@ -495,6 +531,9 @@ @BUILD_LIBOPENJPEG_TRUE@libjpeg2000_libs = \ @BUILD_LIBOPENJPEG_TRUE@ $(LIBOPENJPEG_LIBS) +@BUILD_LIBOPENJPEG_TRUE@libjpeg2000_includes = \ +@BUILD_LIBOPENJPEG_TRUE@ $(LIBOPENJPEG_CFLAGS) + @BUILD_ZLIB_TRUE@zlib_sources = \ @BUILD_ZLIB_TRUE@ FlateStream.h \ @BUILD_ZLIB_TRUE@ FlateStream.cc @@ -525,7 +564,9 @@ $(splash_includes) \ $(cairo_includes) \ $(arthur_includes) \ + $(libjpeg_includes) \ $(libtiff_includes) \ + $(libjpeg2000_includes) \ $(libpng_includes) \ $(libcurl_includes) \ $(FREETYPE_CFLAGS) \ @@ -551,7 +592,7 @@ $(PTHREAD_LIBS) \ $(win32_libs) -libpoppler_la_LDFLAGS = -version-info 19:0:0 @create_shared_lib@ @auto_import_flags@ +libpoppler_la_LDFLAGS = -version-info 28:0:0 @create_shared_lib@ @auto_import_flags@ @ENABLE_XPDF_HEADERS_TRUE@poppler_includedir = $(includedir)/poppler @ENABLE_XPDF_HEADERS_TRUE@poppler_include_HEADERS = \ @ENABLE_XPDF_HEADERS_TRUE@ $(splash_headers) \ @@ -736,10 +777,8 @@ $(am__aclocal_m4_deps): poppler-config.h: stamp-h2 - @if test ! -f $@; then \ - rm -f stamp-h2; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h2; \ - else :; fi + @if test ! -f $@; then rm -f stamp-h2; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h2; else :; fi stamp-h2: $(srcdir)/poppler-config.h.in $(top_builddir)/config.status @rm -f stamp-h2 @@ -753,7 +792,6 @@ -rm -f poppler-config.h stamp-h2 install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -761,6 +799,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -791,11 +831,11 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libpoppler-arthur.la: $(libpoppler_arthur_la_OBJECTS) $(libpoppler_arthur_la_DEPENDENCIES) +libpoppler-arthur.la: $(libpoppler_arthur_la_OBJECTS) $(libpoppler_arthur_la_DEPENDENCIES) $(EXTRA_libpoppler_arthur_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(am_libpoppler_arthur_la_rpath) $(libpoppler_arthur_la_OBJECTS) $(libpoppler_arthur_la_LIBADD) $(LIBS) -libpoppler-cairo.la: $(libpoppler_cairo_la_OBJECTS) $(libpoppler_cairo_la_DEPENDENCIES) +libpoppler-cairo.la: $(libpoppler_cairo_la_OBJECTS) $(libpoppler_cairo_la_DEPENDENCIES) $(EXTRA_libpoppler_cairo_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(am_libpoppler_cairo_la_rpath) $(libpoppler_cairo_la_OBJECTS) $(libpoppler_cairo_la_LIBADD) $(LIBS) -libpoppler.la: $(libpoppler_la_OBJECTS) $(libpoppler_la_DEPENDENCIES) +libpoppler.la: $(libpoppler_la_OBJECTS) $(libpoppler_la_DEPENDENCIES) $(EXTRA_libpoppler_la_DEPENDENCIES) $(AM_V_CXXLD)$(libpoppler_la_LINK) -rpath $(libdir) $(libpoppler_la_OBJECTS) $(libpoppler_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -878,50 +918,44 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -930,8 +964,11 @@ -rm -rf .libs _libs install-nodist_poppler_includeHEADERS: $(nodist_poppler_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" @list='$(nodist_poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -945,13 +982,14 @@ @$(NORMAL_UNINSTALL) @list='$(nodist_poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir) install-poppler_includeHEADERS: $(poppler_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -965,9 +1003,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -1068,10 +1104,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/poppler/Movie.cc poppler-0.20.5/poppler/Movie.cc --- poppler-0.18.4/poppler/Movie.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/Movie.cc 2012-06-10 15:54:32.000000000 +0000 @@ -194,7 +194,7 @@ fileName = obj2.getString()->copy(); obj2.free(); } else { - error (-1, "Invalid Movie"); + error (errSyntaxError, -1, "Invalid Movie"); ok = gFalse; obj1.free(); return; diff -Nru poppler-0.18.4/poppler/NameToCharCode.cc poppler-0.20.5/poppler/NameToCharCode.cc --- poppler-0.18.4/poppler/NameToCharCode.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/NameToCharCode.cc 2012-05-10 20:05:44.000000000 +0000 @@ -47,7 +47,7 @@ gfree(tab); } -void NameToCharCode::add(char *name, CharCode c) { +void NameToCharCode::add(const char *name, CharCode c) { NameToCharCodeEntry *oldTab; int h, i, oldSize; @@ -89,7 +89,7 @@ ++len; } -CharCode NameToCharCode::lookup(char *name) { +CharCode NameToCharCode::lookup(const char *name) { int h; h = hash(name); @@ -104,8 +104,8 @@ return 0; } -int NameToCharCode::hash(char *name) { - char *p; +int NameToCharCode::hash(const char *name) { + const char *p; unsigned int h; h = 0; diff -Nru poppler-0.18.4/poppler/NameToCharCode.h poppler-0.20.5/poppler/NameToCharCode.h --- poppler-0.18.4/poppler/NameToCharCode.h 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/NameToCharCode.h 2012-05-10 20:05:44.000000000 +0000 @@ -25,12 +25,12 @@ NameToCharCode(); ~NameToCharCode(); - void add(char *name, CharCode c); - CharCode lookup(char *name); + void add(const char *name, CharCode c); + CharCode lookup(const char *name); private: - int hash(char *name); + int hash(const char *name); NameToCharCodeEntry *tab; int size; diff -Nru poppler-0.18.4/poppler/NameToUnicodeTable.h poppler-0.20.5/poppler/NameToUnicodeTable.h --- poppler-0.18.4/poppler/NameToUnicodeTable.h 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/NameToUnicodeTable.h 2012-05-10 20:05:44.000000000 +0000 @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2011 Albert Astals Cid +// Copyright (C) 2011, 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -26,7 +26,7 @@ static struct { Unicode u; - char *name; + const char *name; } nameToUnicodeTab[] = { {0x0021, "!"}, {0x0023, "#"}, @@ -62,146 +62,392 @@ {0x0041, "A"}, {0x00c6, "AE"}, {0x01fc, "AEacute"}, + {0x01e2, "AEmacron"}, {0xf7e6, "AEsmall"}, {0x00c1, "Aacute"}, {0xf7e1, "Aacutesmall"}, {0x0102, "Abreve"}, + {0x1eae, "Abreveacute"}, + {0x04d0, "Abrevecyrillic"}, + {0x1eb6, "Abrevedotbelow"}, + {0x1eb0, "Abrevegrave"}, + {0x1eb2, "Abrevehookabove"}, + {0x1eb4, "Abrevetilde"}, + {0x01cd, "Acaron"}, + {0x24b6, "Acircle"}, {0x00c2, "Acircumflex"}, + {0x1ea4, "Acircumflexacute"}, + {0x1eac, "Acircumflexdotbelow"}, + {0x1ea6, "Acircumflexgrave"}, + {0x1ea8, "Acircumflexhookabove"}, {0xf7e2, "Acircumflexsmall"}, + {0x1eaa, "Acircumflextilde"}, {0xf6c9, "Acute"}, {0xf7b4, "Acutesmall"}, + {0x0410, "Acyrillic"}, + {0x0200, "Adblgrave"}, {0x00c4, "Adieresis"}, + {0x04d2, "Adieresiscyrillic"}, + {0x01de, "Adieresismacron"}, {0xf7e4, "Adieresissmall"}, + {0x1ea0, "Adotbelow"}, + {0x01e0, "Adotmacron"}, {0x00c0, "Agrave"}, {0xf7e0, "Agravesmall"}, + {0x1ea2, "Ahookabove"}, + {0x04d4, "Aiecyrillic"}, + {0x0202, "Ainvertedbreve"}, {0x0391, "Alpha"}, {0x0386, "Alphatonos"}, {0x0100, "Amacron"}, + {0xff21, "Amonospace"}, {0x0104, "Aogonek"}, {0x00c5, "Aring"}, {0x01fa, "Aringacute"}, + {0x1e00, "Aringbelow"}, {0xf7e5, "Aringsmall"}, {0xf761, "Asmall"}, {0x00c3, "Atilde"}, {0xf7e3, "Atildesmall"}, + {0x0531, "Aybarmenian"}, {0x0042, "B"}, + {0x24b7, "Bcircle"}, + {0x1e02, "Bdotaccent"}, + {0x1e04, "Bdotbelow"}, + {0x0411, "Becyrillic"}, + {0x0532, "Benarmenian"}, {0x0392, "Beta"}, + {0x0181, "Bhook"}, + {0x1e06, "Blinebelow"}, + {0xff22, "Bmonospace"}, {0xf6f4, "Brevesmall"}, {0xf762, "Bsmall"}, + {0x0182, "Btopbar"}, {0x0043, "C"}, + {0x053e, "Caarmenian"}, {0x0106, "Cacute"}, {0xf6ca, "Caron"}, {0xf6f5, "Caronsmall"}, {0x010c, "Ccaron"}, {0x00c7, "Ccedilla"}, + {0x1e08, "Ccedillaacute"}, {0xf7e7, "Ccedillasmall"}, + {0x24b8, "Ccircle"}, {0x0108, "Ccircumflex"}, + {0x010a, "Cdot"}, {0x010a, "Cdotaccent"}, {0xf7b8, "Cedillasmall"}, + {0x0549, "Chaarmenian"}, + {0x04bc, "Cheabkhasiancyrillic"}, + {0x0427, "Checyrillic"}, + {0x04be, "Chedescenderabkhasiancyrillic"}, + {0x04b6, "Chedescendercyrillic"}, + {0x04f4, "Chedieresiscyrillic"}, + {0x0543, "Cheharmenian"}, + {0x04cb, "Chekhakassiancyrillic"}, + {0x04b8, "Cheverticalstrokecyrillic"}, {0x03a7, "Chi"}, + {0x0187, "Chook"}, {0xf6f6, "Circumflexsmall"}, + {0xff23, "Cmonospace"}, + {0x0551, "Coarmenian"}, {0xf763, "Csmall"}, {0x0044, "D"}, + {0x01f1, "DZ"}, + {0x01c4, "DZcaron"}, + {0x0534, "Daarmenian"}, + {0x0189, "Dafrican"}, {0x010e, "Dcaron"}, + {0x1e10, "Dcedilla"}, + {0x24b9, "Dcircle"}, + {0x1e12, "Dcircumflexbelow"}, {0x0110, "Dcroat"}, + {0x1e0a, "Ddotaccent"}, + {0x1e0c, "Ddotbelow"}, + {0x0414, "Decyrillic"}, + {0x03ee, "Deicoptic"}, {0x2206, "Delta"}, + {0x0394, "Deltagreek"}, + {0x018a, "Dhook"}, {0xf6cb, "Dieresis"}, {0xf6cc, "DieresisAcute"}, {0xf6cd, "DieresisGrave"}, {0xf7a8, "Dieresissmall"}, + {0x03dc, "Digammagreek"}, + {0x0402, "Djecyrillic"}, + {0x1e0e, "Dlinebelow"}, + {0xff24, "Dmonospace"}, {0xf6f7, "Dotaccentsmall"}, + {0x0110, "Dslash"}, {0xf764, "Dsmall"}, + {0x018b, "Dtopbar"}, + {0x01f2, "Dz"}, + {0x01c5, "Dzcaron"}, + {0x04e0, "Dzeabkhasiancyrillic"}, + {0x0405, "Dzecyrillic"}, + {0x040f, "Dzhecyrillic"}, {0x0045, "E"}, {0x00c9, "Eacute"}, {0xf7e9, "Eacutesmall"}, {0x0114, "Ebreve"}, {0x011a, "Ecaron"}, + {0x1e1c, "Ecedillabreve"}, + {0x0535, "Echarmenian"}, + {0x24ba, "Ecircle"}, {0x00ca, "Ecircumflex"}, + {0x1ebe, "Ecircumflexacute"}, + {0x1e18, "Ecircumflexbelow"}, + {0x1ec6, "Ecircumflexdotbelow"}, + {0x1ec0, "Ecircumflexgrave"}, + {0x1ec2, "Ecircumflexhookabove"}, {0xf7ea, "Ecircumflexsmall"}, + {0x1ec4, "Ecircumflextilde"}, + {0x0404, "Ecyrillic"}, + {0x0204, "Edblgrave"}, {0x00cb, "Edieresis"}, {0xf7eb, "Edieresissmall"}, + {0x0116, "Edot"}, {0x0116, "Edotaccent"}, + {0x1eb8, "Edotbelow"}, + {0x0424, "Efcyrillic"}, {0x00c8, "Egrave"}, {0xf7e8, "Egravesmall"}, + {0x0537, "Eharmenian"}, + {0x1eba, "Ehookabove"}, + {0x2167, "Eightroman"}, + {0x0206, "Einvertedbreve"}, + {0x0464, "Eiotifiedcyrillic"}, + {0x041b, "Elcyrillic"}, + {0x216a, "Elevenroman"}, {0x0112, "Emacron"}, + {0x1e16, "Emacronacute"}, + {0x1e14, "Emacrongrave"}, + {0x041c, "Emcyrillic"}, + {0xff25, "Emonospace"}, + {0x041d, "Encyrillic"}, + {0x04a2, "Endescendercyrillic"}, {0x014a, "Eng"}, + {0x04a4, "Enghecyrillic"}, + {0x04c7, "Enhookcyrillic"}, {0x0118, "Eogonek"}, + {0x0190, "Eopen"}, {0x0395, "Epsilon"}, {0x0388, "Epsilontonos"}, + {0x0420, "Ercyrillic"}, + {0x018e, "Ereversed"}, + {0x042d, "Ereversedcyrillic"}, + {0x0421, "Escyrillic"}, + {0x04aa, "Esdescendercyrillic"}, + {0x01a9, "Esh"}, {0xf765, "Esmall"}, {0x0397, "Eta"}, + {0x0538, "Etarmenian"}, {0x0389, "Etatonos"}, {0x00d0, "Eth"}, {0xf7f0, "Ethsmall"}, + {0x1ebc, "Etilde"}, + {0x1e1a, "Etildebelow"}, {0x20ac, "Euro"}, + {0x01b7, "Ezh"}, + {0x01ee, "Ezhcaron"}, + {0x01b8, "Ezhreversed"}, {0x0046, "F"}, + {0x24bb, "Fcircle"}, + {0x1e1e, "Fdotaccent"}, + {0x0556, "Feharmenian"}, + {0x03e4, "Feicoptic"}, + {0x0191, "Fhook"}, + {0x0472, "Fitacyrillic"}, + {0x2164, "Fiveroman"}, + {0xff26, "Fmonospace"}, + {0x2163, "Fourroman"}, {0xf766, "Fsmall"}, {0x0047, "G"}, + {0x3387, "GBsquare"}, + {0x01f4, "Gacute"}, {0x0393, "Gamma"}, + {0x0194, "Gammaafrican"}, + {0x03ea, "Gangiacoptic"}, {0x011e, "Gbreve"}, {0x01e6, "Gcaron"}, + {0x0122, "Gcedilla"}, + {0x24bc, "Gcircle"}, {0x011c, "Gcircumflex"}, {0x0122, "Gcommaaccent"}, + {0x0120, "Gdot"}, {0x0120, "Gdotaccent"}, + {0x0413, "Gecyrillic"}, + {0x0542, "Ghadarmenian"}, + {0x0494, "Ghemiddlehookcyrillic"}, + {0x0492, "Ghestrokecyrillic"}, + {0x0490, "Gheupturncyrillic"}, + {0x0193, "Ghook"}, + {0x0533, "Gimarmenian"}, + {0x0403, "Gjecyrillic"}, + {0x1e20, "Gmacron"}, + {0xff27, "Gmonospace"}, {0xf6ce, "Grave"}, {0xf760, "Gravesmall"}, {0xf767, "Gsmall"}, + {0x029b, "Gsmallhook"}, + {0x01e4, "Gstroke"}, {0x0048, "H"}, {0x25cf, "H18533"}, {0x25aa, "H18543"}, {0x25ab, "H18551"}, {0x25a1, "H22073"}, + {0x33cb, "HPsquare"}, + {0x04a8, "Haabkhasiancyrillic"}, + {0x04b2, "Hadescendercyrillic"}, + {0x042a, "Hardsigncyrillic"}, {0x0126, "Hbar"}, + {0x1e2a, "Hbrevebelow"}, + {0x1e28, "Hcedilla"}, + {0x24bd, "Hcircle"}, {0x0124, "Hcircumflex"}, + {0x1e26, "Hdieresis"}, + {0x1e22, "Hdotaccent"}, + {0x1e24, "Hdotbelow"}, + {0xff28, "Hmonospace"}, + {0x0540, "Hoarmenian"}, + {0x03e8, "Horicoptic"}, {0xf768, "Hsmall"}, {0xf6cf, "Hungarumlaut"}, {0xf6f8, "Hungarumlautsmall"}, + {0x3390, "Hzsquare"}, {0x0049, "I"}, + {0x042f, "IAcyrillic"}, {0x0132, "IJ"}, + {0x042e, "IUcyrillic"}, {0x00cd, "Iacute"}, {0xf7ed, "Iacutesmall"}, {0x012c, "Ibreve"}, + {0x01cf, "Icaron"}, + {0x24be, "Icircle"}, {0x00ce, "Icircumflex"}, {0xf7ee, "Icircumflexsmall"}, + {0x0406, "Icyrillic"}, + {0x0208, "Idblgrave"}, {0x00cf, "Idieresis"}, + {0x1e2e, "Idieresisacute"}, + {0x04e4, "Idieresiscyrillic"}, {0xf7ef, "Idieresissmall"}, + {0x0130, "Idot"}, {0x0130, "Idotaccent"}, + {0x1eca, "Idotbelow"}, + {0x04d6, "Iebrevecyrillic"}, + {0x0415, "Iecyrillic"}, {0x2111, "Ifraktur"}, {0x00cc, "Igrave"}, {0xf7ec, "Igravesmall"}, + {0x1ec8, "Ihookabove"}, + {0x0418, "Iicyrillic"}, + {0x020a, "Iinvertedbreve"}, + {0x0419, "Iishortcyrillic"}, {0x012a, "Imacron"}, + {0x04e2, "Imacroncyrillic"}, + {0xff29, "Imonospace"}, + {0x053b, "Iniarmenian"}, + {0x0401, "Iocyrillic"}, {0x012e, "Iogonek"}, {0x0399, "Iota"}, + {0x0196, "Iotaafrican"}, {0x03aa, "Iotadieresis"}, {0x038a, "Iotatonos"}, {0xf769, "Ismall"}, + {0x0197, "Istroke"}, {0x0128, "Itilde"}, + {0x1e2c, "Itildebelow"}, + {0x0474, "Izhitsacyrillic"}, + {0x0476, "Izhitsadblgravecyrillic"}, {0x004a, "J"}, + {0x0541, "Jaarmenian"}, + {0x24bf, "Jcircle"}, {0x0134, "Jcircumflex"}, + {0x0408, "Jecyrillic"}, + {0x054b, "Jheharmenian"}, + {0xff2a, "Jmonospace"}, {0xf76a, "Jsmall"}, {0x004b, "K"}, + {0x3385, "KBsquare"}, + {0x33cd, "KKsquare"}, + {0x04a0, "Kabashkircyrillic"}, + {0x1e30, "Kacute"}, + {0x041a, "Kacyrillic"}, + {0x049a, "Kadescendercyrillic"}, + {0x04c3, "Kahookcyrillic"}, {0x039a, "Kappa"}, + {0x049e, "Kastrokecyrillic"}, + {0x049c, "Kaverticalstrokecyrillic"}, + {0x01e8, "Kcaron"}, + {0x0136, "Kcedilla"}, + {0x24c0, "Kcircle"}, {0x0136, "Kcommaaccent"}, + {0x1e32, "Kdotbelow"}, + {0x0554, "Keharmenian"}, + {0x053f, "Kenarmenian"}, + {0x0425, "Khacyrillic"}, + {0x03e6, "Kheicoptic"}, + {0x0198, "Khook"}, + {0x040c, "Kjecyrillic"}, + {0x1e34, "Klinebelow"}, + {0xff2b, "Kmonospace"}, + {0x0480, "Koppacyrillic"}, + {0x03de, "Koppagreek"}, + {0x046e, "Ksicyrillic"}, {0xf76b, "Ksmall"}, {0x004c, "L"}, + {0x01c7, "LJ"}, {0xf6bf, "LL"}, {0x0139, "Lacute"}, {0x039b, "Lambda"}, {0x013d, "Lcaron"}, + {0x013b, "Lcedilla"}, + {0x24c1, "Lcircle"}, + {0x1e3c, "Lcircumflexbelow"}, {0x013b, "Lcommaaccent"}, {0x013f, "Ldot"}, + {0x013f, "Ldotaccent"}, + {0x1e36, "Ldotbelow"}, + {0x1e38, "Ldotbelowmacron"}, + {0x053c, "Liwnarmenian"}, + {0x01c8, "Lj"}, + {0x0409, "Ljecyrillic"}, + {0x1e3a, "Llinebelow"}, + {0xff2c, "Lmonospace"}, {0x0141, "Lslash"}, {0xf6f9, "Lslashsmall"}, {0xf76c, "Lsmall"}, {0x004d, "M"}, + {0x3386, "MBsquare"}, {0xf6d0, "Macron"}, {0xf7af, "Macronsmall"}, + {0x1e3e, "Macute"}, + {0x24c2, "Mcircle"}, + {0x1e40, "Mdotaccent"}, + {0x1e42, "Mdotbelow"}, + {0x0544, "Menarmenian"}, + {0xff2d, "Mmonospace"}, {0xf76d, "Msmall"}, + {0x019c, "Mturned"}, {0x039c, "Mu"}, {0x004e, "N"}, + {0x01ca, "NJ"}, {0x0143, "Nacute"}, {0x0147, "Ncaron"}, + {0x0145, "Ncedilla"}, + {0x24c3, "Ncircle"}, + {0x1e4a, "Ncircumflexbelow"}, {0x0145, "Ncommaaccent"}, + {0x1e44, "Ndotaccent"}, + {0x1e46, "Ndotbelow"}, + {0x019d, "Nhookleft"}, + {0x2168, "Nineroman"}, + {0x01cb, "Nj"}, + {0x040a, "Njecyrillic"}, + {0x1e48, "Nlinebelow"}, + {0xff2e, "Nmonospace"}, + {0x0546, "Nowarmenian"}, {0xf76e, "Nsmall"}, {0x00d1, "Ntilde"}, {0xf7f1, "Ntildesmall"}, @@ -211,42 +457,107 @@ {0xf6fa, "OEsmall"}, {0x00d3, "Oacute"}, {0xf7f3, "Oacutesmall"}, + {0x04e8, "Obarredcyrillic"}, + {0x04ea, "Obarreddieresiscyrillic"}, {0x014e, "Obreve"}, + {0x01d1, "Ocaron"}, + {0x019f, "Ocenteredtilde"}, + {0x24c4, "Ocircle"}, {0x00d4, "Ocircumflex"}, + {0x1ed0, "Ocircumflexacute"}, + {0x1ed8, "Ocircumflexdotbelow"}, + {0x1ed2, "Ocircumflexgrave"}, + {0x1ed4, "Ocircumflexhookabove"}, {0xf7f4, "Ocircumflexsmall"}, + {0x1ed6, "Ocircumflextilde"}, + {0x041e, "Ocyrillic"}, + {0x0150, "Odblacute"}, + {0x020c, "Odblgrave"}, {0x00d6, "Odieresis"}, + {0x04e6, "Odieresiscyrillic"}, {0xf7f6, "Odieresissmall"}, + {0x1ecc, "Odotbelow"}, {0xf6fb, "Ogoneksmall"}, {0x00d2, "Ograve"}, {0xf7f2, "Ogravesmall"}, + {0x0555, "Oharmenian"}, + {0x2126, "Ohm"}, + {0x1ece, "Ohookabove"}, {0x01a0, "Ohorn"}, + {0x1eda, "Ohornacute"}, + {0x1ee2, "Ohorndotbelow"}, + {0x1edc, "Ohorngrave"}, + {0x1ede, "Ohornhookabove"}, + {0x1ee0, "Ohorntilde"}, {0x0150, "Ohungarumlaut"}, + {0x01a2, "Oi"}, + {0x020e, "Oinvertedbreve"}, {0x014c, "Omacron"}, + {0x1e52, "Omacronacute"}, + {0x1e50, "Omacrongrave"}, {0x2126, "Omega"}, + {0x0460, "Omegacyrillic"}, + {0x03a9, "Omegagreek"}, + {0x047a, "Omegaroundcyrillic"}, + {0x047c, "Omegatitlocyrillic"}, {0x038f, "Omegatonos"}, {0x039f, "Omicron"}, {0x038c, "Omicrontonos"}, + {0xff2f, "Omonospace"}, + {0x2160, "Oneroman"}, + {0x01ea, "Oogonek"}, + {0x01ec, "Oogonekmacron"}, + {0x0186, "Oopen"}, {0x00d8, "Oslash"}, {0x01fe, "Oslashacute"}, {0xf7f8, "Oslashsmall"}, {0xf76f, "Osmall"}, + {0x01fe, "Ostrokeacute"}, + {0x047e, "Otcyrillic"}, {0x00d5, "Otilde"}, + {0x1e4c, "Otildeacute"}, + {0x1e4e, "Otildedieresis"}, {0xf7f5, "Otildesmall"}, {0x0050, "P"}, + {0x1e54, "Pacute"}, + {0x24c5, "Pcircle"}, + {0x1e56, "Pdotaccent"}, + {0x041f, "Pecyrillic"}, + {0x054a, "Peharmenian"}, + {0x04a6, "Pemiddlehookcyrillic"}, {0x03a6, "Phi"}, + {0x01a4, "Phook"}, {0x03a0, "Pi"}, + {0x0553, "Piwrarmenian"}, + {0xff30, "Pmonospace"}, {0x03a8, "Psi"}, + {0x0470, "Psicyrillic"}, {0xf770, "Psmall"}, {0x0051, "Q"}, + {0x24c6, "Qcircle"}, + {0xff31, "Qmonospace"}, {0xf771, "Qsmall"}, {0x0052, "R"}, + {0x054c, "Raarmenian"}, {0x0154, "Racute"}, {0x0158, "Rcaron"}, + {0x0156, "Rcedilla"}, + {0x24c7, "Rcircle"}, {0x0156, "Rcommaaccent"}, + {0x0210, "Rdblgrave"}, + {0x1e58, "Rdotaccent"}, + {0x1e5a, "Rdotbelow"}, + {0x1e5c, "Rdotbelowmacron"}, + {0x0550, "Reharmenian"}, {0x211c, "Rfraktur"}, {0x03a1, "Rho"}, {0xf6fc, "Ringsmall"}, + {0x0212, "Rinvertedbreve"}, + {0x1e5e, "Rlinebelow"}, + {0xff32, "Rmonospace"}, {0xf772, "Rsmall"}, + {0x0281, "Rsmallinverted"}, + {0x02b6, "Rsmallinvertedsuperior"}, {0x0053, "S"}, {0x250c, "SF010000"}, {0x2514, "SF020000"}, @@ -289,70 +600,199 @@ {0x256b, "SF530000"}, {0x256a, "SF540000"}, {0x015a, "Sacute"}, + {0x1e64, "Sacutedotaccent"}, + {0x03e0, "Sampigreek"}, {0x0160, "Scaron"}, + {0x1e66, "Scarondotaccent"}, {0xf6fd, "Scaronsmall"}, {0x015e, "Scedilla"}, + {0x018f, "Schwa"}, + {0x04d8, "Schwacyrillic"}, + {0x04da, "Schwadieresiscyrillic"}, + {0x24c8, "Scircle"}, {0x015c, "Scircumflex"}, {0x0218, "Scommaaccent"}, + {0x1e60, "Sdotaccent"}, + {0x1e62, "Sdotbelow"}, + {0x1e68, "Sdotbelowdotaccent"}, + {0x054d, "Seharmenian"}, + {0x2166, "Sevenroman"}, + {0x0547, "Shaarmenian"}, + {0x0428, "Shacyrillic"}, + {0x0429, "Shchacyrillic"}, + {0x03e2, "Sheicoptic"}, + {0x04ba, "Shhacyrillic"}, + {0x03ec, "Shimacoptic"}, {0x03a3, "Sigma"}, + {0x2165, "Sixroman"}, + {0xff33, "Smonospace"}, + {0x042c, "Softsigncyrillic"}, {0xf773, "Ssmall"}, + {0x03da, "Stigmagreek"}, {0x0054, "T"}, {0x03a4, "Tau"}, {0x0166, "Tbar"}, {0x0164, "Tcaron"}, + {0x0162, "Tcedilla"}, + {0x24c9, "Tcircle"}, + {0x1e70, "Tcircumflexbelow"}, {0x0162, "Tcommaaccent"}, + {0x1e6a, "Tdotaccent"}, + {0x1e6c, "Tdotbelow"}, + {0x0422, "Tecyrillic"}, + {0x04ac, "Tedescendercyrillic"}, + {0x2169, "Tenroman"}, + {0x04b4, "Tetsecyrillic"}, {0x0398, "Theta"}, + {0x01ac, "Thook"}, {0x00de, "Thorn"}, {0xf7fe, "Thornsmall"}, + {0x2162, "Threeroman"}, {0xf6fe, "Tildesmall"}, + {0x054f, "Tiwnarmenian"}, + {0x1e6e, "Tlinebelow"}, + {0xff34, "Tmonospace"}, + {0x0539, "Toarmenian"}, + {0x01bc, "Tonefive"}, + {0x0184, "Tonesix"}, + {0x01a7, "Tonetwo"}, + {0x01ae, "Tretroflexhook"}, + {0x0426, "Tsecyrillic"}, + {0x040b, "Tshecyrillic"}, {0xf774, "Tsmall"}, + {0x216b, "Twelveroman"}, + {0x2161, "Tworoman"}, {0x0055, "U"}, {0x00da, "Uacute"}, {0xf7fa, "Uacutesmall"}, {0x016c, "Ubreve"}, + {0x01d3, "Ucaron"}, + {0x24ca, "Ucircle"}, {0x00db, "Ucircumflex"}, + {0x1e76, "Ucircumflexbelow"}, {0xf7fb, "Ucircumflexsmall"}, + {0x0423, "Ucyrillic"}, + {0x0170, "Udblacute"}, + {0x0214, "Udblgrave"}, {0x00dc, "Udieresis"}, + {0x01d7, "Udieresisacute"}, + {0x1e72, "Udieresisbelow"}, + {0x01d9, "Udieresiscaron"}, + {0x04f0, "Udieresiscyrillic"}, + {0x01db, "Udieresisgrave"}, + {0x01d5, "Udieresismacron"}, {0xf7fc, "Udieresissmall"}, + {0x1ee4, "Udotbelow"}, {0x00d9, "Ugrave"}, {0xf7f9, "Ugravesmall"}, + {0x1ee6, "Uhookabove"}, {0x01af, "Uhorn"}, + {0x1ee8, "Uhornacute"}, + {0x1ef0, "Uhorndotbelow"}, + {0x1eea, "Uhorngrave"}, + {0x1eec, "Uhornhookabove"}, + {0x1eee, "Uhorntilde"}, {0x0170, "Uhungarumlaut"}, + {0x04f2, "Uhungarumlautcyrillic"}, + {0x0216, "Uinvertedbreve"}, + {0x0478, "Ukcyrillic"}, {0x016a, "Umacron"}, + {0x04ee, "Umacroncyrillic"}, + {0x1e7a, "Umacrondieresis"}, + {0xff35, "Umonospace"}, {0x0172, "Uogonek"}, {0x03a5, "Upsilon"}, {0x03d2, "Upsilon1"}, + {0x03d3, "Upsilonacutehooksymbolgreek"}, + {0x01b1, "Upsilonafrican"}, {0x03ab, "Upsilondieresis"}, + {0x03d4, "Upsilondieresishooksymbolgreek"}, + {0x03d2, "Upsilonhooksymbol"}, {0x038e, "Upsilontonos"}, {0x016e, "Uring"}, + {0x040e, "Ushortcyrillic"}, {0xf775, "Usmall"}, + {0x04ae, "Ustraightcyrillic"}, + {0x04b0, "Ustraightstrokecyrillic"}, {0x0168, "Utilde"}, + {0x1e78, "Utildeacute"}, + {0x1e74, "Utildebelow"}, {0x0056, "V"}, + {0x24cb, "Vcircle"}, + {0x1e7e, "Vdotbelow"}, + {0x0412, "Vecyrillic"}, + {0x054e, "Vewarmenian"}, + {0x01b2, "Vhook"}, + {0xff36, "Vmonospace"}, + {0x0548, "Voarmenian"}, {0xf776, "Vsmall"}, + {0x1e7c, "Vtilde"}, {0x0057, "W"}, {0x1e82, "Wacute"}, + {0x24cc, "Wcircle"}, {0x0174, "Wcircumflex"}, {0x1e84, "Wdieresis"}, + {0x1e86, "Wdotaccent"}, + {0x1e88, "Wdotbelow"}, {0x1e80, "Wgrave"}, + {0xff37, "Wmonospace"}, {0xf777, "Wsmall"}, {0x0058, "X"}, + {0x24cd, "Xcircle"}, + {0x1e8c, "Xdieresis"}, + {0x1e8a, "Xdotaccent"}, + {0x053d, "Xeharmenian"}, {0x039e, "Xi"}, + {0xff38, "Xmonospace"}, {0xf778, "Xsmall"}, {0x0059, "Y"}, {0x00dd, "Yacute"}, {0xf7fd, "Yacutesmall"}, + {0x0462, "Yatcyrillic"}, + {0x24ce, "Ycircle"}, {0x0176, "Ycircumflex"}, {0x0178, "Ydieresis"}, {0xf7ff, "Ydieresissmall"}, + {0x1e8e, "Ydotaccent"}, + {0x1ef4, "Ydotbelow"}, + {0x042b, "Yericyrillic"}, + {0x04f8, "Yerudieresiscyrillic"}, {0x1ef2, "Ygrave"}, + {0x01b3, "Yhook"}, + {0x1ef6, "Yhookabove"}, + {0x0545, "Yiarmenian"}, + {0x0407, "Yicyrillic"}, + {0x0552, "Yiwnarmenian"}, + {0xff39, "Ymonospace"}, {0xf779, "Ysmall"}, + {0x1ef8, "Ytilde"}, + {0x046a, "Yusbigcyrillic"}, + {0x046c, "Yusbigiotifiedcyrillic"}, + {0x0466, "Yuslittlecyrillic"}, + {0x0468, "Yuslittleiotifiedcyrillic"}, {0x005a, "Z"}, + {0x0536, "Zaarmenian"}, {0x0179, "Zacute"}, {0x017d, "Zcaron"}, {0xf6ff, "Zcaronsmall"}, + {0x24cf, "Zcircle"}, + {0x1e90, "Zcircumflex"}, + {0x017b, "Zdot"}, {0x017b, "Zdotaccent"}, + {0x1e92, "Zdotbelow"}, + {0x0417, "Zecyrillic"}, + {0x0498, "Zedescendercyrillic"}, + {0x04de, "Zedieresiscyrillic"}, {0x0396, "Zeta"}, + {0x053a, "Zhearmenian"}, + {0x04c1, "Zhebrevecyrillic"}, + {0x0416, "Zhecyrillic"}, + {0x0496, "Zhedescendercyrillic"}, + {0x04dc, "Zhedieresiscyrillic"}, + {0x1e94, "Zlinebelow"}, + {0xff3a, "Zmonospace"}, {0xf77a, "Zsmall"}, + {0x01b5, "Zstroke"}, {0x0022, "\""}, {0x005c, "\\"}, {0x005d, "]"}, @@ -360,15 +800,258 @@ {0x005f, "_"}, {0x0060, "`"}, {0x0061, "a"}, + {0x275e, "a100"}, + {0x2761, "a101"}, + {0x2762, "a102"}, + {0x2763, "a103"}, + {0x2764, "a104"}, + {0x2710, "a105"}, + {0x2765, "a106"}, + {0x2766, "a107"}, + {0x2767, "a108"}, + {0x2660, "a109"}, + {0x2721, "a10"}, + {0x2665, "a110"}, + {0x2666, "a111"}, + {0x2663, "a112"}, + {0x2709, "a117"}, + {0x2708, "a118"}, + {0x2707, "a119"}, + {0x261b, "a11"}, + {0x2460, "a120"}, + {0x2461, "a121"}, + {0x2462, "a122"}, + {0x2463, "a123"}, + {0x2464, "a124"}, + {0x2465, "a125"}, + {0x2466, "a126"}, + {0x2467, "a127"}, + {0x2468, "a128"}, + {0x2469, "a129"}, + {0x261e, "a12"}, + {0x2776, "a130"}, + {0x2777, "a131"}, + {0x2778, "a132"}, + {0x2779, "a133"}, + {0x277a, "a134"}, + {0x277b, "a135"}, + {0x277c, "a136"}, + {0x277d, "a137"}, + {0x277e, "a138"}, + {0x277f, "a139"}, + {0x270c, "a13"}, + {0x2780, "a140"}, + {0x2781, "a141"}, + {0x2782, "a142"}, + {0x2783, "a143"}, + {0x2784, "a144"}, + {0x2785, "a145"}, + {0x2786, "a146"}, + {0x2787, "a147"}, + {0x2788, "a148"}, + {0x2789, "a149"}, + {0x270d, "a14"}, + {0x278a, "a150"}, + {0x278b, "a151"}, + {0x278c, "a152"}, + {0x278d, "a153"}, + {0x278e, "a154"}, + {0x278f, "a155"}, + {0x2790, "a156"}, + {0x2791, "a157"}, + {0x2792, "a158"}, + {0x2793, "a159"}, + {0x270e, "a15"}, + {0x2794, "a160"}, + {0x2192, "a161"}, + {0x27a3, "a162"}, + {0x2194, "a163"}, + {0x2195, "a164"}, + {0x2799, "a165"}, + {0x279b, "a166"}, + {0x279c, "a167"}, + {0x279d, "a168"}, + {0x279e, "a169"}, + {0x270f, "a16"}, + {0x279f, "a170"}, + {0x27a0, "a171"}, + {0x27a1, "a172"}, + {0x27a2, "a173"}, + {0x27a4, "a174"}, + {0x27a5, "a175"}, + {0x27a6, "a176"}, + {0x27a7, "a177"}, + {0x27a8, "a178"}, + {0x27a9, "a179"}, + {0x2711, "a17"}, + {0x27ab, "a180"}, + {0x27ad, "a181"}, + {0x27af, "a182"}, + {0x27b2, "a183"}, + {0x27b3, "a184"}, + {0x27b5, "a185"}, + {0x27b8, "a186"}, + {0x27ba, "a187"}, + {0x27bb, "a188"}, + {0x27bc, "a189"}, + {0x2712, "a18"}, + {0x27bd, "a190"}, + {0x27be, "a191"}, + {0x279a, "a192"}, + {0x27aa, "a193"}, + {0x27b6, "a194"}, + {0x27b9, "a195"}, + {0x2798, "a196"}, + {0x27b4, "a197"}, + {0x27b7, "a198"}, + {0x27ac, "a199"}, + {0x2713, "a19"}, + {0x2701, "a1"}, + {0x27ae, "a200"}, + {0x27b1, "a201"}, + {0x2703, "a202"}, + {0x2750, "a203"}, + {0x2752, "a204"}, + {0x276e, "a205"}, + {0x2770, "a206"}, + {0x2714, "a20"}, + {0x2715, "a21"}, + {0x2716, "a22"}, + {0x2717, "a23"}, + {0x2718, "a24"}, + {0x2719, "a25"}, + {0x271a, "a26"}, + {0x271b, "a27"}, + {0x271c, "a28"}, + {0x2722, "a29"}, + {0x2702, "a2"}, + {0x2723, "a30"}, + {0x2724, "a31"}, + {0x2725, "a32"}, + {0x2726, "a33"}, + {0x2727, "a34"}, + {0x2605, "a35"}, + {0x2729, "a36"}, + {0x272a, "a37"}, + {0x272b, "a38"}, + {0x272c, "a39"}, + {0x2704, "a3"}, + {0x272d, "a40"}, + {0x272e, "a41"}, + {0x272f, "a42"}, + {0x2730, "a43"}, + {0x2731, "a44"}, + {0x2732, "a45"}, + {0x2733, "a46"}, + {0x2734, "a47"}, + {0x2735, "a48"}, + {0x2736, "a49"}, + {0x260e, "a4"}, + {0x2737, "a50"}, + {0x2738, "a51"}, + {0x2739, "a52"}, + {0x273a, "a53"}, + {0x273b, "a54"}, + {0x273c, "a55"}, + {0x273d, "a56"}, + {0x273e, "a57"}, + {0x273f, "a58"}, + {0x2740, "a59"}, + {0x2706, "a5"}, + {0x2741, "a60"}, + {0x2742, "a61"}, + {0x2743, "a62"}, + {0x2744, "a63"}, + {0x2745, "a64"}, + {0x2746, "a65"}, + {0x2747, "a66"}, + {0x2748, "a67"}, + {0x2749, "a68"}, + {0x274a, "a69"}, + {0x271d, "a6"}, + {0x274b, "a70"}, + {0x25cf, "a71"}, + {0x274d, "a72"}, + {0x25a0, "a73"}, + {0x274f, "a74"}, + {0x2751, "a75"}, + {0x25b2, "a76"}, + {0x25bc, "a77"}, + {0x25c6, "a78"}, + {0x2756, "a79"}, + {0x271e, "a7"}, + {0x25d7, "a81"}, + {0x2758, "a82"}, + {0x2759, "a83"}, + {0x275a, "a84"}, + {0x276f, "a85"}, + {0x2771, "a86"}, + {0x2772, "a87"}, + {0x2773, "a88"}, + {0x2768, "a89"}, + {0x271f, "a8"}, + {0x2769, "a90"}, + {0x276c, "a91"}, + {0x276d, "a92"}, + {0x276a, "a93"}, + {0x276b, "a94"}, + {0x2774, "a95"}, + {0x2775, "a96"}, + {0x275b, "a97"}, + {0x275c, "a98"}, + {0x275d, "a99"}, + {0x2720, "a9"}, + {0x0986, "aabengali"}, {0x00e1, "aacute"}, + {0x0906, "aadeva"}, + {0x0a86, "aagujarati"}, + {0x0a06, "aagurmukhi"}, + {0x0a3e, "aamatragurmukhi"}, + {0x3303, "aarusquare"}, + {0x09be, "aavowelsignbengali"}, + {0x093e, "aavowelsigndeva"}, + {0x0abe, "aavowelsigngujarati"}, + {0x055f, "abbreviationmarkarmenian"}, + {0x0970, "abbreviationsigndeva"}, + {0x0985, "abengali"}, + {0x311a, "abopomofo"}, {0x0103, "abreve"}, + {0x1eaf, "abreveacute"}, + {0x04d1, "abrevecyrillic"}, + {0x1eb7, "abrevedotbelow"}, + {0x1eb1, "abrevegrave"}, + {0x1eb3, "abrevehookabove"}, + {0x1eb5, "abrevetilde"}, + {0x01ce, "acaron"}, + {0x24d0, "acircle"}, {0x00e2, "acircumflex"}, + {0x1ea5, "acircumflexacute"}, + {0x1ead, "acircumflexdotbelow"}, + {0x1ea7, "acircumflexgrave"}, + {0x1ea9, "acircumflexhookabove"}, + {0x1eab, "acircumflextilde"}, {0x00b4, "acute"}, + {0x0317, "acutebelowcmb"}, + {0x0301, "acutecmb"}, {0x0301, "acutecomb"}, + {0x0954, "acutedeva"}, + {0x02cf, "acutelowmod"}, + {0x0341, "acutetonecmb"}, + {0x0430, "acyrillic"}, + {0x0201, "adblgrave"}, + {0x0a71, "addakgurmukhi"}, + {0x0905, "adeva"}, {0x00e4, "adieresis"}, + {0x04d3, "adieresiscyrillic"}, + {0x01df, "adieresismacron"}, + {0x1ea1, "adotbelow"}, + {0x01e1, "adotmacron"}, {0x00e6, "ae"}, {0x01fd, "aeacute"}, + {0x3150, "aekorean"}, + {0x01e3, "aemacron"}, {0x2015, "afii00208"}, + {0x20a4, "afii08941"}, {0x0410, "afii10017"}, {0x0411, "afii10018"}, {0x0412, "afii10019"}, @@ -614,499 +1297,3176 @@ {0x066d, "afii63167"}, {0x02bd, "afii64937"}, {0x00e0, "agrave"}, + {0x0a85, "agujarati"}, + {0x0a05, "agurmukhi"}, + {0x3042, "ahiragana"}, + {0x1ea3, "ahookabove"}, + {0x0990, "aibengali"}, + {0x311e, "aibopomofo"}, + {0x0910, "aideva"}, + {0x04d5, "aiecyrillic"}, + {0x0a90, "aigujarati"}, + {0x0a10, "aigurmukhi"}, + {0x0a48, "aimatragurmukhi"}, + {0x0639, "ainarabic"}, + {0xfeca, "ainfinalarabic"}, + {0xfecb, "aininitialarabic"}, + {0xfecc, "ainmedialarabic"}, + {0x0203, "ainvertedbreve"}, + {0x09c8, "aivowelsignbengali"}, + {0x0948, "aivowelsigndeva"}, + {0x0ac8, "aivowelsigngujarati"}, + {0x30a2, "akatakana"}, + {0xff71, "akatakanahalfwidth"}, + {0x314f, "akorean"}, + {0x05d0, "alef"}, + {0x0627, "alefarabic"}, + {0xfb30, "alefdageshhebrew"}, + {0xfe8e, "aleffinalarabic"}, + {0x0623, "alefhamzaabovearabic"}, + {0xfe84, "alefhamzaabovefinalarabic"}, + {0x0625, "alefhamzabelowarabic"}, + {0xfe88, "alefhamzabelowfinalarabic"}, + {0x05d0, "alefhebrew"}, + {0xfb4f, "aleflamedhebrew"}, + {0x0622, "alefmaddaabovearabic"}, + {0xfe82, "alefmaddaabovefinalarabic"}, + {0x0649, "alefmaksuraarabic"}, + {0xfef0, "alefmaksurafinalarabic"}, + {0xfef3, "alefmaksurainitialarabic"}, + {0xfef4, "alefmaksuramedialarabic"}, + {0xfb2e, "alefpatahhebrew"}, + {0xfb2f, "alefqamatshebrew"}, {0x2135, "aleph"}, + {0x224c, "allequal"}, {0x03b1, "alpha"}, {0x03ac, "alphatonos"}, {0x0101, "amacron"}, + {0xff41, "amonospace"}, {0x0026, "ampersand"}, + {0xff06, "ampersandmonospace"}, {0xf726, "ampersandsmall"}, + {0x33c2, "amsquare"}, + {0x3122, "anbopomofo"}, + {0x3124, "angbopomofo"}, + {0x0e5a, "angkhankhuthai"}, {0x2220, "angle"}, + {0x3008, "anglebracketleft"}, + {0xfe3f, "anglebracketleftvertical"}, + {0x3009, "anglebracketright"}, + {0xfe40, "anglebracketrightvertical"}, {0x2329, "angleleft"}, {0x232a, "angleright"}, + {0x212b, "angstrom"}, {0x0387, "anoteleia"}, + {0x0952, "anudattadeva"}, + {0x0982, "anusvarabengali"}, + {0x0902, "anusvaradeva"}, + {0x0a82, "anusvaragujarati"}, {0x0105, "aogonek"}, + {0x3300, "apaatosquare"}, + {0x249c, "aparen"}, + {0x055a, "apostrophearmenian"}, + {0x02bc, "apostrophemod"}, + {0xf8ff, "apple"}, + {0x2250, "approaches"}, {0x2248, "approxequal"}, + {0x2252, "approxequalorimage"}, + {0x2245, "approximatelyequal"}, + {0x318e, "araeaekorean"}, + {0x318d, "araeakorean"}, + {0x2312, "arc"}, + {0x1e9a, "arighthalfring"}, {0x00e5, "aring"}, {0x01fb, "aringacute"}, + {0x1e01, "aringbelow"}, {0x2194, "arrowboth"}, + {0x21e3, "arrowdashdown"}, + {0x21e0, "arrowdashleft"}, + {0x21e2, "arrowdashright"}, + {0x21e1, "arrowdashup"}, {0x21d4, "arrowdblboth"}, {0x21d3, "arrowdbldown"}, {0x21d0, "arrowdblleft"}, {0x21d2, "arrowdblright"}, {0x21d1, "arrowdblup"}, {0x2193, "arrowdown"}, + {0x2199, "arrowdownleft"}, + {0x2198, "arrowdownright"}, + {0x21e9, "arrowdownwhite"}, + {0x02c5, "arrowheaddownmod"}, + {0x02c2, "arrowheadleftmod"}, + {0x02c3, "arrowheadrightmod"}, + {0x02c4, "arrowheadupmod"}, {0xf8e7, "arrowhorizex"}, {0x2190, "arrowleft"}, + {0x21d0, "arrowleftdbl"}, + {0x21cd, "arrowleftdblstroke"}, + {0x21c6, "arrowleftoverright"}, + {0x21e6, "arrowleftwhite"}, {0x2192, "arrowright"}, + {0x21cf, "arrowrightdblstroke"}, + {0x279e, "arrowrightheavy"}, + {0x21c4, "arrowrightoverleft"}, + {0x21e8, "arrowrightwhite"}, + {0x21e4, "arrowtableft"}, + {0x21e5, "arrowtabright"}, {0x2191, "arrowup"}, {0x2195, "arrowupdn"}, {0x21a8, "arrowupdnbse"}, + {0x21a8, "arrowupdownbase"}, + {0x2196, "arrowupleft"}, + {0x21c5, "arrowupleftofdown"}, + {0x2197, "arrowupright"}, + {0x21e7, "arrowupwhite"}, {0xf8e6, "arrowvertex"}, {0x005e, "asciicircum"}, + {0xff3e, "asciicircummonospace"}, {0x007e, "asciitilde"}, + {0xff5e, "asciitildemonospace"}, + {0x0251, "ascript"}, + {0x0252, "ascriptturned"}, + {0x3041, "asmallhiragana"}, + {0x30a1, "asmallkatakana"}, + {0xff67, "asmallkatakanahalfwidth"}, {0x002a, "asterisk"}, + {0x066d, "asteriskaltonearabic"}, + {0x066d, "asteriskarabic"}, {0x2217, "asteriskmath"}, + {0xff0a, "asteriskmonospace"}, + {0xfe61, "asterisksmall"}, + {0x2042, "asterism"}, {0xf6e9, "asuperior"}, + {0x2243, "asymptoticallyequal"}, {0x0040, "at"}, {0x00e3, "atilde"}, + {0xff20, "atmonospace"}, + {0xfe6b, "atsmall"}, + {0x0250, "aturned"}, + {0x0994, "aubengali"}, + {0x3120, "aubopomofo"}, + {0x0914, "audeva"}, + {0x0a94, "augujarati"}, + {0x0a14, "augurmukhi"}, + {0x09d7, "aulengthmarkbengali"}, + {0x0a4c, "aumatragurmukhi"}, + {0x09cc, "auvowelsignbengali"}, + {0x094c, "auvowelsigndeva"}, + {0x0acc, "auvowelsigngujarati"}, + {0x093d, "avagrahadeva"}, + {0x0561, "aybarmenian"}, + {0x05e2, "ayin"}, + {0xfb20, "ayinaltonehebrew"}, + {0x05e2, "ayinhebrew"}, {0x0062, "b"}, + {0x09ac, "babengali"}, {0x005c, "backslash"}, + {0xff3c, "backslashmonospace"}, + {0x092c, "badeva"}, + {0x0aac, "bagujarati"}, + {0x0a2c, "bagurmukhi"}, + {0x3070, "bahiragana"}, + {0x0e3f, "bahtthai"}, + {0x30d0, "bakatakana"}, {0x007c, "bar"}, + {0xff5c, "barmonospace"}, + {0x3105, "bbopomofo"}, + {0x24d1, "bcircle"}, + {0x1e03, "bdotaccent"}, + {0x1e05, "bdotbelow"}, + {0x266c, "beamedsixteenthnotes"}, + {0x2235, "because"}, + {0x0431, "becyrillic"}, + {0x0628, "beharabic"}, + {0xfe90, "behfinalarabic"}, + {0xfe91, "behinitialarabic"}, + {0x3079, "behiragana"}, + {0xfe92, "behmedialarabic"}, + {0xfc9f, "behmeeminitialarabic"}, + {0xfc08, "behmeemisolatedarabic"}, + {0xfc6d, "behnoonfinalarabic"}, + {0x30d9, "bekatakana"}, + {0x0562, "benarmenian"}, + {0x05d1, "bet"}, {0x03b2, "beta"}, + {0x03d0, "betasymbolgreek"}, + {0xfb31, "betdagesh"}, + {0xfb31, "betdageshhebrew"}, + {0x05d1, "bethebrew"}, + {0xfb4c, "betrafehebrew"}, + {0x09ad, "bhabengali"}, + {0x092d, "bhadeva"}, + {0x0aad, "bhagujarati"}, + {0x0a2d, "bhagurmukhi"}, + {0x0253, "bhook"}, + {0x3073, "bihiragana"}, + {0x30d3, "bikatakana"}, + {0x0298, "bilabialclick"}, + {0x0a02, "bindigurmukhi"}, + {0x3331, "birusquare"}, + {0x25cf, "blackcircle"}, + {0x25c6, "blackdiamond"}, + {0x25bc, "blackdownpointingtriangle"}, + {0x25c4, "blackleftpointingpointer"}, + {0x25c0, "blackleftpointingtriangle"}, + {0x3010, "blacklenticularbracketleft"}, + {0xfe3b, "blacklenticularbracketleftvertical"}, + {0x3011, "blacklenticularbracketright"}, + {0xfe3c, "blacklenticularbracketrightvertical"}, + {0x25e3, "blacklowerlefttriangle"}, + {0x25e2, "blacklowerrighttriangle"}, + {0x25ac, "blackrectangle"}, + {0x25ba, "blackrightpointingpointer"}, + {0x25b6, "blackrightpointingtriangle"}, + {0x25aa, "blacksmallsquare"}, + {0x263b, "blacksmilingface"}, + {0x25a0, "blacksquare"}, + {0x2605, "blackstar"}, + {0x25e4, "blackupperlefttriangle"}, + {0x25e5, "blackupperrighttriangle"}, + {0x25b4, "blackuppointingsmalltriangle"}, + {0x25b2, "blackuppointingtriangle"}, + {0x2423, "blank"}, + {0x1e07, "blinebelow"}, {0x2588, "block"}, + {0xff42, "bmonospace"}, + {0x0e1a, "bobaimaithai"}, + {0x307c, "bohiragana"}, + {0x30dc, "bokatakana"}, + {0x249d, "bparen"}, + {0x33c3, "bqsquare"}, {0xf8f4, "braceex"}, {0x007b, "braceleft"}, {0xf8f3, "braceleftbt"}, {0xf8f2, "braceleftmid"}, + {0xff5b, "braceleftmonospace"}, + {0xfe5b, "braceleftsmall"}, {0xf8f1, "bracelefttp"}, + {0xfe37, "braceleftvertical"}, {0x007d, "braceright"}, {0xf8fe, "bracerightbt"}, {0xf8fd, "bracerightmid"}, + {0xff5d, "bracerightmonospace"}, + {0xfe5c, "bracerightsmall"}, {0xf8fc, "bracerighttp"}, + {0xfe38, "bracerightvertical"}, {0x005b, "bracketleft"}, {0xf8f0, "bracketleftbt"}, {0xf8ef, "bracketleftex"}, + {0xff3b, "bracketleftmonospace"}, {0xf8ee, "bracketlefttp"}, {0x005d, "bracketright"}, {0xf8fb, "bracketrightbt"}, {0xf8fa, "bracketrightex"}, + {0xff3d, "bracketrightmonospace"}, {0xf8f9, "bracketrighttp"}, {0x02d8, "breve"}, + {0x032e, "brevebelowcmb"}, + {0x0306, "brevecmb"}, + {0x032f, "breveinvertedbelowcmb"}, + {0x0311, "breveinvertedcmb"}, + {0x0361, "breveinverteddoublecmb"}, + {0x032a, "bridgebelowcmb"}, + {0x033a, "bridgeinvertedbelowcmb"}, {0x00a6, "brokenbar"}, + {0x0180, "bstroke"}, {0xf6ea, "bsuperior"}, + {0x0183, "btopbar"}, + {0x3076, "buhiragana"}, + {0x30d6, "bukatakana"}, {0x2022, "bullet"}, + {0x25d8, "bulletinverse"}, + {0x2219, "bulletoperator"}, + {0x25ce, "bullseye"}, {0x0063, "c"}, + {0x056e, "caarmenian"}, + {0x099a, "cabengali"}, {0x0107, "cacute"}, + {0x091a, "cadeva"}, + {0x0a9a, "cagujarati"}, + {0x0a1a, "cagurmukhi"}, + {0x3388, "calsquare"}, + {0x0981, "candrabindubengali"}, + {0x0310, "candrabinducmb"}, + {0x0901, "candrabindudeva"}, + {0x0a81, "candrabindugujarati"}, + {0x21ea, "capslock"}, + {0x2105, "careof"}, {0x02c7, "caron"}, + {0x032c, "caronbelowcmb"}, + {0x030c, "caroncmb"}, {0x21b5, "carriagereturn"}, + {0x3118, "cbopomofo"}, {0x010d, "ccaron"}, {0x00e7, "ccedilla"}, + {0x1e09, "ccedillaacute"}, + {0x24d2, "ccircle"}, {0x0109, "ccircumflex"}, + {0x0255, "ccurl"}, + {0x010b, "cdot"}, {0x010b, "cdotaccent"}, + {0x33c5, "cdsquare"}, {0x00b8, "cedilla"}, + {0x0327, "cedillacmb"}, {0x00a2, "cent"}, + {0x2103, "centigrade"}, {0xf6df, "centinferior"}, + {0xffe0, "centmonospace"}, {0xf7a2, "centoldstyle"}, {0xf6e0, "centsuperior"}, + {0x0579, "chaarmenian"}, + {0x099b, "chabengali"}, + {0x091b, "chadeva"}, + {0x0a9b, "chagujarati"}, + {0x0a1b, "chagurmukhi"}, + {0x3114, "chbopomofo"}, + {0x04bd, "cheabkhasiancyrillic"}, + {0x2713, "checkmark"}, + {0x0447, "checyrillic"}, + {0x04bf, "chedescenderabkhasiancyrillic"}, + {0x04b7, "chedescendercyrillic"}, + {0x04f5, "chedieresiscyrillic"}, + {0x0573, "cheharmenian"}, + {0x04cc, "chekhakassiancyrillic"}, + {0x04b9, "cheverticalstrokecyrillic"}, {0x03c7, "chi"}, + {0x3277, "chieuchacirclekorean"}, + {0x3217, "chieuchaparenkorean"}, + {0x3269, "chieuchcirclekorean"}, + {0x314a, "chieuchkorean"}, + {0x3209, "chieuchparenkorean"}, + {0x0e0a, "chochangthai"}, + {0x0e08, "chochanthai"}, + {0x0e09, "chochingthai"}, + {0x0e0c, "chochoethai"}, + {0x0188, "chook"}, + {0x3276, "cieucacirclekorean"}, + {0x3216, "cieucaparenkorean"}, + {0x3268, "cieuccirclekorean"}, + {0x3148, "cieuckorean"}, + {0x3208, "cieucparenkorean"}, + {0x321c, "cieucuparenkorean"}, {0x25cb, "circle"}, {0x2297, "circlemultiply"}, + {0x2299, "circleot"}, {0x2295, "circleplus"}, + {0x3036, "circlepostalmark"}, + {0x25d0, "circlewithlefthalfblack"}, + {0x25d1, "circlewithrighthalfblack"}, {0x02c6, "circumflex"}, + {0x032d, "circumflexbelowcmb"}, + {0x0302, "circumflexcmb"}, + {0x2327, "clear"}, + {0x01c2, "clickalveolar"}, + {0x01c0, "clickdental"}, + {0x01c1, "clicklateral"}, + {0x01c3, "clickretroflex"}, {0x2663, "club"}, + {0x2663, "clubsuitblack"}, + {0x2667, "clubsuitwhite"}, + {0x33a4, "cmcubedsquare"}, + {0xff43, "cmonospace"}, + {0x33a0, "cmsquaredsquare"}, + {0x0581, "coarmenian"}, {0x003a, "colon"}, {0x20a1, "colonmonetary"}, + {0xff1a, "colonmonospace"}, + {0x20a1, "colonsign"}, + {0xfe55, "colonsmall"}, + {0x02d1, "colontriangularhalfmod"}, + {0x02d0, "colontriangularmod"}, {0x002c, "comma"}, + {0x0313, "commaabovecmb"}, + {0x0315, "commaaboverightcmb"}, {0xf6c3, "commaaccent"}, + {0x060c, "commaarabic"}, + {0x055d, "commaarmenian"}, {0xf6e1, "commainferior"}, + {0xff0c, "commamonospace"}, + {0x0314, "commareversedabovecmb"}, + {0x02bd, "commareversedmod"}, + {0xfe50, "commasmall"}, {0xf6e2, "commasuperior"}, + {0x0312, "commaturnedabovecmb"}, + {0x02bb, "commaturnedmod"}, + {0x263c, "compass"}, {0x2245, "congruent"}, + {0x222e, "contourintegral"}, + {0x2303, "control"}, + {0x0006, "controlACK"}, + {0x0007, "controlBEL"}, + {0x0008, "controlBS"}, + {0x0018, "controlCAN"}, + {0x000d, "controlCR"}, + {0x0011, "controlDC1"}, + {0x0012, "controlDC2"}, + {0x0013, "controlDC3"}, + {0x0014, "controlDC4"}, + {0x007f, "controlDEL"}, + {0x0010, "controlDLE"}, + {0x0019, "controlEM"}, + {0x0005, "controlENQ"}, + {0x0004, "controlEOT"}, + {0x001b, "controlESC"}, + {0x0017, "controlETB"}, + {0x0003, "controlETX"}, + {0x000c, "controlFF"}, + {0x001c, "controlFS"}, + {0x001d, "controlGS"}, + {0x0009, "controlHT"}, + {0x000a, "controlLF"}, + {0x0015, "controlNAK"}, + {0x001e, "controlRS"}, + {0x000f, "controlSI"}, + {0x000e, "controlSO"}, + {0x0002, "controlSOT"}, + {0x0001, "controlSTX"}, + {0x001a, "controlSUB"}, + {0x0016, "controlSYN"}, + {0x001f, "controlUS"}, + {0x000b, "controlVT"}, {0x00a9, "copyright"}, - {0x00a9, "copyrightsans"}, - {0x00a9, "copyrightserif"}, + {0xf8e9, "copyrightsans"}, + {0xf6d9, "copyrightserif"}, + {0x300c, "cornerbracketleft"}, + {0xff62, "cornerbracketlefthalfwidth"}, + {0xfe41, "cornerbracketleftvertical"}, + {0x300d, "cornerbracketright"}, + {0xff63, "cornerbracketrighthalfwidth"}, + {0xfe42, "cornerbracketrightvertical"}, + {0x337f, "corporationsquare"}, + {0x33c7, "cosquare"}, + {0x33c6, "coverkgsquare"}, + {0x249e, "cparen"}, + {0x20a2, "cruzeiro"}, + {0x0297, "cstretched"}, + {0x22cf, "curlyand"}, + {0x22ce, "curlyor"}, {0x00a4, "currency"}, {0xf6d1, "cyrBreve"}, {0xf6d2, "cyrFlex"}, {0xf6d4, "cyrbreve"}, {0xf6d5, "cyrflex"}, {0x0064, "d"}, + {0x0564, "daarmenian"}, + {0x09a6, "dabengali"}, + {0x0636, "dadarabic"}, + {0x0926, "dadeva"}, + {0xfebe, "dadfinalarabic"}, + {0xfebf, "dadinitialarabic"}, + {0xfec0, "dadmedialarabic"}, + {0x05bc, "dagesh"}, + {0x05bc, "dageshhebrew"}, {0x2020, "dagger"}, {0x2021, "daggerdbl"}, + {0x0aa6, "dagujarati"}, + {0x0a26, "dagurmukhi"}, + {0x3060, "dahiragana"}, + {0x30c0, "dakatakana"}, + {0x062f, "dalarabic"}, + {0x05d3, "dalet"}, + {0xfb33, "daletdagesh"}, + {0xfb33, "daletdageshhebrew"}, + {0x05d3, "dalethebrew"}, + {0xfeaa, "dalfinalarabic"}, + {0x064f, "dammaarabic"}, + {0x064f, "dammalowarabic"}, + {0x064c, "dammatanaltonearabic"}, + {0x064c, "dammatanarabic"}, + {0x0964, "danda"}, + {0x05a7, "dargahebrew"}, + {0x05a7, "dargalefthebrew"}, + {0x0485, "dasiapneumatacyrilliccmb"}, {0xf6d3, "dblGrave"}, + {0x300a, "dblanglebracketleft"}, + {0xfe3d, "dblanglebracketleftvertical"}, + {0x300b, "dblanglebracketright"}, + {0xfe3e, "dblanglebracketrightvertical"}, + {0x032b, "dblarchinvertedbelowcmb"}, + {0x21d4, "dblarrowleft"}, + {0x21d2, "dblarrowright"}, + {0x0965, "dbldanda"}, {0xf6d6, "dblgrave"}, + {0x030f, "dblgravecmb"}, + {0x222c, "dblintegral"}, + {0x2017, "dbllowline"}, + {0x0333, "dbllowlinecmb"}, + {0x033f, "dbloverlinecmb"}, + {0x02ba, "dblprimemod"}, + {0x2016, "dblverticalbar"}, + {0x030e, "dblverticallineabovecmb"}, + {0x3109, "dbopomofo"}, + {0x33c8, "dbsquare"}, {0x010f, "dcaron"}, + {0x1e11, "dcedilla"}, + {0x24d3, "dcircle"}, + {0x1e13, "dcircumflexbelow"}, {0x0111, "dcroat"}, + {0x09a1, "ddabengali"}, + {0x0921, "ddadeva"}, + {0x0aa1, "ddagujarati"}, + {0x0a21, "ddagurmukhi"}, + {0x0688, "ddalarabic"}, + {0xfb89, "ddalfinalarabic"}, + {0x095c, "dddhadeva"}, + {0x09a2, "ddhabengali"}, + {0x0922, "ddhadeva"}, + {0x0aa2, "ddhagujarati"}, + {0x0a22, "ddhagurmukhi"}, + {0x1e0b, "ddotaccent"}, + {0x1e0d, "ddotbelow"}, + {0x066b, "decimalseparatorarabic"}, + {0x066b, "decimalseparatorpersian"}, + {0x0434, "decyrillic"}, {0x00b0, "degree"}, + {0x05ad, "dehihebrew"}, + {0x3067, "dehiragana"}, + {0x03ef, "deicoptic"}, + {0x30c7, "dekatakana"}, + {0x232b, "deleteleft"}, + {0x2326, "deleteright"}, {0x03b4, "delta"}, + {0x018d, "deltaturned"}, + {0x09f8, "denominatorminusonenumeratorbengali"}, + {0x02a4, "dezh"}, + {0x09a7, "dhabengali"}, + {0x0927, "dhadeva"}, + {0x0aa7, "dhagujarati"}, + {0x0a27, "dhagurmukhi"}, + {0x0257, "dhook"}, + {0x0385, "dialytikatonos"}, + {0x0344, "dialytikatonoscmb"}, {0x2666, "diamond"}, + {0x2662, "diamondsuitwhite"}, {0x00a8, "dieresis"}, {0xf6d7, "dieresisacute"}, + {0x0324, "dieresisbelowcmb"}, + {0x0308, "dieresiscmb"}, {0xf6d8, "dieresisgrave"}, {0x0385, "dieresistonos"}, + {0x3062, "dihiragana"}, + {0x30c2, "dikatakana"}, + {0x3003, "dittomark"}, {0x00f7, "divide"}, + {0x2223, "divides"}, + {0x2215, "divisionslash"}, + {0x0452, "djecyrillic"}, {0x2593, "dkshade"}, + {0x1e0f, "dlinebelow"}, + {0x3397, "dlsquare"}, + {0x0111, "dmacron"}, + {0xff44, "dmonospace"}, {0x2584, "dnblock"}, + {0x0e0e, "dochadathai"}, + {0x0e14, "dodekthai"}, + {0x3069, "dohiragana"}, + {0x30c9, "dokatakana"}, {0x0024, "dollar"}, {0xf6e3, "dollarinferior"}, + {0xff04, "dollarmonospace"}, {0xf724, "dollaroldstyle"}, + {0xfe69, "dollarsmall"}, {0xf6e4, "dollarsuperior"}, {0x20ab, "dong"}, + {0x3326, "dorusquare"}, {0x02d9, "dotaccent"}, + {0x0307, "dotaccentcmb"}, + {0x0323, "dotbelowcmb"}, {0x0323, "dotbelowcomb"}, + {0x30fb, "dotkatakana"}, {0x0131, "dotlessi"}, {0xf6be, "dotlessj"}, + {0x0284, "dotlessjstrokehook"}, {0x22c5, "dotmath"}, + {0x25cc, "dottedcircle"}, + {0xfb1f, "doubleyodpatah"}, + {0xfb1f, "doubleyodpatahhebrew"}, + {0x031e, "downtackbelowcmb"}, + {0x02d5, "downtackmod"}, + {0x249f, "dparen"}, {0xf6eb, "dsuperior"}, + {0x0256, "dtail"}, + {0x018c, "dtopbar"}, + {0x3065, "duhiragana"}, + {0x30c5, "dukatakana"}, + {0x01f3, "dz"}, + {0x02a3, "dzaltone"}, + {0x01c6, "dzcaron"}, + {0x02a5, "dzcurl"}, + {0x04e1, "dzeabkhasiancyrillic"}, + {0x0455, "dzecyrillic"}, + {0x045f, "dzhecyrillic"}, {0x0065, "e"}, {0x00e9, "eacute"}, + {0x2641, "earth"}, + {0x098f, "ebengali"}, + {0x311c, "ebopomofo"}, {0x0115, "ebreve"}, + {0x090d, "ecandradeva"}, + {0x0a8d, "ecandragujarati"}, + {0x0945, "ecandravowelsigndeva"}, + {0x0ac5, "ecandravowelsigngujarati"}, {0x011b, "ecaron"}, + {0x1e1d, "ecedillabreve"}, + {0x0565, "echarmenian"}, + {0x0587, "echyiwnarmenian"}, + {0x24d4, "ecircle"}, {0x00ea, "ecircumflex"}, + {0x1ebf, "ecircumflexacute"}, + {0x1e19, "ecircumflexbelow"}, + {0x1ec7, "ecircumflexdotbelow"}, + {0x1ec1, "ecircumflexgrave"}, + {0x1ec3, "ecircumflexhookabove"}, + {0x1ec5, "ecircumflextilde"}, + {0x0454, "ecyrillic"}, + {0x0205, "edblgrave"}, + {0x090f, "edeva"}, {0x00eb, "edieresis"}, + {0x0117, "edot"}, {0x0117, "edotaccent"}, + {0x1eb9, "edotbelow"}, + {0x0a0f, "eegurmukhi"}, + {0x0a47, "eematragurmukhi"}, + {0x0444, "efcyrillic"}, {0x00e8, "egrave"}, + {0x0a8f, "egujarati"}, + {0x0567, "eharmenian"}, + {0x311d, "ehbopomofo"}, + {0x3048, "ehiragana"}, + {0x1ebb, "ehookabove"}, + {0x311f, "eibopomofo"}, {0x0038, "eight"}, + {0x0668, "eightarabic"}, + {0x09ee, "eightbengali"}, + {0x2467, "eightcircle"}, + {0x2791, "eightcircleinversesansserif"}, + {0x096e, "eightdeva"}, + {0x2471, "eighteencircle"}, + {0x2485, "eighteenparen"}, + {0x2499, "eighteenperiod"}, + {0x0aee, "eightgujarati"}, + {0x0a6e, "eightgurmukhi"}, + {0x0668, "eighthackarabic"}, + {0x3028, "eighthangzhou"}, + {0x266b, "eighthnotebeamed"}, + {0x3227, "eightideographicparen"}, {0x2088, "eightinferior"}, + {0xff18, "eightmonospace"}, {0xf738, "eightoldstyle"}, + {0x247b, "eightparen"}, + {0x248f, "eightperiod"}, + {0x06f8, "eightpersian"}, + {0x2177, "eightroman"}, {0x2078, "eightsuperior"}, + {0x0e58, "eightthai"}, + {0x0207, "einvertedbreve"}, + {0x0465, "eiotifiedcyrillic"}, + {0x30a8, "ekatakana"}, + {0xff74, "ekatakanahalfwidth"}, + {0x0a74, "ekonkargurmukhi"}, + {0x3154, "ekorean"}, + {0x043b, "elcyrillic"}, {0x2208, "element"}, + {0x246a, "elevencircle"}, + {0x247e, "elevenparen"}, + {0x2492, "elevenperiod"}, + {0x217a, "elevenroman"}, {0x2026, "ellipsis"}, + {0x22ee, "ellipsisvertical"}, {0x0113, "emacron"}, + {0x1e17, "emacronacute"}, + {0x1e15, "emacrongrave"}, + {0x043c, "emcyrillic"}, {0x2014, "emdash"}, + {0xfe31, "emdashvertical"}, + {0xff45, "emonospace"}, + {0x055b, "emphasismarkarmenian"}, {0x2205, "emptyset"}, + {0x3123, "enbopomofo"}, + {0x043d, "encyrillic"}, {0x2013, "endash"}, + {0xfe32, "endashvertical"}, + {0x04a3, "endescendercyrillic"}, {0x014b, "eng"}, + {0x3125, "engbopomofo"}, + {0x04a5, "enghecyrillic"}, + {0x04c8, "enhookcyrillic"}, + {0x2002, "enspace"}, {0x0119, "eogonek"}, + {0x3153, "eokorean"}, + {0x025b, "eopen"}, + {0x029a, "eopenclosed"}, + {0x025c, "eopenreversed"}, + {0x025e, "eopenreversedclosed"}, + {0x025d, "eopenreversedhook"}, + {0x24a0, "eparen"}, {0x03b5, "epsilon"}, {0x03ad, "epsilontonos"}, {0x003d, "equal"}, + {0xff1d, "equalmonospace"}, + {0xfe66, "equalsmall"}, + {0x207c, "equalsuperior"}, {0x2261, "equivalence"}, + {0x3126, "erbopomofo"}, + {0x0440, "ercyrillic"}, + {0x0258, "ereversed"}, + {0x044d, "ereversedcyrillic"}, + {0x0441, "escyrillic"}, + {0x04ab, "esdescendercyrillic"}, + {0x0283, "esh"}, + {0x0286, "eshcurl"}, + {0x090e, "eshortdeva"}, + {0x0946, "eshortvowelsigndeva"}, + {0x01aa, "eshreversedloop"}, + {0x0285, "eshsquatreversed"}, + {0x3047, "esmallhiragana"}, + {0x30a7, "esmallkatakana"}, + {0xff6a, "esmallkatakanahalfwidth"}, {0x212e, "estimated"}, {0xf6ec, "esuperior"}, {0x03b7, "eta"}, + {0x0568, "etarmenian"}, {0x03ae, "etatonos"}, {0x00f0, "eth"}, + {0x1ebd, "etilde"}, + {0x1e1b, "etildebelow"}, + {0x0591, "etnahtafoukhhebrew"}, + {0x0591, "etnahtafoukhlefthebrew"}, + {0x0591, "etnahtahebrew"}, + {0x0591, "etnahtalefthebrew"}, + {0x01dd, "eturned"}, + {0x3161, "eukorean"}, + {0x20ac, "euro"}, + {0x09c7, "evowelsignbengali"}, + {0x0947, "evowelsigndeva"}, + {0x0ac7, "evowelsigngujarati"}, {0x0021, "exclam"}, + {0x055c, "exclamarmenian"}, {0x203c, "exclamdbl"}, {0x00a1, "exclamdown"}, {0xf7a1, "exclamdownsmall"}, {0x0021, "exclamleft"}, + {0xff01, "exclammonospace"}, {0xf721, "exclamsmall"}, {0x2203, "existential"}, + {0x0292, "ezh"}, + {0x01ef, "ezhcaron"}, + {0x0293, "ezhcurl"}, + {0x01b9, "ezhreversed"}, + {0x01ba, "ezhtail"}, {0x0066, "f"}, + {0x095e, "fadeva"}, + {0x0a5e, "fagurmukhi"}, + {0x2109, "fahrenheit"}, + {0x064e, "fathaarabic"}, + {0x064e, "fathalowarabic"}, + {0x064b, "fathatanarabic"}, + {0x3108, "fbopomofo"}, + {0x24d5, "fcircle"}, + {0x1e1f, "fdotaccent"}, + {0x0641, "feharabic"}, + {0x0586, "feharmenian"}, + {0xfed2, "fehfinalarabic"}, + {0xfed3, "fehinitialarabic"}, + {0xfed4, "fehmedialarabic"}, + {0x03e5, "feicoptic"}, {0x2640, "female"}, {0xfb00, "ff"}, {0xfb03, "ffi"}, {0xfb04, "ffl"}, {0xfb01, "fi"}, + {0x246e, "fifteencircle"}, + {0x2482, "fifteenparen"}, + {0x2496, "fifteenperiod"}, {0x2012, "figuredash"}, {0x25a0, "filledbox"}, {0x25ac, "filledrect"}, + {0x05da, "finalkaf"}, + {0xfb3a, "finalkafdagesh"}, + {0xfb3a, "finalkafdageshhebrew"}, + {0x05da, "finalkafhebrew"}, + {0x05dd, "finalmem"}, + {0x05dd, "finalmemhebrew"}, + {0x05df, "finalnun"}, + {0x05df, "finalnunhebrew"}, + {0x05e3, "finalpe"}, + {0x05e3, "finalpehebrew"}, + {0x05e5, "finaltsadi"}, + {0x05e5, "finaltsadihebrew"}, + {0x02c9, "firsttonechinese"}, + {0x25c9, "fisheye"}, + {0x0473, "fitacyrillic"}, {0x0035, "five"}, + {0x0665, "fivearabic"}, + {0x09eb, "fivebengali"}, + {0x2464, "fivecircle"}, + {0x278e, "fivecircleinversesansserif"}, + {0x096b, "fivedeva"}, {0x215d, "fiveeighths"}, + {0x0aeb, "fivegujarati"}, + {0x0a6b, "fivegurmukhi"}, + {0x0665, "fivehackarabic"}, + {0x3025, "fivehangzhou"}, + {0x3224, "fiveideographicparen"}, {0x2085, "fiveinferior"}, + {0xff15, "fivemonospace"}, {0xf735, "fiveoldstyle"}, + {0x2478, "fiveparen"}, + {0x248c, "fiveperiod"}, + {0x06f5, "fivepersian"}, + {0x2174, "fiveroman"}, {0x2075, "fivesuperior"}, + {0x0e55, "fivethai"}, {0xfb02, "fl"}, {0x0192, "florin"}, + {0xff46, "fmonospace"}, + {0x3399, "fmsquare"}, + {0x0e1f, "fofanthai"}, + {0x0e1d, "fofathai"}, + {0x0e4f, "fongmanthai"}, + {0x2200, "forall"}, {0x0034, "four"}, + {0x0664, "fourarabic"}, + {0x09ea, "fourbengali"}, + {0x2463, "fourcircle"}, + {0x278d, "fourcircleinversesansserif"}, + {0x096a, "fourdeva"}, + {0x0aea, "fourgujarati"}, + {0x0a6a, "fourgurmukhi"}, + {0x0664, "fourhackarabic"}, + {0x3024, "fourhangzhou"}, + {0x3223, "fourideographicparen"}, {0x2084, "fourinferior"}, + {0xff14, "fourmonospace"}, + {0x09f7, "fournumeratorbengali"}, {0xf734, "fouroldstyle"}, + {0x2477, "fourparen"}, + {0x248b, "fourperiod"}, + {0x06f4, "fourpersian"}, + {0x2173, "fourroman"}, {0x2074, "foursuperior"}, + {0x246d, "fourteencircle"}, + {0x2481, "fourteenparen"}, + {0x2495, "fourteenperiod"}, + {0x0e54, "fourthai"}, + {0x02cb, "fourthtonechinese"}, + {0x24a1, "fparen"}, {0x2044, "fraction"}, {0x20a3, "franc"}, {0x0067, "g"}, + {0x0997, "gabengali"}, + {0x01f5, "gacute"}, + {0x0917, "gadeva"}, + {0x06af, "gafarabic"}, + {0xfb93, "gaffinalarabic"}, + {0xfb94, "gafinitialarabic"}, + {0xfb95, "gafmedialarabic"}, + {0x0a97, "gagujarati"}, + {0x0a17, "gagurmukhi"}, + {0x304c, "gahiragana"}, + {0x30ac, "gakatakana"}, {0x03b3, "gamma"}, + {0x0263, "gammalatinsmall"}, + {0x02e0, "gammasuperior"}, + {0x03eb, "gangiacoptic"}, + {0x310d, "gbopomofo"}, {0x011f, "gbreve"}, {0x01e7, "gcaron"}, + {0x0123, "gcedilla"}, + {0x24d6, "gcircle"}, {0x011d, "gcircumflex"}, {0x0123, "gcommaaccent"}, + {0x0121, "gdot"}, {0x0121, "gdotaccent"}, + {0x0433, "gecyrillic"}, + {0x3052, "gehiragana"}, + {0x30b2, "gekatakana"}, + {0x2251, "geometricallyequal"}, + {0x059c, "gereshaccenthebrew"}, + {0x05f3, "gereshhebrew"}, + {0x059d, "gereshmuqdamhebrew"}, {0x00df, "germandbls"}, + {0x059e, "gershayimaccenthebrew"}, + {0x05f4, "gershayimhebrew"}, + {0x3013, "getamark"}, + {0x0998, "ghabengali"}, + {0x0572, "ghadarmenian"}, + {0x0918, "ghadeva"}, + {0x0a98, "ghagujarati"}, + {0x0a18, "ghagurmukhi"}, + {0x063a, "ghainarabic"}, + {0xfece, "ghainfinalarabic"}, + {0xfecf, "ghaininitialarabic"}, + {0xfed0, "ghainmedialarabic"}, + {0x0495, "ghemiddlehookcyrillic"}, + {0x0493, "ghestrokecyrillic"}, + {0x0491, "gheupturncyrillic"}, + {0x095a, "ghhadeva"}, + {0x0a5a, "ghhagurmukhi"}, + {0x0260, "ghook"}, + {0x3393, "ghzsquare"}, + {0x304e, "gihiragana"}, + {0x30ae, "gikatakana"}, + {0x0563, "gimarmenian"}, + {0x05d2, "gimel"}, + {0xfb32, "gimeldagesh"}, + {0xfb32, "gimeldageshhebrew"}, + {0x05d2, "gimelhebrew"}, + {0x0453, "gjecyrillic"}, + {0x01be, "glottalinvertedstroke"}, + {0x0294, "glottalstop"}, + {0x0296, "glottalstopinverted"}, + {0x02c0, "glottalstopmod"}, + {0x0295, "glottalstopreversed"}, + {0x02c1, "glottalstopreversedmod"}, + {0x02e4, "glottalstopreversedsuperior"}, + {0x02a1, "glottalstopstroke"}, + {0x02a2, "glottalstopstrokereversed"}, + {0x1e21, "gmacron"}, + {0xff47, "gmonospace"}, + {0x3054, "gohiragana"}, + {0x30b4, "gokatakana"}, + {0x24a2, "gparen"}, + {0x33ac, "gpasquare"}, {0x2207, "gradient"}, {0x0060, "grave"}, + {0x0316, "gravebelowcmb"}, + {0x0300, "gravecmb"}, {0x0300, "gravecomb"}, + {0x0953, "gravedeva"}, + {0x02ce, "gravelowmod"}, + {0xff40, "gravemonospace"}, + {0x0340, "gravetonecmb"}, {0x003e, "greater"}, {0x2265, "greaterequal"}, + {0x22db, "greaterequalorless"}, + {0xff1e, "greatermonospace"}, + {0x2273, "greaterorequivalent"}, + {0x2277, "greaterorless"}, + {0x2267, "greateroverequal"}, + {0xfe65, "greatersmall"}, + {0x0261, "gscript"}, + {0x01e5, "gstroke"}, + {0x3050, "guhiragana"}, {0x00ab, "guillemotleft"}, {0x00bb, "guillemotright"}, {0x2039, "guilsinglleft"}, {0x203a, "guilsinglright"}, + {0x30b0, "gukatakana"}, + {0x3318, "guramusquare"}, + {0x33c9, "gysquare"}, {0x0068, "h"}, + {0x04a9, "haabkhasiancyrillic"}, + {0x06c1, "haaltonearabic"}, + {0x09b9, "habengali"}, + {0x04b3, "hadescendercyrillic"}, + {0x0939, "hadeva"}, + {0x0ab9, "hagujarati"}, + {0x0a39, "hagurmukhi"}, + {0x062d, "haharabic"}, + {0xfea2, "hahfinalarabic"}, + {0xfea3, "hahinitialarabic"}, + {0x306f, "hahiragana"}, + {0xfea4, "hahmedialarabic"}, + {0x332a, "haitusquare"}, + {0x30cf, "hakatakana"}, + {0xff8a, "hakatakanahalfwidth"}, + {0x0a4d, "halantgurmukhi"}, + {0x0621, "hamzaarabic"}, + {0x0621, "hamzalowarabic"}, + {0x3164, "hangulfiller"}, + {0x044a, "hardsigncyrillic"}, + {0x21bc, "harpoonleftbarbup"}, + {0x21c0, "harpoonrightbarbup"}, + {0x33ca, "hasquare"}, + {0x05b2, "hatafpatah"}, + {0x05b2, "hatafpatah16"}, + {0x05b2, "hatafpatah23"}, + {0x05b2, "hatafpatah2f"}, + {0x05b2, "hatafpatahhebrew"}, + {0x05b2, "hatafpatahnarrowhebrew"}, + {0x05b2, "hatafpatahquarterhebrew"}, + {0x05b2, "hatafpatahwidehebrew"}, + {0x05b3, "hatafqamats"}, + {0x05b3, "hatafqamats1b"}, + {0x05b3, "hatafqamats28"}, + {0x05b3, "hatafqamats34"}, + {0x05b3, "hatafqamatshebrew"}, + {0x05b3, "hatafqamatsnarrowhebrew"}, + {0x05b3, "hatafqamatsquarterhebrew"}, + {0x05b3, "hatafqamatswidehebrew"}, + {0x05b1, "hatafsegol"}, + {0x05b1, "hatafsegol17"}, + {0x05b1, "hatafsegol24"}, + {0x05b1, "hatafsegol30"}, + {0x05b1, "hatafsegolhebrew"}, + {0x05b1, "hatafsegolnarrowhebrew"}, + {0x05b1, "hatafsegolquarterhebrew"}, + {0x05b1, "hatafsegolwidehebrew"}, {0x0127, "hbar"}, + {0x310f, "hbopomofo"}, + {0x1e2b, "hbrevebelow"}, + {0x1e29, "hcedilla"}, + {0x24d7, "hcircle"}, {0x0125, "hcircumflex"}, + {0x1e27, "hdieresis"}, + {0x1e23, "hdotaccent"}, + {0x1e25, "hdotbelow"}, + {0x05d4, "he"}, {0x2665, "heart"}, + {0x2665, "heartsuitblack"}, + {0x2661, "heartsuitwhite"}, + {0xfb34, "hedagesh"}, + {0xfb34, "hedageshhebrew"}, + {0x06c1, "hehaltonearabic"}, + {0x0647, "heharabic"}, + {0x05d4, "hehebrew"}, + {0xfba7, "hehfinalaltonearabic"}, + {0xfeea, "hehfinalalttwoarabic"}, + {0xfeea, "hehfinalarabic"}, + {0xfba5, "hehhamzaabovefinalarabic"}, + {0xfba4, "hehhamzaaboveisolatedarabic"}, + {0xfba8, "hehinitialaltonearabic"}, + {0xfeeb, "hehinitialarabic"}, + {0x3078, "hehiragana"}, + {0xfba9, "hehmedialaltonearabic"}, + {0xfeec, "hehmedialarabic"}, + {0x337b, "heiseierasquare"}, + {0x30d8, "hekatakana"}, + {0xff8d, "hekatakanahalfwidth"}, + {0x3336, "hekutaarusquare"}, + {0x0267, "henghook"}, + {0x3339, "herutusquare"}, + {0x05d7, "het"}, + {0x05d7, "hethebrew"}, + {0x0266, "hhook"}, + {0x02b1, "hhooksuperior"}, + {0x327b, "hieuhacirclekorean"}, + {0x321b, "hieuhaparenkorean"}, + {0x326d, "hieuhcirclekorean"}, + {0x314e, "hieuhkorean"}, + {0x320d, "hieuhparenkorean"}, + {0x3072, "hihiragana"}, + {0x30d2, "hikatakana"}, + {0xff8b, "hikatakanahalfwidth"}, + {0x05b4, "hiriq"}, + {0x05b4, "hiriq14"}, + {0x05b4, "hiriq21"}, + {0x05b4, "hiriq2d"}, + {0x05b4, "hiriqhebrew"}, + {0x05b4, "hiriqnarrowhebrew"}, + {0x05b4, "hiriqquarterhebrew"}, + {0x05b4, "hiriqwidehebrew"}, + {0x1e96, "hlinebelow"}, + {0xff48, "hmonospace"}, + {0x0570, "hoarmenian"}, + {0x0e2b, "hohipthai"}, + {0x307b, "hohiragana"}, + {0x30db, "hokatakana"}, + {0xff8e, "hokatakanahalfwidth"}, + {0x05b9, "holam"}, + {0x05b9, "holam19"}, + {0x05b9, "holam26"}, + {0x05b9, "holam32"}, + {0x05b9, "holamhebrew"}, + {0x05b9, "holamnarrowhebrew"}, + {0x05b9, "holamquarterhebrew"}, + {0x05b9, "holamwidehebrew"}, + {0x0e2e, "honokhukthai"}, {0x0309, "hookabovecomb"}, + {0x0309, "hookcmb"}, + {0x0321, "hookpalatalizedbelowcmb"}, + {0x0322, "hookretroflexbelowcmb"}, + {0x3342, "hoonsquare"}, + {0x03e9, "horicoptic"}, + {0x2015, "horizontalbar"}, + {0x031b, "horncmb"}, + {0x2668, "hotsprings"}, {0x2302, "house"}, + {0x24a3, "hparen"}, + {0x02b0, "hsuperior"}, + {0x0265, "hturned"}, + {0x3075, "huhiragana"}, + {0x3333, "huiitosquare"}, + {0x30d5, "hukatakana"}, + {0xff8c, "hukatakanahalfwidth"}, {0x02dd, "hungarumlaut"}, + {0x030b, "hungarumlautcmb"}, + {0x0195, "hv"}, {0x002d, "hyphen"}, {0xf6e5, "hypheninferior"}, + {0xff0d, "hyphenmonospace"}, + {0xfe63, "hyphensmall"}, {0xf6e6, "hyphensuperior"}, + {0x2010, "hyphentwo"}, {0x0069, "i"}, {0x00ed, "iacute"}, + {0x044f, "iacyrillic"}, + {0x0987, "ibengali"}, + {0x3127, "ibopomofo"}, {0x012d, "ibreve"}, + {0x01d0, "icaron"}, + {0x24d8, "icircle"}, {0x00ee, "icircumflex"}, + {0x0456, "icyrillic"}, + {0x0209, "idblgrave"}, + {0x328f, "ideographearthcircle"}, + {0x328b, "ideographfirecircle"}, + {0x323f, "ideographicallianceparen"}, + {0x323a, "ideographiccallparen"}, + {0x32a5, "ideographiccentrecircle"}, + {0x3006, "ideographicclose"}, + {0x3001, "ideographiccomma"}, + {0xff64, "ideographiccommaleft"}, + {0x3237, "ideographiccongratulationparen"}, + {0x32a3, "ideographiccorrectcircle"}, + {0x322f, "ideographicearthparen"}, + {0x323d, "ideographicenterpriseparen"}, + {0x329d, "ideographicexcellentcircle"}, + {0x3240, "ideographicfestivalparen"}, + {0x3296, "ideographicfinancialcircle"}, + {0x3236, "ideographicfinancialparen"}, + {0x322b, "ideographicfireparen"}, + {0x3232, "ideographichaveparen"}, + {0x32a4, "ideographichighcircle"}, + {0x3005, "ideographiciterationmark"}, + {0x3298, "ideographiclaborcircle"}, + {0x3238, "ideographiclaborparen"}, + {0x32a7, "ideographicleftcircle"}, + {0x32a6, "ideographiclowcircle"}, + {0x32a9, "ideographicmedicinecircle"}, + {0x322e, "ideographicmetalparen"}, + {0x322a, "ideographicmoonparen"}, + {0x3234, "ideographicnameparen"}, + {0x3002, "ideographicperiod"}, + {0x329e, "ideographicprintcircle"}, + {0x3243, "ideographicreachparen"}, + {0x3239, "ideographicrepresentparen"}, + {0x323e, "ideographicresourceparen"}, + {0x32a8, "ideographicrightcircle"}, + {0x3299, "ideographicsecretcircle"}, + {0x3242, "ideographicselfparen"}, + {0x3233, "ideographicsocietyparen"}, + {0x3000, "ideographicspace"}, + {0x3235, "ideographicspecialparen"}, + {0x3231, "ideographicstockparen"}, + {0x323b, "ideographicstudyparen"}, + {0x3230, "ideographicsunparen"}, + {0x323c, "ideographicsuperviseparen"}, + {0x322c, "ideographicwaterparen"}, + {0x322d, "ideographicwoodparen"}, + {0x3007, "ideographiczero"}, + {0x328e, "ideographmetalcircle"}, + {0x328a, "ideographmooncircle"}, + {0x3294, "ideographnamecircle"}, + {0x3290, "ideographsuncircle"}, + {0x328c, "ideographwatercircle"}, + {0x328d, "ideographwoodcircle"}, + {0x0907, "ideva"}, {0x00ef, "idieresis"}, + {0x1e2f, "idieresisacute"}, + {0x04e5, "idieresiscyrillic"}, + {0x1ecb, "idotbelow"}, + {0x04d7, "iebrevecyrillic"}, + {0x0435, "iecyrillic"}, + {0x3275, "ieungacirclekorean"}, + {0x3215, "ieungaparenkorean"}, + {0x3267, "ieungcirclekorean"}, + {0x3147, "ieungkorean"}, + {0x3207, "ieungparenkorean"}, {0x00ec, "igrave"}, + {0x0a87, "igujarati"}, + {0x0a07, "igurmukhi"}, + {0x3044, "ihiragana"}, + {0x1ec9, "ihookabove"}, + {0x0988, "iibengali"}, + {0x0438, "iicyrillic"}, + {0x0908, "iideva"}, + {0x0a88, "iigujarati"}, + {0x0a08, "iigurmukhi"}, + {0x0a40, "iimatragurmukhi"}, + {0x020b, "iinvertedbreve"}, + {0x0439, "iishortcyrillic"}, + {0x09c0, "iivowelsignbengali"}, + {0x0940, "iivowelsigndeva"}, + {0x0ac0, "iivowelsigngujarati"}, {0x0133, "ij"}, + {0x30a4, "ikatakana"}, + {0xff72, "ikatakanahalfwidth"}, + {0x3163, "ikorean"}, + {0x02dc, "ilde"}, + {0x05ac, "iluyhebrew"}, {0x012b, "imacron"}, + {0x04e3, "imacroncyrillic"}, + {0x2253, "imageorapproximatelyequal"}, + {0x0a3f, "imatragurmukhi"}, + {0xff49, "imonospace"}, + {0x2206, "increment"}, {0x221e, "infinity"}, + {0x056b, "iniarmenian"}, {0x222b, "integral"}, + {0x2321, "integralbottom"}, {0x2321, "integralbt"}, {0xf8f5, "integralex"}, + {0x2320, "integraltop"}, {0x2320, "integraltp"}, {0x2229, "intersection"}, + {0x3305, "intisquare"}, {0x25d8, "invbullet"}, {0x25d9, "invcircle"}, {0x263b, "invsmileface"}, + {0x0451, "iocyrillic"}, {0x012f, "iogonek"}, {0x03b9, "iota"}, {0x03ca, "iotadieresis"}, {0x0390, "iotadieresistonos"}, + {0x0269, "iotalatin"}, {0x03af, "iotatonos"}, + {0x24a4, "iparen"}, + {0x0a72, "irigurmukhi"}, + {0x3043, "ismallhiragana"}, + {0x30a3, "ismallkatakana"}, + {0xff68, "ismallkatakanahalfwidth"}, + {0x09fa, "issharbengali"}, + {0x0268, "istroke"}, {0xf6ed, "isuperior"}, + {0x309d, "iterationhiragana"}, + {0x30fd, "iterationkatakana"}, {0x0129, "itilde"}, + {0x1e2d, "itildebelow"}, + {0x3129, "iubopomofo"}, + {0x044e, "iucyrillic"}, + {0x09bf, "ivowelsignbengali"}, + {0x093f, "ivowelsigndeva"}, + {0x0abf, "ivowelsigngujarati"}, + {0x0475, "izhitsacyrillic"}, + {0x0477, "izhitsadblgravecyrillic"}, {0x006a, "j"}, + {0x0571, "jaarmenian"}, + {0x099c, "jabengali"}, + {0x091c, "jadeva"}, + {0x0a9c, "jagujarati"}, + {0x0a1c, "jagurmukhi"}, + {0x3110, "jbopomofo"}, + {0x01f0, "jcaron"}, + {0x24d9, "jcircle"}, {0x0135, "jcircumflex"}, + {0x029d, "jcrossedtail"}, + {0x025f, "jdotlessstroke"}, + {0x0458, "jecyrillic"}, + {0x062c, "jeemarabic"}, + {0xfe9e, "jeemfinalarabic"}, + {0xfe9f, "jeeminitialarabic"}, + {0xfea0, "jeemmedialarabic"}, + {0x0698, "jeharabic"}, + {0xfb8b, "jehfinalarabic"}, + {0x099d, "jhabengali"}, + {0x091d, "jhadeva"}, + {0x0a9d, "jhagujarati"}, + {0x0a1d, "jhagurmukhi"}, + {0x057b, "jheharmenian"}, + {0x3004, "jis"}, + {0xff4a, "jmonospace"}, + {0x24a5, "jparen"}, + {0x02b2, "jsuperior"}, {0x006b, "k"}, + {0x04a1, "kabashkircyrillic"}, + {0x0995, "kabengali"}, + {0x1e31, "kacute"}, + {0x043a, "kacyrillic"}, + {0x049b, "kadescendercyrillic"}, + {0x0915, "kadeva"}, + {0x05db, "kaf"}, + {0x0643, "kafarabic"}, + {0xfb3b, "kafdagesh"}, + {0xfb3b, "kafdageshhebrew"}, + {0xfeda, "kaffinalarabic"}, + {0x05db, "kafhebrew"}, + {0xfedb, "kafinitialarabic"}, + {0xfedc, "kafmedialarabic"}, + {0xfb4d, "kafrafehebrew"}, + {0x0a95, "kagujarati"}, + {0x0a15, "kagurmukhi"}, + {0x304b, "kahiragana"}, + {0x04c4, "kahookcyrillic"}, + {0x30ab, "kakatakana"}, + {0xff76, "kakatakanahalfwidth"}, {0x03ba, "kappa"}, + {0x03f0, "kappasymbolgreek"}, + {0x3171, "kapyeounmieumkorean"}, + {0x3184, "kapyeounphieuphkorean"}, + {0x3178, "kapyeounpieupkorean"}, + {0x3179, "kapyeounssangpieupkorean"}, + {0x330d, "karoriisquare"}, + {0x0640, "kashidaautoarabic"}, + {0x0640, "kashidaautonosidebearingarabic"}, + {0x30f5, "kasmallkatakana"}, + {0x3384, "kasquare"}, + {0x0650, "kasraarabic"}, + {0x064d, "kasratanarabic"}, + {0x049f, "kastrokecyrillic"}, + {0xff70, "katahiraprolongmarkhalfwidth"}, + {0x049d, "kaverticalstrokecyrillic"}, + {0x310e, "kbopomofo"}, + {0x3389, "kcalsquare"}, + {0x01e9, "kcaron"}, + {0x0137, "kcedilla"}, + {0x24da, "kcircle"}, {0x0137, "kcommaaccent"}, + {0x1e33, "kdotbelow"}, + {0x0584, "keharmenian"}, + {0x3051, "kehiragana"}, + {0x30b1, "kekatakana"}, + {0xff79, "kekatakanahalfwidth"}, + {0x056f, "kenarmenian"}, + {0x30f6, "kesmallkatakana"}, {0x0138, "kgreenlandic"}, + {0x0996, "khabengali"}, + {0x0445, "khacyrillic"}, + {0x0916, "khadeva"}, + {0x0a96, "khagujarati"}, + {0x0a16, "khagurmukhi"}, + {0x062e, "khaharabic"}, + {0xfea6, "khahfinalarabic"}, + {0xfea7, "khahinitialarabic"}, + {0xfea8, "khahmedialarabic"}, + {0x03e7, "kheicoptic"}, + {0x0959, "khhadeva"}, + {0x0a59, "khhagurmukhi"}, + {0x3278, "khieukhacirclekorean"}, + {0x3218, "khieukhaparenkorean"}, + {0x326a, "khieukhcirclekorean"}, + {0x314b, "khieukhkorean"}, + {0x320a, "khieukhparenkorean"}, + {0x0e02, "khokhaithai"}, + {0x0e05, "khokhonthai"}, + {0x0e03, "khokhuatthai"}, + {0x0e04, "khokhwaithai"}, + {0x0e5b, "khomutthai"}, + {0x0199, "khook"}, + {0x0e06, "khorakhangthai"}, + {0x3391, "khzsquare"}, + {0x304d, "kihiragana"}, + {0x30ad, "kikatakana"}, + {0xff77, "kikatakanahalfwidth"}, + {0x3315, "kiroguramusquare"}, + {0x3316, "kiromeetorusquare"}, + {0x3314, "kirosquare"}, + {0x326e, "kiyeokacirclekorean"}, + {0x320e, "kiyeokaparenkorean"}, + {0x3260, "kiyeokcirclekorean"}, + {0x3131, "kiyeokkorean"}, + {0x3200, "kiyeokparenkorean"}, + {0x3133, "kiyeoksioskorean"}, + {0x045c, "kjecyrillic"}, + {0x1e35, "klinebelow"}, + {0x3398, "klsquare"}, + {0x33a6, "kmcubedsquare"}, + {0xff4b, "kmonospace"}, + {0x33a2, "kmsquaredsquare"}, + {0x3053, "kohiragana"}, + {0x33c0, "kohmsquare"}, + {0x0e01, "kokaithai"}, + {0x30b3, "kokatakana"}, + {0xff7a, "kokatakanahalfwidth"}, + {0x331e, "kooposquare"}, + {0x0481, "koppacyrillic"}, + {0x327f, "koreanstandardsymbol"}, + {0x0343, "koroniscmb"}, + {0x24a6, "kparen"}, + {0x33aa, "kpasquare"}, + {0x046f, "ksicyrillic"}, + {0x33cf, "ktsquare"}, + {0x029e, "kturned"}, + {0x304f, "kuhiragana"}, + {0x30af, "kukatakana"}, + {0xff78, "kukatakanahalfwidth"}, + {0x33b8, "kvsquare"}, + {0x33be, "kwsquare"}, {0x006c, "l"}, + {0x09b2, "labengali"}, {0x013a, "lacute"}, + {0x0932, "ladeva"}, + {0x0ab2, "lagujarati"}, + {0x0a32, "lagurmukhi"}, + {0x0e45, "lakkhangyaothai"}, + {0xfefc, "lamaleffinalarabic"}, + {0xfef8, "lamalefhamzaabovefinalarabic"}, + {0xfef7, "lamalefhamzaaboveisolatedarabic"}, + {0xfefa, "lamalefhamzabelowfinalarabic"}, + {0xfef9, "lamalefhamzabelowisolatedarabic"}, + {0xfefb, "lamalefisolatedarabic"}, + {0xfef6, "lamalefmaddaabovefinalarabic"}, + {0xfef5, "lamalefmaddaaboveisolatedarabic"}, + {0x0644, "lamarabic"}, {0x03bb, "lambda"}, + {0x019b, "lambdastroke"}, + {0x05dc, "lamed"}, + {0xfb3c, "lameddagesh"}, + {0xfb3c, "lameddageshhebrew"}, + {0x05dc, "lamedhebrew"}, + {0xfede, "lamfinalarabic"}, + {0xfcca, "lamhahinitialarabic"}, + {0xfedf, "laminitialarabic"}, + {0xfcc9, "lamjeeminitialarabic"}, + {0xfccb, "lamkhahinitialarabic"}, + {0xfdf2, "lamlamhehisolatedarabic"}, + {0xfee0, "lammedialarabic"}, + {0xfd88, "lammeemhahinitialarabic"}, + {0xfccc, "lammeeminitialarabic"}, + {0x25ef, "largecircle"}, + {0x019a, "lbar"}, + {0x026c, "lbelt"}, + {0x310c, "lbopomofo"}, {0x013e, "lcaron"}, + {0x013c, "lcedilla"}, + {0x24db, "lcircle"}, + {0x1e3d, "lcircumflexbelow"}, {0x013c, "lcommaaccent"}, {0x0140, "ldot"}, + {0x0140, "ldotaccent"}, + {0x1e37, "ldotbelow"}, + {0x1e39, "ldotbelowmacron"}, + {0x031a, "leftangleabovecmb"}, + {0x0318, "lefttackbelowcmb"}, {0x003c, "less"}, {0x2264, "lessequal"}, + {0x22da, "lessequalorgreater"}, + {0xff1c, "lessmonospace"}, + {0x2272, "lessorequivalent"}, + {0x2276, "lessorgreater"}, + {0x2266, "lessoverequal"}, + {0xfe64, "lesssmall"}, + {0x026e, "lezh"}, {0x258c, "lfblock"}, + {0x026d, "lhookretroflex"}, {0x20a4, "lira"}, + {0x056c, "liwnarmenian"}, + {0x01c9, "lj"}, + {0x0459, "ljecyrillic"}, {0xf6c0, "ll"}, + {0x0933, "lladeva"}, + {0x0ab3, "llagujarati"}, + {0x1e3b, "llinebelow"}, + {0x0934, "llladeva"}, + {0x09e1, "llvocalicbengali"}, + {0x0961, "llvocalicdeva"}, + {0x09e3, "llvocalicvowelsignbengali"}, + {0x0963, "llvocalicvowelsigndeva"}, + {0x026b, "lmiddletilde"}, + {0xff4c, "lmonospace"}, + {0x33d0, "lmsquare"}, + {0x0e2c, "lochulathai"}, {0x2227, "logicaland"}, {0x00ac, "logicalnot"}, + {0x2310, "logicalnotreversed"}, {0x2228, "logicalor"}, + {0x0e25, "lolingthai"}, {0x017f, "longs"}, + {0xfe4e, "lowlinecenterline"}, + {0x0332, "lowlinecmb"}, + {0xfe4d, "lowlinedashed"}, {0x25ca, "lozenge"}, + {0x24a7, "lparen"}, {0x0142, "lslash"}, + {0x2113, "lsquare"}, {0xf6ee, "lsuperior"}, {0x2591, "ltshade"}, + {0x0e26, "luthai"}, + {0x098c, "lvocalicbengali"}, + {0x090c, "lvocalicdeva"}, + {0x09e2, "lvocalicvowelsignbengali"}, + {0x0962, "lvocalicvowelsigndeva"}, + {0x33d3, "lxsquare"}, {0x006d, "m"}, + {0x09ae, "mabengali"}, {0x00af, "macron"}, + {0x0331, "macronbelowcmb"}, + {0x0304, "macroncmb"}, + {0x02cd, "macronlowmod"}, + {0xffe3, "macronmonospace"}, + {0x1e3f, "macute"}, + {0x092e, "madeva"}, + {0x0aae, "magujarati"}, + {0x0a2e, "magurmukhi"}, + {0x05a4, "mahapakhhebrew"}, + {0x05a4, "mahapakhlefthebrew"}, + {0x307e, "mahiragana"}, + {0xf895, "maichattawalowleftthai"}, + {0xf894, "maichattawalowrightthai"}, + {0x0e4b, "maichattawathai"}, + {0xf893, "maichattawaupperleftthai"}, + {0xf88c, "maieklowleftthai"}, + {0xf88b, "maieklowrightthai"}, + {0x0e48, "maiekthai"}, + {0xf88a, "maiekupperleftthai"}, + {0xf884, "maihanakatleftthai"}, + {0x0e31, "maihanakatthai"}, + {0xf889, "maitaikhuleftthai"}, + {0x0e47, "maitaikhuthai"}, + {0xf88f, "maitholowleftthai"}, + {0xf88e, "maitholowrightthai"}, + {0x0e49, "maithothai"}, + {0xf88d, "maithoupperleftthai"}, + {0xf892, "maitrilowleftthai"}, + {0xf891, "maitrilowrightthai"}, + {0x0e4a, "maitrithai"}, + {0xf890, "maitriupperleftthai"}, + {0x0e46, "maiyamokthai"}, + {0x30de, "makatakana"}, + {0xff8f, "makatakanahalfwidth"}, {0x2642, "male"}, + {0x3347, "mansyonsquare"}, + {0x05be, "maqafhebrew"}, + {0x2642, "mars"}, + {0x05af, "masoracirclehebrew"}, + {0x3383, "masquare"}, + {0x3107, "mbopomofo"}, + {0x33d4, "mbsquare"}, + {0x24dc, "mcircle"}, + {0x33a5, "mcubedsquare"}, + {0x1e41, "mdotaccent"}, + {0x1e43, "mdotbelow"}, + {0x0645, "meemarabic"}, + {0xfee2, "meemfinalarabic"}, + {0xfee3, "meeminitialarabic"}, + {0xfee4, "meemmedialarabic"}, + {0xfcd1, "meemmeeminitialarabic"}, + {0xfc48, "meemmeemisolatedarabic"}, + {0x334d, "meetorusquare"}, + {0x3081, "mehiragana"}, + {0x337e, "meizierasquare"}, + {0x30e1, "mekatakana"}, + {0xff92, "mekatakanahalfwidth"}, + {0x05de, "mem"}, + {0xfb3e, "memdagesh"}, + {0xfb3e, "memdageshhebrew"}, + {0x05de, "memhebrew"}, + {0x0574, "menarmenian"}, + {0x05a5, "merkhahebrew"}, + {0x05a6, "merkhakefulahebrew"}, + {0x05a6, "merkhakefulalefthebrew"}, + {0x05a5, "merkhalefthebrew"}, + {0x0271, "mhook"}, + {0x3392, "mhzsquare"}, + {0xff65, "middledotkatakanahalfwidth"}, + {0x00b7, "middot"}, + {0x3272, "mieumacirclekorean"}, + {0x3212, "mieumaparenkorean"}, + {0x3264, "mieumcirclekorean"}, + {0x3141, "mieumkorean"}, + {0x3170, "mieumpansioskorean"}, + {0x3204, "mieumparenkorean"}, + {0x316e, "mieumpieupkorean"}, + {0x316f, "mieumsioskorean"}, + {0x307f, "mihiragana"}, + {0x30df, "mikatakana"}, + {0xff90, "mikatakanahalfwidth"}, {0x2212, "minus"}, + {0x0320, "minusbelowcmb"}, + {0x2296, "minuscircle"}, + {0x02d7, "minusmod"}, + {0x2213, "minusplus"}, {0x2032, "minute"}, + {0x334a, "miribaarusquare"}, + {0x3349, "mirisquare"}, + {0x0270, "mlonglegturned"}, + {0x3396, "mlsquare"}, + {0x33a3, "mmcubedsquare"}, + {0xff4d, "mmonospace"}, + {0x339f, "mmsquaredsquare"}, + {0x3082, "mohiragana"}, + {0x33c1, "mohmsquare"}, + {0x30e2, "mokatakana"}, + {0xff93, "mokatakanahalfwidth"}, + {0x33d6, "molsquare"}, + {0x0e21, "momathai"}, + {0x33a7, "moverssquare"}, + {0x33a8, "moverssquaredsquare"}, + {0x24a8, "mparen"}, + {0x33ab, "mpasquare"}, + {0x33b3, "mssquare"}, {0xf6ef, "msuperior"}, + {0x026f, "mturned"}, {0x00b5, "mu"}, + {0x00b5, "mu1"}, + {0x3382, "muasquare"}, + {0x226b, "muchgreater"}, + {0x226a, "muchless"}, + {0x338c, "mufsquare"}, + {0x03bc, "mugreek"}, + {0x338d, "mugsquare"}, + {0x3080, "muhiragana"}, + {0x30e0, "mukatakana"}, + {0xff91, "mukatakanahalfwidth"}, + {0x3395, "mulsquare"}, {0x00d7, "multiply"}, + {0x339b, "mumsquare"}, + {0x05a3, "munahhebrew"}, + {0x05a3, "munahlefthebrew"}, {0x266a, "musicalnote"}, {0x266b, "musicalnotedbl"}, + {0x266d, "musicflatsign"}, + {0x266f, "musicsharpsign"}, + {0x33b2, "mussquare"}, + {0x33b6, "muvsquare"}, + {0x33bc, "muwsquare"}, + {0x33b9, "mvmegasquare"}, + {0x33b7, "mvsquare"}, + {0x33bf, "mwmegasquare"}, + {0x33bd, "mwsquare"}, {0x006e, "n"}, + {0x09a8, "nabengali"}, + {0x2207, "nabla"}, {0x0144, "nacute"}, + {0x0928, "nadeva"}, + {0x0aa8, "nagujarati"}, + {0x0a28, "nagurmukhi"}, + {0x306a, "nahiragana"}, + {0x30ca, "nakatakana"}, + {0xff85, "nakatakanahalfwidth"}, {0x0149, "napostrophe"}, + {0x3381, "nasquare"}, + {0x310b, "nbopomofo"}, {0x00a0, "nbspace"}, {0x0148, "ncaron"}, + {0x0146, "ncedilla"}, + {0x24dd, "ncircle"}, + {0x1e4b, "ncircumflexbelow"}, {0x0146, "ncommaaccent"}, + {0x1e45, "ndotaccent"}, + {0x1e47, "ndotbelow"}, + {0x306d, "nehiragana"}, + {0x30cd, "nekatakana"}, + {0xff88, "nekatakanahalfwidth"}, + {0x20aa, "newsheqelsign"}, + {0x338b, "nfsquare"}, + {0x0999, "ngabengali"}, + {0x0919, "ngadeva"}, + {0x0a99, "ngagujarati"}, + {0x0a19, "ngagurmukhi"}, + {0x0e07, "ngonguthai"}, + {0x3093, "nhiragana"}, + {0x0272, "nhookleft"}, + {0x0273, "nhookretroflex"}, + {0x326f, "nieunacirclekorean"}, + {0x320f, "nieunaparenkorean"}, + {0x3135, "nieuncieuckorean"}, + {0x3261, "nieuncirclekorean"}, + {0x3136, "nieunhieuhkorean"}, + {0x3134, "nieunkorean"}, + {0x3168, "nieunpansioskorean"}, + {0x3201, "nieunparenkorean"}, + {0x3167, "nieunsioskorean"}, + {0x3166, "nieuntikeutkorean"}, + {0x306b, "nihiragana"}, + {0x30cb, "nikatakana"}, + {0xff86, "nikatakanahalfwidth"}, + {0xf899, "nikhahitleftthai"}, + {0x0e4d, "nikhahitthai"}, {0x0039, "nine"}, + {0x0669, "ninearabic"}, + {0x09ef, "ninebengali"}, + {0x2468, "ninecircle"}, + {0x2792, "ninecircleinversesansserif"}, + {0x096f, "ninedeva"}, + {0x0aef, "ninegujarati"}, + {0x0a6f, "ninegurmukhi"}, + {0x0669, "ninehackarabic"}, + {0x3029, "ninehangzhou"}, + {0x3228, "nineideographicparen"}, {0x2089, "nineinferior"}, + {0xff19, "ninemonospace"}, {0xf739, "nineoldstyle"}, + {0x247c, "nineparen"}, + {0x2490, "nineperiod"}, + {0x06f9, "ninepersian"}, + {0x2178, "nineroman"}, {0x2079, "ninesuperior"}, + {0x2472, "nineteencircle"}, + {0x2486, "nineteenparen"}, + {0x249a, "nineteenperiod"}, + {0x0e59, "ninethai"}, + {0x01cc, "nj"}, + {0x045a, "njecyrillic"}, + {0x30f3, "nkatakana"}, + {0xff9d, "nkatakanahalfwidth"}, + {0x019e, "nlegrightlong"}, + {0x1e49, "nlinebelow"}, + {0xff4e, "nmonospace"}, + {0x339a, "nmsquare"}, + {0x09a3, "nnabengali"}, + {0x0923, "nnadeva"}, + {0x0aa3, "nnagujarati"}, + {0x0a23, "nnagurmukhi"}, + {0x0929, "nnnadeva"}, + {0x306e, "nohiragana"}, + {0x30ce, "nokatakana"}, + {0xff89, "nokatakanahalfwidth"}, {0x00a0, "nonbreakingspace"}, + {0x0e13, "nonenthai"}, + {0x0e19, "nonuthai"}, + {0x0646, "noonarabic"}, + {0xfee6, "noonfinalarabic"}, + {0x06ba, "noonghunnaarabic"}, + {0xfb9f, "noonghunnafinalarabic"}, + {0xfee7, "nooninitialarabic"}, + {0xfcd2, "noonjeeminitialarabic"}, + {0xfc4b, "noonjeemisolatedarabic"}, + {0xfee8, "noonmedialarabic"}, + {0xfcd5, "noonmeeminitialarabic"}, + {0xfc4e, "noonmeemisolatedarabic"}, + {0xfc8d, "noonnoonfinalarabic"}, + {0x220c, "notcontains"}, {0x2209, "notelement"}, + {0x2209, "notelementof"}, {0x2260, "notequal"}, + {0x226f, "notgreater"}, + {0x2271, "notgreaternorequal"}, + {0x2279, "notgreaternorless"}, + {0x2262, "notidentical"}, + {0x226e, "notless"}, + {0x2270, "notlessnorequal"}, + {0x2226, "notparallel"}, + {0x2280, "notprecedes"}, {0x2284, "notsubset"}, + {0x2281, "notsucceeds"}, + {0x2285, "notsuperset"}, + {0x0576, "nowarmenian"}, + {0x24a9, "nparen"}, + {0x33b1, "nssquare"}, {0x207f, "nsuperior"}, {0x00f1, "ntilde"}, {0x03bd, "nu"}, + {0x306c, "nuhiragana"}, + {0x30cc, "nukatakana"}, + {0xff87, "nukatakanahalfwidth"}, + {0x09bc, "nuktabengali"}, + {0x093c, "nuktadeva"}, + {0x0abc, "nuktagujarati"}, + {0x0a3c, "nuktagurmukhi"}, {0x0023, "numbersign"}, + {0xff03, "numbersignmonospace"}, + {0xfe5f, "numbersignsmall"}, + {0x0374, "numeralsigngreek"}, + {0x0375, "numeralsignlowergreek"}, + {0x2116, "numero"}, + {0x05e0, "nun"}, + {0xfb40, "nundagesh"}, + {0xfb40, "nundageshhebrew"}, + {0x05e0, "nunhebrew"}, + {0x33b5, "nvsquare"}, + {0x33bb, "nwsquare"}, + {0x099e, "nyabengali"}, + {0x091e, "nyadeva"}, + {0x0a9e, "nyagujarati"}, + {0x0a1e, "nyagurmukhi"}, {0x006f, "o"}, {0x00f3, "oacute"}, + {0x0e2d, "oangthai"}, + {0x0275, "obarred"}, + {0x04e9, "obarredcyrillic"}, + {0x04eb, "obarreddieresiscyrillic"}, + {0x0993, "obengali"}, + {0x311b, "obopomofo"}, {0x014f, "obreve"}, + {0x0911, "ocandradeva"}, + {0x0a91, "ocandragujarati"}, + {0x0949, "ocandravowelsigndeva"}, + {0x0ac9, "ocandravowelsigngujarati"}, + {0x01d2, "ocaron"}, + {0x24de, "ocircle"}, {0x00f4, "ocircumflex"}, + {0x1ed1, "ocircumflexacute"}, + {0x1ed9, "ocircumflexdotbelow"}, + {0x1ed3, "ocircumflexgrave"}, + {0x1ed5, "ocircumflexhookabove"}, + {0x1ed7, "ocircumflextilde"}, + {0x043e, "ocyrillic"}, + {0x0151, "odblacute"}, + {0x020d, "odblgrave"}, + {0x0913, "odeva"}, {0x00f6, "odieresis"}, + {0x04e7, "odieresiscyrillic"}, + {0x1ecd, "odotbelow"}, {0x0153, "oe"}, + {0x315a, "oekorean"}, {0x02db, "ogonek"}, + {0x0328, "ogonekcmb"}, {0x00f2, "ograve"}, + {0x0a93, "ogujarati"}, + {0x0585, "oharmenian"}, + {0x304a, "ohiragana"}, + {0x1ecf, "ohookabove"}, {0x01a1, "ohorn"}, + {0x1edb, "ohornacute"}, + {0x1ee3, "ohorndotbelow"}, + {0x1edd, "ohorngrave"}, + {0x1edf, "ohornhookabove"}, + {0x1ee1, "ohorntilde"}, {0x0151, "ohungarumlaut"}, + {0x01a3, "oi"}, + {0x020f, "oinvertedbreve"}, + {0x30aa, "okatakana"}, + {0xff75, "okatakanahalfwidth"}, + {0x3157, "okorean"}, + {0x05ab, "olehebrew"}, {0x014d, "omacron"}, + {0x1e53, "omacronacute"}, + {0x1e51, "omacrongrave"}, + {0x0950, "omdeva"}, {0x03c9, "omega"}, {0x03d6, "omega1"}, + {0x0461, "omegacyrillic"}, + {0x0277, "omegalatinclosed"}, + {0x047b, "omegaroundcyrillic"}, + {0x047d, "omegatitlocyrillic"}, {0x03ce, "omegatonos"}, + {0x0ad0, "omgujarati"}, {0x03bf, "omicron"}, {0x03cc, "omicrontonos"}, + {0xff4f, "omonospace"}, {0x0031, "one"}, + {0x0661, "onearabic"}, + {0x09e7, "onebengali"}, + {0x2460, "onecircle"}, + {0x278a, "onecircleinversesansserif"}, + {0x0967, "onedeva"}, {0x2024, "onedotenleader"}, {0x215b, "oneeighth"}, {0xf6dc, "onefitted"}, + {0x0ae7, "onegujarati"}, + {0x0a67, "onegurmukhi"}, + {0x0661, "onehackarabic"}, {0x00bd, "onehalf"}, + {0x3021, "onehangzhou"}, + {0x3220, "oneideographicparen"}, {0x2081, "oneinferior"}, + {0xff11, "onemonospace"}, + {0x09f4, "onenumeratorbengali"}, {0xf731, "oneoldstyle"}, + {0x2474, "oneparen"}, + {0x2488, "oneperiod"}, + {0x06f1, "onepersian"}, {0x00bc, "onequarter"}, + {0x2170, "oneroman"}, {0x00b9, "onesuperior"}, + {0x0e51, "onethai"}, {0x2153, "onethird"}, + {0x01eb, "oogonek"}, + {0x01ed, "oogonekmacron"}, + {0x0a13, "oogurmukhi"}, + {0x0a4b, "oomatragurmukhi"}, + {0x0254, "oopen"}, + {0x24aa, "oparen"}, {0x25e6, "openbullet"}, + {0x2325, "option"}, {0x00aa, "ordfeminine"}, {0x00ba, "ordmasculine"}, {0x221f, "orthogonal"}, + {0x0912, "oshortdeva"}, + {0x094a, "oshortvowelsigndeva"}, {0x00f8, "oslash"}, {0x01ff, "oslashacute"}, + {0x3049, "osmallhiragana"}, + {0x30a9, "osmallkatakana"}, + {0xff6b, "osmallkatakanahalfwidth"}, + {0x01ff, "ostrokeacute"}, {0xf6f0, "osuperior"}, + {0x047f, "otcyrillic"}, {0x00f5, "otilde"}, + {0x1e4d, "otildeacute"}, + {0x1e4f, "otildedieresis"}, + {0x3121, "oubopomofo"}, + {0x203e, "overline"}, + {0xfe4a, "overlinecenterline"}, + {0x0305, "overlinecmb"}, + {0xfe49, "overlinedashed"}, + {0xfe4c, "overlinedblwavy"}, + {0xfe4b, "overlinewavy"}, + {0x00af, "overscore"}, + {0x09cb, "ovowelsignbengali"}, + {0x094b, "ovowelsigndeva"}, + {0x0acb, "ovowelsigngujarati"}, {0x0070, "p"}, + {0x3380, "paampssquare"}, + {0x332b, "paasentosquare"}, + {0x09aa, "pabengali"}, + {0x1e55, "pacute"}, + {0x092a, "padeva"}, + {0x21df, "pagedown"}, + {0x21de, "pageup"}, + {0x0aaa, "pagujarati"}, + {0x0a2a, "pagurmukhi"}, + {0x3071, "pahiragana"}, + {0x0e2f, "paiyannoithai"}, + {0x30d1, "pakatakana"}, + {0x0484, "palatalizationcyrilliccmb"}, + {0x04c0, "palochkacyrillic"}, + {0x317f, "pansioskorean"}, {0x00b6, "paragraph"}, + {0x2225, "parallel"}, {0x0028, "parenleft"}, + {0xfd3e, "parenleftaltonearabic"}, {0xf8ed, "parenleftbt"}, {0xf8ec, "parenleftex"}, {0x208d, "parenleftinferior"}, + {0xff08, "parenleftmonospace"}, + {0xfe59, "parenleftsmall"}, {0x207d, "parenleftsuperior"}, {0xf8eb, "parenlefttp"}, + {0xfe35, "parenleftvertical"}, {0x0029, "parenright"}, + {0xfd3f, "parenrightaltonearabic"}, {0xf8f8, "parenrightbt"}, {0xf8f7, "parenrightex"}, {0x208e, "parenrightinferior"}, + {0xff09, "parenrightmonospace"}, + {0xfe5a, "parenrightsmall"}, {0x207e, "parenrightsuperior"}, {0xf8f6, "parenrighttp"}, + {0xfe36, "parenrightvertical"}, {0x2202, "partialdiff"}, + {0x05c0, "paseqhebrew"}, + {0x0599, "pashtahebrew"}, + {0x33a9, "pasquare"}, + {0x05b7, "patah"}, + {0x05b7, "patah11"}, + {0x05b7, "patah1d"}, + {0x05b7, "patah2a"}, + {0x05b7, "patahhebrew"}, + {0x05b7, "patahnarrowhebrew"}, + {0x05b7, "patahquarterhebrew"}, + {0x05b7, "patahwidehebrew"}, + {0x05a1, "pazerhebrew"}, + {0x3106, "pbopomofo"}, + {0x24df, "pcircle"}, + {0x1e57, "pdotaccent"}, + {0x05e4, "pe"}, + {0x043f, "pecyrillic"}, + {0xfb44, "pedagesh"}, + {0xfb44, "pedageshhebrew"}, + {0x333b, "peezisquare"}, + {0xfb43, "pefinaldageshhebrew"}, + {0x067e, "peharabic"}, + {0x057a, "peharmenian"}, + {0x05e4, "pehebrew"}, + {0xfb57, "pehfinalarabic"}, + {0xfb58, "pehinitialarabic"}, + {0x307a, "pehiragana"}, + {0xfb59, "pehmedialarabic"}, + {0x30da, "pekatakana"}, + {0x04a7, "pemiddlehookcyrillic"}, + {0xfb4e, "perafehebrew"}, {0x0025, "percent"}, + {0x066a, "percentarabic"}, + {0xff05, "percentmonospace"}, + {0xfe6a, "percentsmall"}, {0x002e, "period"}, + {0x0589, "periodarmenian"}, {0x00b7, "periodcentered"}, + {0xff61, "periodhalfwidth"}, {0xf6e7, "periodinferior"}, + {0xff0e, "periodmonospace"}, + {0xfe52, "periodsmall"}, {0xf6e8, "periodsuperior"}, + {0x0342, "perispomenigreekcmb"}, {0x22a5, "perpendicular"}, {0x2030, "perthousand"}, {0x20a7, "peseta"}, + {0x338a, "pfsquare"}, + {0x09ab, "phabengali"}, + {0x092b, "phadeva"}, + {0x0aab, "phagujarati"}, + {0x0a2b, "phagurmukhi"}, {0x03c6, "phi"}, {0x03d5, "phi1"}, + {0x327a, "phieuphacirclekorean"}, + {0x321a, "phieuphaparenkorean"}, + {0x326c, "phieuphcirclekorean"}, + {0x314d, "phieuphkorean"}, + {0x320c, "phieuphparenkorean"}, + {0x0278, "philatin"}, + {0x0e3a, "phinthuthai"}, + {0x03d5, "phisymbolgreek"}, + {0x01a5, "phook"}, + {0x0e1e, "phophanthai"}, + {0x0e1c, "phophungthai"}, + {0x0e20, "phosamphaothai"}, {0x03c0, "pi"}, + {0x3273, "pieupacirclekorean"}, + {0x3213, "pieupaparenkorean"}, + {0x3176, "pieupcieuckorean"}, + {0x3265, "pieupcirclekorean"}, + {0x3172, "pieupkiyeokkorean"}, + {0x3142, "pieupkorean"}, + {0x3205, "pieupparenkorean"}, + {0x3174, "pieupsioskiyeokkorean"}, + {0x3144, "pieupsioskorean"}, + {0x3175, "pieupsiostikeutkorean"}, + {0x3177, "pieupthieuthkorean"}, + {0x3173, "pieuptikeutkorean"}, + {0x3074, "pihiragana"}, + {0x30d4, "pikatakana"}, + {0x03d6, "pisymbolgreek"}, + {0x0583, "piwrarmenian"}, {0x002b, "plus"}, + {0x031f, "plusbelowcmb"}, + {0x2295, "pluscircle"}, {0x00b1, "plusminus"}, + {0x02d6, "plusmod"}, + {0xff0b, "plusmonospace"}, + {0xfe62, "plussmall"}, + {0x207a, "plussuperior"}, + {0xff50, "pmonospace"}, + {0x33d8, "pmsquare"}, + {0x307d, "pohiragana"}, + {0x261f, "pointingindexdownwhite"}, + {0x261c, "pointingindexleftwhite"}, + {0x261e, "pointingindexrightwhite"}, + {0x261d, "pointingindexupwhite"}, + {0x30dd, "pokatakana"}, + {0x0e1b, "poplathai"}, + {0x3012, "postalmark"}, + {0x3020, "postalmarkface"}, + {0x24ab, "pparen"}, + {0x227a, "precedes"}, {0x211e, "prescription"}, + {0x02b9, "primemod"}, + {0x2035, "primereversed"}, {0x220f, "product"}, + {0x2305, "projective"}, + {0x30fc, "prolongedkana"}, + {0x2318, "propellor"}, {0x2282, "propersubset"}, {0x2283, "propersuperset"}, + {0x2237, "proportion"}, {0x221d, "proportional"}, {0x03c8, "psi"}, + {0x0471, "psicyrillic"}, + {0x0486, "psilipneumatacyrilliccmb"}, + {0x33b0, "pssquare"}, + {0x3077, "puhiragana"}, + {0x30d7, "pukatakana"}, + {0x33b4, "pvsquare"}, + {0x33ba, "pwsquare"}, {0x0071, "q"}, + {0x0958, "qadeva"}, + {0x05a8, "qadmahebrew"}, + {0x0642, "qafarabic"}, + {0xfed6, "qaffinalarabic"}, + {0xfed7, "qafinitialarabic"}, + {0xfed8, "qafmedialarabic"}, + {0x05b8, "qamats"}, + {0x05b8, "qamats10"}, + {0x05b8, "qamats1a"}, + {0x05b8, "qamats1c"}, + {0x05b8, "qamats27"}, + {0x05b8, "qamats29"}, + {0x05b8, "qamats33"}, + {0x05b8, "qamatsde"}, + {0x05b8, "qamatshebrew"}, + {0x05b8, "qamatsnarrowhebrew"}, + {0x05b8, "qamatsqatanhebrew"}, + {0x05b8, "qamatsqatannarrowhebrew"}, + {0x05b8, "qamatsqatanquarterhebrew"}, + {0x05b8, "qamatsqatanwidehebrew"}, + {0x05b8, "qamatsquarterhebrew"}, + {0x05b8, "qamatswidehebrew"}, + {0x059f, "qarneyparahebrew"}, + {0x3111, "qbopomofo"}, + {0x24e0, "qcircle"}, + {0x02a0, "qhook"}, + {0xff51, "qmonospace"}, + {0x05e7, "qof"}, + {0xfb47, "qofdagesh"}, + {0xfb47, "qofdageshhebrew"}, + {0x05e7, "qofhebrew"}, + {0x24ac, "qparen"}, + {0x2669, "quarternote"}, + {0x05bb, "qubuts"}, + {0x05bb, "qubuts18"}, + {0x05bb, "qubuts25"}, + {0x05bb, "qubuts31"}, + {0x05bb, "qubutshebrew"}, + {0x05bb, "qubutsnarrowhebrew"}, + {0x05bb, "qubutsquarterhebrew"}, + {0x05bb, "qubutswidehebrew"}, {0x003f, "question"}, + {0x061f, "questionarabic"}, + {0x055e, "questionarmenian"}, {0x00bf, "questiondown"}, {0xf7bf, "questiondownsmall"}, + {0x037e, "questiongreek"}, + {0xff1f, "questionmonospace"}, {0xf73f, "questionsmall"}, {0x0022, "quotedbl"}, {0x201e, "quotedblbase"}, {0x201c, "quotedblleft"}, + {0xff02, "quotedblmonospace"}, + {0x301e, "quotedblprime"}, + {0x301d, "quotedblprimereversed"}, {0x201d, "quotedblright"}, {0x2018, "quoteleft"}, + {0x201b, "quoteleftreversed"}, {0x201b, "quotereversed"}, {0x2019, "quoteright"}, + {0x0149, "quoterightn"}, {0x201a, "quotesinglbase"}, {0x0027, "quotesingle"}, + {0xff07, "quotesinglemonospace"}, {0x0072, "r"}, + {0x057c, "raarmenian"}, + {0x09b0, "rabengali"}, {0x0155, "racute"}, + {0x0930, "radeva"}, {0x221a, "radical"}, {0xf8e5, "radicalex"}, + {0x33ae, "radoverssquare"}, + {0x33af, "radoverssquaredsquare"}, + {0x33ad, "radsquare"}, + {0x05bf, "rafe"}, + {0x05bf, "rafehebrew"}, + {0x0ab0, "ragujarati"}, + {0x0a30, "ragurmukhi"}, + {0x3089, "rahiragana"}, + {0x30e9, "rakatakana"}, + {0xff97, "rakatakanahalfwidth"}, + {0x09f1, "ralowerdiagonalbengali"}, + {0x09f0, "ramiddlediagonalbengali"}, + {0x0264, "ramshorn"}, + {0x2236, "ratio"}, + {0x3116, "rbopomofo"}, {0x0159, "rcaron"}, + {0x0157, "rcedilla"}, + {0x24e1, "rcircle"}, {0x0157, "rcommaaccent"}, + {0x0211, "rdblgrave"}, + {0x1e59, "rdotaccent"}, + {0x1e5b, "rdotbelow"}, + {0x1e5d, "rdotbelowmacron"}, + {0x203b, "referencemark"}, {0x2286, "reflexsubset"}, {0x2287, "reflexsuperset"}, {0x00ae, "registered"}, - {0x00ae, "registersans"}, - {0x00ae, "registerserif"}, + {0xf8e8, "registersans"}, + {0xf6da, "registerserif"}, + {0x0631, "reharabic"}, + {0x0580, "reharmenian"}, + {0xfeae, "rehfinalarabic"}, + {0x308c, "rehiragana"}, + {0x30ec, "rekatakana"}, + {0xff9a, "rekatakanahalfwidth"}, + {0x05e8, "resh"}, + {0xfb48, "reshdageshhebrew"}, + {0x05e8, "reshhebrew"}, + {0x223d, "reversedtilde"}, + {0x0597, "reviahebrew"}, + {0x0597, "reviamugrashhebrew"}, {0x2310, "revlogicalnot"}, + {0x027e, "rfishhook"}, + {0x027f, "rfishhookreversed"}, + {0x09dd, "rhabengali"}, + {0x095d, "rhadeva"}, {0x03c1, "rho"}, + {0x027d, "rhook"}, + {0x027b, "rhookturned"}, + {0x02b5, "rhookturnedsuperior"}, + {0x03f1, "rhosymbolgreek"}, + {0x02de, "rhotichookmod"}, + {0x3271, "rieulacirclekorean"}, + {0x3211, "rieulaparenkorean"}, + {0x3263, "rieulcirclekorean"}, + {0x3140, "rieulhieuhkorean"}, + {0x313a, "rieulkiyeokkorean"}, + {0x3169, "rieulkiyeoksioskorean"}, + {0x3139, "rieulkorean"}, + {0x313b, "rieulmieumkorean"}, + {0x316c, "rieulpansioskorean"}, + {0x3203, "rieulparenkorean"}, + {0x313f, "rieulphieuphkorean"}, + {0x313c, "rieulpieupkorean"}, + {0x316b, "rieulpieupsioskorean"}, + {0x313d, "rieulsioskorean"}, + {0x313e, "rieulthieuthkorean"}, + {0x316a, "rieultikeutkorean"}, + {0x316d, "rieulyeorinhieuhkorean"}, + {0x221f, "rightangle"}, + {0x0319, "righttackbelowcmb"}, + {0x22bf, "righttriangle"}, + {0x308a, "rihiragana"}, + {0x30ea, "rikatakana"}, + {0xff98, "rikatakanahalfwidth"}, {0x02da, "ring"}, + {0x0325, "ringbelowcmb"}, + {0x030a, "ringcmb"}, + {0x02bf, "ringhalfleft"}, + {0x0559, "ringhalfleftarmenian"}, + {0x031c, "ringhalfleftbelowcmb"}, + {0x02d3, "ringhalfleftcentered"}, + {0x02be, "ringhalfright"}, + {0x0339, "ringhalfrightbelowcmb"}, + {0x02d2, "ringhalfrightcentered"}, + {0x0213, "rinvertedbreve"}, + {0x3351, "rittorusquare"}, + {0x1e5f, "rlinebelow"}, + {0x027c, "rlongleg"}, + {0x027a, "rlonglegturned"}, + {0xff52, "rmonospace"}, + {0x308d, "rohiragana"}, + {0x30ed, "rokatakana"}, + {0xff9b, "rokatakanahalfwidth"}, + {0x0e23, "roruathai"}, + {0x24ad, "rparen"}, + {0x09dc, "rrabengali"}, + {0x0931, "rradeva"}, + {0x0a5c, "rragurmukhi"}, + {0x0691, "rreharabic"}, + {0xfb8d, "rrehfinalarabic"}, + {0x09e0, "rrvocalicbengali"}, + {0x0960, "rrvocalicdeva"}, + {0x0ae0, "rrvocalicgujarati"}, + {0x09c4, "rrvocalicvowelsignbengali"}, + {0x0944, "rrvocalicvowelsigndeva"}, + {0x0ac4, "rrvocalicvowelsigngujarati"}, {0xf6f1, "rsuperior"}, {0x2590, "rtblock"}, + {0x0279, "rturned"}, + {0x02b4, "rturnedsuperior"}, + {0x308b, "ruhiragana"}, + {0x30eb, "rukatakana"}, + {0xff99, "rukatakanahalfwidth"}, + {0x09f2, "rupeemarkbengali"}, + {0x09f3, "rupeesignbengali"}, {0xf6dd, "rupiah"}, + {0x0e24, "ruthai"}, + {0x098b, "rvocalicbengali"}, + {0x090b, "rvocalicdeva"}, + {0x0a8b, "rvocalicgujarati"}, + {0x09c3, "rvocalicvowelsignbengali"}, + {0x0943, "rvocalicvowelsigndeva"}, + {0x0ac3, "rvocalicvowelsigngujarati"}, {0x0073, "s"}, + {0x09b8, "sabengali"}, {0x015b, "sacute"}, + {0x1e65, "sacutedotaccent"}, + {0x0635, "sadarabic"}, + {0x0938, "sadeva"}, + {0xfeba, "sadfinalarabic"}, + {0xfebb, "sadinitialarabic"}, + {0xfebc, "sadmedialarabic"}, + {0x0ab8, "sagujarati"}, + {0x0a38, "sagurmukhi"}, + {0x3055, "sahiragana"}, + {0x30b5, "sakatakana"}, + {0xff7b, "sakatakanahalfwidth"}, + {0xfdfa, "sallallahoualayhewasallamarabic"}, + {0x05e1, "samekh"}, + {0xfb41, "samekhdagesh"}, + {0xfb41, "samekhdageshhebrew"}, + {0x05e1, "samekhhebrew"}, + {0x0e32, "saraaathai"}, + {0x0e41, "saraaethai"}, + {0x0e44, "saraaimaimalaithai"}, + {0x0e43, "saraaimaimuanthai"}, + {0x0e33, "saraamthai"}, + {0x0e30, "saraathai"}, + {0x0e40, "saraethai"}, + {0xf886, "saraiileftthai"}, + {0x0e35, "saraiithai"}, + {0xf885, "saraileftthai"}, + {0x0e34, "saraithai"}, + {0x0e42, "saraothai"}, + {0xf888, "saraueeleftthai"}, + {0x0e37, "saraueethai"}, + {0xf887, "saraueleftthai"}, + {0x0e36, "sarauethai"}, + {0x0e38, "sarauthai"}, + {0x0e39, "sarauuthai"}, + {0x3119, "sbopomofo"}, {0x0161, "scaron"}, + {0x1e67, "scarondotaccent"}, {0x015f, "scedilla"}, + {0x0259, "schwa"}, + {0x04d9, "schwacyrillic"}, + {0x04db, "schwadieresiscyrillic"}, + {0x025a, "schwahook"}, + {0x24e2, "scircle"}, {0x015d, "scircumflex"}, {0x0219, "scommaaccent"}, + {0x1e61, "sdotaccent"}, + {0x1e63, "sdotbelow"}, + {0x1e69, "sdotbelowdotaccent"}, + {0x033c, "seagullbelowcmb"}, {0x2033, "second"}, + {0x02ca, "secondtonechinese"}, {0x00a7, "section"}, + {0x0633, "seenarabic"}, + {0xfeb2, "seenfinalarabic"}, + {0xfeb3, "seeninitialarabic"}, + {0xfeb4, "seenmedialarabic"}, + {0x05b6, "segol"}, + {0x05b6, "segol13"}, + {0x05b6, "segol1f"}, + {0x05b6, "segol2c"}, + {0x05b6, "segolhebrew"}, + {0x05b6, "segolnarrowhebrew"}, + {0x05b6, "segolquarterhebrew"}, + {0x0592, "segoltahebrew"}, + {0x05b6, "segolwidehebrew"}, + {0x057d, "seharmenian"}, + {0x305b, "sehiragana"}, + {0x30bb, "sekatakana"}, + {0xff7e, "sekatakanahalfwidth"}, {0x003b, "semicolon"}, + {0x061b, "semicolonarabic"}, + {0xff1b, "semicolonmonospace"}, + {0xfe54, "semicolonsmall"}, + {0x309c, "semivoicedmarkkana"}, + {0xff9f, "semivoicedmarkkanahalfwidth"}, + {0x3322, "sentisquare"}, + {0x3323, "sentosquare"}, {0x0037, "seven"}, + {0x0667, "sevenarabic"}, + {0x09ed, "sevenbengali"}, + {0x2466, "sevencircle"}, + {0x2790, "sevencircleinversesansserif"}, + {0x096d, "sevendeva"}, {0x215e, "seveneighths"}, + {0x0aed, "sevengujarati"}, + {0x0a6d, "sevengurmukhi"}, + {0x0667, "sevenhackarabic"}, + {0x3027, "sevenhangzhou"}, + {0x3226, "sevenideographicparen"}, {0x2087, "seveninferior"}, + {0xff17, "sevenmonospace"}, {0xf737, "sevenoldstyle"}, + {0x247a, "sevenparen"}, + {0x248e, "sevenperiod"}, + {0x06f7, "sevenpersian"}, + {0x2176, "sevenroman"}, {0x2077, "sevensuperior"}, + {0x2470, "seventeencircle"}, + {0x2484, "seventeenparen"}, + {0x2498, "seventeenperiod"}, + {0x0e57, "seventhai"}, + {0x00ad, "sfthyphen"}, + {0x0577, "shaarmenian"}, + {0x09b6, "shabengali"}, + {0x0448, "shacyrillic"}, + {0x0651, "shaddaarabic"}, + {0xfc61, "shaddadammaarabic"}, + {0xfc5e, "shaddadammatanarabic"}, + {0xfc60, "shaddafathaarabic"}, + {0xfc62, "shaddakasraarabic"}, + {0xfc5f, "shaddakasratanarabic"}, {0x2592, "shade"}, + {0x2593, "shadedark"}, + {0x2591, "shadelight"}, + {0x2592, "shademedium"}, + {0x0936, "shadeva"}, + {0x0ab6, "shagujarati"}, + {0x0a36, "shagurmukhi"}, + {0x0593, "shalshelethebrew"}, + {0x3115, "shbopomofo"}, + {0x0449, "shchacyrillic"}, + {0x0634, "sheenarabic"}, + {0xfeb6, "sheenfinalarabic"}, + {0xfeb7, "sheeninitialarabic"}, + {0xfeb8, "sheenmedialarabic"}, + {0x03e3, "sheicoptic"}, + {0x20aa, "sheqel"}, + {0x20aa, "sheqelhebrew"}, + {0x05b0, "sheva"}, + {0x05b0, "sheva115"}, + {0x05b0, "sheva15"}, + {0x05b0, "sheva22"}, + {0x05b0, "sheva2e"}, + {0x05b0, "shevahebrew"}, + {0x05b0, "shevanarrowhebrew"}, + {0x05b0, "shevaquarterhebrew"}, + {0x05b0, "shevawidehebrew"}, + {0x04bb, "shhacyrillic"}, + {0x03ed, "shimacoptic"}, + {0x05e9, "shin"}, + {0xfb49, "shindagesh"}, + {0xfb49, "shindageshhebrew"}, + {0xfb2c, "shindageshshindot"}, + {0xfb2c, "shindageshshindothebrew"}, + {0xfb2d, "shindageshsindot"}, + {0xfb2d, "shindageshsindothebrew"}, + {0x05c1, "shindothebrew"}, + {0x05e9, "shinhebrew"}, + {0xfb2a, "shinshindot"}, + {0xfb2a, "shinshindothebrew"}, + {0xfb2b, "shinsindot"}, + {0xfb2b, "shinsindothebrew"}, + {0x0282, "shook"}, {0x03c3, "sigma"}, {0x03c2, "sigma1"}, + {0x03c2, "sigmafinal"}, + {0x03f2, "sigmalunatesymbolgreek"}, + {0x3057, "sihiragana"}, + {0x30b7, "sikatakana"}, + {0xff7c, "sikatakanahalfwidth"}, + {0x05bd, "siluqhebrew"}, + {0x05bd, "siluqlefthebrew"}, {0x223c, "similar"}, + {0x05c2, "sindothebrew"}, + {0x3274, "siosacirclekorean"}, + {0x3214, "siosaparenkorean"}, + {0x317e, "sioscieuckorean"}, + {0x3266, "sioscirclekorean"}, + {0x317a, "sioskiyeokkorean"}, + {0x3145, "sioskorean"}, + {0x317b, "siosnieunkorean"}, + {0x3206, "siosparenkorean"}, + {0x317d, "siospieupkorean"}, + {0x317c, "siostikeutkorean"}, {0x0036, "six"}, + {0x0666, "sixarabic"}, + {0x09ec, "sixbengali"}, + {0x2465, "sixcircle"}, + {0x278f, "sixcircleinversesansserif"}, + {0x096c, "sixdeva"}, + {0x0aec, "sixgujarati"}, + {0x0a6c, "sixgurmukhi"}, + {0x0666, "sixhackarabic"}, + {0x3026, "sixhangzhou"}, + {0x3225, "sixideographicparen"}, {0x2086, "sixinferior"}, + {0xff16, "sixmonospace"}, {0xf736, "sixoldstyle"}, + {0x2479, "sixparen"}, + {0x248d, "sixperiod"}, + {0x06f6, "sixpersian"}, + {0x2175, "sixroman"}, {0x2076, "sixsuperior"}, + {0x246f, "sixteencircle"}, + {0x09f9, "sixteencurrencydenominatorbengali"}, + {0x2483, "sixteenparen"}, + {0x2497, "sixteenperiod"}, + {0x0e56, "sixthai"}, {0x002f, "slash"}, + {0xff0f, "slashmonospace"}, + {0x017f, "slong"}, + {0x1e9b, "slongdotaccent"}, {0x263a, "smileface"}, + {0xff53, "smonospace"}, + {0x05c3, "sofpasuqhebrew"}, + {0x00ad, "softhyphen"}, + {0x044c, "softsigncyrillic"}, + {0x305d, "sohiragana"}, + {0x30bd, "sokatakana"}, + {0xff7f, "sokatakanahalfwidth"}, + {0x0338, "soliduslongoverlaycmb"}, + {0x0337, "solidusshortoverlaycmb"}, + {0x0e29, "sorusithai"}, + {0x0e28, "sosalathai"}, + {0x0e0b, "sosothai"}, + {0x0e2a, "sosuathai"}, {0x0020, "space"}, + {0x0020, "spacehackarabic"}, {0x2660, "spade"}, + {0x2660, "spadesuitblack"}, + {0x2664, "spadesuitwhite"}, + {0x24ae, "sparen"}, + {0x033b, "squarebelowcmb"}, + {0x33c4, "squarecc"}, + {0x339d, "squarecm"}, + {0x25a9, "squarediagonalcrosshatchfill"}, + {0x25a4, "squarehorizontalfill"}, + {0x338f, "squarekg"}, + {0x339e, "squarekm"}, + {0x33ce, "squarekmcapital"}, + {0x33d1, "squareln"}, + {0x33d2, "squarelog"}, + {0x338e, "squaremg"}, + {0x33d5, "squaremil"}, + {0x339c, "squaremm"}, + {0x33a1, "squaremsquared"}, + {0x25a6, "squareorthogonalcrosshatchfill"}, + {0x25a7, "squareupperlefttolowerrightfill"}, + {0x25a8, "squareupperrighttolowerleftfill"}, + {0x25a5, "squareverticalfill"}, + {0x25a3, "squarewhitewithsmallblack"}, + {0x33db, "srsquare"}, + {0x09b7, "ssabengali"}, + {0x0937, "ssadeva"}, + {0x0ab7, "ssagujarati"}, + {0x3149, "ssangcieuckorean"}, + {0x3185, "ssanghieuhkorean"}, + {0x3180, "ssangieungkorean"}, + {0x3132, "ssangkiyeokkorean"}, + {0x3165, "ssangnieunkorean"}, + {0x3143, "ssangpieupkorean"}, + {0x3146, "ssangsioskorean"}, + {0x3138, "ssangtikeutkorean"}, {0xf6f2, "ssuperior"}, {0x00a3, "sterling"}, + {0xffe1, "sterlingmonospace"}, + {0x0336, "strokelongoverlaycmb"}, + {0x0335, "strokeshortoverlaycmb"}, + {0x2282, "subset"}, + {0x228a, "subsetnotequal"}, + {0x2286, "subsetorequal"}, + {0x227b, "succeeds"}, {0x220b, "suchthat"}, + {0x3059, "suhiragana"}, + {0x30b9, "sukatakana"}, + {0xff7d, "sukatakanahalfwidth"}, + {0x0652, "sukunarabic"}, {0x2211, "summation"}, {0x263c, "sun"}, + {0x2283, "superset"}, + {0x228b, "supersetnotequal"}, + {0x2287, "supersetorequal"}, + {0x33dc, "svsquare"}, + {0x337c, "syouwaerasquare"}, {0x0074, "t"}, + {0x09a4, "tabengali"}, + {0x22a4, "tackdown"}, + {0x22a3, "tackleft"}, + {0x0924, "tadeva"}, + {0x0aa4, "tagujarati"}, + {0x0a24, "tagurmukhi"}, + {0x0637, "taharabic"}, + {0xfec2, "tahfinalarabic"}, + {0xfec3, "tahinitialarabic"}, + {0x305f, "tahiragana"}, + {0xfec4, "tahmedialarabic"}, + {0x337d, "taisyouerasquare"}, + {0x30bf, "takatakana"}, + {0xff80, "takatakanahalfwidth"}, + {0x0640, "tatweelarabic"}, {0x03c4, "tau"}, + {0x05ea, "tav"}, + {0xfb4a, "tavdages"}, + {0xfb4a, "tavdagesh"}, + {0xfb4a, "tavdageshhebrew"}, + {0x05ea, "tavhebrew"}, {0x0167, "tbar"}, + {0x310a, "tbopomofo"}, {0x0165, "tcaron"}, + {0x02a8, "tccurl"}, + {0x0163, "tcedilla"}, + {0x0686, "tcheharabic"}, + {0xfb7b, "tchehfinalarabic"}, + {0xfb7c, "tchehinitialarabic"}, + {0xfb7d, "tchehmedialarabic"}, + {0x24e3, "tcircle"}, + {0x1e71, "tcircumflexbelow"}, {0x0163, "tcommaaccent"}, + {0x1e97, "tdieresis"}, + {0x1e6b, "tdotaccent"}, + {0x1e6d, "tdotbelow"}, + {0x0442, "tecyrillic"}, + {0x04ad, "tedescendercyrillic"}, + {0x062a, "teharabic"}, + {0xfe96, "tehfinalarabic"}, + {0xfca2, "tehhahinitialarabic"}, + {0xfc0c, "tehhahisolatedarabic"}, + {0xfe97, "tehinitialarabic"}, + {0x3066, "tehiragana"}, + {0xfca1, "tehjeeminitialarabic"}, + {0xfc0b, "tehjeemisolatedarabic"}, + {0x0629, "tehmarbutaarabic"}, + {0xfe94, "tehmarbutafinalarabic"}, + {0xfe98, "tehmedialarabic"}, + {0xfca4, "tehmeeminitialarabic"}, + {0xfc0e, "tehmeemisolatedarabic"}, + {0xfc73, "tehnoonfinalarabic"}, + {0x30c6, "tekatakana"}, + {0xff83, "tekatakanahalfwidth"}, + {0x2121, "telephone"}, + {0x260e, "telephoneblack"}, + {0x05a0, "telishagedolahebrew"}, + {0x05a9, "telishaqetanahebrew"}, + {0x2469, "tencircle"}, + {0x3229, "tenideographicparen"}, + {0x247d, "tenparen"}, + {0x2491, "tenperiod"}, + {0x2179, "tenroman"}, + {0x02a7, "tesh"}, + {0x05d8, "tet"}, + {0xfb38, "tetdagesh"}, + {0xfb38, "tetdageshhebrew"}, + {0x05d8, "tethebrew"}, + {0x04b5, "tetsecyrillic"}, + {0x059b, "tevirhebrew"}, + {0x059b, "tevirlefthebrew"}, + {0x09a5, "thabengali"}, + {0x0925, "thadeva"}, + {0x0aa5, "thagujarati"}, + {0x0a25, "thagurmukhi"}, + {0x0630, "thalarabic"}, + {0xfeac, "thalfinalarabic"}, + {0xf898, "thanthakhatlowleftthai"}, + {0xf897, "thanthakhatlowrightthai"}, + {0x0e4c, "thanthakhatthai"}, + {0xf896, "thanthakhatupperleftthai"}, + {0x062b, "theharabic"}, + {0xfe9a, "thehfinalarabic"}, + {0xfe9b, "thehinitialarabic"}, + {0xfe9c, "thehmedialarabic"}, + {0x2203, "thereexists"}, {0x2234, "therefore"}, {0x03b8, "theta"}, {0x03d1, "theta1"}, + {0x03d1, "thetasymbolgreek"}, + {0x3279, "thieuthacirclekorean"}, + {0x3219, "thieuthaparenkorean"}, + {0x326b, "thieuthcirclekorean"}, + {0x314c, "thieuthkorean"}, + {0x320b, "thieuthparenkorean"}, + {0x246c, "thirteencircle"}, + {0x2480, "thirteenparen"}, + {0x2494, "thirteenperiod"}, + {0x0e11, "thonangmonthothai"}, + {0x01ad, "thook"}, + {0x0e12, "thophuthaothai"}, {0x00fe, "thorn"}, + {0x0e17, "thothahanthai"}, + {0x0e10, "thothanthai"}, + {0x0e18, "thothongthai"}, + {0x0e16, "thothungthai"}, + {0x0482, "thousandcyrillic"}, + {0x066c, "thousandsseparatorarabic"}, + {0x066c, "thousandsseparatorpersian"}, {0x0033, "three"}, + {0x0663, "threearabic"}, + {0x09e9, "threebengali"}, + {0x2462, "threecircle"}, + {0x278c, "threecircleinversesansserif"}, + {0x0969, "threedeva"}, {0x215c, "threeeighths"}, + {0x0ae9, "threegujarati"}, + {0x0a69, "threegurmukhi"}, + {0x0663, "threehackarabic"}, + {0x3023, "threehangzhou"}, + {0x3222, "threeideographicparen"}, {0x2083, "threeinferior"}, + {0xff13, "threemonospace"}, + {0x09f6, "threenumeratorbengali"}, {0xf733, "threeoldstyle"}, + {0x2476, "threeparen"}, + {0x248a, "threeperiod"}, + {0x06f3, "threepersian"}, {0x00be, "threequarters"}, {0xf6de, "threequartersemdash"}, + {0x2172, "threeroman"}, {0x00b3, "threesuperior"}, + {0x0e53, "threethai"}, + {0x3394, "thzsquare"}, + {0x3061, "tihiragana"}, + {0x30c1, "tikatakana"}, + {0xff81, "tikatakanahalfwidth"}, + {0x3270, "tikeutacirclekorean"}, + {0x3210, "tikeutaparenkorean"}, + {0x3262, "tikeutcirclekorean"}, + {0x3137, "tikeutkorean"}, + {0x3202, "tikeutparenkorean"}, {0x02dc, "tilde"}, + {0x0330, "tildebelowcmb"}, + {0x0303, "tildecmb"}, {0x0303, "tildecomb"}, + {0x0360, "tildedoublecmb"}, + {0x223c, "tildeoperator"}, + {0x0334, "tildeoverlaycmb"}, + {0x033e, "tildeverticalcmb"}, + {0x2297, "timescircle"}, + {0x0596, "tipehahebrew"}, + {0x0596, "tipehalefthebrew"}, + {0x0a70, "tippigurmukhi"}, + {0x0483, "titlocyrilliccmb"}, + {0x057f, "tiwnarmenian"}, + {0x1e6f, "tlinebelow"}, + {0xff54, "tmonospace"}, + {0x0569, "toarmenian"}, + {0x3068, "tohiragana"}, + {0x30c8, "tokatakana"}, + {0xff84, "tokatakanahalfwidth"}, + {0x02e5, "tonebarextrahighmod"}, + {0x02e9, "tonebarextralowmod"}, + {0x02e6, "tonebarhighmod"}, + {0x02e8, "tonebarlowmod"}, + {0x02e7, "tonebarmidmod"}, + {0x01bd, "tonefive"}, + {0x0185, "tonesix"}, + {0x01a8, "tonetwo"}, {0x0384, "tonos"}, + {0x3327, "tonsquare"}, + {0x0e0f, "topatakthai"}, + {0x3014, "tortoiseshellbracketleft"}, + {0xfe5d, "tortoiseshellbracketleftsmall"}, + {0xfe39, "tortoiseshellbracketleftvertical"}, + {0x3015, "tortoiseshellbracketright"}, + {0xfe5e, "tortoiseshellbracketrightsmall"}, + {0xfe3a, "tortoiseshellbracketrightvertical"}, + {0x0e15, "totaothai"}, + {0x01ab, "tpalatalhook"}, + {0x24af, "tparen"}, {0x2122, "trademark"}, - {0x2122, "trademarksans"}, - {0x2122, "trademarkserif"}, + {0xf8ea, "trademarksans"}, + {0xf6db, "trademarkserif"}, + {0x0288, "tretroflexhook"}, {0x25bc, "triagdn"}, {0x25c4, "triaglf"}, {0x25ba, "triagrt"}, {0x25b2, "triagup"}, + {0x02a6, "ts"}, + {0x05e6, "tsadi"}, + {0xfb46, "tsadidagesh"}, + {0xfb46, "tsadidageshhebrew"}, + {0x05e6, "tsadihebrew"}, + {0x0446, "tsecyrillic"}, + {0x05b5, "tsere"}, + {0x05b5, "tsere12"}, + {0x05b5, "tsere1e"}, + {0x05b5, "tsere2b"}, + {0x05b5, "tserehebrew"}, + {0x05b5, "tserenarrowhebrew"}, + {0x05b5, "tserequarterhebrew"}, + {0x05b5, "tserewidehebrew"}, + {0x045b, "tshecyrillic"}, {0xf6f3, "tsuperior"}, + {0x099f, "ttabengali"}, + {0x091f, "ttadeva"}, + {0x0a9f, "ttagujarati"}, + {0x0a1f, "ttagurmukhi"}, + {0x0679, "tteharabic"}, + {0xfb67, "ttehfinalarabic"}, + {0xfb68, "ttehinitialarabic"}, + {0xfb69, "ttehmedialarabic"}, + {0x09a0, "tthabengali"}, + {0x0920, "tthadeva"}, + {0x0aa0, "tthagujarati"}, + {0x0a20, "tthagurmukhi"}, + {0x0287, "tturned"}, + {0x3064, "tuhiragana"}, + {0x30c4, "tukatakana"}, + {0xff82, "tukatakanahalfwidth"}, + {0x3063, "tusmallhiragana"}, + {0x30c3, "tusmallkatakana"}, + {0xff6f, "tusmallkatakanahalfwidth"}, + {0x246b, "twelvecircle"}, + {0x247f, "twelveparen"}, + {0x2493, "twelveperiod"}, + {0x217b, "twelveroman"}, + {0x2473, "twentycircle"}, + {0x5344, "twentyhangzhou"}, + {0x2487, "twentyparen"}, + {0x249b, "twentyperiod"}, {0x0032, "two"}, + {0x0662, "twoarabic"}, + {0x09e8, "twobengali"}, + {0x2461, "twocircle"}, + {0x278b, "twocircleinversesansserif"}, + {0x0968, "twodeva"}, {0x2025, "twodotenleader"}, + {0x2025, "twodotleader"}, + {0xfe30, "twodotleadervertical"}, + {0x0ae8, "twogujarati"}, + {0x0a68, "twogurmukhi"}, + {0x0662, "twohackarabic"}, + {0x3022, "twohangzhou"}, + {0x3221, "twoideographicparen"}, {0x2082, "twoinferior"}, + {0xff12, "twomonospace"}, + {0x09f5, "twonumeratorbengali"}, {0xf732, "twooldstyle"}, + {0x2475, "twoparen"}, + {0x2489, "twoperiod"}, + {0x06f2, "twopersian"}, + {0x2171, "tworoman"}, + {0x01bb, "twostroke"}, {0x00b2, "twosuperior"}, + {0x0e52, "twothai"}, {0x2154, "twothirds"}, {0x0075, "u"}, {0x00fa, "uacute"}, + {0x0289, "ubar"}, + {0x0989, "ubengali"}, + {0x3128, "ubopomofo"}, {0x016d, "ubreve"}, + {0x01d4, "ucaron"}, + {0x24e4, "ucircle"}, {0x00fb, "ucircumflex"}, + {0x1e77, "ucircumflexbelow"}, + {0x0443, "ucyrillic"}, + {0x0951, "udattadeva"}, + {0x0171, "udblacute"}, + {0x0215, "udblgrave"}, + {0x0909, "udeva"}, {0x00fc, "udieresis"}, + {0x01d8, "udieresisacute"}, + {0x1e73, "udieresisbelow"}, + {0x01da, "udieresiscaron"}, + {0x04f1, "udieresiscyrillic"}, + {0x01dc, "udieresisgrave"}, + {0x01d6, "udieresismacron"}, + {0x1ee5, "udotbelow"}, {0x00f9, "ugrave"}, + {0x0a89, "ugujarati"}, + {0x0a09, "ugurmukhi"}, + {0x3046, "uhiragana"}, + {0x1ee7, "uhookabove"}, {0x01b0, "uhorn"}, + {0x1ee9, "uhornacute"}, + {0x1ef1, "uhorndotbelow"}, + {0x1eeb, "uhorngrave"}, + {0x1eed, "uhornhookabove"}, + {0x1eef, "uhorntilde"}, {0x0171, "uhungarumlaut"}, + {0x04f3, "uhungarumlautcyrillic"}, + {0x0217, "uinvertedbreve"}, + {0x30a6, "ukatakana"}, + {0xff73, "ukatakanahalfwidth"}, + {0x0479, "ukcyrillic"}, + {0x315c, "ukorean"}, {0x016b, "umacron"}, + {0x04ef, "umacroncyrillic"}, + {0x1e7b, "umacrondieresis"}, + {0x0a41, "umatragurmukhi"}, + {0xff55, "umonospace"}, {0x005f, "underscore"}, {0x2017, "underscoredbl"}, + {0xff3f, "underscoremonospace"}, + {0xfe33, "underscorevertical"}, + {0xfe4f, "underscorewavy"}, {0x222a, "union"}, {0x2200, "universal"}, {0x0173, "uogonek"}, + {0x24b0, "uparen"}, {0x2580, "upblock"}, + {0x05c4, "upperdothebrew"}, {0x03c5, "upsilon"}, {0x03cb, "upsilondieresis"}, {0x03b0, "upsilondieresistonos"}, + {0x028a, "upsilonlatin"}, {0x03cd, "upsilontonos"}, + {0x031d, "uptackbelowcmb"}, + {0x02d4, "uptackmod"}, + {0x0a73, "uragurmukhi"}, {0x016f, "uring"}, + {0x045e, "ushortcyrillic"}, + {0x3045, "usmallhiragana"}, + {0x30a5, "usmallkatakana"}, + {0xff69, "usmallkatakanahalfwidth"}, + {0x04af, "ustraightcyrillic"}, + {0x04b1, "ustraightstrokecyrillic"}, {0x0169, "utilde"}, + {0x1e79, "utildeacute"}, + {0x1e75, "utildebelow"}, + {0x098a, "uubengali"}, + {0x090a, "uudeva"}, + {0x0a8a, "uugujarati"}, + {0x0a0a, "uugurmukhi"}, + {0x0a42, "uumatragurmukhi"}, + {0x09c2, "uuvowelsignbengali"}, + {0x0942, "uuvowelsigndeva"}, + {0x0ac2, "uuvowelsigngujarati"}, + {0x09c1, "uvowelsignbengali"}, + {0x0941, "uvowelsigndeva"}, + {0x0ac1, "uvowelsigngujarati"}, {0x0076, "v"}, + {0x0935, "vadeva"}, + {0x0ab5, "vagujarati"}, + {0x0a35, "vagurmukhi"}, + {0x30f7, "vakatakana"}, + {0x05d5, "vav"}, + {0xfb35, "vavdagesh"}, + {0xfb35, "vavdagesh65"}, + {0xfb35, "vavdageshhebrew"}, + {0x05d5, "vavhebrew"}, + {0xfb4b, "vavholam"}, + {0xfb4b, "vavholamhebrew"}, + {0x05f0, "vavvavhebrew"}, + {0x05f1, "vavyodhebrew"}, + {0x24e5, "vcircle"}, + {0x1e7f, "vdotbelow"}, + {0x0432, "vecyrillic"}, + {0x06a4, "veharabic"}, + {0xfb6b, "vehfinalarabic"}, + {0xfb6c, "vehinitialarabic"}, + {0xfb6d, "vehmedialarabic"}, + {0x30f9, "vekatakana"}, + {0x2640, "venus"}, + {0x007c, "verticalbar"}, + {0x030d, "verticallineabovecmb"}, + {0x0329, "verticallinebelowcmb"}, + {0x02cc, "verticallinelowmod"}, + {0x02c8, "verticallinemod"}, + {0x057e, "vewarmenian"}, + {0x028b, "vhook"}, + {0x30f8, "vikatakana"}, + {0x09cd, "viramabengali"}, + {0x094d, "viramadeva"}, + {0x0acd, "viramagujarati"}, + {0x0983, "visargabengali"}, + {0x0903, "visargadeva"}, + {0x0a83, "visargagujarati"}, + {0xff56, "vmonospace"}, + {0x0578, "voarmenian"}, + {0x309e, "voicediterationhiragana"}, + {0x30fe, "voicediterationkatakana"}, + {0x309b, "voicedmarkkana"}, + {0xff9e, "voicedmarkkanahalfwidth"}, + {0x30fa, "vokatakana"}, + {0x24b1, "vparen"}, + {0x1e7d, "vtilde"}, + {0x028c, "vturned"}, + {0x3094, "vuhiragana"}, + {0x30f4, "vukatakana"}, {0x0077, "w"}, {0x1e83, "wacute"}, + {0x3159, "waekorean"}, + {0x308f, "wahiragana"}, + {0x30ef, "wakatakana"}, + {0xff9c, "wakatakanahalfwidth"}, + {0x3158, "wakorean"}, + {0x308e, "wasmallhiragana"}, + {0x30ee, "wasmallkatakana"}, + {0x3357, "wattosquare"}, + {0x301c, "wavedash"}, + {0xfe34, "wavyunderscorevertical"}, + {0x0648, "wawarabic"}, + {0xfeee, "wawfinalarabic"}, + {0x0624, "wawhamzaabovearabic"}, + {0xfe86, "wawhamzaabovefinalarabic"}, + {0x33dd, "wbsquare"}, + {0x24e6, "wcircle"}, {0x0175, "wcircumflex"}, {0x1e85, "wdieresis"}, + {0x1e87, "wdotaccent"}, + {0x1e89, "wdotbelow"}, + {0x3091, "wehiragana"}, {0x2118, "weierstrass"}, + {0x30f1, "wekatakana"}, + {0x315e, "wekorean"}, + {0x315d, "weokorean"}, {0x1e81, "wgrave"}, + {0x25e6, "whitebullet"}, + {0x25cb, "whitecircle"}, + {0x25d9, "whitecircleinverse"}, + {0x300e, "whitecornerbracketleft"}, + {0xfe43, "whitecornerbracketleftvertical"}, + {0x300f, "whitecornerbracketright"}, + {0xfe44, "whitecornerbracketrightvertical"}, + {0x25c7, "whitediamond"}, + {0x25c8, "whitediamondcontainingblacksmalldiamond"}, + {0x25bf, "whitedownpointingsmalltriangle"}, + {0x25bd, "whitedownpointingtriangle"}, + {0x25c3, "whiteleftpointingsmalltriangle"}, + {0x25c1, "whiteleftpointingtriangle"}, + {0x3016, "whitelenticularbracketleft"}, + {0x3017, "whitelenticularbracketright"}, + {0x25b9, "whiterightpointingsmalltriangle"}, + {0x25b7, "whiterightpointingtriangle"}, + {0x25ab, "whitesmallsquare"}, + {0x263a, "whitesmilingface"}, + {0x25a1, "whitesquare"}, + {0x2606, "whitestar"}, + {0x260f, "whitetelephone"}, + {0x3018, "whitetortoiseshellbracketleft"}, + {0x3019, "whitetortoiseshellbracketright"}, + {0x25b5, "whiteuppointingsmalltriangle"}, + {0x25b3, "whiteuppointingtriangle"}, + {0x3090, "wihiragana"}, + {0x30f0, "wikatakana"}, + {0x315f, "wikorean"}, + {0xff57, "wmonospace"}, + {0x3092, "wohiragana"}, + {0x30f2, "wokatakana"}, + {0xff66, "wokatakanahalfwidth"}, + {0x20a9, "won"}, + {0xffe6, "wonmonospace"}, + {0x0e27, "wowaenthai"}, + {0x24b2, "wparen"}, + {0x1e98, "wring"}, + {0x02b7, "wsuperior"}, + {0x028d, "wturned"}, + {0x01bf, "wynn"}, {0x0078, "x"}, + {0x033d, "xabovecmb"}, + {0x3112, "xbopomofo"}, + {0x24e7, "xcircle"}, + {0x1e8d, "xdieresis"}, + {0x1e8b, "xdotaccent"}, + {0x056d, "xeharmenian"}, {0x03be, "xi"}, + {0xff58, "xmonospace"}, + {0x24b3, "xparen"}, + {0x02e3, "xsuperior"}, {0x0079, "y"}, + {0x334e, "yaadosquare"}, + {0x09af, "yabengali"}, {0x00fd, "yacute"}, + {0x092f, "yadeva"}, + {0x3152, "yaekorean"}, + {0x0aaf, "yagujarati"}, + {0x0a2f, "yagurmukhi"}, + {0x3084, "yahiragana"}, + {0x30e4, "yakatakana"}, + {0xff94, "yakatakanahalfwidth"}, + {0x3151, "yakorean"}, + {0x0e4e, "yamakkanthai"}, + {0x3083, "yasmallhiragana"}, + {0x30e3, "yasmallkatakana"}, + {0xff6c, "yasmallkatakanahalfwidth"}, + {0x0463, "yatcyrillic"}, + {0x24e8, "ycircle"}, {0x0177, "ycircumflex"}, {0x00ff, "ydieresis"}, + {0x1e8f, "ydotaccent"}, + {0x1ef5, "ydotbelow"}, + {0x064a, "yeharabic"}, + {0x06d2, "yehbarreearabic"}, + {0xfbaf, "yehbarreefinalarabic"}, + {0xfef2, "yehfinalarabic"}, + {0x0626, "yehhamzaabovearabic"}, + {0xfe8a, "yehhamzaabovefinalarabic"}, + {0xfe8b, "yehhamzaaboveinitialarabic"}, + {0xfe8c, "yehhamzaabovemedialarabic"}, + {0xfef3, "yehinitialarabic"}, + {0xfef4, "yehmedialarabic"}, + {0xfcdd, "yehmeeminitialarabic"}, + {0xfc58, "yehmeemisolatedarabic"}, + {0xfc94, "yehnoonfinalarabic"}, + {0x06d1, "yehthreedotsbelowarabic"}, + {0x3156, "yekorean"}, {0x00a5, "yen"}, + {0xffe5, "yenmonospace"}, + {0x3155, "yeokorean"}, + {0x3186, "yeorinhieuhkorean"}, + {0x05aa, "yerahbenyomohebrew"}, + {0x05aa, "yerahbenyomolefthebrew"}, + {0x044b, "yericyrillic"}, + {0x04f9, "yerudieresiscyrillic"}, + {0x3181, "yesieungkorean"}, + {0x3183, "yesieungpansioskorean"}, + {0x3182, "yesieungsioskorean"}, + {0x059a, "yetivhebrew"}, {0x1ef3, "ygrave"}, + {0x01b4, "yhook"}, + {0x1ef7, "yhookabove"}, + {0x0575, "yiarmenian"}, + {0x0457, "yicyrillic"}, + {0x3162, "yikorean"}, + {0x262f, "yinyang"}, + {0x0582, "yiwnarmenian"}, + {0xff59, "ymonospace"}, + {0x05d9, "yod"}, + {0xfb39, "yoddagesh"}, + {0xfb39, "yoddageshhebrew"}, + {0x05d9, "yodhebrew"}, + {0x05f2, "yodyodhebrew"}, + {0xfb1f, "yodyodpatahhebrew"}, + {0x3088, "yohiragana"}, + {0x3189, "yoikorean"}, + {0x30e8, "yokatakana"}, + {0xff96, "yokatakanahalfwidth"}, + {0x315b, "yokorean"}, + {0x3087, "yosmallhiragana"}, + {0x30e7, "yosmallkatakana"}, + {0xff6e, "yosmallkatakanahalfwidth"}, + {0x03f3, "yotgreek"}, + {0x3188, "yoyaekorean"}, + {0x3187, "yoyakorean"}, + {0x0e22, "yoyakthai"}, + {0x0e0d, "yoyingthai"}, + {0x24b4, "yparen"}, + {0x037a, "ypogegrammeni"}, + {0x0345, "ypogegrammenigreekcmb"}, + {0x01a6, "yr"}, + {0x1e99, "yring"}, + {0x02b8, "ysuperior"}, + {0x1ef9, "ytilde"}, + {0x028e, "yturned"}, + {0x3086, "yuhiragana"}, + {0x318c, "yuikorean"}, + {0x30e6, "yukatakana"}, + {0xff95, "yukatakanahalfwidth"}, + {0x3160, "yukorean"}, + {0x046b, "yusbigcyrillic"}, + {0x046d, "yusbigiotifiedcyrillic"}, + {0x0467, "yuslittlecyrillic"}, + {0x0469, "yuslittleiotifiedcyrillic"}, + {0x3085, "yusmallhiragana"}, + {0x30e5, "yusmallkatakana"}, + {0xff6d, "yusmallkatakanahalfwidth"}, + {0x318b, "yuyekorean"}, + {0x318a, "yuyeokorean"}, + {0x09df, "yyabengali"}, + {0x095f, "yyadeva"}, {0x007a, "z"}, + {0x0566, "zaarmenian"}, {0x017a, "zacute"}, + {0x095b, "zadeva"}, + {0x0a5b, "zagurmukhi"}, + {0x0638, "zaharabic"}, + {0xfec6, "zahfinalarabic"}, + {0xfec7, "zahinitialarabic"}, + {0x3056, "zahiragana"}, + {0xfec8, "zahmedialarabic"}, + {0x0632, "zainarabic"}, + {0xfeb0, "zainfinalarabic"}, + {0x30b6, "zakatakana"}, + {0x0595, "zaqefgadolhebrew"}, + {0x0594, "zaqefqatanhebrew"}, + {0x0598, "zarqahebrew"}, + {0x05d6, "zayin"}, + {0xfb36, "zayindagesh"}, + {0xfb36, "zayindageshhebrew"}, + {0x05d6, "zayinhebrew"}, + {0x3117, "zbopomofo"}, {0x017e, "zcaron"}, + {0x24e9, "zcircle"}, + {0x1e91, "zcircumflex"}, + {0x0291, "zcurl"}, + {0x017c, "zdot"}, {0x017c, "zdotaccent"}, + {0x1e93, "zdotbelow"}, + {0x0437, "zecyrillic"}, + {0x0499, "zedescendercyrillic"}, + {0x04df, "zedieresiscyrillic"}, + {0x305c, "zehiragana"}, + {0x30bc, "zekatakana"}, {0x0030, "zero"}, + {0x0660, "zeroarabic"}, + {0x09e6, "zerobengali"}, + {0x0966, "zerodeva"}, + {0x0ae6, "zerogujarati"}, + {0x0a66, "zerogurmukhi"}, + {0x0660, "zerohackarabic"}, {0x2080, "zeroinferior"}, + {0xff10, "zeromonospace"}, {0xf730, "zerooldstyle"}, + {0x06f0, "zeropersian"}, {0x2070, "zerosuperior"}, + {0x0e50, "zerothai"}, + {0xfeff, "zerowidthjoiner"}, + {0x200c, "zerowidthnonjoiner"}, + {0x200b, "zerowidthspace"}, {0x03b6, "zeta"}, + {0x3113, "zhbopomofo"}, + {0x056a, "zhearmenian"}, + {0x04c2, "zhebrevecyrillic"}, + {0x0436, "zhecyrillic"}, + {0x0497, "zhedescendercyrillic"}, + {0x04dd, "zhedieresiscyrillic"}, + {0x3058, "zihiragana"}, + {0x30b8, "zikatakana"}, + {0x05ae, "zinorhebrew"}, + {0x1e95, "zlinebelow"}, + {0xff5a, "zmonospace"}, + {0x305e, "zohiragana"}, + {0x30be, "zokatakana"}, + {0x24b5, "zparen"}, + {0x0290, "zretroflexhook"}, + {0x01b6, "zstroke"}, + {0x305a, "zuhiragana"}, + {0x30ba, "zukatakana"}, {0x007b, "{"}, {0x007c, "|"}, {0x007d, "}"}, diff -Nru poppler-0.18.4/poppler/Object.cc poppler-0.20.5/poppler/Object.cc --- poppler-0.18.4/poppler/Object.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/Object.cc 2012-05-10 20:05:44.000000000 +0000 @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2008, 2010 Albert Astals Cid +// Copyright (C) 2008, 2010, 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -38,7 +38,7 @@ // Object //------------------------------------------------------------------------ -static char *objTypeNames[numObjTypes] = { +static const char *objTypeNames[numObjTypes] = { "boolean", "integer", "real", @@ -52,7 +52,8 @@ "cmd", "error", "eof", - "none" + "none", + "unsigned integer" }; #ifdef DEBUG_MEM @@ -115,9 +116,9 @@ return obj; } -Object *Object::fetch(XRef *xref, Object *obj, std::set *fetchOriginatorNums) { +Object *Object::fetch(XRef *xref, Object *obj, int recursion) { return (type == objRef && xref) ? - xref->fetch(ref.num, ref.gen, obj, fetchOriginatorNums) : copy(obj); + xref->fetch(ref.num, ref.gen, obj, recursion) : copy(obj); } void Object::free() { @@ -155,7 +156,7 @@ type = objNone; } -char *Object::getTypeName() { +const char *Object::getTypeName() { return objTypeNames[type]; } diff -Nru poppler-0.18.4/poppler/Object.h poppler-0.20.5/poppler/Object.h --- poppler-0.18.4/poppler/Object.h 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/Object.h 2012-09-09 21:28:51.000000000 +0000 @@ -17,6 +17,7 @@ // Copyright (C) 2008 Kees Cook // Copyright (C) 2008, 2010 Albert Astals Cid // Copyright (C) 2009 Jakub Wilk +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -41,15 +42,15 @@ #define OBJECT_TYPE_CHECK(wanted_type) \ if (unlikely(type != wanted_type)) { \ - error(0, (char *) "Call to Object where the object was type %d, " \ - "not the expected type %d", type, wanted_type); \ + error(errInternal, 0, (char *) "Call to Object where the object was type {0:d}, " \ + "not the expected type {1:d}", type, wanted_type); \ abort(); \ } #define OBJECT_2TYPES_CHECK(wanted_type1, wanted_type2) \ if (unlikely(type != wanted_type1) && unlikely(type != wanted_type2)) { \ - error(0, (char *) "Call to Object where the object was type %d, " \ - "not the expected type %d or %d", type, wanted_type1, wanted_type2); \ + error(errInternal, 0, (char *) "Call to Object where the object was type {0:d}, " \ + "not the expected type {1:d} or {2:d}", type, wanted_type1, wanted_type2); \ abort(); \ } @@ -126,7 +127,7 @@ { initObj(objReal); real = realA; return this; } Object *initString(GooString *stringA) { initObj(objString); string = stringA; return this; } - Object *initName(char *nameA) + Object *initName(const char *nameA) { initObj(objName); name = copyString(nameA); return this; } Object *initNull() { initObj(objNull); return this; } @@ -154,7 +155,7 @@ // If object is a Ref, fetch and return the referenced object. // Otherwise, return a copy of the object. - Object *fetch(XRef *xref, Object *obj, std::set *fetchOriginatorNums = NULL); + Object *fetch(XRef *xref, Object *obj, int recursion = 0); // Free object contents. void free(); @@ -179,11 +180,11 @@ GBool isUint() { return type == objUint; } // Special type checking. - GBool isName(char *nameA) + GBool isName(const char *nameA) { return type == objName && !strcmp(name, nameA); } - GBool isDict(char *dictType); + GBool isDict(const char *dictType); GBool isStream(char *dictType); - GBool isCmd(char *cmdA) + GBool isCmd(const char *cmdA) { return type == objCmd && !strcmp(cmd, cmdA); } // Accessors. @@ -205,16 +206,17 @@ // Array accessors. int arrayGetLength(); void arrayAdd(Object *elem); + void arrayRemove(int i); Object *arrayGet(int i, Object *obj); Object *arrayGetNF(int i, Object *obj); // Dict accessors. int dictGetLength(); void dictAdd(char *key, Object *val); - void dictSet(char *key, Object *val); - GBool dictIs(char *dictType); - Object *dictLookup(char *key, Object *obj, std::set *fetchOriginatorNums = NULL); - Object *dictLookupNF(char *key, Object *obj); + void dictSet(const char *key, Object *val); + GBool dictIs(const char *dictType); + Object *dictLookup(const char *key, Object *obj, int recursion = 0); + Object *dictLookupNF(const char *key, Object *obj); char *dictGetKey(int i); Object *dictGetVal(int i, Object *obj); Object *dictGetValNF(int i, Object *obj); @@ -232,7 +234,7 @@ Dict *streamGetDict(); // Output. - char *getTypeName(); + const char *getTypeName(); void print(FILE *f = stdout); // Memory testing. @@ -273,6 +275,9 @@ inline void Object::arrayAdd(Object *elem) { OBJECT_TYPE_CHECK(objArray); array->add(elem); } +inline void Object::arrayRemove(int i) + { OBJECT_TYPE_CHECK(objArray); array->remove(i); } + inline Object *Object::arrayGet(int i, Object *obj) { OBJECT_TYPE_CHECK(objArray); return array->get(i, obj); } @@ -291,19 +296,19 @@ inline void Object::dictAdd(char *key, Object *val) { OBJECT_TYPE_CHECK(objDict); dict->add(key, val); } -inline void Object::dictSet(char *key, Object *val) +inline void Object::dictSet(const char *key, Object *val) { OBJECT_TYPE_CHECK(objDict); dict->set(key, val); } -inline GBool Object::dictIs(char *dictType) +inline GBool Object::dictIs(const char *dictType) { OBJECT_TYPE_CHECK(objDict); return dict->is(dictType); } -inline GBool Object::isDict(char *dictType) +inline GBool Object::isDict(const char *dictType) { return type == objDict && dictIs(dictType); } -inline Object *Object::dictLookup(char *key, Object *obj, std::set *fetchOriginatorNums) - { OBJECT_TYPE_CHECK(objDict); return dict->lookup(key, obj, fetchOriginatorNums); } +inline Object *Object::dictLookup(const char *key, Object *obj, int recursion) + { OBJECT_TYPE_CHECK(objDict); return dict->lookup(key, obj, recursion); } -inline Object *Object::dictLookupNF(char *key, Object *obj) +inline Object *Object::dictLookupNF(const char *key, Object *obj) { OBJECT_TYPE_CHECK(objDict); return dict->lookupNF(key, obj); } inline char *Object::dictGetKey(int i) diff -Nru poppler-0.18.4/poppler/OptionalContent.cc poppler-0.20.5/poppler/OptionalContent.cc --- poppler-0.18.4/poppler/OptionalContent.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/OptionalContent.cc 2012-05-10 20:05:44.000000000 +0000 @@ -25,6 +25,14 @@ // #include "PDFDocEncoding.h" #include "OptionalContent.h" +// Max depth of nested visibility expressions. This is used to catch +// infinite loops in the visibility expression object structure. +#define visibilityExprRecursionLimit 50 + +// Max depth of nested display nodes. This is used to catch infinite +// loops in the "Order" object structure. +#define displayNodeRecursionLimit 50 + //------------------------------------------------------------------------ OCGs::OCGs(Object *ocgObject, XRef *xref) : @@ -33,11 +41,12 @@ // we need to parse the dictionary here, and build optionalContentGroups ok = gTrue; optionalContentGroups = new GooList(); + display = NULL; Object ocgList; ocgObject->dictLookup("OCGs", &ocgList); if (!ocgList.isArray()) { - error(-1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array"); + error(errSyntaxError, -1, "Expected the optional content group list, but wasn't able to find it, or it isn't an Array"); ocgList.free(); ok = gFalse; return; @@ -65,7 +74,7 @@ Object defaultOcgConfig; ocgObject->dictLookup("D", &defaultOcgConfig); if (!defaultOcgConfig.isDict()) { - error(-1, "Expected the default config, but wasn't able to find it, or it isn't a Dictionary"); + error(errSyntaxError, -1, "Expected the default config, but wasn't able to find it, or it isn't a Dictionary"); defaultOcgConfig.free(); ocgList.free(); ok = gFalse; @@ -99,7 +108,7 @@ OptionalContentGroup *group = findOcgByRef( reference.getRef() ); reference.free(); if (!group) { - error(-1, "Couldn't find group for reference"); + error(errSyntaxWarning, -1, "Couldn't find group for reference"); break; } group->setState(OptionalContentGroup::On); @@ -122,7 +131,7 @@ OptionalContentGroup *group = findOcgByRef( reference.getRef() ); reference.free(); if (!group) { - error(-1, "Couldn't find group for reference to set OFF"); + error(errSyntaxWarning, -1, "Couldn't find group for reference to set OFF"); break; } group->setState(OptionalContentGroup::Off); @@ -141,6 +150,8 @@ { deleteGooList(optionalContentGroups, OptionalContentGroup); order.free(); + if (display) + delete display; rbgroups.free(); } @@ -161,12 +172,21 @@ } } - error(-1, "Could not find a OCG with Ref (%d:%d)", ref.num, ref.gen); - // not found return NULL; } +OCDisplayNode *OCGs::getDisplayRoot() +{ + if (display) + return display; + + if (order.isArray()) + display = OCDisplayNode::parse(&order, this, m_xref); + + return display; +} + bool OCGs::optContentIsVisible( Object *dictRef ) { Object dictObj; @@ -174,10 +194,21 @@ Object dictType; Object ocg; Object policy; + Object ve; bool result = true; + + if (dictRef->isNull()) + return result; + + if (dictRef->isRef()) { + OptionalContentGroup *oc = findOcgByRef(dictRef->getRef()); + if (oc) + return oc->getState() == OptionalContentGroup::On; + } + dictRef->fetch( m_xref, &dictObj ); if ( ! dictObj.isDict() ) { - error(-1, "Unexpected oc reference target: %i", dictObj.getType() ); + error(errSyntaxWarning, -1, "Unexpected oc reference target: {0:d}", dictObj.getType() ); dictObj.free(); return result; } @@ -185,32 +216,34 @@ // printf("checking if optContent is visible\n"); dict->lookup("Type", &dictType); if (dictType.isName("OCMD")) { - // If we supported Visibility Expressions, we'd check - // for a VE entry, and then call out to the parser here... - // printf("found OCMD dict\n"); - dict->lookup("P", &policy); - dict->lookupNF("OCGs", &ocg); - if (ocg.isArray()) { - if (policy.isName("AllOn")) { - result = allOn( ocg.getArray() ); - } else if (policy.isName("AllOff")) { - result = allOff( ocg.getArray() ); - } else if (policy.isName("AnyOff")) { - result = anyOff( ocg.getArray() ); - } else if ( (!policy.isName()) || (policy.isName("AnyOn") ) ) { - // this is the default - result = anyOn( ocg.getArray() ); - } - } else if (ocg.isRef()) { - OptionalContentGroup* oc = findOcgByRef( ocg.getRef() ); - if ( oc && oc->getState() == OptionalContentGroup::Off ) { - result = false; - } else { - result = true ; + if (dict->lookup("VE", &ve)->isArray()) { + result = evalOCVisibilityExpr(&ve, 0); + } else { + dict->lookupNF("OCGs", &ocg); + if (ocg.isArray()) { + dict->lookup("P", &policy); + if (policy.isName("AllOn")) { + result = allOn( ocg.getArray() ); + } else if (policy.isName("AllOff")) { + result = allOff( ocg.getArray() ); + } else if (policy.isName("AnyOff")) { + result = anyOff( ocg.getArray() ); + } else if ( (!policy.isName()) || (policy.isName("AnyOn") ) ) { + // this is the default + result = anyOn( ocg.getArray() ); + } + policy.free(); + } else if (ocg.isRef()) { + OptionalContentGroup *oc = findOcgByRef( ocg.getRef() ); + if ( oc && oc->getState() == OptionalContentGroup::Off ) { + result = false; + } else { + result = true ; + } } + ocg.free(); } - ocg.free(); - policy.free(); + ve.free(); } else if ( dictType.isName("OCG") ) { OptionalContentGroup* oc = findOcgByRef( dictRef->getRef() ); if ( oc && oc->getState() == OptionalContentGroup::Off ) { @@ -223,6 +256,64 @@ return result; } +GBool OCGs::evalOCVisibilityExpr(Object *expr, int recursion) { + OptionalContentGroup *ocg; + Object expr2, op, obj; + GBool ret; + int i; + + if (recursion > visibilityExprRecursionLimit) { + error(errSyntaxError, -1, + "Loop detected in optional content visibility expression"); + return gTrue; + } + if (expr->isRef()) { + if ((ocg = findOcgByRef(expr->getRef()))) { + return ocg->getState() == OptionalContentGroup::On; + } + } + expr->fetch(m_xref, &expr2); + if (!expr2.isArray() || expr2.arrayGetLength() < 1) { + error(errSyntaxError, -1, + "Invalid optional content visibility expression"); + expr2.free(); + return gTrue; + } + expr2.arrayGet(0, &op); + if (op.isName("Not")) { + if (expr2.arrayGetLength() == 2) { + expr2.arrayGetNF(1, &obj); + ret = !evalOCVisibilityExpr(&obj, recursion + 1); + obj.free(); + } else { + error(errSyntaxError, -1, + "Invalid optional content visibility expression"); + ret = gTrue; + } + } else if (op.isName("And")) { + ret = gTrue; + for (i = 1; i < expr2.arrayGetLength() && ret; ++i) { + expr2.arrayGetNF(i, &obj); + ret = evalOCVisibilityExpr(&obj, recursion + 1); + obj.free(); + } + } else if (op.isName("Or")) { + ret = gFalse; + for (i = 1; i < expr2.arrayGetLength() && !ret; ++i) { + expr2.arrayGetNF(i, &obj); + ret = evalOCVisibilityExpr(&obj, recursion + 1); + obj.free(); + } + } else { + error(errSyntaxError, -1, + "Invalid optional content visibility expression"); + ret = gTrue; + } + op.free(); + expr2.free(); + return ret; +} + bool OCGs::allOn( Array *ocgArray ) { for (int i = 0; i < ocgArray->getLength(); ++i) { @@ -287,14 +378,42 @@ OptionalContentGroup::OptionalContentGroup(Dict *ocgDict) : m_name(NULL) { + Object obj1, obj2, obj3; Object ocgName; ocgDict->lookup("Name", &ocgName); if (!ocgName.isString()) { - error(-1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String"); + error(errSyntaxWarning, -1, "Expected the name of the OCG, but wasn't able to find it, or it isn't a String"); } else { m_name = new GooString( ocgName.getString() ); } ocgName.free(); + + viewState = printState = ocUsageUnset; + if (ocgDict->lookup("Usage", &obj1)->isDict()) { + if (obj1.dictLookup("View", &obj2)->isDict()) { + if (obj2.dictLookup("ViewState", &obj3)->isName()) { + if (obj3.isName("ON")) { + viewState = ocUsageOn; + } else { + viewState = ocUsageOff; + } + } + obj3.free(); + } + obj2.free(); + if (obj1.dictLookup("Print", &obj2)->isDict()) { + if (obj2.dictLookup("PrintState", &obj3)->isName()) { + if (obj3.isName("ON")) { + printState = ocUsageOn; + } else { + printState = ocUsageOff; + } + } + obj3.free(); + } + obj2.free(); + } + obj1.free(); } OptionalContentGroup::OptionalContentGroup(GooString *label) @@ -323,3 +442,112 @@ delete m_name; } +//------------------------------------------------------------------------ + +OCDisplayNode *OCDisplayNode::parse(Object *obj, OCGs *oc, + XRef *xref, int recursion) { + Object obj2, obj3; + OptionalContentGroup *ocgA; + OCDisplayNode *node, *child; + int i; + + if (recursion > displayNodeRecursionLimit) { + error(errSyntaxError, -1, "Loop detected in optional content order"); + return NULL; + } + if (obj->isRef()) { + if ((ocgA = oc->findOcgByRef(obj->getRef()))) { + return new OCDisplayNode(ocgA); + } + } + obj->fetch(xref, &obj2); + if (!obj2.isArray()) { + obj2.free(); + return NULL; + } + i = 0; + if (obj2.arrayGetLength() >= 1) { + if (obj2.arrayGet(0, &obj3)->isString()) { + node = new OCDisplayNode(obj3.getString()); + i = 1; + } else { + node = new OCDisplayNode(); + } + obj3.free(); + } else { + node = new OCDisplayNode(); + } + for (; i < obj2.arrayGetLength(); ++i) { + obj2.arrayGetNF(i, &obj3); + if ((child = OCDisplayNode::parse(&obj3, oc, xref, recursion + 1))) { + if (!child->ocg && !child->name && node->getNumChildren() > 0) { + node->getChild(node->getNumChildren() - 1)->addChildren(child->takeChildren()); + delete child; + } else { + node->addChild(child); + } + } + obj3.free(); + } + obj2.free(); + return node; +} + +OCDisplayNode::OCDisplayNode() { + name = NULL; + ocg = NULL; + children = NULL; +} + +OCDisplayNode::OCDisplayNode(GooString *nameA) { + name = new GooString(nameA); + ocg = NULL; + children = NULL; +} + +OCDisplayNode::OCDisplayNode(OptionalContentGroup *ocgA) { + name = (ocgA->getName()) ? ocgA->getName()->copy() : NULL; + ocg = ocgA; + children = NULL; +} + +void OCDisplayNode::addChild(OCDisplayNode *child) { + if (!children) { + children = new GooList(); + } + children->append(child); +} + +void OCDisplayNode::addChildren(GooList *childrenA) { + if (!children) { + children = new GooList(); + } + children->append(childrenA); + delete childrenA; +} + +GooList *OCDisplayNode::takeChildren() { + GooList *childrenA; + + childrenA = children; + children = NULL; + return childrenA; +} + +OCDisplayNode::~OCDisplayNode() { + gfree(name); + if (children) { + deleteGooList(children, OCDisplayNode); + } +} + +int OCDisplayNode::getNumChildren() { + if (!children) { + return 0; + } + return children->getLength(); +} + +OCDisplayNode *OCDisplayNode::getChild(int idx) { + return (OCDisplayNode *)children->get(idx); +} diff -Nru poppler-0.18.4/poppler/OptionalContent.h poppler-0.20.5/poppler/OptionalContent.h --- poppler-0.18.4/poppler/OptionalContent.h 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/OptionalContent.h 2012-05-10 20:05:44.000000000 +0000 @@ -23,7 +23,8 @@ class GooList; class XRef; -class OptionalContentGroup; +class OptionalContentGroup; +class OCDisplayNode; //------------------------------------------------------------------------ @@ -41,6 +42,10 @@ OptionalContentGroup* findOcgByRef( const Ref &ref); + // Get the root node of the optional content group display tree + // (which does not necessarily include all of the OCGs). + OCDisplayNode *getDisplayRoot(); + Array* getOrderArray() { return (order.isArray() && order.arrayGetLength() > 0) ? order.getArray() : NULL; } Array* getRBGroupsArray() @@ -50,7 +55,8 @@ private: GBool ok; - + + GBool evalOCVisibilityExpr(Object *expr, int recursion); bool allOn( Array *ocgArray ); bool allOff( Array *ocgArray ); bool anyOn( Array *ocgArray ); @@ -61,6 +67,7 @@ Object order; Object rbgroups; XRef *m_xref; + OCDisplayNode *display; // root node of display tree }; //------------------------------------------------------------------------ @@ -69,6 +76,13 @@ public: enum State { On, Off }; + // Values from the optional content usage dictionary. + enum UsageState { + ocUsageOn, + ocUsageOff, + ocUsageUnset + }; + OptionalContentGroup(Dict *dict); OptionalContentGroup(GooString *label); @@ -83,11 +97,44 @@ State getState() { return m_state; }; void setState(State state) { m_state = state; }; + UsageState getViewState() { return viewState; } + UsageState getPrintState() { return printState; } + private: XRef *xref; GooString *m_name; Ref m_ref; - State m_state; + State m_state; + UsageState viewState; // suggested state when viewing + UsageState printState; // suggested state when printing +}; + +//------------------------------------------------------------------------ + +class OCDisplayNode { +public: + + static OCDisplayNode *parse(Object *obj, OCGs *oc, XRef *xref, int recursion = 0); + OCDisplayNode(); + ~OCDisplayNode(); + + GooString *getName() { return name; } + OptionalContentGroup *getOCG() { return ocg; } + int getNumChildren(); + OCDisplayNode *getChild(int idx); + +private: + + OCDisplayNode(GooString *nameA); + OCDisplayNode(OptionalContentGroup *ocgA); + void addChild(OCDisplayNode *child); + void addChildren(GooList *childrenA); + GooList *takeChildren(); + + GooString *name; // display name (may be NULL) + OptionalContentGroup *ocg; // NULL for display labels + GooList *children; // NULL if there are no children + // [OCDisplayNode] }; #endif diff -Nru poppler-0.18.4/poppler/OutputDev.cc poppler-0.20.5/poppler/OutputDev.cc --- poppler-0.18.4/poppler/OutputDev.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/OutputDev.cc 2012-05-10 20:05:44.000000000 +0000 @@ -17,7 +17,8 @@ // Copyright (C) 2006 Thorkild Stray // Copyright (C) 2007 Adrian Johnson // Copyright (C) 2009 Carlos Garcia Campos -// Copyright (C) 2009 Albert Astals Cid +// Copyright (C) 2009, 2012 Albert Astals Cid +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -108,6 +109,17 @@ } } +void OutputDev::setSoftMaskFromImageMask(GfxState *state, + Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix) { + drawImageMask(state, ref, str, width, height, invert, gFalse, inlineImg); +} + +void OutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { + return; +} + void OutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) { @@ -172,7 +184,7 @@ profileHash = new GooHash (true); } - + GooHash *OutputDev::endProfile() { GooHash *profile = profileHash; diff -Nru poppler-0.18.4/poppler/OutputDev.h poppler-0.20.5/poppler/OutputDev.h --- poppler-0.18.4/poppler/OutputDev.h 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/OutputDev.h 2012-08-15 13:31:38.000000000 +0000 @@ -17,10 +17,11 @@ // Copyright (C) 2006 Thorkild Stray // Copyright (C) 2007 Jeff Muizelaar // Copyright (C) 2007, 2011 Adrian Johnson -// Copyright (C) 2009-2011 Thomas Freitag +// Copyright (C) 2009-2012 Thomas Freitag // Copyright (C) 2009, 2011 Carlos Garcia Campos -// Copyright (C) 2009 Albert Astals Cid +// Copyright (C) 2009, 2012 Albert Astals Cid // Copyright (C) 2010 Christian Feuersnger +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -39,10 +40,12 @@ #include "CharTypes.h" #include "Object.h" +class Annot; class Dict; class GooHash; class GooString; class GfxState; +class Gfx; struct GfxColor; class GfxColorSpace; class GfxImageColorMap; @@ -105,16 +108,9 @@ // Does this device need non-text content? virtual GBool needNonText() { return gTrue; } - // If current colorspace ist pattern, - // does this device support text in pattern colorspace? - // Default is false - virtual GBool supportTextCSPattern(GfxState * /*state*/) { return gFalse; } - - // If current colorspace ist pattern, - // need this device special handling for masks in pattern colorspace? - // Default is false - virtual GBool fillMaskCSPattern(GfxState * /*state*/) { return gFalse; } - virtual void endMaskClip(GfxState * /*state*/) {} + // Does this device require incCharCount to be called for text on + // non-shown layers? + virtual GBool needCharCount() { return gFalse; } //----- initialization and control @@ -128,9 +124,11 @@ virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog * catalog, + GBool printing, GBool (* abortCheckCbk)(void *data) = NULL, - void * abortCheckCbkData = NULL) + void * abortCheckCbkData = NULL, + GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, + void *annotDisplayDecideCbkData = NULL) { return gTrue; } // Start a page. @@ -191,12 +189,14 @@ virtual void updateHorizScaling(GfxState * /*state*/) {} virtual void updateTextPos(GfxState * /*state*/) {} virtual void updateTextShift(GfxState * /*state*/, double /*shift*/) {} + virtual void saveTextPos(GfxState * /*state*/) {} + virtual void restoreTextPos(GfxState * /*state*/) {} //----- path painting virtual void stroke(GfxState * /*state*/) {} virtual void fill(GfxState * /*state*/) {} virtual void eoFill(GfxState * /*state*/) {} - virtual GBool tilingPatternFill(GfxState * /*state*/, Catalog * /*cat*/, Object * /*str*/, + virtual GBool tilingPatternFill(GfxState * /*state*/, Gfx * /*gfx*/, Catalog * /*cat*/, Object * /*str*/, double * /*pmat*/, int /*paintType*/, int /*tilingType*/, Dict * /*resDict*/, double * /*mat*/, double * /*bbox*/, int /*x0*/, int /*y0*/, int /*x1*/, int /*y1*/, @@ -240,11 +240,19 @@ virtual void beginTextObject(GfxState * /*state*/) {} virtual GBool deviceHasTextClip(GfxState * /*state*/) { return gFalse; } virtual void endTextObject(GfxState * /*state*/) {} + virtual void incCharCount(int /*nChars*/) {} + virtual void beginActualText(GfxState * /*state*/, GooString * /*text*/ ) {} + virtual void endActualText(GfxState * /*state*/) {} //----- image drawing virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg); + virtual void setSoftMaskFromImageMask(GfxState *state, + Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix); + virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg); @@ -268,8 +276,8 @@ virtual void beginMarkedContent(char *name, Dict *properties); virtual void markPoint(char *name); virtual void markPoint(char *name, Dict *properties); - - + + #if OPI_SUPPORT //----- OPI functions @@ -294,6 +302,7 @@ virtual GooHash *endProfile(); //----- transparency groups and soft masks + virtual GBool checkTransparencyGroup(GfxState * /*state*/, GBool /*knockout*/) { return gTrue; } virtual void beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, @@ -305,7 +314,7 @@ virtual void clearSoftMask(GfxState * /*state*/) {} //----- links - virtual void processLink(AnnotLink * /*link*/, Catalog * /*catalog*/) {} + virtual void processLink(AnnotLink * /*link*/) {} #if 1 //~tmp: turn off anti-aliasing temporarily virtual GBool getVectorAntialias() { return gFalse; } diff -Nru poppler-0.18.4/poppler/PDFDoc.cc poppler-0.20.5/poppler/PDFDoc.cc --- poppler-0.18.4/poppler/PDFDoc.cc 2012-01-15 14:07:06.000000000 +0000 +++ poppler-0.20.5/poppler/PDFDoc.cc 2012-09-15 18:34:03.000000000 +0000 @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005, 2006, 2008 Brad Hards -// Copyright (C) 2005, 2007-2009, 2011 Albert Astals Cid +// Copyright (C) 2005, 2007-2009, 2011, 2012 Albert Astals Cid // Copyright (C) 2008 Julien Rebetez // Copyright (C) 2008, 2010 Pino Toscano // Copyright (C) 2008, 2010, 2011 Carlos Garcia Campos @@ -27,6 +27,7 @@ // Copyright (C) 2010 Srinivas Adicherla // Copyright (C) 2010 Philip Lorenz // Copyright (C) 2011, 2012 Thomas Freitag +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -119,11 +120,22 @@ GooString *userPassword, void *guiDataA) { Object obj; int size = 0; +#ifdef _WIN32 + int n, i; +#endif init(); fileName = fileNameA; guiData = guiDataA; +#ifdef _WIN32 + n = fileName->getLength(); + fileNameU = (wchar_t *)gmallocn(n + 1, sizeof(wchar_t)); + for (i = 0; i < n; ++i) { + fileNameU[i] = (wchar_t)(fileName->getChar(i) & 0xff); + } + fileNameU[n] = L'\0'; +#endif struct stat buf; if (stat(fileName->getCString(), &buf) == 0) { @@ -141,8 +153,7 @@ // Keep a copy of the errno returned by fopen so that it can be // referred to later. fopenErrno = errno; - error(-1, "Couldn't open file '%s': %s.", fileName->getCString(), - strerror(errno)); + error(errIO, -1, "Couldn't open file '{0:t}': {0:s}.", fileName, strerror(errno)); errCode = errOpenFile; return; } @@ -158,7 +169,6 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword, GooString *userPassword, void *guiDataA) { OSVERSIONINFO version; - wchar_t fileName2[MAX_PATH + 1]; Object obj; int i; @@ -166,17 +176,15 @@ guiData = guiDataA; - //~ file name should be stored in Unicode (?) + // save both Unicode and 8-bit copies of the file name fileName = new GooString(); + fileNameU = (wchar_t *)gmallocn(fileNameLen + 1, sizeof(wchar_t)); for (i = 0; i < fileNameLen; ++i) { fileName->append((char)fileNameA[i]); + fileNameU[i] = fileNameA[i]; } + fileNameU[fileNameLen] = L'\0'; - // zero-terminate the file name string - for (i = 0; i < fileNameLen && i < MAX_PATH; ++i) { - fileName2[i] = fileNameA[i]; - } - fileName2[i] = 0; // try to open file // NB: _wfopen is only available in NT @@ -185,10 +193,10 @@ version.dwOSVersionInfoSize = sizeof(version); GetVersionEx(&version); if (version.dwPlatformId == VER_PLATFORM_WIN32_NT) { - if (_wstat(fileName2, &buf) == 0) { + if (_wstat(fileNameU, &buf) == 0) { size = buf.st_size; } - file = _wfopen(fileName2, L"rb"); + file = _wfopen(fileNameU, L"rb"); } else { if (_stat(fileName->getCString(), &buf) == 0) { size = buf.st_size; @@ -196,7 +204,7 @@ file = fopen(fileName->getCString(), "rb"); } if (!file) { - error(-1, "Couldn't open file '%s'", fileName->getCString()); + error(errIO, -1, "Couldn't open file '{0:t}'", fileName); errCode = errOpenFile; return; } @@ -211,13 +219,27 @@ PDFDoc::PDFDoc(BaseStream *strA, GooString *ownerPassword, GooString *userPassword, void *guiDataA) { +#ifdef _WIN32 + int n, i; +#endif init(); guiData = guiDataA; if (strA->getFileName()) { fileName = strA->getFileName()->copy(); +#ifdef _WIN32 + n = fileName->getLength(); + fileNameU = (wchar_t *)gmallocn(n + 1, sizeof(wchar_t)); + for (i = 0; i < n; ++i) { + fileNameU[i] = (wchar_t)(fileName->getChar(i) & 0xff); + } + fileNameU[n] = L'\0'; +#endif } else { fileName = NULL; +#ifdef _WIN32 + fileNameU = NULL; +#endif } str = strA; ok = setup(ownerPassword, userPassword); @@ -227,7 +249,7 @@ str->setPos(0, -1); if (str->getPos() < 0) { - error(-1, "Document base stream is not seekable"); + error(errSyntaxError, -1, "Document base stream is not seekable"); return gFalse; } @@ -245,7 +267,7 @@ // read xref table xref = new XRef(str, getStartXRef(), getMainXRefEntriesOffset(), &wasReconstructed); if (!xref->isOk()) { - error(-1, "Couldn't read xref table"); + error(errSyntaxError, -1, "Couldn't read xref table"); errCode = xref->getErrorCode(); return gFalse; } @@ -257,7 +279,7 @@ } // read catalog - catalog = new Catalog(xref); + catalog = new Catalog(this); if (catalog && !catalog->isOk()) { if (!wasReconstructed) { @@ -265,11 +287,11 @@ delete catalog; delete xref; xref = new XRef(str, 0, 0, NULL, true); - catalog = new Catalog(xref); + catalog = new Catalog(this); } if (catalog && !catalog->isOk()) { - error(-1, "Couldn't read page catalog"); + error(errSyntaxError, -1, "Couldn't read page catalog"); errCode = errBadCatalog; return gFalse; } @@ -315,6 +337,11 @@ if (fileName) { delete fileName; } +#ifdef _WIN32 + if (fileNameU) { + gfree(fileNameU); + } +#endif } @@ -343,7 +370,7 @@ } if (!found) { - error(-1, "Document has not the mandatory ending %%EOF"); + error(errSyntaxError, -1, "Document has not the mandatory ending %%EOF"); errCode = errDamaged; delete[] eof; return gFalse; @@ -373,12 +400,12 @@ } } if (i >= headerSearchSize - 5) { - error(-1, "May not be a PDF file (continuing anyway)"); + error(errSyntaxWarning, -1, "May not be a PDF file (continuing anyway)"); return; } str->moveStart(i); if (!(p = strtok_r(&hdrBuf[i+5], " \t\n\r", &tokptr))) { - error(-1, "May not be a PDF file (continuing anyway)"); + error(errSyntaxWarning, -1, "May not be a PDF file (continuing anyway)"); return; } sscanf(p, "%d.%d", &pdfMajorVersion, &pdfMinorVersion); @@ -393,7 +420,10 @@ xref->getTrailerDict()->dictLookup("Encrypt", &encrypt); if ((encrypted = encrypt.isDict())) { if ((secHdlr = SecurityHandler::make(this, &encrypt))) { - if (secHdlr->checkEncryption(ownerPassword, userPassword)) { + if (secHdlr->isUnencrypted()) { + // no encryption + ret = gTrue; + } else if (secHdlr->checkEncryption(ownerPassword, userPassword)) { // authorization succeeded xref->setEncryption(secHdlr->getPermissionFlags(), secHdlr->getOwnerPasswordOk(), @@ -432,7 +462,7 @@ if (getPage(page)) getPage(page)->display(out, hDPI, vDPI, - rotate, useMediaBox, crop, printing, catalog, + rotate, useMediaBox, crop, printing, abortCheckCbk, abortCheckCbkData, annotDisplayDecideCbk, annotDisplayDecideCbkData); @@ -466,7 +496,7 @@ getPage(page)->displaySlice(out, hDPI, vDPI, rotate, useMediaBox, crop, sliceX, sliceY, sliceW, sliceH, - printing, catalog, + printing, abortCheckCbk, abortCheckCbkData, annotDisplayDecideCbk, annotDisplayDecideCbkData); } @@ -476,12 +506,12 @@ if (!p) { return new Links (NULL); } - return p->getLinks(catalog); + return p->getLinks(); } void PDFDoc::processLinks(OutputDev *out, int page) { if (getPage(page)) - getPage(page)->processLinks(out, catalog); + getPage(page)->processLinks(out); } Linearization *PDFDoc::getLinearization() @@ -535,7 +565,7 @@ return gFalse; } } else { - error(-1, "Invalid permanent ID"); + error(errSyntaxError, -1, "Invalid permanent ID"); obj2.free(); return gFalse; } @@ -549,7 +579,7 @@ return gFalse; } } else { - error(-1, "Invalid update ID"); + error(errSyntaxError, -1, "Invalid update ID"); obj2.free(); return gFalse; } @@ -579,10 +609,10 @@ FILE *f; OutStream *outStr; XRef *yRef, *countRef; - int rootNum = getXRef()->getSize() + 1; + int rootNum = getXRef()->getNumObjects() + 1; if (pageNo < 1 || pageNo > getNumPages()) { - error(-1, "Illegal pageNo: %d(%d)", pageNo, getNumPages() ); + error(errInternal, -1, "Illegal pageNo: {0:d}({1:d})", pageNo, getNumPages() ); return errOpenFile; } PDFRectangle *cropBox = NULL; @@ -598,27 +628,48 @@ getXRef()->fetch(refPage->num, refPage->gen, &page); if (!(f = fopen(name->getCString(), "wb"))) { - error(-1, "Couldn't open file '%s'", name->getCString()); + error(errIO, -1, "Couldn't open file '{0:t}'", name); return errOpenFile; } outStr = new FileOutStream(f,0); - yRef = new XRef(); + yRef = new XRef(getXRef()->getTrailerDict()); countRef = new XRef(); yRef->add(0, 65535, 0, gFalse); writeHeader(outStr, getPDFMajorVersion(), getPDFMinorVersion()); - // get and mark optional content groups - OCGs *ocgs = getCatalog()->getOptContentConfig(); - if (ocgs != NULL) { - Object catDict, optContentProps; - getXRef()->getCatalog(&catDict); - catDict.dictLookup("OCProperties", &optContentProps); - Dict *pageDict = optContentProps.getDict(); - markPageObjects(pageDict, yRef, countRef, 0); - catDict.free(); - optContentProps.free(); + // get and mark info dict + Object infoObj; + getXRef()->getDocInfo(&infoObj); + if (infoObj.isDict()) { + Dict *infoDict = infoObj.getDict(); + markPageObjects(infoDict, yRef, countRef, 0); + Object *trailerObj = getXRef()->getTrailerDict(); + if (trailerObj->isDict()) { + Dict *trailerDict = trailerObj->getDict(); + Object ref; + trailerDict->lookupNF("Info", &ref); + if (ref.isRef()) { + yRef->add(ref.getRef().num, ref.getRef().gen, 0, gTrue); + if (getXRef()->getEntry(ref.getRef().num)->type == xrefEntryCompressed) { + yRef->getEntry(ref.getRef().num)->type = xrefEntryCompressed; + } + } + ref.free(); + } } + infoObj.free(); + + // get and mark output intents etc. + Object catObj, pagesObj, resourcesObj; + getXRef()->getCatalog(&catObj); + Dict *catDict = catObj.getDict(); + catDict->lookup("Pages", &pagesObj); + Dict *pagesDict = pagesObj.getDict(); + pagesDict->lookup("Resources", &resourcesObj); + if (resourcesObj.isDict()) + markPageObjects(resourcesObj.getDict(), yRef, countRef, 0); + markPageObjects(catDict, yRef, countRef, 0); Dict *pageDict = page.getDict(); markPageObjects(pageDict, yRef, countRef, 0); @@ -627,30 +678,33 @@ yRef->add(rootNum,0,outStr->getPos(),gTrue); outStr->printf("%d 0 obj\n", rootNum); outStr->printf("<< /Type /Catalog /Pages %d 0 R", rootNum + 1); - if (ocgs != NULL) { - Object catDict, optContentProps; - getXRef()->getCatalog(&catDict); - catDict.dictLookup("OCProperties", &optContentProps); - outStr->printf(" /OCProperties <<"); - Dict *pageDict = optContentProps.getDict(); - for (int n = 0; n < pageDict->getLength(); n++) { - if (n > 0) outStr->printf(" "); - const char *key = pageDict->getKey(n); - Object value; pageDict->getValNF(n, &value); + for (int j = 0; j < catDict->getLength(); j++) { + const char *key = catDict->getKey(j); + if (strcmp(key, "Type") != 0 && + strcmp(key, "Catalog") != 0 && + strcmp(key, "Pages") != 0) + { + if (j > 0) outStr->printf(" "); + Object value; catDict->getValNF(j, &value); outStr->printf("/%s ", key); writeObject(&value, NULL, outStr, getXRef(), 0); value.free(); } - outStr->printf(" >> "); - catDict.free(); - optContentProps.free(); } + catObj.free(); + pagesObj.free(); outStr->printf(">>\nendobj\n"); objectsCount++; yRef->add(rootNum + 1,0,outStr->getPos(),gTrue); outStr->printf("%d 0 obj\n", rootNum + 1); - outStr->printf("<< /Type /Pages /Kids [ %d 0 R ] /Count 1 >>\n", rootNum + 2); + outStr->printf("<< /Type /Pages /Kids [ %d 0 R ] /Count 1 ", rootNum + 2); + if (resourcesObj.isDict()) { + outStr->printf("/Resources "); + writeObject(&resourcesObj, NULL, outStr, getXRef(), 0); + resourcesObj.free(); + } + outStr->printf(">>\n"); outStr->printf("endobj\n"); objectsCount++; @@ -674,12 +728,14 @@ page.free(); Guint uxrefOffset = outStr->getPos(); - yRef->writeToFile(outStr, gFalse /* do not write unnecessary entries */); - Ref ref; ref.num = rootNum; ref.gen = 0; - writeTrailer(uxrefOffset, objectsCount, outStr, gFalse, 0, &ref, getXRef(), name->getCString(), outStr->getPos()); + Dict *trailerDict = createTrailerDict(objectsCount, gFalse, 0, &ref, getXRef(), + name->getCString(), uxrefOffset); + writeXRefTableTrailer(trailerDict, yRef, gFalse /* do not write unnecessary entries */, + uxrefOffset, outStr, getXRef()); + delete trailerDict; outStr->close(); fclose(f); @@ -695,7 +751,7 @@ int res; if (!(f = fopen(name->getCString(), "wb"))) { - error(-1, "Couldn't open file '%s'", name->getCString()); + error(errIO, -1, "Couldn't open file '{0:t}'", name); return errOpenFile; } outStr = new FileOutStream(f,0); @@ -756,7 +812,7 @@ int res; if (!(f = fopen(name->getCString(), "wb"))) { - error(-1, "Couldn't open file '%s'", name->getCString()); + error(errIO, -1, "Couldn't open file '{0:t}'", name); return errOpenFile; } @@ -800,26 +856,50 @@ continue; if (xref->getEntry(i)->updated) { //we have an updated object - Object obj1; Ref ref; ref.num = i; ref.gen = xref->getEntry(i)->type == xrefEntryCompressed ? 0 : xref->getEntry(i)->gen; - xref->fetch(ref.num, ref.gen, &obj1); - Guint offset = writeObject(&obj1, &ref, outStr); - uxref->add(ref.num, ref.gen, offset, gTrue); - obj1.free(); + if (xref->getEntry(i)->type != xrefEntryFree) { + Object obj1; + xref->fetch(ref.num, ref.gen, &obj1); + Guint offset = writeObject(&obj1, &ref, outStr); + uxref->add(ref.num, ref.gen, offset, gTrue); + obj1.free(); + } else { + uxref->add(ref.num, ref.gen, 0, gFalse); + } } } - if (uxref->getSize() == 0) { //we have nothing to update + if (uxref->getNumObjects() == 0) { //we have nothing to update delete uxref; return; } Guint uxrefOffset = outStr->getPos(); - uxref->writeToFile(outStr, gFalse /* do not write unnecessary entries */); - - writeTrailer(uxrefOffset, xref->getSize(), outStr, gTrue); + int numobjects = xref->getNumObjects(); + const char *fileNameA = fileName ? fileName->getCString() : NULL; + Ref rootRef, uxrefStreamRef; + rootRef.num = getXRef()->getRootNum(); + rootRef.gen = getXRef()->getRootGen(); + + // Output a xref stream if there is a xref stream already + GBool xRefStream = xref->isXRefStream(); + + if (xRefStream) { + // Append an entry for the xref stream itself + uxrefStreamRef.num = numobjects++; + uxrefStreamRef.gen = 0; + uxref->add(uxrefStreamRef.num, uxrefStreamRef.gen, uxrefOffset, gTrue); + } + + Dict *trailerDict = createTrailerDict(numobjects, gTrue, getStartXRef(), &rootRef, getXRef(), fileNameA, uxrefOffset); + if (xRefStream) { + writeXRefStreamTrailer(trailerDict, uxref, &uxrefStreamRef, uxrefOffset, outStr, getXRef()); + } else { + writeXRefTableTrailer(trailerDict, uxref, gFalse, uxrefOffset, outStr, getXRef()); + } + delete trailerDict; delete uxref; } @@ -856,13 +936,9 @@ } } Guint uxrefOffset = outStr->getPos(); - uxref->writeToFile(outStr, gTrue /* write all entries */); - - writeTrailer(uxrefOffset, uxref->getSize(), outStr, gFalse); - - + writeXRefTableTrailer(uxrefOffset, uxref, gTrue /* write all entries */, + uxref->getNumObjects(), outStr, gFalse /* complete rewrite */); delete uxref; - } void PDFDoc::writeDictionnary (Dict* dict, OutStream* outStr, XRef *xRef, Guint numOffset) @@ -895,7 +971,7 @@ Object obj1; str->getDict()->lookup("Length", &obj1); if (!obj1.isInt()) { - error (-1, "PDFDoc::writeRawStream, no Length in stream dict"); + error (errSyntaxError, -1, "PDFDoc::writeRawStream, no Length in stream dict"); return; } @@ -1055,7 +1131,7 @@ outStr->printf("none\r\n"); break; default: - error(-1,"Unhandled objType : %i, please report a bug with a testcase\r\n", obj->getType()); + error(errUnimplemented, -1,"Unhandled objType : {0:d}, please report a bug with a testcase\r\n", obj->getType()); break; } if (ref) @@ -1063,10 +1139,8 @@ return offset; } -void PDFDoc::writeTrailer(Guint uxrefOffset, int uxrefSize, - OutStream* outStr, GBool incrUpdate, - Guint startxRef, Ref *root, XRef *xRef, const char *fileName, - Guint fileSize) +Dict *PDFDoc::createTrailerDict(int uxrefSize, GBool incrUpdate, Guint startxRef, + Ref *root, XRef *xRef, const char *fileName, Guint fileSize) { Dict *trailerDict = new Dict(xRef); Object obj1; @@ -1074,7 +1148,6 @@ trailerDict->set("Size", &obj1); obj1.free(); - //build a new ID, as recommended in the reference, uses: // - current time // - file name @@ -1084,7 +1157,9 @@ char buffer[256]; sprintf(buffer, "%i", (int)time(NULL)); message.append(buffer); - message.append(fileName); + + if (fileName) + message.append(fileName); sprintf(buffer, "%i", fileSize); message.append(buffer); @@ -1104,7 +1179,7 @@ //calculate md5 digest Guchar digest[16]; - Decrypt::md5((Guchar*)message.getCString(), message.getLength(), digest); + md5((Guchar*)message.getCString(), message.getLength(), digest); obj1.initString(new GooString((const char*)digest, 16)); //create ID array @@ -1116,7 +1191,7 @@ //only update the second part of the array xRef->getTrailerDict()->getDict()->lookup("ID", &obj4); if (!obj4.isArray()) { - error(-1, "PDFDoc::writeTrailer original file's ID entry isn't an array. Trying to continue"); + error(errSyntaxWarning, -1, "PDFDoc::createTrailerDict original file's ID entry isn't an array. Trying to continue"); } else { //Get the first part of the ID obj4.arrayGet(0,&obj3); @@ -1148,24 +1223,44 @@ trailerDict->set("Info", &obj5); } } - + + return trailerDict; +} + +void PDFDoc::writeXRefTableTrailer(Dict *trailerDict, XRef *uxref, GBool writeAllEntries, Guint uxrefOffset, OutStream* outStr, XRef *xRef) +{ + uxref->writeTableToFile( outStr, writeAllEntries ); outStr->printf( "trailer\r\n"); writeDictionnary(trailerDict, outStr, xRef, 0); outStr->printf( "\r\nstartxref\r\n"); outStr->printf( "%i\r\n", uxrefOffset); outStr->printf( "%%%%EOF\r\n"); +} - delete trailerDict; +void PDFDoc::writeXRefStreamTrailer (Dict *trailerDict, XRef *uxref, Ref *uxrefStreamRef, Guint uxrefOffset, OutStream* outStr, XRef *xRef) +{ + GooString stmData; + + // Fill stmData and some trailerDict fields + uxref->writeStreamToBuffer(&stmData, trailerDict, xRef); + + // Create XRef stream object and write it + Object obj1; + MemStream *mStream = new MemStream( stmData.getCString(), 0, + stmData.getLength(), obj1.initDict(trailerDict) ); + writeObject(obj1.initStream(mStream), uxrefStreamRef, outStr, xRef, 0); + obj1.free(); + + outStr->printf( "startxref\r\n"); + outStr->printf( "%i\r\n", uxrefOffset); + outStr->printf( "%%%%EOF\r\n"); } -void PDFDoc::writeTrailer(Guint uxrefOffset, int uxrefSize, OutStream* outStr, GBool incrUpdate) +void PDFDoc::writeXRefTableTrailer(Guint uxrefOffset, XRef *uxref, GBool writeAllEntries, + int uxrefSize, OutStream* outStr, GBool incrUpdate) { - char *fileNameA; - if (fileName) - fileNameA = fileName->getCString(); - else - fileNameA = "streamwithoutfilename.pdf"; - // file size + const char *fileNameA = fileName ? fileName->getCString() : NULL; + // file size (doesn't include the trailer) unsigned int fileSize = 0; int c; str->reset(); @@ -1176,7 +1271,10 @@ Ref ref; ref.num = getXRef()->getRootNum(); ref.gen = getXRef()->getRootGen(); - writeTrailer(uxrefOffset, uxrefSize, outStr, incrUpdate, getStartXRef(), &ref, getXRef(), fileNameA, fileSize); + Dict * trailerDict = createTrailerDict(uxrefSize, incrUpdate, getStartXRef(), &ref, + getXRef(), fileNameA, fileSize); + writeXRefTableTrailer(trailerDict, uxref, writeAllEntries, uxrefOffset, outStr, getXRef()); + delete trailerDict; } void PDFDoc::writeHeader(OutStream *outStr, int major, int minor) @@ -1293,6 +1391,9 @@ cropBoxObj->arrayAdd(cllx); cropBoxObj->arrayAdd(clly); pageDict->add(copyString("CropBox"), cropBoxObj); + pageDict->add(copyString("TrimBox"), cropBoxObj); + } else { + pageDict->add(copyString("TrimBox"), mediaBoxObj); } Object *rotateObj = new Object(); rotateObj->initInt(rotate); @@ -1325,10 +1426,16 @@ void PDFDoc::markPageObjects(Dict *pageDict, XRef *xRef, XRef *countRef, Guint numOffset) { + pageDict->remove("Names"); + pageDict->remove("OpenAction"); + pageDict->remove("Outlines"); + pageDict->remove("StructTreeRoot"); + for (int n = 0; n < pageDict->getLength(); n++) { const char *key = pageDict->getKey(n); Object value; pageDict->getValNF(n, &value); - if (strcmp(key, "Parent") != 0) { + if (strcmp(key, "Parent") != 0 && + strcmp(key, "Pages") != 0) { markObject(&value, xRef, countRef, numOffset); } value.free(); @@ -1377,13 +1484,16 @@ } Guint PDFDoc::strToUnsigned(char *s) { - Guint x; + Guint x, d; char *p; - int i; x = 0; - for (p = s, i = 0; *p && isdigit(*p) && i < 10; ++p, ++i) { - x = 10 * x + (*p - '0'); + for (p = s; *p && isdigit(*p & 0xff); ++p) { + d = *p - '0'; + if (x > (UINT_MAX - d) / 10) { + break; + } + x = 10 * x + d; } return x; } @@ -1483,13 +1593,13 @@ pageRef.num = getHints()->getPageObjectNum(page); if (!pageRef.num) { - error(-1, "Failed to get object num from hint tables for page %d", page); + error(errSyntaxWarning, -1, "Failed to get object num from hint tables for page {0:d}", page); return NULL; } // check for bogus ref - this can happen in corrupted PDF files if (pageRef.num < 0 || pageRef.num >= xref->getNumObjects()) { - error(-1, "Invalid object num (%d) for page %d", pageRef.num, page); + error(errSyntaxWarning, -1, "Invalid object num ({0:d}) for page {1:d}", pageRef.num, page); return NULL; } @@ -1497,12 +1607,12 @@ xref->fetch(pageRef.num, pageRef.gen, &obj); if (!obj.isDict("Page")) { obj.free(); - error(-1, "Object (%d %d) is not a pageDict", pageRef.num, pageRef.gen); + error(errSyntaxWarning, -1, "Object ({0:d} {1:d}) is not a pageDict", pageRef.num, pageRef.gen); return NULL; } pageDict = obj.getDict(); - p = new Page(xref, page, pageDict, pageRef, + p = new Page(this, page, pageDict, pageRef, new PageAttrs(NULL, pageDict), catalog->getForm()); obj.free(); @@ -1526,7 +1636,7 @@ if (pageCache[page-1]) { return pageCache[page-1]; } else { - error(-1, "Failed parsing page %d using hint tables", page); + error(errSyntaxWarning, -1, "Failed parsing page {0:d} using hint tables", page); } } diff -Nru poppler-0.18.4/poppler/PDFDoc.h poppler-0.20.5/poppler/PDFDoc.h --- poppler-0.18.4/poppler/PDFDoc.h 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/PDFDoc.h 2012-09-08 16:07:00.000000000 +0000 @@ -23,6 +23,7 @@ // Copyright (C) 2010 Hib Eris // Copyright (C) 2010 Srinivas Adicherla // Copyright (C) 2011 Thomas Freitag +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -93,6 +94,9 @@ // Get file name. GooString *getFileName() { return fileName; } +#ifdef _WIN32 + wchar_t *getFileNameU() { return fileNameU; } +#endif // Get the linearization table. Linearization *getLinearization(); @@ -241,8 +245,14 @@ Guint writePageObjects(OutStream *outStr, XRef *xRef, Guint numOffset); static Guint writeObject (Object *obj, Ref *ref, OutStream* outStr, XRef *xref, Guint numOffset); static void writeHeader(OutStream *outStr, int major, int minor); - static void writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr, GBool incrUpdate, - Guint startxRef, Ref *root, XRef *xRef, const char *fileName, Guint fileSize); + + // Ownership goes to the caller + static Dict *createTrailerDict (int uxrefSize, GBool incrUpdate, Guint startxRef, + Ref *root, XRef *xRef, const char *fileName, Guint fileSize); + static void writeXRefTableTrailer (Dict *trailerDict, XRef *uxref, GBool writeAllEntries, + Guint uxrefOffset, OutStream* outStr, XRef *xRef); + static void writeXRefStreamTrailer (Dict *trailerDict, XRef *uxref, Ref *uxrefStreamRef, + Guint uxrefOffset, OutStream* outStr, XRef *xRef); private: // insert referenced objects in XRef @@ -257,7 +267,8 @@ { writeDictionnary(dict, outStr, getXRef(), 0); } static void writeStream (Stream* str, OutStream* outStr); static void writeRawStream (Stream* str, OutStream* outStr); - void writeTrailer (Guint uxrefOffset, int uxrefSize, OutStream* outStr, GBool incrUpdate); + void writeXRefTableTrailer (Guint uxrefOffset, XRef *uxref, GBool writeAllEntries, + int uxrefSize, OutStream* outStr, GBool incrUpdate); static void writeString (GooString* s, OutStream* outStr); void saveIncrementalUpdate (OutStream* outStr); void saveCompleteRewrite (OutStream* outStr); @@ -281,6 +292,9 @@ Guint strToUnsigned(char *s); GooString *fileName; +#ifdef _WIN32 + wchar_t *fileNameU; +#endif FILE *file; BaseStream *str; void *guiData; diff -Nru poppler-0.18.4/poppler/PDFDocEncoding.cc poppler-0.20.5/poppler/PDFDocEncoding.cc --- poppler-0.18.4/poppler/PDFDocEncoding.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/PDFDocEncoding.cc 2012-05-10 20:05:44.000000000 +0000 @@ -34,9 +34,9 @@ // undefined. Unicode pdfDocEncoding[256] = { - 0x0000, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 00 - 0xfffd, 0x0009, 0x000a, 0xfffd, 0x000c, 0x000d, 0xfffd, 0xfffd, - 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, 0xfffd, // 10 + 0x0000, 0x0001, 0x0002, 0x0003, 0x0004, 0x0005, 0x0006, 0x0007, // 00 + 0x0008, 0x0009, 0x000a, 0x000b, 0x000c, 0x000d, 0x000e, 0x000f, + 0x0010, 0x0011, 0x0012, 0x0013, 0x0014, 0x0015, 0x0016, 0x0017, // 10 0x02d8, 0x02c7, 0x02c6, 0x02d9, 0x02dd, 0x02db, 0x02da, 0x02dc, 0x0020, 0x0021, 0x0022, 0x0023, 0x0024, 0x0025, 0x0026, 0x0027, // 20 0x0028, 0x0029, 0x002a, 0x002b, 0x002c, 0x002d, 0x002e, 0x002f, diff -Nru poppler-0.18.4/poppler/PDFDocFactory.cc poppler-0.20.5/poppler/PDFDocFactory.cc --- poppler-0.18.4/poppler/PDFDocFactory.cc 2011-11-22 21:33:14.000000000 +0000 +++ poppler-0.20.5/poppler/PDFDocFactory.cc 2012-05-10 20:05:44.000000000 +0000 @@ -59,7 +59,7 @@ } } - error(-1, "Cannot handle URI '%s'.", uri.getCString()); + error(errInternal, -1, "Cannot handle URI '{0:t}'.", &uri); GooString *fileName = uri.copy(); return PDFDoc::ErrorPDFDoc(errOpenFile, fileName); } diff -Nru poppler-0.18.4/poppler/PSOutputDev.cc poppler-0.20.5/poppler/PSOutputDev.cc --- poppler-0.18.4/poppler/PSOutputDev.cc 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/PSOutputDev.cc 2012-09-25 22:52:19.000000000 +0000 @@ -20,12 +20,14 @@ // Copyright (C) 2007, 2008 Brad Hards // Copyright (C) 2008, 2009 Koji Otani // Copyright (C) 2008, 2010 Hib Eris -// Copyright (C) 2009-2011 Thomas Freitag +// Copyright (C) 2009-2012 Thomas Freitag // Copyright (C) 2009 Till Kamppeter // Copyright (C) 2009 Carlos Garcia Campos -// Copyright (C) 2009, 2011 William Bader +// Copyright (C) 2009, 2011, 2012 William Bader // Copyright (C) 2009 Kovid Goyal // Copyright (C) 2009-2011 Adrian Johnson +// Copyright (C) 2012 Fabio D'Urso +// Copyright (C) 2012 Lu Wang // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -46,6 +48,7 @@ #include #include "goo/GooString.h" #include "goo/GooList.h" +#include "goo/GooHash.h" #include "poppler-config.h" #include "GlobalParams.h" #include "Object.h" @@ -64,6 +67,7 @@ #include "XRef.h" #include "PreScanOutputDev.h" #include "FileSpec.h" +#include "CharCodeToUnicode.h" #if HAVE_SPLASH # include "splash/Splash.h" # include "splash/SplashBitmap.h" @@ -84,8 +88,8 @@ //------------------------------------------------------------------------ -// Resolution at which pages with transparency will be rasterized. -#define defaultSplashDPI 300 +// Max size of a slice when rasterizing pages, in pixels. +#define rasterizationSliceSize 20000000 //------------------------------------------------------------------------ // PostScript prolog and setup @@ -98,7 +102,7 @@ // ^ ^----- s=psLevel*Sep, n=psLevel* // +----- 1=psLevel1*, 2=psLevel2*, 3=psLevel3* -static char *prolog[] = { +static const char *prolog[] = { "/xpdf 75 dict def xpdf begin", "% PDF special state", "/pdfDictSize 15 def", @@ -111,16 +115,24 @@ " } for", "~123sn", "/pdfSetup {", - " 3 1 roll 2 array astore", " /setpagedevice where {", - " pop 3 dict begin", + " pop 2 dict begin", + " /Policies 1 dict dup begin /PageSize 6 def end def", + " { /Duplex true def } if", + " currentdict end setpagedevice", + " } {", + " pop", + " } ifelse", + "} def", + "/pdfSetupPaper {", + " 2 array astore", + " /setpagedevice where {", + " pop 2 dict begin", " /PageSize exch def", " /ImagingBBox null def", - " /Policies 1 dict dup begin /PageSize 3 def end def", - " { /Duplex true def } if", " currentdict end setpagedevice", " } {", - " pop pop", + " pop", " } ifelse", "} def", "~1sn", @@ -151,6 +163,8 @@ " /pdfStroke [0] def", " /pdfFillOP false def", " /pdfStrokeOP false def", + "~3sn", + " /pdfOPM false def", "~123sn", " /pdfLastFill false def", " /pdfLastStroke false def", @@ -243,6 +257,9 @@ " /pdfLastStroke true def /pdfLastFill false def", " } if", "} def", + "~3n", + "/opm { dup /pdfOPM exch def", + " /setoverprintmode where{pop setoverprintmode}{pop}ifelse } def", "~23n", "/cs { /pdfFillXform exch def dup /pdfFillCS exch def", " setcolorspace } def", @@ -274,6 +291,9 @@ " /pdfLastStroke true def /pdfLastFill false def", " } if", "} def", + "~3s", + "/opm { dup /pdfOPM exch def", + " /setoverprintmode where{pop setoverprintmode}{pop}ifelse } def", "~23s", "/k { 4 copy 4 array astore /pdfFill exch def setcmykcolor", " /pdfLastFill true def /pdfLastStroke false def } def", @@ -368,6 +388,12 @@ " pdfStrokeOP setoverprint", " } ifelse", " } if", + "~3sn", + " /pdfOPM where {", + " pop", + " pdfOPM /setoverprintmode where{pop setoverprintmode}{pop}ifelse ", + " } if", + "~23sn", "} def", "~123sn", "/cm { concat } def", @@ -408,82 +434,82 @@ "/Td { pdfTextMat transform moveto } def", "/Tm { /pdfTextMat exch def } def", "% text string operators", + "/xyshow where {", + " pop", + " /xyshow2 {", + " dup length array", + " 0 2 2 index length 1 sub {", + " 2 index 1 index 2 copy get 3 1 roll 1 add get", + " pdfTextMat dtransform", + " 4 2 roll 2 copy 6 5 roll put 1 add 3 1 roll dup 4 2 roll put", + " } for", + " exch pop", + " xyshow", + " } def", + "}{", + " /xyshow2 {", + " currentfont /FontType get 0 eq {", + " 0 2 3 index length 1 sub {", + " currentpoint 4 index 3 index 2 getinterval show moveto", + " 2 copy get 2 index 3 2 roll 1 add get", + " pdfTextMat dtransform rmoveto", + " } for", + " } {", + " 0 1 3 index length 1 sub {", + " currentpoint 4 index 3 index 1 getinterval show moveto", + " 2 copy 2 mul get 2 index 3 2 roll 2 mul 1 add get", + " pdfTextMat dtransform rmoveto", + " } for", + " } ifelse", + " pop pop", + " } def", + "} ifelse", "/cshow where {", " pop", - " /cshow2 {", - " dup {", - " pop pop", - " 1 string dup 0 3 index put 3 index exec", + " /xycp {", // xycharpath + " 0 3 2 roll", + " {", + " pop pop currentpoint 3 2 roll", + " 1 string dup 0 4 3 roll put false charpath moveto", + " 2 copy get 2 index 2 index 1 add get", + " pdfTextMat dtransform rmoveto", + " 2 add", " } exch cshow", " pop pop", " } def", "}{", - " /cshow2 {", + " /xycp {", // xycharpath " currentfont /FontType get 0 eq {", - " 0 2 2 index length 1 sub {", - " 2 copy get exch 1 add 2 index exch get", - " 2 copy exch 256 mul add", - " 2 string dup 0 6 5 roll put dup 1 5 4 roll put", - " 3 index exec", + " 0 2 3 index length 1 sub {", + " currentpoint 4 index 3 index 2 getinterval false charpath moveto", + " 2 copy get 2 index 3 2 roll 1 add get", + " pdfTextMat dtransform rmoveto", " } for", " } {", - " dup {", - " 1 string dup 0 3 index put 3 index exec", - " } forall", + " 0 1 3 index length 1 sub {", + " currentpoint 4 index 3 index 1 getinterval false charpath moveto", + " 2 copy 2 mul get 2 index 3 2 roll 2 mul 1 add get", + " pdfTextMat dtransform rmoveto", + " } for", " } ifelse", " pop pop", " } def", "} ifelse", - "/awcp {", // awidthcharpath - " exch {", - " false charpath", - " 5 index 5 index rmoveto", - " 6 index eq { 7 index 7 index rmoveto } if", - " } exch cshow2", - " 6 {pop} repeat", - "} def", "/Tj {", " fCol", // because stringwidth has to draw Type 3 chars - " 1 index stringwidth pdfTextMat idtransform pop", - " sub 1 index length dup 0 ne { div } { pop pop 0 } ifelse", - " pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32", - " 4 3 roll pdfCharSpacing pdfHorizScaling mul add 0", - " pdfTextMat dtransform", - " 6 5 roll Tj1", - "} def", - "/Tj16 {", - " fCol", // because stringwidth has to draw Type 3 chars - " 2 index stringwidth pdfTextMat idtransform pop", - " sub exch div", - " pdfWordSpacing pdfHorizScaling mul 0 pdfTextMat dtransform 32", - " 4 3 roll pdfCharSpacing pdfHorizScaling mul add 0", - " pdfTextMat dtransform", - " 6 5 roll Tj1", - "} def", - "/Tj16V {", - " fCol", // because stringwidth has to draw Type 3 chars - " 2 index stringwidth pdfTextMat idtransform exch pop", - " sub exch div", - " 0 pdfWordSpacing pdfTextMat dtransform 32", - " 4 3 roll pdfCharSpacing add 0 exch", - " pdfTextMat dtransform", - " 6 5 roll Tj1", - "} def", - "/Tj1 {", " 0 pdfTextRise pdfTextMat dtransform rmoveto", - " currentpoint 8 2 roll", - " pdfTextRender 1 and 0 eq pdfPatternCS not and {", - " 6 copy awidthshow", + " currentpoint 4 2 roll", + " pdfTextRender 1 and 0 eq {", + " 2 copy xyshow2", " } if", " pdfTextRender 3 and dup 1 eq exch 2 eq or {", - " 7 index 7 index moveto", - " 6 copy", + " 3 index 3 index moveto", + " 2 copy", " currentfont /FontType get 3 eq { fCol } { sCol } ifelse", - " false awcp currentpoint stroke moveto", + " xycp currentpoint stroke moveto", " } if", - " pdfTextRender 4 and 0 ne pdfPatternCS or {", - " 8 6 roll moveto", - " false awcp", + " pdfTextRender 4 and 0 ne {", + " 4 2 roll moveto xycp", " /pdfTextClipPath [ pdfTextClipPath aload pop", " {/moveto cvx}", " {/lineto cvx}", @@ -492,13 +518,13 @@ " pathforall ] def", " currentpoint newpath moveto", " } {", - " 8 {pop} repeat", + " pop pop pop pop", " } ifelse", " 0 pdfTextRise neg pdfTextMat dtransform rmoveto", "} def", - "/TJm { pdfFontSize 0.001 mul mul neg 0", + "/TJm { 0.001 mul pdfFontSize mul pdfHorizScaling mul neg 0", " pdfTextMat dtransform rmoveto } def", - "/TJmV { pdfFontSize 0.001 mul mul neg 0 exch", + "/TJmV { 0.001 mul pdfFontSize mul neg 0 exch", " pdfTextMat dtransform rmoveto } def", "/Tclip { pdfTextClipPath cvx exec clip newpath", " /pdfTextClipPath [] def } def", @@ -546,19 +572,52 @@ " fCol /pdfImBuf1 4 index 7 add 8 idiv string def", " { currentfile pdfImBuf1 readstring pop } imagemask", "} def", + "/pdfImStr {", + " 2 copy exch length lt {", + " 2 copy get exch 1 add exch", + " } {", + " ()", + " } ifelse", + "} def", "/pdfImM1a {", - " { 2 copy get exch 1 add exch } imagemask", + " { pdfImStr } imagemask", " pop pop", "} def", "~23sn", - "% Level 2 image operators", + "% Level 2/3 image operators", "/pdfImBuf 100 string def", - "/pdfIm {", - " image", + "/pdfImStr {", + " 2 copy exch length lt {", + " 2 copy get exch 1 add exch", + " } {", + " ()", + " } ifelse", + "} def", + "/skipEOD {", " { currentfile pdfImBuf readline", " not { pop exit } if", " (%-EOD-) eq { exit } if } loop", "} def", + "/pdfIm { image skipEOD } def", + "~3sn", + "/pdfMask {", + " /ReusableStreamDecode filter", + " skipEOD", + " /maskStream exch def", + "} def", + "/pdfMaskEnd { maskStream closefile } def", + "/pdfMaskInit {", + " /maskArray exch def", + " /maskIdx 0 def", + "} def", + "/pdfMaskSrc {", + " maskIdx maskArray length lt {", + " maskArray maskIdx get", + " /maskIdx maskIdx 1 add def", + " } {", + " ()", + " } ifelse", + "} def", "~23s", "/pdfImSep {", " findcmykcustomcolor exch", @@ -574,17 +633,10 @@ " 255 exch sub put", " } for }", " 6 5 roll customcolorimage", - " { currentfile pdfImBuf readline", - " not { pop exit } if", - " (%-EOD-) eq { exit } if } loop", + " skipEOD", "} def", "~23sn", - "/pdfImM {", - " fCol imagemask", - " { currentfile pdfImBuf readline", - " not { pop exit } if", - " (%-EOD-) eq { exit } if } loop", - "} def", + "/pdfImM { fCol imagemask skipEOD } def", "~123sn", "/pr { 2 index 2 index 3 2 roll putinterval 4 add } def", "/pdfImClip {", @@ -751,7 +803,7 @@ NULL }; -static char *cmapProlog[] = { +static const char *cmapProlog[] = { "/CIDInit /ProcSet findresource begin", "10 dict begin", " begincmap", @@ -801,29 +853,16 @@ //------------------------------------------------------------------------ struct PSSubstFont { - char *psName; // PostScript name + const char *psName; // PostScript name double mWidth; // width of 'm' character }; -static const char *psFonts[] = { - "Courier", - "Courier-Bold", - "Courier-Oblique", - "Courier-BoldOblique", - "Helvetica", - "Helvetica-Bold", - "Helvetica-Oblique", - "Helvetica-BoldOblique", - "Symbol", - "Times-Roman", - "Times-Bold", - "Times-Italic", - "Times-BoldItalic", - "ZapfDingbats", - NULL -}; - -static const PSSubstFont psSubstFonts[] = { +// NB: must be in same order as base14SubstFonts in GfxFont.cc +static PSSubstFont psBase14SubstFonts[14] = { + {"Courier", 0.600}, + {"Courier-Oblique", 0.600}, + {"Courier-Bold", 0.600}, + {"Courier-BoldOblique", 0.600}, {"Helvetica", 0.833}, {"Helvetica-Oblique", 0.833}, {"Helvetica-Bold", 0.889}, @@ -832,16 +871,22 @@ {"Times-Italic", 0.722}, {"Times-Bold", 0.833}, {"Times-BoldItalic", 0.778}, - {"Courier", 0.600}, - {"Courier-Oblique", 0.600}, - {"Courier-Bold", 0.600}, - {"Courier-BoldOblique", 0.600} + // the last two are never used for substitution + {"Symbol", 0}, + {"ZapfDingbats", 0} +}; + +// Mapping from Type 1/1C font file to PS font name. +struct PST1FontName { + Ref fontFileID; + GooString *psName; // PostScript font name used for this + // embedded font file }; // Info for 8-bit fonts struct PSFont8Info { Ref fontID; - Gushort *codeToGID; // code-to-GID mapping for TrueType fonts + int *codeToGID; // code-to-GID mapping for TrueType fonts }; // Encoding info for substitute 16-bit font @@ -897,6 +942,13 @@ }; //------------------------------------------------------------------------ + +struct PSOutPaperSize { + PSOutPaperSize(int wA, int hA) { w = wA; h = hA; } + int w, h; +}; + +//------------------------------------------------------------------------ // DeviceNRecoder //------------------------------------------------------------------------ @@ -912,7 +964,7 @@ { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx++]; } virtual int lookChar() { return (bufIdx >= bufSize && !fillBuf()) ? EOF : buf[bufIdx]; } - virtual GooString *getPSFilter(int psLevel, char *indent) { return NULL; } + virtual GooString *getPSFilter(int psLevel, const char *indent) { return NULL; } virtual GBool isBinary(GBool last = gTrue) { return gTrue; } virtual GBool isEncoder() { return gTrue; } @@ -949,6 +1001,9 @@ if (imgStr) { delete imgStr; } + if (str->isEncoder()) { + delete str; + } } void DeviceNRecoder::reset() { @@ -990,17 +1045,19 @@ typedef void (*SignalFunc)(int); } -static void outputToFile(void *stream, char *data, int len) { +static void outputToFile(void *stream, const char *data, int len) { fwrite(data, 1, len, (FILE *)stream); } -PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *doc, XRef *xrefA, Catalog *catalog, +PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *doc, char *psTitle, int firstPage, int lastPage, PSOutMode modeA, int paperWidthA, int paperHeightA, GBool duplexA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, GBool forceRasterizeA, - GBool manualCtrlA) { + GBool manualCtrlA, + PSOutCustomCodeCbk customCodeCbkA, + void *customCodeCbkDataA) { FILE *f; PSFileType fileTypeA; @@ -1008,21 +1065,22 @@ underlayCbkData = NULL; overlayCbk = NULL; overlayCbkData = NULL; + customCodeCbk = customCodeCbkA; + customCodeCbkData = customCodeCbkDataA; fontIDs = NULL; - fontFileIDs = NULL; - fontFileNames = NULL; + fontNames = new GooHash(gTrue); + t1FontNames = NULL; font8Info = NULL; font16Enc = NULL; imgIDs = NULL; formIDs = NULL; xobjStack = NULL; + paperSizes = NULL; embFontList = NULL; customColors = NULL; haveTextClip = gFalse; - haveCSPattern = gFalse; t3String = NULL; - forceRasterize = forceRasterizeA; // open file or pipe @@ -1036,26 +1094,26 @@ signal(SIGPIPE, (SignalFunc)SIG_IGN); #endif if (!(f = popen(fileName + 1, "w"))) { - error(-1, "Couldn't run print command '%s'", fileName); + error(errIO, -1, "Couldn't run print command '{0:s}'", fileName); ok = gFalse; return; } #else - error(-1, "Print commands are not supported ('%s')", fileName); + error(errIO, -1, "Print commands are not supported ('{0:s}')", fileName); ok = gFalse; return; #endif } else { fileTypeA = psFile; if (!(f = fopen(fileName, "w"))) { - error(-1, "Couldn't open PostScript file '%s'", fileName); + error(errIO, -1, "Couldn't open PostScript file '{0:s}'", fileName); ok = gFalse; return; } } init(outputToFile, f, fileTypeA, psTitle, - doc, xrefA, catalog, firstPage, lastPage, modeA, + doc, firstPage, lastPage, modeA, imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA, paperWidthA, paperHeightA, duplexA); } @@ -1063,46 +1121,52 @@ PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, char *psTitle, PDFDoc *doc, - XRef *xrefA, Catalog *catalog, int firstPage, int lastPage, PSOutMode modeA, int paperWidthA, int paperHeightA, GBool duplexA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, GBool forceRasterizeA, - GBool manualCtrlA) { + GBool manualCtrlA, + PSOutCustomCodeCbk customCodeCbkA, + void *customCodeCbkDataA) { underlayCbk = NULL; underlayCbkData = NULL; overlayCbk = NULL; overlayCbkData = NULL; + customCodeCbk = customCodeCbkA; + customCodeCbkData = customCodeCbkDataA; fontIDs = NULL; - fontFileIDs = NULL; - fontFileNames = NULL; + fontNames = new GooHash(gTrue); + t1FontNames = NULL; font8Info = NULL; font16Enc = NULL; imgIDs = NULL; formIDs = NULL; xobjStack = NULL; + paperSizes = NULL; embFontList = NULL; customColors = NULL; haveTextClip = gFalse; - haveCSPattern = gFalse; t3String = NULL; - forceRasterize = forceRasterizeA; init(outputFuncA, outputStreamA, psGeneric, psTitle, - doc, xrefA, catalog, firstPage, lastPage, modeA, + doc, firstPage, lastPage, modeA, imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA, paperWidthA, paperHeightA, duplexA); } void PSOutputDev::init(PSOutputFunc outputFuncA, void *outputStreamA, - PSFileType fileTypeA, char *pstitle, PDFDoc *doc, XRef *xrefA, Catalog *catalog, + PSFileType fileTypeA, char *pstitle, PDFDoc *docA, int firstPage, int lastPage, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, GBool manualCtrlA, int paperWidthA, int paperHeightA, GBool duplexA) { + Catalog *catalog; PDFRectangle *box; + PSOutPaperSize *size; + GooList *names; + int pg, w, h, i; // initialize displayText = gTrue; @@ -1110,8 +1174,9 @@ outputFunc = outputFuncA; outputStream = outputStreamA; fileType = fileTypeA; - m_catalog = catalog; - xref = xrefA; + doc = docA; + xref = doc->getXRef(); + catalog = doc->getCatalog(); level = globalParams->getPSLevel(); mode = modeA; paperWidth = paperWidthA; @@ -1122,16 +1187,39 @@ imgURY = imgURYA; if (paperWidth < 0 || paperHeight < 0) { Page *page; - if ((page = doc->getPage(firstPage))) { - paperWidth = (int)ceil(page->getMediaWidth()); - paperHeight = (int)ceil(page->getMediaHeight()); - } else { - error(-1, "Invalid page %d", firstPage); - paperWidth = 1; - paperHeight = 1; + paperMatch = gTrue; + paperSizes = new GooList(); + paperWidth = paperHeight = 1; // in case the document has zero pages + for (pg = (firstPage >= 1) ? firstPage : 1; + pg <= lastPage && pg <= catalog->getNumPages(); + ++pg) { + page = catalog->getPage(pg); + if (page == NULL) { + paperMatch = gFalse; + break; + } + w = (int)ceil(page->getMediaWidth()); + h = (int)ceil(page->getMediaHeight()); + for (i = 0; i < paperSizes->getLength(); ++i) { + size = (PSOutPaperSize *)paperSizes->get(i); + if (size->w == w && size->h == h) { + break; + } + } + if (i == paperSizes->getLength()) { + paperSizes->append(new PSOutPaperSize(w, h)); + } + if (w > paperWidth) { + paperWidth = w; + } + if (h > paperHeight) { + paperHeight = h; + } } + // NB: img{LLX,LLY,URX,URY} will be set by startPage() + } else { + paperMatch = gFalse; } - substFonts = globalParams->getPSSubstFonts(); preload = globalParams->getPSPreload(); if (imgLLX == 0 && imgURX == 0 && imgLLY == 0 && imgURY == 0) { imgLLX = imgLLY = 0; @@ -1167,14 +1255,17 @@ fontIDSize = 64; fontIDLen = 0; fontIDs = (Ref *)gmallocn(fontIDSize, sizeof(Ref)); - fontFileIDSize = 64; - fontFileIDLen = 0; - fontFileIDs = (Ref *)gmallocn(fontFileIDSize, sizeof(Ref)); - fontFileNameSize = 64; - fontFileNameLen = 0; - fontFileNames = (GooString **)gmallocn(fontFileNameSize, sizeof(GooString *)); - psFileNames = (GooString **)gmallocn(fontFileNameSize, sizeof(GooString *)); - nextTrueTypeNum = 0; + for (i = 0; i < 14; ++i) { + fontNames->add(new GooString(psBase14SubstFonts[i].psName), 1); + } + names = globalParams->getPSResidentFonts(); + for (i = 0; i < names->getLength(); ++i) { + fontNames->add((GooString *)names->get(i), 1); + } + delete names; + t1FontNameSize = 64; + t1FontNameLen = 0; + t1FontNames = (PST1FontName *)gmallocn(t1FontNameSize, sizeof(PST1FontName)); font8InfoLen = 0; font8InfoSize = 0; font16EncLen = 0; @@ -1202,7 +1293,7 @@ page->getRotate(), pstitle); } else { - error(-1, "Invalid page %d", firstPage); + error(errSyntaxError, -1, "Invalid page {0:d}", firstPage); box = new PDFRectangle(0, 0, 1, 1); writeHeader(firstPage, lastPage, box, box, 0, pstitle); delete box; @@ -1252,20 +1343,21 @@ } #endif } + if (paperSizes) { + deleteGooList(paperSizes, PSOutPaperSize); + } if (embFontList) { delete embFontList; } if (fontIDs) { gfree(fontIDs); } - if (fontFileIDs) { - gfree(fontFileIDs); - } - if (fontFileNames) { - for (i = 0; i < fontFileNameLen; ++i) { - delete fontFileNames[i]; + delete fontNames; + if (t1FontNames) { + for (i = 0; i < t1FontNameLen; ++i) { + delete t1FontNames[i].psName; } - gfree(fontFileNames); + gfree(t1FontNames); } if (font8Info) { for (i = 0; i < font8InfoLen; ++i) { @@ -1273,16 +1365,11 @@ } gfree(font8Info); } - if (psFileNames) { - for (i = 0; i < fontFileNameLen; ++i) { - if (psFileNames[i]) - delete psFileNames[i]; - } - gfree(psFileNames); - } if (font16Enc) { for (i = 0; i < font16EncLen; ++i) { - delete font16Enc[i].enc; + if (font16Enc[i].enc) { + delete font16Enc[i].enc; + } } gfree(font16Enc); } @@ -1301,8 +1388,10 @@ void PSOutputDev::writeHeader(int firstPage, int lastPage, PDFRectangle *mediaBox, PDFRectangle *cropBox, int pageRotate, char *psTitle) { - double x1, y1, x2, y2; Object info, obj1; + PSOutPaperSize *size; + double x1, y1, x2, y2; + int i; switch (mode) { case psModePSOrigPageSizes: @@ -1344,14 +1433,24 @@ prevWidth = 0; prevHeight = 0; case psModePS: - writePSFmt("%%DocumentMedia: plain {0:d} {1:d} 0 () ()\n", - paperWidth, paperHeight); + if (paperMatch) { + for (i = 0; i < paperSizes->getLength(); ++i) { + size = (PSOutPaperSize *)paperSizes->get(i); + writePSFmt("%%{0:s} {1:d}x{2:d} {1:d} {2:d} 0 () ()\n", + i==0 ? "DocumentMedia:" : "+", size->w, size->h); + } + } else { + writePSFmt("%%DocumentMedia: plain {0:d} {1:d} 0 () ()\n", + paperWidth, paperHeight); + } writePSFmt("%%BoundingBox: 0 0 {0:d} {1:d}\n", paperWidth, paperHeight); writePSFmt("%%Pages: {0:d}\n", lastPage - firstPage + 1); writePS("%%EndComments\n"); - writePS("%%BeginDefaults\n"); - writePS("%%PageMedia: plain\n"); - writePS("%%EndDefaults\n"); + if (!paperMatch) { + writePS("%%BeginDefaults\n"); + writePS("%%PageMedia: plain\n"); + writePS("%%EndDefaults\n"); + } break; case psModeEPS: epsX1 = cropBox->x1; @@ -1393,8 +1492,8 @@ void PSOutputDev::writeXpdfProcset() { GBool lev1, lev2, lev3, sep, nonSep; - char **p; - char *q; + const char **p; + const char *q; writePSFmt("%%BeginResource: procset xpdf {0:s} 0\n", "3.00"); writePSFmt("%%Copyright: {0:s}\n", xpdfCopyright); @@ -1435,7 +1534,9 @@ Page *page; Dict *resDict; Annots *annots; - Object obj1, obj2; + Object *acroForm; + Object obj1, obj2, obj3; + GooString *s; int pg, i; if (mode == psModeForm) { @@ -1447,30 +1548,45 @@ for (pg = firstPage; pg <= lastPage; ++pg) { page = doc->getPage(pg); if (!page) { - error(-1, "Failed writing resources for page %d", pg); + error(errSyntaxError, -1, "Failed writing resources for page {0:d}", pg); continue; } if ((resDict = page->getResourceDict())) { setupResources(resDict); } - annots = new Annots(xref, catalog, page->getAnnots(&obj1)); - obj1.free(); + annots = page->getAnnots(); for (i = 0; i < annots->getNumAnnots(); ++i) { - if (annots->getAnnot(i)->getAppearance(&obj1)->isStream()) { - obj1.streamGetDict()->lookup("Resources", &obj2); - if (obj2.isDict()) { - setupResources(obj2.getDict()); + if (annots->getAnnot(i)->getAppearanceResDict(&obj1)->isDict()) { + setupResources(obj1.getDict()); + } + obj1.free(); + } + } + if ((acroForm = catalog->getAcroForm()) && acroForm->isDict()) { + if (acroForm->dictLookup("DR", &obj1)->isDict()) { + setupResources(obj1.getDict()); + } + obj1.free(); + if (acroForm->dictLookup("Fields", &obj1)->isArray()) { + for (i = 0; i < obj1.arrayGetLength(); ++i) { + if (obj1.arrayGet(i, &obj2)->isDict()) { + if (obj2.dictLookup("DR", &obj3)->isDict()) { + setupResources(obj3.getDict()); + } + obj3.free(); } obj2.free(); } - obj1.free(); } - delete annots; + obj1.free(); } if (mode != psModeForm) { if (mode != psModeEPS && !manualCtrl) { - writePSFmt("{0:d} {1:d} {2:s} pdfSetup\n", - paperWidth, paperHeight, duplexA ? "true" : "false"); + writePSFmt("{0:s} pdfSetup\n", + duplexA ? "true" : "false"); + if (!paperMatch) { + writePSFmt("{0:d} {1:d} pdfSetupPaper\n", paperWidth, paperHeight); + } } #if OPI_SUPPORT if (globalParams->getPSOPI()) { @@ -1478,6 +1594,13 @@ } #endif } + if (customCodeCbk) { + if ((s = (*customCodeCbk)(this, psOutCustomDocSetup, 0, + customCodeCbkData))) { + writePS(s->getCString()); + delete s; + } + } } void PSOutputDev::writePageTrailer() { @@ -1500,7 +1623,7 @@ writePS("%%DocumentProcessColors:"); if (processColors & psProcessCyan) { writePS(" Cyan"); - } + } if (processColors & psProcessMagenta) { writePS(" Magenta"); } @@ -1513,13 +1636,16 @@ writePS("\n"); writePS("%%DocumentCustomColors:"); for (cc = customColors; cc; cc = cc->next) { - writePSFmt(" ({0:s})", cc->name->getCString()); + writePS(" "); + writePSString(cc->name); } writePS("\n"); writePS("%%CMYKCustomColor:\n"); for (cc = customColors; cc; cc = cc->next) { - writePSFmt("%%+ {0:.4g} {1:.4g} {2:.4g} {3:.4g} ({4:t})\n", - cc->c, cc->m, cc->y, cc->k, cc->name); + writePSFmt("%%+ {0:.4g} {1:.4g} {2:.4g} {3:.4g} ", + cc->c, cc->m, cc->y, cc->k); + writePSString(cc->name); + writePS("\n"); } } } @@ -1629,8 +1755,6 @@ GfxFont *font; int i; - if (forceRasterize) return; - gfxFontDict = NULL; resDict->lookupNF("Font", &obj1); if (obj1.isRef()) { @@ -1655,20 +1779,16 @@ } void PSOutputDev::setupFont(GfxFont *font, Dict *parentResDict) { - Ref fontFileID; - GooString *name; - PSFontParam *fontParam; + GfxFontLoc *fontLoc; GooString *psName; char buf[16]; GBool subst; UnicodeMap *uMap; - char *charName; + const char *charName; double xs, ys; int code; double w1, w2; - double *fm; int i, j; - DisplayFontParam *dfp; // check if font is already set up for (i = 0; i < fontIDLen; ++i) { @@ -1685,205 +1805,164 @@ } fontIDs[fontIDLen++] = *font->getID(); + psName = NULL; xs = ys = 1; subst = gFalse; - // check for resident 8-bit font - if (font->getName() && - (fontParam = globalParams->getPSFont(font->getName()))) { - psName = new GooString(fontParam->psFontName->getCString()); - - // check for embedded Type 1 font - } else if (globalParams->getPSEmbedType1() && - font->getType() == fontType1 && - font->getEmbeddedFontID(&fontFileID) && - font->getEmbeddedFontName()) { - psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedType1Font(&fontFileID, psName); - - // check for embedded Type 1C font - } else if (globalParams->getPSEmbedType1() && - font->getType() == fontType1C && - font->getEmbeddedFontID(&fontFileID) && - font->getOrigName()) { - // use the PDF font name because the embedded font name might - // not include the subset prefix - psName = font->getOrigName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedType1CFont(font, &fontFileID, psName); - - // check for embedded OpenType - Type 1C font - } else if (globalParams->getPSEmbedType1() && - font->getType() == fontType1COT && - font->getEmbeddedFontID(&fontFileID) && - font->getOrigName()) { - // use the PDF font name because the embedded font name might - // not include the subset prefix - psName = font->getOrigName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedOpenTypeT1CFont(font, &fontFileID, psName); - - // check for external Type 1 font file - } else if (globalParams->getPSEmbedType1() && - font->getType() == fontType1 && - font->getExtFontFile() && - font->getName()) { - // this assumes that the PS font name matches the PDF font name - psName = font->getName()->copy(); - setupExternalType1Font(font->getExtFontFile(), psName); - - // check for embedded TrueType font - } else if (globalParams->getPSEmbedTrueType() && - (font->getType() == fontTrueType || - font->getType() == fontTrueTypeOT) && - font->getEmbeddedFontID(&fontFileID) && - font->getEmbeddedFontName()) { - psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedTrueTypeFont(font, &fontFileID, psName); - - // check for external TrueType font file - } else if (globalParams->getPSEmbedTrueType() && - font->getType() == fontTrueType && - font->getExtFontFile()) { - psName = setupExternalTrueTypeFont(font); - - // check for embedded CID PostScript font - } else if (globalParams->getPSEmbedCIDPostScript() && - font->getType() == fontCIDType0C && - font->getEmbeddedFontID(&fontFileID) && - font->getEmbeddedFontName()) { - psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedCIDType0Font(font, &fontFileID, psName); - - // check for embedded CID TrueType font - } else if (globalParams->getPSEmbedCIDTrueType() && - (font->getType() == fontCIDType2 || - font->getType() == fontCIDType2OT) && - font->getEmbeddedFontID(&fontFileID) && - font->getEmbeddedFontName()) { - psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedCIDTrueTypeFont(font, &fontFileID, psName, gTrue); - - // check for embedded OpenType - CID CFF font - } else if (globalParams->getPSEmbedCIDPostScript() && - font->getType() == fontCIDType0COT && - font->getEmbeddedFontID(&fontFileID) && - font->getEmbeddedFontName()) { - psName = font->getEmbeddedFontName()->sanitizedName(gTrue /* ps mode */); - setupEmbeddedOpenTypeCFFFont(font, &fontFileID, psName); - - // check for Type 3 font - } else if (font->getType() == fontType3) { + if (font->getType() == fontType3) { psName = GooString::format("T3_{0:d}_{1:d}", font->getID()->num, font->getID()->gen); setupType3Font(font, psName, parentResDict); - - // check for external CID TrueType font file - } else if (globalParams->getPSEmbedCIDTrueType() && - font->getType() == fontCIDType2 && - font->getExtFontFile()) { - psName = setupExternalCIDTrueTypeFont(font, font->getExtFontFile()); - - // do 8-bit font substitution - } else if (!font->isCIDFont()) { - subst = gTrue; - name = font->getName(); - psName = NULL; - if (name) { - for (i = 0; psFonts[i]; ++i) { - if (name->cmp(psFonts[i]) == 0) { - psName = new GooString(psFonts[i]); + } else { + fontLoc = font->locateFont(xref, gTrue); + if (fontLoc != NULL) { + switch (fontLoc->locType) { + case gfxFontLocEmbedded: + switch (fontLoc->fontType) { + case fontType1: + // this assumes that the PS font name matches the PDF font name + psName = font->getEmbeddedFontName()->copy(); + setupEmbeddedType1Font(&fontLoc->embFontID, psName); + break; + case fontType1C: + psName = makePSFontName(font, &fontLoc->embFontID); + setupEmbeddedType1CFont(font, &fontLoc->embFontID, psName); + break; + case fontType1COT: + psName = makePSFontName(font, &fontLoc->embFontID); + setupEmbeddedOpenTypeT1CFont(font, &fontLoc->embFontID, psName); + break; + case fontTrueType: + case fontTrueTypeOT: + psName = makePSFontName(font, font->getID()); + setupEmbeddedTrueTypeFont(font, &fontLoc->embFontID, psName); + break; + case fontCIDType0C: + psName = makePSFontName(font, &fontLoc->embFontID); + setupEmbeddedCIDType0Font(font, &fontLoc->embFontID, psName); + break; + case fontCIDType2: + case fontCIDType2OT: + psName = makePSFontName(font, font->getID()); + //~ should check to see if font actually uses vertical mode + setupEmbeddedCIDTrueTypeFont(font, &fontLoc->embFontID, psName, gTrue); + break; + case fontCIDType0COT: + psName = makePSFontName(font, &fontLoc->embFontID); + setupEmbeddedOpenTypeCFFFont(font, &fontLoc->embFontID, psName); + break; + default: + break; + } + break; + case gfxFontLocExternal: + //~ add cases for external 16-bit fonts + switch (fontLoc->fontType) { + case fontType1: + if (font->getName()) { + // this assumes that the PS font name matches the PDF font name + psName = font->getName()->copy(); + } else { + //~ this won't work -- the PS font name won't match + psName = makePSFontName(font, font->getID()); + } + setupExternalType1Font(fontLoc->path, psName); + break; + case fontTrueType: + case fontTrueTypeOT: + psName = makePSFontName(font, font->getID()); + setupExternalTrueTypeFont(font, fontLoc->path, psName); + break; + case fontCIDType2: + case fontCIDType2OT: + psName = makePSFontName(font, font->getID()); + //~ should check to see if font actually uses vertical mode + setupExternalCIDTrueTypeFont(font, fontLoc->path, psName, gTrue); + break; + default: break; } + break; + case gfxFontLocResident: + psName = fontLoc->path->copy(); + break; } } + if (!psName) { - if (substFonts) { - if (font->isFixedWidth()) { - i = 8; - } else if (font->isSerif()) { - i = 4; - } else { - i = 0; - } - if (font->isBold()) { - i += 2; - } - if (font->isItalic()) { - i += 1; - } - psName = new GooString(psSubstFonts[i].psName); - for (code = 0; code < 256; ++code) { - if ((charName = ((Gfx8BitFont *)font)->getCharName(code)) && - charName[0] == 'm' && charName[1] == '\0') { - break; - } - } - if (code < 256) { - w1 = ((Gfx8BitFont *)font)->getWidth(code); - } else { - w1 = 0; - } - w2 = psSubstFonts[i].mWidth; - xs = w1 / w2; - if (xs < 0.1) { - xs = 1; - } + if (font->isCIDFont()) { + error(errSyntaxError, -1, + "Couldn't find a font to substitute for '{0:s}' ('{1:s}' character collection)", + font->getName() ? font->getName()->getCString() + : "(unnamed)", + ((GfxCIDFont *)font)->getCollection() + ? ((GfxCIDFont *)font)->getCollection()->getCString() + : "(unknown)"); + if (font16EncLen >= font16EncSize) { + font16EncSize += 16; + font16Enc = (PSFont16Enc *)greallocn(font16Enc, + font16EncSize, + sizeof(PSFont16Enc)); + } + font16Enc[font16EncLen].fontID = *font->getID(); + font16Enc[font16EncLen].enc = NULL; + ++font16EncLen; } else { - psName = new GooString(name); - xs = 1; + error(errSyntaxError, -1, + "Couldn't find a font to substitute for '{0:s}'", + font->getName() ? font->getName()->getCString() + : "(unnamed)"); } - if (font->getType() == fontType3) { - // This is a hack which makes it possible to substitute for some - // Type 3 fonts. The problem is that it's impossible to know what - // the base coordinate system used in the font is without actually - // rendering the font. - ys = xs; - fm = font->getFontMatrix(); - if (fm[0] != 0) { - ys *= fm[3] / fm[0]; + delete fontLoc; + return; + } + + // scale substituted 8-bit fonts + if (fontLoc->locType == gfxFontLocResident && + fontLoc->substIdx >= 0) { + subst = gTrue; + for (code = 0; code < 256; ++code) { + if ((charName = ((Gfx8BitFont *)font)->getCharName(code)) && + charName[0] == 'm' && charName[1] == '\0') { + break; } + } + if (code < 256) { + w1 = ((Gfx8BitFont *)font)->getWidth(code); } else { - ys = 1; + w1 = 0; + } + w2 = psBase14SubstFonts[fontLoc->substIdx].mWidth; + xs = w1 / w2; + if (xs < 0.1) { + xs = 1; } } - // do 16-bit font substitution - } else if ((fontParam = globalParams-> - getPSFont16(font->getName(), - ((GfxCIDFont *)font)->getCollection(), - font->getWMode()))) { - subst = gTrue; - psName = fontParam->psFontName->copy(); - if (font16EncLen >= font16EncSize) { - font16EncSize += 16; - font16Enc = (PSFont16Enc *)greallocn(font16Enc, - font16EncSize, sizeof(PSFont16Enc)); - } - font16Enc[font16EncLen].fontID = *font->getID(); - font16Enc[font16EncLen].enc = fontParam->encoding->copy(); - if ((uMap = globalParams->getUnicodeMap(font16Enc[font16EncLen].enc))) { - uMap->decRefCnt(); + // handle encodings for substituted CID fonts + if (fontLoc->locType == gfxFontLocResident && + fontLoc->fontType >= fontCIDType0) { + subst = gTrue; + if (font16EncLen >= font16EncSize) { + font16EncSize += 16; + font16Enc = (PSFont16Enc *)greallocn(font16Enc, + font16EncSize, + sizeof(PSFont16Enc)); + } + font16Enc[font16EncLen].fontID = *font->getID(); + if ((uMap = globalParams->getUnicodeMap(fontLoc->encoding))) { + font16Enc[font16EncLen].enc = fontLoc->encoding->copy(); + uMap->decRefCnt(); + } else { + error(errSyntaxError, -1, + "Couldn't find Unicode map for 16-bit font encoding '{0:t}'", + fontLoc->encoding); + font16Enc[font16EncLen].enc = NULL; + } ++font16EncLen; - } else { - error(-1, "Couldn't find Unicode map for 16-bit font encoding '%s'", - font16Enc[font16EncLen].enc->getCString()); } - // try the display font for embedding - } else if (globalParams->getPSEmbedCIDTrueType() && - ((GfxCIDFont *)font)->getCollection() && - (dfp = globalParams-> - getDisplayFont(font)) && - dfp->kind == displayFontTT) { - psName = setupExternalCIDTrueTypeFont(font, dfp->tt.fileName, dfp->tt.faceIndex); - - // give up - can't do anything with this font - } else { - error(-1, "Couldn't find a font to substitute for '%s' ('%s' character collection)", - font->getName() ? font->getName()->getCString() : "(unnamed)", - ((GfxCIDFont *)font)->getCollection() - ? ((GfxCIDFont *)font)->getCollection()->getCString() - : "(unknown)"); - return; + delete fontLoc; } // generate PostScript code to set up the font @@ -1910,11 +1989,6 @@ charName = buf; } else { charName = ((Gfx8BitFont *)font)->getCharName(i+j); - // this is a kludge for broken PDF files that encode char 32 - // as .notdef - if (i+j == 32 && charName && !strcmp(charName, ".notdef")) { - charName = "space"; - } } writePS("/"); writePSName(charName ? charName : (char *)".notdef"); @@ -1945,36 +2019,30 @@ int i; // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) - return; - } - - // add entry to fontFileIDs list - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); + if (fontNames->lookupInt(psName)) { + return; } - fontFileIDs[fontFileIDLen++] = *id; + fontNames->add(psName->copy(), 1); // get the font stream and info refObj.initRef(id->num, id->gen); refObj.fetch(xref, &strObj); refObj.free(); if (!strObj.isStream()) { - error(-1, "Embedded font file object is not a stream"); + error(errSyntaxError, -1, "Embedded font file object is not a stream"); goto err1; } if (!(dict = strObj.streamGetDict())) { - error(-1, "Embedded font stream is missing its dictionary"); + error(errSyntaxError, -1, + "Embedded font stream is missing its dictionary"); goto err1; } dict->lookup("Length1", &obj1); dict->lookup("Length2", &obj2); dict->lookup("Length3", &obj3); if (!obj1.isInt() || !obj2.isInt() || !obj3.isInt()) { - error(-1, "Missing length fields in embedded font stream dictionary"); + error(errSyntaxError, -1, + "Missing length fields in embedded font stream dictionary"); obj1.free(); obj2.free(); obj3.free(); @@ -2004,7 +2072,8 @@ for (i = 0; i < 4; ++i) { start[i] = strObj.streamGetChar(); if (start[i] == EOF) { - error(-1, "Unexpected end of file in embedded font stream"); + error(errSyntaxError, -1, + "Unexpected end of file in embedded font stream"); goto err1; } if (!((start[i] >= '0' && start[i] <= '9') || @@ -2018,7 +2087,7 @@ // length2 == 0 is an error // trying to solve it by just piping all // the stream data - error(-1, "Font has length2 as 0, trying to overcome the problem reading the stream until the end"); + error(errSyntaxWarning, -1, "Font has length2 as 0, trying to overcome the problem reading the stream until the end"); length2 = INT_MAX; writePadding = gFalse; } @@ -2083,7 +2152,8 @@ writePS("%%EndResource\n"); err1: - strObj.streamClose(); + if (strObj.isStream()) + strObj.streamClose(); strObj.free(); } @@ -2092,26 +2162,11 @@ void PSOutputDev::setupExternalType1Font(GooString *fileName, GooString *psName) { FILE *fontFile; int c; - int i; - // check if font is already embedded - for (i = 0; i < fontFileNameLen; ++i) { - if (!fontFileNames[i]->cmp(fileName)) { - return; - } + if (fontNames->lookupInt(psName)) { + return; } - - // add entry to fontFileNames list - if (fontFileNameLen >= fontFileNameSize) { - fontFileNameSize += 64; - fontFileNames = (GooString **)greallocn(fontFileNames, - fontFileNameSize, sizeof(GooString *)); - psFileNames = (GooString **)greallocn(psFileNames, - fontFileNameSize, sizeof(GooString *)); - } - fontFileNames[fontFileNameLen] = fileName->copy(); - psFileNames[fontFileNameLen] = psName->copy(); - fontFileNameLen++; + fontNames->add(psName->copy(), 1); // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2121,7 +2176,7 @@ // copy the font file if (!(fontFile = fopen(fileName->getCString(), "rb"))) { - error(-1, "Couldn't open external font file"); + error(errIO, -1, "Couldn't open external font file"); return; } while ((c = fgetc(fontFile)) != EOF) { @@ -2141,18 +2196,22 @@ int i; // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) + for (i = 0; i < t1FontNameLen; ++i) { + if (t1FontNames[i].fontFileID.num == id->num && + t1FontNames[i].fontFileID.gen == id->gen) { + psName->clear(); + psName->insert(0, t1FontNames[i].psName); return; + } } - - // add entry to fontFileIDs list - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); - } - fontFileIDs[fontFileIDLen++] = *id; + if (t1FontNameLen == t1FontNameSize) { + t1FontNameSize *= 2; + t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, + sizeof(PST1FontName)); + } + t1FontNames[t1FontNameLen].fontFileID = *id; + t1FontNames[t1FontNameLen].psName = psName->copy(); + ++t1FontNameLen; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2161,13 +2220,14 @@ embFontList->append("\n"); // convert it to a Type 1 font - fontBuf = font->readEmbFontFile(xref, &fontLen); - if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) { - ffT1C->convertToType1(psName->getCString(), NULL, gTrue, - outputFunc, outputStream); - delete ffT1C; + if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { + if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) { + ffT1C->convertToType1(psName->getCString(), NULL, gTrue, + outputFunc, outputStream); + delete ffT1C; + } + gfree(fontBuf); } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); @@ -2181,18 +2241,22 @@ int i; // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) + for (i = 0; i < t1FontNameLen; ++i) { + if (t1FontNames[i].fontFileID.num == id->num && + t1FontNames[i].fontFileID.gen == id->gen) { + psName->clear(); + psName->insert(0, t1FontNames[i].psName); return; + } } - - // add entry to fontFileIDs list - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); - } - fontFileIDs[fontFileIDLen++] = *id; + if (t1FontNameLen == t1FontNameSize) { + t1FontNameSize *= 2; + t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, + sizeof(PST1FontName)); + } + t1FontNames[t1FontNameLen].fontFileID = *id; + t1FontNames[t1FontNameLen].psName = psName->copy(); + ++t1FontNameLen; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2201,15 +2265,16 @@ embFontList->append("\n"); // convert it to a Type 1 font - fontBuf = font->readEmbFontFile(xref, &fontLen); - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - if (ffTT->isOpenTypeCFF()) { - ffTT->convertToType1(psName->getCString(), NULL, gTrue, - outputFunc, outputStream); + if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { + if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { + if (ffTT->isOpenTypeCFF()) { + ffTT->convertToType1(psName->getCString(), NULL, gTrue, + outputFunc, outputStream); + } + delete ffTT; } - delete ffTT; + gfree(fontBuf); } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); @@ -2220,26 +2285,7 @@ char *fontBuf; int fontLen; FoFiTrueType *ffTT; - Gushort *codeToGID; - int i; - - // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) { - psName->appendf("_{0:d}", nextTrueTypeNum++); - break; - } - } - - // add entry to fontFileIDs list - if (i == fontFileIDLen) { - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); - } - fontFileIDs[fontFileIDLen++] = *id; - } + int *codeToGID; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2248,66 +2294,38 @@ embFontList->append("\n"); // convert it to a Type 42 font - fontBuf = font->readEmbFontFile(xref, &fontLen); - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT); - ffTT->convertToType42(psName->getCString(), - ((Gfx8BitFont *)font)->getHasEncoding() - ? ((Gfx8BitFont *)font)->getEncoding() - : (char **)NULL, - codeToGID, outputFunc, outputStream); - if (codeToGID) { - if (font8InfoLen >= font8InfoSize) { - font8InfoSize += 16; - font8Info = (PSFont8Info *)greallocn(font8Info, - font8InfoSize, - sizeof(PSFont8Info)); + if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { + if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { + codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT); + ffTT->convertToType42(psName->getCString(), + ((Gfx8BitFont *)font)->getHasEncoding() + ? ((Gfx8BitFont *)font)->getEncoding() + : (char **)NULL, + codeToGID, outputFunc, outputStream); + if (codeToGID) { + if (font8InfoLen >= font8InfoSize) { + font8InfoSize += 16; + font8Info = (PSFont8Info *)greallocn(font8Info, + font8InfoSize, + sizeof(PSFont8Info)); + } + font8Info[font8InfoLen].fontID = *font->getID(); + font8Info[font8InfoLen].codeToGID = codeToGID; + ++font8InfoLen; } - font8Info[font8InfoLen].fontID = *font->getID(); - font8Info[font8InfoLen].codeToGID = codeToGID; - ++font8InfoLen; + delete ffTT; } - delete ffTT; + gfree(fontBuf); } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); } -GooString *PSOutputDev::setupExternalTrueTypeFont(GfxFont *font) { - GooString *fileName; - char *fontBuf; - int fontLen; +void PSOutputDev::setupExternalTrueTypeFont(GfxFont *font, GooString *fileName, + GooString *psName) { FoFiTrueType *ffTT; - Gushort *codeToGID; - GooString *psName; - int i; - - // check if font is already embedded - fileName = font->getExtFontFile(); - for (i = 0; i < fontFileNameLen; ++i) { - if (!fontFileNames[i]->cmp(fileName)) { - return psFileNames[i]->copy(); - } - } - - psName = font->getName()->sanitizedName(gTrue /* ps mode */); - // add entry to fontFileNames list - if (i == fontFileNameLen) { - if (fontFileNameLen >= fontFileNameSize) { - fontFileNameSize += 64; - fontFileNames = - (GooString **)greallocn(fontFileNames, - fontFileNameSize, sizeof(GooString *)); - psFileNames = - (GooString **)greallocn(psFileNames, - fontFileNameSize, sizeof(GooString *)); - } - fontFileNames[fontFileNameLen] = fileName->copy(); - psFileNames[fontFileNameLen] = psName->copy(); - fontFileNameLen++; - } + int *codeToGID; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2316,8 +2334,7 @@ embFontList->append("\n"); // convert it to a Type 42 font - fontBuf = font->readExtFontFile(&fontLen); - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { + if ((ffTT = FoFiTrueType::load(fileName->getCString()))) { codeToGID = ((Gfx8BitFont *)font)->getCodeToGIDMap(ffTT); ffTT->convertToType42(psName->getCString(), ((Gfx8BitFont *)font)->getHasEncoding() @@ -2337,50 +2354,18 @@ } delete ffTT; } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); - return psName; } -GooString *PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex) { +void PSOutputDev::setupExternalCIDTrueTypeFont(GfxFont *font, + GooString *fileName, + GooString *psName, + GBool needVerticalMetrics) { FoFiTrueType *ffTT; - Gushort *codeToGID; - GooString *psName; - int i; - GooString *myFileName; - - myFileName = fileName->copy(); - if (faceIndex > 0) { - char tmp[32]; - sprintf(tmp, ",%d", faceIndex); - myFileName->append(tmp); - } - // check if font is already embedded - for (i = 0; i < fontFileNameLen; ++i) { - if (!fontFileNames[i]->cmp(myFileName)) { - delete myFileName; - return psFileNames[i]->copy(); - } - } - - psName = font->getName()->sanitizedName(gTrue /* ps mode */); - // add entry to fontFileNames list - if (i == fontFileNameLen) { - if (fontFileNameLen >= fontFileNameSize) { - fontFileNameSize += 64; - fontFileNames = - (GooString **)grealloc(fontFileNames, - fontFileNameSize * sizeof(GooString *)); - psFileNames = - (GooString **)grealloc(psFileNames, - fontFileNameSize * sizeof(GooString *)); - } - } - fontFileNames[fontFileNameLen] = myFileName; - psFileNames[fontFileNameLen] = psName->copy(); - fontFileNameLen++; + int *codeToGID; + int codeToGIDLen; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2388,33 +2373,53 @@ embFontList->append(psName->getCString()); embFontList->append("\n"); - // convert it to a CID type2 font - if ((ffTT = FoFiTrueType::load(fileName->getCString(), faceIndex))) { - int n = ((GfxCIDFont *)font)->getCIDToGIDLen(); - if (n) { - codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); - memcpy(codeToGID, ((GfxCIDFont *)font)->getCIDToGID(), n * sizeof(Gushort)); + // convert it to a Type 0 font + //~ this should use fontNum to load the correct font + if ((ffTT = FoFiTrueType::load(fileName->getCString()))) { + + // check for embedding permission + if (ffTT->getEmbeddingRights() >= 1) { + codeToGID = NULL; + codeToGIDLen = 0; + if (((GfxCIDFont *)font)->getCIDToGID()) { + codeToGIDLen = ((GfxCIDFont *)font)->getCIDToGIDLen(); + if (codeToGIDLen) { + codeToGID = (int *)gmallocn(codeToGIDLen, sizeof(int)); + memcpy(codeToGID, ((GfxCIDFont *)font)->getCIDToGID(), + codeToGIDLen * sizeof(int)); + } } else { - codeToGID = ((GfxCIDFont *)font)->getCodeToGIDMap(ffTT, &n); + codeToGID = ((GfxCIDFont *)font)->getCodeToGIDMap(ffTT, &codeToGIDLen); } - if (globalParams->getPSLevel() >= psLevel3) { + if (ffTT->isOpenTypeCFF()) { + ffTT->convertToCIDType0(psName->getCString(), + codeToGID, codeToGIDLen, + outputFunc, outputStream); + } else if (globalParams->getPSLevel() >= psLevel3) { // Level 3: use a CID font ffTT->convertToCIDType2(psName->getCString(), - codeToGID, n, gTrue, - outputFunc, outputStream); + codeToGID, codeToGIDLen, + needVerticalMetrics, + outputFunc, outputStream); } else { // otherwise: use a non-CID composite font ffTT->convertToType0(psName->getCString(), - codeToGID, n, gTrue, - outputFunc, outputStream); + codeToGID, codeToGIDLen, + needVerticalMetrics, + outputFunc, outputStream); } gfree(codeToGID); - delete ffTT; + } else { + error(errSyntaxError, -1, + "TrueType font '%s' does not allow embedding", + font->getName() ? font->getName()->getCString() : "(unnamed)"); + + } + delete ffTT; } // ending comment writePS("%%EndResource\n"); - return psName; } void PSOutputDev::setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, @@ -2425,18 +2430,22 @@ int i; // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) + for (i = 0; i < t1FontNameLen; ++i) { + if (t1FontNames[i].fontFileID.num == id->num && + t1FontNames[i].fontFileID.gen == id->gen) { + psName->clear(); + psName->insert(0, t1FontNames[i].psName); return; + } } - - // add entry to fontFileIDs list - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); - } - fontFileIDs[fontFileIDLen++] = *id; + if (t1FontNameLen == t1FontNameSize) { + t1FontNameSize *= 2; + t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, + sizeof(PST1FontName)); + } + t1FontNames[t1FontNameLen].fontFileID = *id; + t1FontNames[t1FontNameLen].psName = psName->copy(); + ++t1FontNameLen; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2445,18 +2454,21 @@ embFontList->append("\n"); // convert it to a Type 0 font - fontBuf = font->readEmbFontFile(xref, &fontLen); - if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) { - if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffT1C->convertToCIDType0(psName->getCString(), outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - ffT1C->convertToType0(psName->getCString(), outputFunc, outputStream); + if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { + if ((ffT1C = FoFiType1C::make(fontBuf, fontLen))) { + if (globalParams->getPSLevel() >= psLevel3) { + // Level 3: use a CID font + ffT1C->convertToCIDType0(psName->getCString(), NULL, 0, + outputFunc, outputStream); + } else { + // otherwise: use a non-CID composite font + ffT1C->convertToType0(psName->getCString(), NULL, 0, + outputFunc, outputStream); + } + delete ffT1C; } - delete ffT1C; + gfree(fontBuf); } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); @@ -2468,23 +2480,6 @@ char *fontBuf; int fontLen; FoFiTrueType *ffTT; - int i; - - // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) { - psName->appendf("_{0:d}", nextTrueTypeNum++); - break; - } - } - - // add entry to fontFileIDs list - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); - } - fontFileIDs[fontFileIDLen++] = *id; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2493,26 +2488,27 @@ embFontList->append("\n"); // convert it to a Type 0 font - fontBuf = font->readEmbFontFile(xref, &fontLen); - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffTT->convertToCIDType2(psName->getCString(), - ((GfxCIDFont *)font)->getCIDToGID(), - ((GfxCIDFont *)font)->getCIDToGIDLen(), - needVerticalMetrics, - outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - ffTT->convertToType0(psName->getCString(), - ((GfxCIDFont *)font)->getCIDToGID(), - ((GfxCIDFont *)font)->getCIDToGIDLen(), - needVerticalMetrics, - outputFunc, outputStream); + if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { + if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { + if (globalParams->getPSLevel() >= psLevel3) { + // Level 3: use a CID font + ffTT->convertToCIDType2(psName->getCString(), + ((GfxCIDFont *)font)->getCIDToGID(), + ((GfxCIDFont *)font)->getCIDToGIDLen(), + needVerticalMetrics, + outputFunc, outputStream); + } else { + // otherwise: use a non-CID composite font + ffTT->convertToType0(psName->getCString(), + ((GfxCIDFont *)font)->getCIDToGID(), + ((GfxCIDFont *)font)->getCIDToGIDLen(), + needVerticalMetrics, + outputFunc, outputStream); + } + delete ffTT; } - delete ffTT; + gfree(fontBuf); } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); @@ -2526,18 +2522,22 @@ int i; // check if font is already embedded - for (i = 0; i < fontFileIDLen; ++i) { - if (fontFileIDs[i].num == id->num && - fontFileIDs[i].gen == id->gen) + for (i = 0; i < t1FontNameLen; ++i) { + if (t1FontNames[i].fontFileID.num == id->num && + t1FontNames[i].fontFileID.gen == id->gen) { + psName->clear(); + psName->insert(0, t1FontNames[i].psName); return; + } } - - // add entry to fontFileIDs list - if (fontFileIDLen >= fontFileIDSize) { - fontFileIDSize += 64; - fontFileIDs = (Ref *)greallocn(fontFileIDs, fontFileIDSize, sizeof(Ref)); - } - fontFileIDs[fontFileIDLen++] = *id; + if (t1FontNameLen == t1FontNameSize) { + t1FontNameSize *= 2; + t1FontNames = (PST1FontName *)greallocn(t1FontNames, t1FontNameSize, + sizeof(PST1FontName)); + } + t1FontNames[t1FontNameLen].fontFileID = *id; + t1FontNames[t1FontNameLen].psName = psName->copy(); + ++t1FontNameLen; // beginning comment writePSFmt("%%BeginResource: font {0:t}\n", psName); @@ -2546,21 +2546,27 @@ embFontList->append("\n"); // convert it to a Type 0 font - fontBuf = font->readEmbFontFile(xref, &fontLen); - if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { - if (ffTT->isOpenTypeCFF()) { - if (globalParams->getPSLevel() >= psLevel3) { - // Level 3: use a CID font - ffTT->convertToCIDType0(psName->getCString(), - outputFunc, outputStream); - } else { - // otherwise: use a non-CID composite font - ffTT->convertToType0(psName->getCString(), outputFunc, outputStream); + if ((fontBuf = font->readEmbFontFile(xref, &fontLen))) { + if ((ffTT = FoFiTrueType::make(fontBuf, fontLen))) { + if (ffTT->isOpenTypeCFF()) { + if (globalParams->getPSLevel() >= psLevel3) { + // Level 3: use a CID font + ffTT->convertToCIDType0(psName->getCString(), + ((GfxCIDFont *)font)->getCIDToGID(), + ((GfxCIDFont *)font)->getCIDToGIDLen(), + outputFunc, outputStream); + } else { + // otherwise: use a non-CID composite font + ffTT->convertToType0(psName->getCString(), + ((GfxCIDFont *)font)->getCIDToGID(), + ((GfxCIDFont *)font)->getCIDToGIDLen(), + outputFunc, outputStream); + } } + delete ffTT; } - delete ffTT; + gfree(fontBuf); } - gfree(fontBuf); // ending comment writePS("%%EndResource\n"); @@ -2619,9 +2625,10 @@ box.y1 = m[1]; box.x2 = m[2]; box.y2 = m[3]; - gfx = new Gfx(xref, this, resDict, m_catalog, &box, NULL); + gfx = new Gfx(doc, this, resDict, &box, NULL); inType3Char = gTrue; for (i = 0; i < charProcs->getLength(); ++i) { + t3FillColorOnly = gFalse; t3Cacheable = gFalse; t3NeedsRestore = gFalse; writePS("/"); @@ -2659,9 +2666,45 @@ writePS("%%EndResource\n"); } +// Make a unique PS font name, based on the names given in the PDF +// font object, and an object ID (font file object for +GooString *PSOutputDev::makePSFontName(GfxFont *font, Ref *id) { + GooString *psName, *s; + + if ((s = font->getEmbeddedFontName())) { + psName = filterPSName(s); + if (!fontNames->lookupInt(psName)) { + fontNames->add(psName->copy(), 1); + return psName; + } + delete psName; + } + if ((s = font->getName())) { + psName = filterPSName(s); + if (!fontNames->lookupInt(psName)) { + fontNames->add(psName->copy(), 1); + return psName; + } + delete psName; + } + psName = GooString::format("FF{0:d}_{1:d}", id->num, id->gen); + if ((s = font->getEmbeddedFontName())) { + s = filterPSName(s); + psName->append('_')->append(s); + delete s; + } else if ((s = font->getName())) { + s = filterPSName(s); + psName->append('_')->append(s); + delete s; + } + fontNames->add(psName->copy(), 1); + return psName; +} + void PSOutputDev::setupImages(Dict *resDict) { - Object xObjDict, xObj, xObjRef, subtypeObj; - int i; + Object xObjDict, xObj, xObjRef, subtypeObj, maskObj, maskRef; + Ref imgID; + int i, j; if (!(mode == psModeForm || inType3Char || preload)) { return; @@ -2677,9 +2720,32 @@ xObj.streamGetDict()->lookup("Subtype", &subtypeObj); if (subtypeObj.isName("Image")) { if (xObjRef.isRef()) { - setupImage(xObjRef.getRef(), xObj.getStream()); + imgID = xObjRef.getRef(); + for (j = 0; j < imgIDLen; ++j) { + if (imgIDs[j].num == imgID.num && imgIDs[j].gen == imgID.gen) { + break; + } + } + if (j == imgIDLen) { + if (imgIDLen >= imgIDSize) { + if (imgIDSize == 0) { + imgIDSize = 64; + } else { + imgIDSize *= 2; + } + imgIDs = (Ref *)greallocn(imgIDs, imgIDSize, sizeof(Ref)); + } + imgIDs[imgIDLen++] = imgID; + setupImage(imgID, xObj.getStream(), gFalse); + if (level >= psLevel3 && + xObj.streamGetDict()->lookup("Mask", &maskObj)->isStream()) { + setupImage(imgID, maskObj.getStream(), gTrue); + } + maskObj.free(); + } } else { - error(-1, "Image in resource dict is not an indirect reference"); + error(errSyntaxError, -1, + "Image in resource dict is not an indirect reference"); } } subtypeObj.free(); @@ -2691,31 +2757,13 @@ xObjDict.free(); } -void PSOutputDev::setupImage(Ref id, Stream *str) { +void PSOutputDev::setupImage(Ref id, Stream *str, GBool mask) { GBool useRLE, useCompressed, useASCIIHex; GooString *s; int c; int size, line, col, i; int outerSize, outer; - // check if image is already setup - for (i = 0; i < imgIDLen; ++i) { - if (imgIDs[i].num == id.num && imgIDs[i].gen == id.gen) { - return; - } - } - - // add entry to imgIDs list - if (imgIDLen >= imgIDSize) { - if (imgIDSize == 0) { - imgIDSize = 64; - } else { - imgIDSize *= 2; - } - imgIDs = (Ref *)greallocn(imgIDs, imgIDSize, sizeof(Ref)); - } - imgIDs[imgIDLen++] = id; - // filters //~ this does not correctly handle the DeviceN color space //~ -- need to use DeviceNRecoder @@ -2724,17 +2772,21 @@ useCompressed = gFalse; useASCIIHex = gTrue; } else { - s = str->getPSFilter(level < psLevel3 ? 2 : 3, ""); - if (s) { + if (globalParams->getPSUncompressPreloadedImages()) { useRLE = gFalse; - useCompressed = gTrue; - delete s; - } else { - useRLE = gTrue; useCompressed = gFalse; + } else { + s = str->getPSFilter(level < psLevel3 ? 2 : 3, ""); + if (s) { + useRLE = gFalse; + useCompressed = gTrue; + delete s; + } else { + useRLE = gTrue; + useCompressed = gFalse; + } } - useASCIIHex = level == psLevel1 || level == psLevel1Sep || - globalParams->getPSASCIIHex(); + useASCIIHex = globalParams->getPSASCIIHex(); } if (useCompressed) { str = str->getUndecodedStream(); @@ -2788,8 +2840,8 @@ } outerSize = size/65535 + 1; - writePSFmt("{0:d} array dup /ImData_{1:d}_{2:d} exch def\n", - outerSize, id.num, id.gen); + writePSFmt("{0:d} array dup /{1:s}Data_{2:d}_{3:d} exch def\n", + outerSize, mask ? "Mask" : "Im", id.num, id.gen); str->close(); // write the data into the array @@ -2879,7 +2931,8 @@ if (xObjRef.isRef()) { setupForm(xObjRef.getRef(), &xObj); } else { - error(-1, "Form in resource dict is not an indirect reference"); + error(errSyntaxError, -1, + "Form in resource dict is not an indirect reference"); } } subtypeObj.free(); @@ -2923,7 +2976,7 @@ dict->lookup("BBox", &bboxObj); if (!bboxObj.isArray()) { bboxObj.free(); - error(-1, "Bad form bounding box"); + error(errSyntaxError, -1, "Bad form bounding box"); return; } for (i = 0; i < 4; ++i) { @@ -2961,7 +3014,7 @@ box.y1 = bbox[1]; box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(xref, this, resDict, m_catalog, &box, &box); + gfx = new Gfx(doc, this, resDict, &box, &box); gfx->display(strObj); delete gfx; @@ -2975,12 +3028,16 @@ int rotateA, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData) { -#if HAVE_SPLASH + void *abortCheckCbkData, + GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), + void *annotDisplayDecideCbkData) { PreScanOutputDev *scan; GBool rasterize; +#if HAVE_SPLASH + GBool mono; + double dpi; SplashOutputDev *splashOut; SplashColor paperColor; PDFRectangle box; @@ -2990,61 +3047,39 @@ Object obj; Guchar *p; Guchar col[4]; + double hDPI2, vDPI2; double m0, m1, m2, m3, m4, m5; + int nStripes, stripeH, stripeY; int c, w, h, x, y, comp, i; - double splashDPI; + int numComps, initialNumComps; +#endif char hexBuf[32*2 + 2]; // 32 values X 2 chars/value + line ending + null Guchar digit; GBool useBinary; GBool isGray; - int compCyan; - if (!forceRasterize) { - scan = new PreScanOutputDev(xref); + if (forceRasterize) { + rasterize = gTrue; + } else { + scan = new PreScanOutputDev(doc); page->displaySlice(scan, 72, 72, rotateA, useMediaBox, crop, - sliceX, sliceY, sliceW, sliceH, - printing, catalog, abortCheckCbk, abortCheckCbkData); - rasterize = scan->usesTransparency() || scan->hasLevel1PSBug(); + sliceX, sliceY, sliceW, sliceH, + printing, abortCheckCbk, abortCheckCbkData, + annotDisplayDecideCbk, annotDisplayDecideCbkData); + rasterize = scan->usesTransparency() || scan->usesPatternImageMask(); delete scan; - } else { - rasterize = gTrue; } if (!rasterize) { return gTrue; } - // rasterize the page - if (level == psLevel1) { - paperColor[0] = 0xff; - splashOut = new SplashOutputDev(splashModeMono8, 1, gFalse, - paperColor, gTrue, gFalse); -#if SPLASH_CMYK - } else if (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) { - paperColor[0] = paperColor[1] = paperColor[2] = paperColor[3] = 0; - splashOut = new SplashOutputDev(splashModeCMYK8, 1, gFalse, - paperColor, gTrue, gFalse); -#else - } else if (level == psLevel1Sep || level == psLevel2Sep || level == psLevel3Sep) { - error(-1, "pdftops was built without CMYK support, levelnsep needs it to work in this file"); - return gFalse; -#endif - } else { - paperColor[0] = paperColor[1] = paperColor[2] = 0xff; - splashOut = new SplashOutputDev(splashModeRGB8, 1, gFalse, - paperColor, gTrue, gFalse); - } - splashOut->startDoc(xref); - splashDPI = globalParams->getSplashResolution(); - if (splashDPI < 1.0) { - splashDPI = defaultSplashDPI; - } - page->displaySlice(splashOut, splashDPI, splashDPI, rotateA, - useMediaBox, crop, - sliceX, sliceY, sliceW, sliceH, - printing, catalog, abortCheckCbk, abortCheckCbkData); +#if HAVE_SPLASH + // get the rasterization parameters + dpi = globalParams->getPSRasterResolution(); + mono = globalParams->getPSRasterMono(); // start the PS page - page->makeBox(splashDPI, splashDPI, rotateA, useMediaBox, gFalse, + page->makeBox(dpi, dpi, rotateA, useMediaBox, gFalse, sliceX, sliceY, sliceW, sliceH, &box, &crop); rotateA += page->getRotate(); if (rotateA >= 360) { @@ -3052,150 +3087,103 @@ } else if (rotateA < 0) { rotateA += 360; } - state = new GfxState(splashDPI, splashDPI, &box, rotateA, gFalse); + state = new GfxState(dpi, dpi, &box, rotateA, gFalse); startPage(page->getNum(), state); delete state; - switch (rotateA) { - case 0: - default: // this should never happen + + // set up the SplashOutputDev + if (mono || level == psLevel1) { + numComps = 1; + paperColor[0] = 0xff; + splashOut = new SplashOutputDev(splashModeMono8, 1, gFalse, + paperColor, gFalse, + globalParams->getAntialiasPrinting()); +#if SPLASH_CMYK + } else if (level == psLevel1Sep || level == psLevel2Sep || + level == psLevel3Sep || globalParams->getOverprintPreview()) { + numComps = 4; + paperColor[0] = paperColor[1] = paperColor[2] = paperColor[3] = 0; + splashOut = new SplashOutputDev(splashModeCMYK8, 1, gFalse, + paperColor, gFalse, + globalParams->getAntialiasPrinting()); +#endif + } else { + numComps = 3; + paperColor[0] = paperColor[1] = paperColor[2] = 0xff; + splashOut = new SplashOutputDev(splashModeRGB8, 1, gFalse, + paperColor, gFalse, + globalParams->getAntialiasPrinting()); + } + splashOut->startDoc(doc); + + // break the page into stripes + hDPI2 = xScale * dpi; + vDPI2 = yScale * dpi; + if (sliceW < 0 || sliceH < 0) { + if (useMediaBox) { + box = *page->getMediaBox(); + } else { + box = *page->getCropBox(); + } + sliceX = sliceY = 0; + sliceW = (int)((box.x2 - box.x1) * hDPI2 / 72.0); + sliceH = (int)((box.y2 - box.y1) * vDPI2 / 72.0); + } + nStripes = (int)ceil((double)(sliceW * sliceH) / + (double)rasterizationSliceSize); + stripeH = (sliceH + nStripes - 1) / nStripes; + + // render the stripes + initialNumComps = numComps; + for (stripeY = sliceY; stripeY < sliceH; stripeY += stripeH) { + + // rasterize a stripe + page->makeBox(hDPI2, vDPI2, 0, useMediaBox, gFalse, + sliceX, stripeY, sliceW, stripeH, &box, &crop); m0 = box.x2 - box.x1; m1 = 0; m2 = 0; m3 = box.y2 - box.y1; m4 = box.x1; m5 = box.y1; - break; - case 90: - m0 = 0; - m1 = box.y2 - box.y1; - m2 = -(box.x2 - box.x1); - m3 = 0; - m4 = box.x2; - m5 = box.y1; - break; - case 180: - m0 = -(box.x2 - box.x1); - m1 = 0; - m2 = 0; - m3 = -(box.y2 - box.y1); - m4 = box.x2; - m5 = box.y2; - break; - case 270: - m0 = 0; - m1 = -(box.y2 - box.y1); - m2 = box.x2 - box.x1; - m3 = 0; - m4 = box.x1; - m5 = box.y2; - break; - } - - //~ need to add the process colors - - // draw the rasterized image - bitmap = splashOut->getBitmap(); - w = bitmap->getWidth(); - h = bitmap->getHeight(); - writePS("gsave\n"); - writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] concat\n", - m0, m1, m2, m3, m4, m5); - switch (level) { - case psLevel1: - useBinary = globalParams->getPSBinary(); - writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}\n", - w, h, w, -h, h, - useBinary ? "Bin" : ""); - p = bitmap->getDataPtr(); - i = 0; - if (useBinary) { - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - hexBuf[i++] = *p++; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } else { - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - digit = *p / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = *p++ % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; - } - } - } - } - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; - } - writePSBuf(hexBuf, i); - } - break; - case psLevel1Sep: - useBinary = globalParams->getPSBinary(); - p = bitmap->getDataPtr(); - isGray = gTrue; - for (y = 0; y < h; ++y) { - for (x = 0; x < w; ++x) { - if (p[4*x] != p[4*x + 1] || p[4*x] != p[4*x + 2]) { - isGray = gFalse; - y = h; - break; - } - } - p += bitmap->getRowSize(); - } - writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}{6:s}\n", - w, h, w, -h, h, - isGray ? "" : "Sep", - useBinary ? "Bin" : ""); - p = bitmap->getDataPtr(); - i = 0; - col[0] = col[1] = col[2] = col[3] = 0; - if (isGray) { - int g; - if ((psProcessBlack & processColors) == 0) { + page->displaySlice(splashOut, hDPI2, vDPI2, + (360 - page->getRotate()) % 360, useMediaBox, crop, + sliceX, stripeY, sliceW, stripeH, + printing, abortCheckCbk, abortCheckCbkData, + annotDisplayDecideCbk, annotDisplayDecideCbkData); + + // draw the rasterized image + bitmap = splashOut->getBitmap(); + numComps = initialNumComps; + w = bitmap->getWidth(); + h = bitmap->getHeight(); + writePS("gsave\n"); + writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] concat\n", + m0, m1, m2, m3, m4, m5); + switch (level) { + case psLevel1: + useBinary = globalParams->getPSBinary(); + writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}\n", + w, h, w, -h, h, + useBinary ? "Bin" : ""); + p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); + i = 0; + if (useBinary) { for (y = 0; y < h; ++y) { for (x = 0; x < w; ++x) { - if (p[4*x] > 0 || p[4*x + 3] > 0) { - col[3] = 1; - y = h; - break; - } - } - p += bitmap->getRowSize(); - } - p = bitmap->getDataPtr(); - } - for (y = 0; y < h; ++y) { - if (useBinary) { - for (x = 0; x < w; ++x) { - g = p[4*x] + p[4*x + 3]; - g = 255 - g; - if (g < 0) g = 0; - hexBuf[i++] = (Guchar) g; + hexBuf[i++] = *p++; if (i >= 64) { writePSBuf(hexBuf, i); i = 0; } } - } else { + } + } else { + for (y = 0; y < h; ++y) { for (x = 0; x < w; ++x) { - g = p[4*x] + p[4*x + 3]; - g = 255 - g; - if (g < 0) g = 0; - digit = g / 16; + digit = *p / 16; hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = g % 16; + digit = *p++ % 16; hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); if (i >= 64) { hexBuf[i++] = '\n'; @@ -3203,54 +3191,75 @@ i = 0; } } + } + } + if (i != 0) { + if (!useBinary) { + hexBuf[i++] = '\n'; } - p += bitmap->getRowSize(); + writePSBuf(hexBuf, i); } - } else if (((psProcessCyan | psProcessMagenta | psProcessYellow | psProcessBlack) & ~processColors) != 0) { + break; + case psLevel1Sep: + useBinary = globalParams->getPSBinary(); + p = bitmap->getDataPtr(); + // Check for an all gray image + isGray = gTrue; for (y = 0; y < h; ++y) { - for (comp = 0; comp < 4; ++comp) { - if (useBinary) { - for (x = 0; x < w; ++x) { - col[comp] |= p[4*x + comp]; - hexBuf[i++] = p[4*x + comp]; - if (i >= 64) { - writePSBuf(hexBuf, i); - i = 0; - } - } - } else { + for (x = 0; x < w; ++x) { + if (p[4*x] != p[4*x + 1] || p[4*x] != p[4*x + 2]) { + isGray = gFalse; + y = h; + break; + } + } + p += bitmap->getRowSize(); + } + writePSFmt("{0:d} {1:d} 8 [{2:d} 0 0 {3:d} 0 {4:d}] pdfIm1{5:s}{6:s}\n", + w, h, w, -h, h, + isGray ? "" : "Sep", + useBinary ? "Bin" : ""); + p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); + i = 0; + col[0] = col[1] = col[2] = col[3] = 0; + if (isGray) { + int g; + if ((psProcessBlack & processColors) == 0) { + // Check if the image uses black + for (y = 0; y < h; ++y) { for (x = 0; x < w; ++x) { - col[comp] |= p[4*x + comp]; - digit = p[4*x + comp] / 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = p[4*x + comp] % 16; - hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - if (i >= 64) { - hexBuf[i++] = '\n'; - writePSBuf(hexBuf, i); - i = 0; + if (p[4*x] > 0 || p[4*x + 3] > 0) { + col[3] = 1; + y = h; + break; } } + p -= bitmap->getRowSize(); } + p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); } - p += bitmap->getRowSize(); - } - } else { - for (y = 0; y < h; ++y) { - for (comp = 0; comp < 4; ++comp) { + for (y = 0; y < h; ++y) { if (useBinary) { + // Binary gray image for (x = 0; x < w; ++x) { - hexBuf[i++] = p[4*x + comp]; + g = p[4*x] + p[4*x + 3]; + g = 255 - g; + if (g < 0) g = 0; + hexBuf[i++] = (Guchar) g; if (i >= 64) { writePSBuf(hexBuf, i); i = 0; } } } else { + // Hex gray image for (x = 0; x < w; ++x) { - digit = p[4*x + comp] / 16; + g = p[4*x] + p[4*x + 3]; + g = 255 - g; + if (g < 0) g = 0; + digit = g / 16; hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); - digit = p[4*x + comp] % 16; + digit = g % 16; hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); if (i >= 64) { hexBuf[i++] = '\n'; @@ -3258,159 +3267,224 @@ i = 0; } } - } + } + p -= bitmap->getRowSize(); + } + } else if (((psProcessCyan | psProcessMagenta | psProcessYellow | psProcessBlack) & ~processColors) != 0) { + // Color image, need to check color flags for each dot + for (y = 0; y < h; ++y) { + for (comp = 0; comp < 4; ++comp) { + if (useBinary) { + // Binary color image + for (x = 0; x < w; ++x) { + col[comp] |= p[4*x + comp]; + hexBuf[i++] = p[4*x + comp]; + if (i >= 64) { + writePSBuf(hexBuf, i); + i = 0; + } + } + } else { + // Gray color image + for (x = 0; x < w; ++x) { + col[comp] |= p[4*x + comp]; + digit = p[4*x + comp] / 16; + hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); + digit = p[4*x + comp] % 16; + hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); + if (i >= 64) { + hexBuf[i++] = '\n'; + writePSBuf(hexBuf, i); + i = 0; + } + } + } + } + p -= bitmap->getRowSize(); + } + } else { + // Color image, do not need to check color flags + for (y = 0; y < h; ++y) { + for (comp = 0; comp < 4; ++comp) { + if (useBinary) { + // Binary color image + for (x = 0; x < w; ++x) { + hexBuf[i++] = p[4*x + comp]; + if (i >= 64) { + writePSBuf(hexBuf, i); + i = 0; + } + } + } else { + // Hex color image + for (x = 0; x < w; ++x) { + digit = p[4*x + comp] / 16; + hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); + digit = p[4*x + comp] % 16; + hexBuf[i++] = digit + ((digit >= 10)? 'a' - 10: '0'); + if (i >= 64) { + hexBuf[i++] = '\n'; + writePSBuf(hexBuf, i); + i = 0; + } + } + } + } + p -= bitmap->getRowSize(); } - p += bitmap->getRowSize(); } - } - if (i != 0) { - if (!useBinary) { - hexBuf[i++] = '\n'; + if (i != 0) { + if (!useBinary) { + hexBuf[i++] = '\n'; + } + writePSBuf(hexBuf, i); } - writePSBuf(hexBuf, i); - } - if (col[0]) { - processColors |= psProcessCyan; - } - if (col[1]) { - processColors |= psProcessMagenta; - } - if (col[2]) { - processColors |= psProcessYellow; - } - if (col[3]) { - processColors |= psProcessBlack; - } - break; - case psLevel2Sep: - case psLevel3Sep: - obj.initNull(); - str0 = new MemStream((char *)bitmap->getDataPtr(), 0, w * h * 4, &obj); - isGray = gTrue; - while ((compCyan = str0->getChar()) != EOF) { - if (str0->getChar() != compCyan || - str0->getChar() != compCyan) { - isGray = gFalse; - break; + if (col[0]) { + processColors |= psProcessCyan; } - str0->getChar(); - } - str0->reset(); - if (isGray) { - writePS("/DeviceGray setcolorspace\n"); - str = new RunLengthEncoder(new CMKYGrayEncoder(str0)); - } else { - processColors |= psProcessCMYK; - writePS("/DeviceCMYK setcolorspace\n"); - str = new RunLengthEncoder(str0); - } - writePS("<<\n /ImageType 1\n"); - writePSFmt(" /Width {0:d}\n", bitmap->getWidth()); - writePSFmt(" /Height {0:d}\n", bitmap->getHeight()); - writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", w, -h, h); - writePS(" /BitsPerComponent 8\n"); - if (isGray) { - writePS(" /Decode [1 0]\n"); - } else { - writePS(" /Decode [0 1 0 1 0 1 0 1]\n"); - } - writePS(" /DataSource currentfile\n"); - useBinary = globalParams->getPSBinary(); - if (useBinary) { - /* nothing to do */; - } else if (globalParams->getPSASCIIHex()) { - writePS(" /ASCIIHexDecode filter\n"); - } else { - writePS(" /ASCII85Decode filter\n"); - } - writePS(" /RunLengthDecode filter\n"); - writePS(">>\n"); - if (useBinary) { - /* nothing to do */; - } else if (globalParams->getPSASCIIHex()) { - str = new ASCIIHexEncoder(str); - } else { - str = new ASCII85Encoder(str); - } - str->reset(); - if (useBinary) { - int len = 0; - while (str->getChar() != EOF) { - len++; + if (col[1]) { + processColors |= psProcessMagenta; + } + if (col[2]) { + processColors |= psProcessYellow; + } + if (col[3]) { + processColors |= psProcessBlack; + } + break; + case psLevel2: + case psLevel2Sep: + case psLevel3: + case psLevel3Sep: + obj.initNull(); + p = bitmap->getDataPtr() + (h - 1) * bitmap->getRowSize(); + str0 = new MemStream((char *)p, 0, w * h * numComps, &obj); + // Check for a color image that uses only gray + if (numComps == 4) { + int compCyan; + isGray = gTrue; + while ((compCyan = str0->getChar()) != EOF) { + if (str0->getChar() != compCyan || + str0->getChar() != compCyan) { + isGray = gFalse; + break; + } + str0->getChar(); + } + } else if (numComps == 3) { + int compRed; + isGray = gTrue; + while ((compRed = str0->getChar()) != EOF) { + if (str0->getChar() != compRed || + str0->getChar() != compRed) { + isGray = gFalse; + break; + } + } + } else { + isGray = gFalse; + } + str0->reset(); + if (isGray && numComps == 4) { + str = new RunLengthEncoder(new CMYKGrayEncoder(str0)); + numComps = 1; + } else if (isGray && numComps == 3) { + str = new RunLengthEncoder(new RGBGrayEncoder(str0)); + numComps = 1; + } else { + str = new RunLengthEncoder(str0); + } + if (numComps == 1) { + writePS("/DeviceGray setcolorspace\n"); + } else if (numComps == 3) { + writePS("/DeviceRGB setcolorspace\n"); + } else { + writePS("/DeviceCMYK setcolorspace\n"); + } + writePS("<<\n /ImageType 1\n"); + writePSFmt(" /Width {0:d}\n", bitmap->getWidth()); + writePSFmt(" /Height {0:d}\n", bitmap->getHeight()); + writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", w, -h, h); + writePS(" /BitsPerComponent 8\n"); + if (numComps == 1) { + writePS(" /Decode [1 0]\n"); + } else if (numComps == 3) { + writePS(" /Decode [0 1 0 1 0 1]\n"); + } else { + writePS(" /Decode [0 1 0 1 0 1 0 1]\n"); + } + writePS(" /DataSource currentfile\n"); + useBinary = globalParams->getPSBinary(); + if (useBinary) { + /* nothing to do */; + } else if (globalParams->getPSASCIIHex()) { + writePS(" /ASCIIHexDecode filter\n"); + } else { + writePS(" /ASCII85Decode filter\n"); + } + writePS(" /RunLengthDecode filter\n"); + writePS(">>\n"); + if (useBinary) { + /* nothing to do */; + } else if (globalParams->getPSASCIIHex()) { + str = new ASCIIHexEncoder(str); + } else { + str = new ASCII85Encoder(str); } str->reset(); - writePSFmt("%%BeginData: {0:d} Binary Bytes\n", len+6+1); - } - writePS("image\n"); - while ((c = str->getChar()) != EOF) { - writePSChar(c); - } - if (useBinary) { - writePS("\n%%EndData\n"); - } else if (isGray) { - writePSChar('\n'); - } - str->close(); - delete str; - delete str0; - break; - case psLevel2: - case psLevel3: - writePS("/DeviceRGB setcolorspace\n"); - writePS("<<\n /ImageType 1\n"); - writePSFmt(" /Width {0:d}\n", bitmap->getWidth()); - writePSFmt(" /Height {0:d}\n", bitmap->getHeight()); - writePSFmt(" /ImageMatrix [{0:d} 0 0 {1:d} 0 {2:d}]\n", w, -h, h); - writePS(" /BitsPerComponent 8\n"); - writePS(" /Decode [0 1 0 1 0 1]\n"); - writePS(" /DataSource currentfile\n"); - if (globalParams->getPSASCIIHex()) { - writePS(" /ASCIIHexDecode filter\n"); - } else { - writePS(" /ASCII85Decode filter\n"); - } - writePS(" /RunLengthDecode filter\n"); - writePS(">>\n"); - writePS("image\n"); - obj.initNull(); - str0 = new MemStream((char *)bitmap->getDataPtr(), 0, w * h * 3, &obj); - str = new RunLengthEncoder(str0); - if (globalParams->getPSASCIIHex()) { - str = new ASCIIHexEncoder(str); - } else { - str = new ASCII85Encoder(str); - } - str->reset(); - while ((c = str->getChar()) != EOF) { - writePSChar(c); + if (useBinary) { + // Count the bytes to write a document comment + int len = 0; + while (str->getChar() != EOF) { + len++; + } + str->reset(); + writePSFmt("%%BeginData: {0:d} Binary Bytes\n", len+6+1); + } + writePS("image\n"); + while ((c = str->getChar()) != EOF) { + writePSChar(c); + } + str->close(); + delete str; + delete str0; + writePSChar('\n'); + if (useBinary) { + writePS("%%EndData\n"); + } + processColors |= (numComps == 1) ? psProcessBlack : psProcessCMYK; + break; } - str->close(); - delete str; - delete str0; - processColors |= psProcessCMYK; - break; + writePS("grestore\n"); } + delete splashOut; - writePS("grestore\n"); // finish the PS page endPage(); return gFalse; -#else + +#else // HAVE_SPLASH + + error(errSyntaxWarning, -1, + "PDF page uses transparency and PSOutputDev was built without" + " the Splash rasterizer - output may not be correct"); return gTrue; -#endif +#endif // HAVE_SPLASH } void PSOutputDev::startPage(int pageNum, GfxState *state) { - int x1, y1, x2, y2, width, height; + Page *page; + int x1, y1, x2, y2, width, height, t; int imgWidth, imgHeight, imgWidth2, imgHeight2; GBool landscape; + GooString *s; if (mode == psModePS || mode == psModePSOrigPageSizes) { GooString pageLabel; - const GBool gotLabel = m_catalog->indexToLabel(pageNum -1, &pageLabel); + const GBool gotLabel = doc->getCatalog()->indexToLabel(pageNum -1, &pageLabel); if (gotLabel) { // See bug13338 for why we try to avoid parentheses... GBool needParens; @@ -3424,6 +3498,19 @@ } else { writePSFmt("%%Page: {0:d} {1:d}\n", pageNum, seqPage); } + if (paperMatch) { + page = doc->getCatalog()->getPage(pageNum); + imgLLX = imgLLY = 0; + imgURX = (int)ceil(page->getMediaWidth()); + imgURY = (int)ceil(page->getMediaHeight()); + if (state->getRotate() == 90 || state->getRotate() == 270) { + t = imgURX; + imgURX = imgURY; + imgURY = t; + } + writePSFmt("%%PageMedia: {0:d}x{1:d}\n", imgURX, imgURY); + writePSFmt("%%PageBoundingBox: 0 0 {0:d} {1:d}\n", imgURX, imgURY); + } if (mode != psModePSOrigPageSizes) writePS("%%BeginPageSetup\n"); } @@ -3436,6 +3523,7 @@ saveState(NULL); } + xScale = yScale = 1; switch (mode) { case psModePSOrigPageSizes: @@ -3479,20 +3567,25 @@ height = y2 - y1; tx = ty = 0; // rotation and portrait/landscape mode - if (rotate0 >= 0) { + if (paperMatch) { + rotate = (360 - state->getRotate()) % 360; + landscape = gFalse; + } else if (rotate0 >= 0) { rotate = (360 - rotate0) % 360; landscape = gFalse; } else { rotate = (360 - state->getRotate()) % 360; if (rotate == 0 || rotate == 180) { - if (width > height && width > imgWidth) { + if ((width < height && imgWidth > imgHeight && height > imgHeight) || + (width > height && imgWidth < imgHeight && width > imgWidth)) { rotate += 90; landscape = gTrue; } else { landscape = gFalse; } } else { // rotate == 90 || rotate == 270 - if (height > width && height > imgWidth) { + if ((height < width && imgWidth > imgHeight && width > imgHeight) || + (height > width && imgWidth < imgHeight && height > imgWidth)) { rotate = 270 - rotate; landscape = gTrue; } else { @@ -3502,6 +3595,9 @@ } writePSFmt("%%PageOrientation: {0:s}\n", landscape ? "Landscape" : "Portrait"); + if (paperMatch) { + writePSFmt("{0:d} {1:d} pdfSetupPaper\n", imgURX, imgURY); + } writePS("pdfStartPage\n"); if (rotate == 0) { imgWidth2 = imgWidth; @@ -3538,8 +3634,6 @@ } else { yScale = xScale; } - } else { - xScale = yScale = 1; } // deal with odd bounding boxes or clipping if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) { @@ -3551,8 +3645,8 @@ } // center if (tx0 >= 0 && ty0 >= 0) { - tx += rotate == 0 ? tx0 : ty0; - ty += rotate == 0 ? ty0 : -tx0; + tx += (rotate == 0 || rotate == 180) ? tx0 : ty0; + ty += (rotate == 0 || rotate == 180) ? ty0 : -tx0; } else if (globalParams->getPSCenter()) { if (clipLLX0 < clipURX0 && clipLLY0 < clipURY0) { tx += (imgWidth2 - xScale * (clipURX0 - clipLLX0)) / 2; @@ -3562,8 +3656,8 @@ ty += (imgHeight2 - yScale * height) / 2; } } - tx += rotate == 0 ? imgLLX : imgLLY; - ty += rotate == 0 ? imgLLY : -imgLLX; + tx += (rotate == 0 || rotate == 180) ? imgLLX : imgLLY; + ty += (rotate == 0 || rotate == 180) ? imgLLY : -imgLLX; if (tx != 0 || ty != 0) { writePSFmt("{0:.6g} {1:.6g} translate\n", tx, ty); } @@ -3577,7 +3671,6 @@ writePSFmt("{0:d} {1:d} {2:d} {3:d} re W\n", x1, y1, x2 - x1, y2 - y1); } - writePS("%%EndPageSetup\n"); ++seqPage; break; @@ -3602,7 +3695,6 @@ if (tx != 0 || ty != 0) { writePSFmt("{0:.6g} {1:.6g} translate\n", tx, ty); } - xScale = yScale = 1; break; case psModeForm: @@ -3610,10 +3702,21 @@ writePS("begin xpdf begin\n"); writePS("pdfStartPage\n"); tx = ty = 0; - xScale = yScale = 1; rotate = 0; break; } + + if (customCodeCbk) { + if ((s = (*customCodeCbk)(this, psOutCustomPageSetup, pageNum, + customCodeCbkData))) { + writePS(s->getCString()); + delete s; + } + } + + if (mode == psModePS) { + writePS("%%EndPageSetup\n"); + } } void PSOutputDev::endPage() { @@ -3882,6 +3985,26 @@ GfxColor color; GfxCMYK cmyk; + if (!sepCS->getName()->cmp("Black")) { + processColors |= psProcessBlack; + return; + } + if (!sepCS->getName()->cmp("Cyan")) { + processColors |= psProcessCyan; + return; + } + if (!sepCS->getName()->cmp("Yellow")) { + processColors |= psProcessYellow; + return; + } + if (!sepCS->getName()->cmp("Magenta")) { + processColors |= psProcessMagenta; + return; + } + if (!sepCS->getName()->cmp("All")) + return; + if (!sepCS->getName()->cmp("None")) + return; for (cc = customColors; cc; cc = cc->next) { if (!cc->name->cmp(sepCS->getName())) { return; @@ -3908,6 +4031,12 @@ } } +void PSOutputDev::updateOverprintMode(GfxState *state) { + if (level >= psLevel3) { + writePSFmt("{0:s} opm\n", state->getOverprintMode() ? "true" : "false"); + } +} + void PSOutputDev::updateTransfer(GfxState *state) { Function **funcs; int i; @@ -3935,7 +4064,7 @@ if (state->getFont()) { writePSFmt("/F{0:d}_{1:d} {2:.6g} Tf\n", state->getFont()->getID()->num, state->getFont()->getID()->gen, - fabs(state->getFontSize()) < 0.00001 ? 0.00001 + fabs(state->getFontSize()) < 0.0001 ? 0.0001 : state->getFontSize()); } } @@ -3998,9 +4127,17 @@ } } +void PSOutputDev::saveTextPos(GfxState *state) { + writePS("currentpoint\n"); +} + +void PSOutputDev::restoreTextPos(GfxState *state) { + writePS("m\n"); +} + void PSOutputDev::stroke(GfxState *state) { doPath(state->getPath()); - if (t3String) { + if (inType3Char && t3FillColorOnly) { // if we're construct a cacheable Type 3 glyph, we need to do // everything in the fill color writePS("Sf\n"); @@ -4051,11 +4188,12 @@ box.y1 = bbox[1]; box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(xref, this, resDict, m_catalog, &box, NULL); + gfx = new Gfx(doc, this, resDict, &box, NULL); writePS("/x {\n"); if (paintType == 2) { writePSFmt("{0:.6g} 0 {1:.6g} {2:.6g} {3:.6g} {4:.6g} setcachedevice\n", xStep, bbox[0], bbox[1], bbox[2], bbox[3]); + t3FillColorOnly = gTrue; } else { if (x1 - 1 <= x0) { @@ -4063,6 +4201,7 @@ } else { writePSFmt("{0:.6g} 0 setcharwidth\n", xStep); } + t3FillColorOnly = gFalse; } inType3Char = gTrue; if (paintType == 2) { @@ -4089,6 +4228,7 @@ // draw the tiles writePSFmt("/xpdfTile{0:d} findfont setfont\n", numTilingPatterns); + writePS("fCol\n"); writePSFmt("gsave [{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] concat\n", mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); writePSFmt("{0:d} 1 {1:d} {{ {2:.6g} exch {3:.6g} mul m {4:d} 1 {5:d} {{ pop (x) show }} for }} for\n", @@ -4121,7 +4261,7 @@ box.y1 = bbox[1]; box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(xref, this, resDict, m_catalog, &box, NULL); + gfx = new Gfx(doc, this, resDict, &box, NULL); inType3Char = gTrue; if (paintType == 2) { inUncoloredPattern = gTrue; @@ -4147,7 +4287,7 @@ return gTrue; } -GBool PSOutputDev::tilingPatternFill(GfxState *state, Catalog *cat, Object *str, +GBool PSOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, @@ -4166,7 +4306,7 @@ box.y1 = bbox[1]; box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(xref, this, resDict, m_catalog, &box, NULL); + gfx = new Gfx(doc, this, resDict, &box, NULL); writePSFmt("[{0:.6g} {1:.6g} {2:.6g} {3:.6g} {4:.6g} {5:.6g}] cm\n", mat[0], mat[1], mat[2], mat[3], tx, ty); inType3Char = gTrue; gfx->display(str); @@ -4323,7 +4463,10 @@ double xMin, yMin, xMax, yMax; double x0, y0, r0, x1, y1, r1, t0, t1; double xa, ya, ra; - double sz, xz, yz, sMin, sMax, sa, ta; + double sMin, sMax, h, ta; + double sLeft, sRight, sTop, sBottom, sZero, sDiag; + GBool haveSLeft, haveSRight, haveSTop, haveSBottom, haveSZero; + GBool haveSMin, haveSMax; double theta, alpha, a1, a2; GBool enclosed; int i; @@ -4342,19 +4485,21 @@ // Compute the point at which r(s) = 0; check for the enclosed // circles case; and compute the angles for the tangent lines. - if (r0 == r1) { - enclosed = x0 == x1 && y0 == y1; + // Compute the point at which r(s) = 0; check for the enclosed + // circles case; and compute the angles for the tangent lines. + h = sqrt((x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0)); + if (h == 0) { + enclosed = gTrue; + theta = 0; // make gcc happy + } else if (r1 - r0 == 0) { + enclosed = gFalse; theta = 0; - sz = 0; // make gcc happy + } else if (fabs(r1 - r0) >= h) { + enclosed = gTrue; + theta = 0; // make gcc happy } else { - sz = -r0 / (r1 - r0); - xz = x0 + sz * (x1 - x0); - yz = y0 + sz * (y1 - y0); - enclosed = (xz - x0) * (xz - x0) + (yz - y0) * (yz - y0) <= r0 * r0; - theta = asin(r0 / sqrt((x0 - xz) * (x0 - xz) + (y0 - yz) * (y0 - yz))); - if (r0 > r1) { - theta = -theta; - } + enclosed = gFalse; + theta = asin((r1 - r0) / h); } if (enclosed) { a1 = 0; @@ -4374,59 +4519,101 @@ sMin = 0; sMax = 1; } else { - sMin = 1; - sMax = 0; - // solve for x(s) + r(s) = xMin - if ((x1 + r1) - (x0 + r0) != 0) { - sa = (xMin - (x0 + r0)) / ((x1 + r1) - (x0 + r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // solve for x(s) - r(s) = xMax - if ((x1 - r1) - (x0 - r0) != 0) { - sa = (xMax - (x0 - r0)) / ((x1 - r1) - (x0 - r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // solve for y(s) + r(s) = yMin - if ((y1 + r1) - (y0 + r0) != 0) { - sa = (yMin - (y0 + r0)) / ((y1 + r1) - (y0 + r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // solve for y(s) - r(s) = yMax - if ((y1 - r1) - (y0 - r0) != 0) { - sa = (yMax - (y0 - r0)) / ((y1 - r1) - (y0 - r0)); - if (sa < sMin) { - sMin = sa; - } else if (sa > sMax) { - sMax = sa; - } - } - // check against sz - if (r0 < r1) { - if (sMin < sz) { - sMin = sz; - } - } else if (r0 > r1) { - if (sMax > sz) { - sMax = sz; - } + // solve x(sLeft) + r(sLeft) = xMin + if ((haveSLeft = fabs((x1 + r1) - (x0 + r0)) > 0.000001)) { + sLeft = (xMin - (x0 + r0)) / ((x1 + r1) - (x0 + r0)); + } else { + sLeft = 0; // make gcc happy + } + // solve x(sRight) - r(sRight) = xMax + if ((haveSRight = fabs((x1 - r1) - (x0 - r0)) > 0.000001)) { + sRight = (xMax - (x0 - r0)) / ((x1 - r1) - (x0 - r0)); + } else { + sRight = 0; // make gcc happy + } + // solve y(sBottom) + r(sBottom) = yMin + if ((haveSBottom = fabs((y1 + r1) - (y0 + r0)) > 0.000001)) { + sBottom = (yMin - (y0 + r0)) / ((y1 + r1) - (y0 + r0)); + } else { + sBottom = 0; // make gcc happy + } + // solve y(sTop) - r(sTop) = yMax + if ((haveSTop = fabs((y1 - r1) - (y0 - r0)) > 0.000001)) { + sTop = (yMax - (y0 - r0)) / ((y1 - r1) - (y0 - r0)); + } else { + sTop = 0; // make gcc happy + } + // solve r(sZero) = 0 + if ((haveSZero = fabs(r1 - r0) > 0.000001)) { + sZero = -r0 / (r1 - r0); + } else { + sZero = 0; // make gcc happy + } + // solve r(sDiag) = sqrt((xMax-xMin)^2 + (yMax-yMin)^2) + if (haveSZero) { + sDiag = (sqrt((xMax - xMin) * (xMax - xMin) + + (yMax - yMin) * (yMax - yMin)) - r0) / (r1 - r0); + } else { + sDiag = 0; // make gcc happy } - // check the 'extend' flags - if (!shading->getExtend0() && sMin < 0) { + // compute sMin + if (shading->getExtend0()) { + sMin = 0; + haveSMin = gFalse; + if (x0 < x1 && haveSLeft && sLeft < 0) { + sMin = sLeft; + haveSMin = gTrue; + } else if (x0 > x1 && haveSRight && sRight < 0) { + sMin = sRight; + haveSMin = gTrue; + } + if (y0 < y1 && haveSBottom && sBottom < 0) { + if (!haveSMin || sBottom > sMin) { + sMin = sBottom; + haveSMin = gTrue; + } + } else if (y0 > y1 && haveSTop && sTop < 0) { + if (!haveSMin || sTop > sMin) { + sMin = sTop; + haveSMin = gTrue; + } + } + if (haveSZero && sZero < 0) { + if (!haveSMin || sZero > sMin) { + sMin = sZero; + } + } + } else { sMin = 0; } - if (!shading->getExtend1() && sMax > 1) { + // compute sMax + if (shading->getExtend1()) { + sMax = 1; + haveSMax = gFalse; + if (x1 < x0 && haveSLeft && sLeft > 1) { + sMax = sLeft; + haveSMax = gTrue; + } else if (x1 > x0 && haveSRight && sRight > 1) { + sMax = sRight; + haveSMax = gTrue; + } + if (y1 < y0 && haveSBottom && sBottom > 1) { + if (!haveSMax || sBottom < sMax) { + sMax = sBottom; + haveSMax = gTrue; + } + } else if (y1 > y0 && haveSTop && sTop > 1) { + if (!haveSMax || sTop < sMax) { + sMax = sTop; + haveSMax = gTrue; + } + } + if (haveSZero && sDiag > 1) { + if (!haveSMax || sDiag < sMax) { + sMax = sDiag; + } + } + } else { sMax = 1; } } @@ -4595,15 +4782,16 @@ void PSOutputDev::drawString(GfxState *state, GooString *s) { GfxFont *font; int wMode; - Gushort *codeToGID; + int *codeToGID; GooString *s2; - double dx, dy, dx2, dy2, originX, originY; + double dx, dy, originX, originY; char *p; UnicodeMap *uMap; CharCode code; Unicode *u; char buf[8]; - int len, nChars, uLen, n, m, i, j; + double *dxdy; + int dxdySize, len, nChars, uLen, n, m, i, j; // for pdftohtml, output PS without text if( displayText == gFalse ) @@ -4632,6 +4820,10 @@ for (i = 0; i < font16EncLen; ++i) { if (font->getID()->num == font16Enc[i].fontID.num && font->getID()->gen == font16Enc[i].fontID.gen) { + if (!font16Enc[i].enc) { + // font substitution failed, so don't output any text + return; + } uMap = globalParams->getUnicodeMap(font16Enc[i].enc); break; } @@ -4648,131 +4840,142 @@ } } - // compute width of chars in string, ignoring char spacing and word - // spacing -- the Tj operator will adjust for the metrics of the - // font that's actually used - dx = dy = 0; + // compute the positioning (dx, dy) for each char in the string nChars = 0; p = s->getCString(); len = s->getLength(); s2 = new GooString(); + dxdySize = font->isCIDFont() ? 8 : s->getLength(); + dxdy = (double *)gmallocn(2 * dxdySize, sizeof(double)); while (len > 0) { n = font->getNextChar(p, len, &code, &u, &uLen, - &dx2, &dy2, &originX, &originY); + &dx, &dy, &originX, &originY); + dx *= state->getFontSize(); + dy *= state->getFontSize(); + if (wMode) { + dy += state->getCharSpace(); + if (n == 1 && *p == ' ') { + dy += state->getWordSpace(); + } + } else { + dx += state->getCharSpace(); + if (n == 1 && *p == ' ') { + dx += state->getWordSpace(); + } + } + dx *= state->getHorizScaling(); if (font->isCIDFont()) { if (uMap) { + if (nChars + uLen > dxdySize) { + do { + dxdySize *= 2; + } while (nChars + uLen > dxdySize); + dxdy = (double *)greallocn(dxdy, 2 * dxdySize, sizeof(double)); + } for (i = 0; i < uLen; ++i) { m = uMap->mapUnicode(u[i], buf, (int)sizeof(buf)); for (j = 0; j < m; ++j) { s2->append(buf[j]); } + //~ this really needs to get the number of chars in the target + //~ encoding - which may be more than the number of Unicode + //~ chars + dxdy[2 * nChars] = dx; + dxdy[2 * nChars + 1] = dy; + ++nChars; } - //~ this really needs to get the number of chars in the target - //~ encoding - which may be more than the number of Unicode - //~ chars - nChars += uLen; } else { + if (nChars + 1 > dxdySize) { + dxdySize *= 2; + dxdy = (double *)greallocn(dxdy, 2 * dxdySize, sizeof(double)); + } s2->append((char)((code >> 8) & 0xff)); s2->append((char)(code & 0xff)); + dxdy[2 * nChars] = dx; + dxdy[2 * nChars + 1] = dy; ++nChars; } } else { - if (!codeToGID || codeToGID[code]) { + if (!codeToGID || codeToGID[code] >= 0) { s2->append((char)code); + dxdy[2 * nChars] = dx; + dxdy[2 * nChars + 1] = dy; + ++nChars; } } - dx += dx2; - dy += dy2; p += n; len -= n; } - dx *= state->getFontSize() * state->getHorizScaling(); - dy *= state->getFontSize(); if (uMap) { uMap->decRefCnt(); } - if (s2->getLength() > 0) { + if (nChars > 0) { writePSString(s2); - if (font->isCIDFont()) { - if (wMode) { - writePSFmt(" {0:d} {1:.6g} Tj16V\n", nChars, dy); - } else { - writePSFmt(" {0:d} {1:.6g} Tj16\n", nChars, dx); + writePS("\n["); + for (i = 0; i < 2 * nChars; ++i) { + if (i > 0) { + writePS("\n"); } - } else { - writePSFmt(" {0:.6g} Tj\n", dx); + writePSFmt("{0:.6g}", dxdy[i]); } + writePS("] Tj\n"); } + gfree(dxdy); delete s2; - if (state->getRender() & 4 || haveCSPattern) { + if (state->getRender() & 4) { haveTextClip = gTrue; } } void PSOutputDev::beginTextObject(GfxState *state) { - if (state->getFillColorSpace()->getMode() == csPattern) { - saveState(state); - haveCSPattern = gTrue; - writePS("true Tp\n"); - } } void PSOutputDev::endTextObject(GfxState *state) { - if (haveCSPattern) { - if (haveTextClip) { - writePS("Tclip*\n"); - haveTextClip = gFalse; - if (state->getFillColorSpace()->getMode() != csPattern) { - double cxMin, cyMin, cxMax, cyMax; - state->getClipBBox(&cxMin, &cyMin, &cxMax, &cyMax); - writePSFmt("{0:.6g} {1:.6g} {2:.6g} {3:.6g} re\n", - cxMin, cyMin, - cxMax, cyMax); - writePS("f*\n"); - restoreState(state); - updateFillColor(state); - } - } - haveCSPattern = gFalse; - } else if (haveTextClip) { + if (haveTextClip) { writePS("Tclip\n"); haveTextClip = gFalse; } } -void PSOutputDev::endMaskClip(GfxState * state) { - writePS("pdfImClipEnd\n"); -} - void PSOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) { int len; len = height * ((width + 7) / 8); - if (state->getFillColorSpace()->getMode() == csPattern && (level != psLevel1 && level != psLevel1Sep)) { + switch (level) { + case psLevel1: + case psLevel1Sep: + doImageL1(ref, NULL, invert, inlineImg, str, width, height, len, + NULL, NULL, 0, 0, gFalse); + break; + case psLevel2: + case psLevel2Sep: + doImageL2(ref, NULL, invert, inlineImg, str, width, height, len, + NULL, NULL, 0, 0, gFalse); + break; + case psLevel3: + case psLevel3Sep: + doImageL3(ref, NULL, invert, inlineImg, str, width, height, len, + NULL, NULL, 0, 0, gFalse); + break; + } +} + +void PSOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix) { + if (level != psLevel1 && level != psLevel1Sep) { maskToClippingPath(str, width, height, invert); - } else { - switch (level) { - case psLevel1: - case psLevel1Sep: - doImageL1(ref, NULL, invert, inlineImg, str, width, height, len, - NULL, NULL, 0, 0, gFalse); - break; - case psLevel2: - case psLevel2Sep: - doImageL2(ref, NULL, invert, inlineImg, str, width, height, len, - NULL, NULL, 0, 0, gFalse); - break; - case psLevel3: - case psLevel3Sep: - doImageL3(ref, NULL, invert, inlineImg, str, width, height, len, - NULL, NULL, 0, 0, gFalse); - break; - } + } +} + +void PSOutputDev::unsetSoftMaskFromImageMask(GfxState * state, double *baseMatrix) { + if (level != psLevel1 && level != psLevel1Sep) { + writePS("pdfImClipEnd\n"); } } @@ -4892,7 +5095,7 @@ delete str; } else { // make sure the image is setup, it sometimes is not like on bug #17645 - setupImage(ref->getRef(), str); + setupImage(ref->getRef(), str, gFalse); // set up to use the array already created by setupImages() writePSFmt("ImData_{0:d}_{1:d} 0 0\n", ref->getRefNum(), ref->getRefGen()); } @@ -5476,7 +5679,7 @@ delete str2; } else { // make sure the image is setup, it sometimes is not like on bug #17645 - setupImage(ref->getRef(), str); + setupImage(ref->getRef(), str, gFalse); // set up to use the array already created by setupImages() writePSFmt("ImData_{0:d}_{1:d} 0 0\n",ref->getRefNum(), ref->getRefGen()); } @@ -5533,7 +5736,7 @@ // data source if (mode == psModeForm || inType3Char || preload) { if (inlineImg) { - writePS(" /DataSource { 2 copy get exch 1 add exch }\n"); + writePS(" /DataSource { pdfImStr }\n"); } else { writePS(" /DataSource { dup 65535 ge { pop 1 add 0 } if 2 index 2" " index get 1 index get exch 1 add exch }\n"); @@ -5543,18 +5746,26 @@ } // filters - s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3, - " "); - if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) || - inlineImg || !s) { - useRLE = gTrue; - useASCII = !(mode == psModeForm || inType3Char || preload); + if ((mode == psModeForm || inType3Char || preload) && + globalParams->getPSUncompressPreloadedImages()) { + s = NULL; + useRLE = gFalse; useCompressed = gFalse; + useASCII = gFalse; } else { - useRLE = gFalse; - useASCII = str->isBinary() && - !(mode == psModeForm || inType3Char || preload); - useCompressed = gTrue; + s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3, + " "); + if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) || + inlineImg || !s) { + useRLE = gTrue; + useASCII = !(mode == psModeForm || inType3Char || preload); + useCompressed = gFalse; + } else { + useRLE = gFalse; + useASCII = str->isBinary() && + !(mode == psModeForm || inType3Char || preload); + useCompressed = gTrue; + } } if (useASCII) { writePSFmt(" /ASCII{0:s}Decode filter\n", @@ -5611,7 +5822,7 @@ if (opi13Nest) { if (inlineImg) { // this can't happen -- OPI dictionaries are in XObjects - error(-1, "Internal: OPI in inline image"); + error(errSyntaxError, -1, "OPI in inline image"); n = 0; } else { // need to read the stream to count characters -- the length @@ -5630,7 +5841,7 @@ } #endif if ((level == psLevel2Sep || level == psLevel3Sep) && colorMap && - colorMap->getColorSpace()->getMode() == csSeparation) { + colorMap->getColorSpace()->getMode() == csSeparation && colorMap->getBits() == 8) { color.c[0] = gfxColorComp1; sepCS = (GfxSeparationColorSpace *)colorMap->getColorSpace(); sepCS->getCMYK(&color, &cmyk); @@ -5692,6 +5903,7 @@ int n, numComps; GBool useRLE, useASCII, useASCIIHex, useCompressed; GBool maskUseRLE, maskUseASCII, maskUseCompressed; + GooString *maskFilters; GfxSeparationColorSpace *sepCS; GfxColor color; GfxCMYK cmyk; @@ -5701,6 +5913,83 @@ useASCIIHex = globalParams->getPSASCIIHex(); useRLE = useASCII = useCompressed = gFalse; // make gcc happy maskUseRLE = maskUseASCII = maskUseCompressed = gFalse; // make gcc happy + maskFilters = NULL; // make gcc happy + + // explicit masking + if (maskStr) { + + // mask data source + if ((mode == psModeForm || inType3Char || preload) && + globalParams->getPSUncompressPreloadedImages()) { + s = NULL; + maskUseRLE = gFalse; + maskUseCompressed = gFalse; + maskUseASCII = gFalse; + } else { + s = maskStr->getPSFilter(3, " "); + if (!s) { + maskUseRLE = gTrue; + maskUseASCII = !(mode == psModeForm || inType3Char || preload); + maskUseCompressed = gFalse; + } else { + maskUseRLE = gFalse; + maskUseASCII = maskStr->isBinary() && + !(mode == psModeForm || inType3Char || preload); + maskUseCompressed = gTrue; + } + } + maskFilters = new GooString(); + if (maskUseASCII) { + maskFilters->appendf(" /ASCII{0:s}Decode filter\n", + useASCIIHex ? "Hex" : "85"); + } + if (maskUseRLE) { + maskFilters->append(" /RunLengthDecode filter\n"); + } + if (maskUseCompressed) { + maskFilters->append(s); + } + if (s) { + delete s; + } + if (mode == psModeForm || inType3Char || preload) { + writePSFmt("MaskData_{0:d}_{1:d} pdfMaskInit\n", + ref->getRefNum(), ref->getRefGen()); + } else { + writePS("currentfile\n"); + writePS(maskFilters->getCString()); + writePS("pdfMask\n"); + + // add RunLengthEncode and ASCIIHex/85 encode filters + if (maskUseCompressed) { + maskStr = maskStr->getUndecodedStream(); + } + if (maskUseRLE) { + maskStr = new RunLengthEncoder(maskStr); + } + if (maskUseASCII) { + if (useASCIIHex) { + maskStr = new ASCIIHexEncoder(maskStr); + } else { + maskStr = new ASCII85Encoder(maskStr); + } + } + + // copy the stream data + maskStr->reset(); + while ((c = maskStr->getChar()) != EOF) { + writePSChar(c); + } + maskStr->close(); + writePSChar('\n'); + writePS("%-EOD-\n"); + + // delete encoders + if (maskUseRLE || maskUseASCII) { + delete maskStr; + } + } + } // color space if (colorMap) { @@ -5764,7 +6053,7 @@ delete str2; } else { // make sure the image is setup, it sometimes is not like on bug #17645 - setupImage(ref->getRef(), str); + setupImage(ref->getRef(), str, gFalse); // set up to use the array already created by setupImages() writePSFmt("ImData_{0:d}_{1:d} 0 0\n", ref->getRefNum(), ref->getRefGen()); } @@ -5811,15 +6100,6 @@ n = (1 << colorMap->getBits()) - 1; writePSFmt("{0:.4g} {1:.4g}", colorMap->getDecodeLow(0) * n, colorMap->getDecodeHigh(0) * n); - } else if (colorMap->getColorSpace()->getMode() == csDeviceN) { - numComps = ((GfxDeviceNColorSpace *)colorMap->getColorSpace())-> - getAlt()->getNComps(); - for (i = 0; i < numComps; ++i) { - if (i > 0) { - writePS(" "); - } - writePS("0 1"); - } } else { numComps = colorMap->getNumPixelComps(); for (i = 0; i < numComps; ++i) { @@ -5838,7 +6118,7 @@ // data source if (mode == psModeForm || inType3Char || preload) { if (inlineImg) { - writePS(" /DataSource { 2 copy get exch 1 add exch }\n"); + writePS(" /DataSource { pdfImStr }\n"); } else { writePS(" /DataSource { dup 65535 ge { pop 1 add 0 } if 2 index 2" " index get 1 index get exch 1 add exch }\n"); @@ -5848,18 +6128,26 @@ } // filters - s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3, - " "); - if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) || - inlineImg || !s) { - useRLE = gTrue; - useASCII = !(mode == psModeForm || inType3Char || preload); + if ((mode == psModeForm || inType3Char || preload) && + globalParams->getPSUncompressPreloadedImages()) { + s = NULL; + useRLE = gFalse; useCompressed = gFalse; + useASCII = gFalse; } else { - useRLE = gFalse; - useASCII = str->isBinary() && - !(mode == psModeForm || inType3Char || preload); - useCompressed = gTrue; + s = str->getPSFilter(level < psLevel2 ? 1 : level < psLevel3 ? 2 : 3, + " "); + if ((colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) || + inlineImg || !s) { + useRLE = gTrue; + useASCII = !(mode == psModeForm || inType3Char || preload); + useCompressed = gFalse; + } else { + useRLE = gFalse; + useASCII = str->isBinary() && + !(mode == psModeForm || inType3Char || preload); + useCompressed = gTrue; + } } if (useASCII) { writePSFmt(" /ASCII{0:s}Decode filter\n", @@ -5892,30 +6180,13 @@ maskInvert ? 1 : 0, maskInvert ? 0 : 1); // mask data source - writePS(" /DataSource currentfile\n"); - s = maskStr->getPSFilter(3, " "); - if (!s) { - maskUseRLE = gTrue; - maskUseASCII = gTrue; - maskUseCompressed = gFalse; + if (mode == psModeForm || inType3Char || preload) { + writePS(" /DataSource {pdfMaskSrc}\n"); + writePS(maskFilters->getCString()); } else { - maskUseRLE = gFalse; - maskUseASCII = maskStr->isBinary(); - maskUseCompressed = gTrue; - } - if (maskUseASCII) { - writePSFmt(" /ASCII{0:s}Decode filter\n", - useASCIIHex ? "Hex" : "85"); - } - if (maskUseRLE) { - writePS(" /RunLengthDecode filter\n"); - } - if (maskUseCompressed) { - writePS(s->getCString()); - } - if (s) { - delete s; + writePS(" /DataSource maskStream\n"); } + delete maskFilters; writePS(">>\n"); writePS(">>\n"); @@ -5929,7 +6200,7 @@ } else { if ((level == psLevel2Sep || level == psLevel3Sep) && colorMap && - colorMap->getColorSpace()->getMode() == csSeparation) { + colorMap->getColorSpace()->getMode() == csSeparation && colorMap->getBits() == 8) { color.c[0] = gfxColorComp1; sepCS = (GfxSeparationColorSpace *)colorMap->getColorSpace(); sepCS->getCMYK(&color, &cmyk); @@ -5943,39 +6214,6 @@ } - // explicit masking - if (maskStr) { - - if (maskUseCompressed) { - maskStr = maskStr->getUndecodedStream(); - } - - // add RunLengthEncode and ASCIIHex/85 encode filters - if (maskUseRLE) { - maskStr = new RunLengthEncoder(maskStr); - } - if (maskUseASCII) { - if (useASCIIHex) { - maskStr = new ASCIIHexEncoder(maskStr); - } else { - maskStr = new ASCII85Encoder(maskStr); - } - } - - // copy the stream data - maskStr->reset(); - while ((c = maskStr->getChar()) != EOF) { - writePSChar(c); - } - maskStr->close(); - writePSChar('\n'); - - // delete encoders - if (maskUseRLE || maskUseASCII) { - delete maskStr; - } - } - // get rid of the array and index if (mode == psModeForm || inType3Char || preload) { if (!inlineImg) writePS("pop "); @@ -5991,11 +6229,6 @@ str = str->getUndecodedStream(); } - // recode DeviceN data - if (colorMap && colorMap->getColorSpace()->getMode() == csDeviceN) { - str = new DeviceNRecoder(str, width, height, colorMap); - } - // add RunLengthEncode and ASCIIHex/85 encode filters if (useRLE) { str = new RunLengthEncoder(str); @@ -6024,6 +6257,13 @@ delete str; } } + + // close the mask stream + if (maskStr) { + if (!(mode == psModeForm || inType3Char || preload)) { + writePS("pdfMaskEnd\n"); + } + } } void PSOutputDev::dumpColorSpaceL2(GfxColorSpace *colorSpace, @@ -6183,7 +6423,7 @@ numComps = baseCS->getNComps(); lookup = indexedCS->getLookup(); writePSFmt(" {0:d} <\n", n); - if (baseCS->getMode() == csDeviceN) { + if (baseCS->getMode() == csDeviceN && level != psLevel3 && level != psLevel3Sep) { func = ((GfxDeviceNColorSpace *)baseCS)->getTintTransformFunc(); baseCS->getDefaultRanges(low, range, indexedCS->getIndexHigh()); if (((GfxDeviceNColorSpace *)baseCS)->getAlt()->getMode() == csLab) { @@ -6266,12 +6506,29 @@ break; case csDeviceN: - // DeviceN color spaces are a Level 3 PostScript feature. deviceNCS = (GfxDeviceNColorSpace *)colorSpace; - dumpColorSpaceL2(deviceNCS->getAlt(), gFalse, updateColors, map01); - if (genXform) { - writePS(" "); - cvtFunction(deviceNCS->getTintTransformFunc()); + if (level == psLevel3 || level == psLevel3Sep) { + writePS("[/DeviceN\n"); + writePS(" [ "); + for (i = 0; i < deviceNCS->getNComps(); i++) { + writePSString(deviceNCS->getColorantName(i)); + writePS(" "); + } + writePS("]\n"); + dumpColorSpaceL2(deviceNCS->getAlt(), gFalse, updateColors, gFalse); + writePS("\n"); + cvtFunction(deviceNCS->getTintTransformFunc(), map01 && deviceNCS->getAlt()->getMode() == csLab); + writePS("]\n"); + if (genXform) { + writePS(" {}"); + } + } else { + // DeviceN color spaces are a Level 3 PostScript feature. + dumpColorSpaceL2(deviceNCS->getAlt(), gFalse, updateColors, map01); + if (genXform) { + writePS(" "); + cvtFunction(deviceNCS->getTintTransformFunc()); + } } break; @@ -6696,6 +6953,7 @@ t3URY = ury; t3String = new GooString(); writePS("q\n"); + t3FillColorOnly = gTrue; t3Cacheable = gTrue; t3NeedsRestore = gTrue; } @@ -6722,7 +6980,7 @@ //~ can nextFunc be reset to 0 -- maybe at the start of each page? //~ or maybe at the start of each color space / pattern? -void PSOutputDev::cvtFunction(Function *func) { +void PSOutputDev::cvtFunction(Function *func, GBool invertPSFunction) { SampledFunction *func0; ExponentialFunction *func2; StitchingFunction *func3; @@ -6812,7 +7070,14 @@ // [e01] [efrac] y(0) ... y(i-1) y(i) } // [e01] [efrac] y(0) ... y(n-1) - writePSFmt("{0:d} {1:d} roll pop pop }}\n", n+2, n); + writePSFmt("{0:d} {1:d} roll pop pop \n", n+2, n); + if (invertPSFunction) { + for (i = 0; i < n; ++i) { + writePSFmt("{0:d} -1 roll ", n); + writePSFmt("{0:.6g} sub {1:.6g} div ", func0->getRangeMin(i), func0->getRangeMax(i) - func0->getRangeMin(i)); + } + } + writePS("}\n"); break; case 2: // exponential @@ -6834,7 +7099,14 @@ } } // x y(0) .. y(n-1) - writePSFmt("{0:d} {1:d} roll pop }}\n", n+1, n); + writePSFmt("{0:d} {1:d} roll pop \n", n+1, n); + if (invertPSFunction && func2->getHasRange()) { + for (i = 0; i < n; ++i) { + writePSFmt("{0:d} -1 roll ", n); + writePSFmt("{0:.6g} sub {1:.6g} div ", func2->getRangeMin(i), func2->getRangeMax(i) - func2->getRangeMin(i)); + } + } + writePS("}\n"); break; case 3: // stitching @@ -6863,13 +7135,39 @@ for (i = 0; i < func3->getNumFuncs() - 1; ++i) { writePS("} ifelse\n"); } + if (invertPSFunction && func3->getHasRange()) { + n = func3->getOutputSize(); + for (i = 0; i < n; ++i) { + writePSFmt("{0:d} -1 roll ", n); + writePSFmt("{0:.6g} sub {1:.6g} div ", func3->getRangeMin(i), func3->getRangeMax(i) - func3->getRangeMin(i)); + } + } writePS("}\n"); break; case 4: // PostScript func4 = (PostScriptFunction *)func; - writePS(func4->getCodeString()->getCString()); - writePS("\n"); + if (invertPSFunction) { + GooString *codeString = new GooString(func4->getCodeString()); + for (i = codeString->getLength() -1; i > 0; i--) { + if (codeString->getChar(i) == '}') { + codeString->del(i); + break; + } + } + writePS(codeString->getCString()); + writePS("\n"); + delete codeString; + n = func4->getOutputSize(); + for (i = 0; i < n; ++i) { + writePSFmt("{0:d} -1 roll ", n); + writePSFmt("{0:.6g} sub {1:.6g} div ", func4->getRangeMin(i), func4->getRangeMax(i) - func4->getRangeMin(i)); + } + writePS("}\n"); + } else { + writePS(func4->getCodeString()->getCString()); + writePS("\n"); + } break; } } @@ -6882,7 +7180,7 @@ } } -void PSOutputDev::writePS(char *s) { +void PSOutputDev::writePS(const char *s) { if (t3String) { t3String->append(s); } else { @@ -6890,7 +7188,7 @@ } } -void PSOutputDev::writePSBuf(char *s, int len) { +void PSOutputDev::writePSBuf(const char *s, int len) { if (t3String) { for (int i = 0; i < len; i++) { t3String->append(s[i]); @@ -6944,8 +7242,8 @@ writePSChar(')'); } -void PSOutputDev::writePSName(char *s) { - char *p; +void PSOutputDev::writePSName(const char *s) { + const char *p; char c; p = s; @@ -6961,6 +7259,37 @@ } } +GooString *PSOutputDev::filterPSName(GooString *name) { + GooString *name2; + char buf[8]; + int i; + char c; + + name2 = new GooString(); + + // ghostscript chokes on names that begin with out-of-limits + // numbers, e.g., 1e4foo is handled correctly (as a name), but + // 1e999foo generates a limitcheck error + c = name->getChar(0); + if (c >= '0' && c <= '9') { + name2->append('f'); + } + + for (i = 0; i < name->getLength(); ++i) { + c = name->getChar(i); + if (c <= (char)0x20 || c >= (char)0x7f || + c == '(' || c == ')' || c == '<' || c == '>' || + c == '[' || c == ']' || c == '{' || c == '}' || + c == '/' || c == '%') { + sprintf(buf, "#%02x", c & 0xff); + name2->append(buf); + } else { + name2->append(c); + } + } + return name2; +} + // Convert GooString to GooString, with appropriate escaping // of things that can't appear in a label // This is heavily based on the writePSTextLine() method diff -Nru poppler-0.18.4/poppler/PSOutputDev.h poppler-0.20.5/poppler/PSOutputDev.h --- poppler-0.18.4/poppler/PSOutputDev.h 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/PSOutputDev.h 2012-08-15 13:31:38.000000000 +0000 @@ -17,12 +17,13 @@ // Copyright (C) 2005 Kristian Høgsberg // Copyright (C) 2006-2008 Albert Astals Cid // Copyright (C) 2007 Brad Hards -// Copyright (C) 2009-2011 Thomas Freitag +// Copyright (C) 2009-2012 Thomas Freitag // Copyright (C) 2009 Till Kamppeter // Copyright (C) 2009 Carlos Garcia Campos // Copyright (C) 2009, 2011 William Bader // Copyright (C) 2010 Hib Eris // Copyright (C) 2011 Adrian Johnson +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -43,16 +44,20 @@ #include "GlobalParams.h" #include "OutputDev.h" +class GHooash; +class PDFDoc; +class XRef; +class Function; class GfxPath; class GfxFont; class GfxColorSpace; class GfxSeparationColorSpace; class PDFRectangle; +struct PST1FontName; struct PSFont8Info; struct PSFont16Enc; class PSOutCustomColor; -class Function; -class PDFDoc; +class PSOutputDev; //------------------------------------------------------------------------ // PSOutputDev @@ -72,13 +77,22 @@ psGeneric // write to a generic stream }; -typedef void (*PSOutputFunc)(void *stream, char *data, int len); +enum PSOutCustomCodeLocation { + psOutCustomDocSetup, + psOutCustomPageSetup +}; + +typedef void (*PSOutputFunc)(void *stream, const char *data, int len); + +typedef GooString *(*PSOutCustomCodeCbk)(PSOutputDev *psOut, + PSOutCustomCodeLocation loc, int n, + void *data); class PSOutputDev: public OutputDev { public: // Open a PostScript output file, and write the prolog. - PSOutputDev(const char *fileName, PDFDoc *doc, XRef *xrefA, Catalog *catalog, + PSOutputDev(const char *fileName, PDFDoc *docA, char *psTitle, int firstPage, int lastPage, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, @@ -86,20 +100,23 @@ int imgLLXA = 0, int imgLLYA = 0, int imgURXA = 0, int imgURYA = 0, GBool forceRasterizeA = gFalse, - GBool manualCtrlA = gFalse); + GBool manualCtrlA = gFalse, + PSOutCustomCodeCbk customCodeCbkA = NULL, + void *customCodeCbkDataA = NULL); // Open a PSOutputDev that will write to a generic stream. PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, char *psTitle, - PDFDoc *doc, - XRef *xrefA, Catalog *catalog, + PDFDoc *docA, int firstPage, int lastPage, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, GBool duplexA = gTrue, int imgLLXA = 0, int imgLLYA = 0, int imgURXA = 0, int imgURYA = 0, GBool forceRasterizeA = gFalse, - GBool manualCtrlA = gFalse); + GBool manualCtrlA = gFalse, + PSOutCustomCodeCbk customCodeCbkA = NULL, + void *customCodeCbkDataA = NULL); // Destructor -- writes the trailer and closes the file. virtual ~PSOutputDev(); @@ -135,10 +152,6 @@ // text in Type 3 fonts will be drawn with drawChar/drawString. virtual GBool interpretType3Chars() { return gFalse; } - // This device now supports text in pattern colorspace! - virtual GBool supportTextCSPattern(GfxState *state) - { return state->getFillColorSpace()->getMode() == csPattern; } - //----- header/trailer (used only if manualCtrl is true) // Write the document-level header. @@ -164,9 +177,11 @@ virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data) = NULL, - void *abortCheckCbkData = NULL); + void *abortCheckCbkData = NULL, + GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, + void *annotDisplayDecideCbkData = NULL); // Start a page. virtual void startPage(int pageNum, GfxState *state); @@ -193,6 +208,7 @@ virtual void updateStrokeColor(GfxState *state); virtual void updateFillOverprint(GfxState *state); virtual void updateStrokeOverprint(GfxState *state); + virtual void updateOverprintMode(GfxState *state); virtual void updateTransfer(GfxState *state); //----- update text state @@ -205,12 +221,14 @@ virtual void updateHorizScaling(GfxState *state); virtual void updateTextPos(GfxState *state); virtual void updateTextShift(GfxState *state, double shift); + virtual void saveTextPos(GfxState *state); + virtual void restoreTextPos(GfxState *state); //----- path painting virtual void stroke(GfxState *state); virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); - virtual GBool tilingPatternFill(GfxState *state, Catalog *cat, Object *str, + virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, @@ -228,13 +246,18 @@ //----- text drawing virtual void drawString(GfxState *state, GooString *s); virtual void beginTextObject(GfxState *state); - virtual GBool deviceHasTextClip(GfxState *state) { return haveTextClip && haveCSPattern; } + virtual GBool deviceHasTextClip(GfxState *state) { return haveTextClip; } virtual void endTextObject(GfxState *state); //----- image drawing virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg); + virtual void setSoftMaskFromImageMask(GfxState *state, + Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix); + virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg); @@ -244,12 +267,6 @@ GBool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert, GBool maskInterpolate); - // If current colorspace ist pattern, - // need this device special handling for masks in pattern colorspace? - // Default is false - virtual GBool fillMaskCSPattern(GfxState * state) - { return state->getFillColorSpace()->getMode() == csPattern && (level != psLevel1 && level != psLevel1Sep); } - virtual void endMaskClip(GfxState * /*state*/); #if OPI_SUPPORT //----- OPI functions @@ -288,7 +305,7 @@ private: void init(PSOutputFunc outputFuncA, void *outputStreamA, - PSFileType fileTypeA, char *pstitle, PDFDoc *doc, XRef *xrefA, Catalog *catalog, + PSFileType fileTypeA, char *pstitle, PDFDoc *doc, int firstPage, int lastPage, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, GBool manualCtrlA, int paperWidthA, int paperHeightA, @@ -301,15 +318,20 @@ void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GooString *psName); void setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, GooString *psName); void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *psName); - GooString *setupExternalTrueTypeFont(GfxFont *font); + void setupExternalTrueTypeFont(GfxFont *font, GooString *fileName, + GooString *psName); void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GooString *psName); void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GooString *psName, GBool needVerticalMetrics); + void setupExternalCIDTrueTypeFont(GfxFont *font, + GooString *fileName, + GooString *psName, + GBool needVerticalMetrics); void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GooString *psName); - GooString *setupExternalCIDTrueTypeFont(GfxFont *font, GooString *fileName, int faceIndex = 0); void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict); + GooString *makePSFontName(GfxFont *font, Ref *id); void setupImages(Dict *resDict); - void setupImage(Ref id, Stream *str); + void setupImage(Ref id, Stream *str, GBool mask); void setupForms(Dict *resDict); void setupForm(Ref id, Object *strObj); void addProcessColor(double c, double m, double y, double k); @@ -356,17 +378,18 @@ void opiTransform(GfxState *state, double x0, double y0, double *x1, double *y1); #endif - void cvtFunction(Function *func); + void cvtFunction(Function *func, GBool invertPSFunction = gFalse); + GooString *filterPSName(GooString *name); // Write the document-level setup. void writeDocSetup(PDFDoc *doc, Catalog *catalog, int firstPage, int lastPage, GBool duplexA); void writePSChar(char c); - void writePS(char *s); - void writePSBuf(char *s, int len); + void writePS(const char *s); + void writePSBuf(const char *s, int len); void writePSFmt(const char *fmt, ...); void writePSString(GooString *s); - void writePSName(char *s); + void writePSName(const char *s); GooString *filterPSLabel(GooString *label, GBool *needParens=0); void writePSTextLine(GooString *s); @@ -374,13 +397,13 @@ PSOutMode mode; // PostScript mode (PS, EPS, form) int paperWidth; // width of paper, in pts int paperHeight; // height of paper, in pts + GBool paperMatch; // true if paper size is set to match each page int prevWidth; // width of previous page // (only psModePSOrigPageSizes output mode) int prevHeight; // height of previous page // (only psModePSOrigPageSizes output mode) int imgLLX, imgLLY, // imageable area, in pts imgURX, imgURY; - GBool substFonts; // substitute missing fonts GBool preload; // load all images into memory, and // predefine forms @@ -393,22 +416,21 @@ void *underlayCbkData; void (*overlayCbk)(PSOutputDev *psOut, void *data); void *overlayCbkData; + GooString *(*customCodeCbk)(PSOutputDev *psOut, + PSOutCustomCodeLocation loc, int n, + void *data); + void *customCodeCbkData; + PDFDoc *doc; XRef *xref; // the xref table for this PDF file - Catalog *m_catalog; // the catalog for this PDF file Ref *fontIDs; // list of object IDs of all used fonts int fontIDLen; // number of entries in fontIDs array int fontIDSize; // size of fontIDs array - Ref *fontFileIDs; // list of object IDs of all embedded fonts - int fontFileIDLen; // number of entries in fontFileIDs array - int fontFileIDSize; // size of fontFileIDs array - GooString **fontFileNames; // list of names of all embedded external fonts - GooString **psFileNames; // list of names of all embedded external fonts - int fontFileNameLen; // number of entries in fontFileNames array - int fontFileNameSize; // size of fontFileNames array - int nextTrueTypeNum; // next unique number to append to a TrueType - // font name + GooHash *fontNames; // all used font names + PST1FontName *t1FontNames; // font names for Type 1/1C fonts + int t1FontNameLen; // number of entries in t1FontNames array + int t1FontNameSize; // size of t1FontNames array PSFont8Info *font8Info; // info for 8-bit fonts int font8InfoLen; // number of entries in font8Info array int font8InfoSize; // size of font8Info array @@ -427,6 +449,8 @@ int numTilingPatterns; // current number of nested tiling patterns int nextFunc; // next unique number to use for a function + GooList *paperSizes; // list of used paper sizes, if paperMatch + // is true [PSOutPaperSize] double tx0, ty0; // global translation double xScale0, yScale0; // global scaling int rotate0; // rotation angle (0, 90, 180, 270) @@ -446,14 +470,13 @@ GBool haveTextClip; // set if text has been drawn with a // clipping render mode - GBool haveCSPattern; // set if text has been drawn with a - // clipping render mode because of pattern colorspace GBool inType3Char; // inside a Type 3 CharProc GBool inUncoloredPattern; // inside a uncolored pattern (PaintType = 2) GooString *t3String; // Type 3 content string double t3WX, t3WY, // Type 3 character parameters t3LLX, t3LLY, t3URX, t3URY; + GBool t3FillColorOnly; // operators should only use the fill color GBool t3Cacheable; // cleared if char is not cacheable GBool t3NeedsRestore; // set if a 'q' operator was issued GBool forceRasterize; // forces the page to be rasterized into a image before printing @@ -466,7 +489,6 @@ GBool ok; // set up ok? - friend class WinPDFPrinter; }; diff -Nru poppler-0.18.4/poppler/Page.cc poppler-0.20.5/poppler/Page.cc --- poppler-0.18.4/poppler/Page.cc 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/Page.cc 2012-06-11 13:19:41.000000000 +0000 @@ -15,7 +15,7 @@ // // Copyright (C) 2005 Kristian Høgsberg // Copyright (C) 2005 Jeff Muizelaar -// Copyright (C) 2005-2011 Albert Astals Cid +// Copyright (C) 2005-2012 Albert Astals Cid // Copyright (C) 2006-2008 Pino Toscano // Copyright (C) 2006 Nickolay V. Shmyrev // Copyright (C) 2006 Scott Turner @@ -24,6 +24,7 @@ // Copyright (C) 2008 Iñigo Martínez // Copyright (C) 2008 Brad Hards // Copyright (C) 2008 Ilya Gorenbein +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -42,6 +43,7 @@ #include "Object.h" #include "Array.h" #include "Dict.h" +#include "PDFDoc.h" #include "XRef.h" #include "Link.h" #include "OutputDev.h" @@ -146,14 +148,6 @@ artBox = cropBox; readBox(dict, "ArtBox", &artBox); - if (isPage) { - // clip all other boxes to the media box - cropBox.clipTo(&mediaBox); - bleedBox.clipTo(&mediaBox); - trimBox.clipTo(&mediaBox); - artBox.clipTo(&mediaBox); - } - // rotate dict->lookup("Rotate", &obj1); if (obj1.isInt()) { @@ -194,7 +188,14 @@ resources.free(); } -GBool PageAttrs::readBox(Dict *dict, char *key, PDFRectangle *box) { +void PageAttrs::clipBoxes() { + cropBox.clipTo(&mediaBox); + bleedBox.clipTo(&mediaBox); + trimBox.clipTo(&mediaBox); + artBox.clipTo(&mediaBox); +} + +GBool PageAttrs::readBox(Dict *dict, const char *key, PDFRectangle *box) { PDFRectangle tmp; double t; Object obj1, obj2; @@ -253,11 +254,12 @@ // Page //------------------------------------------------------------------------ -Page::Page(XRef *xrefA, int numA, Dict *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form) { +Page::Page(PDFDoc *docA, int numA, Dict *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form) { Object tmp; ok = gTrue; - xref = xrefA; + doc = docA; + xref = doc->getXRef(); num = numA; duration = -1; annots = NULL; @@ -267,11 +269,12 @@ // get attributes attrs = attrsA; + attrs->clipBoxes(); // transtion pageDict->lookupNF("Trans", &trans); if (!(trans.isRef() || trans.isDict() || trans.isNull())) { - error(-1, "Page transition object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Page transition object (page {0:d}) is wrong type ({1:s})", num, trans.getTypeName()); trans.free(); } @@ -279,7 +282,7 @@ // duration pageDict->lookupNF("Dur", &tmp); if (!(tmp.isNum() || tmp.isNull())) { - error(-1, "Page duration object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Page duration object (page {0:d}) is wrong type ({1:s})", num, tmp.getTypeName()); } else if (tmp.isNum()) { duration = tmp.getNum(); @@ -289,7 +292,7 @@ // annotations pageDict->lookupNF("Annots", &annotsObj); if (!(annotsObj.isRef() || annotsObj.isArray() || annotsObj.isNull())) { - error(-1, "Page annotations object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Page annotations object (page {0:d}) is wrong type ({1:s})", num, annotsObj.getTypeName()); annotsObj.free(); goto err2; @@ -299,7 +302,7 @@ pageDict->lookupNF("Contents", &contents); if (!(contents.isRef() || contents.isArray() || contents.isNull())) { - error(-1, "Page contents object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Page contents object (page {0:d}) is wrong type ({1:s})", num, contents.getTypeName()); contents.free(); goto err1; @@ -308,7 +311,7 @@ // thumb pageDict->lookupNF("Thumb", &thumb); if (!(thumb.isStream() || thumb.isNull() || thumb.isRef())) { - error(-1, "Page thumb object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Page thumb object (page {0:d}) is wrong type ({1:s})", num, thumb.getTypeName()); thumb.initNull(); } @@ -316,7 +319,7 @@ // actions pageDict->lookupNF("AA", &actions); if (!(actions.isDict() || actions.isNull())) { - error(-1, "Page additional action object (page %d) is wrong type (%s)", + error(errSyntaxError, -1, "Page additional action object (page {0:d}) is wrong type ({1:s})", num, actions.getTypeName()); actions.initNull(); } @@ -342,17 +345,17 @@ actions.free(); } -Annots *Page::getAnnots(Catalog *catalog) { +Annots *Page::getAnnots() { if (!annots) { Object obj; - annots = new Annots(xref, catalog, getAnnots(&obj)); + annots = new Annots(doc, getAnnots(&obj)); obj.free(); } return annots; } -void Page::addAnnot(Annot *annot, Catalog *catalog) { +void Page::addAnnot(Annot *annot) { Object obj1; Object tmp; Ref annotRef = annot->getRef (); @@ -360,7 +363,7 @@ // Make sure we have annots before adding the new one // even if it's an empty list so that we can safely // call annots->appendAnnot(annot) - getAnnots(catalog); + getAnnots(); if (annotsObj.isNull()) { Ref annotsRef; @@ -392,22 +395,57 @@ annot->setPage(&pageRef, num); } -Links *Page::getLinks(Catalog *catalog) { - return new Links(getAnnots(catalog)); +void Page::removeAnnot(Annot *annot) { + Ref annotRef = annot->getRef(); + Object annArray; + + getAnnots(&annArray); + if (annArray.isArray()) { + int idx = -1; + // Get annotation position + for (int i = 0; idx == -1 && i < annArray.arrayGetLength(); ++i) { + Object tmp; + Ref currAnnot = annArray.arrayGetNF(i, &tmp)->getRef(); + tmp.free(); + if (currAnnot.num == annotRef.num && currAnnot.gen == annotRef.gen) { + idx = i; + } + } + + if (idx == -1) { + error(errInternal, -1, "Annotation doesn't belong to this page"); + annArray.free(); + return; + } + annots->removeAnnot(annot); // Gracefully fails on popup windows + annArray.arrayRemove(idx); + xref->removeIndirectObject(annotRef); + + if (annotsObj.isRef()) { + xref->setModifiedObject (&annArray, annotsObj.getRef()); + } else { + xref->setModifiedObject (&pageObj, pageRef); + } + } + annArray.free(); +} + +Links *Page::getLinks() { + return new Links(getAnnots()); } -FormPageWidgets *Page::getFormWidgets(Catalog *catalog) { - return new FormPageWidgets(getAnnots(catalog), num, catalog->getForm()); +FormPageWidgets *Page::getFormWidgets() { + return new FormPageWidgets(getAnnots(), num, doc->getCatalog()->getForm()); } void Page::display(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data), void *abortCheckCbkData, GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), void *annotDisplayDecideCbkData) { - displaySlice(out, hDPI, vDPI, rotate, useMediaBox, crop, -1, -1, -1, -1, printing, catalog, + displaySlice(out, hDPI, vDPI, rotate, useMediaBox, crop, -1, -1, -1, -1, printing, abortCheckCbk, abortCheckCbkData, annotDisplayDecideCbk, annotDisplayDecideCbkData); } @@ -415,11 +453,9 @@ Gfx *Page::createGfx(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData) { + void *abortCheckCbkData) { PDFRectangle *mediaBox, *cropBox; PDFRectangle box; Gfx *gfx; @@ -444,7 +480,7 @@ printf("***** Rotate = %d\n", attrs->getRotate()); } - gfx = new Gfx(xref, out, num, attrs->getResourceDict(), catalog, + gfx = new Gfx(doc, out, num, attrs->getResourceDict(), hDPI, vDPI, &box, crop ? cropBox : (PDFRectangle *)NULL, rotate, abortCheckCbk, abortCheckCbkData); @@ -454,7 +490,7 @@ void Page::displaySlice(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data), void *abortCheckCbkData, GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), @@ -466,27 +502,31 @@ if (!out->checkPageSlice(this, hDPI, vDPI, rotate, useMediaBox, crop, sliceX, sliceY, sliceW, sliceH, - printing, catalog, - abortCheckCbk, abortCheckCbkData)) { + printing, + abortCheckCbk, abortCheckCbkData, + annotDisplayDecideCbk, annotDisplayDecideCbkData)) { return; } gfx = createGfx(out, hDPI, vDPI, rotate, useMediaBox, crop, sliceX, sliceY, sliceW, sliceH, - printing, catalog, - abortCheckCbk, abortCheckCbkData, - annotDisplayDecideCbk, annotDisplayDecideCbkData); + printing, + abortCheckCbk, abortCheckCbkData); contents.fetch(xref, &obj); if (!obj.isNull()) { gfx->saveState(); gfx->display(&obj); gfx->restoreState(); + } else { + // empty pages need to call dump to do any setup required by the + // OutputDev + out->dump(); } obj.free(); // draw annotations - annotList = getAnnots(catalog); + annotList = getAnnots(); if (annotList->getNumAnnots() > 0) { if (globalParams->getPrintCommands()) { @@ -684,13 +724,13 @@ } } -void Page::processLinks(OutputDev *out, Catalog *catalog) { +void Page::processLinks(OutputDev *out) { Links *links; int i; - links = getLinks(catalog); + links = getLinks(); for (i = 0; i < links->getNumLinks(); ++i) { - out->processLink(links->getLink(i), catalog); + out->processLink(links->getLink(i)); } delete links; } diff -Nru poppler-0.18.4/poppler/Page.h poppler-0.20.5/poppler/Page.h --- poppler-0.18.4/poppler/Page.h 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/Page.h 2012-06-11 13:19:41.000000000 +0000 @@ -19,6 +19,8 @@ // Copyright (C) 2006, 2011 Carlos Garcia Campos // Copyright (C) 2007 Julien Rebetez // Copyright (C) 2008 Iñigo Martínez +// Copyright (C) 2012 Fabio D'Urso +// Copyright (C) 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -35,10 +37,10 @@ #include "Object.h" class Dict; +class PDFDoc; class XRef; class OutputDev; class Links; -class Catalog; class Annots; class Annot; class Gfx; @@ -99,9 +101,12 @@ Dict *getResourceDict() { return resources.isDict() ? resources.getDict() : (Dict *)NULL; } + // Clip all other boxes to the MediaBox. + void clipBoxes(); + private: - GBool readBox(Dict *dict, char *key, PDFRectangle *box); + GBool readBox(Dict *dict, const char *key, PDFRectangle *box); PDFRectangle mediaBox; PDFRectangle cropBox; @@ -127,7 +132,7 @@ public: // Constructor. - Page(XRef *xrefA, int numA, Dict *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form); + Page(PDFDoc *docA, int numA, Dict *pageDict, Ref pageRefA, PageAttrs *attrsA, Form *form); // Destructor. ~Page(); @@ -158,6 +163,7 @@ Stream *getMetadata() { return attrs->getMetadata(); } Dict *getPieceInfo() { return attrs->getPieceInfo(); } Dict *getSeparationInfo() { return attrs->getSeparationInfo(); } + PDFDoc *getDoc() { return doc; } // Get resource dictionary. Dict *getResourceDict() { return attrs->getResourceDict(); } @@ -165,13 +171,16 @@ // Get annotations array. Object *getAnnots(Object *obj) { return annotsObj.fetch(xref, obj); } // Add a new annotation to the page - void addAnnot(Annot *annot, Catalog *catalog); + void addAnnot(Annot *annot); + // Remove an existing annotation from the page + // Note: Caller is responsible for deleting popup and appearance streams too + void removeAnnot(Annot *annot); // Return a list of links. - Links *getLinks(Catalog *catalog); + Links *getLinks(); - // Return a list of annots. Ownership is transferred to the caller. - Annots *getAnnots(Catalog *catalog); + // Return a list of annots. It will be valid until the page is destroyed + Annots *getAnnots(); // Get contents. Object *getContents(Object *obj) { return contents.fetch(xref, obj); } @@ -184,7 +193,7 @@ Object *getTrans(Object *obj) { return trans.fetch(xref, obj); } // Get form. - FormPageWidgets *getFormWidgets(Catalog *catalog); + FormPageWidgets *getFormWidgets(); // Get duration, the maximum length of time, in seconds, // that the page is displayed before the presentation automatically @@ -197,16 +206,14 @@ Gfx *createGfx(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data), - void *abortCheckCbkData, - GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data), - void *annotDisplayDecideCbkData); + void *abortCheckCbkData); // Display a page. void display(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data) = NULL, void *abortCheckCbkData = NULL, GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, @@ -216,7 +223,7 @@ void displaySlice(OutputDev *out, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog *catalog, + GBool printing, GBool (*abortCheckCbk)(void *data) = NULL, void *abortCheckCbkData = NULL, GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, @@ -229,7 +236,7 @@ double sliceX, double sliceY, double sliceW, double sliceH, PDFRectangle *box, GBool *crop); - void processLinks(OutputDev *out, Catalog *catalog); + void processLinks(OutputDev *out); // Get the page's default CTM. void getDefaultCTM(double *ctm, double hDPI, double vDPI, @@ -237,6 +244,7 @@ private: + PDFDoc *doc; XRef *xref; // the xref table for this PDF file Object pageObj; // page dictionary Ref pageRef; // page reference diff -Nru poppler-0.18.4/poppler/PageLabelInfo.cc poppler-0.20.5/poppler/PageLabelInfo.cc --- poppler-0.18.4/poppler/PageLabelInfo.cc 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/PageLabelInfo.cc 2012-05-10 20:05:44.000000000 +0000 @@ -5,6 +5,7 @@ // Copyright (C) 2005-2006 Kristian Høgsberg // Copyright (C) 2005, 2009 Albert Astals Cid // Copyright (C) 2011 Simon Kellner +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -352,8 +353,6 @@ ucs2_char[1] = number_string.getChar(i); label->append(ucs2_char, 2); } - ucs2_char[1] = 0; - label->append(ucs2_char, 2); } else { label->append(&number_string); } diff -Nru poppler-0.18.4/poppler/Parser.cc poppler-0.20.5/poppler/Parser.cc --- poppler-0.18.4/poppler/Parser.cc 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/Parser.cc 2012-09-09 19:13:21.000000000 +0000 @@ -16,6 +16,7 @@ // Copyright (C) 2006, 2009, 201, 2010 Albert Astals Cid // Copyright (C) 2006 Krzysztof Kowalczyk // Copyright (C) 2009 Ilya Gorenbein +// Copyright (C) 2012 Hib Eris // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -37,6 +38,11 @@ #include "XRef.h" #include "Error.h" +// Max number of nested objects. This is used to catch infinite loops +// in the object structure. And also technically valid files with +// lots of nested arrays that made us consume all the stack +#define recursionLimit 500 + Parser::Parser(XRef *xrefA, Lexer *lexerA, GBool allowStreamsA) { xref = xrefA; lexer = lexerA; @@ -52,21 +58,16 @@ delete lexer; } -Object *Parser::getObj(Object *obj, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen) { - std::set fetchOriginatorNums; - return getObj(obj, fileKey, encAlgorithm, keyLength, objNum, objGen, &fetchOriginatorNums); -} - -Object *Parser::getObj(Object *obj, std::set *fetchOriginatorNums) +Object *Parser::getObj(Object *obj, int recursion) { - return getObj(obj, NULL, cryptRC4, 0, 0, 0, fetchOriginatorNums); + return getObj(obj, gFalse, NULL, cryptRC4, 0, 0, 0, recursion); } -Object *Parser::getObj(Object *obj, Guchar *fileKey, +Object *Parser::getObj(Object *obj, GBool simpleOnly, + Guchar *fileKey, CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, std::set *fetchOriginatorNums) { + int objNum, int objGen, int recursion, + GBool strict) { char *key; Stream *str; Object obj2; @@ -85,23 +86,26 @@ } // array - if (buf1.isCmd("[")) { + if (!simpleOnly && likely(recursion < recursionLimit) && buf1.isCmd("[")) { shift(); obj->initArray(xref); while (!buf1.isCmd("]") && !buf1.isEOF()) - obj->arrayAdd(getObj(&obj2, fileKey, encAlgorithm, keyLength, - objNum, objGen, fetchOriginatorNums)); - if (buf1.isEOF()) - error(getPos(), "End of file inside array"); + obj->arrayAdd(getObj(&obj2, gFalse, fileKey, encAlgorithm, keyLength, + objNum, objGen, recursion + 1)); + if (buf1.isEOF()) { + error(errSyntaxError, getPos(), "End of file inside array"); + if (strict) goto err; + } shift(); // dictionary or stream - } else if (buf1.isCmd("<<")) { + } else if (!simpleOnly && likely(recursion < recursionLimit) && buf1.isCmd("<<")) { shift(objNum); obj->initDict(xref); while (!buf1.isCmd(">>") && !buf1.isEOF()) { if (!buf1.isName()) { - error(getPos(), "Dictionary key must be a name object"); + error(errSyntaxError, getPos(), "Dictionary key must be a name object"); + if (strict) goto err; shift(); } else { // buf1 might go away in shift(), so construct the key @@ -109,18 +113,22 @@ shift(); if (buf1.isEOF() || buf1.isError()) { gfree(key); + if (strict && buf1.isError()) goto err; break; } - obj->dictAdd(key, getObj(&obj2, fileKey, encAlgorithm, keyLength, objNum, objGen, fetchOriginatorNums)); + obj->dictAdd(key, getObj(&obj2, gFalse, fileKey, encAlgorithm, keyLength, objNum, objGen, recursion + 1)); } } - if (buf1.isEOF()) - error(getPos(), "End of file inside dictionary"); + if (buf1.isEOF()) { + error(errSyntaxError, getPos(), "End of file inside dictionary"); + if (strict) goto err; + } // stream objects are not allowed inside content streams or // object streams if (allowStreams && buf2.isCmd("stream")) { if ((str = makeStream(obj, fileKey, encAlgorithm, keyLength, - objNum, objGen, fetchOriginatorNums))) { + objNum, objGen, recursion + 1, + strict))) { obj->initStream(str); } else { obj->free(); @@ -170,11 +178,18 @@ } return obj; + +err: + obj->free(); + obj->initError(); + return obj; + } Stream *Parser::makeStream(Object *dict, Guchar *fileKey, CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, std::set *fetchOriginatorNums) { + int objNum, int objGen, int recursion, + GBool strict) { Object obj; BaseStream *baseStr; Stream *str; @@ -182,16 +197,20 @@ // get stream start position lexer->skipToNextLine(); - pos = lexer->getPos(); + if (!(str = lexer->getStream())) { + return NULL; + } + pos = str->getPos(); // get length - dict->dictLookup("Length", &obj, fetchOriginatorNums); + dict->dictLookup("Length", &obj, recursion); if (obj.isInt()) { length = (Guint)obj.getInt(); obj.free(); } else { - error(getPos(), "Bad 'Length' attribute in stream"); + error(errSyntaxError, getPos(), "Bad 'Length' attribute in stream"); obj.free(); + if (strict) return NULL; length = 0; } @@ -221,7 +240,8 @@ if (buf1.isCmd("endstream")) { shift(); } else { - error(getPos(), "Missing 'endstream'"); + error(errSyntaxError, getPos(), "Missing 'endstream' or incorrect stream length"); + if (strict) return NULL; if (xref) { // shift until we find the proper endstream or we change to another object or reach eof while (!buf1.isCmd("endstream") && xref->getNumEntry(lexer->getPos()) == objNum && !buf1.isEOF()) { diff -Nru poppler-0.18.4/poppler/Parser.h poppler-0.20.5/poppler/Parser.h --- poppler-0.18.4/poppler/Parser.h 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/Parser.h 2012-05-10 20:05:44.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2006, 2010 Albert Astals Cid +// Copyright (C) 2012 Hib Eris // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -42,16 +43,16 @@ // Destructor. ~Parser(); - // Get the next object from the input stream. - Object *getObj(Object *obj, Guchar *fileKey = NULL, + // Get the next object from the input stream. If is + // true, do not parse compound objects (arrays, dictionaries, or + // streams). + Object *getObj(Object *obj, GBool simpleOnly = gFalse, + Guchar *fileKey = NULL, CryptAlgorithm encAlgorithm = cryptRC4, int keyLength = 0, - int objNum = 0, int objGen = 0); + int objNum = 0, int objGen = 0, int recursion = 0, + GBool strict = gFalse); - Object *getObj(Object *obj, Guchar *fileKey, - CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, std::set *fetchOriginatorNums); - - Object *getObj(Object *obj, std::set *fetchOriginatorNums); + Object *getObj(Object *obj, int recursion); // Get stream. Stream *getStream() { return lexer->getStream(); } @@ -69,7 +70,8 @@ Stream *makeStream(Object *dict, Guchar *fileKey, CryptAlgorithm encAlgorithm, int keyLength, - int objNum, int objGen, std::set *fetchOriginatorNums); + int objNum, int objGen, int recursion, + GBool strict); void shift(int objNum = -1); }; diff -Nru poppler-0.18.4/poppler/PreScanOutputDev.cc poppler-0.20.5/poppler/PreScanOutputDev.cc --- poppler-0.18.4/poppler/PreScanOutputDev.cc 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/PreScanOutputDev.cc 2012-05-10 20:05:44.000000000 +0000 @@ -43,9 +43,9 @@ // PreScanOutputDev //------------------------------------------------------------------------ -PreScanOutputDev::PreScanOutputDev(XRef *xrefA) { +PreScanOutputDev::PreScanOutputDev(PDFDoc *docA) { level = globalParams->getPSLevel(); - xref = xrefA; + doc = docA; clearStats(); } @@ -81,18 +81,57 @@ state->getFillOpacity(), state->getBlendMode()); } -GBool PreScanOutputDev::tilingPatternFill(GfxState *state, Catalog *catalog, Object *str, +GBool PreScanOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str, double *pmat, int paintType, int /*tilingType*/, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep) { - PDFRectangle box; - Gfx *gfx; - box.x1 = bbox[0]; box.y1 = bbox[1]; - box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(xref, this, resDict, catalog, &box, NULL); - gfx->display(str); - delete gfx; + if (paintType == 1) { + gfx->drawForm(str, resDict, mat, bbox); + } else { + check(state->getFillColorSpace(), state->getFillColor(), + state->getFillOpacity(), state->getBlendMode()); + } + return gTrue; +} + +GBool PreScanOutputDev::functionShadedFill(GfxState *state, + GfxFunctionShading *shading) { + if (shading->getColorSpace()->getMode() != csDeviceGray && + shading->getColorSpace()->getMode() != csCalGray) { + gray = gFalse; + } + mono = gFalse; + if (state->getFillOpacity() != 1 || + state->getBlendMode() != gfxBlendNormal) { + transparency = gTrue; + } + return gTrue; +} + +GBool PreScanOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) { + if (shading->getColorSpace()->getMode() != csDeviceGray && + shading->getColorSpace()->getMode() != csCalGray) { + gray = gFalse; + } + mono = gFalse; + if (state->getFillOpacity() != 1 || + state->getBlendMode() != gfxBlendNormal) { + transparency = gTrue; + } + return gTrue; +} + +GBool PreScanOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) { + if (shading->getColorSpace()->getMode() != csDeviceGray && + shading->getColorSpace()->getMode() != csCalGray) { + gray = gFalse; + } + mono = gFalse; + if (state->getFillOpacity() != 1 || + state->getBlendMode() != gfxBlendNormal) { + transparency = gTrue; + } return gTrue; } @@ -109,8 +148,6 @@ int render; GfxFont *font; double m11, m12, m21, m22; - Ref embRef; - DisplayFontParam *dfp; GBool simpleTTF; render = state->getRender(); @@ -125,18 +162,14 @@ font = state->getFont(); state->getFontTransMat(&m11, &m12, &m21, &m22); + //~ this should check for external fonts that are non-TrueType simpleTTF = fabs(m11 + m22) < 0.01 && m11 > 0 && fabs(m12) < 0.01 && fabs(m21) < 0.01 && fabs(state->getHorizScaling() - 1) < 0.001 && (font->getType() == fontTrueType || - font->getType() == fontTrueTypeOT) && - (font->getEmbeddedFontID(&embRef) || - font->getExtFontFile() || - (font->getName() && - (dfp = globalParams->getDisplayFont(font)) && - dfp->kind == displayFontTT)); + font->getType() == fontTrueTypeOT); if (simpleTTF) { //~ need to create a FoFiTrueType object, and check for a Unicode cmap } @@ -168,7 +201,7 @@ gdi = gFalse; if ((level == psLevel1 || level == psLevel1Sep) && state->getFillColorSpace()->getMode() == csPattern) { - level1PSBug = gTrue; + patternImgMask = gTrue; } if (inlineImg) { @@ -191,12 +224,17 @@ if (colorSpace->getMode() == csIndexed) { colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase(); } - if (colorSpace->getMode() != csDeviceGray && - colorSpace->getMode() != csCalGray) { + if (colorSpace->getMode() == csDeviceGray || + colorSpace->getMode() == csCalGray) { + if (colorMap->getBits() > 1) { + mono = gFalse; + } + } else { gray = gFalse; + mono = gFalse; } - mono = gFalse; - if (state->getBlendMode() != gfxBlendNormal) { + if (state->getFillOpacity() != 1 || + state->getBlendMode() != gfxBlendNormal) { transparency = gTrue; } gdi = gFalse; @@ -225,12 +263,17 @@ if (colorSpace->getMode() == csIndexed) { colorSpace = ((GfxIndexedColorSpace *)colorSpace)->getBase(); } - if (colorSpace->getMode() != csDeviceGray && - colorSpace->getMode() != csCalGray) { + if (colorSpace->getMode() == csDeviceGray || + colorSpace->getMode() == csCalGray) { + if (colorMap->getBits() > 1) { + mono = gFalse; + } + } else { gray = gFalse; + mono = gFalse; } - mono = gFalse; - if (state->getBlendMode() != gfxBlendNormal) { + if (state->getFillOpacity() != 1 || + state->getBlendMode() != gfxBlendNormal) { transparency = gTrue; } gdi = gFalse; @@ -310,5 +353,5 @@ gray = gTrue; transparency = gFalse; gdi = gTrue; - level1PSBug = gFalse; + patternImgMask = gFalse; } diff -Nru poppler-0.18.4/poppler/PreScanOutputDev.h poppler-0.20.5/poppler/PreScanOutputDev.h --- poppler-0.18.4/poppler/PreScanOutputDev.h 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/PreScanOutputDev.h 2012-05-10 20:05:44.000000000 +0000 @@ -45,7 +45,7 @@ public: // Constructor. - PreScanOutputDev(XRef *xrefA); + PreScanOutputDev(PDFDoc *docA); // Destructor. virtual ~PreScanOutputDev(); @@ -64,6 +64,11 @@ // operations. virtual GBool useTilingPatternFill() { return gTrue; } + // Does this device use functionShadedFill(), axialShadedFill(), and + // radialShadedFill()? If this returns false, these shaded fills + // will be reduced to a series of other drawing operations. + virtual GBool useShadedFills(int type) { return gTrue; } + // Does this device use beginType3Char/endType3Char? Otherwise, // text in Type 3 fonts will be drawn with drawChar/drawString. virtual GBool interpretType3Chars() { return gTrue; } @@ -80,11 +85,15 @@ virtual void stroke(GfxState *state); virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); - virtual GBool tilingPatternFill(GfxState *state, Catalog *cat, Object *str, + virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep); + virtual GBool functionShadedFill(GfxState *state, + GfxFunctionShading *shading); + virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax); + virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double tMin, double tMax); //----- path clipping virtual void clip(GfxState *state); @@ -148,8 +157,9 @@ GBool isAllGDI() { return gdi; } // Returns true if the operations performed since the last call to - // clearStats() processed a feature that PSOutputDev does not implement. - GBool hasLevel1PSBug() { return level1PSBug; } + // clearStats() included any image mask fills with a pattern color + // space. (only level1!) + GBool usesPatternImageMask() { return patternImgMask; } // Clear the stats used by the above functions. void clearStats(); @@ -159,13 +169,13 @@ void check(GfxColorSpace *colorSpace, GfxColor *color, double opacity, GfxBlendMode blendMode); - XRef *xref; + PDFDoc *doc; GBool mono; GBool gray; GBool transparency; GBool gdi; PSLevel level; // PostScript level (1, 2, separation) - GBool level1PSBug; // gTrue if it uses a feature not supported in PSOutputDev + GBool patternImgMask; }; #endif diff -Nru poppler-0.18.4/poppler/Rendition.cc poppler-0.20.5/poppler/Rendition.cc --- poppler-0.18.4/poppler/Rendition.cc 2011-11-22 21:33:15.000000000 +0000 +++ poppler-0.20.5/poppler/Rendition.cc 2012-05-10 20:05:44.000000000 +0000 @@ -6,6 +6,7 @@ // Hugo Mercier (c) 2008 // Pino Toscano (c) 2008 // Carlos Garcia Campos (c) 2010 +// Tobias Koenig (c) 2012 // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -308,7 +309,7 @@ // TODO: D might be a form XObject too } else { - error (-1, "Invalid Media Clip Data"); + error (errSyntaxError, -1, "Invalid Media Clip Data"); ok = gFalse; } obj1.free(); @@ -322,7 +323,7 @@ // TODO } } else { - error (-1, "Invalid Media Clip"); + error (errSyntaxError, -1, "Invalid Media Clip"); ok = gFalse; } tmp.free(); @@ -344,8 +345,8 @@ BE.parseMediaPlayParameters(¶ms); } params.free(); - } else if (hasClip) { - error (-1, "Invalid Media Rendition"); + } else if (!hasClip) { + error (errSyntaxError, -1, "Invalid Media Rendition"); ok = gFalse; } tmp2.free(); diff -Nru poppler-0.18.4/poppler/SecurityHandler.cc poppler-0.20.5/poppler/SecurityHandler.cc --- poppler-0.18.4/poppler/SecurityHandler.cc 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/SecurityHandler.cc 2012-08-15 13:31:38.000000000 +0000 @@ -13,7 +13,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2010 Albert Astals Cid +// Copyright (C) 2010, 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -31,11 +31,6 @@ #include "Decrypt.h" #include "Error.h" #include "GlobalParams.h" -#if HAVE_XPDFCORE -# include "XPDFCore.h" -#elif HAVE_WINPDFCORE -# include "WinPDFCore.h" -#endif #ifdef ENABLE_PLUGINS # include "XpdfPluginAPI.h" #endif @@ -63,14 +58,15 @@ secHdlr = new ExternalSecurityHandler(docA, encryptDictA, xsh); } else { #endif - error(-1, "Couldn't find the '%s' security handler", + error(errSyntaxError, -1, "Couldn't find the '{0:s}' security handler", filterObj.getName()); secHdlr = NULL; #ifdef ENABLE_PLUGINS } #endif } else { - error(-1, "Missing or invalid 'Filter' entry in encryption dictionary"); + error(errSyntaxError, -1, + "Missing or invalid 'Filter' entry in encryption dictionary"); secHdlr = NULL; } filterObj.free(); @@ -109,7 +105,12 @@ } } if (!ok) { - error(-1, "Incorrect password"); + if (!ownerPassword && !userPassword) { + GooString dummy; + return checkEncryption(&dummy, &dummy); + } else { + error(errCommandLine, -1, "Incorrect password"); + } } return ok; } @@ -144,8 +145,8 @@ SecurityHandler(docA) { Object versionObj, revisionObj, lengthObj; - Object ownerKeyObj, userKeyObj, permObj, fileIDObj; - Object fileIDObj1; + Object ownerKeyObj, userKeyObj, ownerEncObj, userEncObj; + Object permObj, fileIDObj, fileIDObj1; Object cryptFiltersObj, streamFilterObj, stringFilterObj; Object cryptFilterObj, cfmObj, cfLengthObj; Object encryptMetadataObj; @@ -154,12 +155,17 @@ fileID = NULL; ownerKey = NULL; userKey = NULL; + ownerEnc = NULL; + userEnc = NULL; + fileKeyLength = 0; encryptDictA->dictLookup("V", &versionObj); encryptDictA->dictLookup("R", &revisionObj); encryptDictA->dictLookup("Length", &lengthObj); encryptDictA->dictLookup("O", &ownerKeyObj); encryptDictA->dictLookup("U", &userKeyObj); + encryptDictA->dictLookup("OE", &ownerEncObj); + encryptDictA->dictLookup("UE", &userEncObj); encryptDictA->dictLookup("P", &permObj); if (permObj.isUint()) { unsigned int permUint = permObj.getUint(); @@ -170,91 +176,137 @@ doc->getXRef()->getTrailerDict()->dictLookup("ID", &fileIDObj); if (versionObj.isInt() && revisionObj.isInt() && - ownerKeyObj.isString() && ownerKeyObj.getString()->getLength() == 32 && - userKeyObj.isString() && userKeyObj.getString()->getLength() == 32 && - permObj.isInt()) { + permObj.isInt() && + ownerKeyObj.isString() && + userKeyObj.isString()) { encVersion = versionObj.getInt(); encRevision = revisionObj.getInt(); - encAlgorithm = cryptRC4; - // revision 2 forces a 40-bit key - some buggy PDF generators - // set the Length value incorrectly - if (encRevision == 2 || !lengthObj.isInt()) { - fileKeyLength = 5; - } else { - fileKeyLength = lengthObj.getInt() / 8; - } - encryptMetadata = gTrue; - //~ this currently only handles a subset of crypt filter functionality - if (encVersion == 4 && encRevision == 4) { - encryptDictA->dictLookup("CF", &cryptFiltersObj); - encryptDictA->dictLookup("StmF", &streamFilterObj); - encryptDictA->dictLookup("StrF", &stringFilterObj); - if (cryptFiltersObj.isDict() && - streamFilterObj.isName() && - stringFilterObj.isName() && - !strcmp(streamFilterObj.getName(), stringFilterObj.getName())) { - if (cryptFiltersObj.dictLookup(streamFilterObj.getName(), - &cryptFilterObj)->isDict()) { - cryptFilterObj.dictLookup("CFM", &cfmObj); - if (cfmObj.isName("V2")) { - encVersion = 2; - encRevision = 3; - if (cryptFilterObj.dictLookup("Length", &cfLengthObj)->isInt()) { - //~ according to the spec, this should be cfLengthObj / 8 - fileKeyLength = cfLengthObj.getInt(); - } - cfLengthObj.free(); - } else if (cfmObj.isName("AESV2")) { - encVersion = 2; - encRevision = 3; - encAlgorithm = cryptAES; - if (cryptFilterObj.dictLookup("Length", &cfLengthObj)->isInt()) { - //~ according to the spec, this should be cfLengthObj / 8 - fileKeyLength = cfLengthObj.getInt(); + if ((encRevision <= 4 && + ownerKeyObj.getString()->getLength() == 32 && + userKeyObj.getString()->getLength() == 32) || + (encRevision == 5 && + // the spec says 48 bytes, but Acrobat pads them out longer + ownerKeyObj.getString()->getLength() >= 48 && + userKeyObj.getString()->getLength() >= 48 && + ownerEncObj.isString() && + ownerEncObj.getString()->getLength() == 32 && + userEncObj.isString() && + userEncObj.getString()->getLength() == 32)) { + encAlgorithm = cryptRC4; + // revision 2 forces a 40-bit key - some buggy PDF generators + // set the Length value incorrectly + if (encRevision == 2 || !lengthObj.isInt()) { + fileKeyLength = 5; + } else { + fileKeyLength = lengthObj.getInt() / 8; + } + encryptMetadata = gTrue; + //~ this currently only handles a subset of crypt filter functionality + //~ (in particular, it ignores the EFF entry in encryptDictA, and + //~ doesn't handle the case where StmF, StrF, and EFF are not all the + //~ same) + if ((encVersion == 4 || encVersion == 5) && + (encRevision == 4 || encRevision == 5)) { + encryptDictA->dictLookup("CF", &cryptFiltersObj); + encryptDictA->dictLookup("StmF", &streamFilterObj); + encryptDictA->dictLookup("StrF", &stringFilterObj); + if (cryptFiltersObj.isDict() && + streamFilterObj.isName() && + stringFilterObj.isName() && + !strcmp(streamFilterObj.getName(), stringFilterObj.getName())) { + if (!strcmp(streamFilterObj.getName(), "Identity")) { + // no encryption on streams or strings + encVersion = encRevision = -1; + } else { + if (cryptFiltersObj.dictLookup(streamFilterObj.getName(), + &cryptFilterObj)->isDict()) { + cryptFilterObj.dictLookup("CFM", &cfmObj); + if (cfmObj.isName("V2")) { + encVersion = 2; + encRevision = 3; + if (cryptFilterObj.dictLookup("Length", + &cfLengthObj)->isInt()) { + //~ according to the spec, this should be cfLengthObj / 8 + fileKeyLength = cfLengthObj.getInt(); + } + cfLengthObj.free(); + } else if (cfmObj.isName("AESV2")) { + encVersion = 2; + encRevision = 3; + encAlgorithm = cryptAES; + if (cryptFilterObj.dictLookup("Length", + &cfLengthObj)->isInt()) { + //~ according to the spec, this should be cfLengthObj / 8 + fileKeyLength = cfLengthObj.getInt(); + } + cfLengthObj.free(); + } else if (cfmObj.isName("AESV3")) { + encVersion = 5; + encRevision = 5; + encAlgorithm = cryptAES256; + if (cryptFilterObj.dictLookup("Length", + &cfLengthObj)->isInt()) { + //~ according to the spec, this should be cfLengthObj / 8 + fileKeyLength = cfLengthObj.getInt(); + } + cfLengthObj.free(); + } + cfmObj.free(); } - cfLengthObj.free(); + cryptFilterObj.free(); } - cfmObj.free(); } - cryptFilterObj.free(); - } - stringFilterObj.free(); - streamFilterObj.free(); - cryptFiltersObj.free(); - if (encryptDictA->dictLookup("EncryptMetadata", - &encryptMetadataObj)->isBool()) { - encryptMetadata = encryptMetadataObj.getBool(); + stringFilterObj.free(); + streamFilterObj.free(); + cryptFiltersObj.free(); + if (encryptDictA->dictLookup("EncryptMetadata", + &encryptMetadataObj)->isBool()) { + encryptMetadata = encryptMetadataObj.getBool(); + } + encryptMetadataObj.free(); } - encryptMetadataObj.free(); - } - permFlags = permObj.getInt(); - ownerKey = ownerKeyObj.getString()->copy(); - userKey = userKeyObj.getString()->copy(); - if (encVersion >= 1 && encVersion <= 2 && - encRevision >= 2 && encRevision <= 3) { - if (fileIDObj.isArray()) { - if (fileIDObj.arrayGet(0, &fileIDObj1)->isString()) { - fileID = fileIDObj1.getString()->copy(); + permFlags = permObj.getInt(); + ownerKey = ownerKeyObj.getString()->copy(); + userKey = userKeyObj.getString()->copy(); + if (encVersion >= 1 && encVersion <= 2 && + encRevision >= 2 && encRevision <= 3) { + if (fileIDObj.isArray()) { + if (fileIDObj.arrayGet(0, &fileIDObj1)->isString()) { + fileID = fileIDObj1.getString()->copy(); + } else { + fileID = new GooString(); + } + fileIDObj1.free(); } else { fileID = new GooString(); } - fileIDObj1.free(); - } else { - fileID = new GooString(); + if (fileKeyLength > 16 || fileKeyLength < 0) { + fileKeyLength = 16; + } + ok = gTrue; + } else if (encVersion == 5 && encRevision == 5) { + fileID = new GooString(); // unused for V=R=5 + ownerEnc = ownerEncObj.getString()->copy(); + userEnc = userEncObj.getString()->copy(); + if (fileKeyLength > 32 || fileKeyLength < 0) { + fileKeyLength = 32; + } + ok = gTrue; + } else if (!(encVersion == -1 && encRevision == -1)) { + error(errUnimplemented, -1, + "Unsupported version/revision (%d/%d) of Standard security handler", + encVersion, encRevision); } - ok = gTrue; } else { - error(-1, "Unsupported version/revision (%d/%d) of Standard security handler", - encVersion, encRevision); + error(errSyntaxError, -1, "Invalid encryption key length"); } } else { - error(-1, "Weird encryption info"); - } - if (fileKeyLength > 16) { - fileKeyLength = 16; + error(errSyntaxError, -1, "Weird encryption info"); } fileIDObj.free(); permObj.free(); + userEncObj.free(); + ownerEncObj.free(); userKeyObj.free(); ownerKeyObj.free(); lengthObj.free(); @@ -272,6 +324,16 @@ if (userKey) { delete userKey; } + if (ownerEnc) { + delete ownerEnc; + } + if (userEnc) { + delete userEnc; + } +} + +GBool StandardSecurityHandler::isUnencrypted() { + return encVersion == -1 && encRevision == -1; } void *StandardSecurityHandler::makeAuthData(GooString *ownerPassword, @@ -283,27 +345,7 @@ } void *StandardSecurityHandler::getAuthData() { -#if HAVE_XPDFCORE - XPDFCore *core; - GooString *password; - - if (!(core = (XPDFCore *)doc->getGUIData()) || - !(password = core->getPassword())) { - return NULL; - } - return new StandardAuthData(password, password->copy()); -#elif HAVE_WINPDFCORE - WinPDFCore *core; - GooString *password; - - if (!(core = (WinPDFCore *)doc->getGUIData()) || - !(password = core->getPassword())) { - return NULL; - } - return new StandardAuthData(password, password->copy()); -#else return NULL; -#endif } void StandardSecurityHandler::freeAuthData(void *authData) { @@ -324,7 +366,8 @@ userPassword = NULL; } if (!Decrypt::makeFileKey(encVersion, encRevision, fileKeyLength, - ownerKey, userKey, permFlags, fileID, + ownerKey, userKey, ownerEnc, userEnc, + permFlags, fileID, ownerPassword, userPassword, fileKey, encryptMetadata, &ownerPasswordOk)) { return gFalse; @@ -398,7 +441,7 @@ if (!(permFlags & xpdfPermissionOpen)) { return gFalse; } - if (!(*xsh->getKey)(xsh->handlerData, docData, &key, &length, &encVersion)) { + if (!(*xsh->getKey)(xsh->handlerData, docData, &key, &length, &encVersion, &encRevision)) { return gFalse; } if ((fileKeyLength = length) > 16) { diff -Nru poppler-0.18.4/poppler/SecurityHandler.h poppler-0.20.5/poppler/SecurityHandler.h --- poppler-0.18.4/poppler/SecurityHandler.h 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/SecurityHandler.h 2012-05-10 20:05:44.000000000 +0000 @@ -6,6 +6,20 @@ // //======================================================================== +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2012 Albert Astals Cid +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + #ifndef SECURITYHANDLER_H #define SECURITYHANDLER_H @@ -34,6 +48,9 @@ SecurityHandler(PDFDoc *docA); virtual ~SecurityHandler(); + // Returns true if the file is actually unencrypted. + virtual GBool isUnencrypted() { return gFalse; } + // Check the document's encryption. If the document is encrypted, // this will first try and (in // "batch" mode), and if those fail, it will attempt to request a @@ -92,6 +109,7 @@ StandardSecurityHandler(PDFDoc *docA, Object *encryptDictA); virtual ~StandardSecurityHandler(); + virtual GBool isUnencrypted(); virtual void *makeAuthData(GooString *ownerPassword, GooString *userPassword); virtual void *getAuthData(); @@ -109,7 +127,7 @@ int permFlags; GBool ownerPasswordOk; - Guchar fileKey[16]; + Guchar fileKey[32]; int fileKeyLength; int encVersion; int encRevision; @@ -117,6 +135,7 @@ CryptAlgorithm encAlgorithm; GooString *ownerKey, *userKey; + GooString *ownerEnc, *userEnc; GooString *fileID; GBool ok; }; @@ -143,6 +162,7 @@ virtual Guchar *getFileKey() { return fileKey; } virtual int getFileKeyLength() { return fileKeyLength; } virtual int getEncVersion() { return encVersion; } + virtual int getEncRevision() { return encRevision; } virtual CryptAlgorithm getEncAlgorithm() { return encAlgorithm; } private: @@ -154,6 +174,7 @@ Guchar fileKey[16]; int fileKeyLength; int encVersion; + int encRevision; CryptAlgorithm encAlgorithm; GBool ok; }; diff -Nru poppler-0.18.4/poppler/SplashOutputDev.cc poppler-0.20.5/poppler/SplashOutputDev.cc --- poppler-0.18.4/poppler/SplashOutputDev.cc 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/SplashOutputDev.cc 2012-09-26 09:47:35.000000000 +0000 @@ -15,12 +15,12 @@ // // Copyright (C) 2005 Takashi Iwai // Copyright (C) 2006 Stefan Schweizer -// Copyright (C) 2006-2011 Albert Astals Cid +// Copyright (C) 2006-2012 Albert Astals Cid // Copyright (C) 2006 Krzysztof Kowalczyk // Copyright (C) 2006 Scott Turner // Copyright (C) 2007 Koji Otani // Copyright (C) 2009 Petr Gajdos -// Copyright (C) 2009-2011 Thomas Freitag +// Copyright (C) 2009-2012 Thomas Freitag // Copyright (C) 2009 Carlos Garcia Campos // Copyright (C) 2009 William Bader // Copyright (C) 2010 Patrick Spendrin @@ -51,8 +51,8 @@ #include "Gfx.h" #include "GfxFont.h" #include "Page.h" +#include "PDFDoc.h" #include "Link.h" -#include "CharCodeToUnicode.h" #include "FontEncodingTables.h" #include "fofi/FoFiTrueType.h" #include "splash/SplashBitmap.h" @@ -129,182 +129,6 @@ splashColorCopy(dest, color); } -static inline SplashPattern *createOverprintPattern(GfxColorSpace *colorSpace, SplashColorPtr color, GBool image, Guchar tolerance = 0x01) { - switch (colorSpace->getMode()) { - case csDeviceCMYK: - if (image) { - return new SplashSolidColor(color); - } - case csSeparation: - case csDeviceN: - if (image && colorSpace->getMode() == csDeviceN) { - GfxDeviceNColorSpace *deviceNSpace = (GfxDeviceNColorSpace *) colorSpace; - GBool hasSpot = gFalse; - GBool hasProcess = gFalse; - for (int i = 0; i < deviceNSpace->getNComps(); i++) { - GooString *name = deviceNSpace->getColorantName(i)->upperCase(); - if (name->cmp("CYAN") != 0 && - name->cmp("MAGENTA") != 0 && - name->cmp("YELLOW") != 0 && - name->cmp("BLACK") != 0 && - name->cmp("NONE") != 0) { - hasSpot = gTrue; - } else { - hasProcess = gTrue; - } - } - if (hasSpot && hasProcess) - return new SplashSolidColor(color); - } - return new SplashOverprintColor(colorSpace, color, tolerance); - case csIndexed: - return createOverprintPattern(((GfxIndexedColorSpace *) colorSpace)->getBase(), color, image); - case csICCBased: - if (image) { - return createOverprintPattern(((GfxICCBasedColorSpace *) colorSpace)->getAlt(), color, gFalse, 0x05); - } - case csDeviceGray: - if (image) { - return new SplashOverprintColor(colorSpace, color, tolerance); - } - default: // knockout - return new SplashSolidColor(color); - } -} - - -//------------------------------------------------------------------------ -// SplashOverprintColor -//------------------------------------------------------------------------ - -SplashOverprintColor::SplashOverprintColor(GfxColorSpace *colorSpaceA, SplashColorPtr colorA, Guchar toleranceA) { - splashColorCopy(color, colorA); - colorSpace = colorSpaceA; - tolerance = toleranceA; -} - -SplashOverprintColor::~SplashOverprintColor() { -} - -GBool SplashOverprintColor::getColor(int x, int y, SplashColorPtr c) { - splashColorCopy(c, color); - return gTrue; -} - -void SplashOverprintColor::overprint(GBool op, Guchar aSrc, SplashColorPtr cSrc, - Guchar aDest, SplashColorPtr cDest, - SplashColorPtr colorResult) { - switch(colorSpace->getMode()) { - case csDeviceGray: // only in case of grayscale images - colorResult[0] = cDest[0]; - colorResult[1] = cDest[1]; - colorResult[2] = cDest[2]; - colorResult[3] = (Guchar)(((aDest - aSrc) * cDest[3] + - aSrc * cSrc[3]) / aDest); - break; - case csDeviceCMYK: - colorResult[0] = (cSrc[0] < tolerance && op) ? - cDest[0] : - (Guchar)(((aDest - aSrc) * cDest[0] + aSrc * cSrc[0]) / aDest); - colorResult[1] = (cSrc[1] < tolerance && op) ? - cDest[1] : - (Guchar)(((aDest - aSrc) * cDest[1] + aSrc * cSrc[1]) / aDest); - colorResult[2] = (cSrc[2] < tolerance && op) ? - cDest[2] : - (Guchar)(((aDest - aSrc) * cDest[2] + aSrc * cSrc[2]) / aDest); - colorResult[3] = (cSrc[3] < tolerance && op) ? - cDest[3] : - (Guchar)(((aDest - aSrc) * cDest[3] + aSrc * cSrc[3]) / aDest); - break; - - case csSeparation: - { - GfxSeparationColorSpace *sepSpace = (GfxSeparationColorSpace *) colorSpace; - GooString *name = sepSpace->getName()->upperCase(); - if (name->cmp("CYAN") == 0) { - colorResult[0] = (Guchar)(((aDest - aSrc) * cDest[0] + - aSrc * cSrc[0]) / aDest); - colorResult[1] = cDest[1]; - colorResult[2] = cDest[2]; - colorResult[3] = cDest[3]; - } else if (name->cmp("MAGENTA") == 0) { - colorResult[0] = cDest[0]; - colorResult[1] = (Guchar)(((aDest - aSrc) * cDest[1] + - aSrc * cSrc[1]) / aDest); - colorResult[2] = cDest[2]; - colorResult[3] = cDest[3]; - } else if (name->cmp("YELLOW") == 0) { - colorResult[0] = cDest[0]; - colorResult[1] = cDest[1]; - colorResult[2] = (Guchar)(((aDest - aSrc) * cDest[2] + - aSrc * cSrc[2]) / aDest); - colorResult[3] = cDest[3]; - } else if (name->cmp("BLACK") == 0) { - colorResult[0] = cDest[0]; - colorResult[1] = cDest[1]; - colorResult[2] = cDest[2]; - colorResult[3] = (Guchar)(((aDest - aSrc) * cDest[3] + - aSrc * cSrc[3]) / aDest); - } else { - colorResult[0] = ((int) cDest[0] + cSrc[0]) > 0xff ? 0xff : cDest[0] + cSrc[0]; - colorResult[1] = ((int) cDest[1] + cSrc[1]) > 0xff ? 0xff : cDest[1] + cSrc[1]; - colorResult[2] = ((int) cDest[2] + cSrc[2]) > 0xff ? 0xff : cDest[2] + cSrc[2]; - colorResult[3] = ((int) cDest[3] + cSrc[3]) > 0xff ? 0xff : cDest[3] + cSrc[3]; - } - } - break; - case csDeviceN: - { - GfxDeviceNColorSpace *deviceNSpace = (GfxDeviceNColorSpace *) colorSpace; - colorResult[0] = cDest[0]; - colorResult[1] = cDest[1]; - colorResult[2] = cDest[2]; - colorResult[3] = cDest[3]; - for (int i = 0; i < deviceNSpace->getNComps(); i++) { - GooString *name = deviceNSpace->getColorantName(i)->upperCase(); - if (name->cmp("CYAN") == 0) { - colorResult[0] = (Guchar)(((aDest - aSrc) * cDest[0] + - aSrc * cSrc[0]) / aDest); - } else if (name->cmp("MAGENTA") == 0) { - colorResult[1] = (Guchar)(((aDest - aSrc) * cDest[1] + - aSrc * cSrc[1]) / aDest); - } else if (name->cmp("YELLOW") == 0) { - colorResult[2] = (Guchar)(((aDest - aSrc) * cDest[2] + - aSrc * cSrc[2]) / aDest); - } else if (name->cmp("BLACK") == 0) { - colorResult[3] = (Guchar)(((aDest - aSrc) * cDest[3] + - aSrc * cSrc[3]) / aDest); - } else if (name->cmp("NONE") != 0) { - colorResult[0] = (cSrc[0] < tolerance && op) ? - cDest[0] : - (Guchar)(((aDest - aSrc) * cDest[0] + aSrc * cSrc[0]) / aDest); - colorResult[1] = (cSrc[1] < tolerance && op) ? - cDest[1] : - (Guchar)(((aDest - aSrc) * cDest[1] + aSrc * cSrc[1]) / aDest); - colorResult[2] = (cSrc[2] < tolerance && op) ? - cDest[2] : - (Guchar)(((aDest - aSrc) * cDest[2] + aSrc * cSrc[2]) / aDest); - colorResult[3] = (cSrc[3] < tolerance && op) ? - cDest[3] : - (Guchar)(((aDest - aSrc) * cDest[3] + aSrc * cSrc[3]) / aDest); - break; - } - } - } - break; - default: - // default for overprint is knockout: - colorResult[0] = (Guchar)(((aDest - aSrc) * cDest[0] + - aSrc * cSrc[0]) / aDest); - colorResult[1] = (Guchar)(((aDest - aSrc) * cDest[1] + - aSrc * cSrc[1]) / aDest); - colorResult[2] = (Guchar)(((aDest - aSrc) * cDest[2] + - aSrc * cSrc[2]) / aDest); - colorResult[3] = (Guchar)(((aDest - aSrc) * cDest[3] + - aSrc * cSrc[3]) / aDest); - } -} - //------------------------------------------------------------------------ // SplashGouraudPattern //------------------------------------------------------------------------ @@ -318,11 +142,9 @@ bDirectColorTranslation = bDirectColorTranslationA; shadingA->getColorSpace()->getDefaultColor(&srcColor); convertGfxColor(defaultColor, mode, shadingA->getColorSpace(), &srcColor); - opPattern = new SplashOverprintColor(shadingA->getColorSpace(), defaultColor, 0x01); } SplashGouraudPattern::~SplashGouraudPattern() { - delete opPattern; } void SplashGouraudPattern::getParameterizedColor(double colorinterp, SplashColorMode mode, SplashColorPtr dest) { @@ -344,11 +166,6 @@ } } -void SplashGouraudPattern::overprint(GBool op, Guchar aSrc, SplashColorPtr cSrc, - Guchar aDest, SplashColorPtr cDest, - SplashColorPtr colorResult) { - opPattern->overprint(op, aSrc, cSrc, aDest, cDest, colorResult); -} //------------------------------------------------------------------------ // SplashUnivariatePattern //------------------------------------------------------------------------ @@ -419,11 +236,9 @@ inva = 1.0 / a; shadingA->getColorSpace()->getDefaultColor(&srcColor); convertGfxColor(defaultColor, colorModeA, shadingA->getColorSpace(), &srcColor); - opPattern = new SplashOverprintColor(shadingA->getColorSpace(), defaultColor, 0x01); } SplashRadialPattern::~SplashRadialPattern() { - delete opPattern; } GBool SplashRadialPattern::getParameter(double xs, double ys, double *t) { @@ -509,12 +324,6 @@ return gFalse; } -void SplashRadialPattern::overprint(GBool op, Guchar aSrc, SplashColorPtr cSrc, - Guchar aDest, SplashColorPtr cDest, - SplashColorPtr colorResult) { - opPattern->overprint(op, aSrc, cSrc, aDest, cDest, colorResult); -} - #undef RADIAL_EPSILON //------------------------------------------------------------------------ @@ -533,11 +342,9 @@ mul = 1 / (dx * dx + dy * dy); shadingA->getColorSpace()->getDefaultColor(&srcColor); convertGfxColor(defaultColor, colorModeA, shadingA->getColorSpace(), &srcColor); - opPattern = new SplashOverprintColor(shadingA->getColorSpace(), defaultColor, 0x01); } SplashAxialPattern::~SplashAxialPattern() { - delete opPattern; } GBool SplashAxialPattern::getParameter(double xc, double yc, double *t) { @@ -560,14 +367,13 @@ return gTrue; } -void SplashAxialPattern::overprint(GBool op, Guchar aSrc, SplashColorPtr cSrc, - Guchar aDest, SplashColorPtr cDest, - SplashColorPtr colorResult) { - opPattern->overprint(op, aSrc, cSrc, aDest, cDest, colorResult); -} - //------------------------------------------------------------------------ +// Type 3 font cache size parameters +#define type3FontCacheAssoc 8 +#define type3FontCacheMaxSets 8 +#define type3FontCacheSize (128*1024) +//------------------------------------------------------------------------ // Divide a 16-bit value (in [0, 255*255]) by 255, returning an 8-bit result. static inline Guchar div255(int x) { return (Guchar)((x + (x >> 8) + 0x80) >> 8); @@ -893,15 +699,21 @@ SplashColorMode cm) { int i; - for (i = 0; i < splashColorModeNComps[cm]; ++i) { #if SPLASH_CMYK - if (cm == splashModeCMYK8) - { - blend[i] = dest[i] < src[i] ? 255 - (src[i] - dest[i]) : 255 - (dest[i] - src[i]); + if (cm == splashModeCMYK8) { + SplashColor rgbSrc; + SplashColor rgbDest; + SplashColor rgbBlend; + cmykToRGB(src, rgbSrc); + cmykToRGB(dest, rgbDest); + for (i = 0; i < 3; ++i) { + rgbBlend[i] = rgbDest[i] < rgbSrc[i] ? rgbSrc[i] - rgbDest[i] : rgbDest[i] - rgbSrc[i]; } - else + rgbToCMYK(rgbBlend, blend); + } else #endif - { + { + for (i = 0; i < splashColorModeNComps[cm]; ++i) { blend[i] = dest[i] < src[i] ? src[i] - dest[i] : dest[i] - src[i]; } } @@ -931,63 +743,104 @@ } } -static void cvtRGBToHSV(Guchar r, Guchar g, Guchar b, int *h, int *s, int *v) { - int cmax, cmid, cmin, x; +static int getLum(int r, int g, int b) { + return (int)(0.3 * r + 0.59 * g + 0.11 * b); +} - if (r >= g) { - if (g >= b) { x = 0; cmax = r; cmid = g; cmin = b; } - else if (b >= r) { x = 4; cmax = b; cmid = r; cmin = g; } - else { x = 5; cmax = r; cmid = b; cmin = g; } - } else { - if (r >= b) { x = 1; cmax = g; cmid = r; cmin = b; } - else if (g >= b) { x = 2; cmax = g; cmid = b; cmin = r; } - else { x = 3; cmax = b; cmid = g; cmin = r; } - } - if (cmax == cmin) { - *h = *s = 0; - } else { - *h = x * 60; - if (x & 1) { - *h += ((cmax - cmid) * 60) / (cmax - cmin); - } else { - *h += ((cmid - cmin) * 60) / (cmax - cmin); - } - *s = (255 * (cmax - cmin)) / cmax; +static int getSat(int r, int g, int b) { + int rgbMin, rgbMax; + + rgbMin = rgbMax = r; + if (g < rgbMin) { + rgbMin = g; + } else if (g > rgbMax) { + rgbMax = g; + } + if (b < rgbMin) { + rgbMin = b; + } else if (b > rgbMax) { + rgbMax = b; + } + return rgbMax - rgbMin; +} + +static void clipColor(int rIn, int gIn, int bIn, + Guchar *rOut, Guchar *gOut, Guchar *bOut) { + int lum, rgbMin, rgbMax; + + lum = getLum(rIn, gIn, bIn); + rgbMin = rgbMax = rIn; + if (gIn < rgbMin) { + rgbMin = gIn; + } else if (gIn > rgbMax) { + rgbMax = gIn; + } + if (bIn < rgbMin) { + rgbMin = bIn; + } else if (bIn > rgbMax) { + rgbMax = bIn; + } + if (rgbMin < 0) { + *rOut = (Guchar)(lum + ((rIn - lum) * lum) / (lum - rgbMin)); + *gOut = (Guchar)(lum + ((gIn - lum) * lum) / (lum - rgbMin)); + *bOut = (Guchar)(lum + ((bIn - lum) * lum) / (lum - rgbMin)); + } else if (rgbMax > 255) { + *rOut = (Guchar)(lum + ((rIn - lum) * (255 - lum)) / (rgbMax - lum)); + *gOut = (Guchar)(lum + ((gIn - lum) * (255 - lum)) / (rgbMax - lum)); + *bOut = (Guchar)(lum + ((bIn - lum) * (255 - lum)) / (rgbMax - lum)); + } else { + *rOut = rIn; + *gOut = gIn; + *bOut = bIn; } - *v = cmax; } -static void cvtHSVToRGB(int h, int s, int v, Guchar *r, Guchar *g, Guchar *b) { - int x, f, cmax, cmid, cmin; +static void setLum(Guchar rIn, Guchar gIn, Guchar bIn, int lum, + Guchar *rOut, Guchar *gOut, Guchar *bOut) { + int d; + + d = lum - getLum(rIn, gIn, bIn); + clipColor(rIn + d, gIn + d, bIn + d, rOut, gOut, bOut); +} + +static void setSat(Guchar rIn, Guchar gIn, Guchar bIn, int sat, + Guchar *rOut, Guchar *gOut, Guchar *bOut) { + int rgbMin, rgbMid, rgbMax; + Guchar *minOut, *midOut, *maxOut; - if (s == 0) { - *r = *g = *b = v; + if (rIn < gIn) { + rgbMin = rIn; minOut = rOut; + rgbMid = gIn; midOut = gOut; } else { - x = h / 60; - f = h % 60; - cmax = v; - if (x & 1) { - cmid = div255(v * 255 - ((s * f) / 60)); - } else { - cmid = div255(v * (255 - ((s * (60 - f)) / 60))); - } - cmin = div255(v * (255 - s)); - switch (x) { - case 0: *r = cmax; *g = cmid; *b = cmin; break; - case 1: *g = cmax; *r = cmid; *b = cmin; break; - case 2: *g = cmax; *b = cmid; *r = cmin; break; - case 3: *b = cmax; *g = cmid; *r = cmin; break; - case 4: *b = cmax; *r = cmid; *g = cmin; break; - case 5: *r = cmax; *b = cmid; *g = cmin; break; - } + rgbMin = gIn; minOut = gOut; + rgbMid = rIn; midOut = rOut; + } + if (bIn > rgbMid) { + rgbMax = bIn; maxOut = bOut; + } else if (bIn > rgbMin) { + rgbMax = rgbMid; maxOut = midOut; + rgbMid = bIn; midOut = bOut; + } else { + rgbMax = rgbMid; maxOut = midOut; + rgbMid = rgbMin; midOut = minOut; + rgbMin = bIn; minOut = bOut; + } + if (rgbMax > rgbMin) { + *midOut = (Guchar)((rgbMid - rgbMin) * sat) / (rgbMax - rgbMin); + *maxOut = (Guchar)sat; + } else { + *midOut = *maxOut = 0; } + *minOut = 0; } static void splashOutBlendHue(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { - int hs, ss, vs, hd, sd, vd; -#if SPLASH_CMYK - Guchar r, g, b; + Guchar r0, g0, b0; +#ifdef SPLASH_CMYK + Guchar r1, g1, b1; + int i; + SplashColor src2, dest2; #endif switch (cm) { @@ -999,25 +852,31 @@ src[3] = 255; case splashModeRGB8: case splashModeBGR8: - cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs); - cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd); - cvtHSVToRGB(hs, sd, vd, &blend[0], &blend[1], &blend[2]); + setSat(src[0], src[1], src[2], getSat(dest[0], dest[1], dest[2]), + &r0, &g0, &b0); + setLum(r0, g0, b0, getLum(dest[0], dest[1], dest[2]), + &blend[0], &blend[1], &blend[2]); break; #if SPLASH_CMYK case splashModeCMYK8: - //~ (0xff - ...) should be clipped - cvtRGBToHSV(0xff - (src[0] + src[3]), - 0xff - (src[1] + src[3]), - 0xff - (src[2] + src[3]), &hs, &ss, &vs); - cvtRGBToHSV(0xff - (dest[0] + dest[3]), - 0xff - (dest[1] + dest[3]), - 0xff - (dest[2] + dest[3]), &hd, &sd, &vd); - cvtHSVToRGB(hs, sd, vd, &r, &g, &b); - //~ should do black generation - blend[0] = 0xff - r; - blend[1] = 0xff - g; - blend[2] = 0xff - b; - blend[3] = 0; + for (i = 0; i < 4; i++) { + // convert to additive + src2[i] = 0xff - src[i]; + dest2[i] = 0xff - dest[i]; + } + // NB: inputs have already been converted to additive mode + setSat(src2[0], src2[1], src2[2], getSat(dest2[0], dest2[1], dest2[2]), + &r0, &g0, &b0); + setLum(r0, g0, b0, getLum(dest2[0], dest2[1], dest2[2]), + &r1, &g1, &b1); + blend[0] = r1; + blend[1] = g1; + blend[2] = b1; + blend[3] = dest2[3]; + for (i = 0; i < 4; i++) { + // convert back to subtractive + blend[i] = 0xff - blend[i]; + } break; #endif } @@ -1026,9 +885,11 @@ static void splashOutBlendSaturation(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { - int hs, ss, vs, hd, sd, vd; -#if SPLASH_CMYK - Guchar r, g, b; + Guchar r0, g0, b0; +#ifdef SPLASH_CMYK + Guchar r1, g1, b1; + int i; + SplashColor src2, dest2; #endif switch (cm) { @@ -1040,25 +901,30 @@ src[3] = 255; case splashModeRGB8: case splashModeBGR8: - cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs); - cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd); - cvtHSVToRGB(hd, ss, vd, &blend[0], &blend[1], &blend[2]); + setSat(dest[0], dest[1], dest[2], getSat(src[0], src[1], src[2]), + &r0, &g0, &b0); + setLum(r0, g0, b0, getLum(dest[0], dest[1], dest[2]), + &blend[0], &blend[1], &blend[2]); break; #if SPLASH_CMYK case splashModeCMYK8: - //~ (0xff - ...) should be clipped - cvtRGBToHSV(0xff - (src[0] + src[3]), - 0xff - (src[1] + src[3]), - 0xff - (src[2] + src[3]), &hs, &ss, &vs); - cvtRGBToHSV(0xff - (dest[0] + dest[3]), - 0xff - (dest[1] + dest[3]), - 0xff - (dest[2] + dest[3]), &hd, &sd, &vd); - cvtHSVToRGB(hd, ss, vd, &r, &g, &b); - //~ should do black generation - blend[0] = 0xff - r; - blend[1] = 0xff - g; - blend[2] = 0xff - b; - blend[3] = 0; + for (i = 0; i < 4; i++) { + // convert to additive + src2[i] = 0xff - src[i]; + dest2[i] = 0xff - dest[i]; + } + setSat(dest2[0], dest2[1], dest2[2], getSat(src2[0], src2[1], src2[2]), + &r0, &g0, &b0); + setLum(r0, g0, b0, getLum(dest2[0], dest2[1], dest2[2]), + &r1, &g1, &b1); + blend[0] = r1; + blend[1] = g1; + blend[2] = b1; + blend[3] = dest2[3]; + for (i = 0; i < 4; i++) { + // convert back to subtractive + blend[i] = 0xff - blend[i]; + } break; #endif } @@ -1066,7 +932,11 @@ static void splashOutBlendColor(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { - int hs, ss, vs, hd, sd, vd; +#if SPLASH_CMYK + Guchar r, g, b; + int i; + SplashColor src2, dest2; +#endif switch (cm) { case splashModeMono1: @@ -1077,21 +947,26 @@ src[3] = 255; case splashModeRGB8: case splashModeBGR8: - cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs); - cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd); - cvtHSVToRGB(hs, ss, vd, &blend[0], &blend[1], &blend[2]); + setLum(src[0], src[1], src[2], getLum(dest[0], dest[1], dest[2]), + &blend[0], &blend[1], &blend[2]); break; #if SPLASH_CMYK case splashModeCMYK8: - SplashColor rgbSrc; - SplashColor rgbDest; - SplashColor rgbBlend; - cmykToRGB(src, rgbSrc); - cmykToRGB(dest, rgbDest); - cvtRGBToHSV(rgbSrc[0], rgbSrc[1], rgbSrc[2], &hs, &ss, &vs); - cvtRGBToHSV(rgbDest[0], rgbDest[1], rgbDest[2], &hd, &sd, &vd); - cvtHSVToRGB(hs, ss, vd, &rgbBlend[0], &rgbBlend[1], &rgbBlend[2]); - rgbToCMYK(rgbBlend, blend); + for (i = 0; i < 4; i++) { + // convert to additive + src2[i] = 0xff - src[i]; + dest2[i] = 0xff - dest[i]; + } + setLum(src2[0], src2[1], src2[2], getLum(dest2[0], dest2[1], dest2[2]), + &r, &g, &b); + blend[0] = r; + blend[1] = g; + blend[2] = b; + blend[3] = dest2[3]; + for (i = 0; i < 4; i++) { + // convert back to subtractive + blend[i] = 0xff - blend[i]; + } break; #endif } @@ -1100,9 +975,10 @@ static void splashOutBlendLuminosity(SplashColorPtr src, SplashColorPtr dest, SplashColorPtr blend, SplashColorMode cm) { - int hs, ss, vs, hd, sd, vd; #if SPLASH_CMYK Guchar r, g, b; + int i; + SplashColor src2, dest2; #endif switch (cm) { @@ -1114,25 +990,26 @@ src[3] = 255; case splashModeRGB8: case splashModeBGR8: - cvtRGBToHSV(src[0], src[1], src[2], &hs, &ss, &vs); - cvtRGBToHSV(dest[0], dest[1], dest[2], &hd, &sd, &vd); - cvtHSVToRGB(hd, sd, vs, &blend[0], &blend[1], &blend[2]); + setLum(dest[0], dest[1], dest[2], getLum(src[0], src[1], src[2]), + &blend[0], &blend[1], &blend[2]); break; #if SPLASH_CMYK case splashModeCMYK8: - //~ (0xff - ...) should be clipped - cvtRGBToHSV(0xff - (src[0] + src[3]), - 0xff - (src[1] + src[3]), - 0xff - (src[2] + src[3]), &hs, &ss, &vs); - cvtRGBToHSV(0xff - (dest[0] + dest[3]), - 0xff - (dest[1] + dest[3]), - 0xff - (dest[2] + dest[3]), &hd, &sd, &vd); - cvtHSVToRGB(hd, sd, vs, &r, &g, &b); - //~ should do black generation - blend[0] = 0xff - r; - blend[1] = 0xff - g; - blend[2] = 0xff - b; - blend[3] = 0; + for (i = 0; i < 4; i++) { + // convert to additive + src2[i] = 0xff - src[i]; + dest2[i] = 0xff - dest[i]; + } + setLum(dest2[0], dest2[1], dest2[2], getLum(src2[0], src2[1], src2[2]), + &r, &g, &b); + blend[0] = r; + blend[1] = g; + blend[2] = b; + blend[3] = src2[3]; + for (i = 0; i < 4; i++) { + // convert back to subtractive + blend[i] = 0xff - blend[i]; + } break; #endif } @@ -1229,32 +1106,27 @@ glyphW = glyphWA; glyphH = glyphHA; validBBox = validBBoxA; + // sanity check for excessively large glyphs (which most likely + // indicate an incorrect BBox) + i = glyphW * glyphH; + if (i > 100000 || glyphW > INT_MAX / glyphH || glyphW <= 0 || glyphH <= 0) { + glyphW = glyphH = 100; + validBBox = gFalse; + } if (aa) { glyphSize = glyphW * glyphH; } else { glyphSize = ((glyphW + 7) >> 3) * glyphH; } - cacheAssoc = 8; - if (glyphSize <= 256) { - cacheSets = 8; - } else if (glyphSize <= 512) { - cacheSets = 4; - } else if (glyphSize <= 1024) { - cacheSets = 2; - } else if (glyphSize <= 2048) { - cacheSets = 1; - cacheAssoc = 4; - } else if (glyphSize <= 4096) { - cacheSets = 1; - cacheAssoc = 2; - } else { - cacheSets = 1; - cacheAssoc = 1; - } + cacheAssoc = type3FontCacheAssoc; + for (cacheSets = type3FontCacheMaxSets; + cacheSets > 1 && + cacheSets * cacheAssoc * glyphSize > type3FontCacheSize; + cacheSets >>= 1) ; if (glyphSize < 10485760 / cacheAssoc / cacheSets) { cacheData = (Guchar *)gmallocn_checkoverflow(cacheSets * cacheAssoc, glyphSize); } else { - error(-1, "Not creating cacheData for T3FontCache, it asked for too much memory.\n" + error(errSyntaxWarning, -1, "Not creating cacheData for T3FontCache, it asked for too much memory.\n" " This could teoretically result in wrong rendering,\n" " but most probably the document is bogus.\n" " Please report a bug if you think the rendering may be wrong because of this."); @@ -1305,6 +1177,11 @@ GfxColorSpace *blendingColorSpace; GBool isolated; + //----- for knockout + SplashBitmap *shape; + GBool knockout; + SplashCoord knockoutOpacity; + //----- saved state SplashBitmap *origBitmap; Splash *origSplash; @@ -1325,6 +1202,7 @@ colorMode = colorModeA; bitmapRowPad = bitmapRowPadA; bitmapTopDown = bitmapTopDownA; + bitmapUpsideDown = gFalse; allowAntialias = allowAntialiasA; vectorAntialias = allowAntialias && globalParams->getVectorAntialias() && @@ -1338,13 +1216,16 @@ } else { splashClearColor(paperColor); } + skipHorizText = gFalse; + skipRotatedText = gFalse; keepAlphaChannel = paperColorA == NULL; - xref = NULL; + doc = NULL; bitmap = new SplashBitmap(1, 1, bitmapRowPad, colorMode, colorMode != splashModeMono1, bitmapTopDown); splash = new Splash(bitmap, vectorAntialias, &screenParams); + splash->setMinLineWidth(globalParams->getMinLineWidth()); splash->clear(paperColor, 0); fontEngine = NULL; @@ -1355,8 +1236,8 @@ font = NULL; needFontUpdate = gFalse; textClipPath = NULL; - haveCSPattern = gFalse; transpGroupStack = NULL; + nestCount = 0; } void SplashOutputDev::setupScreenParams(double hDPI, double vDPI) { @@ -1383,7 +1264,7 @@ case screenStochasticClustered: screenParams.type = splashScreenStochasticClustered; if (screenParams.size < 0) { - screenParams.size = 100; + screenParams.size = 64; } if (screenParams.dotRadius < 0) { screenParams.dotRadius = 2; @@ -1396,7 +1277,7 @@ if (hDPI > 299.9 && vDPI > 299.9) { screenParams.type = splashScreenStochasticClustered; if (screenParams.size < 0) { - screenParams.size = 100; + screenParams.size = 64; } if (screenParams.dotRadius < 0) { screenParams.dotRadius = 2; @@ -1427,10 +1308,10 @@ } } -void SplashOutputDev::startDoc(XRef *xrefA) { +void SplashOutputDev::startDoc(PDFDoc *docA) { int i; - xref = xrefA; + doc = docA; if (fontEngine) { delete fontEngine; } @@ -1473,15 +1354,18 @@ } if (splash) { delete splash; + splash = NULL; } if (!bitmap || w != bitmap->getWidth() || h != bitmap->getHeight()) { if (bitmap) { delete bitmap; + bitmap = NULL; } bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, colorMode != splashModeMono1, bitmapTopDown); } splash = new Splash(bitmap, vectorAntialias, &screenParams); + splash->setMinLineWidth(globalParams->getMinLineWidth()); if (state) { ctm = state->getCTM(); mat[0] = (SplashCoord)ctm[0]; @@ -1587,7 +1471,10 @@ } void SplashOutputDev::updateFlatness(GfxState *state) { - splash->setFlatness(state->getFlatness()); +#if 0 // Acrobat ignores the flatness setting, and always renders curves + // with a fairly small flatness value + splash->setFlatness(state->getFlatness()); +#endif } void SplashOutputDev::updateLineJoin(GfxState *state) { @@ -1620,14 +1507,25 @@ GfxCMYK cmyk; #endif - state->getFillGray(&gray); - state->getFillRGB(&rgb); + switch (colorMode) { + case splashModeMono1: + case splashModeMono8: + state->getFillGray(&gray); + splash->setFillPattern(getColor(gray)); + break; + case splashModeXBGR8: + case splashModeRGB8: + case splashModeBGR8: + state->getFillRGB(&rgb); + splash->setFillPattern(getColor(&rgb)); + break; #if SPLASH_CMYK - state->getFillCMYK(&cmyk); - splash->setFillPattern(getColor(state->getFillColorSpace(), gray, &rgb, &cmyk)); -#else - splash->setFillPattern(getColor(gray, &rgb)); + case splashModeCMYK8: + state->getFillCMYK(&cmyk); + splash->setFillPattern(getColor(&cmyk)); + break; #endif + } } void SplashOutputDev::updateStrokeColor(GfxState *state) { @@ -1637,28 +1535,42 @@ GfxCMYK cmyk; #endif - state->getStrokeGray(&gray); - state->getStrokeRGB(&rgb); + switch (colorMode) { + case splashModeMono1: + case splashModeMono8: + state->getStrokeGray(&gray); + splash->setStrokePattern(getColor(gray)); + break; + case splashModeXBGR8: + case splashModeRGB8: + case splashModeBGR8: + state->getStrokeRGB(&rgb); + splash->setStrokePattern(getColor(&rgb)); + break; #if SPLASH_CMYK - state->getStrokeCMYK(&cmyk); - splash->setStrokePattern(getColor(state->getStrokeColorSpace(), gray, &rgb, &cmyk)); -#else - splash->setStrokePattern(getColor(gray, &rgb)); + case splashModeCMYK8: + state->getStrokeCMYK(&cmyk); + splash->setStrokePattern(getColor(&cmyk)); + break; #endif + } } -#if SPLASH_CMYK -SplashPattern *SplashOutputDev::getColor(GfxColorSpace *colorSpace, GfxGray gray, GfxRGB *rgb, - GfxCMYK *cmyk) { -#else -SplashPattern *SplashOutputDev::getColor(GfxGray gray, GfxRGB *rgb) { -#endif - SplashPattern *pattern; +SplashPattern *SplashOutputDev::getColor(GfxGray gray) { SplashColor color; - GfxColorComp r, g, b; if (reverseVideo) { gray = gfxColorComp1 - gray; + } + color[0] = colToByte(gray); + return new SplashSolidColor(color); +} + +SplashPattern *SplashOutputDev::getColor(GfxRGB *rgb) { + GfxColorComp r, g, b; + SplashColor color; + + if (reverseVideo) { r = gfxColorComp1 - rgb->r; g = gfxColorComp1 - rgb->g; b = gfxColorComp1 - rgb->b; @@ -1667,35 +1579,87 @@ g = rgb->g; b = rgb->b; } + color[0] = colToByte(r); + color[1] = colToByte(g); + color[2] = colToByte(b); + if (colorMode == splashModeXBGR8) color[3] = 255; + return new SplashSolidColor(color); +} - pattern = NULL; // make gcc happy - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - color[0] = colToByte(gray); - pattern = new SplashSolidColor(color); - break; - case splashModeXBGR8: - color[3] = 255; - case splashModeRGB8: - case splashModeBGR8: - color[0] = colToByte(r); - color[1] = colToByte(g); - color[2] = colToByte(b); - pattern = new SplashSolidColor(color); - break; #if SPLASH_CMYK - case splashModeCMYK8: - color[0] = colToByte(cmyk->c); - color[1] = colToByte(cmyk->m); - color[2] = colToByte(cmyk->y); - color[3] = colToByte(cmyk->k); - pattern = createOverprintPattern(colorSpace, color, gFalse); - break; +SplashPattern *SplashOutputDev::getColor(GfxCMYK *cmyk) { + SplashColor color; + + color[0] = colToByte(cmyk->c); + color[1] = colToByte(cmyk->m); + color[2] = colToByte(cmyk->y); + color[3] = colToByte(cmyk->k); + return new SplashSolidColor(color); +} #endif - } - return pattern; +void SplashOutputDev::setOverprintMask(GfxColorSpace *colorSpace, + GBool overprintFlag, + int overprintMode, + GfxColor *singleColor, + GBool grayIndexed) { +#if SPLASH_CMYK + Guint mask; + GfxCMYK cmyk; + GBool additive = gFalse; + int i; + + if (colorSpace->getMode() == csIndexed) { + setOverprintMask(((GfxIndexedColorSpace *)colorSpace)->getBase(), + overprintFlag, + overprintMode, + singleColor, + grayIndexed); + return; + } + if (overprintFlag && globalParams->getOverprintPreview()) { + mask = colorSpace->getOverprintMask(); + if (singleColor && overprintMode && + colorSpace->getMode() == csDeviceCMYK) { + colorSpace->getCMYK(singleColor, &cmyk); + if (cmyk.c == 0) { + mask &= ~1; + } + if (cmyk.m == 0) { + mask &= ~2; + } + if (cmyk.y == 0) { + mask &= ~4; + } + if (cmyk.k == 0) { + mask &= ~8; + } + } + if (grayIndexed) { + mask &= ~7; + } else if (colorSpace->getMode() == csSeparation) { + GfxSeparationColorSpace *deviceSep = (GfxSeparationColorSpace *)colorSpace; + additive = deviceSep->getName()->cmp("All") != 0 && mask == 0x0f && !deviceSep->isNonMarking(); + } else if (colorSpace->getMode() == csDeviceN) { + GfxDeviceNColorSpace *deviceNCS = (GfxDeviceNColorSpace *)colorSpace; + additive = mask == 0x0f && !deviceNCS->isNonMarking(); + for (i = 0; i < deviceNCS->getNComps() && additive; i++) { + if (deviceNCS->getColorantName(i)->cmp("Cyan") == 0) { + additive = gFalse; + } else if (deviceNCS->getColorantName(i)->cmp("Magenta") == 0) { + additive = gFalse; + } else if (deviceNCS->getColorantName(i)->cmp("Yellow") == 0) { + additive = gFalse; + } else if (deviceNCS->getColorantName(i)->cmp("Black") == 0) { + additive = gFalse; + } + } + } + } else { + mask = 0xffffffff; + } + splash->setOverprintMask(mask, additive); +#endif } void SplashOutputDev::updateBlendMode(GfxState *state) { @@ -1704,10 +1668,16 @@ void SplashOutputDev::updateFillOpacity(GfxState *state) { splash->setFillAlpha((SplashCoord)state->getFillOpacity()); + if (transpGroupStack != NULL && (SplashCoord)state->getFillOpacity() < transpGroupStack->knockoutOpacity) { + transpGroupStack->knockoutOpacity = (SplashCoord)state->getFillOpacity(); + } } void SplashOutputDev::updateStrokeOpacity(GfxState *state) { splash->setStrokeAlpha((SplashCoord)state->getStrokeOpacity()); + if (transpGroupStack != NULL && (SplashCoord)state->getStrokeOpacity() < transpGroupStack->knockoutOpacity) { + transpGroupStack->knockoutOpacity = (SplashCoord)state->getStrokeOpacity(); + } } void SplashOutputDev::updateFillOverprint(GfxState *state) { @@ -1722,29 +1692,73 @@ splash->setOverprintMode(state->getOverprintMode()); } +void SplashOutputDev::updateTransfer(GfxState *state) { + Function **transfer; + Guchar red[256], green[256], blue[256], gray[256]; + double x, y; + int i; + + transfer = state->getTransfer(); + if (transfer[0] && + transfer[0]->getInputSize() == 1 && + transfer[0]->getOutputSize() == 1) { + if (transfer[1] && + transfer[1]->getInputSize() == 1 && + transfer[1]->getOutputSize() == 1 && + transfer[2] && + transfer[2]->getInputSize() == 1 && + transfer[2]->getOutputSize() == 1 && + transfer[3] && + transfer[3]->getInputSize() == 1 && + transfer[3]->getOutputSize() == 1) { + for (i = 0; i < 256; ++i) { + x = i / 255.0; + transfer[0]->transform(&x, &y); + red[i] = (Guchar)(y * 255.0 + 0.5); + transfer[1]->transform(&x, &y); + green[i] = (Guchar)(y * 255.0 + 0.5); + transfer[2]->transform(&x, &y); + blue[i] = (Guchar)(y * 255.0 + 0.5); + transfer[3]->transform(&x, &y); + gray[i] = (Guchar)(y * 255.0 + 0.5); + } + } else { + for (i = 0; i < 256; ++i) { + x = i / 255.0; + transfer[0]->transform(&x, &y); + red[i] = green[i] = blue[i] = gray[i] = (Guchar)(y * 255.0 + 0.5); + } + } + } else { + for (i = 0; i < 256; ++i) { + red[i] = green[i] = blue[i] = gray[i] = (Guchar)i; + } + } + splash->setTransfer(red, green, blue, gray); +} + void SplashOutputDev::updateFont(GfxState * /*state*/) { needFontUpdate = gTrue; } void SplashOutputDev::doUpdateFont(GfxState *state) { GfxFont *gfxFont; + GfxFontLoc *fontLoc; GfxFontType fontType; SplashOutFontFileID *id; SplashFontFile *fontFile; SplashFontSrc *fontsrc = NULL; FoFiTrueType *ff; - Ref embRef; Object refObj, strObj; GooString *fileName; char *tmpBuf; int tmpBufLen; - Gushort *codeToGID; - DisplayFontParam *dfp; + int *codeToGID; double *textMat; double m11, m12, m21, m22, fontSize; - SplashCoord mat[4]; - int n; int faceIndex = 0; + SplashCoord mat[4]; + int n, i; GBool recreateFont = gFalse; GBool doAdjustFontMatrix = gFalse; @@ -1752,7 +1766,7 @@ font = NULL; fileName = NULL; tmpBuf = NULL; - dfp = NULL; + fontLoc = NULL; if (!(gfxFont = state->getFont())) { goto err1; @@ -1762,6 +1776,13 @@ goto err1; } + // sanity-check the font size - skip anything larger than 10 inches + // (this avoids problems allocating memory for the font cache) + if (state->getTransformedFontSize() + > 10 * (state->getHDPI() + state->getVDPI())) { + goto err1; + } + // check the font file cache id = new SplashOutFontFileID(gfxFont->getID()); if ((fontFile = fontEngine->getFontFile(id))) { @@ -1769,37 +1790,24 @@ } else { - // if there is an embedded font, write it to disk - if (gfxFont->getEmbeddedFontID(&embRef)) { - tmpBuf = gfxFont->readEmbFontFile(xref, &tmpBufLen); + if (!(fontLoc = gfxFont->locateFont(doc->getXRef(), gFalse))) { + error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'", + gfxFont->getName() ? gfxFont->getName()->getCString() + : "(unnamed)"); + goto err2; + } + + // embedded font + if (fontLoc->locType == gfxFontLocEmbedded) { + // if there is an embedded font, read it to memory + tmpBuf = gfxFont->readEmbFontFile(doc->getXRef(), &tmpBufLen); if (! tmpBuf) goto err2; - // if there is an external font file, use it - } else if (!(fileName = gfxFont->getExtFontFile())) { - - // look for a display font mapping or a substitute font - dfp = NULL; - if (gfxFont->getName()) { - dfp = globalParams->getDisplayFont(gfxFont); - } - if (!dfp) { - error(-1, "Couldn't find a font for '%s'", - gfxFont->getName() ? gfxFont->getName()->getCString() - : "(unnamed)"); - goto err2; - } - switch (dfp->kind) { - case displayFontT1: - fileName = dfp->t1.fileName; - fontType = gfxFont->isCIDFont() ? fontCIDType0 : fontType1; - break; - case displayFontTT: - fileName = dfp->tt.fileName; - fontType = gfxFont->isCIDFont() ? fontCIDType2 : fontTrueType; - faceIndex = dfp->tt.faceIndex; - break; - } + // external font + } else { // gfxFontLocExternal + fileName = fontLoc->path; + fontType = fontLoc->fontType; doAdjustFontMatrix = gTrue; } @@ -1815,8 +1823,8 @@ if (!(fontFile = fontEngine->loadType1Font( id, fontsrc, - ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(-1, "Couldn't create a font for '%s'", + (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1826,8 +1834,8 @@ if (!(fontFile = fontEngine->loadType1CFont( id, fontsrc, - ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(-1, "Couldn't create a font for '%s'", + (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1837,8 +1845,8 @@ if (!(fontFile = fontEngine->loadOpenTypeT1CFont( id, fontsrc, - ((Gfx8BitFont *)gfxFont)->getEncoding()))) { - error(-1, "Couldn't create a font for '%s'", + (const char **)((Gfx8BitFont *)gfxFont)->getEncoding()))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1854,6 +1862,17 @@ codeToGID = ((Gfx8BitFont *)gfxFont)->getCodeToGIDMap(ff); n = 256; delete ff; + // if we're substituting for a non-TrueType font, we need to mark + // all notdef codes as "do not draw" (rather than drawing TrueType + // notdef glyphs) + if (gfxFont->getType() != fontTrueType && + gfxFont->getType() != fontTrueTypeOT) { + for (i = 0; i < 256; ++i) { + if (codeToGID[i] == 0) { + codeToGID[i] = -1; + } + } + } } else { codeToGID = NULL; n = 0; @@ -1862,7 +1881,7 @@ id, fontsrc, codeToGID, n))) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1873,17 +1892,27 @@ if (!(fontFile = fontEngine->loadCIDFont( id, fontsrc))) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; } break; case fontCIDType0COT: + if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { + n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); + codeToGID = (int *)gmallocn(n, sizeof(int)); + memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), + n * sizeof(int)); + } else { + codeToGID = NULL; + n = 0; + } if (!(fontFile = fontEngine->loadOpenTypeCFFFont( id, - fontsrc))) { - error(-1, "Couldn't create a font for '%s'", + fontsrc, + codeToGID, n))) { + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1896,9 +1925,9 @@ if (((GfxCIDFont *)gfxFont)->getCIDToGID()) { n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen(); if (n) { - codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort)); + codeToGID = (int *)gmallocn(n, sizeof(int)); memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), - n * sizeof(Gushort)); + n * sizeof(int)); } } else { if (fileName) @@ -1907,7 +1936,7 @@ ff = FoFiTrueType::make(tmpBuf, tmpBufLen); if (! ff) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1919,7 +1948,7 @@ id, fontsrc, codeToGID, n, faceIndex))) { - error(-1, "Couldn't create a font for '%s'", + error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)"); goto err2; @@ -1980,12 +2009,14 @@ font = fontEngine->getFont(fontFile, mat, splash->getMatrix()); } + delete fontLoc; if (fontsrc && !fontsrc->isFile) fontsrc->unref(); return; err2: delete id; + delete fontLoc; err1: if (fontsrc && !fontsrc->isFile) fontsrc->unref(); @@ -1998,7 +2029,9 @@ if (state->getStrokeColorSpace()->isNonMarking()) { return; } - path = convertPath(state, state->getPath()); + setOverprintMask(state->getStrokeColorSpace(), state->getStrokeOverprint(), + state->getOverprintMode(), state->getStrokeColor()); + path = convertPath(state, state->getPath(), gFalse); splash->stroke(path); delete path; } @@ -2009,7 +2042,9 @@ if (state->getFillColorSpace()->isNonMarking()) { return; } - path = convertPath(state, state->getPath()); + setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); + path = convertPath(state, state->getPath(), gTrue); splash->fill(path, gFalse); delete path; } @@ -2020,7 +2055,9 @@ if (state->getFillColorSpace()->isNonMarking()) { return; } - path = convertPath(state, state->getPath()); + setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); + path = convertPath(state, state->getPath(), gTrue); splash->fill(path, gTrue); delete path; } @@ -2028,7 +2065,7 @@ void SplashOutputDev::clip(GfxState *state) { SplashPath *path; - path = convertPath(state, state->getPath()); + path = convertPath(state, state->getPath(), gTrue); splash->clipToPath(path, gFalse); delete path; } @@ -2036,7 +2073,7 @@ void SplashOutputDev::eoClip(GfxState *state) { SplashPath *path; - path = convertPath(state, state->getPath()); + path = convertPath(state, state->getPath(), gTrue); splash->clipToPath(path, gTrue); delete path; } @@ -2044,22 +2081,24 @@ void SplashOutputDev::clipToStrokePath(GfxState *state) { SplashPath *path, *path2; - path = convertPath(state, state->getPath()); - path2 = splash->makeStrokePath(path); + path = convertPath(state, state->getPath(), gFalse); + path2 = splash->makeStrokePath(path, state->getLineWidth()); delete path; splash->clipToPath(path2, gFalse); delete path2; } -SplashPath *SplashOutputDev::convertPath(GfxState * /*state*/, GfxPath *path) { +SplashPath *SplashOutputDev::convertPath(GfxState *state, GfxPath *path, + GBool dropEmptySubpaths) { SplashPath *sPath; GfxSubpath *subpath; - int i, j; + int n, i, j; + n = dropEmptySubpaths ? 1 : 0; sPath = new SplashPath(); for (i = 0; i < path->getNumSubpaths(); ++i) { subpath = path->getSubpath(i); - if (subpath->getNumPoints() > 0) { + if (subpath->getNumPoints() > n) { sPath->moveTo((SplashCoord)subpath->getX(0), (SplashCoord)subpath->getY(0)); j = 1; @@ -2093,6 +2132,18 @@ Unicode *u, int uLen) { SplashPath *path; int render; + GBool doFill, doStroke, doClip, strokeAdjust; + double m[4]; + GBool horiz; + + if (skipHorizText || skipRotatedText) { + state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); + horiz = m[0] > 0 && fabs(m[1]) < 0.001 && + fabs(m[2]) < 0.001 && m[3] < 0; + if ((skipHorizText && horiz) || (skipRotatedText && !horiz)) { + return; + } + } // check for invisible text -- this is used by Acrobat Capture render = state->getRender(); @@ -2110,36 +2161,76 @@ x -= originX; y -= originY; - // fill - if (!(render & 1)) { - if (!haveCSPattern && !state->getFillColorSpace()->isNonMarking()) { - splash->fillChar((SplashCoord)x, (SplashCoord)y, code, font); + doFill = !(render & 1) && !state->getFillColorSpace()->isNonMarking(); + doStroke = ((render & 3) == 1 || (render & 3) == 2) && + !state->getStrokeColorSpace()->isNonMarking(); + doClip = render & 4; + + path = NULL; + if (doStroke || doClip) { + if ((path = font->getGlyphPath(code))) { + path->offset((SplashCoord)x, (SplashCoord)y); } } + // don't use stroke adjustment when stroking text -- the results + // tend to be ugly (because characters with horizontal upper or + // lower edges get misaligned relative to the other characters) + strokeAdjust = gFalse; // make gcc happy + if (doStroke) { + strokeAdjust = splash->getStrokeAdjust(); + splash->setStrokeAdjust(gFalse); + } + + // fill and stroke + if (doFill && doStroke) { + if (path) { + setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); + splash->fill(path, gFalse); + setOverprintMask(state->getStrokeColorSpace(), + state->getStrokeOverprint(), + state->getOverprintMode(), + state->getStrokeColor()); + splash->stroke(path); + } + + // fill + } else if (doFill) { + setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); + splash->fillChar((SplashCoord)x, (SplashCoord)y, code, font); + // stroke - if ((render & 3) == 1 || (render & 3) == 2) { - if (!state->getStrokeColorSpace()->isNonMarking()) { - if ((path = font->getGlyphPath(code))) { - path->offset((SplashCoord)x, (SplashCoord)y); - splash->stroke(path); - delete path; - } + } else if (doStroke) { + if (path) { + setOverprintMask(state->getStrokeColorSpace(), + state->getStrokeOverprint(), + state->getOverprintMode(), + state->getStrokeColor()); + splash->stroke(path); } } // clip - if (haveCSPattern || (render & 4)) { - if ((path = font->getGlyphPath(code))) { - path->offset((SplashCoord)x, (SplashCoord)y); + if (doClip) { + if (path) { if (textClipPath) { textClipPath->append(path); - delete path; } else { textClipPath = path; + path = NULL; } } } + + if (doStroke) { + splash->setStrokeAdjust(strokeAdjust); + } + + if (path) { + delete path; + } } GBool SplashOutputDev::beginType3Char(GfxState *state, double x, double y, @@ -2151,9 +2242,20 @@ T3FontCache *t3Font; T3GlyphStack *t3gs; GBool validBBox; + double m[4]; + GBool horiz; double x1, y1, xMin, yMin, xMax, yMax, xt, yt; int i, j; + if (skipHorizText || skipRotatedText) { + state->getFontTransMat(&m[0], &m[1], &m[2], &m[3]); + horiz = m[0] > 0 && fabs(m[1]) < 0.001 && + fabs(m[2]) < 0.001 && m[3] < 0; + if ((skipHorizText && horiz) || (skipRotatedText && !horiz)) { + return gTrue; + } + } + if (!(gfxFont = state->getFont())) { return gFalse; } @@ -2180,6 +2282,14 @@ // create new entry in the font cache if (nT3Fonts == splashOutT3FontCacheSize) { + t3gs = t3GlyphStack; + while (t3gs != NULL) { + if (t3gs->cache == t3FontCache[nT3Fonts - 1]) { + error(errSyntaxWarning, -1, "t3FontCache reaches limit but font still on stack in SplashOutputDev::beginType3Char"); + return gTrue; + } + t3gs = t3gs->next; + } delete t3FontCache[nT3Fonts - 1]; --nT3Fonts; } @@ -2235,10 +2345,10 @@ validBBox = gTrue; } t3FontCache[0] = new T3FontCache(fontID, ctm[0], ctm[1], ctm[2], ctm[3], - (int)floor(xMin - xt), - (int)floor(yMin - yt), - (int)ceil(xMax) - (int)floor(xMin) + 3, - (int)ceil(yMax) - (int)floor(yMin) + 3, + (int)floor(xMin - xt) - 2, + (int)floor(yMin - yt) - 2, + (int)ceil(xMax) - (int)floor(xMin) + 4, + (int)ceil(yMax) - (int)floor(yMin) + 4, validBBox, colorMode != splashModeMono1); } @@ -2251,7 +2361,7 @@ if (t3Font->cacheTags != NULL) { if ((t3Font->cacheTags[i+j].mru & 0x8000) && t3Font->cacheTags[i+j].code == code) { - drawType3Glyph(t3Font, &t3Font->cacheTags[i+j], + drawType3Glyph(state, t3Font, &t3Font->cacheTags[i+j], t3Font->cacheData + (i+j) * t3Font->glyphSize); return gTrue; } @@ -2267,6 +2377,8 @@ t3GlyphStack->cacheTag = NULL; t3GlyphStack->cacheData = NULL; + haveT3Dx = gFalse; + return gFalse; } @@ -2275,6 +2387,7 @@ double *ctm; if (t3GlyphStack->cacheTag) { + --nestCount; memcpy(t3GlyphStack->cacheData, bitmap->getDataPtr(), t3GlyphStack->cache->glyphSize); delete bitmap; @@ -2285,7 +2398,7 @@ state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3], t3GlyphStack->origCTM4, t3GlyphStack->origCTM5); updateCTM(state, 0, 0, 0, 0, 0, 0); - drawType3Glyph(t3GlyphStack->cache, + drawType3Glyph(state, t3GlyphStack->cache, t3GlyphStack->cacheTag, t3GlyphStack->cacheData); } t3gs = t3GlyphStack; @@ -2294,6 +2407,7 @@ } void SplashOutputDev::type3D0(GfxState *state, double wx, double wy) { + haveT3Dx = gTrue; } void SplashOutputDev::type3D1(GfxState *state, double wx, double wy, @@ -2304,18 +2418,24 @@ double xt, yt, xMin, xMax, yMin, yMax, x1, y1; int i, j; + // ignore multiple d0/d1 operators + if (haveT3Dx) { + return; + } + haveT3Dx = gTrue; + if (unlikely(t3GlyphStack == NULL)) { - error(-1, "t3GlyphStack was null in SplashOutputDev::type3D1"); + error(errSyntaxWarning, -1, "t3GlyphStack was null in SplashOutputDev::type3D1"); return; } if (unlikely(t3GlyphStack->origBitmap != NULL)) { - error(-1, "t3GlyphStack origBitmap was not null in SplashOutputDev::type3D1"); + error(errSyntaxWarning, -1, "t3GlyphStack origBitmap was not null in SplashOutputDev::type3D1"); return; } if (unlikely(t3GlyphStack->origSplash != NULL)) { - error(-1, "t3GlyphStack origSplash was not null in SplashOutputDev::type3D1"); + error(errSyntaxWarning, -1, "t3GlyphStack origSplash was not null in SplashOutputDev::type3D1"); return; } @@ -2364,7 +2484,7 @@ xMax - xt > t3Font->glyphX + t3Font->glyphW || yMax - yt > t3Font->glyphY + t3Font->glyphH) { if (t3Font->validBBox) { - error(-1, "Bad bounding box in Type 3 glyph"); + error(errSyntaxWarning, -1, "Bad bounding box in Type 3 glyph"); } return; } @@ -2400,7 +2520,7 @@ t3GlyphStack->origSplash->getScreen()); color[0] = 0; splash->clear(color); - color[0] = 1; + color[0] = 0xff; } else { bitmap = new SplashBitmap(t3Font->glyphW, t3Font->glyphH, 1, splashModeMono8, gFalse); @@ -2410,18 +2530,22 @@ splash->clear(color); color[0] = 0xff; } + splash->setMinLineWidth(globalParams->getMinLineWidth()); splash->setFillPattern(new SplashSolidColor(color)); splash->setStrokePattern(new SplashSolidColor(color)); //~ this should copy other state from t3GlyphStack->origSplash? state->setCTM(ctm[0], ctm[1], ctm[2], ctm[3], -t3Font->glyphX, -t3Font->glyphY); updateCTM(state, 0, 0, 0, 0, 0, 0); + ++nestCount; } -void SplashOutputDev::drawType3Glyph(T3FontCache *t3Font, +void SplashOutputDev::drawType3Glyph(GfxState *state, T3FontCache *t3Font, T3FontCacheTag * /*tag*/, Guchar *data) { SplashGlyphBitmap glyph; + setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); glyph.x = -t3Font->glyphX; glyph.y = -t3Font->glyphY; glyph.w = t3Font->glyphW; @@ -2433,25 +2557,9 @@ } void SplashOutputDev::beginTextObject(GfxState *state) { - if (!(state->getRender() & 4) && state->getFillColorSpace()->getMode() == csPattern) { - haveCSPattern = gTrue; - saveState(state); - } } void SplashOutputDev::endTextObject(GfxState *state) { - if (haveCSPattern) { - haveCSPattern = gFalse; - if (state->getFillColorSpace()->getMode() != csPattern) { - if (textClipPath) { - splash->fill(textClipPath, gTrue); - delete textClipPath; - textClipPath = NULL; - } - restoreState(state); - updateFillColor(state); - } - } if (textClipPath) { splash->clipToPath(textClipPath, gFalse); delete textClipPath; @@ -2474,32 +2582,16 @@ if (imgMaskData->y == imgMaskData->height) { return gFalse; } - for (x = 0, p = imgMaskData->imgStr->getLine(), q = line; - x < imgMaskData->width; - ++x) { + if (!(p = imgMaskData->imgStr->getLine())) { + return gFalse; + } + for (x = 0, q = line; x < imgMaskData->width; ++x) { *q++ = *p++ ^ imgMaskData->invert; } ++imgMaskData->y; return gTrue; } -void SplashOutputDev::endMaskClip(GfxState * state) { - double bbox[4] = {0,0,1,1}; // dummy - /* transfer mask to alpha channel! */ - // memcpy(maskBitmap->getAlphaPtr(), maskBitmap->getDataPtr(), bitmap->getRowSize() * bitmap->getHeight()); - // memset(maskBitmap->getDataPtr(), 0, bitmap->getRowSize() * bitmap->getHeight()); - int c; - Guchar *dest = bitmap->getAlphaPtr(); - Guchar *src = maskBitmap->getDataPtr(); - for (c= 0; c < maskBitmap->getRowSize() * maskBitmap->getHeight(); c++) { - dest[c] = src[c]; - } - delete maskBitmap; - maskBitmap = NULL; - endTransparencyGroup(state); - paintTransparencyGroup(state, bbox); -} - void SplashOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) { @@ -2510,6 +2602,8 @@ if (state->getFillColorSpace()->isNonMarking()) { return; } + setOverprintMask(state->getFillColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); ctm = state->getCTM(); for (int i = 0; i < 6; ++i) { @@ -2529,42 +2623,8 @@ imgMaskData.height = height; imgMaskData.y = 0; - if (state->getFillColorSpace()->getMode() == csPattern) { - Splash *maskSplash; - SplashColor maskColor; - - /* from beginTransparencyGroup: */ - // push a new stack entry - SplashTransparencyGroup *transpGroup = new SplashTransparencyGroup(); - transpGroup->tx = 0; - transpGroup->ty = 0; - transpGroup->blendingColorSpace = NULL; - transpGroup->isolated = gFalse; - transpGroup->next = transpGroupStack; - transpGroupStack = transpGroup; - // save state - transpGroup->origBitmap = bitmap; - transpGroup->origSplash = splash; - //~ this ignores the blendingColorSpace arg - // create the temporary bitmap - bitmap = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), bitmapRowPad, colorMode, gTrue, - bitmapTopDown); - splash = new Splash(bitmap, vectorAntialias, - transpGroup->origSplash->getScreen()); - splash->blitTransparent(transpGroup->origBitmap, 0, 0, 0, 0, bitmap->getWidth(), bitmap->getHeight()); - splash->setInNonIsolatedGroup(transpGroup->origBitmap, 0, 0); - transpGroup->tBitmap = bitmap; - - maskBitmap = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), 1, splashModeMono8, gFalse); - maskSplash = new Splash(maskBitmap, vectorAntialias); - maskColor[0] = 0; - maskSplash->clear(maskColor); - maskColor[0] = 0xff; - maskSplash->setFillPattern(new SplashSolidColor(maskColor)); - maskSplash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != NULL); - delete maskSplash; - } else { - splash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != NULL); + splash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != NULL); + if (inlineImg) { if (inlineImg) { while (imgMaskData.y < height) { imgMaskData.imgStr->getLine(); @@ -2577,6 +2637,76 @@ str->close(); } +void SplashOutputDev::setSoftMaskFromImageMask(GfxState *state, + Object *ref, Stream *str, + int width, int height, + GBool invert, + GBool inlineImg, double *baseMatrix) { + double *ctm; + SplashCoord mat[6]; + SplashOutImageMaskData imgMaskData; + Splash *maskSplash; + SplashColor maskColor; + double bbox[4] = {0, 0, 1, 1}; // default; + + if (state->getFillColorSpace()->isNonMarking()) { + return; + } + + ctm = state->getCTM(); + for (int i = 0; i < 6; ++i) { + if (!isfinite(ctm[i])) return; + } + + beginTransparencyGroup(state, bbox, NULL, gFalse, gFalse, gFalse); + baseMatrix[4] -= transpGroupStack->tx; + baseMatrix[5] -= transpGroupStack->ty; + + ctm = state->getCTM(); + mat[0] = ctm[0]; + mat[1] = ctm[1]; + mat[2] = -ctm[2]; + mat[3] = -ctm[3]; + mat[4] = ctm[2] + ctm[4]; + mat[5] = ctm[3] + ctm[5]; + imgMaskData.imgStr = new ImageStream(str, width, 1, 1); + imgMaskData.imgStr->reset(); + imgMaskData.invert = invert ? 0 : 1; + imgMaskData.width = width; + imgMaskData.height = height; + imgMaskData.y = 0; + + maskBitmap = new SplashBitmap(bitmap->getWidth(), bitmap->getHeight(), 1, splashModeMono8, gFalse); + maskSplash = new Splash(maskBitmap, vectorAntialias); + maskColor[0] = 0; + maskSplash->clear(maskColor); + maskColor[0] = 0xff; + maskSplash->setFillPattern(new SplashSolidColor(maskColor)); + maskSplash->fillImageMask(&imageMaskSrc, &imgMaskData, width, height, mat, t3GlyphStack != NULL); + delete maskSplash; + delete imgMaskData.imgStr; + str->close(); +} + +void SplashOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { + double bbox[4] = {0,0,1,1}; // dummy + + /* transfer mask to alpha channel! */ + // memcpy(maskBitmap->getAlphaPtr(), maskBitmap->getDataPtr(), bitmap->getRowSize() * bitmap->getHeight()); + // memset(maskBitmap->getDataPtr(), 0, bitmap->getRowSize() * bitmap->getHeight()); + Guchar *dest = bitmap->getAlphaPtr(); + Guchar *src = maskBitmap->getDataPtr(); + for (int c= 0; c < maskBitmap->getRowSize() * maskBitmap->getHeight(); c++) { + dest[c] = src[c]; + } + delete maskBitmap; + maskBitmap = NULL; + endTransparencyGroup(state); + baseMatrix[4] += transpGroupStack->tx; + baseMatrix[5] += transpGroupStack->ty; + paintTransparencyGroup(state, bbox); +} + struct SplashOutImageData { ImageStream *imgStr; GfxImageColorMap *colorMap; @@ -2591,6 +2721,7 @@ SplashOutImageData *imgData = (SplashOutImageData *)data; Guchar *p; SplashColorPtr q, col; + GfxRGB rgb; GfxGray gray; #if SPLASH_CMYK GfxCMYK cmyk; @@ -2600,34 +2731,31 @@ if (imgData->y == imgData->height) { return gFalse; } + if (!(p = imgData->imgStr->getLine())) { + return gFalse; + } nComps = imgData->colorMap->getNumPixelComps(); if (imgData->lookup) { switch (imgData->colorMode) { - case splashModeMono1: - case splashModeMono8: - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine; - x < imgData->width; - ++x, ++p) { + case splashModeMono1: + case splashModeMono8: + for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { *q++ = imgData->lookup[*p]; } - break; - case splashModeRGB8: - case splashModeBGR8: - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine; - x < imgData->width; - ++x, ++p) { + break; + case splashModeRGB8: + case splashModeBGR8: + for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { col = &imgData->lookup[3 * *p]; *q++ = col[0]; *q++ = col[1]; *q++ = col[2]; } - break; + break; case splashModeXBGR8: - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine; - x < imgData->width; - ++x, ++p) { + for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { col = &imgData->lookup[4 * *p]; *q++ = col[0]; *q++ = col[1]; @@ -2637,9 +2765,7 @@ break; #if SPLASH_CMYK case splashModeCMYK8: - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine; - x < imgData->width; - ++x, ++p) { + for (x = 0, q = colorLine; x < imgData->width; ++x, ++p) { col = &imgData->lookup[4 * *p]; *q++ = col[0]; *q++ = col[1]; @@ -2648,36 +2774,37 @@ } break; #endif - } + } } else { switch (imgData->colorMode) { case splashModeMono1: case splashModeMono8: - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine; - x < imgData->width; - ++x, p += nComps) { + for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { imgData->colorMap->getGray(p, &gray); *q++ = colToByte(gray); } break; case splashModeRGB8: case splashModeBGR8: - p = imgData->imgStr->getLine(); - q = colorLine; - - imgData->colorMap->getRGBLine(p, colorLine, imgData->width); + for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { + imgData->colorMap->getRGB(p, &rgb); + *q++ = colToByte(rgb.r); + *q++ = colToByte(rgb.g); + *q++ = colToByte(rgb.b); + } break; case splashModeXBGR8: - p = imgData->imgStr->getLine(); - q = colorLine; - - imgData->colorMap->getRGBXLine(p, colorLine, imgData->width); + for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { + imgData->colorMap->getRGB(p, &rgb); + *q++ = colToByte(rgb.r); + *q++ = colToByte(rgb.g); + *q++ = colToByte(rgb.b); + *q++ = 255; + } break; #if SPLASH_CMYK case splashModeCMYK8: - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine; - x < imgData->width; - ++x, p += nComps) { + for (x = 0, q = colorLine; x < imgData->width; ++x, p += nComps) { imgData->colorMap->getCMYK(p, &cmyk); *q++ = colToByte(cmyk.c); *q++ = colToByte(cmyk.m); @@ -2709,10 +2836,13 @@ if (imgData->y == imgData->height) { return gFalse; } + if (!(p = imgData->imgStr->getLine())) { + return gFalse; + } nComps = imgData->colorMap->getNumPixelComps(); - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine, aq = alphaLine; + for (x = 0, q = colorLine, aq = alphaLine; x < imgData->width; ++x, p += nComps) { alpha = 0; @@ -2728,7 +2858,6 @@ case splashModeMono1: case splashModeMono8: *q++ = imgData->lookup[*p]; - *aq++ = alpha; break; case splashModeRGB8: case splashModeBGR8: @@ -2736,7 +2865,6 @@ *q++ = col[0]; *q++ = col[1]; *q++ = col[2]; - *aq++ = alpha; break; case splashModeXBGR8: col = &imgData->lookup[4 * *p]; @@ -2744,7 +2872,6 @@ *q++ = col[1]; *q++ = col[2]; *q++ = 255; - *aq++ = alpha; break; #if SPLASH_CMYK case splashModeCMYK8: @@ -2753,17 +2880,16 @@ *q++ = col[1]; *q++ = col[2]; *q++ = col[3]; - *aq++ = alpha; break; #endif } + *aq++ = alpha; } else { switch (imgData->colorMode) { case splashModeMono1: case splashModeMono8: imgData->colorMap->getGray(p, &gray); *q++ = colToByte(gray); - *aq++ = alpha; break; case splashModeXBGR8: case splashModeRGB8: @@ -2773,7 +2899,6 @@ *q++ = colToByte(rgb.g); *q++ = colToByte(rgb.b); if (imgData->colorMode == splashModeXBGR8) *q++ = 255; - *aq++ = alpha; break; #if SPLASH_CMYK case splashModeCMYK8: @@ -2782,10 +2907,10 @@ *q++ = colToByte(cmyk.m); *q++ = colToByte(cmyk.y); *q++ = colToByte(cmyk.k); - *aq++ = alpha; break; #endif } + *aq++ = alpha; } } @@ -2823,13 +2948,13 @@ for (int m = 0; m < imgData->repeatX; m++) { for (int x = 0; x < imgData->bitmap->getWidth(); x++) { imgData->bitmap->getPixel(x, imgData->y, q); - q += splashColorModeNComps[cMode]; + q += splashColorModeNComps[cMode]; } } } else { const int n = imgData->bitmap->getRowSize(); SplashColorPtr p; - for (int m = 0; m < imgData->repeatX; m++) { + for (int m = 0; m < imgData->repeatX; m++) { p = imgData->bitmap->getDataPtr() + imgData->y * imgData->bitmap->getRowSize(); for (int x = 0; x < n; ++x) { *q++ = *p++; @@ -2856,7 +2981,7 @@ for (int m = 0; m < imgData->repeatX; m++) { for (int x = 0; x < imgData->bitmap->getWidth(); x++) { imgData->bitmap->getPixel(x, imgData->y, col); - imgData->pattern->getColor(x, imgData->y, pat); + imgData->pattern->getColor(x, imgData->y, pat); for (int i = 0; i < splashColorModeNComps[imgData->colorMode]; ++i) { #if SPLASH_CMYK if (imgData->colorMode == splashModeCMYK8) @@ -2865,11 +2990,11 @@ #endif dest[i] = 255 - div255((255 - pat[i]) * (255 - col[0])); } - dest += splashColorModeNComps[imgData->colorMode]; + dest += splashColorModeNComps[imgData->colorMode]; } } if (alphaLine != NULL) { - const int y = (imgData->y == imgData->bitmap->getHeight() - 1 && imgData->y > 50) ? imgData->y - 1 : imgData->y; + const int y = (imgData->y == imgData->bitmap->getHeight() - 1 && imgData->y > 50) ? imgData->y - 1 : imgData->y; SplashColorPtr aq = alphaLine; SplashColorPtr p; const int n = imgData->bitmap->getWidth(); @@ -2894,15 +3019,13 @@ SplashCoord mat[6]; SplashOutImageData imgData; SplashColorMode srcMode; - SplashColor defaultColor; - GfxColor srcColor; SplashImageSource src; GfxGray gray; GfxRGB rgb; #if SPLASH_CMYK GfxCMYK cmyk; -#endif GBool grayIndexed = gFalse; +#endif Guchar pix; int n, i; @@ -2980,30 +3103,27 @@ imgData.lookup[4*i+2] = colToByte(cmyk.y); imgData.lookup[4*i+3] = colToByte(cmyk.k); } -#ifndef USE_CMS - if (colorMap->getColorSpace()->getMode() == csIndexed) { - if (((GfxIndexedColorSpace *) colorMap->getColorSpace())->getBase()->getMode() == csICCBased) - grayIndexed = gFalse; - } -#endif break; #endif - break; } } +#if SPLASH_CMYK + setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), NULL, grayIndexed); +#else + setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), NULL); +#endif + if (colorMode == splashModeMono1) { srcMode = splashModeMono8; } else { srcMode = colorMode; } src = maskColors ? &alphaImageSrc : &imageSrc; - colorMap->getColorSpace()->getDefaultColor(&srcColor); - convertGfxColor(defaultColor, srcMode, colorMap->getColorSpace(), &srcColor); - SplashPattern *pattern = createOverprintPattern(colorMap->getColorSpace(), defaultColor, !grayIndexed); splash->drawImage(src, &imgData, srcMode, maskColors ? gTrue : gFalse, - width, height, mat, pattern); - delete pattern; + width, height, mat); if (inlineImg) { while (imgData.y < height) { imgData.imgStr->getLine(); @@ -3029,7 +3149,6 @@ Guchar *alphaLine) { SplashOutMaskedImageData *imgData = (SplashOutMaskedImageData *)data; Guchar *p, *aq; - SplashColor maskColor; SplashColorPtr q, col; GfxRGB rgb; GfxGray gray; @@ -3037,25 +3156,35 @@ GfxCMYK cmyk; #endif Guchar alpha; + Guchar *maskPtr; + int maskBit; int nComps, x; if (imgData->y == imgData->height) { return gFalse; } + if (!(p = imgData->imgStr->getLine())) { + return gFalse; + } nComps = imgData->colorMap->getNumPixelComps(); - for (x = 0, p = imgData->imgStr->getLine(), q = colorLine, aq = alphaLine; + maskPtr = imgData->mask->getDataPtr() + + imgData->y * imgData->mask->getRowSize(); + maskBit = 0x80; + for (x = 0, q = colorLine, aq = alphaLine; x < imgData->width; ++x, p += nComps) { - imgData->mask->getPixel(x, imgData->y, maskColor); - alpha = maskColor[0] ? 0xff : 0x00; + alpha = (*maskPtr & maskBit) ? 0xff : 0x00; + if (!(maskBit >>= 1)) { + ++maskPtr; + maskBit = 0x80; + } if (imgData->lookup) { switch (imgData->colorMode) { case splashModeMono1: case splashModeMono8: *q++ = imgData->lookup[*p]; - *aq++ = alpha; break; case splashModeRGB8: case splashModeBGR8: @@ -3063,7 +3192,6 @@ *q++ = col[0]; *q++ = col[1]; *q++ = col[2]; - *aq++ = alpha; break; case splashModeXBGR8: col = &imgData->lookup[4 * *p]; @@ -3071,7 +3199,6 @@ *q++ = col[1]; *q++ = col[2]; *q++ = 255; - *aq++ = alpha; break; #if SPLASH_CMYK case splashModeCMYK8: @@ -3080,17 +3207,16 @@ *q++ = col[1]; *q++ = col[2]; *q++ = col[3]; - *aq++ = alpha; break; #endif } + *aq++ = alpha; } else { switch (imgData->colorMode) { case splashModeMono1: case splashModeMono8: imgData->colorMap->getGray(p, &gray); *q++ = colToByte(gray); - *aq++ = alpha; break; case splashModeXBGR8: case splashModeRGB8: @@ -3100,7 +3226,6 @@ *q++ = colToByte(rgb.g); *q++ = colToByte(rgb.b); if (imgData->colorMode == splashModeXBGR8) *q++ = 255; - *aq++ = alpha; break; #if SPLASH_CMYK case splashModeCMYK8: @@ -3109,10 +3234,10 @@ *q++ = colToByte(cmyk.m); *q++ = colToByte(cmyk.y); *q++ = colToByte(cmyk.k); - *aq++ = alpha; break; #endif } + *aq++ = alpha; } } @@ -3145,12 +3270,15 @@ Guchar pix; int n, i; + setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), NULL); + // If the mask is higher resolution than the image, use // drawSoftMaskedImage() instead. if (maskWidth > width || maskHeight > height) { decodeLow.initInt(maskInvert ? 0 : 1); decodeHigh.initInt(maskInvert ? 1 : 0); - maskDecode.initArray(xref); + maskDecode.initArray(doc->getXRef()); maskDecode.arrayAdd(&decodeLow); maskDecode.arrayAdd(&decodeHigh); maskColorMap = new GfxImageColorMap(1, &maskDecode, @@ -3161,9 +3289,6 @@ delete maskColorMap; } else { - SplashColor defaultColor; - GfxColor srcColor; - //----- scale the mask image to the same size as the source image mat[0] = (SplashCoord)width; @@ -3275,12 +3400,8 @@ } else { srcMode = colorMode; } - colorMap->getColorSpace()->getDefaultColor(&srcColor); - convertGfxColor(defaultColor, srcMode, colorMap->getColorSpace(), &srcColor); - SplashPattern *pattern = createOverprintPattern(colorMap->getColorSpace(), defaultColor, gTrue); splash->drawImage(&maskedImageSrc, &imgData, srcMode, gTrue, - width, height, mat, pattern); - delete pattern; + width, height, mat); delete maskBitmap; gfree(imgData.lookup); delete imgData.imgStr; @@ -3304,8 +3425,6 @@ SplashBitmap *maskBitmap; Splash *maskSplash; SplashColor maskColor; - SplashColor defaultColor; - GfxColor srcColor; GfxGray gray; GfxRGB rgb; #if SPLASH_CMYK @@ -3314,6 +3433,9 @@ Guchar pix; int n, i; + setOverprintMask(colorMap->getColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), NULL); + ctm = state->getCTM(); for (i = 0; i < 6; ++i) { if (!isfinite(ctm[i])) return; @@ -3428,26 +3550,32 @@ } else { srcMode = colorMode; } - - colorMap->getColorSpace()->getDefaultColor(&srcColor); - convertGfxColor(defaultColor, srcMode, colorMap->getColorSpace(), &srcColor); - SplashPattern *pattern = createOverprintPattern(colorMap->getColorSpace(), defaultColor, gTrue); - splash->drawImage(&imageSrc, &imgData, srcMode, gFalse, width, height, mat, pattern); - delete pattern; + splash->drawImage(&imageSrc, &imgData, srcMode, gFalse, width, height, mat); splash->setSoftMask(NULL); gfree(imgData.lookup); delete imgData.imgStr; str->close(); } +GBool SplashOutputDev::checkTransparencyGroup(GfxState *state, GBool knockout) { + if (state->getFillOpacity() != 1 || + state->getStrokeOpacity() != 1 || + state->getAlphaIsShape() || + state->getBlendMode() != gfxBlendNormal || + splash->getSoftMask() != NULL || + knockout) + return gTrue; + return transpGroupStack != NULL && transpGroupStack->shape != NULL; +} + void SplashOutputDev::beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace *blendingColorSpace, - GBool isolated, GBool /*knockout*/, - GBool /*forSoftMask*/) { + GBool isolated, GBool knockout, + GBool forSoftMask) { SplashTransparencyGroup *transpGroup; SplashColor color; double xMin, yMin, xMax, yMax, x, y; - int tx, ty, w, h; + int tx, ty, w, h, i; // transform the bbox state->transform(bbox[0], bbox[1], &x, &y); @@ -3519,6 +3647,9 @@ transpGroup->ty = ty; transpGroup->blendingColorSpace = blendingColorSpace; transpGroup->isolated = isolated; + transpGroup->shape = (knockout) ? SplashBitmap::copy(bitmap) : NULL; + transpGroup->knockout = gFalse; + transpGroup->knockoutOpacity = 1.0; transpGroup->next = transpGroupStack; transpGroupStack = transpGroup; @@ -3526,54 +3657,74 @@ transpGroup->origBitmap = bitmap; transpGroup->origSplash = splash; - //~ this ignores the blendingColorSpace arg + //~ this handles the blendingColorSpace arg for soft masks, but + //~ not yet for transparency groups + + // switch to the blending color space + if (forSoftMask && isolated && blendingColorSpace) { + if (blendingColorSpace->getMode() == csDeviceGray || + blendingColorSpace->getMode() == csCalGray || + (blendingColorSpace->getMode() == csICCBased && + blendingColorSpace->getNComps() == 1)) { + colorMode = splashModeMono8; + } else if (blendingColorSpace->getMode() == csDeviceRGB || + blendingColorSpace->getMode() == csCalRGB || + (blendingColorSpace->getMode() == csICCBased && + blendingColorSpace->getNComps() == 3)) { + //~ does this need to use BGR8? + colorMode = splashModeRGB8; +#if SPLASH_CMYK + } else if (blendingColorSpace->getMode() == csDeviceCMYK || + (blendingColorSpace->getMode() == csICCBased && + blendingColorSpace->getNComps() == 4)) { + colorMode = splashModeCMYK8; +#endif + } + } // create the temporary bitmap bitmap = new SplashBitmap(w, h, bitmapRowPad, colorMode, gTrue, bitmapTopDown); splash = new Splash(bitmap, vectorAntialias, transpGroup->origSplash->getScreen()); + splash->setMinLineWidth(globalParams->getMinLineWidth()); + //~ Acrobat apparently copies at least the fill and stroke colors, and + //~ maybe other state(?) -- but not the clipping path (and not sure + //~ what else) + //~ [this is likely the same situation as in type3D1()] + splash->setFillPattern(transpGroup->origSplash->getFillPattern()->copy()); + splash->setStrokePattern( + transpGroup->origSplash->getStrokePattern()->copy()); if (isolated) { - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - color[0] = 0; - break; - case splashModeXBGR8: - color[3] = 255; - case splashModeRGB8: - case splashModeBGR8: - color[0] = color[1] = color[2] = 0; - break; -#if SPLASH_CMYK - case splashModeCMYK8: - color[0] = color[1] = color[2] = color[3] = 0; - break; -#endif - default: - // make gcc happy - break; + for (i = 0; i < splashMaxColorComps; ++i) { + color[i] = 0; } + if (colorMode == splashModeXBGR8) color[3] = 255; splash->clear(color, 0); } else { + SplashBitmap *shape = (knockout) ? transpGroup->shape : + (transpGroup->next != NULL && transpGroup->next->shape != NULL) ? transpGroup->next->shape : transpGroup->origBitmap; splash->blitTransparent(transpGroup->origBitmap, tx, ty, 0, 0, w, h); - splash->setInNonIsolatedGroup(transpGroup->origBitmap, tx, ty); + splash->setInNonIsolatedGroup(shape, tx, ty); } transpGroup->tBitmap = bitmap; state->shiftCTM(-tx, -ty); updateCTM(state, 0, 0, 0, 0, 0, 0); + ++nestCount; } void SplashOutputDev::endTransparencyGroup(GfxState *state) { // restore state + --nestCount; delete splash; bitmap = transpGroupStack->origBitmap; + colorMode = bitmap->getMode(); splash = transpGroupStack->origSplash; state->shiftCTM(transpGroupStack->tx, transpGroupStack->ty); updateCTM(state, 0, 0, 0, 0, 0, 0); } -void SplashOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) { +void SplashOutputDev::paintTransparencyGroup(GfxState *state, double *bbox) { SplashBitmap *tBitmap; SplashTransparencyGroup *transpGroup; GBool isolated; @@ -3586,19 +3737,31 @@ // paint the transparency group onto the parent bitmap // - the clip path was set in the parent's state) - splash->composite(tBitmap, 0, 0, tx, ty, - tBitmap->getWidth(), tBitmap->getHeight(), - gFalse, !isolated); + if (tx < bitmap->getWidth() && ty < bitmap->getHeight()) { + SplashCoord knockoutOpacity = (transpGroupStack->next != NULL) ? transpGroupStack->next->knockoutOpacity + : transpGroupStack->knockoutOpacity; + splash->setOverprintMask(0xffffffff, gFalse); + splash->composite(tBitmap, 0, 0, tx, ty, + tBitmap->getWidth(), tBitmap->getHeight(), + gFalse, !isolated, transpGroupStack->next != NULL && transpGroupStack->next->knockout, knockoutOpacity); + if (transpGroupStack->next != NULL && transpGroupStack->next->shape != NULL) { + transpGroupStack->next->knockout = gTrue; + } + } // pop the stack transpGroup = transpGroupStack; transpGroupStack = transpGroup->next; + if (transpGroupStack != NULL && transpGroup->knockoutOpacity < transpGroupStack->knockoutOpacity) { + transpGroupStack->knockoutOpacity = transpGroup->knockoutOpacity; + } + delete transpGroup->shape; delete transpGroup; delete tBitmap; } -void SplashOutputDev::setSoftMask(GfxState * /*state*/, double * /*bbox*/, +void SplashOutputDev::setSoftMask(GfxState *state, double *bbox, GBool alpha, Function *transferFunc, GfxColor *backdropColor) { SplashBitmap *softMask, *tBitmap; @@ -3619,13 +3782,13 @@ tBitmap = transpGroupStack->tBitmap; // composite with backdrop color - if (!alpha && colorMode != splashModeMono1) { + if (!alpha && tBitmap->getMode() != splashModeMono1) { //~ need to correctly handle the case where no blending color //~ space is given if (transpGroupStack->blendingColorSpace) { tSplash = new Splash(tBitmap, vectorAntialias, transpGroupStack->origSplash->getScreen()); - switch (colorMode) { + switch (tBitmap->getMode()) { case splashModeMono1: // transparency is not supported in mono1 mode break; @@ -3678,30 +3841,30 @@ if (alpha) { p[x] = tBitmap->getAlpha(x, y); } else { - tBitmap->getPixel(x, y, color); - // convert to luminosity - switch (colorMode) { - case splashModeMono1: - case splashModeMono8: - lum = color[0] / 255.0; - break; - case splashModeXBGR8: - case splashModeRGB8: - case splashModeBGR8: - lum = (0.3 / 255.0) * color[0] + - (0.59 / 255.0) * color[1] + - (0.11 / 255.0) * color[2]; - break; -#if SPLASH_CMYK - case splashModeCMYK8: - lum = (1 - color[3] / 255.0) - - (0.3 / 255.0) * color[0] - - (0.59 / 255.0) * color[1] - - (0.11 / 255.0) * color[2]; - if (lum < 0) { - lum = 0; - } - break; + tBitmap->getPixel(x, y, color); + // convert to luminosity + switch (tBitmap->getMode()) { + case splashModeMono1: + case splashModeMono8: + lum = color[0] / 255.0; + break; + case splashModeXBGR8: + case splashModeRGB8: + case splashModeBGR8: + lum = (0.3 / 255.0) * color[0] + + (0.59 / 255.0) * color[1] + + (0.11 / 255.0) * color[2]; + break; +#if SPLASH_CMYK + case splashModeCMYK8: + lum = (1 - color[3] / 255.0) + - (0.3 / 255.0) * color[0] + - (0.59 / 255.0) * color[1] + - (0.11 / 255.0) * color[2]; + if (lum < 0) { + lum = 0; + } + break; #endif } if (transferFunc) { @@ -3712,7 +3875,7 @@ p[x] = (int)(lum2 * 255.0 + 0.5); } } - p += softMask->getRowSize(); + p += softMask->getRowSize(); } splash->setSoftMask(softMask); @@ -3724,7 +3887,7 @@ delete tBitmap; } -void SplashOutputDev::clearSoftMask(GfxState * /*state*/) { +void SplashOutputDev::clearSoftMask(GfxState *state) { splash->setSoftMask(NULL); } @@ -3775,7 +3938,7 @@ enableSlightHinting = enableSlightHintingA; } -GBool SplashOutputDev::tilingPatternFill(GfxState *state, Catalog *catalog, Object *str, +GBool SplashOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *catalog, Object *str, double *ptm, int paintType, int /*tilingType*/, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, @@ -3898,10 +4061,11 @@ #endif } splash = new Splash(bitmap, gTrue); + splash->setMinLineWidth(globalParams->getMinLineWidth()); box.x1 = bbox[0]; box.y1 = bbox[1]; box.x2 = bbox[2]; box.y2 = bbox[3]; - gfx = new Gfx(xref, this, resDict, catalog, &box, NULL); + gfx = new Gfx(doc, this, resDict, &box, NULL); // set pattern transformation matrix gfx->getState()->setCTM(m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]); updateCTM(gfx->getState(), m1.m[0], m1.m[1], m1.m[2], m1.m[3], m1.m[4], m1.m[5]); @@ -3935,7 +4099,7 @@ matc[1] = ctm[1]; matc[2] = ctm[2]; matc[3] = ctm[3]; - splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc); + splash->drawImage(&tilingBitmapSrc, &imgData, colorMode, gTrue, result_width, result_height, matc, gTrue); delete tBitmap; delete gfx; return gTrue; @@ -4019,8 +4183,10 @@ state->lineTo(xMax, yMax); state->lineTo(xMin, yMax); state->closePath(); - path = convertPath(state, state->getPath()); + path = convertPath(state, state->getPath(), gTrue); + setOverprintMask(pattern->getShading()->getColorSpace(), state->getFillOverprint(), + state->getOverprintMode(), state->getFillColor()); retVal = (splash->shadedFill(path, pattern->getShading()->getHasBBox(), pattern) == splashOk); state->clearPath(); setVectorAntialias(vaa); diff -Nru poppler-0.18.4/poppler/SplashOutputDev.h poppler-0.20.5/poppler/SplashOutputDev.h --- poppler-0.18.4/poppler/SplashOutputDev.h 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/SplashOutputDev.h 2012-08-15 13:31:38.000000000 +0000 @@ -14,12 +14,13 @@ // under GPL version 2 or later // // Copyright (C) 2005 Takashi Iwai -// Copyright (C) 2009-2011 Thomas Freitag +// Copyright (C) 2009-2012 Thomas Freitag // Copyright (C) 2009 Carlos Garcia Campos // Copyright (C) 2010 Christian Feuersnger // Copyright (C) 2011 Andreas Hartmetz // Copyright (C) 2011 Andrea Canciani // Copyright (C) 2011 Adrian Johnson +// Copyright (C) 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -40,6 +41,7 @@ #include "OutputDev.h" #include "GfxState.h" +class PDFDoc; class Gfx8BitFont; class SplashBitmap; class Splash; @@ -52,33 +54,6 @@ struct SplashTransparencyGroup; //------------------------------------------------------------------------ -// SplashOverprintColor -//------------------------------------------------------------------------ - -class SplashOverprintColor: public SplashPattern { -public: - SplashOverprintColor(GfxColorSpace *colorSpace, SplashColorPtr colorA, Guchar tolerance); - - virtual SplashPattern *copy() { return new SplashOverprintColor(colorSpace, color, tolerance); } - - virtual ~SplashOverprintColor(); - - virtual GBool getColor(int x, int y, SplashColorPtr c); - - virtual GBool testPosition(int x, int y) { return gFalse; } - - virtual GBool isStatic() { return gTrue; } - - virtual void overprint(GBool op, Guchar alphaSrc, SplashColorPtr colorSrc, - Guchar alphaDest, SplashColorPtr colorDest, SplashColorPtr colorResult); - -private: - GfxColorSpace *colorSpace; - SplashColor color; - Guchar tolerance; -}; - -//------------------------------------------------------------------------ // Splash dynamic pattern //------------------------------------------------------------------------ @@ -118,13 +93,9 @@ virtual GBool getParameter(double xs, double ys, double *t); - virtual void overprint(GBool op, Guchar alphaSrc, SplashColorPtr colorSrc, - Guchar alphaDest, SplashColorPtr colorDest, SplashColorPtr colorResult); - private: double x0, y0, x1, y1; double dx, dy, mul; - SplashOverprintColor *opPattern; }; // see GfxState.h, GfxGouraudTriangleShading @@ -152,13 +123,10 @@ virtual void getParameterizedColor(double t, SplashColorMode mode, SplashColorPtr c); - virtual void overprint(GBool op, Guchar alphaSrc, SplashColorPtr colorSrc, - Guchar alphaDest, SplashColorPtr colorDest, SplashColorPtr colorResult); private: GfxGouraudTriangleShading *shading; GfxState *state; GBool bDirectColorTranslation; - SplashOverprintColor *opPattern; SplashColorMode mode; }; @@ -174,13 +142,9 @@ virtual GBool getParameter(double xs, double ys, double *t); - virtual void overprint(GBool op, Guchar alphaSrc, SplashColorPtr colorSrc, - Guchar alphaDest, SplashColorPtr colorDest, SplashColorPtr colorResult); - private: double x0, y0, r0, dx, dy, dr; double a, inva; - SplashOverprintColor *opPattern; }; //------------------------------------------------------------------------ @@ -219,7 +183,7 @@ // Does this device use upside-down coordinates? // (Upside-down means (0,0) is the top left corner of the page.) - virtual GBool upsideDown() { return gTrue; } + virtual GBool upsideDown() { return bitmapTopDown ^ bitmapUpsideDown; } // Does this device use drawChar() or drawString()? virtual GBool useDrawChar() { return gTrue; } @@ -228,10 +192,6 @@ // text in Type 3 fonts will be drawn with drawChar/drawString. virtual GBool interpretType3Chars() { return gTrue; } - // This device now supports text in pattern colorspace! - virtual GBool supportTextCSPattern(GfxState *state) - { return state->getFillColorSpace()->getMode() == csPattern; } - //----- initialization and control // Start a page. @@ -263,6 +223,7 @@ virtual void updateFillOverprint(GfxState *state); virtual void updateStrokeOverprint(GfxState *state); virtual void updateOverprintMode(GfxState *state); + virtual void updateTransfer(GfxState *state); //----- update text state virtual void updateFont(GfxState *state); @@ -271,7 +232,7 @@ virtual void stroke(GfxState *state); virtual void fill(GfxState *state); virtual void eoFill(GfxState *state); - virtual GBool tilingPatternFill(GfxState *state, Catalog *catalog, Object *str, + virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *catalog, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, @@ -295,13 +256,18 @@ CharCode code, Unicode *u, int uLen); virtual void endType3Char(GfxState *state); virtual void beginTextObject(GfxState *state); - virtual GBool deviceHasTextClip(GfxState *state) { return textClipPath && haveCSPattern; } + virtual GBool deviceHasTextClip(GfxState *state) { return textClipPath; } virtual void endTextObject(GfxState *state); //----- image drawing virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg); + virtual void setSoftMaskFromImageMask(GfxState *state, + Object *ref, Stream *str, + int width, int height, GBool invert, + GBool inlineImg, double *baseMatrix); + virtual void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix); virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg); @@ -319,12 +285,6 @@ int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap, GBool maskInterpolate); - // If current colorspace ist pattern, - // need this device special handling for masks in pattern colorspace? - // Default is false - virtual GBool fillMaskCSPattern(GfxState * state) - { return state->getFillColorSpace()->getMode() == csPattern; } - virtual void endMaskClip(GfxState * /*state*/); //----- Type 3 font operators virtual void type3D0(GfxState *state, double wx, double wy); @@ -332,6 +292,7 @@ double llx, double lly, double urx, double ury); //----- transparency groups and soft masks + virtual GBool checkTransparencyGroup(GfxState *state, GBool knockout); virtual void beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace *blendingColorSpace, GBool isolated, GBool knockout, @@ -345,7 +306,7 @@ //----- special access // Called to indicate that a new PDF document has been loaded. - void startDoc(XRef *xrefA); + void startDoc(PDFDoc *docA); void setPaperColor(SplashColorPtr paperColorA); @@ -361,6 +322,10 @@ // caller. SplashBitmap *takeBitmap(); + // Set this flag to true to generate an upside-down bitmap (useful + // for Windows BMP files). + void setBitmapUpsideDown(GBool f) { bitmapUpsideDown = f; } + // Get the Splash object. Splash *getSplash() { return splash; } @@ -372,6 +337,13 @@ SplashFont *getCurrentFont() { return font; } + // If is true, don't draw horizontal text. + // If is true, don't draw rotated (non-horizontal) text. + void setSkipText(GBool skipHorizTextA, GBool skipRotatedTextA) + { skipHorizText = skipHorizTextA; skipRotatedText = skipRotatedTextA; } + + int getNestCount() { return nestCount; } + #if 1 //~tmp: turn off anti-aliasing temporarily virtual GBool getVectorAntialias(); virtual void setVectorAntialias(GBool vaa); @@ -379,18 +351,23 @@ void setFreeTypeHinting(GBool enable, GBool enableSlightHinting); +protected: + void doUpdateFont(GfxState *state); + private: GBool univariateShadedFill(GfxState *state, SplashUnivariatePattern *pattern, double tMin, double tMax); void setupScreenParams(double hDPI, double vDPI); + SplashPattern *getColor(GfxGray gray); + SplashPattern *getColor(GfxRGB *rgb); #if SPLASH_CMYK - SplashPattern *getColor(GfxColorSpace *colorSpace, GfxGray gray, GfxRGB *rgb, GfxCMYK *cmyk); -#else - SplashPattern *getColor(GfxGray gray, GfxRGB *rgb); + SplashPattern *getColor(GfxCMYK *cmyk); #endif - SplashPath *convertPath(GfxState *state, GfxPath *path); - void doUpdateFont(GfxState *state); - void drawType3Glyph(T3FontCache *t3Font, + void setOverprintMask(GfxColorSpace *colorSpace, GBool overprintFlag, + int overprintMode, GfxColor *singleColor, GBool grayIndexed = gFalse); + SplashPath *convertPath(GfxState *state, GfxPath *path, + GBool dropEmptySubpaths); + void drawType3Glyph(GfxState *state, T3FontCache *t3Font, T3FontCacheTag *tag, Guchar *data); static GBool imageMaskSrc(void *data, SplashColorPtr line); static GBool imageSrc(void *data, SplashColorPtr colorLine, @@ -402,13 +379,12 @@ static GBool tilingBitmapSrc(void *data, SplashColorPtr line, Guchar *alphaLine); - GBool haveCSPattern; // set if text has been drawn with a - // clipping render mode because of pattern colorspace GBool keepAlphaChannel; // don't fill with paper color, keep alpha channel SplashColorMode colorMode; int bitmapRowPad; GBool bitmapTopDown; + GBool bitmapUpsideDown; GBool allowAntialias; GBool vectorAntialias; GBool enableFreeTypeHinting; @@ -416,8 +392,10 @@ GBool reverseVideo; // reverse video mode SplashColor paperColor; // paper color SplashScreenParams screenParams; + GBool skipHorizText; + GBool skipRotatedText; - XRef *xref; // xref table for current document + PDFDoc *doc; // the current document SplashBitmap *bitmap; Splash *splash; @@ -427,6 +405,7 @@ t3FontCache[splashOutT3FontCacheSize]; int nT3Fonts; // number of valid entries in t3FontCache T3GlyphStack *t3GlyphStack; // Type 3 glyph context stack + GBool haveT3Dx; // set after seeing a d0/d1 operator SplashFont *font; // current font GBool needFontUpdate; // set when the font needs to be updated @@ -435,6 +414,7 @@ SplashTransparencyGroup * // transparency group stack transpGroupStack; SplashBitmap *maskBitmap; // for image masks in pattern colorspace + int nestCount; }; #endif diff -Nru poppler-0.18.4/poppler/Stream-CCITT.h poppler-0.20.5/poppler/Stream-CCITT.h --- poppler-0.18.4/poppler/Stream-CCITT.h 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/Stream-CCITT.h 2012-05-10 20:05:44.000000000 +0000 @@ -22,6 +22,9 @@ // //======================================================================== +#ifndef STREAM_CCITT_H +#define STREAM_CCITT_H + struct CCITTCode { short bits; short n; @@ -471,3 +474,5 @@ {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2}, {2, 2} }; + +#endif diff -Nru poppler-0.18.4/poppler/Stream.cc poppler-0.20.5/poppler/Stream.cc --- poppler-0.18.4/poppler/Stream.cc 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/Stream.cc 2012-09-26 12:22:16.000000000 +0000 @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2005 Jeff Muizelaar -// Copyright (C) 2006-2010 Albert Astals Cid +// Copyright (C) 2006-2010, 2012 Albert Astals Cid // Copyright (C) 2007 Krzysztof Kowalczyk // Copyright (C) 2008 Julien Rebetez // Copyright (C) 2009 Carlos Garcia Campos @@ -22,7 +22,9 @@ // Copyright (C) 2009 Stefan Thomas // Copyright (C) 2010 Hib Eris // Copyright (C) 2010 Tomas Hoger -// Copyright (C) 2011 William Bader +// Copyright (C) 2011, 2012 William Bader +// Copyright (C) 2012 Thomas Freitag +// Copyright (C) 2012 Oliver Sander // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -97,24 +99,24 @@ } int Stream::getRawChar() { - error(-1, "Internal: called getRawChar() on non-predictor stream"); + error(errInternal, -1, "Internal: called getRawChar() on non-predictor stream"); return EOF; } int Stream::getChars(int nChars, Guchar *buffer) { - error(-1, "Internal: called getChars() on non-predictor stream"); + error(errInternal, -1, "Internal: called getChars() on non-predictor stream"); return 0; } void Stream::getRawChars(int nChars, int *buffer) { - error(-1, "Internal: called getRawChars() on non-predictor stream"); + error(errInternal, -1, "Internal: called getRawChars() on non-predictor stream"); } char *Stream::getLine(char *buf, int size) { int i; int c; - if (lookChar() == EOF) + if (lookChar() == EOF || size < 0) return NULL; for (i = 0; i < size - 1; ++i) { c = getChar(); @@ -131,7 +133,7 @@ return buf; } -GooString *Stream::getPSFilter(int psLevel, char *indent) { +GooString *Stream::getPSFilter(int psLevel, const char *indent) { return new GooString(); } @@ -164,14 +166,14 @@ if (obj2.isName()) { str = makeFilter(obj2.getName(), str, ¶ms2); } else { - error(getPos(), "Bad filter name"); + error(errSyntaxError, getPos(), "Bad filter name"); str = new EOFStream(str); } obj2.free(); params2.free(); } } else if (!obj.isNull()) { - error(getPos(), "Bad 'Filter' attribute in stream"); + error(errSyntaxError, getPos(), "Bad 'Filter' attribute in stream"); } obj.free(); params.free(); @@ -314,7 +316,7 @@ } else if (!strcmp(name, "JPXDecode")) { str = new JPXStream(str); } else { - error(getPos(), "Unknown filter '%s'", name); + error(errSyntaxError, getPos(), "Unknown filter '{0:s}'", name); str = new EOFStream(str); } return str; @@ -399,7 +401,7 @@ } void FilterStream::setPos(Guint pos, int dir) { - error(-1, "Internal: called setPos() on FilterStream"); + error(errInternal, -1, "Internal: called setPos() on FilterStream"); } //------------------------------------------------------------------------ @@ -415,21 +417,34 @@ nBits = nBitsA; nVals = width * nComps; - if (nBits == 1) { - imgLineSize = (nVals + 7) & ~7; - } else { - imgLineSize = nVals; - } - if (width > INT_MAX / nComps) { + inputLineSize = (nVals * nBits + 7) >> 3; + if (nVals > INT_MAX / nBits - 7) { // force a call to gmallocn(-1,...), which will throw an exception - imgLineSize = -1; + inputLineSize = -1; + } + inputLine = (Guchar *)gmallocn(inputLineSize, sizeof(char)); + if (nBits == 8) { + imgLine = (Guchar *)inputLine; + } else { + if (nBits == 1) { + imgLineSize = (nVals + 7) & ~7; + } else { + imgLineSize = nVals; + } + if (width > INT_MAX / nComps) { + // force a call to gmallocn(-1,...), which will throw an exception + imgLineSize = -1; + } + imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar)); } - imgLine = (Guchar *)gmallocn(imgLineSize, sizeof(Guchar)); imgIdx = nVals; } ImageStream::~ImageStream() { - gfree(imgLine); + if (imgLine != (Guchar *)inputLine) { + gfree(imgLine); + } + gfree(inputLine); } void ImageStream::reset() { @@ -444,7 +459,9 @@ int i; if (imgIdx >= nVals) { - getLine(); + if (!getLine()) { + return gFalse; + } imgIdx = 0; } for (i = 0; i < nComps; ++i) { @@ -458,10 +475,14 @@ int bits; int c; int i; - + Guchar *p; + + int readChars = str->doGetChars(inputLineSize, inputLine); + for ( ; readChars < inputLineSize; readChars++) inputLine[readChars] = EOF; if (nBits == 1) { + p = inputLine; for (i = 0; i < nVals; i += 8) { - c = str->getChar(); + c = *p++; imgLine[i+0] = (Guchar)((c >> 7) & 1); imgLine[i+1] = (Guchar)((c >> 6) & 1); imgLine[i+2] = (Guchar)((c >> 5) & 1); @@ -472,25 +493,25 @@ imgLine[i+7] = (Guchar)(c & 1); } } else if (nBits == 8) { - Guchar *line = imgLine; - int readChars = str->doGetChars(nVals, line); - for ( ; readChars < nVals; readChars++) line[readChars] = EOF; + // special case: imgLine == inputLine } else if (nBits == 16) { // this is a hack to support 16 bits images, everywhere // we assume a component fits in 8 bits, with this hack // we treat 16 bit images as 8 bit ones until it's fixed correctly. // The hack has another part on GfxImageColorMap::GfxImageColorMap + p = inputLine; for (i = 0; i < nVals; ++i) { - imgLine[i] = str->getChar(); - str->getChar(); + imgLine[i] = *p++; + p++; } } else { bitMask = (1 << nBits) - 1; buf = 0; bits = 0; + p = inputLine; for (i = 0; i < nVals; ++i) { if (bits < nBits) { - buf = (buf << 8) | (str->getChar() & 0xff); + buf = (buf << 8) | (*p++ & 0xff); bits += 8; } imgLine[i] = (Guchar)((buf >> (bits - nBits)) & bitMask); @@ -501,12 +522,7 @@ } void ImageStream::skipLine() { - int n, i; - - n = (nVals * nBits + 7) >> 3; - for (i = 0; i < n; ++i) { - str->getChar(); - } + str->doGetChars(inputLineSize, inputLine); } //------------------------------------------------------------------------ @@ -554,17 +570,33 @@ } int StreamPredictor::getChar() { - return doGetChar(); + if (predIdx >= rowBytes) { + if (!getNextLine()) { + return EOF; + } + } + return predLine[predIdx++]; } -int StreamPredictor::getChars(int nChars, Guchar *buffer) -{ - for (int i = 0; i < nChars; ++i) { - const int c = doGetChar(); - if (likely(c != EOF)) buffer[i] = c; - else return i; +int StreamPredictor::getChars(int nChars, Guchar *buffer) { + int n, m; + + n = 0; + while (n < nChars) { + if (predIdx >= rowBytes) { + if (!getNextLine()) { + break; + } + } + m = rowBytes - predIdx; + if (m > nChars - n) { + m = nChars - n; + } + memcpy(buffer + n, predLine + predIdx, m); + predIdx += m; + n += m; } - return nChars; + return n; } GBool StreamPredictor::getNextLine() { @@ -792,10 +824,6 @@ #endif if (pos > size) pos = (Guint)size; -#ifdef __CYGWIN32__ - //~ work around a bug in cygwin's implementation of fseek - rewind(f); -#endif #if HAVE_FSEEKO fseeko(f, -(int)pos, SEEK_END); bufPos = (Guint)ftello(f); @@ -956,6 +984,22 @@ void MemStream::close() { } +int MemStream::getChars(int nChars, Guchar *buffer) { + int n; + + if (nChars <= 0) { + return 0; + } + if (bufEnd - bufPtr < nChars) { + n = (int)(bufEnd - bufPtr); + } else { + n = nChars; + } + memcpy(buffer, bufPtr, n); + bufPtr += n; + return n; +} + void MemStream::setPos(Guint pos, int dir) { Guint i; @@ -995,7 +1039,7 @@ Stream *EmbedStream::makeSubStream(Guint start, GBool limitedA, Guint lengthA, Object *dictA) { - error(-1, "Internal: called makeSubStream() on EmbedStream"); + error(errInternal, -1, "Called makeSubStream() on EmbedStream"); return NULL; } @@ -1014,17 +1058,27 @@ return str->lookChar(); } +int EmbedStream::getChars(int nChars, Guchar *buffer) { + if (nChars <= 0) { + return 0; + } + if (limited && length < (Guint)nChars) { + nChars = (int)length; + } + return str->doGetChars(nChars, buffer); +} + void EmbedStream::setPos(Guint pos, int dir) { - error(-1, "Internal: called setPos() on EmbedStream"); + error(errInternal, -1, "Internal: called setPos() on EmbedStream"); } Guint EmbedStream::getStart() { - error(-1, "Internal: called getStart() on EmbedStream"); + error(errInternal, -1, "Internal: called getStart() on EmbedStream"); return 0; } void EmbedStream::moveStart(int delta) { - error(-1, "Internal: called moveStart() on EmbedStream"); + error(errInternal, -1, "Internal: called moveStart() on EmbedStream"); } //------------------------------------------------------------------------ @@ -1081,7 +1135,8 @@ eof = gTrue; x = 0; } else { - error(getPos(), "Illegal character <%02x> in ASCIIHex stream", c1); + error(errSyntaxError, getPos(), + "Illegal character <{0:02x}> in ASCIIHex stream", c1); x = 0; } if (c2 >= '0' && c2 <= '9') { @@ -1094,13 +1149,14 @@ eof = gTrue; x = 0; } else { - error(getPos(), "Illegal character <%02x> in ASCIIHex stream", c2); + error(errSyntaxError, getPos(), + "Illegal character <{0:02x}> in ASCIIHex stream", c2); } buf = x & 0xff; return buf; } -GooString *ASCIIHexStream::getPSFilter(int psLevel, char *indent) { +GooString *ASCIIHexStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 2) { @@ -1181,7 +1237,7 @@ return b[index]; } -GooString *ASCII85Stream::getPSFilter(int psLevel, char *indent) { +GooString *ASCII85Stream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 2) { @@ -1266,6 +1322,33 @@ return doGetRawChar(); } +int LZWStream::getChars(int nChars, Guchar *buffer) { + int n, m; + + if (pred) { + return pred->getChars(nChars, buffer); + } + if (eof) { + return 0; + } + n = 0; + while (n < nChars) { + if (seqIndex >= seqLength) { + if (!processNextCode()) { + break; + } + } + m = seqLength - seqIndex; + if (m > nChars - n) { + m = nChars - n; + } + memcpy(buffer + n, seqBuf + seqIndex, m); + seqIndex += m; + n += m; + } + return n; +} + void LZWStream::reset() { str->reset(); eof = gFalse; @@ -1295,7 +1378,8 @@ goto start; } if (nextCode >= 4097) { - error(getPos(), "Bad LZW stream - expected clear-table code"); + error(errSyntaxError, getPos(), + "Bad LZW stream - expected clear-table code"); clearTable(); } @@ -1315,7 +1399,7 @@ seqBuf[seqLength] = newChar; ++seqLength; } else { - error(getPos(), "Bad LZW stream - unexpected code"); + error(errSyntaxError, getPos(), "Bad LZW stream - unexpected code"); eof = gTrue; return gFalse; } @@ -1364,7 +1448,7 @@ return code; } -GooString *LZWStream::getPSFilter(int psLevel, char *indent) { +GooString *LZWStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 2 || pred) { @@ -1405,7 +1489,28 @@ eof = gFalse; } -GooString *RunLengthStream::getPSFilter(int psLevel, char *indent) { +int RunLengthStream::getChars(int nChars, Guchar *buffer) { + int n, m; + + n = 0; + while (n < nChars) { + if (bufPtr >= bufEnd) { + if (!fillBuf()) { + break; + } + } + m = (int)(bufEnd - bufPtr); + if (m > nChars - n) { + m = nChars - n; + } + memcpy(buffer + n, bufPtr, m); + bufPtr += m; + n += m; + } + return n; +} + +GooString *RunLengthStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 2) { @@ -1496,8 +1601,11 @@ gfree(codingLine); } -void CCITTFaxStream::unfilteredReset () { - str->reset(); +void CCITTFaxStream::ccittReset(GBool unfiltered) { + if (unfiltered) + str->unfilteredReset(); + else + str->reset(); row = 0; nextLine2D = encoding < 0; @@ -1507,10 +1615,14 @@ buf = EOF; } +void CCITTFaxStream::unfilteredReset() { + ccittReset(gTrue); +} + void CCITTFaxStream::reset() { - short code1; + int code1; - unfilteredReset(); + ccittReset(gFalse); if (codingLine != NULL && refLine != NULL) { eof = gFalse; @@ -1526,6 +1638,7 @@ } if (code1 == 0x001) { eatBits(12); + endOfLine = gTrue; } if (encoding > 0) { nextLine2D = !lookBits(1); @@ -1536,7 +1649,8 @@ inline void CCITTFaxStream::addPixels(int a1, int blackPixels) { if (a1 > codingLine[a0i]) { if (a1 > columns) { - error(getPos(), "CCITTFax row is wrong length (%d)", a1); + error(errSyntaxError, getPos(), + "CCITTFax row is wrong length ({0:d})", a1); err = gTrue; a1 = columns; } @@ -1550,7 +1664,8 @@ inline void CCITTFaxStream::addPixelsNeg(int a1, int blackPixels) { if (a1 > codingLine[a0i]) { if (a1 > columns) { - error(getPos(), "CCITTFax row is wrong length (%d)", a1); + error(errSyntaxError, getPos(), + "CCITTFax row is wrong length ({0:d})", a1); err = gTrue; a1 = columns; } @@ -1560,7 +1675,7 @@ codingLine[a0i] = a1; } else if (a1 < codingLine[a0i]) { if (a1 < 0) { - error(getPos(), "Invalid CCITTFax code"); + error(errSyntaxError, getPos(), "Invalid CCITTFax code"); err = gTrue; a1 = 0; } @@ -1572,7 +1687,7 @@ } int CCITTFaxStream::lookChar() { - short code1, code2, code3; + int code1, code2, code3; int b1i, blackPixels, i, bits; GBool gotEOL; @@ -1592,7 +1707,7 @@ // 2-D encoding if (nextLine2D) { - for (i = 0; codingLine[i] < columns; ++i) { + for (i = 0; i < columns && codingLine[i] < columns; ++i) { refLine[i] = codingLine[i]; } refLine[i++] = columns; @@ -1608,13 +1723,15 @@ // codingLine[a0i = 0] = refLine[b1i = 0] = 0 is possible // exception at right edge: // refLine[b1i] = refLine[b1i+1] = columns is possible - while (codingLine[a0i] < columns) { + while (codingLine[a0i] < columns && !err) { code1 = getTwoDimCode(); switch (code1) { case twoDimPass: - addPixels(refLine[b1i + 1], blackPixels); - if (refLine[b1i + 1] < columns) { - b1i += 2; + if (likely(b1i + 1 < columns + 2)) { + addPixels(refLine[b1i + 1], blackPixels); + if (refLine[b1i + 1] < columns) { + b1i += 2; + } } break; case twoDimHoriz: @@ -1640,49 +1757,109 @@ } while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } break; case twoDimVertR3: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixels(refLine[b1i] + 3, blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { ++b1i; while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; case twoDimVertR2: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixels(refLine[b1i] + 2, blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { ++b1i; while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; case twoDimVertR1: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixels(refLine[b1i] + 1, blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { ++b1i; while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; case twoDimVert0: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixels(refLine[b1i], blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { ++b1i; while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; case twoDimVertL3: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixelsNeg(refLine[b1i] - 3, blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { @@ -1693,10 +1870,22 @@ } while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; case twoDimVertL2: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixelsNeg(refLine[b1i] - 2, blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { @@ -1707,10 +1896,22 @@ } while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; case twoDimVertL1: + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } addPixelsNeg(refLine[b1i] - 1, blackPixels); blackPixels ^= 1; if (codingLine[a0i] < columns) { @@ -1721,6 +1922,12 @@ } while (refLine[b1i] <= codingLine[a0i] && refLine[b1i] < columns) { b1i += 2; + if (unlikely(b1i > columns + 1)) { + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); + err = gTrue; + break; + } } } break; @@ -1729,7 +1936,8 @@ eof = gTrue; break; default: - error(getPos(), "Bad 2D code %04x in CCITTFax stream", code1); + error(errSyntaxError, getPos(), + "Bad 2D code {0:04x} in CCITTFax stream", code1); addPixels(columns, 0); err = gTrue; break; @@ -1757,29 +1965,51 @@ } } - // byte-align the row - if (byteAlign) { - inputBits &= ~7; - } - // check for end-of-line marker, skipping over any extra zero bits + // (if EncodedByteAlign is true and EndOfLine is false, there can + // be "false" EOL markers -- i.e., if the last n unused bits in + // row i are set to zero, and the first 11-n bits in row i+1 + // happen to be zero -- so we don't look for EOL markers in this + // case) gotEOL = gFalse; if (!endOfBlock && row == rows - 1) { eof = gTrue; - } else { + } else if (endOfLine || !byteAlign) { code1 = lookBits(12); - while (code1 == 0) { - eatBits(1); - code1 = lookBits(12); + if (endOfLine) { + while (code1 != EOF && code1 != 0x001) { + eatBits(1); + code1 = lookBits(12); + } + } else { + while (code1 == 0) { + eatBits(1); + code1 = lookBits(12); + } } if (code1 == 0x001) { eatBits(12); gotEOL = gTrue; - } else if (code1 == EOF) { - eof = gTrue; } } + // byte-align the row + // (Adobe apparently doesn't do byte alignment after EOL markers + // -- I've seen CCITT image data streams in two different formats, + // both with the byteAlign flag set: + // 1. xx:x0:01:yy:yy + // 2. xx:00:1y:yy:yy + // where xx is the previous line, yy is the next line, and colons + // separate bytes.) + if (byteAlign && !gotEOL) { + inputBits &= ~7; + } + + // check for end of stream + if (lookBits(1) == EOF) { + eof = gTrue; + } + // get 2D encoding tag if (!eof && encoding > 0) { nextLine2D = !lookBits(1); @@ -1787,6 +2017,15 @@ } // check for end-of-block marker + if (endOfBlock && !endOfLine && byteAlign) { + // in this case, we didn't check for an EOL code above, so we + // need to check here + code1 = lookBits(24); + if (code1 == 0x001001) { + eatBits(12); + gotEOL = gTrue; + } + } if (endOfBlock && gotEOL) { code1 = lookBits(12); if (code1 == 0x001) { @@ -1799,7 +2038,8 @@ for (i = 0; i < 4; ++i) { code1 = lookBits(12); if (code1 != 0x001) { - error(getPos(), "Bad RTC code in CCITTFax stream"); + error(errSyntaxError, getPos(), + "Bad RTC code in CCITTFax stream"); } eatBits(12); if (encoding > 0) { @@ -1871,6 +2111,12 @@ outputBits = 0; if (codingLine[a0i] < columns) { ++a0i; + if (unlikely(a0i > columns)) { + error(errSyntaxError, getPos(), + "Bad bits {0:04x} in CCITTFax stream", bits); + err = gTrue; + break; + } outputBits = codingLine[a0i] - codingLine[a0i - 1]; } else if (bits > 0) { buf <<= bits; @@ -1886,21 +2132,24 @@ } short CCITTFaxStream::getTwoDimCode() { - short code; + int code; const CCITTCode *p; int n; code = 0; // make gcc happy if (endOfBlock) { - code = lookBits(7); - p = &twoDimTab1[code]; - if (p->bits > 0) { - eatBits(p->bits); - return p->n; + if ((code = lookBits(7)) != EOF) { + p = &twoDimTab1[code]; + if (p->bits > 0) { + eatBits(p->bits); + return p->n; + } } } else { for (n = 1; n <= 7; ++n) { - code = lookBits(n); + if ((code = lookBits(n)) == EOF) { + break; + } if (n < 7) { code <<= 7 - n; } @@ -1911,7 +2160,8 @@ } } } - error(getPos(), "Bad two dim code (%04x) in CCITTFax stream", code); + error(errSyntaxError, getPos(), + "Bad two dim code ({0:04x}) in CCITTFax stream", code); return EOF; } @@ -1965,7 +2215,8 @@ } } } - error(getPos(), "Bad white code (%04x) in CCITTFax stream", code); + error(errSyntaxError, getPos(), + "Bad white code ({0:04x}) in CCITTFax stream", code); // eat a bit and return a positive number so that the caller doesn't // go into an infinite loop eatBits(1); @@ -2040,7 +2291,8 @@ } } } - error(getPos(), "Bad black code (%04x) in CCITTFax stream", code); + error(errSyntaxError, getPos(), + "Bad black code ({0:04x}) in CCITTFax stream", code); // eat a bit and return a positive number so that the caller doesn't // go into an infinite loop eatBits(1); @@ -2059,15 +2311,15 @@ // than are available, but there may still be a valid code in // however many bits are available -- we need to return correct // data in this case - return (inputBuf << (n - inputBits)) & (0xffff >> (16 - n)); + return (inputBuf << (n - inputBits)) & (0xffffffff >> (32 - n)); } inputBuf = (inputBuf << 8) + c; inputBits += 8; } - return (inputBuf >> (inputBits - n)) & (0xffff >> (16 - n)); + return (inputBuf >> (inputBits - n)) & (0xffffffff >> (32 - n)); } -GooString *CCITTFaxStream::getPSFilter(int psLevel, char *indent) { +GooString *CCITTFaxStream::getPSFilter(int psLevel, const char *indent) { GooString *s; char s1[50]; @@ -2188,8 +2440,11 @@ delete str; } -void DCTStream::unfilteredReset() { - str->reset(); +void DCTStream::dctReset(GBool unfiltered) { + if (unfiltered) + str->unfilteredReset(); + else + str->reset(); progressive = interleaved = gFalse; width = height = 0; @@ -2202,11 +2457,14 @@ restartInterval = 0; } +void DCTStream::unfilteredReset() { + dctReset(gTrue); +} void DCTStream::reset() { int i, j; - unfilteredReset(); + dctReset(gFalse); if (!readHeader()) { y = height; @@ -2253,7 +2511,7 @@ bufHeight = ((height + mcuHeight - 1) / mcuHeight) * mcuHeight; if (bufWidth <= 0 || bufHeight <= 0 || bufWidth > INT_MAX / bufWidth / (int)sizeof(int)) { - error(getPos(), "Invalid image size in DCT stream"); + error(errSyntaxError, getPos(), "Invalid image size in DCT stream"); y = height; return; } @@ -2400,7 +2658,8 @@ if (restartInterval > 0 && restartCtr == 0) { c = readMarker(); if (c != restartMarker) { - error(getPos(), "Bad DCT data: incorrect restart marker"); + error(errSyntaxError, getPos(), + "Bad DCT data: incorrect restart marker"); return gFalse; } if (++restartMarker == 0xd8) @@ -2418,6 +2677,9 @@ vSub = vert / 8; for (y2 = 0; y2 < mcuHeight; y2 += vert) { for (x2 = 0; x2 < mcuWidth; x2 += horiz) { + if (unlikely(scanInfo.dcHuffTable[cc] >= 4) || unlikely(scanInfo.acHuffTable[cc] >= 4)) { + return gFalse; + } if (!readDataUnit(&dcHuffTables[scanInfo.dcHuffTable[cc]], &acHuffTables[scanInfo.acHuffTable[cc]], &compInfo[cc].prevDC, @@ -2533,7 +2795,8 @@ if (restartInterval > 0 && restartCtr == 0) { c = readMarker(); if (c != restartMarker) { - error(getPos(), "Bad DCT data: incorrect restart marker"); + error(errSyntaxError, getPos(), + "Bad DCT data: incorrect restart marker"); return; } if (++restartMarker == 0xd8) { @@ -2719,7 +2982,7 @@ // ZRL if (c == 0xf0) { k = 0; - while (k < 16) { + while (k < 16 && i <= scanInfo.lastCoeff) { j = dctZigZag[i++]; if (data[j] == 0) { ++k; @@ -2765,10 +3028,10 @@ if ((amp = readAmp(size)) == 9999) { return gFalse; } - k = 0; - do { + j = 0; // make gcc happy + for (k = 0; k <= run && i <= scanInfo.lastCoeff; ++k) { j = dctZigZag[i++]; - while (data[j] != 0) { + while (data[j] != 0 && i <= scanInfo.lastCoeff) { if ((bit = readBit()) == EOF) { return gFalse; } @@ -2777,8 +3040,7 @@ } j = dctZigZag[i++]; } - ++k; - } while (k <= run); + } data[j] = amp << scanInfo.al; } } @@ -3091,19 +3353,23 @@ codeBits = 0; do { // add a bit to the code - if ((bit = readBit()) == EOF) + if ((bit = readBit()) == EOF) { return 9999; + } code = (code << 1) + bit; ++codeBits; // look up code + if (code < table->firstCode[codeBits]) { + break; + } if (code - table->firstCode[codeBits] < table->numCodes[codeBits]) { code -= table->firstCode[codeBits]; return table->sym[table->firstSym[codeBits] + code]; } } while (codeBits < 16); - error(getPos(), "Bad Huffman code in DCT stream"); + error(errSyntaxError, getPos(), "Bad Huffman code in DCT stream"); return 9999; } @@ -3134,7 +3400,7 @@ c2 = str->getChar(); } while (c2 == 0xff); if (c2 != 0x00) { - error(getPos(), "Bad DCT data: missing 00 after ff"); + error(errSyntaxError, getPos(), "Bad DCT data: missing 00 after ff"); return EOF; } } @@ -3204,7 +3470,7 @@ } break; case EOF: - error(getPos(), "Bad DCT header"); + error(errSyntaxError, getPos(), "Bad DCT header"); return gFalse; default: // skip APPn / COM / etc. @@ -3214,7 +3480,7 @@ str->getChar(); } } else { - error(getPos(), "Unknown DCT marker <%02x>", c); + error(errSyntaxError, getPos(), "Unknown DCT marker <{0:02x}>", c); return gFalse; } break; @@ -3236,12 +3502,12 @@ width = read16(); numComps = str->getChar(); if (numComps <= 0 || numComps > 4) { - error(getPos(), "Bad number of components in DCT stream"); + error(errSyntaxError, getPos(), "Bad number of components in DCT stream"); numComps = 0; return gFalse; } if (prec != 8) { - error(getPos(), "Bad DCT precision %d", prec); + error(errSyntaxError, getPos(), "Bad DCT precision {0:d}", prec); return gFalse; } for (i = 0; i < numComps; ++i) { @@ -3250,6 +3516,15 @@ compInfo[i].hSample = (c >> 4) & 0x0f; compInfo[i].vSample = c & 0x0f; compInfo[i].quantTable = str->getChar(); + if (compInfo[i].hSample < 1 || compInfo[i].hSample > 4 || + compInfo[i].vSample < 1 || compInfo[i].vSample > 4) { + error(errSyntaxError, getPos(), "Bad DCT sampling factor"); + return gFalse; + } + if (compInfo[i].quantTable < 0 || compInfo[i].quantTable > 3) { + error(errSyntaxError, getPos(), "Bad DCT quant table selector"); + return gFalse; + } } progressive = gFalse; return gTrue; @@ -3267,7 +3542,7 @@ width = read16(); numComps = str->getChar(); if (prec != 8) { - error(getPos(), "Bad DCT precision %d", prec); + error(errSyntaxError, getPos(), "Bad DCT precision {0:d}", prec); return gFalse; } for (i = 0; i < numComps; ++i) { @@ -3276,6 +3551,15 @@ compInfo[i].hSample = (c >> 4) & 0x0f; compInfo[i].vSample = c & 0x0f; compInfo[i].quantTable = str->getChar(); + if (compInfo[i].hSample < 1 || compInfo[i].hSample > 4 || + compInfo[i].vSample < 1 || compInfo[i].vSample > 4) { + error(errSyntaxError, getPos(), "Bad DCT sampling factor"); + return gFalse; + } + if (compInfo[i].quantTable < 0 || compInfo[i].quantTable > 3) { + error(errSyntaxError, getPos(), "Bad DCT quant table selector"); + return gFalse; + } } progressive = gTrue; return gTrue; @@ -3289,13 +3573,13 @@ length = read16() - 2; scanInfo.numComps = str->getChar(); if (scanInfo.numComps <= 0 || scanInfo.numComps > 4) { - error(getPos(), "Bad number of components in DCT stream"); + error(errSyntaxError, getPos(), "Bad number of components in DCT stream"); scanInfo.numComps = 0; return gFalse; } --length; if (length != 2 * scanInfo.numComps + 3) { - error(getPos(), "Bad DCT scan info block"); + error(errSyntaxError, getPos(), "Bad DCT scan info block"); return gFalse; } interleaved = scanInfo.numComps == numComps; @@ -3318,7 +3602,8 @@ } } if (j == numComps) { - error(getPos(), "Bad DCT component ID in scan info block"); + error(errSyntaxError, getPos(), + "Bad DCT component ID in scan info block"); return gFalse; } } @@ -3331,7 +3616,8 @@ scanInfo.lastCoeff = str->getChar(); if (scanInfo.firstCoeff < 0 || scanInfo.lastCoeff > 63 || scanInfo.firstCoeff > scanInfo.lastCoeff) { - error(getPos(), "Bad DCT coefficient numbers in scan info block"); + error(errSyntaxError, getPos(), + "Bad DCT coefficient numbers in scan info block"); return gFalse; } c = str->getChar(); @@ -3349,7 +3635,7 @@ prec = (index >> 4) & 0x0f; index &= 0x0f; if (prec > 1 || index >= 4) { - error(getPos(), "Bad DCT quantization table"); + error(errSyntaxError, getPos(), "Bad DCT quantization table"); return gFalse; } if (index == numQuantTables) { @@ -3385,7 +3671,7 @@ index = str->getChar(); --length; if ((index & 0x0f) >= 4) { - error(getPos(), "Bad DCT Huffman table"); + error(errSyntaxError, getPos(), "Bad DCT Huffman table"); return gFalse; } if (index & 0x10) { @@ -3422,7 +3708,7 @@ length = read16(); if (length != 4) { - error(getPos(), "Bad DCT restart interval"); + error(errSyntaxError, getPos(), "Bad DCT restart interval"); return gFalse; } restartInterval = read16(); @@ -3439,7 +3725,7 @@ if (length >= 5) { for (i = 0; i < 5; ++i) { if ((c = str->getChar()) == EOF) { - error(getPos(), "Bad DCT APP0 marker"); + error(errSyntaxError, getPos(), "Bad DCT APP0 marker"); return gFalse; } buf[i] = c; @@ -3451,7 +3737,7 @@ } while (length > 0) { if (str->getChar() == EOF) { - error(getPos(), "Bad DCT APP0 marker"); + error(errSyntaxError, getPos(), "Bad DCT APP0 marker"); return gFalse; } --length; @@ -3487,7 +3773,7 @@ return gTrue; err: - error(getPos(), "Bad DCT Adobe APP14 marker"); + error(errSyntaxError, getPos(), "Bad DCT Adobe APP14 marker"); return gFalse; } @@ -3496,7 +3782,7 @@ c = readMarker(); if (c != 0xd9) { // EOI - error(getPos(), "Bad DCT trailer"); + error(errSyntaxError, getPos(), "Bad DCT trailer"); return gFalse; } return gTrue; @@ -3526,7 +3812,7 @@ return (c1 << 8) + c2; } -GooString *DCTStream::getPSFilter(int psLevel, char *indent) { +GooString *DCTStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 2) { @@ -4234,15 +4520,15 @@ if (cmf == EOF || flg == EOF) return; if ((cmf & 0x0f) != 0x08) { - error(getPos(), "Unknown compression method in flate stream"); + error(errSyntaxError, getPos(), "Unknown compression method in flate stream"); return; } if ((((cmf << 8) + flg) % 31) != 0) { - error(getPos(), "Bad FCHECK in flate stream"); + error(errSyntaxError, getPos(), "Bad FCHECK in flate stream"); return; } if (flg & 0x20) { - error(getPos(), "FDICT bit set in flate stream"); + error(errSyntaxError, getPos(), "FDICT bit set in flate stream"); return; } @@ -4250,7 +4536,10 @@ } int FlateStream::getChar() { - return doGetChar(); + if (pred) { + return pred->getChar(); + } + return doGetRawChar(); } int FlateStream::getChars(int nChars, Guchar *buffer) { @@ -4258,7 +4547,7 @@ return pred->getChars(nChars, buffer); } else { for (int i = 0; i < nChars; ++i) { - const int c = doGetChar(); + const int c = doGetRawChar(); if (likely(c != EOF)) buffer[i] = c; else return i; } @@ -4290,7 +4579,7 @@ return doGetRawChar(); } -GooString *FlateStream::getPSFilter(int psLevel, char *indent) { +GooString *FlateStream::getPSFilter(int psLevel, const char *indent) { GooString *s; if (psLevel < 3 || pred) { @@ -4367,7 +4656,7 @@ return; err: - error(getPos(), "Unexpected end of file in flate stream"); + error(errSyntaxError, getPos(), "Unexpected end of file in flate stream"); endOfBlock = eof = gTrue; remain = 0; } @@ -4409,7 +4698,7 @@ goto err; check |= (c & 0xff) << 8; if (check != (~blockLen & 0xffff)) - error(getPos(), "Bad uncompressed block length in flate stream"); + error(errSyntaxError, getPos(), "Bad uncompressed block length in flate stream"); codeBuf = 0; codeSize = 0; @@ -4434,7 +4723,7 @@ return gTrue; err: - error(getPos(), "Bad block header in flate stream"); + error(errSyntaxError, getPos(), "Bad block header in flate stream"); endOfBlock = eof = gTrue; return gFalse; } @@ -4541,7 +4830,7 @@ return gTrue; err: - error(getPos(), "Bad dynamic code table in flate stream"); + error(errSyntaxError, getPos(), "Bad dynamic code table in flate stream"); gfree(codeLenCodeTab.codes); return gFalse; } @@ -4645,6 +4934,52 @@ } //------------------------------------------------------------------------ +// BufStream +//------------------------------------------------------------------------ + +BufStream::BufStream(Stream *strA, int bufSizeA): FilterStream(strA) { + bufSize = bufSizeA; + buf = (int *)gmallocn(bufSize, sizeof(int)); +} + +BufStream::~BufStream() { + gfree(buf); + delete str; +} + +void BufStream::reset() { + int i; + + str->reset(); + for (i = 0; i < bufSize; ++i) { + buf[i] = str->getChar(); + } +} + +int BufStream::getChar() { + int c, i; + + c = buf[0]; + for (i = 1; i < bufSize; ++i) { + buf[i-1] = buf[i]; + } + buf[bufSize - 1] = str->getChar(); + return c; +} + +int BufStream::lookChar() { + return buf[0]; +} + +int BufStream::lookChar(int idx) { + return buf[idx]; +} + +GBool BufStream::isBinary(GBool last) { + return str->isBinary(gTrue); +} + +//------------------------------------------------------------------------ // FixedLengthEncoder //------------------------------------------------------------------------ @@ -4926,27 +5261,27 @@ } //------------------------------------------------------------------------ -// CMKYGrayEncoder +// CMYKGrayEncoder //------------------------------------------------------------------------ -CMKYGrayEncoder::CMKYGrayEncoder(Stream *strA): +CMYKGrayEncoder::CMYKGrayEncoder(Stream *strA): FilterStream(strA) { bufPtr = bufEnd = buf; eof = gFalse; } -CMKYGrayEncoder::~CMKYGrayEncoder() { +CMYKGrayEncoder::~CMYKGrayEncoder() { if (str->isEncoder()) delete str; } -void CMKYGrayEncoder::reset() { +void CMYKGrayEncoder::reset() { str->reset(); bufPtr = bufEnd = buf; eof = gFalse; } -GBool CMKYGrayEncoder::fillBuf() { +GBool CMYKGrayEncoder::fillBuf() { int c0, c1, c2, c3; int i; @@ -4967,3 +5302,46 @@ *bufEnd++ = (char) i; return gTrue; } + +//------------------------------------------------------------------------ +// RGBGrayEncoder +//------------------------------------------------------------------------ + +RGBGrayEncoder::RGBGrayEncoder(Stream *strA): + FilterStream(strA) { + bufPtr = bufEnd = buf; + eof = gFalse; +} + +RGBGrayEncoder::~RGBGrayEncoder() { + if (str->isEncoder()) + delete str; +} + +void RGBGrayEncoder::reset() { + str->reset(); + bufPtr = bufEnd = buf; + eof = gFalse; +} + +GBool RGBGrayEncoder::fillBuf() { + int c0, c1, c2; + int i; + + if (eof) { + return gFalse; + } + c0 = str->getChar(); + c1 = str->getChar(); + c2 = str->getChar(); + if (c2 == EOF) { + eof = gTrue; + return gFalse; + } + i = 255 - (3 * c0 + 6 * c1 + c2) / 10; + if (i < 0) i = 0; + bufPtr = bufEnd = buf; + *bufEnd++ = (char) i; + return gTrue; +} + diff -Nru poppler-0.18.4/poppler/Stream.h poppler-0.20.5/poppler/Stream.h --- poppler-0.18.4/poppler/Stream.h 2011-12-25 23:42:12.000000000 +0000 +++ poppler-0.20.5/poppler/Stream.h 2012-09-08 16:07:00.000000000 +0000 @@ -19,7 +19,8 @@ // Copyright (C) 2009 Carlos Garcia Campos // Copyright (C) 2009 Stefan Thomas // Copyright (C) 2010 Hib Eris -// Copyright (C) 2011 William Bader +// Copyright (C) 2011, 2012 William Bader +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -71,7 +72,8 @@ // include file dependency loops. enum CryptAlgorithm { cryptRC4, - cryptAES + cryptAES, + cryptAES256 }; //------------------------------------------------------------------------ @@ -188,7 +190,7 @@ virtual void setPos(Guint pos, int dir = 0) = 0; // Get PostScript command for the filter(s). - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); // Does this stream type potentially contain non-printable chars? virtual GBool isBinary(GBool last = gTrue) = 0; @@ -384,6 +386,8 @@ int nComps; // components per pixel int nBits; // bits per component int nVals; // components per line + int inputLineSize; // input line buffer size + Guchar *inputLine; // input line buffer Guchar *imgLine; // line buffer int imgIdx; // current index in imgLine }; @@ -412,15 +416,6 @@ GBool getNextLine(); - inline int doGetChar() { - if (predIdx >= rowBytes) { - if (!getNextLine()) { - return EOF; - } - } - return predLine[predIdx++]; - } - Stream *str; // base stream int predictor; // predictor int width; // pixels per line @@ -452,7 +447,7 @@ virtual void reset(); virtual void close(); virtual int getChar() - { return doGetChar(); } + { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } virtual int lookChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } virtual int getPos() { return bufPos + (bufPtr - buf); } @@ -467,18 +462,27 @@ GBool fillBuf(); - inline int doGetChar() - { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } - virtual GBool hasGetChars() { return true; } virtual int getChars(int nChars, Guchar *buffer) { - for (int i = 0; i < nChars; ++i) { - const int c = doGetChar(); - if (likely(c != EOF)) buffer[i] = c; - else return i; + int n, m; + + n = 0; + while (n < nChars) { + if (bufPtr >= bufEnd) { + if (!fillBuf()) { + break; + } + } + m = (int)(bufEnd - bufPtr); + if (m > nChars - n) { + m = nChars - n; + } + memcpy(buffer + n, bufPtr, m); + bufPtr += m; + n += m; } - return nChars; + return n; } FILE *f; @@ -569,6 +573,9 @@ private: + virtual GBool hasGetChars() { return true; } + virtual int getChars(int nChars, Guchar *buffer); + char *buf; Guint start; char *bufEnd; @@ -608,6 +615,9 @@ private: + virtual GBool hasGetChars() { return true; } + virtual int getChars(int nChars, Guchar *buffer); + Stream *str; GBool limited; }; @@ -626,7 +636,7 @@ virtual int getChar() { int c = lookChar(); buf = EOF; return c; } virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: @@ -649,7 +659,7 @@ virtual int getChar() { int ch = lookChar(); ++index; return ch; } virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: @@ -676,11 +686,14 @@ virtual int lookChar(); virtual int getRawChar(); virtual void getRawChars(int nChars, int *buffer); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: + virtual GBool hasGetChars() { return true; } + virtual int getChars(int nChars, Guchar *buffer); + inline int doGetRawChar() { if (eof) { return EOF; @@ -732,11 +745,14 @@ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } virtual int lookChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); private: + virtual GBool hasGetChars() { return true; } + virtual int getChars(int nChars, Guchar *buffer); + char buf[128]; // buffer char *bufPtr; // next char to read char *bufEnd; // end of buffer @@ -763,13 +779,14 @@ virtual int getChar() { int c = lookChar(); buf = EOF; return c; } virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); virtual void unfilteredReset (); private: + void ccittReset(GBool unfiltered); int encoding; // 'K' parameter GBool endOfLine; // 'EndOfLine' parameter GBool byteAlign; // 'EncodedByteAlign' parameter @@ -780,7 +797,7 @@ GBool eof; // true if at eof GBool nextLine2D; // true if next line uses 2D encoding int row; // current row - int inputBuf; // input buffer + Guint inputBuf; // input buffer int inputBits; // number of bits in input buffer int *codingLine; // coding line changing elements int *refLine; // reference line changing elements @@ -789,8 +806,8 @@ int outputBits; // remaining ouput bits int buf; // character buffer - void addPixels(int a1, int black); - void addPixelsNeg(int a1, int black); + void addPixels(int a1, int blackPixels); + void addPixelsNeg(int a1, int blackPixels); short getTwoDimCode(); short getWhiteCode(); short getBlackCode(); @@ -839,13 +856,14 @@ virtual void close(); virtual int getChar(); virtual int lookChar(); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); virtual void unfilteredReset(); private: + void dctReset(GBool unfiltered); GBool progressive; // set if in progressive mode GBool interleaved; // set if in interleaved mode int width, height; // image size @@ -947,7 +965,7 @@ virtual int lookChar(); virtual int getRawChar(); virtual void getRawChars(int nChars, int *buffer); - virtual GooString *getPSFilter(int psLevel, char *indent); + virtual GooString *getPSFilter(int psLevel, const char *indent); virtual GBool isBinary(GBool last = gTrue); virtual void unfilteredReset (); @@ -966,13 +984,6 @@ return c; } - inline int doGetChar() { - if (pred) { - return pred->getChar(); - } - return doGetRawChar(); - } - virtual GBool hasGetChars() { return true; } virtual int getChars(int nChars, Guchar *buffer); @@ -1025,11 +1036,36 @@ virtual void reset() {} virtual int getChar() { return EOF; } virtual int lookChar() { return EOF; } - virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; } }; //------------------------------------------------------------------------ +// BufStream +//------------------------------------------------------------------------ + +class BufStream: public FilterStream { +public: + + BufStream(Stream *strA, int bufSizeA); + virtual ~BufStream(); + virtual StreamKind getKind() { return strWeird; } + virtual void reset(); + virtual int getChar(); + virtual int lookChar(); + virtual GooString *getPSFilter(int psLevel, const char *indent) + { return NULL; } + virtual GBool isBinary(GBool last = gTrue); + + int lookChar(int idx); + +private: + + int *buf; + int bufSize; +}; + +//------------------------------------------------------------------------ // FixedLengthEncoder //------------------------------------------------------------------------ @@ -1042,7 +1078,7 @@ virtual void reset(); virtual int getChar(); virtual int lookChar(); - virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } virtual GBool isBinary(GBool /*last = gTrue*/); virtual GBool isEncoder() { return gTrue; } @@ -1067,7 +1103,7 @@ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } virtual int lookChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; } virtual GBool isEncoder() { return gTrue; } @@ -1097,7 +1133,7 @@ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } virtual int lookChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; } virtual GBool isEncoder() { return gTrue; } @@ -1127,7 +1163,7 @@ { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } virtual int lookChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } virtual GBool isBinary(GBool /*last = gTrue*/) { return gTrue; } virtual GBool isEncoder() { return gTrue; } @@ -1143,21 +1179,50 @@ }; //------------------------------------------------------------------------ -// CMKYGrayEncoder +// CMYKGrayEncoder +//------------------------------------------------------------------------ + +class CMYKGrayEncoder: public FilterStream { +public: + + CMYKGrayEncoder(Stream *strA); + virtual ~CMYKGrayEncoder(); + virtual StreamKind getKind() { return strWeird; } + virtual void reset(); + virtual int getChar() + { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } + virtual int lookChar() + { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } + virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; } + virtual GBool isEncoder() { return gTrue; } + +private: + + char buf[2]; + char *bufPtr; + char *bufEnd; + GBool eof; + + GBool fillBuf(); +}; + +//------------------------------------------------------------------------ +// RGBGrayEncoder //------------------------------------------------------------------------ -class CMKYGrayEncoder: public FilterStream { +class RGBGrayEncoder: public FilterStream { public: - CMKYGrayEncoder(Stream *strA); - virtual ~CMKYGrayEncoder(); + RGBGrayEncoder(Stream *strA); + virtual ~RGBGrayEncoder(); virtual StreamKind getKind() { return strWeird; } virtual void reset(); virtual int getChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr++ & 0xff); } virtual int lookChar() { return (bufPtr >= bufEnd && !fillBuf()) ? EOF : (*bufPtr & 0xff); } - virtual GooString *getPSFilter(int /*psLevel*/, char * /*indent*/) { return NULL; } + virtual GooString *getPSFilter(int /*psLevel*/, const char * /*indent*/) { return NULL; } virtual GBool isBinary(GBool /*last = gTrue*/) { return gFalse; } virtual GBool isEncoder() { return gTrue; } diff -Nru poppler-0.18.4/poppler/TextOutputDev.cc poppler-0.20.5/poppler/TextOutputDev.cc --- poppler-0.18.4/poppler/TextOutputDev.cc 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/TextOutputDev.cc 2012-09-11 17:24:53.000000000 +0000 @@ -20,7 +20,7 @@ // Copyright (C) 2006 Jeff Muizelaar // Copyright (C) 2007, 2008 Adrian Johnson // Copyright (C) 2008 Koji Otani -// Copyright (C) 2008, 2010, 2011 Albert Astals Cid +// Copyright (C) 2008, 2010-2012 Albert Astals Cid // Copyright (C) 2008 Pino Toscano // Copyright (C) 2008, 2010 Hib Eris // Copyright (C) 2009 Ross Moore @@ -28,6 +28,8 @@ // Copyright (C) 2010 Brian Ewins // Copyright (C) 2010 Suzuki Toshiya // Copyright (C) 2011 Sam Liao +// Copyright (C) 2012 Horst Prote +// Copyright (C) 2012 Jason Crain // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -205,9 +207,8 @@ if (gfxFont) gfxFont->incRefCnt(); #if TEXTOUT_WORD_LIST - fontName = (gfxFont && gfxFont->getOrigName()) - ? gfxFont->getOrigName()->copy() - : (GooString *)NULL; + fontName = (gfxFont && gfxFont->getName()) ? gfxFont->getName()->copy() + : (GooString *)NULL; flags = gfxFont ? gfxFont->getFlags() : 0; #endif } @@ -235,74 +236,103 @@ //------------------------------------------------------------------------ TextWord::TextWord(GfxState *state, int rotA, double x0, double y0, - int charPosA, TextFontInfo *fontA, double fontSizeA) { + TextFontInfo *fontA, double fontSizeA) { GfxFont *gfxFont; double x, y, ascent, descent; - + int wMode; + rot = rotA; - charPos = charPosA; - charLen = 0; font = fontA; fontSize = fontSizeA; state->transform(x0, y0, &x, &y); if ((gfxFont = font->gfxFont)) { ascent = gfxFont->getAscent() * fontSize; descent = gfxFont->getDescent() * fontSize; + wMode = gfxFont->getWMode(); } else { // this means that the PDF file draws text without a current font, // which should never happen ascent = 0.95 * fontSize; descent = -0.35 * fontSize; + wMode = 0; } - switch (rot) { - case 0: - yMin = y - ascent; - yMax = y - descent; - if (yMin == yMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later - yMin = y; - yMax = y + 1; - } - base = y; - break; - case 1: - xMin = x + descent; - xMax = x + ascent; - if (xMin == xMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later + if (wMode) { // vertical writing mode + // NB: the rotation value has been incremented by 1 (in + // TextPage::beginWord()) for vertical writing mode + switch (rot) { + case 0: + yMin = y - fontSize; + yMax = y; + base = y; + break; + case 1: xMin = x; - xMax = x + 1; - } - base = x; - break; - case 2: - yMin = y + descent; - yMax = y + ascent; - if (yMin == yMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later + xMax = x + fontSize; + base = x; + break; + case 2: yMin = y; - yMax = y + 1; + yMax = y + fontSize; + base = y; + break; + case 3: + xMin = x - fontSize; + xMax = x; + base = x; + break; } - base = y; - break; - case 3: - xMin = x - ascent; - xMax = x - descent; - if (xMin == xMax) { - // this is a sanity check for a case that shouldn't happen -- but - // if it does happen, we want to avoid dividing by zero later - xMin = x; - xMax = x + 1; + } else { // horizontal writing mode + switch (rot) { + case 0: + yMin = y - ascent; + yMax = y - descent; + if (yMin == yMax) { + // this is a sanity check for a case that shouldn't happen -- but + // if it does happen, we want to avoid dividing by zero later + yMin = y; + yMax = y + 1; + } + base = y; + break; + case 1: + xMin = x + descent; + xMax = x + ascent; + if (xMin == xMax) { + // this is a sanity check for a case that shouldn't happen -- but + // if it does happen, we want to avoid dividing by zero later + xMin = x; + xMax = x + 1; + } + base = x; + break; + case 2: + yMin = y + descent; + yMax = y + ascent; + if (yMin == yMax) { + // this is a sanity check for a case that shouldn't happen -- but + // if it does happen, we want to avoid dividing by zero later + yMin = y; + yMax = y + 1; + } + base = y; + break; + case 3: + xMin = x - ascent; + xMax = x - descent; + if (xMin == xMax) { + // this is a sanity check for a case that shouldn't happen -- but + // if it does happen, we want to avoid dividing by zero later + xMin = x; + xMax = x + 1; + } + base = x; + break; } - base = x; - break; } text = NULL; charcode = NULL; edge = NULL; + charPos = NULL; len = size = 0; spaceAfter = gFalse; next = NULL; @@ -328,47 +358,90 @@ gfree(text); gfree(charcode); gfree(edge); + gfree(charPos); } void TextWord::addChar(GfxState *state, double x, double y, - double dx, double dy, CharCode c, Unicode u) { + double dx, double dy, int charPosA, int charLen, + CharCode c, Unicode u) { + int wMode; + if (len == size) { size += 16; text = (Unicode *)greallocn(text, size, sizeof(Unicode)); charcode = (Unicode *)greallocn(charcode, size, sizeof(CharCode)); edge = (double *)greallocn(edge, (size + 1), sizeof(double)); + charPos = (int *)greallocn(charPos, size + 1, sizeof(int)); } text[len] = u; charcode[len] = c; - switch (rot) { - case 0: - if (len == 0) { - xMin = x; - } - edge[len] = x; - xMax = edge[len+1] = x + dx; - break; - case 1: - if (len == 0) { - yMin = y; - } - edge[len] = y; - yMax = edge[len+1] = y + dy; - break; - case 2: - if (len == 0) { - xMax = x; - } - edge[len] = x; - xMin = edge[len+1] = x + dx; - break; - case 3: - if (len == 0) { - yMax = y; + charPos[len] = charPosA; + charPos[len + 1] = charPosA + charLen; + wMode = font->gfxFont ? font->gfxFont->getWMode() : 0; + if (wMode) { // vertical writing mode + // NB: the rotation value has been incremented by 1 (in + // TextPage::beginWord()) for vertical writing mode + switch (rot) { + case 0: + if (len == 0) { + xMin = x - fontSize; + } + edge[len] = x - fontSize; + xMax = edge[len+1] = x; + break; + case 1: + if (len == 0) { + yMin = y - fontSize; + } + edge[len] = y - fontSize; + yMax = edge[len+1] = y; + break; + case 2: + if (len == 0) { + xMax = x + fontSize; + } + edge[len] = x + fontSize; + xMin = edge[len+1] = x; + break; + case 3: + if (len == 0) { + yMax = y + fontSize; + } + edge[len] = y + fontSize; + yMin = edge[len+1] = y; + break; } - edge[len] = y; - yMin = edge[len+1] = y + dy; - break; + } else { // horizontal writing mode + switch (rot) { + case 0: + if (len == 0) { + xMin = x; + } + edge[len] = x; + xMax = edge[len+1] = x + dx; + break; + case 1: + if (len == 0) { + yMin = y; + } + edge[len] = y; + yMax = edge[len+1] = y + dy; + break; + case 2: + if (len == 0) { + xMax = x; + } + edge[len] = x; + xMin = edge[len+1] = x + dx; + break; + case 3: + if (len == 0) { + yMax = y; + } + edge[len] = y; + yMin = edge[len+1] = y + dy; + break; + } } ++len; } @@ -393,15 +466,17 @@ text = (Unicode *)greallocn(text, size, sizeof(Unicode)); charcode = (CharCode *)greallocn(charcode, (size + 1), sizeof(CharCode)); edge = (double *)greallocn(edge, (size + 1), sizeof(double)); + charPos = (int *)greallocn(charPos, size + 1, sizeof(int)); } for (i = 0; i < word->len; ++i) { text[len + i] = word->text[i]; charcode[len + i] = word->charcode[i]; edge[len + i] = word->edge[i]; + charPos[len + i] = word->charPos[i]; } edge[len + word->len] = word->edge[word->len]; + charPos[len + word->len] = word->charPos[word->len]; len += word->len; - charLen += word->charLen; } inline int TextWord::primaryCmp(TextWord *word) { @@ -590,7 +665,7 @@ // insert the new word if (cursor && wordBaseIdx == cursorBaseIdx && - word->primaryCmp(cursor) > 0) { + word->primaryCmp(cursor) >= 0) { w0 = cursor; w1 = cursor->next; } else { @@ -793,7 +868,7 @@ word0->underlined == word1->underlined && fabs(word0->fontSize - word1->fontSize) < maxWordFontSizeDelta * words->fontSize && - word1->charPos == word0->charPos + word0->charLen) { + word1->charPos[0] == word0->charPos[word0->len]) { word0->merge(word1); word0->next = word1->next; delete word1; @@ -980,7 +1055,7 @@ xMax = blk->xMin + d1 * (blk->xMax - blk->xMin); yMin = blk->yMin + d2 * (blk->yMax - blk->yMin); yMax = blk->yMin + d3 * (blk->yMax - blk->yMin); - base = blk->yMin + base * (blk->yMax - blk->yMin); + base = blk->yMin + d4 * (blk->yMax - blk->yMin); break; case 1: xMin = blk->xMax - d3 * (blk->xMax - blk->xMin); @@ -1204,15 +1279,15 @@ } } -void TextBlock::coalesce(UnicodeMap *uMap) { +void TextBlock::coalesce(UnicodeMap *uMap, double fixedPitch) { TextWord *word0, *word1, *word2, *bestWord0, *bestWord1, *lastWord; TextLine *line, *line0, *line1; int poolMinBaseIdx, startBaseIdx, minBaseIdx, maxBaseIdx; int baseIdx, bestWordBaseIdx, idx0, idx1; double minBase, maxBase; - double fontSize, delta, priDelta, secDelta; + double fontSize, wordSpacing, delta, priDelta, secDelta; TextLine **lineArray; - GBool found; + GBool found, overlap; int col1, col2; int i, j, k; @@ -1222,11 +1297,7 @@ while (word0) { priDelta = dupMaxPriDelta * word0->fontSize; secDelta = dupMaxSecDelta * word0->fontSize; - if (rot == 0 || rot == 3) { - maxBaseIdx = pool->getBaseIdx(word0->base + secDelta); - } else { - maxBaseIdx = pool->getBaseIdx(word0->base - secDelta); - } + maxBaseIdx = pool->getBaseIdx(word0->base + secDelta); found = gFalse; word1 = word2 = NULL; // make gcc happy for (idx1 = idx0; idx1 <= maxBaseIdx; ++idx1) { @@ -1323,6 +1394,7 @@ maxBase = word0->base + maxIntraLineDelta * fontSize; minBaseIdx = pool->getBaseIdx(minBase); maxBaseIdx = pool->getBaseIdx(maxBase); + wordSpacing = fixedPitch ? fixedPitch : maxWordSpacing * fontSize; // find the rest of the words in this line while (1) { @@ -1331,25 +1403,32 @@ // this line bestWordBaseIdx = 0; bestWord0 = bestWord1 = NULL; - for (baseIdx = minBaseIdx; baseIdx <= maxBaseIdx; ++baseIdx) { + overlap = gFalse; + for (baseIdx = minBaseIdx; + !overlap && baseIdx <= maxBaseIdx; + ++baseIdx) { for (word0 = NULL, word1 = pool->getPool(baseIdx); word1; word0 = word1, word1 = word1->next) { if (word1->base >= minBase && - word1->base <= maxBase && - (delta = lastWord->primaryDelta(word1)) >= - minCharSpacing * fontSize) { - if (delta < maxWordSpacing * fontSize && - (!bestWord1 || word1->primaryCmp(bestWord1) < 0)) { - bestWordBaseIdx = baseIdx; - bestWord0 = word0; - bestWord1 = word1; + word1->base <= maxBase) { + delta = lastWord->primaryDelta(word1); + if (delta < minCharSpacing * fontSize) { + overlap = gTrue; + break; + } else { + if (delta < wordSpacing && + (!bestWord1 || word1->primaryCmp(bestWord1) < 0)) { + bestWordBaseIdx = baseIdx; + bestWord0 = word0; + bestWord1 = word1; + } + break; } - break; } } } - if (!bestWord1) { + if (overlap || !bestWord1) { break; } @@ -1396,52 +1475,79 @@ // column assignment nColumns = 0; - for (i = 0; i < nLines; ++i) { - line0 = lineArray[i]; - col1 = 0; - for (j = 0; j < i; ++j) { - line1 = lineArray[j]; - if (line1->primaryDelta(line0) >= 0) { - col2 = line1->col[line1->len] + 1; - } else { - k = 0; // make gcc happy - switch (rot) { - case 0: - for (k = 0; - k < line1->len && - line0->xMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - case 1: - for (k = 0; - k < line1->len && - line0->yMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - case 2: - for (k = 0; - k < line1->len && - line0->xMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - case 3: - for (k = 0; - k < line1->len && - line0->yMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]); - ++k) ; - break; - } - col2 = line1->col[k]; + if (fixedPitch) { + for (i = 0; i < nLines; ++i) { + line0 = lineArray[i]; + col1 = 0; // make gcc happy + switch (rot) { + case 0: + col1 = (int)((line0->xMin - xMin) / fixedPitch + 0.5); + break; + case 1: + col1 = (int)((line0->yMin - yMin) / fixedPitch + 0.5); + break; + case 2: + col1 = (int)((xMax - line0->xMax) / fixedPitch + 0.5); + break; + case 3: + col1 = (int)((yMax - line0->yMax) / fixedPitch + 0.5); + break; } - if (col2 > col1) { - col1 = col2; + for (k = 0; k <= line0->len; ++k) { + line0->col[k] += col1; + } + if (line0->col[line0->len] > nColumns) { + nColumns = line0->col[line0->len]; } } - for (k = 0; k <= line0->len; ++k) { - line0->col[k] += col1; - } - if (line0->col[line0->len] > nColumns) { - nColumns = line0->col[line0->len]; + } else { + for (i = 0; i < nLines; ++i) { + line0 = lineArray[i]; + col1 = 0; + for (j = 0; j < i; ++j) { + line1 = lineArray[j]; + if (line1->primaryDelta(line0) >= 0) { + col2 = line1->col[line1->len] + 1; + } else { + k = 0; // make gcc happy + switch (rot) { + case 0: + for (k = 0; + k < line1->len && + line0->xMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]); + ++k) ; + break; + case 1: + for (k = 0; + k < line1->len && + line0->yMin >= 0.5 * (line1->edge[k] + line1->edge[k+1]); + ++k) ; + break; + case 2: + for (k = 0; + k < line1->len && + line0->xMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]); + ++k) ; + break; + case 3: + for (k = 0; + k < line1->len && + line0->yMax <= 0.5 * (line1->edge[k] + line1->edge[k+1]); + ++k) ; + break; + } + col2 = line1->col[k]; + } + if (col2 > col1) { + col1 = col2; + } + } + for (k = 0; k <= line0->len; ++k) { + line0->col[k] += col1; + } + if (line0->col[line0->len] > nColumns) { + nColumns = line0->col[line0->len]; + } } } gfree(lineArray); @@ -2038,6 +2144,8 @@ gfree(blocks); } deleteGooList(fonts, TextFontInfo); + deleteGooList(underlines, TextUnderline); + deleteGooList(links, TextLink); curWord = NULL; charPos = 0; @@ -2055,6 +2163,8 @@ rawWords = NULL; rawLastWord = NULL; fonts = new GooList(); + underlines = new GooList(); + links = new GooList(); } void TextPage::updateFont(GfxState *state) { @@ -2154,12 +2264,18 @@ m[3] = m2[3]; } if (fabs(m[0] * m[3]) > fabs(m[1] * m[2])) { - rot = (m[3] < 0) ? 0 : 2; + rot = (m[0] > 0 || m[3] < 0) ? 0 : 2; } else { rot = (m[2] > 0) ? 1 : 3; } - curWord = new TextWord(state, rot, x0, y0, charPos, curFont, curFontSize); + // for vertical writing mode, the lines are effectively rotated 90 + // degrees + if (state->getFont()->getWMode()) { + rot = (rot + 1) & 3; + } + + curWord = new TextWord(state, rot, x0, y0, curFont, curFontSize); } void TextPage::addChar(GfxState *state, double x, double y, @@ -2184,7 +2300,9 @@ state->transform(x, y, &x1, &y1); if (x1 + w1 < 0 || x1 > pageWidth || y1 + h1 < 0 || y1 > pageHeight || - w1 > pageWidth || h1 > pageHeight) { + w1 > pageWidth || h1 > pageHeight || + x1 != x1 || y1 != y1 || // IEEE way of checking for isnan + w1 != w1 || h1 != h1) { charPos += nBytes; return; } @@ -2200,9 +2318,6 @@ // break words at space character if (uLen == 1 && u[0] == (Unicode)0x20) { - if (curWord) { - ++curWord->charLen; - } charPos += nBytes; endWord(); return; @@ -2285,27 +2400,28 @@ /* next code is a low surrogate */ Unicode uu = (((u[i] & 0x3ff) << 10) | (u[i+1] & 0x3ff)) + 0x10000; i++; - curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, uu); + curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, charPos, nBytes, c, uu); } else { /* missing low surrogate replace it with REPLACEMENT CHARACTER (U+FFFD) */ - curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, 0xfffd); + curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, charPos, nBytes, c, 0xfffd); } } else if (u[i] >= 0xdc00 && u[i] < 0xe000) { /* invalid low surrogate replace it with REPLACEMENT CHARACTER (U+FFFD) */ - curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, 0xfffd); + curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, charPos, nBytes, c, 0xfffd); } else { - curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, c, u[i]); + curWord->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, charPos, nBytes, c, u[i]); } } } - if (curWord) { - curWord->charLen += nBytes; - } charPos += nBytes; } +void TextPage::incCharCount(int nChars) { + charPos += nChars; +} + void TextPage::endWord() { // This check is needed because Type 3 characters can contain // text-drawing operations (when TextPage is being used via @@ -2349,7 +2465,7 @@ links->append(new TextLink(xMin, yMin, xMax, yMax, link)); } -void TextPage::coalesce(GBool physLayout, GBool doHTML) { +void TextPage::coalesce(GBool physLayout, double fixedPitch, GBool doHTML) { UnicodeMap *uMap; TextPool *pool; TextWord *word0, *word1, *word2; @@ -2377,7 +2493,7 @@ blkList = NULL; lastBlk = NULL; nBlocks = 0; - primaryRot = -1; + primaryRot = 0; #if 0 // for debugging printf("*** initial words ***\n"); @@ -2841,7 +2957,7 @@ //~ addition to primary rotation // coalesce the block, and add it to the list - blk->coalesce(uMap); + blk->coalesce(uMap, fixedPitch); if (lastBlk) { lastBlk->next = blk; } else { @@ -2849,11 +2965,12 @@ } lastBlk = blk; count[rot] += blk->charCount; - if (primaryRot < 0 || count[rot] > count[primaryRot]) { - primaryRot = rot; - } ++nBlocks; } + + if (count[rot] > count[primaryRot]) { + primaryRot = rot; + } } #if 0 // for debugging @@ -2915,75 +3032,108 @@ // sort blocks into xy order for column assignment if (blocks) gfree (blocks); - blocks = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *)); - for (blk = blkList, i = 0; blk; blk = blk->next, ++i) { - blocks[i] = blk; - } - qsort(blocks, nBlocks, sizeof(TextBlock *), &TextBlock::cmpXYPrimaryRot); + if (physLayout && fixedPitch) { - // column assignment - for (i = 0; i < nBlocks; ++i) { - blk0 = blocks[i]; - col1 = 0; - for (j = 0; j < i; ++j) { - blk1 = blocks[j]; - col2 = 0; // make gcc happy + blocks = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *)); + for (blk = blkList, i = 0; blk; blk = blk->next, ++i) { + blocks[i] = blk; + col1 = 0; // make gcc happy switch (primaryRot) { case 0: - if (blk0->xMin > blk1->xMax) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->xMax == blk1->xMin) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->xMin - blk1->xMin) / - (blk1->xMax - blk1->xMin)) * - blk1->nColumns); - } + col1 = (int)(blk->xMin / fixedPitch + 0.5); break; case 1: - if (blk0->yMin > blk1->yMax) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->yMax == blk1->yMin) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->yMin - blk1->yMin) / - (blk1->yMax - blk1->yMin)) * - blk1->nColumns); - } + col1 = (int)(blk->yMin / fixedPitch + 0.5); break; case 2: - if (blk0->xMax < blk1->xMin) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->xMin == blk1->xMax) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->xMax - blk1->xMax) / - (blk1->xMin - blk1->xMax)) * - blk1->nColumns); - } + col1 = (int)((pageWidth - blk->xMax) / fixedPitch + 0.5); break; case 3: - if (blk0->yMax < blk1->yMin) { - col2 = blk1->col + blk1->nColumns + 3; - } else if (blk1->yMin == blk1->yMax) { - col2 = blk1->col; - } else { - col2 = blk1->col + (int)(((blk0->yMax - blk1->yMax) / - (blk1->yMin - blk1->yMax)) * - blk1->nColumns); - } + col1 = (int)((pageHeight - blk->yMax) / fixedPitch + 0.5); break; } - if (col2 > col1) { - col1 = col2; + blk->col = col1; + for (line = blk->lines; line; line = line->next) { + for (j = 0; j <= line->len; ++j) { + line->col[j] += col1; + } } } - blk0->col = col1; - for (line = blk0->lines; line; line = line->next) { - for (j = 0; j <= line->len; ++j) { - line->col[j] += col1; + + } else { + + // sort blocks into xy order for column assignment + blocks = (TextBlock **)gmallocn(nBlocks, sizeof(TextBlock *)); + for (blk = blkList, i = 0; blk; blk = blk->next, ++i) { + blocks[i] = blk; + } + qsort(blocks, nBlocks, sizeof(TextBlock *), &TextBlock::cmpXYPrimaryRot); + + // column assignment + for (i = 0; i < nBlocks; ++i) { + blk0 = blocks[i]; + col1 = 0; + for (j = 0; j < i; ++j) { + blk1 = blocks[j]; + col2 = 0; // make gcc happy + switch (primaryRot) { + case 0: + if (blk0->xMin > blk1->xMax) { + col2 = blk1->col + blk1->nColumns + 3; + } else if (blk1->xMax == blk1->xMin) { + col2 = blk1->col; + } else { + col2 = blk1->col + (int)(((blk0->xMin - blk1->xMin) / + (blk1->xMax - blk1->xMin)) * + blk1->nColumns); + } + break; + case 1: + if (blk0->yMin > blk1->yMax) { + col2 = blk1->col + blk1->nColumns + 3; + } else if (blk1->yMax == blk1->yMin) { + col2 = blk1->col; + } else { + col2 = blk1->col + (int)(((blk0->yMin - blk1->yMin) / + (blk1->yMax - blk1->yMin)) * + blk1->nColumns); + } + break; + case 2: + if (blk0->xMax < blk1->xMin) { + col2 = blk1->col + blk1->nColumns + 3; + } else if (blk1->xMin == blk1->xMax) { + col2 = blk1->col; + } else { + col2 = blk1->col + (int)(((blk0->xMax - blk1->xMax) / + (blk1->xMin - blk1->xMax)) * + blk1->nColumns); + } + break; + case 3: + if (blk0->yMax < blk1->yMin) { + col2 = blk1->col + blk1->nColumns + 3; + } else if (blk1->yMin == blk1->yMax) { + col2 = blk1->col; + } else { + col2 = blk1->col + (int)(((blk0->yMax - blk1->yMax) / + (blk1->yMin - blk1->yMax)) * + blk1->nColumns); + } + break; + } + if (col2 > col1) { + col1 = col2; + } + } + blk0->col = col1; + for (line = blk0->lines; line; line = line->next) { + for (j = 0; j <= line->len; ++j) { + line->col[j] += col1; + } } } + } #if 0 // for debugging @@ -2993,7 +3143,7 @@ blk->rot, blk->xMin, blk->xMax, blk->yMin, blk->yMax, blk->col, blk->nColumns); for (line = blk->lines; line; line = line->next) { - printf(" line:\n"); + printf(" line: col[0]=%d\n", line->col[0]); for (word0 = line->words; word0; word0 = word0->next) { printf(" word: x=%.2f..%.2f y=%.2f..%.2f base=%.2f fontSize=%.2f space=%d: '", word0->xMin, word0->xMax, word0->yMin, word0->yMax, @@ -3393,6 +3543,7 @@ GBool startAtTop, GBool stopAtBottom, GBool startAtLast, GBool stopAtLast, GBool caseSensitive, GBool backward, + GBool wholeWord, double *xMin, double *yMin, double *xMax, double *yMax) { TextBlock *blk; @@ -3450,25 +3601,35 @@ blk = blocks[i]; // check: is the block above the top limit? - if (!startAtTop && (backward ? blk->yMin > yStart : blk->yMax < yStart)) { + // (this only works if the page's primary rotation is zero -- + // otherwise the blocks won't be sorted in the useful order) + if (!startAtTop && primaryRot == 0 && + (backward ? blk->yMin > yStart : blk->yMax < yStart)) { continue; } // check: is the block below the bottom limit? - if (!stopAtBottom && (backward ? blk->yMax < yStop : blk->yMin > yStop)) { + // (this only works if the page's primary rotation is zero -- + // otherwise the blocks won't be sorted in the useful order) + if (!stopAtBottom && primaryRot == 0 && + (backward ? blk->yMax < yStop : blk->yMin > yStop)) { break; } for (line = blk->lines; line; line = line->next) { // check: is the line above the top limit? - if (!startAtTop && + // (this only works if the page's primary rotation is zero -- + // otherwise the lines won't be sorted in the useful order) + if (!startAtTop && primaryRot == 0 && (backward ? line->yMin > yStart : line->yMin < yStart)) { continue; } // check: is the line below the bottom limit? - if (!stopAtBottom && + // (this only works if the page's primary rotation is zero -- + // otherwise the lines won't be sorted in the useful order) + if (!stopAtBottom && primaryRot == 0 && (backward ? line->yMin < yStop : line->yMin > yStop)) { continue; } @@ -3487,9 +3648,9 @@ for (k = 0; k < m; ++k) { txt[k] = unicodeToUpper(line->normalized[k]); } - } else { + } else { txt = line->normalized; - } + } // search each position in this line j = backward ? m - len : 0; @@ -4009,7 +4170,9 @@ // not a table else { page->dumpFragment (frag->line->text + frag->start, frag->len, uMap, s); - s->append (eol, eolLen); + if (i < nFrags - 1) { + s->append (eol, eolLen); + } } } @@ -4596,10 +4759,9 @@ return gFalse; } - //~ this doesn't correctly handle: - //~ - ranges split across multiple lines (the highlighted region - //~ is the bounding box of all the parts of the range) - //~ - cases where characters don't convert one-to-one into Unicode + //~ this doesn't correctly handle ranges split across multiple lines + //~ (the highlighted region is the bounding box of all the parts of + //~ the range) first = gTrue; xMin0 = xMax0 = yMin0 = yMax0 = 0; // make gcc happy xMin1 = xMax1 = yMin1 = yMax1 = 0; // make gcc happy @@ -4607,16 +4769,14 @@ blk = blocks[i]; for (line = blk->lines; line; line = line->next) { for (word = line->words; word; word = word->next) { - if (pos < word->charPos + word->charLen && - word->charPos < pos + length) { - j0 = pos - word->charPos; - if (j0 < 0) { - j0 = 0; - } - j1 = pos + length - 1 - word->charPos; - if (j1 >= word->len) { - j1 = word->len - 1; - } + if (pos < word->charPos[word->len] && + pos + length > word->charPos[0]) { + for (j0 = 0; + j0 < word->len && pos >= word->charPos[j0 + 1]; + ++j0) ; + for (j1 = word->len - 1; + j1 > j0 && pos + length <= word->charPos[j1]; + --j1) ; switch (line->rot) { case 0: xMin1 = word->edge[j0]; @@ -4720,7 +4880,9 @@ delete s; if (word->next && fabs(word->next->base - word->base) < - maxIntraLineDelta * word->fontSize) { + maxIntraLineDelta * word->fontSize && + word->next->xMin > + word->xMax - minDupBreakOverlap * word->fontSize) { if (word->next->xMin > word->xMax + minWordSpacing * word->fontSize) { (*outputFunc)(outputStream, space, spaceLen); } @@ -4970,7 +5132,9 @@ } i = j; // output a right-to-left section - for (j = i; j < len && !unicodeTypeL(text[j]); ++j) ; + for (j = i; + j < len && !(unicodeTypeL(text[j]) || unicodeTypeNum(text[j])); + ++j) ; if (j > i) { s->append(rle, rleLen); for (k = j - 1; k >= i; --k) { @@ -4985,11 +5149,17 @@ } else { + // Note: This code treats numeric characters (European and + // Arabic/Indic) as left-to-right, which isn't strictly correct + // (incurs extra LRE/POPDF pairs), but does produce correct + // visual formatting. s->append(rle, rleLen); i = len - 1; while (i >= 0) { // output a right-to-left section - for (j = i; j >= 0 && !unicodeTypeL(text[j]); --j) ; + for (j = i; + j >= 0 && !(unicodeTypeL(text[j]) || unicodeTypeNum(text[j])); + --j) ; for (k = i; k > j; --k) { n = uMap->mapUnicode(text[k], buf, sizeof(buf)); s->append(buf, n); @@ -5037,7 +5207,7 @@ out->incRefCnt(); text = out; actualText = NULL; - actualTextBMCLevel = 0; + actualTextNBytes = 0; } ActualText::~ActualText() { @@ -5049,112 +5219,89 @@ void ActualText::addChar(GfxState *state, double x, double y, double dx, double dy, CharCode c, int nBytes, Unicode *u, int uLen) { - if (actualTextBMCLevel == 0) { + if (!actualText) { text->addChar(state, x, y, dx, dy, c, nBytes, u, uLen); - } else { - // Inside ActualText span. - if (newActualTextSpan) { - actualText_x = x; - actualText_y = y; - actualText_dx = dx; - actualText_dy = dy; - newActualTextSpan = gFalse; - } else { - if (x < actualText_x) - actualText_x = x; - if (y < actualText_y) - actualText_y = y; - if (x + dx > actualText_x + actualText_dx) - actualText_dx = x + dx - actualText_x; - if (y + dy > actualText_y + actualText_dy) - actualText_dy = y + dy - actualText_y; - } - } -} - -void ActualText::beginMC(Dict *properties) { - if (actualTextBMCLevel > 0) { - // Already inside a ActualText span. - actualTextBMCLevel++; return; } - Object obj; - if (properties && properties->lookup("ActualText", &obj)) { - if (obj.isString()) { - actualText = obj.getString(); - actualTextBMCLevel = 1; - newActualTextSpan = gTrue; - } + // Inside ActualText span. + if (!actualTextNBytes) { + actualTextX0 = x; + actualTextY0 = y; } + actualTextX1 = x + dx; + actualTextY1 = y + dy; + actualTextNBytes += nBytes; } -void ActualText::endMC(GfxState *state) { - char *uniString = NULL; - Unicode *uni; - int length, i; - - if (actualTextBMCLevel > 0) { - actualTextBMCLevel--; - if (actualTextBMCLevel == 0) { - // ActualText span closed. Output the span text and the - // extents of all the glyphs inside the span - - if (newActualTextSpan) { - // No content inside span. - actualText_x = state->getCurX(); - actualText_y = state->getCurY(); - actualText_dx = 0; - actualText_dy = 0; - } - - if (!actualText->hasUnicodeMarker()) { - if (actualText->getLength() > 0) { - //non-unicode string -- assume pdfDocEncoding and - //try to convert to UTF16BE - uniString = pdfDocEncodingToUTF16(actualText, &length); - } else { - length = 0; - } +void ActualText::begin(GfxState *state, GooString *text) { + if (actualText) + delete actualText; + actualText = new GooString(text); + actualTextNBytes = 0; +} + +void ActualText::end(GfxState *state) { + // ActualText span closed. Output the span text and the + // extents of all the glyphs inside the span + + if (actualTextNBytes) { + char *uniString = NULL; + Unicode *uni; + int length, i; + + if (!actualText->hasUnicodeMarker()) { + if (actualText->getLength() > 0) { + //non-unicode string -- assume pdfDocEncoding and + //try to convert to UTF16BE + uniString = pdfDocEncodingToUTF16(actualText, &length); } else { - uniString = actualText->getCString(); - length = actualText->getLength(); + length = 0; } - - if (length < 3) - length = 0; - else - length = length/2 - 1; - uni = new Unicode[length]; - for (i = 0 ; i < length; i++) - uni[i] = ((uniString[2 + i*2] & 0xff)<<8)|(uniString[3 + i*2] & 0xff); - - text->addChar(state, - actualText_x, actualText_y, - actualText_dx, actualText_dy, - 0, 1, uni, length); - - delete [] uni; - if (!actualText->hasUnicodeMarker()) - delete [] uniString; - delete actualText; - actualText = NULL; + } else { + uniString = actualText->getCString(); + length = actualText->getLength(); } + + if (length < 3) + length = 0; + else + length = length/2 - 1; + uni = new Unicode[length]; + for (i = 0 ; i < length; i++) + uni[i] = ((uniString[2 + i*2] & 0xff)<<8)|(uniString[3 + i*2] & 0xff); + + // now that we have the position info for all of the text inside + // the marked content span, we feed the "ActualText" back through + // text->addChar() + text->addChar(state, actualTextX0, actualTextY0, + actualTextX1 - actualTextX0, actualTextY1 - actualTextY0, + 0, actualTextNBytes, uni, length); + + delete [] uni; + if (!actualText->hasUnicodeMarker()) + delete [] uniString; } + + delete actualText; + actualText = NULL; + actualTextNBytes = 0; } //------------------------------------------------------------------------ // TextOutputDev //------------------------------------------------------------------------ -static void TextOutputDev_outputToFile(void *stream, char *text, int len) { +static void TextOutputDev_outputToFile(void *stream, const char *text, int len) { fwrite(text, 1, len, (FILE *)stream); } TextOutputDev::TextOutputDev(char *fileName, GBool physLayoutA, - GBool rawOrderA, GBool append) { + double fixedPitchA, GBool rawOrderA, + GBool append) { text = NULL; physLayout = physLayoutA; + fixedPitch = physLayout ? fixedPitchA : 0; rawOrder = rawOrderA; doHTML = gFalse; ok = gTrue; @@ -5171,7 +5318,7 @@ } else if ((outputStream = fopen(fileName, append ? "ab" : "wb"))) { needClose = gTrue; } else { - error(-1, "Couldn't open text file '%s'", fileName); + error(errIO, -1, "Couldn't open text file '{0:s}'", fileName); ok = gFalse; actualText = NULL; return; @@ -5187,11 +5334,13 @@ } TextOutputDev::TextOutputDev(TextOutputFunc func, void *stream, - GBool physLayoutA, GBool rawOrderA) { + GBool physLayoutA, double fixedPitchA, + GBool rawOrderA) { outputFunc = func; outputStream = stream; needClose = gFalse; physLayout = physLayoutA; + fixedPitch = physLayout ? fixedPitchA : 0; rawOrder = rawOrderA; doHTML = gFalse; text = new TextPage(rawOrderA); @@ -5218,12 +5367,16 @@ void TextOutputDev::endPage() { text->endPage(); - text->coalesce(physLayout, doHTML); + text->coalesce(physLayout, fixedPitch, doHTML); if (outputStream) { text->dump(outputStream, outputFunc, physLayout); } } +void TextOutputDev::restoreState(GfxState *state) { + text->updateFont(state); +} + void TextOutputDev::updateFont(GfxState *state) { text->updateFont(state); } @@ -5241,14 +5394,18 @@ actualText->addChar(state, x, y, dx, dy, c, nBytes, u, uLen); } -void TextOutputDev::beginMarkedContent(char *name, Dict *properties) +void TextOutputDev::incCharCount(int nChars) { + text->incCharCount(nChars); +} + +void TextOutputDev::beginActualText(GfxState *state, GooString *text) { - actualText->beginMC(properties); + actualText->begin(state, text); } -void TextOutputDev::endMarkedContent(GfxState *state) +void TextOutputDev::endActualText(GfxState *state) { - actualText->endMC(state); + actualText->end(state); } void TextOutputDev::stroke(GfxState *state) { @@ -5351,7 +5508,7 @@ fill(state); } -void TextOutputDev::processLink(AnnotLink *link, Catalog * /*catalog*/) { +void TextOutputDev::processLink(AnnotLink *link) { double x1, y1, x2, y2; int xMin, yMin, xMax, yMax, x, y; @@ -5402,10 +5559,12 @@ GBool startAtTop, GBool stopAtBottom, GBool startAtLast, GBool stopAtLast, GBool caseSensitive, GBool backward, + GBool wholeWord, double *xMin, double *yMin, double *xMax, double *yMax) { return text->findText(s, len, startAtTop, stopAtBottom, - startAtLast, stopAtLast, caseSensitive, backward, + startAtLast, stopAtLast, + caseSensitive, backward, wholeWord, xMin, yMin, xMax, yMax); } diff -Nru poppler-0.18.4/poppler/TextOutputDev.h poppler-0.20.5/poppler/TextOutputDev.h --- poppler-0.18.4/poppler/TextOutputDev.h 2011-11-22 21:33:16.000000000 +0000 +++ poppler-0.20.5/poppler/TextOutputDev.h 2012-08-30 21:16:11.000000000 +0000 @@ -59,7 +59,7 @@ //------------------------------------------------------------------------ -typedef void (*TextOutputFunc)(void *stream, char *text, int len); +typedef void (*TextOutputFunc)(void *stream, const char *text, int len); enum SelectionStyle { selectionStyleGlyph, @@ -114,14 +114,15 @@ // Constructor. TextWord(GfxState *state, int rotA, double x0, double y0, - int charPosA, TextFontInfo *fontA, double fontSize); + TextFontInfo *fontA, double fontSize); // Destructor. ~TextWord(); // Add a character to the word. void addChar(GfxState *state, double x, double y, - double dx, double dy, CharCode c, Unicode u); + double dx, double dy, int charPosA, int charLen, + CharCode c, Unicode u); // Merge onto the end of . void merge(TextWord *word); @@ -159,8 +160,8 @@ double *xMaxA, double *yMaxA); double getFontSize() { return fontSize; } int getRotation() { return rot; } - int getCharPos() { return charPos; } - int getCharLen() { return charLen; } + int getCharPos() { return charPos[0]; } + int getCharLen() { return charPos[len] - charPos[0]; } GBool getSpaceAfter() { return spaceAfter; } #endif GBool isUnderlined() { return underlined; } @@ -180,11 +181,11 @@ CharCode *charcode; // glyph indices double *edge; // "near" edge x or y coord of each char // (plus one extra entry for the last char) - int len; // length of text and edge arrays - int size; // size of text and edge arrays - int charPos; // character position (within content stream) - int charLen; // number of content stream characters in - // this word + int *charPos; // character position (within content stream) + // of each char (plus one extra entry for + // the last char) + int len; // length of text/edge/charPos arrays + int size; // size of text/edge/charPos arrays TextFontInfo *font; // font information double fontSize; // font size GBool spaceAfter; // set if there is a space between this @@ -332,7 +333,7 @@ void addWord(TextWord *word); - void coalesce(UnicodeMap *uMap); + void coalesce(UnicodeMap *uMap, double fixedPitch); // Update this block's priMin and priMax values, looking at . void updatePriMinMax(TextBlock *blk); @@ -504,6 +505,9 @@ double dx, double dy, CharCode c, int nBytes, Unicode *u, int uLen); + // Add invisible characters. + void incCharCount(int nChars); + // End the current word, sorting it into the list of words. void endWord(); @@ -517,7 +521,7 @@ void addLink(int xMin, int yMin, int xMax, int yMax, AnnotLink *link); // Coalesce strings that look like parts of the same line. - void coalesce(GBool physLayout, GBool doHTML); + void coalesce(GBool physLayout, double fixedPitch, GBool doHTML); // Find a string. If is true, starts looking at the // top of the page; else if is true, starts looking @@ -530,6 +534,7 @@ GBool startAtTop, GBool stopAtBottom, GBool startAtLast, GBool stopAtLast, GBool caseSensitive, GBool backward, + GBool wholeWord, double *xMin, double *yMin, double *xMax, double *yMax); @@ -644,17 +649,18 @@ void addChar(GfxState *state, double x, double y, double dx, double dy, CharCode c, int nBytes, Unicode *u, int uLen); - void beginMC(Dict *properties); - void endMC(GfxState *state); + void begin(GfxState *state, GooString *text); + void end(GfxState *state); private: TextPage *text; - int actualTextBMCLevel; // > 0 when inside ActualText span. Incremented - // for each nested BMC inside the span. + GooString *actualText; // replacement text for the span - GBool newActualTextSpan; // true at start of span. used to init the extent - double actualText_x, actualText_y; // extent of the text inside the span - double actualText_dx, actualText_dy; + double actualTextX0; + double actualTextY0; + double actualTextX1; + double actualTextY1; + int actualTextNBytes; }; @@ -671,14 +677,16 @@ // is maintained. If is true, the text is kept in // content stream order. TextOutputDev(char *fileName, GBool physLayoutA, - GBool rawOrderA, GBool append); + double fixedPitchA, GBool rawOrderA, + GBool append); // Create a TextOutputDev which will write to a generic stream. If // is true, the original physical layout of the text // is maintained. If is true, the text is kept in // content stream order. TextOutputDev(TextOutputFunc func, void *stream, - GBool physLayoutA, GBool rawOrderA); + GBool physLayoutA, double fixedPitchA, + GBool rawOrderA); // Destructor. virtual ~TextOutputDev(); @@ -702,6 +710,10 @@ // Does this device need non-text content? virtual GBool needNonText() { return gFalse; } + // Does this device require incCharCount to be called for text on + // non-shown layers? + virtual GBool needCharCount() { return gTrue; } + //----- initialization and control // Start a page. @@ -710,6 +722,9 @@ // End a page. virtual void endPage(); + //----- save/restore graphics state + virtual void restoreState(GfxState *state); + //----- update text state virtual void updateFont(GfxState *state); @@ -720,10 +735,9 @@ double dx, double dy, double originX, double originY, CharCode c, int nBytes, Unicode *u, int uLen); - - //----- grouping operators - virtual void beginMarkedContent(char *name, Dict *properties); - virtual void endMarkedContent(GfxState *state); + virtual void incCharCount(int nChars); + virtual void beginActualText(GfxState *state, GooString *text); + virtual void endActualText(GfxState *state); //----- path painting virtual void stroke(GfxState *state); @@ -731,7 +745,7 @@ virtual void eoFill(GfxState *state); //----- link borders - virtual void processLink(AnnotLink *link, Catalog *catalog); + virtual void processLink(AnnotLink *link); //----- special access @@ -746,6 +760,7 @@ GBool startAtTop, GBool stopAtBottom, GBool startAtLast, GBool stopAtLast, GBool caseSensitive, GBool backward, + GBool wholeWord, double *xMin, double *yMin, double *xMax, double *yMax); @@ -796,6 +811,9 @@ TextPage *text; // text for the current page GBool physLayout; // maintain original physical layout when // dumping text + double fixedPitch; // if physLayout is true and this is non-zero, + // assume fixed-pitch characters with this + // width GBool rawOrder; // keep text in content stream order GBool doHTML; // extra processing for HTML conversion GBool ok; // set up ok? diff -Nru poppler-0.18.4/poppler/UnicodeMap.cc poppler-0.20.5/poppler/UnicodeMap.cc --- poppler-0.18.4/poppler/UnicodeMap.cc 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/UnicodeMap.cc 2012-05-10 20:05:44.000000000 +0000 @@ -60,8 +60,9 @@ char *tokptr; if (!(f = globalParams->getUnicodeMapFile(encodingNameA))) { - error(-1, "Couldn't find unicodeMap file for the '%s' encoding", - encodingNameA->getCString()); + error(errSyntaxError, -1, + "Couldn't find unicodeMap file for the '{0:t}' encoding", + encodingNameA); return NULL; } @@ -107,12 +108,14 @@ eMap->nBytes = nBytes; ++map->eMapsLen; } else { - error(-1, "Bad line (%d) in unicodeMap file for the '%s' encoding", - line, encodingNameA->getCString()); + error(errSyntaxError, -1, + "Bad line ({0:d}) in unicodeMap file for the '{1:t}' encoding", + line, encodingNameA); } } else { - error(-1, "Bad line (%d) in unicodeMap file for the '%s' encoding", - line, encodingNameA->getCString()); + error(errSyntaxError, -1, + "Bad line ({0:d}) in unicodeMap file for the '{1:t}' encoding", + line, encodingNameA); } ++line; } @@ -136,7 +139,7 @@ #endif } -UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA, +UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, UnicodeMapRange *rangesA, int lenA) { encodingName = new GooString(encodingNameA); unicodeOut = unicodeOutA; @@ -151,7 +154,7 @@ #endif } -UnicodeMap::UnicodeMap(char *encodingNameA, GBool unicodeOutA, +UnicodeMap::UnicodeMap(const char *encodingNameA, GBool unicodeOutA, UnicodeMapFunc funcA) { encodingName = new GooString(encodingNameA); unicodeOut = unicodeOutA; diff -Nru poppler-0.18.4/poppler/UnicodeMap.h poppler-0.20.5/poppler/UnicodeMap.h --- poppler-0.18.4/poppler/UnicodeMap.h 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/UnicodeMap.h 2012-05-10 20:05:44.000000000 +0000 @@ -52,12 +52,12 @@ static UnicodeMap *parse(GooString *encodingNameA); // Create a resident UnicodeMap. - UnicodeMap(char *encodingNameA, GBool unicodeOutA, + UnicodeMap(const char *encodingNameA, GBool unicodeOutA, UnicodeMapRange *rangesA, int lenA); // Create a resident UnicodeMap that uses a function instead of a // list of ranges. - UnicodeMap(char *encodingNameA, GBool unicodeOutA, + UnicodeMap(const char *encodingNameA, GBool unicodeOutA, UnicodeMapFunc funcA); ~UnicodeMap(); diff -Nru poppler-0.18.4/poppler/UnicodeMapTables.h poppler-0.20.5/poppler/UnicodeMapTables.h --- poppler-0.18.4/poppler/UnicodeMapTables.h 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/UnicodeMapTables.h 2012-05-10 20:05:44.000000000 +0000 @@ -2,7 +2,7 @@ // // UnicodeMapTables.h // -// Copyright 2001-2003 Glyph & Cog, LLC +// Copyright 2001-2009 Glyph & Cog, LLC // //======================================================================== @@ -64,7 +64,9 @@ { 0xfb01, 0xfb01, 0x6669, 2 }, { 0xfb02, 0xfb02, 0x666c, 2 }, { 0xfb03, 0xfb03, 0x666669, 3 }, - { 0xfb04, 0xfb04, 0x66666c, 3 } + { 0xfb04, 0xfb04, 0x66666c, 3 }, + { 0xfb05, 0xfb05, 0x7374, 2 }, + { 0xfb06, 0xfb06, 0x7374, 2 } }; #define latin1UnicodeMapLen (sizeof(latin1UnicodeMapRanges) / sizeof(UnicodeMapRange)) @@ -197,7 +199,9 @@ { 0xfb01, 0xfb01, 0x6669, 2 }, { 0xfb02, 0xfb02, 0x666c, 2 }, { 0xfb03, 0xfb03, 0x666669, 3 }, - { 0xfb04, 0xfb04, 0x66666c, 3 } + { 0xfb04, 0xfb04, 0x66666c, 3 }, + { 0xfb05, 0xfb05, 0x7374, 2 }, + { 0xfb06, 0xfb06, 0x7374, 2 } }; #define ascii7UnicodeMapLen (sizeof(ascii7UnicodeMapRanges) / sizeof(UnicodeMapRange)) diff -Nru poppler-0.18.4/poppler/UnicodeTypeTable.cc poppler-0.20.5/poppler/UnicodeTypeTable.cc --- poppler-0.18.4/poppler/UnicodeTypeTable.cc 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/UnicodeTypeTable.cc 2012-05-10 20:05:44.000000000 +0000 @@ -16,6 +16,7 @@ // Copyright (C) 2006, 2007 Ed Catmur // Copyright (C) 2007 Jeff Muizelaar // Copyright (C) 2008 Albert Astals Cid +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -28,8 +29,8 @@ #include "goo/gmem.h" struct UnicodeMapTableEntry { - char *vector; - char type; + const char *vector; + const char type; }; struct UnicodeCaseTableVector { @@ -37,21 +38,21 @@ }; static const UnicodeMapTableEntry typeTable[256] = { - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNLNNNNLNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL", 'X' }, + { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN###NNNNN################NNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#N####NNNNLNNNNN####NLNNN#LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLL", 'X' }, { NULL, 'L' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLNNNNNNNNNNNNNNLLNNNNNNNNNNNNNNLLLLLNNNNNNNNNLNNNNNNNNNNNNNNNNN", 'X' }, { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLNNNNNNNNNNNLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRNRNNRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' }, - { "RRRRNNNNNNNNNRNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNRNNNNNNNRRNNNNNNNRRNNNNNNNNNNRRRRRR", 'X' }, + { "RRRR#########RNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNN####################RRRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNRNNNNNNNRRNNNNNNNRR##########RRRRRR", 'X' }, { "RRRRRRRRRRRRRRNNRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNNNNNNNNNNRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, { NULL, 'N' }, - { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLNNNNLLLLLLLLLLLLLNNLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNLLLLLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLNNLLLLLLLNNNNN", 'X' }, - { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLNNNNNNNNNNNNNNNN", 'X' }, - { "NNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLNLNNNLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNLLLLL", 'X' }, + { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLNNNNLLLLLLLLLLLLLNNLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNLLLLLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLL##LLLLLLLNNNNN", 'X' }, + { "NNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLNNNNNNNNLLLLNLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLL##NNNNNNNNNNNNNN", 'X' }, + { "NNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLNLNNNLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNN#NLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLLLLLLLNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNNNNNNNLLLLLLLNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNNNNLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, + { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNN#####LLLLLLLNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLNNNNNNNNNLLLLLLLLLLNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLNLNLNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNLNNNNNLNNLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNLNNNNNNLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, { NULL, 'L' }, @@ -60,7 +61,7 @@ { NULL, 'L' }, { NULL, 'L' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, - { "LLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLNLLNNNNNNNNNNNLLLLLLLNLNLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' }, + { "LLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNLLLLLLLLNLLNNNNNNNNNNNLLLLLLL#LNLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' }, { "NNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL", 'X' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLNNNNNLLLLLLNLLLLLLNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, { NULL, 'L' }, @@ -69,11 +70,11 @@ { NULL, 'L' }, { NULL, 'L' }, { "LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNLNNNLLLLLLLLLLLNNNLLLLLLLLLLLLNNNNLLLLLLLLLLLLLNNNLLLLLLLLLLLLLNNN", 'X' }, - { "NNNNNNNNNNNNNNLRNNNNNNNNNNNNNNNNNNNNNNNNNNLRNLRNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNNNNLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNLNNNNLNNLLLLLLLLLLNLNNNLLLLLNNNNNNLNLNLNLLLLNLLLNLLLLLLLNNLLLLNNNNNLLLLLNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { NULL, 'N' }, + { "NNNNNNNNNNNNNNLRNNNNNNNNNNNNNNNNNNNNNNNNNNLRNLRN#####NNNNNNNNNNNNNNN#NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#L##########NNNL############NNN###################################NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, + { "NNLNNNNLNNLLLLLLLLLLNLNNNLLLLLNNNNNNLNLNLNLLLL#LLLNLLLLLLLNNLLLLNNNNNLLLLLNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, + { "NNNNNNNNNNNNNNNNNN##NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' }, + { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN####################LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNN", 'X' }, { NULL, 'N' }, { NULL, 'N' }, { NULL, 'N' }, @@ -288,11 +289,11 @@ { NULL, 'L' }, { NULL, 'L' }, { NULL, 'L' }, - { "LLLLLLLLLLLLLLLLLLLLLLLLRRRRRRNRRRRRRRRRRNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' }, + { "LLLLLLLLLLLLLLLLLLLLLLLLRRRRRRNRRRRRRRRRR#RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR", 'X' }, { NULL, 'R' }, { "RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' }, - { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNLL", 'X' } + { "NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN#N#NN#NNNNNNNNN#NN##NNNNN##NRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRNNN", 'X' }, + { "NNN###NNNNN################NNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLL#####NNN##NNNNNNNNNNNNNNNNNNNNNNNLL", 'X' } }; static const UnicodeCaseTableVector caseTable00 = {{ @@ -951,6 +952,25 @@ return getType(c) == 'R'; } +GBool unicodeTypeNum(Unicode c) { + return getType(c) == '#'; +} + +GBool unicodeTypeAlphaNum(Unicode c) { + char t; + + t = getType(c); + return t == 'L' || t == 'R' || t == '#'; +} + +#define UNICODE_ALPHABETIC_PRESENTATION_BLOCK_BEGIN 0xFB00 +#define UNICODE_ALPHABETIC_PRESENTATION_BLOCK_END 0xFB4F + +GBool unicodeIsAlphabeticPresentationForm(Unicode c) { + return c >= UNICODE_ALPHABETIC_PRESENTATION_BLOCK_BEGIN + && c <= UNICODE_ALPHABETIC_PRESENTATION_BLOCK_END; +} + Unicode unicodeToUpper(Unicode c) { int i; diff -Nru poppler-0.18.4/poppler/UnicodeTypeTable.h poppler-0.20.5/poppler/UnicodeTypeTable.h --- poppler-0.18.4/poppler/UnicodeTypeTable.h 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/UnicodeTypeTable.h 2012-05-10 20:05:44.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2006 Ed Catmur +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -29,6 +30,12 @@ extern GBool unicodeTypeR(Unicode c); +extern GBool unicodeTypeNum(Unicode c); + +extern GBool unicodeTypeAlphaNum(Unicode c); + +extern GBool unicodeIsAlphabeticPresentationForm(Unicode c); + extern Unicode unicodeToUpper(Unicode c); extern Unicode *unicodeNormalizeNFKC(Unicode *in, int len, diff -Nru poppler-0.18.4/poppler/XRef.cc poppler-0.20.5/poppler/XRef.cc --- poppler-0.18.4/poppler/XRef.cc 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/XRef.cc 2012-09-26 13:13:16.000000000 +0000 @@ -15,11 +15,13 @@ // // Copyright (C) 2005 Dan Sheridan // Copyright (C) 2005 Brad Hards -// Copyright (C) 2006, 2008, 2010 Albert Astals Cid +// Copyright (C) 2006, 2008, 2010, 2012 Albert Astals Cid // Copyright (C) 2007-2008 Julien Rebetez // Copyright (C) 2007 Carlos Garcia Campos // Copyright (C) 2009, 2010 Ilya Gorenbein -// Copyright 2010 Hib Eris +// Copyright (C) 2010 Hib Eris +// Copyright (C) 2012 Thomas Freitag +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -166,7 +168,7 @@ // in the 'new Object[nObjects]' call (Acrobat apparently limits // object streams to 100-200 objects) if (nObjects > 1000000) { - error(-1, "Too many objects in an object stream"); + error(errSyntaxError, -1, "Too many objects in an object stream"); goto err1; } objs = new Object[nObjects]; @@ -265,12 +267,19 @@ objStrs = new PopplerCache(5); mainXRefEntriesOffset = 0; xRefStream = gFalse; + rootNum = -1; } XRef::XRef() { init(); } +XRef::XRef(Object *trailerDictA) { + init(); + if (trailerDictA->isDict()) + trailerDict.initDict(trailerDictA->getDict()); +} + XRef::XRef(BaseStream *strA, Guint pos, Guint mainXRefEntriesOffsetA, GBool *wasReconstructed, GBool reconstruct) { Object obj; @@ -319,7 +328,7 @@ // set size to (at least) the size specified in trailer dict trailerDict.dictLookupNF("Size", &obj); if (!obj.isInt()) { - error(-1, "No valid XRef size in trailer"); + error(errSyntaxWarning, -1, "No valid XRef size in trailer"); } else { if (obj.getInt() > size) { if (resize(obj.getInt()) != obj.getInt()) { @@ -430,7 +439,7 @@ new Lexer(NULL, str->makeSubStream(start + *pos, gFalse, 0, &obj)), gTrue); - parser->getObj(&obj); + parser->getObj(&obj, gTrue); // parse an old-style xref table if (obj.isCmd("xref")) { @@ -440,11 +449,11 @@ // parse an xref stream } else if (obj.isInt()) { obj.free(); - if (!parser->getObj(&obj)->isInt()) { + if (!parser->getObj(&obj, gTrue)->isInt()) { goto err1; } obj.free(); - if (!parser->getObj(&obj)->isCmd("obj")) { + if (!parser->getObj(&obj, gTrue)->isCmd("obj")) { goto err1; } obj.free(); @@ -479,7 +488,7 @@ int first, n, i; while (1) { - parser->getObj(&obj); + parser->getObj(&obj, gTrue); if (obj.isCmd("trailer")) { obj.free(); break; @@ -489,7 +498,7 @@ } first = obj.getInt(); obj.free(); - if (!parser->getObj(&obj)->isInt()) { + if (!parser->getObj(&obj, gTrue)->isInt()) { goto err1; } n = obj.getInt(); @@ -499,24 +508,24 @@ } if (first + n > size) { if (resize(first + n) != first + n) { - error(-1, "Invalid 'obj' parameters'"); + error(errSyntaxError, -1, "Invalid 'obj' parameters'"); goto err0; } } for (i = first; i < first + n; ++i) { - if (!parser->getObj(&obj)->isInt()) { + if (!parser->getObj(&obj, gTrue)->isInt()) { goto err1; } entry.offset = (Guint)obj.getInt(); obj.free(); - if (!parser->getObj(&obj)->isInt()) { + if (!parser->getObj(&obj, gTrue)->isInt()) { goto err1; } entry.gen = obj.getInt(); entry.obj.initNull (); entry.updated = false; obj.free(); - parser->getObj(&obj); + parser->getObj(&obj, gTrue); if (obj.isCmd("n")) { entry.type = xrefEntryUncompressed; } else if (obj.isCmd("f")) { @@ -549,13 +558,25 @@ // get the 'Prev' pointer obj.getDict()->lookupNF("Prev", &obj2); if (obj2.isInt()) { - *pos = (Guint)obj2.getInt(); - more = gTrue; + pos2 = (Guint)obj2.getInt(); + if (pos2 != *pos) { + *pos = pos2; + more = gTrue; + } else { + error(errSyntaxWarning, -1, "Infinite loop in xref table"); + more = gFalse; + } } else if (obj2.isRef()) { // certain buggy PDF generators generate "/Prev NNN 0 R" instead // of "/Prev NNN" - *pos = (Guint)obj2.getRefNum(); - more = gTrue; + pos2 = (Guint)obj2.getRefNum(); + if (pos2 != *pos) { + *pos = pos2; + more = gTrue; + } else { + error(errSyntaxWarning, -1, "Infinite loop in xref table"); + more = gFalse; + } } else { more = gFalse; } @@ -614,7 +635,7 @@ } if (newSize > size) { if (resize(newSize) != newSize) { - error(-1, "Invalid 'size' parameter"); + error(errSyntaxError, -1, "Invalid 'size' parameter"); goto err0; } } @@ -696,7 +717,11 @@ } if (first + n > size) { if (resize(first + n) != size) { - error(-1, "Invalid 'size' inside xref table"); + error(errSyntaxError, -1, "Invalid 'size' inside xref table"); + return gFalse; + } + if (first + n > size) { + error(errSyntaxError, -1, "Invalid 'first' or 'n' inside xref table"); return gFalse; } } @@ -750,7 +775,7 @@ } // Attempt to construct an xref table for a damaged file. -GBool XRef::constructXRef(GBool *wasReconstructed) { +GBool XRef::constructXRef(GBool *wasReconstructed, GBool needCatalogDict) { Parser *parser; Object newTrailerDict, obj; char buf[256]; @@ -769,7 +794,6 @@ size = 0; entries = NULL; - error(-1, "PDF file is damaged - attempting to reconstruct xref table..."); gotRoot = gFalse; streamEndsLen = streamEndsSize = 0; @@ -811,7 +835,7 @@ parser->getObj(&newTrailerDict); if (newTrailerDict.isDict()) { newTrailerDict.dictLookupNF("Root", &obj); - if (obj.isRef()) { + if (obj.isRef() && (!gotRoot || !needCatalogDict) && rootNum != obj.getRefNum()) { rootNum = obj.getRefNum(); rootGen = obj.getRefGen(); if (!trailerDict.isNone()) { @@ -826,34 +850,34 @@ delete parser; // look for object - } else if (isdigit(*p)) { - num = atoi(p); - if (num > 0) { + } else if (isdigit(*p & 0xff)) { + num = atoi(p); + if (num > 0) { + do { + ++p; + } while (*p && isdigit(*p & 0xff)); + if (isspace(*p & 0xff)) { do { ++p; - } while (*p && isdigit(*p)); - if (isspace(*p)) { + } while (*p && isspace(*p & 0xff)); + if (isdigit(*p & 0xff)) { + gen = atoi(p); do { ++p; - } while (*p && isspace(*p)); - if (isdigit(*p)) { - gen = atoi(p); + } while (*p && isdigit(*p & 0xff)); + if (isspace(*p & 0xff)) { do { - ++p; - } while (*p && isdigit(*p)); - if (isspace(*p)) { - do { - ++p; - } while (*p && isspace(*p)); - if (!strncmp(p, "obj", 3)) { - if (num >= size) { - newSize = (num + 1 + 255) & ~255; - if (newSize < 0) { - error(-1, "Bad object number"); - return gFalse; - } + ++p; + } while (*p && isspace(*p & 0xff)); + if (!strncmp(p, "obj", 3)) { + if (num >= size) { + newSize = (num + 1 + 255) & ~255; + if (newSize < 0) { + error(errSyntaxError, -1, "Bad object number"); + return gFalse; + } if (resize(newSize) != newSize) { - error(-1, "Invalid 'obj' parameters"); + error(errSyntaxError, -1, "Invalid 'obj' parameters"); return gFalse; } } @@ -862,7 +886,7 @@ entries[num].offset = pos - start; entries[num].gen = gen; entries[num].type = xrefEntryUncompressed; - } + } } } } @@ -873,11 +897,11 @@ if (streamEndsLen == streamEndsSize) { streamEndsSize += 64; if (streamEndsSize >= INT_MAX / (int)sizeof(int)) { - error(-1, "Invalid 'endstream' parameter."); + error(errSyntaxError, -1, "Invalid 'endstream' parameter."); return gFalse; } streamEnds = (Guint *)greallocn(streamEnds, - streamEndsSize, sizeof(int)); + streamEndsSize, sizeof(Guint)); } streamEnds[streamEndsLen++] = pos; } @@ -895,7 +919,7 @@ if (gotRoot) return gTrue; - error(-1, "Couldn't find trailer dictionary"); + error(errSyntaxError, -1, "Couldn't find trailer dictionary"); return gFalse; } @@ -908,10 +932,10 @@ encrypted = gTrue; permFlags = permFlagsA; ownerPasswordOk = ownerPasswordOkA; - if (keyLengthA <= 16) { + if (keyLengthA <= 32) { keyLength = keyLengthA; } else { - keyLength = 16; + keyLength = 32; } for (i = 0; i < keyLength; ++i) { fileKey[i] = fileKeyA[i]; @@ -967,16 +991,24 @@ return (!ignoreOwnerPW && ownerPasswordOk) || (permFlags & permAssemble); } -Object *XRef::fetch(int num, int gen, Object *obj, std::set *fetchOriginatorNums) { +Object *XRef::getCatalog(Object *catalog) { + Object *obj = fetch(rootNum, rootGen, catalog); + if (obj->isDict()) { + return obj; + } + GBool wasReconstructed = false; + GBool ok = constructXRef(&wasReconstructed, gTrue); + return (ok) ? fetch(rootNum, rootGen, catalog) : obj; +} + +Object *XRef::fetch(int num, int gen, Object *obj, int recursion) { XRefEntry *e; Parser *parser; Object obj1, obj2, obj3; - bool deleteFetchOriginatorNums = false; - std::pair::iterator, bool> fetchInsertResult; // check for bogus ref - this can happen in corrupted PDF files - if (num < 0 || num >= size || (fetchOriginatorNums != NULL && fetchOriginatorNums->find(num) != fetchOriginatorNums->end())) { - goto err2; + if (num < 0 || num >= size) { + goto err; } e = getEntry(num); @@ -985,12 +1017,6 @@ return obj; } - if (fetchOriginatorNums == NULL) { - fetchOriginatorNums = new std::set(); - deleteFetchOriginatorNums = true; - } - fetchInsertResult = fetchOriginatorNums->insert(num); - switch (e->type) { case xrefEntryUncompressed: @@ -1002,9 +1028,9 @@ new Lexer(this, str->makeSubStream(start + e->offset, gFalse, 0, &obj1)), gTrue); - parser->getObj(&obj1, fetchOriginatorNums); - parser->getObj(&obj2, fetchOriginatorNums); - parser->getObj(&obj3, fetchOriginatorNums); + parser->getObj(&obj1, recursion); + parser->getObj(&obj2, recursion); + parser->getObj(&obj3, recursion); if (!obj1.isInt() || obj1.getInt() != num || !obj2.isInt() || obj2.getInt() != gen || !obj3.isCmd("obj")) { @@ -1022,7 +1048,7 @@ long longNumber = strtol(cmd + 3, &end_ptr, 0); if (longNumber <= INT_MAX && longNumber >= INT_MIN && *end_ptr == '\0') { int number = longNumber; - error(-1, "Cmd was not obj but %s, assuming the creator meant obj %d", cmd, number); + error(errSyntaxWarning, -1, "Cmd was not obj but {0:s}, assuming the creator meant obj {1:d}", cmd, number); obj->initInt(number); obj1.free(); obj2.free(); @@ -1038,8 +1064,8 @@ delete parser; goto err; } - parser->getObj(obj, encrypted ? fileKey : (Guchar *)NULL, - encAlgorithm, keyLength, num, gen, fetchOriginatorNums); + parser->getObj(obj, gFalse, encrypted ? fileKey : (Guchar *)NULL, + encAlgorithm, keyLength, num, gen, recursion); obj1.free(); obj2.free(); obj3.free(); @@ -1048,9 +1074,16 @@ case xrefEntryCompressed: { +#if 0 // Adobe apparently ignores the generation number on compressed objects if (gen != 0) { goto err; } +#endif + if (e->offset >= (Guint)size || + entries[e->offset].type != xrefEntryUncompressed) { + error(errSyntaxError, -1, "Invalid object stream"); + goto err; + } ObjectStream *objStr = NULL; ObjectStreamKey key(e->offset); @@ -1067,6 +1100,8 @@ objStr = NULL; goto err; } else { + // XRef could be reconstructed in constructor of ObjectStream: + e = getEntry(num); ObjectStreamKey *newkey = new ObjectStreamKey(e->offset); ObjectStreamItem *newitem = new ObjectStreamItem(objStr); objStrs->put(newkey, newitem); @@ -1080,20 +1115,9 @@ goto err; } - if (deleteFetchOriginatorNums) { - delete fetchOriginatorNums; - } else { - fetchOriginatorNums->erase(fetchInsertResult.first); - } return obj; err: - if (deleteFetchOriginatorNums) { - delete fetchOriginatorNums; - } else { - fetchOriginatorNums->erase(fetchInsertResult.first); - } - err2: return obj->initNull(); } @@ -1138,8 +1162,8 @@ XRefEntry *e; for (int i = 1; i < size; ++i) { - e = getEntry(i); - if (e->offset < offset && e->offset >= resOffset) + e = getEntry(i, gFalse); + if (e->type != xrefEntryFree && e->offset < offset && e->offset >= resOffset) { res = i; resOffset = e->offset; @@ -1180,7 +1204,7 @@ void XRef::setModifiedObject (Object* o, Ref r) { if (r.num < 0 || r.num >= size) { - error(-1,"XRef::setModifiedObject on unknown ref: %i, %i\n", r.num, r.gen); + error(errInternal, -1,"XRef::setModifiedObject on unknown ref: {0:d}, {1:d}\n", r.num, r.gen); return; } XRefEntry *e = getEntry(r.num); @@ -1192,7 +1216,10 @@ Ref XRef::addIndirectObject (Object* o) { int entryIndexToUse = -1; for (int i = 1; entryIndexToUse == -1 && i < size; ++i) { - if (getEntry(i)->type == xrefEntryFree) entryIndexToUse = i; + XRefEntry *e = getEntry(i, false /* complainIfMissing */); + if (e->type == xrefEntryFree && e->gen != 65535) { + entryIndexToUse = i; + } } XRefEntry *e; @@ -1216,10 +1243,24 @@ return r; } -void XRef::writeToFile(OutStream* outStr, GBool writeAllEntries) { +void XRef::removeIndirectObject(Ref r) { + if (r.num < 0 || r.num >= size) { + error(errInternal, -1,"XRef::removeIndirectObject on unknown ref: {0:d}, {1:d}\n", r.num, r.gen); + return; + } + XRefEntry *e = getEntry(r.num); + if (e->type == xrefEntryFree) + return; + e->obj.free(); + e->type = xrefEntryFree; + e->gen++; + e->updated = true; +} + +void XRef::writeXRef(XRef::XRefWriter *writer, GBool writeAllEntries) { //create free entries linked-list if (getEntry(0)->gen != 65535) { - error(-1, "XRef::writeToFile, entry 0 of the XRef is invalid (gen != 65535)\n"); + error(errInternal, -1, "XRef::writeXRef, entry 0 of the XRef is invalid (gen != 65535)\n"); } int lastFreeEntry = 0; for (int i=0; iprintf("xref\r\n"); - outStr->printf("%i %i\r\n", 0, size); + writer->startSection(0, size); for (int i=0; igen > 65535) e->gen = 65535; //cap generation number to 65535 (required by PDFReference) - outStr->printf("%010i %05i %c\r\n", e->offset, e->gen, (e->type==xrefEntryFree)?'f':'n'); + writer->writeEntry(e->offset, e->gen, e->type); } } else { - //write the new xref - outStr->printf("xref\r\n"); int i = 0; while (i < size) { int j; @@ -1251,11 +1287,11 @@ } if (j-i != 0) { - outStr->printf("%i %i\r\n", i, j-i); + writer->startSection(i, j-i); for (int k=i; kgen > 65535) e->gen = 65535; //cap generation number to 65535 (required by PDFReference) - outStr->printf("%010i %05i %c\r\n", e->offset, e->gen, (e->type==xrefEntryFree)?'f':'n'); + writer->writeEntry(e->offset, e->gen, e->type); } i = j; } @@ -1264,6 +1300,65 @@ } } +XRef::XRefTableWriter::XRefTableWriter(OutStream* outStrA) { + outStr = outStrA; +} + +void XRef::XRefTableWriter::startSection(int first, int count) { + outStr->printf("%i %i\r\n", first, count); +} + +void XRef::XRefTableWriter::writeEntry(Guint offset, int gen, XRefEntryType type) { + outStr->printf("%010i %05i %c\r\n", offset, gen, (type==xrefEntryFree)?'f':'n'); +} + +void XRef::writeTableToFile(OutStream* outStr, GBool writeAllEntries) { + XRefTableWriter writer(outStr); + outStr->printf("xref\r\n"); + writeXRef(&writer, writeAllEntries); +} + +XRef::XRefStreamWriter::XRefStreamWriter(Object *indexA, GooString *stmBufA) { + index = indexA; + stmBuf = stmBufA; +} + +void XRef::XRefStreamWriter::startSection(int first, int count) { + Object obj; + index->arrayAdd( obj.initInt(first) ); + index->arrayAdd( obj.initInt(count) ); +} + +void XRef::XRefStreamWriter::writeEntry(Guint offset, int gen, XRefEntryType type) { + char data[7]; + data[0] = (type==xrefEntryFree) ? 0 : 1; + data[1] = (offset >> 24) & 0xff; + data[2] = (offset >> 16) & 0xff; + data[3] = (offset >> 8) & 0xff; + data[4] = offset & 0xff; + data[5] = (gen >> 8) & 0xff; + data[6] = gen & 0xff; + stmBuf->append(data, 7); +} + +void XRef::writeStreamToBuffer(GooString *stmBuf, Dict *xrefDict, XRef *xref) { + Object index; + index.initArray(xref); + stmBuf->clear(); + + XRefStreamWriter writer(&index, stmBuf); + writeXRef(&writer, gFalse); + + Object obj1, obj2; + xrefDict->set("Type", obj1.initName("XRef")); + xrefDict->set("Index", &index); + obj2.initArray(xref); + obj2.arrayAdd( obj1.initInt(1) ); + obj2.arrayAdd( obj1.initInt(4) ); + obj2.arrayAdd( obj1.initInt(2) ); + xrefDict->set("W", &obj2); +} + GBool XRef::parseEntry(Guint offset, XRefEntry *entry) { GBool r; @@ -1293,13 +1388,13 @@ return r; } -XRefEntry *XRef::getEntry(int i) +XRefEntry *XRef::getEntry(int i, GBool complainIfMissing) { if (entries[i].type == xrefEntryNone) { if ((!xRefStream) && mainXRefEntriesOffset) { if (!parseEntry(mainXRefEntriesOffset + 20*i, &entries[i])) { - error(-1, "Failed to parse XRef entry [%d].", i); + error(errSyntaxError, -1, "Failed to parse XRef entry [{0:d}].", i); } } else { std::vector followedPrev; @@ -1312,7 +1407,7 @@ } } if (followed) { - error(-1, "Circular XRef"); + error(errSyntaxError, -1, "Circular XRef"); if (!(ok = constructXRef(NULL))) { errCode = errDamaged; } @@ -1328,7 +1423,7 @@ // if there was a problem with the xref table, // try to reconstruct it - if (!ok) { + if (!ok || (!prevXRefOffset && entries[i].type == xrefEntryNone)) { GBool wasReconstructed = false; if (!(ok = constructXRef(&wasReconstructed))) { errCode = errDamaged; @@ -1337,10 +1432,23 @@ break; } } + + // We might have reconstructed the xref + // Check again i is in bounds + if (unlikely(i >= size)) { + static XRefEntry dummy; + dummy.offset = 0; + dummy.gen = -1; + dummy.type = xrefEntryNone; + dummy.updated = false; + return &dummy; + } if (entries[i].type == xrefEntryNone) { - error(-1, "Invalid XRef entry"); - entries[i].type = xrefEntryFree; + if (complainIfMissing) { + error(errSyntaxError, -1, "Invalid XRef entry"); + } + entries[i].type = xrefEntryFree; } } } diff -Nru poppler-0.18.4/poppler/XRef.h poppler-0.20.5/poppler/XRef.h --- poppler-0.18.4/poppler/XRef.h 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/XRef.h 2012-09-09 21:33:55.000000000 +0000 @@ -14,11 +14,13 @@ // under GPL version 2 or later // // Copyright (C) 2005 Brad Hards -// Copyright (C) 2006, 2008, 2010, 2011 Albert Astals Cid +// Copyright (C) 2006, 2008, 2010-2012 Albert Astals Cid // Copyright (C) 2007-2008 Julien Rebetez // Copyright (C) 2007 Carlos Garcia Campos // Copyright (C) 2010 Ilya Gorenbein -// Copyright 2010 Hib Eris +// Copyright (C) 2010 Hib Eris +// Copyright (C) 2012 Thomas Freitag +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -66,6 +68,8 @@ // Constructor, create an empty XRef, used for PDF writing XRef(); + // Constructor, create an empty XRef but with info dict, used for PDF writing + XRef(Object *trailerDictA); // Constructor. Read xref table from stream. XRef(BaseStream *strA, Guint pos, Guint mainXRefEntriesOffsetA = 0, GBool *wasReconstructed = NULL, GBool reconstruct = false); @@ -75,6 +79,9 @@ // Is xref table valid? GBool isOk() { return ok; } + // Is the last XRef section a stream or a table? + GBool isXRefStream() { return xRefStream; } + // Get the error code (if isOk() returns false). int getErrorCode() { return errCode; } @@ -96,12 +103,13 @@ GBool okToFillForm(GBool ignoreOwnerPW = gFalse); GBool okToAccessibility(GBool ignoreOwnerPW = gFalse); GBool okToAssemble(GBool ignoreOwnerPW = gFalse); + int getPermFlags() { return permFlags; } // Get catalog object. - Object *getCatalog(Object *obj) { return fetch(rootNum, rootGen, obj); } + Object *getCatalog(Object *obj); // Fetch an indirect reference. - Object *fetch(int num, int gen, Object *obj, std::set *fetchOriginatorNums = NULL); + Object *fetch(int num, int gen, Object *obj, int recursion = 0); // Return the document's Info dictionary (if any). Object *getDocInfo(Object *obj); @@ -122,15 +130,19 @@ int getNumEntry(Guint offset); // Direct access. - int getSize() { return size; } - XRefEntry *getEntry(int i); + XRefEntry *getEntry(int i, GBool complainIfMissing = gTrue); Object *getTrailerDict() { return &trailerDict; } // Write access void setModifiedObject(Object* o, Ref r); Ref addIndirectObject (Object* o); + void removeIndirectObject(Ref r); void add(int num, int gen, Guint offs, GBool used); - void writeToFile(OutStream* outStr, GBool writeAllEntries); + + // Output XRef table to stream + void writeTableToFile(OutStream* outStr, GBool writeAllEntries); + // Output XRef stream contents to GooString and fill trailerDict fields accordingly + void writeStreamToBuffer(GooString *stmBuf, Dict *xrefDict, XRef *xref); private: @@ -154,7 +166,7 @@ CryptAlgorithm encAlgorithm; // encryption algorithm int keyLength; // length of key, in bytes int permFlags; // permission bits - Guchar fileKey[16]; // file decryption key + Guchar fileKey[32]; // file decryption key GBool ownerPasswordOk; // true if owner password is correct Guint prevXRefOffset; // position of prev XRef section (= next to read) Guint mainXRefEntriesOffset; // offset of entries in main XRef table @@ -163,14 +175,40 @@ void init(); int reserve(int newSize); int resize(int newSize); - Guint getStartXref(); GBool readXRef(Guint *pos, std::vector *followedXRefStm); GBool readXRefTable(Parser *parser, Guint *pos, std::vector *followedXRefStm); GBool readXRefStreamSection(Stream *xrefStr, int *w, int first, int n); GBool readXRefStream(Stream *xrefStr, Guint *pos); - GBool constructXRef(GBool *wasReconstructed); + GBool constructXRef(GBool *wasReconstructed, GBool needCatalogDict = gFalse); GBool parseEntry(Guint offset, XRefEntry *entry); + class XRefWriter { + public: + virtual void startSection(int first, int count) = 0; + virtual void writeEntry(Guint offset, int gen, XRefEntryType type) = 0; + virtual ~XRefWriter() {}; + }; + + class XRefTableWriter: public XRefWriter { + public: + XRefTableWriter(OutStream* outStrA); + void startSection(int first, int count); + void writeEntry(Guint offset, int gen, XRefEntryType type); + private: + OutStream* outStr; + }; + + class XRefStreamWriter: public XRefWriter { + public: + XRefStreamWriter(Object *index, GooString *stmBuf); + void startSection(int first, int count); + void writeEntry(Guint offset, int gen, XRefEntryType type); + private: + Object *index; + GooString *stmBuf; + }; + + void writeXRef(XRefWriter *writer, GBool writeAllEntries); }; #endif diff -Nru poppler-0.18.4/poppler/XpdfPluginAPI.cc poppler-0.20.5/poppler/XpdfPluginAPI.cc --- poppler-0.18.4/poppler/XpdfPluginAPI.cc 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/XpdfPluginAPI.cc 2012-05-10 20:05:44.000000000 +0000 @@ -14,6 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2009 Kovid Goyal +// Copyright (C) 2012 Albert Astals Cid // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -28,11 +29,6 @@ #include "GlobalParams.h" #include "Object.h" #include "PDFDoc.h" -#ifdef _WIN32 -#include "WinPDFCore.h" -#else -#include "XPDFCore.h" -#endif #include "XpdfPluginAPI.h" //------------------------------------------------------------------------ @@ -60,30 +56,6 @@ return (XpdfObject)((PDFDoc *)doc)->getXRef()->getCatalog(obj); } -#ifdef _WIN32 - -HWND _xpdfWin32GetWindow(XpdfDoc doc) { - WinPDFCore *core; - - if (!(core = (WinPDFCore *)((PDFDoc *)doc)->getGUIData())) { - return NULL; - } - return core->getDrawFrame(); -} - -#else - -Widget _xpdfXGetWindow(XpdfDoc doc) { - XPDFCore *core; - - if (!(core = (XPDFCore *)((PDFDoc *)doc)->getGUIData())) { - return NULL; - } - return core->getWidget(); -} - -#endif - //------------------------------------------------------------------------ // Object access functions. //------------------------------------------------------------------------ @@ -242,11 +214,6 @@ xpdfPluginAPIVersion, &_xpdfGetInfoDict, &_xpdfGetCatalog, -#ifdef _WIN32 - &_xpdfWin32GetWindow, -#else - &_xpdfXGetWindow, -#endif &_xpdfObjIsBool, &_xpdfObjIsInt, &_xpdfObjIsReal, diff -Nru poppler-0.18.4/poppler/XpdfPluginAPI.h poppler-0.20.5/poppler/XpdfPluginAPI.h --- poppler-0.18.4/poppler/XpdfPluginAPI.h 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/XpdfPluginAPI.h 2012-05-10 20:05:44.000000000 +0000 @@ -4,6 +4,20 @@ * Copyright 2004 Glyph & Cog, LLC */ +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2012 Albert Astals Cid +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + #ifndef XPDFPLUGINAPI_H #define XPDFPLUGINAPI_H @@ -173,7 +187,7 @@ * document. Returns non-zero if successful. */ XpdfBool (*getKey)(void *handlerData, void *docData, - char **key, int *keyLen, int *cryptVersion); + char **key, int *keyLen, int *cryptVersion, int *cryptRevision); /* * Free the data allocated by getKey. @@ -208,24 +222,6 @@ */ XpdfObject (*_xpdfGetCatalog)(XpdfDoc doc); -#ifdef _WIN32 - -/* - * Get the handle for the viewer window associated with the specified - * document. [Win32 only] - */ -HWND (*_xpdfWin32GetWindow)(XpdfDoc doc); - -#else - -/* - * Get the Motif widget for the viewer window associated with the - * specified document. [X only] - */ -Widget (*_xpdfXGetWindow)(XpdfDoc doc); - -#endif - /*------------------------------------------------------------------------ * Object access functions *------------------------------------------------------------------------*/ diff -Nru poppler-0.18.4/poppler/poppler-config.h.cmake poppler-0.20.5/poppler/poppler-config.h.cmake --- poppler-0.18.4/poppler/poppler-config.h.cmake 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/poppler-config.h.cmake 2012-09-15 18:33:46.000000000 +0000 @@ -2,7 +2,7 @@ // // poppler-config.h // -// Copyright 1996-2004 Glyph & Cog, LLC +// Copyright 1996-2011 Glyph & Cog, LLC // //======================================================================== @@ -14,6 +14,11 @@ // around #undef look odd, but it's to silence warnings about // redefining those symbols. +/* Defines the poppler version */ +#ifndef POPPLER_VERSION +#define POPPLER_VERSION "${POPPLER_VERSION}" +#endif + /* Enable multithreading support. */ #ifndef MULTITHREADED #cmakedefine MULTITHREADED 1 @@ -122,8 +127,8 @@ //------------------------------------------------------------------------ // copyright notice -#define popplerCopyright "Copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org" -#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC" +#define popplerCopyright "Copyright 2005-2012 The Poppler Developers - http://poppler.freedesktop.org" +#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC" //------------------------------------------------------------------------ // popen @@ -153,7 +158,7 @@ #if defined(_WIN32) #ifdef _MSC_VER #define strtok_r strtok_s -#elif __MINGW32__ +#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION) char * strtok_r (char *s, const char *delim, char **save_ptr); #endif #endif diff -Nru poppler-0.18.4/poppler/poppler-config.h.in poppler-0.20.5/poppler/poppler-config.h.in --- poppler-0.18.4/poppler/poppler-config.h.in 2012-02-15 17:23:06.000000000 +0000 +++ poppler-0.20.5/poppler/poppler-config.h.in 2012-10-10 17:35:16.000000000 +0000 @@ -2,7 +2,7 @@ // // poppler-config.h // -// Copyright 1996-2004 Glyph & Cog, LLC +// Copyright 1996-2011 Glyph & Cog, LLC // //======================================================================== @@ -14,6 +14,11 @@ // around #undef look odd, but it's to silence warnings about // redefining those symbols. +/* Defines the poppler version. */ +#ifndef POPPLER_VERSION +#undef POPPLER_VERSION +#endif + /* Enable multithreading support. */ #ifndef MULTITHREADED #undef MULTITHREADED @@ -122,8 +127,8 @@ //------------------------------------------------------------------------ // copyright notice -#define popplerCopyright "Copyright 2005-2011 The Poppler Developers - http://poppler.freedesktop.org" -#define xpdfCopyright "Copyright 1996-2004 Glyph & Cog, LLC" +#define popplerCopyright "Copyright 2005-2012 The Poppler Developers - http://poppler.freedesktop.org" +#define xpdfCopyright "Copyright 1996-2011 Glyph & Cog, LLC" //------------------------------------------------------------------------ // popen @@ -153,7 +158,7 @@ #if defined(_WIN32) #ifdef _MSC_VER #define strtok_r strtok_s -#elif __MINGW32__ +#elif __MINGW32__ && !defined(__WINPTHREADS_VERSION) char * strtok_r (char *s, const char *delim, char **save_ptr); #endif #endif diff -Nru poppler-0.18.4/poppler/strtok_r.cpp poppler-0.20.5/poppler/strtok_r.cpp --- poppler-0.18.4/poppler/strtok_r.cpp 2011-11-22 21:33:17.000000000 +0000 +++ poppler-0.20.5/poppler/strtok_r.cpp 2012-09-16 12:07:40.000000000 +0000 @@ -40,7 +40,22 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ -#ifdef __MINGW32__ +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2012 Alexey Pavlov +// Copyright (C) 2012 Albert Astals Cid +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + +#if defined(__MINGW32__) && !defined(__WINPTHREADS_VERSION) #include #define __rawmemchr strchr diff -Nru poppler-0.18.4/qt4/Makefile.in poppler-0.20.5/qt4/Makefile.in --- poppler-0.18.4/qt4/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/qt4/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -15,6 +15,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -50,11 +67,11 @@ $(top_builddir)/poppler/poppler-config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = @@ -65,6 +82,11 @@ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ @@ -171,12 +193,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -230,6 +256,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -502,13 +529,10 @@ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ - test -d "$(distdir)/$$subdir" \ - || $(MKDIR_P) "$(distdir)/$$subdir" \ - || exit 1; \ - fi; \ - done - @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ - if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ @@ -543,10 +567,15 @@ installcheck: installcheck-recursive install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/qt4/demos/Makefile.in poppler-0.20.5/qt4/demos/Makefile.in --- poppler-0.18.4/qt4/demos/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/qt4/demos/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -65,8 +82,8 @@ $(top_builddir)/qt4/src/libpoppler-qt4.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) poppler_qt4viewer_DEPENDENCIES = $(am__DEPENDENCIES_2) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -78,18 +95,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -97,21 +114,26 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(poppler_qt4viewer_SOURCES) DIST_SOURCES = $(poppler_qt4viewer_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -187,12 +209,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -246,6 +272,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -397,7 +424,7 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -poppler_qt4viewer$(EXEEXT): $(poppler_qt4viewer_OBJECTS) $(poppler_qt4viewer_DEPENDENCIES) +poppler_qt4viewer$(EXEEXT): $(poppler_qt4viewer_OBJECTS) $(poppler_qt4viewer_DEPENDENCIES) $(EXTRA_poppler_qt4viewer_DEPENDENCIES) @rm -f poppler_qt4viewer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_qt4viewer_OBJECTS) $(poppler_qt4viewer_LDADD) $(LIBS) @@ -425,26 +452,23 @@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -548,10 +572,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: distclean-generic: diff -Nru poppler-0.18.4/qt4/src/CMakeLists.txt poppler-0.20.5/qt4/src/CMakeLists.txt --- poppler-0.18.4/qt4/src/CMakeLists.txt 2011-11-22 21:33:20.000000000 +0000 +++ poppler-0.20.5/qt4/src/CMakeLists.txt 2012-05-10 20:05:44.000000000 +0000 @@ -25,11 +25,12 @@ poppler-sound.cc poppler-textbox.cc poppler-page-transition.cc + poppler-media.cc ${CMAKE_SOURCE_DIR}/poppler/ArthurOutputDev.cc ) qt4_automoc(${poppler_qt4_SRCS}) add_library(poppler-qt4 SHARED ${poppler_qt4_SRCS}) -set_target_properties(poppler-qt4 PROPERTIES VERSION 3.7.0 SOVERSION 3) +set_target_properties(poppler-qt4 PROPERTIES VERSION 4.0.0 SOVERSION 4) target_link_libraries(poppler-qt4 poppler ${QT4_QTCORE_LIBRARY} ${QT4_QTGUI_LIBRARY} ${QT4_QTXML_LIBRARY}) if(MSVC) target_link_libraries(poppler-qt4 poppler ${poppler_LIBS}) @@ -44,5 +45,6 @@ poppler-optcontent.h poppler-export.h poppler-page-transition.h + poppler-media.h DESTINATION include/poppler/qt4) diff -Nru poppler-0.18.4/qt4/src/Makefile.am poppler-0.20.5/qt4/src/Makefile.am --- poppler-0.18.4/qt4/src/Makefile.am 2012-02-12 22:26:43.000000000 +0000 +++ poppler-0.20.5/qt4/src/Makefile.am 2012-09-25 21:07:44.000000000 +0000 @@ -2,7 +2,8 @@ -I$(top_srcdir) \ -I$(top_srcdir)/poppler \ $(FONTCONFIG_CFLAGS) \ - $(POPPLER_QT4_CFLAGS) + $(POPPLER_QT4_CFLAGS) \ + $(LCMS_CFLAGS) SUFFIXES: .moc @@ -15,6 +16,7 @@ poppler-form.h \ poppler-optcontent.h \ poppler-export.h \ + poppler-media.h \ poppler-page-transition.h lib_LTLIBRARIES = libpoppler-qt4.la @@ -39,6 +41,7 @@ poppler-qiodeviceoutstream.cc \ poppler-private.cc \ poppler-movie.cc \ + poppler-media.cc \ poppler-annotation-helper.h \ poppler-page-private.h \ poppler-link-extractor-private.h \ @@ -60,7 +63,7 @@ $(FONTCONFIG_LIBS) \ $(POPPLER_QT4_LIBS) -libpoppler_qt4_la_LDFLAGS = -version-info 10:0:7 @create_shared_lib@ @auto_import_flags@ +libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@ # This rule lets GNU make create any *.moc from the equivalent *.h .h.moc: diff -Nru poppler-0.18.4/qt4/src/Makefile.in poppler-0.20.5/qt4/src/Makefile.in --- poppler-0.18.4/qt4/src/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/qt4/src/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -74,6 +91,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(libdir)" \ "$(DESTDIR)$(poppler_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) @@ -99,10 +122,11 @@ libpoppler_qt4_la-poppler-pdf-converter.lo \ libpoppler_qt4_la-poppler-qiodeviceoutstream.lo \ libpoppler_qt4_la-poppler-private.lo \ - libpoppler_qt4_la-poppler-movie.lo + libpoppler_qt4_la-poppler-movie.lo \ + libpoppler_qt4_la-poppler-media.lo libpoppler_qt4_la_OBJECTS = $(am_libpoppler_qt4_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libpoppler_qt4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ @@ -118,18 +142,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -137,21 +161,26 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpoppler_qt4_la_SOURCES) DIST_SOURCES = $(libpoppler_qt4_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac HEADERS = $(poppler_include_HEADERS) ETAGS = etags CTAGS = ctags @@ -228,12 +257,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -287,6 +320,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -355,7 +389,8 @@ -I$(top_srcdir) \ -I$(top_srcdir)/poppler \ $(FONTCONFIG_CFLAGS) \ - $(POPPLER_QT4_CFLAGS) + $(POPPLER_QT4_CFLAGS) \ + $(LCMS_CFLAGS) poppler_includedir = $(includedir)/poppler/qt4 poppler_include_HEADERS = \ @@ -365,6 +400,7 @@ poppler-form.h \ poppler-optcontent.h \ poppler-export.h \ + poppler-media.h \ poppler-page-transition.h lib_LTLIBRARIES = libpoppler-qt4.la @@ -388,6 +424,7 @@ poppler-qiodeviceoutstream.cc \ poppler-private.cc \ poppler-movie.cc \ + poppler-media.cc \ poppler-annotation-helper.h \ poppler-page-private.h \ poppler-link-extractor-private.h \ @@ -409,7 +446,7 @@ $(FONTCONFIG_LIBS) \ $(POPPLER_QT4_LIBS) -libpoppler_qt4_la_LDFLAGS = -version-info 10:0:7 @create_shared_lib@ @auto_import_flags@ +libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@ BUILT_SOURCES = poppler-optcontent.moc all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am @@ -448,7 +485,6 @@ $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ @@ -456,6 +492,8 @@ else :; fi; \ done; \ test -z "$$list2" || { \ + echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } @@ -477,7 +515,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libpoppler-qt4.la: $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_DEPENDENCIES) +libpoppler-qt4.la: $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_DEPENDENCIES) $(EXTRA_libpoppler_qt4_la_DEPENDENCIES) $(AM_V_CXXLD)$(libpoppler_qt4_la_LINK) -rpath $(libdir) $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -494,6 +532,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo@am__quote@ @@ -508,170 +547,156 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< libpoppler_qt4_la-poppler-document.lo: poppler-document.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-document.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-document.cc' object='libpoppler_qt4_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-document.cc' object='libpoppler_qt4_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc libpoppler_qt4_la-poppler-page.lo: poppler-page.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-page.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-page.cc' object='libpoppler_qt4_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page.cc' object='libpoppler_qt4_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc libpoppler_qt4_la-poppler-fontinfo.lo: poppler-fontinfo.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-fontinfo.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-fontinfo.cc' object='libpoppler_qt4_la-poppler-fontinfo.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-fontinfo.cc' object='libpoppler_qt4_la-poppler-fontinfo.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc libpoppler_qt4_la-poppler-embeddedfile.lo: poppler-embeddedfile.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-embeddedfile.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-embeddedfile.cc' object='libpoppler_qt4_la-poppler-embeddedfile.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-embeddedfile.cc' object='libpoppler_qt4_la-poppler-embeddedfile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc libpoppler_qt4_la-poppler-textbox.lo: poppler-textbox.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-textbox.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-textbox.cc' object='libpoppler_qt4_la-poppler-textbox.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-textbox.cc' object='libpoppler_qt4_la-poppler-textbox.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc libpoppler_qt4_la-poppler-link.lo: poppler-link.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-link.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-link.cc' object='libpoppler_qt4_la-poppler-link.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link.cc' object='libpoppler_qt4_la-poppler-link.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc libpoppler_qt4_la-poppler-annotation.lo: poppler-annotation.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-annotation.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-annotation.cc' object='libpoppler_qt4_la-poppler-annotation.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-annotation.cc' object='libpoppler_qt4_la-poppler-annotation.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc libpoppler_qt4_la-poppler-link-extractor.lo: poppler-link-extractor.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-link-extractor.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Tpo -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-link-extractor.cc' object='libpoppler_qt4_la-poppler-link-extractor.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link-extractor.cc' object='libpoppler_qt4_la-poppler-link-extractor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc libpoppler_qt4_la-poppler-optcontent.lo: poppler-optcontent.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-optcontent.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-optcontent.cc' object='libpoppler_qt4_la-poppler-optcontent.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-optcontent.cc' object='libpoppler_qt4_la-poppler-optcontent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc libpoppler_qt4_la-poppler-page-transition.lo: poppler-page-transition.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-page-transition.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Tpo -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-page-transition.cc' object='libpoppler_qt4_la-poppler-page-transition.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page-transition.cc' object='libpoppler_qt4_la-poppler-page-transition.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc libpoppler_qt4_la-poppler-sound.lo: poppler-sound.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-sound.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-sound.cc' object='libpoppler_qt4_la-poppler-sound.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-sound.cc' object='libpoppler_qt4_la-poppler-sound.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc libpoppler_qt4_la-poppler-form.lo: poppler-form.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-form.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-form.cc' object='libpoppler_qt4_la-poppler-form.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-form.cc' object='libpoppler_qt4_la-poppler-form.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc libpoppler_qt4_la-poppler-base-converter.lo: poppler-base-converter.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-base-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Tpo -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-base-converter.cc' object='libpoppler_qt4_la-poppler-base-converter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-base-converter.cc' object='libpoppler_qt4_la-poppler-base-converter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc libpoppler_qt4_la-poppler-ps-converter.lo: poppler-ps-converter.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-ps-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Tpo -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-ps-converter.cc' object='libpoppler_qt4_la-poppler-ps-converter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-ps-converter.cc' object='libpoppler_qt4_la-poppler-ps-converter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc libpoppler_qt4_la-poppler-pdf-converter.lo: poppler-pdf-converter.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-pdf-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Tpo -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-pdf-converter.cc' object='libpoppler_qt4_la-poppler-pdf-converter.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-pdf-converter.cc' object='libpoppler_qt4_la-poppler-pdf-converter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc libpoppler_qt4_la-poppler-qiodeviceoutstream.lo: poppler-qiodeviceoutstream.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-qiodeviceoutstream.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-qiodeviceoutstream.cc' object='libpoppler_qt4_la-poppler-qiodeviceoutstream.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-qiodeviceoutstream.cc' object='libpoppler_qt4_la-poppler-qiodeviceoutstream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc libpoppler_qt4_la-poppler-private.lo: poppler-private.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-private.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-private.cc' object='libpoppler_qt4_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-private.cc' object='libpoppler_qt4_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc libpoppler_qt4_la-poppler-movie.lo: poppler-movie.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-movie.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='poppler-movie.cc' object='libpoppler_qt4_la-poppler-movie.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-movie.cc' object='libpoppler_qt4_la-poppler-movie.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc + +libpoppler_qt4_la-poppler-media.lo: poppler-media.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-media.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo -c -o libpoppler_qt4_la-poppler-media.lo `test -f 'poppler-media.cc' || echo '$(srcdir)/'`poppler-media.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-media.cc' object='libpoppler_qt4_la-poppler-media.lo' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-media.lo `test -f 'poppler-media.cc' || echo '$(srcdir)/'`poppler-media.cc mostlyclean-libtool: -rm -f *.lo @@ -680,8 +705,11 @@ -rm -rf .libs _libs install-poppler_includeHEADERS: $(poppler_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -695,9 +723,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -800,10 +826,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: distclean-generic: diff -Nru poppler-0.18.4/qt4/src/poppler-annotation-helper.h poppler-0.20.5/qt4/src/poppler-annotation-helper.h --- poppler-0.18.4/qt4/src/poppler-annotation-helper.h 2011-11-22 21:33:20.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-annotation-helper.h 2012-05-10 20:05:44.000000000 +0000 @@ -1,6 +1,7 @@ /* poppler-annotation-helper.h: qt interface to poppler * Copyright (C) 2006, 2008, Albert Astals Cid * Copyright (C) 2008, Pino Toscano + * Copyright (C) 2012, Fabio D'Urso * Adapting code from * Copyright (C) 2004 by Enrico Ros * @@ -21,6 +22,8 @@ #include +#include + class QColor; class AnnotColor; @@ -42,6 +45,7 @@ static inline void lookupDate( Dict *, char *, QDateTime & dest ); // transform from user coords to normalized ones using the matrix M static inline void transform( double * M, double x, double y, QPointF &res ); + static inline void invTransform( double * M, const QPointF &p, double &x, double &y ); }; void XPDFReader::lookupName( Dict * dict, char * type, QString & dest ) @@ -175,34 +179,20 @@ res.setY( M[1] * x + M[3] * y + M[5] ); } -/** @short Helper classes for CROSSDEPS resolving and DS conversion. */ -struct ResolveRevision +void XPDFReader::invTransform( double * M, const QPointF &p, double &x, double &y ) { - int prevAnnotationID; // ID of the annotation to be reparended - int nextAnnotationID; // (only needed for speeding up resolving) - Annotation * nextAnnotation; // annotation that will act as parent - Annotation::RevScope nextScope; // scope of revision (Reply) - Annotation::RevType nextType; // type of revision (None) -}; - -struct ResolveWindow -{ - AnnotPopup * popup; // the (maybe shared) window - Annotation * annotation; // annotation having the popup window -}; + const double det = M[0]*M[3] - M[1]*M[2]; + Q_ASSERT(det != 0); -struct PostProcessText // this handles a special pdf case conversion -{ - Annotation * textAnnotation; // a popup text annotation (not FreeText) - bool opened; // pdf property to convert to window flags -}; + const double invM[4] = { M[3]/det, -M[1]/det, -M[2]/det, M[0]/det }; + const double xt = p.x() - M[4]; + const double yt = p.y() - M[5]; -struct PopupWindow -{ - Annotation * dummyAnnotation; // window properties (in pdf as Annotation) - bool shown; // converted to Annotation::Hidden flag -}; + x = invM[0] * xt + invM[2] * yt; + y = invM[1] * xt + invM[3] * yt; +} QColor convertAnnotColor( AnnotColor *color ); +AnnotColor* convertQColor( const QColor &color ); } diff -Nru poppler-0.18.4/qt4/src/poppler-annotation-private.h poppler-0.20.5/qt4/src/poppler-annotation-private.h --- poppler-0.18.4/qt4/src/poppler-annotation-private.h 2011-11-22 21:33:20.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-annotation-private.h 2012-05-10 20:05:44.000000000 +0000 @@ -1,5 +1,7 @@ /* poppler-link-extractor-private.h: qt interface to poppler * Copyright (C) 2007, Pino Toscano + * Copyright (C) 2012, Tobias Koenig + * Copyright (C) 2012, Fabio D'Urso * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -19,17 +21,35 @@ #ifndef _POPPLER_ANNOTATION_PRIVATE_H_ #define _POPPLER_ANNOTATION_PRIVATE_H_ +#include +#include +#include + #include "poppler-annotation.h" +#include + +class Annot; +class AnnotPath; +class Page; +class PDFRectangle; + namespace Poppler { +class DocumentData; -class AnnotationPrivate +class AnnotationPrivate : public QSharedData { public: AnnotationPrivate(); virtual ~AnnotationPrivate(); + void addRevision(Annotation *ann, Annotation::RevScope scope, Annotation::RevType type); + + /* Returns an Annotation of the right subclass whose d_ptr points to + * this AnnotationPrivate */ + virtual Annotation * makeAlias() = 0; + /* properties: contents related */ QString author; QString contents; @@ -41,7 +61,45 @@ int flags; QRectF boundary; - QLinkedList< Annotation::Revision > revisions; + /* style and popup */ + Annotation::Style style; + Annotation::Popup popup; + + /* revisions */ + Annotation::RevScope revisionScope; + Annotation::RevType revisionType; + QList revisions; + + /* After this call, the Annotation object will behave like a wrapper for + * the specified Annot object. All cached values are discarded */ + void tieToNativeAnnot(Annot *ann, ::Page *page, DocumentData *doc); + + /* Creates a new Annot object on the specified page, flushes current + * values to that object and ties this Annotation to that object */ + virtual Annot* createNativeAnnot(::Page *destPage, DocumentData *doc) = 0; + + /* Inited to 0 (i.e. untied annotation) */ + Annot *pdfAnnot; + ::Page *pdfPage; + DocumentData * parentDoc; + + /* The following helpers only work if pdfPage is set */ + void flushBaseAnnotationProperties(); + void fillMTX(double MTX[6]) const; + QRectF fromPdfRectangle(const PDFRectangle &r) const; + PDFRectangle toPdfRectangle(const QRectF &r) const; + AnnotPath * toAnnotPath(const QLinkedList &l) const; + + /* Scan page for annotations, parentId=0 searches for root annotations */ + static QList findAnnotations(::Page *pdfPage, DocumentData *doc, int parentId = 0); + + /* Add given annotation to given page */ + static void addAnnotationToPage(::Page *pdfPage, DocumentData *doc, const Annotation * ann); + + /* Remove annotation from page and destroy ann */ + static void removeAnnotationFromPage(::Page *pdfPage, const Annotation * ann); + + Ref pdfObjectReference() const; }; } diff -Nru poppler-0.18.4/qt4/src/poppler-annotation.cc poppler-0.20.5/qt4/src/poppler-annotation.cc --- poppler-0.18.4/qt4/src/poppler-annotation.cc 2011-11-22 21:33:21.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-annotation.cc 2012-08-15 13:31:38.000000000 +0000 @@ -1,6 +1,8 @@ /* poppler-annotation.cc: qt interface to poppler - * Copyright (C) 2006, 2009 Albert Astals Cid + * Copyright (C) 2006, 2009, 2012 Albert Astals Cid * Copyright (C) 2006, 2008, 2010 Pino Toscano + * Copyright (C) 2012, Guillermo A. Amaral B. + * Copyright (C) 2012, Fabio D'Urso * Adapting code from * Copyright (C) 2004 by Enrico Ros * @@ -20,6 +22,8 @@ */ // qt/kde includes +#include +#include #include #include @@ -27,11 +31,23 @@ #include "poppler-annotation.h" #include "poppler-link.h" #include "poppler-qt4.h" +#include "poppler-annotation-helper.h" #include "poppler-annotation-private.h" +#include "poppler-page-private.h" +#include "poppler-private.h" // poppler includes #include #include +#include +#include +#include + +/* Almost all getters directly query the underlying poppler annotation, with + * the exceptions of link, file attachment, sound, movie and screen annotations, + * Whose data retrieval logic has not been moved yet. Their getters return + * static data set at creation time by findAnnotations + */ namespace Poppler { @@ -104,70 +120,686 @@ //BEGIN Annotation implementation AnnotationPrivate::AnnotationPrivate() - : flags( 0 ) + : flags( 0 ), revisionScope ( Annotation::Root ), + revisionType ( Annotation::None ), pdfAnnot ( 0 ), pdfPage ( 0 ), + parentDoc ( 0 ) { } +void AnnotationPrivate::addRevision( Annotation *ann, Annotation::RevScope scope, Annotation::RevType type ) +{ + /* Since ownership stays with the caller, create an alias of ann */ + revisions.append( ann->d_ptr->makeAlias() ); + + /* Set revision properties */ + revisionScope = scope; + revisionType = type; +} + AnnotationPrivate::~AnnotationPrivate() { + // Delete all children revisions + qDeleteAll( revisions ); + + // Release Annot object + if (pdfAnnot) + pdfAnnot->decRefCnt(); +} + +void AnnotationPrivate::tieToNativeAnnot(Annot *ann, ::Page *page, Poppler::DocumentData * doc) +{ + if (pdfAnnot) + { + error(errIO, -1, "Annotation is already tied"); + return; + } + + pdfAnnot = ann; + pdfPage = page; + parentDoc = doc; + + pdfAnnot->incRefCnt(); +} + +/* This method is called when a new annotation is created, after pdfAnnot and + * pdfPage have been set */ +void AnnotationPrivate::flushBaseAnnotationProperties() +{ + Q_ASSERT ( pdfPage ); + + Annotation *q = makeAlias(); // Setters are defined in the public class + + // Since pdfAnnot has been set, this calls will write in the Annot object + q->setAuthor(author); + q->setContents(contents); + q->setUniqueName(uniqueName); + q->setModificationDate(modDate); + q->setCreationDate(creationDate); + q->setFlags(flags); + //q->setBoundary(boundary); -- already set by subclass-specific code + q->setStyle(style); + q->setPopup(popup); + + // Flush revisions + foreach (Annotation *r, revisions) + { + // TODO: Flush revision + delete r; // Object is no longer needed + } + + delete q; + + // Clear some members to save memory + author.clear(); + contents.clear(); + uniqueName.clear(); + revisions.clear(); +} + +void AnnotationPrivate::fillMTX(double MTX[6]) const +{ + Q_ASSERT ( pdfPage ); + + // build a normalized transform matrix for this page at 100% scale + GfxState * gfxState = new GfxState( 72.0, 72.0, pdfPage->getCropBox(), pdfPage->getRotate(), gTrue ); + double * gfxCTM = gfxState->getCTM(); + + double w = pdfPage->getCropWidth(); + double h = pdfPage->getCropHeight(); + + // Swap width and height if the page is rotated landscape or seascape + if ( pdfPage->getRotate() == 90 || pdfPage->getRotate() == 270 ) + { + double t = w; + w = h; + h = t; + } + + for ( int i = 0; i < 6; i+=2 ) + { + MTX[i] = gfxCTM[i] / w; + MTX[i+1] = gfxCTM[i+1] / h; + } + delete gfxState; +} + +QRectF AnnotationPrivate::fromPdfRectangle(const PDFRectangle &r) const +{ + double swp, MTX[6]; + fillMTX(MTX); + + QPointF p1, p2; + XPDFReader::transform( MTX, r.x1, r.y1, p1 ); + XPDFReader::transform( MTX, r.x2, r.y2, p2 ); + + double tl_x = p1.x(); + double tl_y = p1.y(); + double br_x = p2.x(); + double br_y = p2.y(); + + if (tl_x > br_x) + { + swp = tl_x; + tl_x = br_x; + br_x = swp; + } + + if (tl_y > br_y) + { + swp = tl_y; + tl_y = br_y; + br_y = swp; + } + + return QRectF( QPointF(tl_x,tl_y) , QPointF(br_x,br_y) ); +} + +PDFRectangle AnnotationPrivate::toPdfRectangle(const QRectF &r) const +{ + double MTX[6]; + fillMTX(MTX); + + double tl_x, tl_y, br_x, br_y, swp; + XPDFReader::invTransform( MTX, r.topLeft(), tl_x, tl_y ); + XPDFReader::invTransform( MTX, r.bottomRight(), br_x, br_y ); + + if (tl_x > br_x) + { + swp = tl_x; + tl_x = br_x; + br_x = swp; + } + + if (tl_y > br_y) + { + swp = tl_y; + tl_y = br_y; + br_y = swp; + } + + return PDFRectangle(tl_x, tl_y, br_x, br_y); +} + +AnnotPath * AnnotationPrivate::toAnnotPath(const QLinkedList &list) const +{ + const int count = list.size(); + AnnotCoord **ac = (AnnotCoord **) gmallocn(count, sizeof(AnnotCoord*)); + + double MTX[6]; + fillMTX(MTX); + + int pos = 0; + foreach (const QPointF &p, list) + { + double x, y; + XPDFReader::invTransform( MTX, p, x, y ); + ac[pos++] = new AnnotCoord(x, y); + } + + return new AnnotPath(ac, count); +} + +QList AnnotationPrivate::findAnnotations(::Page *pdfPage, DocumentData *doc, int parentID) +{ + Annots* annots = pdfPage->getAnnots(); + const uint numAnnotations = annots->getNumAnnots(); + if ( numAnnotations == 0 ) + { + return QList(); + } + + // Create Annotation objects and tie to their native Annot + QList res; + for ( uint j = 0; j < numAnnotations; j++ ) + { + // get the j-th annotation + Annot * ann = annots->getAnnot( j ); + if ( !ann ) + { + error(errInternal, -1, "Annot %u is null", j); + continue; + } + + // Check parent annotation + AnnotMarkup * markupann = dynamic_cast< AnnotMarkup * >( ann ); + if (!markupann) + { + // Assume it's a root annotation, and skip if user didn't request it + if (parentID != 0) + continue; + } + else if (markupann->getInReplyToID() != parentID) + continue; + + /* Create Annotation of the right subclass */ + Annotation * annotation = 0; + Annot::AnnotSubtype subType = ann->getType(); + + switch ( subType ) + { + case Annot::typeText: + annotation = new TextAnnotation(TextAnnotation::Linked); + break; + case Annot::typeFreeText: + annotation = new TextAnnotation(TextAnnotation::InPlace); + break; + case Annot::typeLine: + annotation = new LineAnnotation(LineAnnotation::StraightLine); + break; + case Annot::typePolygon: + case Annot::typePolyLine: + annotation = new LineAnnotation(LineAnnotation::Polyline); + break; + case Annot::typeSquare: + case Annot::typeCircle: + annotation = new GeomAnnotation(); + break; + case Annot::typeHighlight: + case Annot::typeUnderline: + case Annot::typeSquiggly: + case Annot::typeStrikeOut: + annotation = new HighlightAnnotation(); + break; + case Annot::typeStamp: + annotation = new StampAnnotation(); + break; + case Annot::typeInk: + annotation = new InkAnnotation(); + break; + case Annot::typeLink: /* TODO: Move logic to getters */ + { + // parse Link params + AnnotLink * linkann = static_cast< AnnotLink * >( ann ); + LinkAnnotation * l = new LinkAnnotation(); + annotation = l; + + // -> hlMode + l->setLinkHighlightMode( (LinkAnnotation::HighlightMode)linkann->getLinkEffect() ); + + // -> link region + // TODO + + // reading link action + if ( linkann->getAction() ) + { + Link * popplerLink = PageData::convertLinkActionToLink( linkann->getAction(), doc, QRectF() ); + if ( popplerLink ) + { + l->setLinkDestination( popplerLink ); + } + } + break; + } + case Annot::typeCaret: + annotation = new CaretAnnotation(); + break; + case Annot::typeFileAttachment: /* TODO: Move logic to getters */ + { + AnnotFileAttachment * attachann = static_cast< AnnotFileAttachment * >( ann ); + FileAttachmentAnnotation * f = new FileAttachmentAnnotation(); + annotation = f; + // -> fileIcon + f->setFileIconName( QString::fromLatin1( attachann->getName()->getCString() ) ); + // -> embeddedFile + FileSpec *filespec = new FileSpec( attachann->getFile() ); + f->setEmbeddedFile( new EmbeddedFile( *new EmbeddedFileData( filespec ) ) ); + break; + } + case Annot::typeSound: /* TODO: Move logic to getters */ + { + AnnotSound * soundann = static_cast< AnnotSound * >( ann ); + SoundAnnotation * s = new SoundAnnotation(); + annotation = s; + + // -> soundIcon + s->setSoundIconName( QString::fromLatin1( soundann->getName()->getCString() ) ); + // -> sound + s->setSound( new SoundObject( soundann->getSound() ) ); + break; + } + case Annot::typeMovie: /* TODO: Move logic to getters */ + { + AnnotMovie * movieann = static_cast< AnnotMovie * >( ann ); + MovieAnnotation * m = new MovieAnnotation(); + annotation = m; + + // -> movie + MovieObject *movie = new MovieObject( movieann ); + m->setMovie( movie ); + // -> movieTitle + GooString * movietitle = movieann->getTitle(); + if ( movietitle ) + m->setMovieTitle( QString::fromLatin1( movietitle->getCString() ) ); + break; + } + case Annot::typeScreen: + { + AnnotScreen * screenann = static_cast< AnnotScreen * >( ann ); + if (!screenann->getAction()) + continue; + ScreenAnnotation * s = new ScreenAnnotation(); + annotation = s; + + // -> screen + Link * popplerLink = PageData::convertLinkActionToLink( screenann->getAction(), doc, QRectF() ); + s->setAction( static_cast(popplerLink) ); + + // -> screenTitle + GooString * screentitle = screenann->getTitle(); + if ( screentitle ) + s->setScreenTitle( UnicodeParsedString( screentitle ) ); + break; + } + case Annot::typePopup: + continue; // popups are parsed by Annotation's window() getter + case Annot::typeUnknown: + continue; // special case for ignoring unknown annotations + case Annot::typeWidget: + continue; // handled as forms or some other way + default: + { +#define CASE_FOR_TYPE( thetype ) \ + case Annot::type ## thetype: \ + error(errUnimplemented, -1, "Annotation " #thetype " not supported"); \ + break; + switch ( subType ) + { + CASE_FOR_TYPE( PrinterMark ) + CASE_FOR_TYPE( TrapNet ) + CASE_FOR_TYPE( Watermark ) + CASE_FOR_TYPE( 3D ) + default: error(errUnimplemented, -1, "Annotation %u not supported", subType); + } + continue; +#undef CASE_FOR_TYPE + } + } + + annotation->d_ptr->tieToNativeAnnot(ann, pdfPage, doc); + res.append(annotation); + } + + return res; +} + +Ref AnnotationPrivate::pdfObjectReference() const +{ + if (pdfAnnot == 0) + { + const Ref invalid_ref = { -1, -1 }; + return invalid_ref; + } + + return pdfAnnot->getRef(); +} + +void AnnotationPrivate::addAnnotationToPage(::Page *pdfPage, DocumentData *doc, const Annotation * ann) +{ + if (ann->d_ptr->pdfAnnot != 0) + { + error(errIO, -1, "Annotation is already tied"); + return; + } + + // Unimplemented annotations can't be created by the user because their ctor + // is private. Therefore, createNativeAnnot will never return 0 + Annot *nativeAnnot = ann->d_ptr->createNativeAnnot(pdfPage, doc); + Q_ASSERT(nativeAnnot); + pdfPage->addAnnot(nativeAnnot); +} + +void AnnotationPrivate::removeAnnotationFromPage(::Page *pdfPage, const Annotation * ann) +{ + if (ann->d_ptr->pdfAnnot == 0) + { + error(errIO, -1, "Annotation is not tied"); + return; + } + + if (ann->d_ptr->pdfPage != pdfPage) + { + error(errIO, -1, "Annotation doesn't belong to the specified page"); + return; + } + + // Remove popup window + AnnotMarkup *markupann = dynamic_cast(ann->d_ptr->pdfAnnot); + if (markupann && markupann->getPopup()) + pdfPage->removeAnnot(markupann->getPopup()); + + // Remove appearance streams (if any) + ann->d_ptr->pdfAnnot->invalidateAppearance(); + + // Remove annotation + pdfPage->removeAnnot(ann->d_ptr->pdfAnnot); + + // Destroy object + delete ann; } +class Annotation::Style::Private : public QSharedData +{ + public: + Private() + : opacity( 1.0 ), width( 1.0 ), lineStyle( Solid ), xCorners( 0.0 ), + yCorners( 0.0 ), lineEffect( NoEffect ), effectIntensity( 1.0 ) + { + dashArray.resize(1); + dashArray[0] = 3; + } + + QColor color; + double opacity; + double width; + Annotation::LineStyle lineStyle; + double xCorners; + double yCorners; + QVector dashArray; + Annotation::LineEffect lineEffect; + double effectIntensity; +}; Annotation::Style::Style() - : opacity( 1.0 ), width( 1.0 ), style( Solid ), xCorners( 0.0 ), - yCorners( 0.0 ), marks( 3 ), spaces( 0 ), effect( NoEffect ), - effectIntensity( 1.0 ) {} + : d ( new Private ) +{ +} -Annotation::Window::Window() - : flags( -1 ), width( 0 ), height( 0 ) {} +Annotation::Style::Style( const Style &other ) + : d( other.d ) +{ +} + +Annotation::Style& Annotation::Style::operator=( const Style &other ) +{ + if ( this != &other ) + d = other.d; + + return *this; +} -Annotation::Revision::Revision() - : annotation( 0 ), scope( Reply ), type( None ) {} +Annotation::Style::~Style() +{ +} + +QColor Annotation::Style::color() const +{ + return d->color; +} + +void Annotation::Style::setColor(const QColor &color) +{ + d->color = color; +} + +double Annotation::Style::opacity() const +{ + return d->opacity; +} + +void Annotation::Style::setOpacity(double opacity) +{ + d->opacity = opacity; +} + +double Annotation::Style::width() const +{ + return d->width; +} + +void Annotation::Style::setWidth(double width) +{ + d->width = width; +} + +Annotation::LineStyle Annotation::Style::lineStyle() const +{ + return d->lineStyle; +} + +void Annotation::Style::setLineStyle(Annotation::LineStyle style) +{ + d->lineStyle = style; +} + +double Annotation::Style::xCorners() const +{ + return d->xCorners; +} + +void Annotation::Style::setXCorners(double radius) +{ + d->xCorners = radius; +} + +double Annotation::Style::yCorners() const +{ + return d->yCorners; +} + +void Annotation::Style::setYCorners(double radius) +{ + d->yCorners = radius; +} + +const QVector& Annotation::Style::dashArray() const +{ + return d->dashArray; +} + +void Annotation::Style::setDashArray(const QVector &array) +{ + d->dashArray = array; +} + +Annotation::LineEffect Annotation::Style::lineEffect() const +{ + return d->lineEffect; +} + +void Annotation::Style::setLineEffect(Annotation::LineEffect effect) +{ + d->lineEffect = effect; +} + +double Annotation::Style::effectIntensity() const +{ + return d->effectIntensity; +} + +void Annotation::Style::setEffectIntensity(double intens) +{ + d->effectIntensity = intens; +} + +class Annotation::Popup::Private : public QSharedData +{ + public: + Private() + : flags( -1 ) {} + + int flags; + QRectF geometry; + QString title; + QString summary; + QString text; +}; + +Annotation::Popup::Popup() + : d ( new Private ) +{ +} + +Annotation::Popup::Popup( const Popup &other ) + : d( other.d ) +{ +} + +Annotation::Popup& Annotation::Popup::operator=( const Popup &other ) +{ + if ( this != &other ) + d = other.d; + + return *this; +} + +Annotation::Popup::~Popup() +{ +} + +int Annotation::Popup::flags() const +{ + return d->flags; +} + +void Annotation::Popup::setFlags( int flags ) +{ + d->flags = flags; +} + +QRectF Annotation::Popup::geometry() const +{ + return d->geometry; +} + +void Annotation::Popup::setGeometry( const QRectF &geom ) +{ + d->geometry = geom; +} + +QString Annotation::Popup::title() const +{ + return d->title; +} + +void Annotation::Popup::setTitle( const QString &title ) +{ + d->title = title; +} + +QString Annotation::Popup::summary() const +{ + return d->summary; +} + +void Annotation::Popup::setSummary( const QString &summary ) +{ + d->summary = summary; +} + +QString Annotation::Popup::text() const +{ + return d->text; +} + +void Annotation::Popup::setText( const QString &text ) +{ + d->text = text; +} Annotation::Annotation( AnnotationPrivate &dd ) : d_ptr( &dd ) { + window.width = window.height = 0; } Annotation::~Annotation() { - Q_D( Annotation ); - // delete all children revisions - QLinkedList< Annotation::Revision >::iterator it = d->revisions.begin(), end = d->revisions.end(); - for ( ; it != end; ++it ) - delete (*it).annotation; - - delete d_ptr; } Annotation::Annotation( AnnotationPrivate &dd, const QDomNode &annNode ) : d_ptr( &dd ) { Q_D( Annotation ); + + window.width = window.height = 0; + // get the [base] element of the annotation node QDomElement e = AnnotationUtils::findChildElement( annNode, "base" ); if ( e.isNull() ) return; + Style s; + Popup w; + // parse -contents- attributes if ( e.hasAttribute( "author" ) ) - d->author = e.attribute( "author" ); + setAuthor(e.attribute( "author" )); if ( e.hasAttribute( "contents" ) ) - d->contents = e.attribute( "contents" ); + setContents(e.attribute( "contents" )); if ( e.hasAttribute( "uniqueName" ) ) - d->uniqueName = e.attribute( "uniqueName" ); + setUniqueName(e.attribute( "uniqueName" )); if ( e.hasAttribute( "modifyDate" ) ) - d->modDate = QDateTime::fromString( e.attribute( "modifyDate" ) ); + setModificationDate(QDateTime::fromString( e.attribute( "modifyDate" ) )); if ( e.hasAttribute( "creationDate" ) ) - d->creationDate = QDateTime::fromString( e.attribute( "creationDate" ) ); + setCreationDate(QDateTime::fromString( e.attribute( "creationDate" ) )); // parse -other- attributes if ( e.hasAttribute( "flags" ) ) - d->flags = e.attribute( "flags" ).toInt(); + setFlags(e.attribute( "flags" ).toInt()); if ( e.hasAttribute( "color" ) ) - style.color = QColor( e.attribute( "color" ) ); + s.setColor(QColor( e.attribute( "color" ) )); if ( e.hasAttribute( "opacity" ) ) - style.opacity = e.attribute( "opacity" ).toDouble(); + s.setOpacity(e.attribute( "opacity" ).toDouble()); // parse -the-subnodes- (describing Style, Window, Revision(s) structures) // Note: all subnodes if present must be 'attributes complete' @@ -180,48 +812,87 @@ // parse boundary if ( ee.tagName() == "boundary" ) { - d->boundary.setLeft(ee.attribute( "l" ).toDouble()); - d->boundary.setTop(ee.attribute( "t" ).toDouble()); - d->boundary.setRight(ee.attribute( "r" ).toDouble()); - d->boundary.setBottom(ee.attribute( "b" ).toDouble()); + QRectF brect; + brect.setLeft(ee.attribute( "l" ).toDouble()); + brect.setTop(ee.attribute( "t" ).toDouble()); + brect.setRight(ee.attribute( "r" ).toDouble()); + brect.setBottom(ee.attribute( "b" ).toDouble()); + setBoundary(brect); } // parse penStyle if not default else if ( ee.tagName() == "penStyle" ) { - style.width = ee.attribute( "width" ).toDouble(); - style.style = (LineStyle)ee.attribute( "style" ).toInt(); - style.xCorners = ee.attribute( "xcr" ).toDouble(); - style.yCorners = ee.attribute( "ycr" ).toDouble(); - style.marks = ee.attribute( "marks" ).toInt(); - style.spaces = ee.attribute( "spaces" ).toInt(); + s.setWidth(ee.attribute( "width" ).toDouble()); + s.setLineStyle((LineStyle)ee.attribute( "style" ).toInt()); + s.setXCorners(ee.attribute( "xcr" ).toDouble()); + s.setYCorners(ee.attribute( "ycr" ).toDouble()); + + // Try to parse dash array (new format) + QVector dashArray; + + QDomNode eeSubNode = ee.firstChild(); + while ( eeSubNode.isElement() ) + { + QDomElement eee = eeSubNode.toElement(); + eeSubNode = eeSubNode.nextSibling(); + + if ( eee.tagName() != "dashsegm" ) + continue; + + dashArray.append(eee.attribute( "len" ).toDouble()); + } + + // If no segments were found use marks/spaces (old format) + if ( dashArray.size() == 0 ) + { + dashArray.append(ee.attribute( "marks" ).toDouble()); + dashArray.append(ee.attribute( "spaces" ).toDouble()); + } + + s.setDashArray(dashArray); } // parse effectStyle if not default else if ( ee.tagName() == "penEffect" ) { - style.effect = (LineEffect)ee.attribute( "effect" ).toInt(); - style.effectIntensity = ee.attribute( "intensity" ).toDouble(); + s.setLineEffect((LineEffect)ee.attribute( "effect" ).toInt()); + s.setEffectIntensity(ee.attribute( "intensity" ).toDouble()); } // parse window if present else if ( ee.tagName() == "window" ) { - window.flags = ee.attribute( "flags" ).toInt(); - window.topLeft.setX(ee.attribute( "top" ).toDouble()); - window.topLeft.setY(ee.attribute( "left" ).toDouble()); - window.width = ee.attribute( "width" ).toInt(); - window.height = ee.attribute( "height" ).toInt(); - window.title = ee.attribute( "title" ); - window.summary = ee.attribute( "summary" ); + QRectF geom; + geom.setX(ee.attribute( "top" ).toDouble()); + geom.setY(ee.attribute( "left" ).toDouble()); + + if (ee.hasAttribute("widthDouble")) + geom.setWidth(ee.attribute( "widthDouble" ).toDouble()); + else + geom.setWidth(ee.attribute( "width" ).toDouble()); + + if (ee.hasAttribute("widthDouble")) + geom.setHeight(ee.attribute( "heightDouble" ).toDouble()); + else + geom.setHeight(ee.attribute( "height" ).toDouble()); + + w.setGeometry(geom); + + w.setFlags(ee.attribute( "flags" ).toInt()); + w.setTitle(ee.attribute( "title" )); + w.setSummary(ee.attribute( "summary" )); // parse window subnodes QDomNode winNode = ee.firstChild(); for ( ; winNode.isElement(); winNode = winNode.nextSibling() ) { QDomElement winElement = winNode.toElement(); if ( winElement.tagName() == "text" ) - window.text = winElement.firstChild().toCDATASection().data(); + w.setText(winElement.firstChild().toCDATASection().data()); } } } + setStyle(s); // assign parsed style + setPopup(w); // assign parsed window + // get the [revisions] element of the annotation node QDomNode revNode = annNode.firstChild(); for ( ; revNode.isElement(); revNode = revNode.nextSibling() ) @@ -230,216 +901,626 @@ if ( revElement.tagName() != "revision" ) continue; - // compile the Revision structure crating annotation - Revision rev; - rev.scope = (RevScope)revElement.attribute( "revScope" ).toInt(); - rev.type = (RevType)revElement.attribute( "revType" ).toInt(); - rev.annotation = AnnotationUtils::createAnnotation( revElement ); + Annotation *reply = AnnotationUtils::createAnnotation( revElement ); - // if annotation is valid, add revision to internal list - if ( rev.annotation ) - d->revisions.append( rev ); + if (reply) // if annotation is valid, add as a revision of this annotation + { + RevScope scope = (RevScope)revElement.attribute( "revScope" ).toInt(); + RevType type = (RevType)revElement.attribute( "revType" ).toInt(); + d->addRevision(reply, scope, type); + delete reply; + } } } -void Annotation::store( QDomNode & annNode, QDomDocument & document ) const +void Annotation::storeBaseAnnotationProperties( QDomNode & annNode, QDomDocument & document ) const { - Q_D( const Annotation ); // create [base] element of the annotation node QDomElement e = document.createElement( "base" ); annNode.appendChild( e ); + const Style s = style(); + const Popup w = popup(); + // store -contents- attributes - if ( !d->author.isEmpty() ) - e.setAttribute( "author", d->author ); - if ( !d->contents.isEmpty() ) - e.setAttribute( "contents", d->contents ); - if ( !d->uniqueName.isEmpty() ) - e.setAttribute( "uniqueName", d->uniqueName ); - if ( d->modDate.isValid() ) - e.setAttribute( "modifyDate", d->modDate.toString() ); - if ( d->creationDate.isValid() ) - e.setAttribute( "creationDate", d->creationDate.toString() ); + if ( !author().isEmpty() ) + e.setAttribute( "author", author() ); + if ( !contents().isEmpty() ) + e.setAttribute( "contents", contents() ); + if ( !uniqueName().isEmpty() ) + e.setAttribute( "uniqueName", uniqueName() ); + if ( modificationDate().isValid() ) + e.setAttribute( "modifyDate", modificationDate().toString() ); + if ( creationDate().isValid() ) + e.setAttribute( "creationDate", creationDate().toString() ); // store -other- attributes - if ( d->flags ) - e.setAttribute( "flags", d->flags ); - if ( style.color.isValid() && style.color != Qt::black ) - e.setAttribute( "color", style.color.name() ); - if ( style.opacity != 1.0 ) - e.setAttribute( "opacity", QString::number( style.opacity ) ); + if ( flags() ) + e.setAttribute( "flags", flags() ); + if ( s.color().isValid() ) + e.setAttribute( "color", s.color().name() ); + if ( s.opacity() != 1.0 ) + e.setAttribute( "opacity", QString::number( s.opacity() ) ); // Sub-Node-1 - boundary + const QRectF brect = boundary(); QDomElement bE = document.createElement( "boundary" ); e.appendChild( bE ); - bE.setAttribute( "l", QString::number( (double)d->boundary.left() ) ); - bE.setAttribute( "t", QString::number( (double)d->boundary.top() ) ); - bE.setAttribute( "r", QString::number( (double)d->boundary.right() ) ); - bE.setAttribute( "b", QString::number( (double)d->boundary.bottom() ) ); + bE.setAttribute( "l", QString::number( (double)brect.left() ) ); + bE.setAttribute( "t", QString::number( (double)brect.top() ) ); + bE.setAttribute( "r", QString::number( (double)brect.right() ) ); + bE.setAttribute( "b", QString::number( (double)brect.bottom() ) ); // Sub-Node-2 - penStyle - if ( style.width != 1 || style.style != Solid || style.xCorners != 0 || - style.yCorners != 0.0 || style.marks != 3 || style.spaces != 0 ) + const QVector dashArray = s.dashArray(); + if ( s.width() != 1 || s.lineStyle() != Solid || s.xCorners() != 0 || + s.yCorners() != 0.0 || dashArray.size() != 1 || dashArray[0] != 3 ) { QDomElement psE = document.createElement( "penStyle" ); e.appendChild( psE ); - psE.setAttribute( "width", QString::number( style.width ) ); - psE.setAttribute( "style", (int)style.style ); - psE.setAttribute( "xcr", QString::number( style.xCorners ) ); - psE.setAttribute( "ycr", QString::number( style.yCorners ) ); - psE.setAttribute( "marks", style.marks ); - psE.setAttribute( "spaces", style.spaces ); + psE.setAttribute( "width", QString::number( s.width() ) ); + psE.setAttribute( "style", (int)s.lineStyle() ); + psE.setAttribute( "xcr", QString::number( s.xCorners() ) ); + psE.setAttribute( "ycr", QString::number( s.yCorners() ) ); + + int marks = 3, spaces = 0; // Do not break code relying on marks/spaces + if (dashArray.size() != 0) + marks = (int)dashArray[0]; + if (dashArray.size() > 1) + spaces = (int)dashArray[1]; + + psE.setAttribute( "marks", marks ); + psE.setAttribute( "spaces", spaces ); + + foreach (double segm, dashArray) + { + QDomElement pattE = document.createElement( "dashsegm" ); + pattE.setAttribute( "len", QString::number( segm ) ); + psE.appendChild(pattE); + } } // Sub-Node-3 - penEffect - if ( style.effect != NoEffect || style.effectIntensity != 1.0 ) + if ( s.lineEffect() != NoEffect || s.effectIntensity() != 1.0 ) { QDomElement peE = document.createElement( "penEffect" ); e.appendChild( peE ); - peE.setAttribute( "effect", (int)style.effect ); - peE.setAttribute( "intensity", QString::number( style.effectIntensity ) ); + peE.setAttribute( "effect", (int)s.lineEffect() ); + peE.setAttribute( "intensity", QString::number( s.effectIntensity() ) ); } // Sub-Node-4 - window - if ( window.flags != -1 || !window.title.isEmpty() || - !window.summary.isEmpty() || !window.text.isEmpty() ) + if ( w.flags() != -1 || !w.title().isEmpty() || !w.summary().isEmpty() || + !w.text().isEmpty() ) { QDomElement wE = document.createElement( "window" ); + const QRectF geom = w.geometry(); e.appendChild( wE ); - wE.setAttribute( "flags", window.flags ); - wE.setAttribute( "top", QString::number( window.topLeft.x() ) ); - wE.setAttribute( "left", QString::number( window.topLeft.y() ) ); - wE.setAttribute( "width", window.width ); - wE.setAttribute( "height", window.height ); - wE.setAttribute( "title", window.title ); - wE.setAttribute( "summary", window.summary ); + wE.setAttribute( "flags", w.flags() ); + wE.setAttribute( "top", QString::number( geom.x() ) ); + wE.setAttribute( "left", QString::number( geom.y() ) ); + wE.setAttribute( "width", (int)geom.width() ); + wE.setAttribute( "height", (int)geom.height() ); + wE.setAttribute( "widthDouble", QString::number( geom.width() ) ); + wE.setAttribute( "heightDouble", QString::number( geom.height() ) ); + wE.setAttribute( "title", w.title() ); + wE.setAttribute( "summary", w.summary() ); // store window.text as a subnode, because we need escaped data - if ( !window.text.isEmpty() ) + if ( !w.text().isEmpty() ) { QDomElement escapedText = document.createElement( "text" ); wE.appendChild( escapedText ); - QDomCDATASection textCData = document.createCDATASection( window.text ); + QDomCDATASection textCData = document.createCDATASection( w.text() ); escapedText.appendChild( textCData ); } } + const QList revs = revisions(); + // create [revision] element of the annotation node (if any) - if ( d->revisions.isEmpty() ) + if ( revs.isEmpty() ) return; // add all revisions as children of revisions element - QLinkedList< Revision >::const_iterator it = d->revisions.begin(), end = d->revisions.end(); - for ( ; it != end; ++it ) + foreach (const Annotation *rev, revs) { - // create revision element - const Revision & revision = *it; QDomElement r = document.createElement( "revision" ); annNode.appendChild( r ); // set element attributes - r.setAttribute( "revScope", (int)revision.scope ); - r.setAttribute( "revType", (int)revision.type ); + r.setAttribute( "revScope", (int)rev->revisionScope() ); + r.setAttribute( "revType", (int)rev->revisionType() ); // use revision as the annotation element, so fill it up - AnnotationUtils::storeAnnotation( revision.annotation, r, document ); + AnnotationUtils::storeAnnotation( rev, r, document ); + delete rev; } } QString Annotation::author() const { Q_D( const Annotation ); - return d->author; + + if (!d->pdfAnnot) + return d->author; + + const AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + return markupann ? UnicodeParsedString( markupann->getLabel() ) : QString(); } void Annotation::setAuthor( const QString &author ) { Q_D( Annotation ); - d->author = author; + + if (!d->pdfAnnot) + { + d->author = author; + return; + } + + AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + if (markupann) + { + GooString *s = QStringToUnicodeGooString(author); + markupann->setLabel(s); + delete s; + } } QString Annotation::contents() const { Q_D( const Annotation ); - return d->contents; + + if (!d->pdfAnnot) + return d->contents; + + return UnicodeParsedString( d->pdfAnnot->getContents() ); } void Annotation::setContents( const QString &contents ) { Q_D( Annotation ); - d->contents = contents; + + if (!d->pdfAnnot) + { + d->contents = contents; + return; + } + + GooString *s = QStringToUnicodeGooString(contents); + d->pdfAnnot->setContents(s); + delete s; + d->pdfAnnot->invalidateAppearance(); } QString Annotation::uniqueName() const { Q_D( const Annotation ); - return d->uniqueName; + + if (!d->pdfAnnot) + return d->uniqueName; + + return UnicodeParsedString( d->pdfAnnot->getName() ); } void Annotation::setUniqueName( const QString &uniqueName ) { Q_D( Annotation ); - d->uniqueName = uniqueName; + + if (!d->pdfAnnot) + { + d->uniqueName = uniqueName; + return; + } + + QByteArray ascii = uniqueName.toAscii(); + GooString s(ascii.constData()); + d->pdfAnnot->setName(&s); } QDateTime Annotation::modificationDate() const { Q_D( const Annotation ); - return d->modDate; + + if (!d->pdfAnnot) + return d->modDate; + + if ( d->pdfAnnot->getModified() ) + return convertDate( d->pdfAnnot->getModified()->getCString() ); + else + return QDateTime(); } void Annotation::setModificationDate( const QDateTime &date ) { Q_D( Annotation ); - d->modDate = date; + + if (!d->pdfAnnot) + { + d->modDate = date; + return; + } + +#if 0 // TODO: Conversion routine is broken + if (d->pdfAnnot) + { + time_t t = date.toTime_t(); + GooString *s = timeToDateString(&t); + d->pdfAnnot->setModified(s); + delete s; + } +#endif } QDateTime Annotation::creationDate() const { Q_D( const Annotation ); - return d->creationDate; + + if (!d->pdfAnnot) + return d->creationDate; + + const AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + + if (markupann && markupann->getDate()) + return convertDate( markupann->getDate()->getCString() ); + + return modificationDate(); } void Annotation::setCreationDate( const QDateTime &date ) { Q_D( Annotation ); - d->creationDate = date; + + if (!d->pdfAnnot) + { + d->creationDate = date; + return; + } + +#if 0 // TODO: Conversion routine is broken + AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + if (markupann) + { + time_t t = date.toTime_t(); + GooString *s = timeToDateString(&t); + markupann->setDate(s); + delete s; + } +#endif +} + +static int fromPdfFlags(int flags) +{ + int qtflags = 0; + + if ( flags & Annot::flagHidden ) + qtflags |= Annotation::Hidden; + if ( flags & Annot::flagNoZoom ) + qtflags |= Annotation::FixedSize; + if ( flags & Annot::flagNoRotate ) + qtflags |= Annotation::FixedRotation; + if ( !( flags & Annot::flagPrint ) ) + qtflags |= Annotation::DenyPrint; + if ( flags & Annot::flagReadOnly ) + qtflags |= (Annotation::DenyWrite | Annotation::DenyDelete); + if ( flags & Annot::flagLocked ) + qtflags |= Annotation::DenyDelete; + if ( flags & Annot::flagToggleNoView ) + qtflags |= Annotation::ToggleHidingOnMouse; + + return qtflags; +} + +static int toPdfFlags(int qtflags) +{ + int flags = 0; + + if ( qtflags & Annotation::Hidden ) + flags |= Annot::flagHidden; + if ( qtflags & Annotation::FixedSize ) + flags |= Annot::flagNoZoom; + if ( qtflags & Annotation::FixedRotation ) + flags |= Annot::flagNoRotate; + if ( !( qtflags & Annotation::DenyPrint ) ) + flags |= Annot::flagPrint; + if ( qtflags & Annotation::DenyWrite ) + flags |= Annot::flagReadOnly; + if ( qtflags & Annotation::DenyDelete ) + flags |= Annot::flagLocked; + if ( qtflags & Annotation::ToggleHidingOnMouse ) + flags |= Annot::flagToggleNoView; + + return flags; } int Annotation::flags() const { Q_D( const Annotation ); - return d->flags; + + if (!d->pdfAnnot) + return d->flags; + + return fromPdfFlags( d->pdfAnnot->getFlags() ); } void Annotation::setFlags( int flags ) { Q_D( Annotation ); - d->flags = flags; + + if (!d->pdfAnnot) + { + d->flags = flags; + return; + } + + d->pdfAnnot->setFlags(toPdfFlags( flags )); + d->pdfAnnot->invalidateAppearance(); } QRectF Annotation::boundary() const { Q_D( const Annotation ); - return d->boundary; + + if (!d->pdfAnnot) + return d->boundary; + + const PDFRectangle * rect = d->pdfAnnot->getRect(); + return d->fromPdfRectangle( *rect ); } void Annotation::setBoundary( const QRectF &boundary ) { Q_D( Annotation ); - d->boundary = boundary; + + if (!d->pdfAnnot) + { + d->boundary = boundary; + return; + } + + PDFRectangle rect = d->toPdfRectangle(boundary); + d->pdfAnnot->setRect(&rect); + d->pdfAnnot->invalidateAppearance(); +} + +Annotation::Style Annotation::style() const +{ + Q_D( const Annotation ); + + if (!d->pdfAnnot) + return d->style; + + Style s; + s.setColor(convertAnnotColor( d->pdfAnnot->getColor() )); + + const AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + if (markupann) + s.setOpacity( markupann->getOpacity() ); + + const AnnotBorder *border = d->pdfAnnot->getBorder(); + if (border) + { + if ( border->getType() == AnnotBorder::typeArray ) + { + const AnnotBorderArray *border_array = static_cast(border); + s.setXCorners( border_array->getHorizontalCorner() ); + s.setYCorners( border_array->getVerticalCorner() ); + } + + s.setWidth( border->getWidth() ); + s.setLineStyle((Annotation::LineStyle)( 1 << border->getStyle() )); + + const int dashArrLen = border->getDashLength(); + const double* dashArrData = border->getDash(); + QVector dashArrVect( dashArrLen ); + for (int i = 0; i < dashArrLen; ++i) + dashArrVect[i] = dashArrData[i]; + s.setDashArray(dashArrVect); + } + + AnnotBorderEffect *border_effect; + switch (d->pdfAnnot->getType()) + { + case Annot::typeFreeText: + border_effect = static_cast(d->pdfAnnot)->getBorderEffect(); + break; + case Annot::typeSquare: + case Annot::typeCircle: + border_effect = static_cast(d->pdfAnnot)->getBorderEffect(); + break; + default: + border_effect = 0; + } + if (border_effect) + { + s.setLineEffect( (Annotation::LineEffect)border_effect->getEffectType() ); + s.setEffectIntensity( border_effect->getIntensity() ); + } + + return s; +} + +void Annotation::setStyle( const Annotation::Style& style ) +{ + Q_D( Annotation ); + + if (!d->pdfAnnot) + { + d->style = style; + return; + } + + d->pdfAnnot->setColor(convertQColor( style.color() )); + + AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + if (markupann) + markupann->setOpacity( style.opacity() ); + + AnnotBorderArray * border = new AnnotBorderArray(); + border->setWidth( style.width() ); + border->setHorizontalCorner( style.xCorners() ); + border->setVerticalCorner( style.yCorners() ); + d->pdfAnnot->setBorder(border); + d->pdfAnnot->invalidateAppearance(); +} + +Annotation::Popup Annotation::popup() const +{ + Q_D( const Annotation ); + + if (!d->pdfAnnot) + return d->popup; + + Popup w; + AnnotPopup *popup = 0; + int flags = -1; // Not initialized + + const AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + if (markupann) + { + popup = markupann->getPopup(); + w.setSummary(UnicodeParsedString( markupann->getSubject() )); + } + + if (popup) + { + flags = fromPdfFlags( popup->getFlags() ) & ( Annotation::Hidden | + Annotation::FixedSize | Annotation::FixedRotation ); + + if (!popup->getOpen()) + flags |= Annotation::Hidden; + + const PDFRectangle * rect = popup->getRect(); + w.setGeometry( d->fromPdfRectangle( *rect ) ); + } + + if (d->pdfAnnot->getType() == Annot::typeText) + { + const AnnotText * textann = static_cast(d->pdfAnnot); + + // Text annotations default to same rect as annotation + if (flags == -1) + { + flags = 0; + w.setGeometry( boundary() ); + } + + // If text is not 'opened', force window hiding. if the window + // was parsed from popup, the flag should already be set + if ( !textann->getOpen() && flags != -1 ) + flags |= Annotation::Hidden; + } + + w.setFlags(flags); + + return w; } -QLinkedList< Annotation::Revision >& Annotation::revisions() +void Annotation::setPopup( const Annotation::Popup& popup ) { Q_D( Annotation ); - return d->revisions; + + if (!d->pdfAnnot) + { + d->popup = popup; + return; + } + +#if 0 /* TODO: Remove old popup and add AnnotPopup to page */ + AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + if (!markupann) + return; + + // Create a new AnnotPopup and assign it to pdfAnnot + PDFRectangle rect = d->toPdfRectangle( popup.geometry() ); + AnnotPopup * p = new AnnotPopup( d->pdfPage->getDoc(), &rect ); + p->setOpen( !(popup.flags() & Annotation::Hidden) ); + if (!popup.summary().isEmpty()) + { + GooString *s = QStringToUnicodeGooString(popup.summary()); + markupann->setLabel(s); + delete s; + } + markupann->setPopup(p); +#endif } -const QLinkedList< Annotation::Revision >& Annotation::revisions() const +Annotation::RevScope Annotation::revisionScope() const { Q_D( const Annotation ); - return d->revisions; + + if (!d->pdfAnnot) + return d->revisionScope; + + const AnnotMarkup *markupann = dynamic_cast(d->pdfAnnot); + + if (markupann && markupann->getInReplyToID() != 0) + { + switch (markupann->getReplyTo()) + { + case AnnotMarkup::replyTypeR: + return Annotation::Reply; + case AnnotMarkup::replyTypeGroup: + return Annotation::Group; + } + } + + return Annotation::Root; // It's not a revision } -//END AnnotationUtils implementation +Annotation::RevType Annotation::revisionType() const +{ + Q_D( const Annotation ); + + if (!d->pdfAnnot) + return d->revisionType; + + const AnnotText *textann = dynamic_cast(d->pdfAnnot); + + if (textann && textann->getInReplyToID() != 0) + { + switch (textann->getState()) + { + case AnnotText::stateMarked: + return Annotation::Marked; + case AnnotText::stateUnmarked: + return Annotation::Unmarked; + case AnnotText::stateAccepted: + return Annotation::Accepted; + case AnnotText::stateRejected: + return Annotation::Rejected; + case AnnotText::stateCancelled: + return Annotation::Cancelled; + case AnnotText::stateCompleted: + return Annotation::Completed; + default: + break; + } + } + + return Annotation::None; +} + +QList Annotation::revisions() const +{ + Q_D( const Annotation ); + + if (!d->pdfAnnot) + { + /* Return aliases, whose ownership goes to the caller */ + QList res; + foreach (Annotation *rev, d->revisions) + res.append( rev->d_ptr->makeAlias() ); + return res; + } + + /* If the annotation doesn't live in a object on its own (eg bug51361), it + * has no ref, therefore it can't have revisions */ + if ( !d->pdfAnnot->getHasRef() ) + return QList(); + + return AnnotationPrivate::findAnnotations( d->pdfPage, d->parentDoc, d->pdfAnnot->getId() ); +} + +//END Annotation implementation /** TextAnnotation [Annotation] */ @@ -447,15 +1528,19 @@ { public: TextAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields TextAnnotation::TextType textType; QString textIcon; QFont textFont; int inplaceAlign; // 0:left, 1:center, 2:right - QString inplaceText; // overrides contents - QPointF inplaceCallout[3]; + QVector inplaceCallout; TextAnnotation::InplaceIntent inplaceIntent; + + // Helper + static GooString * toAppearanceString(const QFont &font); }; TextAnnotationPrivate::TextAnnotationPrivate() @@ -465,15 +1550,65 @@ { } -TextAnnotation::TextAnnotation() +Annotation * TextAnnotationPrivate::makeAlias() +{ + return new TextAnnotation(*this); +} + +GooString * TextAnnotationPrivate::toAppearanceString(const QFont &font) +{ + GooString * s = GooString::format("/Invalid_font {0:d} Tf", font.pointSize()); + // TODO: Font family, style (bold, italic, ...) and pointSize as float + return s; +} + +Annot* TextAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + // Setters are defined in the public class + TextAnnotation *q = static_cast( makeAlias() ); + + // Set page and contents + pdfPage = destPage; + parentDoc = doc; + + // Set pdfAnnot + PDFRectangle rect = toPdfRectangle(boundary); + if (textType == TextAnnotation::Linked) + { + pdfAnnot = new AnnotText(destPage->getDoc(), &rect); + } + else + { + GooString * da = toAppearanceString(textFont); + pdfAnnot = new AnnotFreeText(destPage->getDoc(), &rect, da); + delete da; + } + + // Set properties + flushBaseAnnotationProperties(); + q->setTextIcon(textIcon); + q->setInplaceAlign(inplaceAlign); + q->setCalloutPoints(inplaceCallout); + q->setInplaceIntent(inplaceIntent); + + delete q; + + return pdfAnnot; +} + +TextAnnotation::TextAnnotation( TextAnnotation::TextType type ) : Annotation( *new TextAnnotationPrivate() ) +{ + setTextType( type ); +} + +TextAnnotation::TextAnnotation(TextAnnotationPrivate &dd) + : Annotation( dd ) {} TextAnnotation::TextAnnotation( const QDomNode & node ) : Annotation( *new TextAnnotationPrivate, node ) { - Q_D( TextAnnotation ); - // loop through the whole children looking for a 'text' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -485,15 +1620,19 @@ // parse the attributes if ( e.hasAttribute( "type" ) ) - d->textType = (TextAnnotation::TextType)e.attribute( "type" ).toInt(); + setTextType((TextAnnotation::TextType)e.attribute( "type" ).toInt()); if ( e.hasAttribute( "icon" ) ) - d->textIcon = e.attribute( "icon" ); + setTextIcon(e.attribute( "icon" )); if ( e.hasAttribute( "font" ) ) - d->textFont.fromString( e.attribute( "font" ) ); + { + QFont font; + font.fromString( e.attribute( "font" ) ); + setTextFont(font); + } if ( e.hasAttribute( "align" ) ) - d->inplaceAlign = e.attribute( "align" ).toInt(); + setInplaceAlign(e.attribute( "align" ).toInt()); if ( e.hasAttribute( "intent" ) ) - d->inplaceIntent = (TextAnnotation::InplaceIntent)e.attribute( "intent" ).toInt(); + setInplaceIntent((TextAnnotation::InplaceIntent)e.attribute( "intent" ).toInt()); // parse the subnodes QDomNode eSubNode = e.firstChild(); @@ -504,16 +1643,18 @@ if ( ee.tagName() == "escapedText" ) { - d->inplaceText = ee.firstChild().toCDATASection().data(); + setInplaceText(ee.firstChild().toCDATASection().data()); } else if ( ee.tagName() == "callout" ) { - d->inplaceCallout[0].setX(ee.attribute( "ax" ).toDouble()); - d->inplaceCallout[0].setY(ee.attribute( "ay" ).toDouble()); - d->inplaceCallout[1].setX(ee.attribute( "bx" ).toDouble()); - d->inplaceCallout[1].setY(ee.attribute( "by" ).toDouble()); - d->inplaceCallout[2].setX(ee.attribute( "cx" ).toDouble()); - d->inplaceCallout[2].setY(ee.attribute( "cy" ).toDouble()); + QVector points(3); + points[0] = QPointF(ee.attribute( "ax" ).toDouble(), + ee.attribute( "ay" ).toDouble()); + points[1] = QPointF(ee.attribute( "bx" ).toDouble(), + ee.attribute( "by" ).toDouble()); + points[2] = QPointF(ee.attribute( "cx" ).toDouble(), + ee.attribute( "cy" ).toDouble()); + setCalloutPoints(points); } } @@ -528,47 +1669,45 @@ void TextAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const TextAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [text] element QDomElement textElement = document.createElement( "text" ); node.appendChild( textElement ); // store the optional attributes - if ( d->textType != Linked ) - textElement.setAttribute( "type", (int)d->textType ); - if ( d->textIcon != "Comment" ) - textElement.setAttribute( "icon", d->textIcon ); - if ( d->inplaceAlign ) - textElement.setAttribute( "align", d->inplaceAlign ); - if ( d->inplaceIntent != Unknown ) - textElement.setAttribute( "intent", (int)d->inplaceIntent ); + if ( textType() != Linked ) + textElement.setAttribute( "type", (int)textType() ); + if ( textIcon() != "Note" ) + textElement.setAttribute( "icon", textIcon() ); + if ( inplaceAlign() ) + textElement.setAttribute( "align", inplaceAlign() ); + if ( inplaceIntent() != Unknown ) + textElement.setAttribute( "intent", (int)inplaceIntent() ); - textElement.setAttribute( "font", d->textFont.toString() ); + textElement.setAttribute( "font", textFont().toString() ); // Sub-Node-1 - escapedText - if ( !d->inplaceText.isEmpty() ) + if ( !inplaceText().isEmpty() ) { QDomElement escapedText = document.createElement( "escapedText" ); textElement.appendChild( escapedText ); - QDomCDATASection textCData = document.createCDATASection( d->inplaceText ); + QDomCDATASection textCData = document.createCDATASection( inplaceText() ); escapedText.appendChild( textCData ); } // Sub-Node-2 - callout - if ( d->inplaceCallout[0].x() != 0.0 ) + if ( calloutPoint(0).x() != 0.0 ) { QDomElement calloutElement = document.createElement( "callout" ); textElement.appendChild( calloutElement ); - calloutElement.setAttribute( "ax", QString::number( d->inplaceCallout[0].x() ) ); - calloutElement.setAttribute( "ay", QString::number( d->inplaceCallout[0].y() ) ); - calloutElement.setAttribute( "bx", QString::number( d->inplaceCallout[1].x() ) ); - calloutElement.setAttribute( "by", QString::number( d->inplaceCallout[1].y() ) ); - calloutElement.setAttribute( "cx", QString::number( d->inplaceCallout[2].x() ) ); - calloutElement.setAttribute( "cy", QString::number( d->inplaceCallout[2].y() ) ); + calloutElement.setAttribute( "ax", QString::number( calloutPoint(0).x() ) ); + calloutElement.setAttribute( "ay", QString::number( calloutPoint(0).y() ) ); + calloutElement.setAttribute( "bx", QString::number( calloutPoint(1).x() ) ); + calloutElement.setAttribute( "by", QString::number( calloutPoint(1).y() ) ); + calloutElement.setAttribute( "cx", QString::number( calloutPoint(2).x() ) ); + calloutElement.setAttribute( "cy", QString::number( calloutPoint(2).y() ) ); } } @@ -580,91 +1719,274 @@ TextAnnotation::TextType TextAnnotation::textType() const { Q_D( const TextAnnotation ); - return d->textType; + + if (!d->pdfAnnot) + return d->textType; + + return d->pdfAnnot->getType() == Annot::typeText ? + TextAnnotation::Linked : TextAnnotation::InPlace; } void TextAnnotation::setTextType( TextAnnotation::TextType type ) { Q_D( TextAnnotation ); - d->textType = type; + + if (!d->pdfAnnot) + { + d->textType = type; + return; + } + + // Type cannot be changed if annotation is already tied } QString TextAnnotation::textIcon() const { Q_D( const TextAnnotation ); - return d->textIcon; + + if (!d->pdfAnnot) + return d->textIcon; + + if (d->pdfAnnot->getType() == Annot::typeText) + { + const AnnotText * textann = static_cast(d->pdfAnnot); + return QString::fromLatin1( textann->getIcon()->getCString() ); + } + + return QString(); } void TextAnnotation::setTextIcon( const QString &icon ) { Q_D( TextAnnotation ); - d->textIcon = icon; + + if (!d->pdfAnnot) + { + d->textIcon = icon; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeText) + { + AnnotText * textann = static_cast(d->pdfAnnot); + QByteArray encoded = icon.toLatin1(); + GooString s(encoded.constData()); + textann->setIcon(&s); + d->pdfAnnot->invalidateAppearance(); + } } QFont TextAnnotation::textFont() const { Q_D( const TextAnnotation ); - return d->textFont; + + if (!d->pdfAnnot) + return d->textFont; + + QFont font; + + if (d->pdfAnnot->getType() == Annot::typeFreeText) + { + const AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + const GooString * da = ftextann->getAppearanceString(); + if (da) + { + // At the moment, only font size is parsed + QString style = QString::fromLatin1( da->getCString() ); + QRegExp rx("(\\d+)(\\.\\d*)? Tf"); + if (rx.indexIn(style) != -1) + font.setPointSize( rx.cap(1).toInt() ); + // TODO: Other properties + } + } + + return font; } -void TextAnnotation::setTextFont( const QFont &font ) -{ - Q_D( TextAnnotation ); - d->textFont = font; +void TextAnnotation::setTextFont( const QFont &font ) +{ + Q_D( TextAnnotation ); + + if (!d->pdfAnnot) + { + d->textFont = font; + return; + } + + if (d->pdfAnnot->getType() != Annot::typeFreeText) + return; + + AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + GooString * da = TextAnnotationPrivate::toAppearanceString(font); + ftextann->setAppearanceString(da); + delete da; + d->pdfAnnot->invalidateAppearance(); } int TextAnnotation::inplaceAlign() const { Q_D( const TextAnnotation ); - return d->inplaceAlign; + + if (!d->pdfAnnot) + return d->inplaceAlign; + + if (d->pdfAnnot->getType() == Annot::typeFreeText) + { + const AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + return ftextann->getQuadding(); + } + + return 0; } void TextAnnotation::setInplaceAlign( int align ) { Q_D( TextAnnotation ); - d->inplaceAlign = align; + + if (!d->pdfAnnot) + { + d->inplaceAlign = align; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeFreeText) + { + AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + ftextann->setQuadding((AnnotFreeText::AnnotFreeTextQuadding)align); + d->pdfAnnot->invalidateAppearance(); + } } QString TextAnnotation::inplaceText() const { - Q_D( const TextAnnotation ); - return d->inplaceText; + return contents(); } void TextAnnotation::setInplaceText( const QString &text ) { - Q_D( TextAnnotation ); - d->inplaceText = text; + setContents(text); } QPointF TextAnnotation::calloutPoint( int id ) const { - if ( id < 0 || id >= 3 ) + const QVector points = calloutPoints(); + if ( id < 0 || id >= points.size() ) return QPointF(); + else + return points[id]; +} +QVector TextAnnotation::calloutPoints() const +{ Q_D( const TextAnnotation ); - return d->inplaceCallout[id]; + + if (!d->pdfAnnot) + return d->inplaceCallout; + + if (d->pdfAnnot->getType() == Annot::typeText) + return QVector(); + + const AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + const AnnotCalloutLine *callout = ftextann->getCalloutLine(); + + if (!callout) + return QVector(); + + double MTX[6]; + d->fillMTX(MTX); + + const AnnotCalloutMultiLine * callout_v6 = dynamic_cast(callout); + QVector res(callout_v6 ? 3 : 2); + XPDFReader::transform(MTX, callout->getX1(), callout->getY1(), res[0]); + XPDFReader::transform(MTX, callout->getX2(), callout->getY2(), res[1]); + if (callout_v6) + XPDFReader::transform(MTX, callout_v6->getX3(), callout_v6->getY3(), res[2]); + return res; } -void TextAnnotation::setCalloutPoint( int id, const QPointF &point ) +void TextAnnotation::setCalloutPoints( const QVector &points ) { - if ( id < 0 || id >= 3 ) + Q_D( TextAnnotation ); + if (!d->pdfAnnot) + { + d->inplaceCallout = points; return; + } - Q_D( TextAnnotation ); - d->inplaceCallout[id] = point; + if (d->pdfAnnot->getType() != Annot::typeFreeText) + return; + + AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + const int count = points.size(); + + if (count == 0) + { + ftextann->setCalloutLine(0); + d->pdfAnnot->invalidateAppearance(); + return; + } + + if (count != 2 && count != 3) + { + error(errSyntaxError, -1, "Expected zero, two or three points for callout"); + return; + } + + AnnotCalloutLine *callout; + double x1, y1, x2, y2; + double MTX[6]; + d->fillMTX(MTX); + + XPDFReader::invTransform( MTX, points[0], x1, y1 ); + XPDFReader::invTransform( MTX, points[1], x2, y2 ); + if (count == 3) + { + double x3, y3; + XPDFReader::invTransform( MTX, points[2], x3, y3 ); + callout = new AnnotCalloutMultiLine(x1, y1, x2, y2, x3, y3); + } + else + { + callout = new AnnotCalloutLine(x1, y1, x2, y2); + } + + ftextann->setCalloutLine(callout); + delete callout; + d->pdfAnnot->invalidateAppearance(); } TextAnnotation::InplaceIntent TextAnnotation::inplaceIntent() const { Q_D( const TextAnnotation ); - return d->inplaceIntent; + + if (!d->pdfAnnot) + return d->inplaceIntent; + + if (d->pdfAnnot->getType() == Annot::typeFreeText) + { + const AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + return (TextAnnotation::InplaceIntent)ftextann->getIntent(); + } + + return TextAnnotation::Unknown; } void TextAnnotation::setInplaceIntent( TextAnnotation::InplaceIntent intent ) { Q_D( TextAnnotation ); - d->inplaceIntent = intent; + + if (d->pdfAnnot) + { + d->inplaceIntent = intent; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeFreeText) + { + AnnotFreeText * ftextann = static_cast(d->pdfAnnot); + ftextann->setIntent((AnnotFreeText::AnnotFreeTextIntent)intent); + d->pdfAnnot->invalidateAppearance(); + } } @@ -673,6 +1995,8 @@ { public: LineAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields (note uses border for rendering style) QLinkedList linePoints; @@ -680,6 +2004,7 @@ LineAnnotation::TermStyle lineEndStyle; bool lineClosed : 1; // (if true draw close shape) bool lineShowCaption : 1; + LineAnnotation::LineType lineType; QColor lineInnerColor; double lineLeadingFwdPt; double lineLeadingBackPt; @@ -689,20 +2014,70 @@ LineAnnotationPrivate::LineAnnotationPrivate() : AnnotationPrivate(), lineStartStyle( LineAnnotation::None ), lineEndStyle( LineAnnotation::None ), lineClosed( false ), - lineShowCaption( false ), lineLeadingFwdPt( 0 ), lineLeadingBackPt( 0 ), - lineIntent( LineAnnotation::Unknown ) + lineShowCaption( false ), lineLeadingFwdPt( 0 ), + lineLeadingBackPt( 0 ), lineIntent( LineAnnotation::Unknown ) +{ +} + +Annotation * LineAnnotationPrivate::makeAlias() +{ + return new LineAnnotation(*this); +} + +Annot* LineAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) { + // Setters are defined in the public class + LineAnnotation *q = static_cast( makeAlias() ); + + // Set page and document + pdfPage = destPage; + parentDoc = doc; + + // Set pdfAnnot + AnnotPath * path = toAnnotPath(linePoints); + PDFRectangle rect = toPdfRectangle(boundary); + if (lineType == LineAnnotation::StraightLine) + { + PDFRectangle lrect(path->getX(0), path->getY(0), path->getX(1), path->getY(1)); + pdfAnnot = new AnnotLine(doc->doc, &rect, &lrect); + } + else + { + pdfAnnot = new AnnotPolygon(doc->doc, &rect, + lineClosed ? Annot::typePolygon : Annot::typePolyLine, path ); + } + delete path; + + // Set properties + flushBaseAnnotationProperties(); + q->setLineStartStyle(lineStartStyle); + q->setLineEndStyle(lineEndStyle); + q->setLineInnerColor(lineInnerColor); + q->setLineLeadingForwardPoint(lineLeadingFwdPt); + q->setLineLeadingBackPoint(lineLeadingBackPt); + q->setLineShowCaption(lineShowCaption); + q->setLineIntent(lineIntent); + + delete q; + + linePoints.clear(); // Free up memory + + return pdfAnnot; } -LineAnnotation::LineAnnotation() +LineAnnotation::LineAnnotation( LineAnnotation::LineType type ) : Annotation( *new LineAnnotationPrivate() ) +{ + setLineType(type); +} + +LineAnnotation::LineAnnotation(LineAnnotationPrivate &dd) + : Annotation( dd ) {} LineAnnotation::LineAnnotation( const QDomNode & node ) : Annotation( *new LineAnnotationPrivate(), node ) { - Q_D( LineAnnotation ); - // loop through the whole children looking for a 'line' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -714,23 +2089,24 @@ // parse the attributes if ( e.hasAttribute( "startStyle" ) ) - d->lineStartStyle = (LineAnnotation::TermStyle)e.attribute( "startStyle" ).toInt(); + setLineStartStyle((LineAnnotation::TermStyle)e.attribute( "startStyle" ).toInt()); if ( e.hasAttribute( "endStyle" ) ) - d->lineEndStyle = (LineAnnotation::TermStyle)e.attribute( "endStyle" ).toInt(); + setLineEndStyle((LineAnnotation::TermStyle)e.attribute( "endStyle" ).toInt()); if ( e.hasAttribute( "closed" ) ) - d->lineClosed = e.attribute( "closed" ).toInt(); + setLineClosed(e.attribute( "closed" ).toInt()); if ( e.hasAttribute( "innerColor" ) ) - d->lineInnerColor = QColor( e.attribute( "innerColor" ) ); + setLineInnerColor(QColor( e.attribute( "innerColor" ) )); if ( e.hasAttribute( "leadFwd" ) ) - d->lineLeadingFwdPt = e.attribute( "leadFwd" ).toDouble(); + setLineLeadingForwardPoint(e.attribute( "leadFwd" ).toDouble()); if ( e.hasAttribute( "leadBack" ) ) - d->lineLeadingBackPt = e.attribute( "leadBack" ).toDouble(); + setLineLeadingBackPoint(e.attribute( "leadBack" ).toDouble()); if ( e.hasAttribute( "showCaption" ) ) - d->lineShowCaption = e.attribute( "showCaption" ).toInt(); + setLineShowCaption(e.attribute( "showCaption" ).toInt()); if ( e.hasAttribute( "intent" ) ) - d->lineIntent = (LineAnnotation::LineIntent)e.attribute( "intent" ).toInt(); + setLineIntent((LineAnnotation::LineIntent)e.attribute( "intent" ).toInt()); // parse all 'point' subnodes + QLinkedList points; QDomNode pointNode = e.firstChild(); while ( pointNode.isElement() ) { @@ -741,8 +2117,10 @@ continue; QPointF p(pe.attribute( "x", "0.0" ).toDouble(), pe.attribute( "y", "0.0" ).toDouble()); - d->linePoints.append( p ); + points.append( p ); } + setLinePoints(points); + setLineType(points.size() == 2 ? StraightLine : Polyline); // loading complete break; @@ -755,38 +2133,36 @@ void LineAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const LineAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [line] element QDomElement lineElement = document.createElement( "line" ); node.appendChild( lineElement ); // store the attributes - if ( d->lineStartStyle != None ) - lineElement.setAttribute( "startStyle", (int)d->lineStartStyle ); - if ( d->lineEndStyle != None ) - lineElement.setAttribute( "endStyle", (int)d->lineEndStyle ); - if ( d->lineClosed ) - lineElement.setAttribute( "closed", d->lineClosed ); - if ( d->lineInnerColor.isValid() ) - lineElement.setAttribute( "innerColor", d->lineInnerColor.name() ); - if ( d->lineLeadingFwdPt != 0.0 ) - lineElement.setAttribute( "leadFwd", QString::number( d->lineLeadingFwdPt ) ); - if ( d->lineLeadingBackPt != 0.0 ) - lineElement.setAttribute( "leadBack", QString::number( d->lineLeadingBackPt ) ); - if ( d->lineShowCaption ) - lineElement.setAttribute( "showCaption", d->lineShowCaption ); - if ( d->lineIntent != Unknown ) - lineElement.setAttribute( "intent", d->lineIntent ); + if ( lineStartStyle() != None ) + lineElement.setAttribute( "startStyle", (int)lineStartStyle() ); + if ( lineEndStyle() != None ) + lineElement.setAttribute( "endStyle", (int)lineEndStyle() ); + if ( isLineClosed() ) + lineElement.setAttribute( "closed", isLineClosed() ); + if ( lineInnerColor().isValid() ) + lineElement.setAttribute( "innerColor", lineInnerColor().name() ); + if ( lineLeadingForwardPoint() != 0.0 ) + lineElement.setAttribute( "leadFwd", QString::number( lineLeadingForwardPoint() ) ); + if ( lineLeadingBackPoint() != 0.0 ) + lineElement.setAttribute( "leadBack", QString::number( lineLeadingBackPoint() ) ); + if ( lineShowCaption() ) + lineElement.setAttribute( "showCaption", lineShowCaption() ); + if ( lineIntent() != Unknown ) + lineElement.setAttribute( "intent", lineIntent() ); // append the list of points - int points = d->linePoints.count(); - if ( points > 1 ) + const QLinkedList points = linePoints(); + if ( points.count() > 1 ) { - QLinkedList::const_iterator it = d->linePoints.begin(), end = d->linePoints.end(); + QLinkedList::const_iterator it = points.begin(), end = points.end(); while ( it != end ) { const QPointF & p = *it; @@ -804,112 +2180,436 @@ return ALine; } +LineAnnotation::LineType LineAnnotation::lineType() const +{ + Q_D( const LineAnnotation ); + + if (!d->pdfAnnot) + return d->lineType; + + return (d->pdfAnnot->getType() == Annot::typeLine) ? + LineAnnotation::StraightLine : LineAnnotation::Polyline; +} + +void LineAnnotation::setLineType( LineAnnotation::LineType type ) +{ + Q_D( LineAnnotation ); + + if (!d->pdfAnnot) + { + d->lineType = type; + return; + } + + // Type cannot be changed if annotation is already tied +} + QLinkedList LineAnnotation::linePoints() const { Q_D( const LineAnnotation ); - return d->linePoints; + + if (!d->pdfAnnot) + return d->linePoints; + + double MTX[6]; + d->fillMTX(MTX); + + QLinkedList res; + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + QPointF p; + XPDFReader::transform(MTX, lineann->getX1(), lineann->getY1(), p); + res.append(p); + XPDFReader::transform(MTX, lineann->getX2(), lineann->getY2(), p); + res.append(p); + } + else + { + const AnnotPolygon * polyann = static_cast(d->pdfAnnot); + const AnnotPath * vertices = polyann->getVertices(); + + for (int i = 0; i < vertices->getCoordsLength(); ++i) + { + QPointF p; + XPDFReader::transform(MTX, vertices->getX(i), vertices->getY(i), p); + res.append(p); + } + } + + return res; } void LineAnnotation::setLinePoints( const QLinkedList &points ) { Q_D( LineAnnotation ); - d->linePoints = points; + + if (!d->pdfAnnot) + { + d->linePoints = points; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + if (points.size() != 2) + { + error(errSyntaxError, -1, "Expected two points for a straight line"); + return; + } + double x1, y1, x2, y2; + double MTX[6]; + d->fillMTX(MTX); + XPDFReader::invTransform( MTX, points.first(), x1, y1 ); + XPDFReader::invTransform( MTX, points.last(), x2, y2 ); + lineann->setVertices(x1, y1, x2, y2); + } + else + { + AnnotPolygon *polyann = static_cast(d->pdfAnnot); + AnnotPath * p = d->toAnnotPath(points); + polyann->setVertices(p); + delete p; + } + + d->pdfAnnot->invalidateAppearance(); } LineAnnotation::TermStyle LineAnnotation::lineStartStyle() const { Q_D( const LineAnnotation ); - return d->lineStartStyle; + + if (!d->pdfAnnot) + return d->lineStartStyle; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + return (LineAnnotation::TermStyle)lineann->getStartStyle(); + } + else + { + const AnnotPolygon * polyann = static_cast(d->pdfAnnot); + return (LineAnnotation::TermStyle)polyann->getStartStyle(); + } } void LineAnnotation::setLineStartStyle( LineAnnotation::TermStyle style ) { Q_D( LineAnnotation ); - d->lineStartStyle = style; + + if (!d->pdfAnnot) + { + d->lineStartStyle = style; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + lineann->setStartEndStyle((AnnotLineEndingStyle)style, lineann->getEndStyle()); + } + else + { + AnnotPolygon *polyann = static_cast(d->pdfAnnot); + polyann->setStartEndStyle((AnnotLineEndingStyle)style, polyann->getEndStyle()); + } + + d->pdfAnnot->invalidateAppearance(); } LineAnnotation::TermStyle LineAnnotation::lineEndStyle() const { Q_D( const LineAnnotation ); - return d->lineEndStyle; + + if (!d->pdfAnnot) + return d->lineEndStyle; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + return (LineAnnotation::TermStyle)lineann->getEndStyle(); + } + else + { + const AnnotPolygon * polyann = static_cast(d->pdfAnnot); + return (LineAnnotation::TermStyle)polyann->getEndStyle(); + } } void LineAnnotation::setLineEndStyle( LineAnnotation::TermStyle style ) { Q_D( LineAnnotation ); - d->lineEndStyle = style; + + if (!d->pdfAnnot) + { + d->lineEndStyle = style; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + lineann->setStartEndStyle(lineann->getStartStyle(), (AnnotLineEndingStyle)style); + } + else + { + AnnotPolygon *polyann = static_cast(d->pdfAnnot); + polyann->setStartEndStyle(polyann->getStartStyle(), (AnnotLineEndingStyle)style); + } + + d->pdfAnnot->invalidateAppearance(); } bool LineAnnotation::isLineClosed() const { Q_D( const LineAnnotation ); - return d->lineClosed; + + if (!d->pdfAnnot) + return d->lineClosed; + + return d->pdfAnnot->getType() == Annot::typePolygon; } void LineAnnotation::setLineClosed( bool closed ) { Q_D( LineAnnotation ); - d->lineClosed = closed; + + if (!d->pdfAnnot) + { + d->lineClosed = closed; + return; + } + + if (d->pdfAnnot->getType() != Annot::typeLine) + { + AnnotPolygon *polyann = static_cast(d->pdfAnnot); + + // Set new subtype and switch intent if necessary + if (closed) + { + polyann->setType(Annot::typePolygon); + if (polyann->getIntent() == AnnotPolygon::polylineDimension) + polyann->setIntent( AnnotPolygon::polygonDimension ); + } + else + { + polyann->setType(Annot::typePolyLine); + if (polyann->getIntent() == AnnotPolygon::polygonDimension) + polyann->setIntent( AnnotPolygon::polylineDimension ); + } + + d->pdfAnnot->invalidateAppearance(); + } } QColor LineAnnotation::lineInnerColor() const { Q_D( const LineAnnotation ); - return d->lineInnerColor; + + if (!d->pdfAnnot) + return d->lineInnerColor; + + AnnotColor * c; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + c = lineann->getInteriorColor(); + } + else + { + const AnnotPolygon * polyann = static_cast(d->pdfAnnot); + c = polyann->getInteriorColor(); + } + + return convertAnnotColor(c); } void LineAnnotation::setLineInnerColor( const QColor &color ) { Q_D( LineAnnotation ); - d->lineInnerColor = color; + + if (!d->pdfAnnot) + { + d->lineInnerColor = color; + return; + } + + AnnotColor * c = convertQColor(color); + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + lineann->setInteriorColor(c); + } + else + { + AnnotPolygon *polyann = static_cast(d->pdfAnnot); + polyann->setInteriorColor(c); + } + + d->pdfAnnot->invalidateAppearance(); } double LineAnnotation::lineLeadingForwardPoint() const { Q_D( const LineAnnotation ); - return d->lineLeadingFwdPt; + + if (!d->pdfAnnot) + return d->lineLeadingFwdPt; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + return lineann->getLeaderLineLength(); + } + + return 0; } void LineAnnotation::setLineLeadingForwardPoint( double point ) { Q_D( LineAnnotation ); - d->lineLeadingFwdPt = point; + + if (!d->pdfAnnot) + { + d->lineLeadingFwdPt = point; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + lineann->setLeaderLineLength(point); + d->pdfAnnot->invalidateAppearance(); + } } double LineAnnotation::lineLeadingBackPoint() const { Q_D( const LineAnnotation ); - return d->lineLeadingBackPt; + + if (!d->pdfAnnot) + return d->lineLeadingBackPt; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + return lineann->getLeaderLineExtension(); + } + + return 0; } void LineAnnotation::setLineLeadingBackPoint( double point ) { Q_D( LineAnnotation ); - d->lineLeadingBackPt = point; + + if (!d->pdfAnnot) + { + d->lineLeadingBackPt = point; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + lineann->setLeaderLineExtension(point); + d->pdfAnnot->invalidateAppearance(); + } } bool LineAnnotation::lineShowCaption() const { Q_D( const LineAnnotation ); - return d->lineShowCaption; + + if (!d->pdfAnnot) + return d->lineShowCaption; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + return lineann->getCaption(); + } + + return false; } void LineAnnotation::setLineShowCaption( bool show ) { Q_D( LineAnnotation ); - d->lineShowCaption = show; + + if (!d->pdfAnnot) + { + d->lineShowCaption = show; + return; + } + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine *lineann = static_cast(d->pdfAnnot); + lineann->setCaption(show); + d->pdfAnnot->invalidateAppearance(); + } } LineAnnotation::LineIntent LineAnnotation::lineIntent() const { Q_D( const LineAnnotation ); - return d->lineIntent; + + if (!d->pdfAnnot) + return d->lineIntent; + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + const AnnotLine * lineann = static_cast(d->pdfAnnot); + return (LineAnnotation::LineIntent)( lineann->getIntent() + 1 ); + } + else + { + const AnnotPolygon * polyann = static_cast(d->pdfAnnot); + if ( polyann->getIntent() == AnnotPolygon::polygonCloud ) + return LineAnnotation::PolygonCloud; + else // AnnotPolygon::polylineDimension, AnnotPolygon::polygonDimension + return LineAnnotation::Dimension; + } } void LineAnnotation::setLineIntent( LineAnnotation::LineIntent intent ) { Q_D( LineAnnotation ); - d->lineIntent = intent; + + if (!d->pdfAnnot) + { + d->lineIntent = intent; + return; + } + + if ( intent == LineAnnotation::Unknown ) + return; // Do not set (actually, it should clear the property) + + if (d->pdfAnnot->getType() == Annot::typeLine) + { + AnnotLine * lineann = static_cast(d->pdfAnnot); + lineann->setIntent((AnnotLine::AnnotLineIntent)( intent - 1 )); + } + else + { + AnnotPolygon * polyann = static_cast(d->pdfAnnot); + if ( intent == LineAnnotation::PolygonCloud) + polyann->setIntent( AnnotPolygon::polygonCloud ); + else // LineAnnotation::Dimension + { + if ( d->pdfAnnot->getType() == Annot::typePolygon ) + polyann->setIntent( AnnotPolygon::polygonDimension ); + else // Annot::typePolyLine + polyann->setIntent( AnnotPolygon::polylineDimension ); + } + } + + d->pdfAnnot->invalidateAppearance(); } @@ -918,28 +2618,62 @@ { public: GeomAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields (note uses border for rendering style) GeomAnnotation::GeomType geomType; QColor geomInnerColor; - int geomWidthPt; }; GeomAnnotationPrivate::GeomAnnotationPrivate() - : AnnotationPrivate(), geomType( GeomAnnotation::InscribedSquare ), - geomWidthPt( 18 ) + : AnnotationPrivate(), geomType( GeomAnnotation::InscribedSquare ) { } +Annotation * GeomAnnotationPrivate::makeAlias() +{ + return new GeomAnnotation(*this); +} + +Annot* GeomAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + // Setters are defined in the public class + GeomAnnotation *q = static_cast( makeAlias() ); + + // Set page and document + pdfPage = destPage; + parentDoc = doc; + + Annot::AnnotSubtype type; + if (geomType == GeomAnnotation::InscribedSquare) + type = Annot::typeSquare; + else // GeomAnnotation::InscribedCircle + type = Annot::typeCircle; + + // Set pdfAnnot + PDFRectangle rect = toPdfRectangle(boundary); + pdfAnnot = new AnnotGeometry(destPage->getDoc(), &rect, type); + + // Set properties + flushBaseAnnotationProperties(); + q->setGeomInnerColor(geomInnerColor); + + delete q; + return pdfAnnot; +} + GeomAnnotation::GeomAnnotation() : Annotation( *new GeomAnnotationPrivate() ) {} +GeomAnnotation::GeomAnnotation(GeomAnnotationPrivate &dd) + : Annotation( dd ) +{} + GeomAnnotation::GeomAnnotation( const QDomNode & node ) : Annotation( *new GeomAnnotationPrivate(), node ) -{ - Q_D( GeomAnnotation ); - +{ // loop through the whole children looking for a 'geom' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -951,11 +2685,9 @@ // parse the attributes if ( e.hasAttribute( "type" ) ) - d->geomType = (GeomAnnotation::GeomType)e.attribute( "type" ).toInt(); + setGeomType((GeomAnnotation::GeomType)e.attribute( "type" ).toInt()); if ( e.hasAttribute( "color" ) ) - d->geomInnerColor = QColor( e.attribute( "color" ) ); - if ( e.hasAttribute( "width" ) ) - d->geomWidthPt = e.attribute( "width" ).toInt(); + setGeomInnerColor(QColor( e.attribute( "color" ) )); // loading complete break; @@ -968,22 +2700,18 @@ void GeomAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const GeomAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [geom] element QDomElement geomElement = document.createElement( "geom" ); node.appendChild( geomElement ); // append the optional attributes - if ( d->geomType != InscribedSquare ) - geomElement.setAttribute( "type", (int)d->geomType ); - if ( d->geomInnerColor.isValid() ) - geomElement.setAttribute( "color", d->geomInnerColor.name() ); - if ( d->geomWidthPt != 18 ) - geomElement.setAttribute( "width", d->geomWidthPt ); + if ( geomType() != InscribedSquare ) + geomElement.setAttribute( "type", (int)geomType() ); + if ( geomInnerColor().isValid() ) + geomElement.setAttribute( "color", geomInnerColor().name() ); } Annotation::SubType GeomAnnotation::subType() const @@ -994,50 +2722,78 @@ GeomAnnotation::GeomType GeomAnnotation::geomType() const { Q_D( const GeomAnnotation ); - return d->geomType; + + if (!d->pdfAnnot) + return d->geomType; + + if (d->pdfAnnot->getType() == Annot::typeSquare) + return GeomAnnotation::InscribedSquare; + else // Annot::typeCircle + return GeomAnnotation::InscribedCircle; } void GeomAnnotation::setGeomType( GeomAnnotation::GeomType type ) { Q_D( GeomAnnotation ); - d->geomType = type; + + if (!d->pdfAnnot) + { + d->geomType = type; + return; + } + + AnnotGeometry * geomann = static_cast(d->pdfAnnot); + if (type == GeomAnnotation::InscribedSquare) + geomann->setType(Annot::typeSquare); + else // GeomAnnotation::InscribedCircle + geomann->setType(Annot::typeCircle); + + d->pdfAnnot->invalidateAppearance(); } QColor GeomAnnotation::geomInnerColor() const { Q_D( const GeomAnnotation ); - return d->geomInnerColor; + + if (!d->pdfAnnot) + return d->geomInnerColor; + + const AnnotGeometry * geomann = static_cast(d->pdfAnnot); + return convertAnnotColor( geomann->getInteriorColor() ); } void GeomAnnotation::setGeomInnerColor( const QColor &color ) { Q_D( GeomAnnotation ); - d->geomInnerColor = color; -} -int GeomAnnotation::geomPointWidth() const -{ - Q_D( const GeomAnnotation ); - return d->geomWidthPt; -} + if (!d->pdfAnnot) + { + d->geomInnerColor = color; + return; + } -void GeomAnnotation::setGeomPointWidth( int width ) -{ - Q_D( GeomAnnotation ); - d->geomWidthPt = width; + AnnotGeometry * geomann = static_cast(d->pdfAnnot); + geomann->setInteriorColor(convertQColor( color )); + d->pdfAnnot->invalidateAppearance(); } - /** HighlightAnnotation [Annotation] */ class HighlightAnnotationPrivate : public AnnotationPrivate { public: HighlightAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields HighlightAnnotation::HighlightType highlightType; QList< HighlightAnnotation::Quad > highlightQuads; // not empty + + // helpers + static Annot::AnnotSubtype toAnnotSubType( HighlightAnnotation::HighlightType type ); + QList< HighlightAnnotation::Quad > fromQuadrilaterals(AnnotQuadrilaterals *quads) const; + AnnotQuadrilaterals * toQuadrilaterals(const QList< HighlightAnnotation::Quad > &quads) const; }; HighlightAnnotationPrivate::HighlightAnnotationPrivate() @@ -1045,15 +2801,115 @@ { } +Annotation * HighlightAnnotationPrivate::makeAlias() +{ + return new HighlightAnnotation(*this); +} + +Annot::AnnotSubtype HighlightAnnotationPrivate::toAnnotSubType( HighlightAnnotation::HighlightType type ) +{ + switch (type) + { + default: // HighlightAnnotation::Highlight: + return Annot::typeHighlight; + case HighlightAnnotation::Underline: + return Annot::typeUnderline; + case HighlightAnnotation::Squiggly: + return Annot::typeSquiggly; + case HighlightAnnotation::StrikeOut: + return Annot::typeStrikeOut; + } +} + +QList< HighlightAnnotation::Quad > HighlightAnnotationPrivate::fromQuadrilaterals(AnnotQuadrilaterals *hlquads) const +{ + QList< HighlightAnnotation::Quad > quads; + + if ( !hlquads || !hlquads->getQuadrilateralsLength() ) + return quads; + const int quadsCount = hlquads->getQuadrilateralsLength(); + + double MTX[6]; + fillMTX(MTX); + + for (int q = 0; q < quadsCount; ++q) + { + HighlightAnnotation::Quad quad; + XPDFReader::transform( MTX, hlquads->getX1( q ), hlquads->getY1( q ), quad.points[ 0 ] ); + XPDFReader::transform( MTX, hlquads->getX2( q ), hlquads->getY2( q ), quad.points[ 1 ] ); + XPDFReader::transform( MTX, hlquads->getX3( q ), hlquads->getY3( q ), quad.points[ 2 ] ); + XPDFReader::transform( MTX, hlquads->getX4( q ), hlquads->getY4( q ), quad.points[ 3 ] ); + // ### PDF1.6 specs says that point are in ccw order, but in fact + // points 3 and 4 are swapped in every PDF around! + QPointF tmpPoint = quad.points[ 2 ]; + quad.points[ 2 ] = quad.points[ 3 ]; + quad.points[ 3 ] = tmpPoint; + // initialize other properties and append quad + quad.capStart = true; // unlinked quads are always capped + quad.capEnd = true; // unlinked quads are always capped + quad.feather = 0.1; // default feather + quads.append( quad ); + } + + return quads; +} + +AnnotQuadrilaterals * HighlightAnnotationPrivate::toQuadrilaterals(const QList< HighlightAnnotation::Quad > &quads) const +{ + const int count = quads.size(); + AnnotQuadrilaterals::AnnotQuadrilateral **ac = + (AnnotQuadrilaterals::AnnotQuadrilateral**) + gmallocn( count, sizeof(AnnotQuadrilaterals::AnnotQuadrilateral*) ); + + double MTX[6]; + fillMTX(MTX); + + int pos = 0; + foreach (const HighlightAnnotation::Quad &q, quads) + { + double x1, y1, x2, y2, x3, y3, x4, y4; + XPDFReader::invTransform( MTX, q.points[0], x1, y1 ); + XPDFReader::invTransform( MTX, q.points[1], x2, y2 ); + // Swap points 3 and 4 (see HighlightAnnotationPrivate::fromQuadrilaterals) + XPDFReader::invTransform( MTX, q.points[3], x3, y3 ); + XPDFReader::invTransform( MTX, q.points[2], x4, y4 ); + ac[pos++] = new AnnotQuadrilaterals::AnnotQuadrilateral(x1, y1, x2, y2, x3, y3, x4, y4); + } + + return new AnnotQuadrilaterals(ac, count); +} + +Annot* HighlightAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + // Set page and document + pdfPage = destPage; + parentDoc = doc; + + // Set pdfAnnot + PDFRectangle rect = toPdfRectangle(boundary); + AnnotQuadrilaterals * quads = toQuadrilaterals(highlightQuads); + pdfAnnot = new AnnotTextMarkup(destPage->getDoc(), &rect, toAnnotSubType(highlightType), quads); + delete quads; + + // Set properties + flushBaseAnnotationProperties(); + + highlightQuads.clear(); // Free up memory + + return pdfAnnot; +} + HighlightAnnotation::HighlightAnnotation() : Annotation( *new HighlightAnnotationPrivate() ) {} +HighlightAnnotation::HighlightAnnotation(HighlightAnnotationPrivate &dd) + : Annotation( dd ) +{} + HighlightAnnotation::HighlightAnnotation( const QDomNode & node ) : Annotation( *new HighlightAnnotationPrivate(), node ) { - Q_D( HighlightAnnotation ); - // loop through the whole children looking for a 'hl' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -1065,9 +2921,10 @@ // parse the attributes if ( e.hasAttribute( "type" ) ) - d->highlightType = (HighlightAnnotation::HighlightType)e.attribute( "type" ).toInt(); + setHighlightType((HighlightAnnotation::HighlightType)e.attribute( "type" ).toInt()); // parse all 'quad' subnodes + QList quads; QDomNode quadNode = e.firstChild(); for ( ; quadNode.isElement(); quadNode = quadNode.nextSibling() ) { @@ -1087,8 +2944,9 @@ q.capStart = qe.hasAttribute( "start" ); q.capEnd = qe.hasAttribute( "end" ); q.feather = qe.attribute( "feather", "0.1" ).toDouble(); - d->highlightQuads.append( q ); + quads.append( q ); } + setHighlightQuads(quads); // loading complete break; @@ -1101,22 +2959,22 @@ void HighlightAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const HighlightAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [hl] element QDomElement hlElement = document.createElement( "hl" ); node.appendChild( hlElement ); // append the optional attributes - if ( d->highlightType != Highlight ) - hlElement.setAttribute( "type", (int)d->highlightType ); - if ( d->highlightQuads.count() < 1 ) + if ( highlightType() != Highlight ) + hlElement.setAttribute( "type", (int)highlightType() ); + + const QList quads = highlightQuads(); + if ( quads.count() < 1 ) return; // append highlight quads, all children describe quads - QList< HighlightAnnotation::Quad >::const_iterator it = d->highlightQuads.begin(), end = d->highlightQuads.end(); + QList< HighlightAnnotation::Quad >::const_iterator it = quads.begin(), end = quads.end(); for ( ; it != end; ++it ) { QDomElement quadElement = document.createElement( "quad" ); @@ -1146,25 +3004,63 @@ HighlightAnnotation::HighlightType HighlightAnnotation::highlightType() const { Q_D( const HighlightAnnotation ); - return d->highlightType; + + if (!d->pdfAnnot) + return d->highlightType; + + Annot::AnnotSubtype subType = d->pdfAnnot->getType(); + + if ( subType == Annot::typeHighlight ) + return HighlightAnnotation::Highlight; + else if ( subType == Annot::typeUnderline ) + return HighlightAnnotation::Underline; + else if ( subType == Annot::typeSquiggly ) + return HighlightAnnotation::Squiggly; + else // Annot::typeStrikeOut + return HighlightAnnotation::StrikeOut; } void HighlightAnnotation::setHighlightType( HighlightAnnotation::HighlightType type ) { Q_D( HighlightAnnotation ); - d->highlightType = type; + + if (!d->pdfAnnot) + { + d->highlightType = type; + return; + } + + AnnotTextMarkup * hlann = static_cast(d->pdfAnnot); + hlann->setType(HighlightAnnotationPrivate::toAnnotSubType( type )); + d->pdfAnnot->invalidateAppearance(); } QList< HighlightAnnotation::Quad > HighlightAnnotation::highlightQuads() const { Q_D( const HighlightAnnotation ); - return d->highlightQuads; + + if (!d->pdfAnnot) + return d->highlightQuads; + + const AnnotTextMarkup * hlann = static_cast(d->pdfAnnot); + return d->fromQuadrilaterals( hlann->getQuadrilaterals() ); } void HighlightAnnotation::setHighlightQuads( const QList< HighlightAnnotation::Quad > &quads ) { Q_D( HighlightAnnotation ); - d->highlightQuads = quads; + + if (!d->pdfAnnot) + { + d->highlightQuads = quads; + return; + } + + AnnotTextMarkup * hlann = static_cast(d->pdfAnnot); + AnnotQuadrilaterals * quadrilaterals = d->toQuadrilaterals(quads); + hlann->setQuadrilaterals(quadrilaterals); + delete quadrilaterals; + d->pdfAnnot->invalidateAppearance(); } @@ -1173,6 +3069,8 @@ { public: StampAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields QString stampIconName; @@ -1183,15 +3081,45 @@ { } +Annotation * StampAnnotationPrivate::makeAlias() +{ + return new StampAnnotation(*this); +} + +Annot* StampAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + StampAnnotation *q = static_cast( makeAlias() ); + + // Set page and document + pdfPage = destPage; + parentDoc = doc; + + // Set pdfAnnot + PDFRectangle rect = toPdfRectangle(boundary); + pdfAnnot = new AnnotStamp(destPage->getDoc(), &rect); + + // Set properties + flushBaseAnnotationProperties(); + q->setStampIconName(stampIconName); + + delete q; + + stampIconName.clear(); // Free up memory + + return pdfAnnot; +} + StampAnnotation::StampAnnotation() : Annotation( *new StampAnnotationPrivate() ) {} +StampAnnotation::StampAnnotation(StampAnnotationPrivate &dd) + : Annotation( dd ) +{} + StampAnnotation::StampAnnotation( const QDomNode & node ) : Annotation( *new StampAnnotationPrivate(), node ) { - Q_D( StampAnnotation ); - // loop through the whole children looking for a 'stamp' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -1203,7 +3131,7 @@ // parse the attributes if ( e.hasAttribute( "icon" ) ) - d->stampIconName = e.attribute( "icon" ); + setStampIconName(e.attribute( "icon" )); // loading complete break; @@ -1216,18 +3144,16 @@ void StampAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const StampAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [stamp] element QDomElement stampElement = document.createElement( "stamp" ); node.appendChild( stampElement ); // append the optional attributes - if ( d->stampIconName != "Draft" ) - stampElement.setAttribute( "icon", d->stampIconName ); + if ( stampIconName() != "Draft" ) + stampElement.setAttribute( "icon", stampIconName() ); } Annotation::SubType StampAnnotation::subType() const @@ -1238,13 +3164,29 @@ QString StampAnnotation::stampIconName() const { Q_D( const StampAnnotation ); - return d->stampIconName; + + if (!d->pdfAnnot) + return d->stampIconName; + + const AnnotStamp * stampann = static_cast(d->pdfAnnot); + return QString::fromLatin1( stampann->getIcon()->getCString() ); } void StampAnnotation::setStampIconName( const QString &name ) { Q_D( StampAnnotation ); - d->stampIconName = name; + + if (!d->pdfAnnot) + { + d->stampIconName = name; + return; + } + + AnnotStamp * stampann = static_cast(d->pdfAnnot); + QByteArray encoded = name.toLatin1(); + GooString s(encoded.constData()); + stampann->setIcon(&s); + d->pdfAnnot->invalidateAppearance(); } /** InkAnnotation [Annotation] */ @@ -1252,9 +3194,14 @@ { public: InkAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields QList< QLinkedList > inkPaths; + + // helper + AnnotPath **toAnnotPaths(const QList< QLinkedList > &inkPaths); }; InkAnnotationPrivate::InkAnnotationPrivate() @@ -1262,15 +3209,56 @@ { } +Annotation * InkAnnotationPrivate::makeAlias() +{ + return new InkAnnotation(*this); +} + +// Note: Caller is required to delete array elements and the array itself after use +AnnotPath **InkAnnotationPrivate::toAnnotPaths(const QList< QLinkedList > &inkPaths) +{ + const int pathsNumber = inkPaths.size(); + AnnotPath **res = new AnnotPath*[pathsNumber]; + for (int i = 0; i < pathsNumber; ++i) + res[i] = toAnnotPath( inkPaths[i] ); + return res; +} + +Annot* InkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + // Set page and document + pdfPage = destPage; + parentDoc = doc; + + // Set pdfAnnot + PDFRectangle rect = toPdfRectangle(boundary); + AnnotPath **paths = toAnnotPaths(inkPaths); + const int pathsNumber = inkPaths.size(); + pdfAnnot = new AnnotInk(destPage->getDoc(), &rect, paths, pathsNumber); + + for (int i = 0; i < pathsNumber; ++i) + delete paths[i]; + delete[] paths; + + // Set properties + flushBaseAnnotationProperties(); + + inkPaths.clear(); // Free up memory + + return pdfAnnot; +} + InkAnnotation::InkAnnotation() : Annotation( *new InkAnnotationPrivate() ) {} +InkAnnotation::InkAnnotation(InkAnnotationPrivate &dd) + : Annotation( dd ) +{} + InkAnnotation::InkAnnotation( const QDomNode & node ) : Annotation( *new InkAnnotationPrivate(), node ) { - Q_D( InkAnnotation ); - // loop through the whole children looking for a 'ink' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -1281,6 +3269,7 @@ continue; // parse the 'path' subnodes + QList< QLinkedList > paths; QDomNode pathNode = e.firstChild(); while ( pathNode.isElement() ) { @@ -1307,8 +3296,9 @@ // add the path to the path list if it contains at least 2 nodes if ( path.count() >= 2 ) - d->inkPaths.append( path ); + paths.append( path ); } + setInkPaths(paths); // loading complete break; @@ -1321,19 +3311,18 @@ void InkAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const InkAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [ink] element QDomElement inkElement = document.createElement( "ink" ); node.appendChild( inkElement ); // append the optional attributes - if ( d->inkPaths.count() < 1 ) + const QList< QLinkedList > paths = inkPaths(); + if ( paths.count() < 1 ) return; - QList< QLinkedList >::const_iterator pIt = d->inkPaths.begin(), pEnd = d->inkPaths.end(); + QList< QLinkedList >::const_iterator pIt = paths.begin(), pEnd = paths.end(); for ( ; pIt != pEnd; ++pIt ) { QDomElement pathElement = document.createElement( "path" ); @@ -1358,14 +3347,60 @@ QList< QLinkedList > InkAnnotation::inkPaths() const { - Q_D( const InkAnnotation ); - return d->inkPaths; + Q_D( const InkAnnotation ); + + if (!d->pdfAnnot) + return d->inkPaths; + + const AnnotInk * inkann = static_cast(d->pdfAnnot); + + const AnnotPath * const* paths = inkann->getInkList(); + if ( !paths || !inkann->getInkListLength() ) + return QList< QLinkedList >(); + + double MTX[6]; + d->fillMTX(MTX); + + const int pathsNumber = inkann->getInkListLength(); + QList< QLinkedList > inkPaths; + for (int m = 0; m < pathsNumber; ++m) + { + // transform each path in a list of normalized points .. + QLinkedList localList; + const AnnotPath * path = paths[ m ]; + const int pointsNumber = path ? path->getCoordsLength() : 0; + for (int n = 0; n < pointsNumber; ++n) + { + QPointF point; + XPDFReader::transform(MTX, path->getX(n), path->getY(n), point); + localList.append(point); + } + // ..and add it to the annotation + inkPaths.append( localList ); + } + return inkPaths; } void InkAnnotation::setInkPaths( const QList< QLinkedList > &paths ) { - Q_D( InkAnnotation ); - d->inkPaths = paths; + Q_D( InkAnnotation ); + + if (!d->pdfAnnot) + { + d->inkPaths = paths; + return; + } + + AnnotInk * inkann = static_cast(d->pdfAnnot); + AnnotPath **annotpaths = d->toAnnotPaths(paths); + const int pathsNumber = paths.size(); + inkann->setInkList(annotpaths, pathsNumber); + + for (int i = 0; i < pathsNumber; ++i) + delete annotpaths[i]; + delete[] annotpaths; + + d->pdfAnnot->invalidateAppearance(); } @@ -1375,6 +3410,8 @@ public: LinkAnnotationPrivate(); ~LinkAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields Link * linkDestination; @@ -1392,15 +3429,27 @@ delete linkDestination; } +Annotation * LinkAnnotationPrivate::makeAlias() +{ + return new LinkAnnotation(*this); +} + +Annot* LinkAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + return 0; // Not implemented +} + LinkAnnotation::LinkAnnotation() : Annotation( *new LinkAnnotationPrivate() ) {} +LinkAnnotation::LinkAnnotation(LinkAnnotationPrivate &dd) + : Annotation( dd ) +{} + LinkAnnotation::LinkAnnotation( const QDomNode & node ) : Annotation( *new LinkAnnotationPrivate(), node ) { - Q_D( LinkAnnotation ); - // loop through the whole children looking for a 'link' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -1412,7 +3461,7 @@ // parse the attributes if ( e.hasAttribute( "hlmode" ) ) - d->linkHLMode = (LinkAnnotation::HighlightMode)e.attribute( "hlmode" ).toInt(); + setLinkHighlightMode((LinkAnnotation::HighlightMode)e.attribute( "hlmode" ).toInt()); // parse all 'quad' subnodes QDomNode quadNode = e.firstChild(); @@ -1421,14 +3470,14 @@ QDomElement qe = quadNode.toElement(); if ( qe.tagName() == "quad" ) { - d->linkRegion[0].setX(qe.attribute( "ax", "0.0" ).toDouble()); - d->linkRegion[0].setY(qe.attribute( "ay", "0.0" ).toDouble()); - d->linkRegion[1].setX(qe.attribute( "bx", "0.0" ).toDouble()); - d->linkRegion[1].setY(qe.attribute( "by", "0.0" ).toDouble()); - d->linkRegion[2].setX(qe.attribute( "cx", "0.0" ).toDouble()); - d->linkRegion[2].setY(qe.attribute( "cy", "0.0" ).toDouble()); - d->linkRegion[3].setX(qe.attribute( "dx", "0.0" ).toDouble()); - d->linkRegion[3].setY(qe.attribute( "dy", "0.0" ).toDouble()); + setLinkRegionPoint(0, QPointF(qe.attribute( "ax", "0.0" ).toDouble(), + qe.attribute( "ay", "0.0" ).toDouble())); + setLinkRegionPoint(1, QPointF(qe.attribute( "bx", "0.0" ).toDouble(), + qe.attribute( "by", "0.0" ).toDouble())); + setLinkRegionPoint(2, QPointF(qe.attribute( "cx", "0.0" ).toDouble(), + qe.attribute( "cy", "0.0" ).toDouble())); + setLinkRegionPoint(3, QPointF(qe.attribute( "dx", "0.0" ).toDouble(), + qe.attribute( "dy", "0.0" ).toDouble())); } else if ( qe.tagName() == "link" ) { @@ -1436,17 +3485,17 @@ if ( type == "GoTo" ) { Poppler::LinkGoto * go = new Poppler::LinkGoto( QRect(), qe.attribute( "filename" ), LinkDestination( qe.attribute( "destination" ) ) ); - d->linkDestination = go; + setLinkDestination(go); } else if ( type == "Exec" ) { Poppler::LinkExecute * exec = new Poppler::LinkExecute( QRect(), qe.attribute( "filename" ), qe.attribute( "parameters" ) ); - d->linkDestination = exec; + setLinkDestination(exec); } else if ( type == "Browse" ) { Poppler::LinkBrowse * browse = new Poppler::LinkBrowse( QRect(), qe.attribute( "url" ) ); - d->linkDestination = browse; + setLinkDestination(browse); } else if ( type == "Action" ) { @@ -1484,14 +3533,14 @@ if (found) { Poppler::LinkAction * action = new Poppler::LinkAction( QRect(), act ); - d->linkDestination = action; + setLinkDestination(action); } } #if 0 else if ( type == "Movie" ) { Poppler::LinkMovie * movie = new Poppler::LinkMovie( QRect() ); - d->linkDestination = movie; + setLinkDestination(movie); } #endif } @@ -1508,41 +3557,39 @@ void LinkAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const LinkAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [hl] element QDomElement linkElement = document.createElement( "link" ); node.appendChild( linkElement ); // append the optional attributes - if ( d->linkHLMode != Invert ) - linkElement.setAttribute( "hlmode", (int)d->linkHLMode ); + if ( linkHighlightMode() != Invert ) + linkElement.setAttribute( "hlmode", (int)linkHighlightMode() ); // saving region QDomElement quadElement = document.createElement( "quad" ); linkElement.appendChild( quadElement ); - quadElement.setAttribute( "ax", QString::number( d->linkRegion[0].x() ) ); - quadElement.setAttribute( "ay", QString::number( d->linkRegion[0].y() ) ); - quadElement.setAttribute( "bx", QString::number( d->linkRegion[1].x() ) ); - quadElement.setAttribute( "by", QString::number( d->linkRegion[1].y() ) ); - quadElement.setAttribute( "cx", QString::number( d->linkRegion[2].x() ) ); - quadElement.setAttribute( "cy", QString::number( d->linkRegion[2].y() ) ); - quadElement.setAttribute( "dx", QString::number( d->linkRegion[3].x() ) ); - quadElement.setAttribute( "dy", QString::number( d->linkRegion[3].y() ) ); + quadElement.setAttribute( "ax", QString::number( linkRegionPoint(0).x() ) ); + quadElement.setAttribute( "ay", QString::number( linkRegionPoint(0).y() ) ); + quadElement.setAttribute( "bx", QString::number( linkRegionPoint(1).x() ) ); + quadElement.setAttribute( "by", QString::number( linkRegionPoint(1).y() ) ); + quadElement.setAttribute( "cx", QString::number( linkRegionPoint(2).x() ) ); + quadElement.setAttribute( "cy", QString::number( linkRegionPoint(2).y() ) ); + quadElement.setAttribute( "dx", QString::number( linkRegionPoint(3).x() ) ); + quadElement.setAttribute( "dy", QString::number( linkRegionPoint(3).y() ) ); // saving link QDomElement hyperlinkElement = document.createElement( "link" ); linkElement.appendChild( hyperlinkElement ); - if ( d->linkDestination ) + if ( linkDestination() ) { - switch( d->linkDestination->linkType() ) + switch( linkDestination()->linkType() ) { case Poppler::Link::Goto: { - Poppler::LinkGoto * go = static_cast< Poppler::LinkGoto * >( d->linkDestination ); + Poppler::LinkGoto * go = static_cast< Poppler::LinkGoto * >( linkDestination() ); hyperlinkElement.setAttribute( "type", "GoTo" ); hyperlinkElement.setAttribute( "filename", go->fileName() ); hyperlinkElement.setAttribute( "destionation", go->destination().toString() ); @@ -1550,7 +3597,7 @@ } case Poppler::Link::Execute: { - Poppler::LinkExecute * exec = static_cast< Poppler::LinkExecute * >( d->linkDestination ); + Poppler::LinkExecute * exec = static_cast< Poppler::LinkExecute * >( linkDestination() ); hyperlinkElement.setAttribute( "type", "Exec" ); hyperlinkElement.setAttribute( "filename", exec->fileName() ); hyperlinkElement.setAttribute( "parameters", exec->parameters() ); @@ -1558,14 +3605,14 @@ } case Poppler::Link::Browse: { - Poppler::LinkBrowse * browse = static_cast< Poppler::LinkBrowse * >( d->linkDestination ); + Poppler::LinkBrowse * browse = static_cast< Poppler::LinkBrowse * >( linkDestination() ); hyperlinkElement.setAttribute( "type", "Browse" ); hyperlinkElement.setAttribute( "url", browse->url() ); break; } case Poppler::Link::Action: { - Poppler::LinkAction * action = static_cast< Poppler::LinkAction * >( d->linkDestination ); + Poppler::LinkAction * action = static_cast< Poppler::LinkAction * >( linkDestination() ); hyperlinkElement.setAttribute( "type", "Action" ); switch ( action->actionType() ) { @@ -1616,6 +3663,11 @@ hyperlinkElement.setAttribute( "type", "Movie" ); break; } + case Poppler::Link::Rendition: + { + hyperlinkElement.setAttribute( "type", "Rendition" ); + break; + } case Poppler::Link::Sound: { // FIXME: implement me @@ -1632,7 +3684,7 @@ return ALink; } -Link* LinkAnnotation::linkDestionation() const +Link* LinkAnnotation::linkDestination() const { Q_D( const LinkAnnotation ); return d->linkDestination; @@ -1680,6 +3732,8 @@ { public: CaretAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields CaretAnnotation::CaretSymbol symbol; @@ -1711,16 +3765,45 @@ { } +Annotation * CaretAnnotationPrivate::makeAlias() +{ + return new CaretAnnotation(*this); +} + +Annot* CaretAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + // Setters are defined in the public class + CaretAnnotation *q = static_cast( makeAlias() ); + + // Set page and document + pdfPage = destPage; + parentDoc = doc; + + // Set pdfAnnot + PDFRectangle rect = toPdfRectangle(boundary); + pdfAnnot = new AnnotCaret(destPage->getDoc(), &rect); + + // Set properties + flushBaseAnnotationProperties(); + q->setCaretSymbol(symbol); + + delete q; + return pdfAnnot; +} + CaretAnnotation::CaretAnnotation() : Annotation( *new CaretAnnotationPrivate() ) { } +CaretAnnotation::CaretAnnotation(CaretAnnotationPrivate &dd) + : Annotation( dd ) +{ +} + CaretAnnotation::CaretAnnotation( const QDomNode & node ) : Annotation( *new CaretAnnotationPrivate(), node ) { - Q_D( CaretAnnotation ); - // loop through the whole children looking for a 'caret' element QDomNode subNode = node.firstChild(); while( subNode.isElement() ) @@ -1732,7 +3815,7 @@ // parse the attributes if ( e.hasAttribute( "symbol" ) ) - d->symbol = caretSymbolFromString( e.attribute( "symbol" ) ); + setCaretSymbol(caretSymbolFromString( e.attribute( "symbol" ) )); // loading complete break; @@ -1745,18 +3828,16 @@ void CaretAnnotation::store( QDomNode & node, QDomDocument & document ) const { - Q_D( const CaretAnnotation ); - - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [caret] element QDomElement caretElement = document.createElement( "caret" ); node.appendChild( caretElement ); // append the optional attributes - if ( d->symbol != CaretAnnotation::None ) - caretElement.setAttribute( "symbol", caretSymbolToString( d->symbol ) ); + if ( caretSymbol() != CaretAnnotation::None ) + caretElement.setAttribute( "symbol", caretSymbolToString( caretSymbol() ) ); } Annotation::SubType CaretAnnotation::subType() const @@ -1767,13 +3848,27 @@ CaretAnnotation::CaretSymbol CaretAnnotation::caretSymbol() const { Q_D( const CaretAnnotation ); - return d->symbol; + + if (!d->pdfAnnot) + return d->symbol; + + const AnnotCaret * caretann = static_cast(d->pdfAnnot); + return (CaretAnnotation::CaretSymbol)caretann->getSymbol(); } void CaretAnnotation::setCaretSymbol( CaretAnnotation::CaretSymbol symbol ) { Q_D( CaretAnnotation ); - d->symbol = symbol; + + if (!d->pdfAnnot) + { + d->symbol = symbol; + return; + } + + AnnotCaret * caretann = static_cast(d->pdfAnnot); + caretann->setSymbol((AnnotCaret::AnnotCaretSymbol)symbol); + d->pdfAnnot->invalidateAppearance(); } /** FileAttachmentAnnotation [Annotation] */ @@ -1782,6 +3877,8 @@ public: FileAttachmentAnnotationPrivate(); ~FileAttachmentAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields QString icon; @@ -1798,11 +3895,26 @@ delete embfile; } +Annotation * FileAttachmentAnnotationPrivate::makeAlias() +{ + return new FileAttachmentAnnotation(*this); +} + +Annot* FileAttachmentAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + return 0; // Not implemented +} + FileAttachmentAnnotation::FileAttachmentAnnotation() : Annotation( *new FileAttachmentAnnotationPrivate() ) { } +FileAttachmentAnnotation::FileAttachmentAnnotation(FileAttachmentAnnotationPrivate &dd) + : Annotation( dd ) +{ +} + FileAttachmentAnnotation::FileAttachmentAnnotation( const QDomNode & node ) : Annotation( *new FileAttachmentAnnotationPrivate(), node ) { @@ -1826,8 +3938,8 @@ void FileAttachmentAnnotation::store( QDomNode & node, QDomDocument & document ) const { - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [fileattachment] element QDomElement fileAttachmentElement = document.createElement( "fileattachment" ); @@ -1869,6 +3981,8 @@ public: SoundAnnotationPrivate(); ~SoundAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields QString icon; @@ -1885,11 +3999,26 @@ delete sound; } +Annotation * SoundAnnotationPrivate::makeAlias() +{ + return new SoundAnnotation(*this); +} + +Annot* SoundAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + return 0; // Not implemented +} + SoundAnnotation::SoundAnnotation() : Annotation( *new SoundAnnotationPrivate() ) { } +SoundAnnotation::SoundAnnotation(SoundAnnotationPrivate &dd) + : Annotation( dd ) +{ +} + SoundAnnotation::SoundAnnotation( const QDomNode & node ) : Annotation( *new SoundAnnotationPrivate(), node ) { @@ -1913,8 +4042,8 @@ void SoundAnnotation::store( QDomNode & node, QDomDocument & document ) const { - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [sound] element QDomElement soundElement = document.createElement( "sound" ); @@ -1956,6 +4085,8 @@ public: MovieAnnotationPrivate(); ~MovieAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); // data fields MovieObject *movie; @@ -1972,11 +4103,26 @@ delete movie; } +Annotation * MovieAnnotationPrivate::makeAlias() +{ + return new MovieAnnotation(*this); +} + +Annot* MovieAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + return 0; // Not implemented +} + MovieAnnotation::MovieAnnotation() : Annotation( *new MovieAnnotationPrivate() ) { } +MovieAnnotation::MovieAnnotation(MovieAnnotationPrivate &dd) + : Annotation( dd ) +{ +} + MovieAnnotation::MovieAnnotation( const QDomNode & node ) : Annotation( *new MovieAnnotationPrivate(), node ) { @@ -2000,8 +4146,8 @@ void MovieAnnotation::store( QDomNode & node, QDomDocument & document ) const { - // recurse to parent objects storing properties - Annotation::store( node, document ); + // store base annotation properties + storeBaseAnnotationProperties( node, document ); // create [movie] element QDomElement movieElement = document.createElement( "movie" ); @@ -2037,6 +4183,92 @@ d->title = title; } +/** ScreenAnnotation [Annotation] */ +class ScreenAnnotationPrivate : public AnnotationPrivate +{ + public: + ScreenAnnotationPrivate(); + ~ScreenAnnotationPrivate(); + Annotation * makeAlias(); + Annot* createNativeAnnot(::Page *destPage, DocumentData *doc); + + // data fields + LinkRendition *action; + QString title; +}; + +ScreenAnnotationPrivate::ScreenAnnotationPrivate() + : AnnotationPrivate(), action( 0 ) +{ +} + +ScreenAnnotationPrivate::~ScreenAnnotationPrivate() +{ + delete action; +} + +ScreenAnnotation::ScreenAnnotation(ScreenAnnotationPrivate &dd) + : Annotation( dd ) +{} + +Annotation * ScreenAnnotationPrivate::makeAlias() +{ + return new ScreenAnnotation(*this); +} + +Annot* ScreenAnnotationPrivate::createNativeAnnot(::Page *destPage, DocumentData *doc) +{ + return 0; // Not implemented +} + +ScreenAnnotation::ScreenAnnotation() + : Annotation( *new ScreenAnnotationPrivate() ) +{ +} + +ScreenAnnotation::~ScreenAnnotation() +{ +} + +void ScreenAnnotation::store( QDomNode & node, QDomDocument & document ) const +{ + // store base annotation properties + storeBaseAnnotationProperties( node, document ); + + // create [screen] element + QDomElement screenElement = document.createElement( "screen" ); + node.appendChild( screenElement ); +} + +Annotation::SubType ScreenAnnotation::subType() const +{ + return AScreen; +} + +LinkRendition* ScreenAnnotation::action() const +{ + Q_D( const ScreenAnnotation ); + return d->action; +} + +void ScreenAnnotation::setAction( LinkRendition *action ) +{ + Q_D( ScreenAnnotation ); + d->action = action; +} + +QString ScreenAnnotation::screenTitle() const +{ + Q_D( const ScreenAnnotation ); + return d->title; +} + +void ScreenAnnotation::setScreenTitle( const QString &title ) +{ + Q_D( ScreenAnnotation ); + d->title = title; +} + //BEGIN utility annotation functions QColor convertAnnotColor( AnnotColor *color ) { @@ -2062,6 +4294,14 @@ } return newcolor; } + +AnnotColor* convertQColor( const QColor &c ) +{ + if (!c.isValid() || c.alpha() == 0) + return new AnnotColor(); // Transparent + else + return new AnnotColor(c.redF(), c.greenF(), c.blueF()); +} //END utility annotation functions } diff -Nru poppler-0.18.4/qt4/src/poppler-annotation.h poppler-0.20.5/qt4/src/poppler-annotation.h --- poppler-0.18.4/qt4/src/poppler-annotation.h 2011-11-22 21:33:21.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-annotation.h 2012-08-15 13:31:38.000000000 +0000 @@ -1,8 +1,11 @@ /* poppler-annotation.h: qt interface to poppler - * Copyright (C) 2006-2008, Albert Astals Cid + * Copyright (C) 2006-2008, 2012 Albert Astals Cid * Copyright (C) 2006, 2008 Pino Toscano * Copyright (C) 2007, Brad Hards * Copyright (C) 2010, Philip Lorenz + * Copyright (C) 2012, Tobias Koenig + * Copyright (C) 2012, Guillermo A. Amaral B. + * Copyright (C) 2012, Fabio D'Urso * Adapting code from * Copyright (C) 2004 by Enrico Ros * @@ -25,10 +28,12 @@ #define _POPPLER_ANNOTATION_H_ #include +#include #include #include #include #include +#include #include #include #include @@ -49,10 +54,13 @@ class FileAttachmentAnnotationPrivate; class SoundAnnotationPrivate; class MovieAnnotationPrivate; +class ScreenAnnotationPrivate; class EmbeddedFile; class Link; class SoundObject; class MovieObject; +class LinkRendition; +class Page; /** * \short Helper class for (recursive) Annotation retrieval/storage. @@ -90,20 +98,26 @@ * * An Annotation is an object (text note, highlight, sound, popup window, ..) * contained by a Page in the document. + * + * \warning Different Annotation objects might point to the same annotation. + * Use uniqueName to test for Annotation equality */ class POPPLER_QT4_EXPORT Annotation { + friend class AnnotationUtils; + friend class LinkMovie; + public: // enum definitions // WARNING!!! oKular uses that very same values so if you change them notify the author! enum SubType { AText = 1, ALine = 2, AGeom = 3, AHighlight = 4, AStamp = 5, AInk = 6, ALink = 7, ACaret = 8, AFileAttachment = 9, ASound = 10, - AMovie = 11, A_BASE = 0 }; + AMovie = 11, AScreen = 12 /** \since 0.20 */, A_BASE = 0 }; enum Flag { Hidden = 1, FixedSize = 2, FixedRotation = 4, DenyPrint = 8, DenyWrite = 16, DenyDelete = 32, ToggleHidingOnMouse = 64, External = 128 }; enum LineStyle { Solid = 1, Dashed = 2, Beveled = 4, Inset = 8, Underline = 16 }; enum LineEffect { NoEffect = 1, Cloudy = 2}; - enum RevScope { Reply = 1, Group = 2, Delete = 4 }; + enum RevScope { Root = 0 /** \since 0.20 */, Reply = 1, Group = 2, Delete = 4 }; enum RevType { None = 1, Marked = 2, Unmarked = 4, Accepted = 8, Rejected = 16, Cancelled = 32, Completed = 64 }; /** @@ -141,67 +155,117 @@ QRectF boundary() const; void setBoundary( const QRectF &boundary ); - struct POPPLER_QT4_EXPORT Style + /** + * \short Container class for Annotation style information + * + * \since 0.20 + */ + class POPPLER_QT4_EXPORT Style { + public: + Style(); + Style( const Style &other ); + Style& operator=( const Style &other ); + ~Style(); + // appearance properties - QColor color; // black - double opacity; // 1.0 + QColor color() const; // black + void setColor(const QColor &color); + double opacity() const; // 1.0 + void setOpacity(double opacity); + // pen properties - double width; // 1.0 - LineStyle style; // LineStyle::Solid - double xCorners; // 0.0 - double yCorners; // 0.0 - int marks; // 3 - int spaces; // 0 + double width() const; // 1.0 + void setWidth(double width); + LineStyle lineStyle() const; // LineStyle::Solid + void setLineStyle(LineStyle style); + double xCorners() const; // 0.0 + void setXCorners(double radius); + double yCorners() const; // 0.0 + void setYCorners(double radius); + const QVector& dashArray() const; // [ 3 ] + void setDashArray(const QVector &array); + // pen effects - LineEffect effect; // LineEffect::NoEffect - double effectIntensity; // 1.0 - // default initializer - Style(); - } style; + LineEffect lineEffect() const; // LineEffect::NoEffect + void setLineEffect(LineEffect effect); + double effectIntensity() const; // 1.0 + void setEffectIntensity(double intens); + + private: + class Private; + QSharedDataPointer d; + }; + + /// \since 0.20 + Style style() const; + /// \since 0.20 + void setStyle( const Style& style ); - /* properties: popup window */ - struct POPPLER_QT4_EXPORT Window + /** + * \short Container class for Annotation pop-up window information + * + * \since 0.20 + */ + class POPPLER_QT4_EXPORT Popup { + public: + Popup(); + Popup( const Popup &other ); + Popup& operator=( const Popup &other ); + ~Popup(); + // window state (Hidden, FixedRotation, Deny* flags allowed) - int flags; // -1 (never initialized) -> 0 (if inited and shown) + int flags() const; // -1 (never initialized) -> 0 (if inited and shown) + void setFlags( int flags ); + // geometric properties - QPointF topLeft; // no default, inited to boundary.topLeft - int width; // no default - int height; // no default - // window contens/override properties - QString title; // '' text in the titlebar (overrides author) - QString summary; // '' short description (displayed if not empty) - QString text; // '' text for the window (overrides annot->contents) - // default initializer - Window(); - } window; + QRectF geometry() const; // no default + void setGeometry( const QRectF &geom ); - /* properties: versioning */ - struct POPPLER_QT4_EXPORT Revision - { - // child revision - Annotation * annotation; // not null - // scope and type of revision - RevScope scope; // Reply - RevType type; // None - // default initializer - Revision(); + // window contens/override properties + QString title() const; // '' text in the titlebar (overrides author) + void setTitle( const QString &title ); + QString summary() const; // '' short description (displayed if not empty) + void setSummary( const QString &summary ); + QString text() const; // '' text for the window (overrides annot->contents) + void setText( const QString &text ); + + private: + class Private; + QSharedDataPointer d; }; - QLinkedList< Revision >& revisions(); - const QLinkedList< Revision >& revisions() const; + /// \since 0.20 + Popup popup() const; + /// \since 0.20 + void setPopup( const Popup& popup ); + + /// \cond PRIVATE + // This field is deprecated and not used any more. Use popup + Q_DECL_DEPRECATED struct { int width, height; } window; // Always set to zero + /// \endcond + + /// \since 0.20 + RevScope revisionScope() const; // Root + + /// \since 0.20 + RevType revisionType() const; // None - // methods: query annotation's type for runtime type identification /** - * The type of the annotation. + * Returns the revisions of this annotation + * + * \note The caller owns the returned annotations and they should + * be deleted when no longer required. + * + * \since 0.20 */ - virtual SubType subType() const = 0; + QList revisions() const; /** - * Save this annotation as a child of \p parentNode. + * The type of the annotation. */ - virtual void store( QDomNode & parentNode, QDomDocument & document ) const; + virtual SubType subType() const = 0; /** * Destructor. @@ -212,11 +276,13 @@ /// \cond PRIVATE Annotation( AnnotationPrivate &dd ); Annotation( AnnotationPrivate &dd, const QDomNode &description ); + void storeBaseAnnotationProperties( QDomNode & parentNode, QDomDocument & document ) const; Q_DECLARE_PRIVATE( Annotation ) - AnnotationPrivate *d_ptr; + QExplicitlySharedDataPointer d_ptr; /// \endcond private: + virtual void store( QDomNode & parentNode, QDomDocument & document ) const = 0; Q_DISABLE_COPY( Annotation ) }; @@ -228,28 +294,24 @@ */ class POPPLER_QT4_EXPORT TextAnnotation : public Annotation { - public: - TextAnnotation(); - TextAnnotation( const QDomNode &node ); - virtual ~TextAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; - virtual SubType subType() const; + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: // local enums enum TextType { Linked, InPlace }; enum InplaceIntent { Unknown, Callout, TypeWriter }; + TextAnnotation( TextType type ); + virtual ~TextAnnotation(); + virtual SubType subType() const; + /** The type of text annotation represented by this object */ TextType textType() const; /** - Set the type of text annotation represented by this object - */ - void setTextType( TextType type ); - - /** The name of the icon for this text annotation. Standard names for text annotation icons are: @@ -276,16 +338,33 @@ int inplaceAlign() const; void setInplaceAlign( int align ); + /** + Synonym for contents() + + \deprecated Use contents() instead + */ QString inplaceText() const; + /** + Synonym for setContents() + + \deprecated Use setContents() instead + */ void setInplaceText( const QString &text ); QPointF calloutPoint( int id ) const; - void setCalloutPoint( int id, const QPointF &point ); + /// \since 0.20 + QVector calloutPoints() const; + /// \since 0.20 + void setCalloutPoints( const QVector &points ); InplaceIntent inplaceIntent() const; void setInplaceIntent( InplaceIntent intent ); private: + TextAnnotation( const QDomNode &node ); + TextAnnotation( TextAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; + void setTextType( TextType type ); Q_DECLARE_PRIVATE( TextAnnotation ) Q_DISABLE_COPY( TextAnnotation ) }; @@ -297,18 +376,25 @@ */ class POPPLER_QT4_EXPORT LineAnnotation : public Annotation { - public: - LineAnnotation(); - LineAnnotation( const QDomNode &node ); - virtual ~LineAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; - virtual SubType subType() const; + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: // local enums + /// \since 0.20 + enum LineType { StraightLine, Polyline }; enum TermStyle { Square, Circle, Diamond, OpenArrow, ClosedArrow, None, Butt, ROpenArrow, RClosedArrow, Slash }; enum LineIntent { Unknown, Arrow, Dimension, PolygonCloud }; + /// \since 0.20 + LineAnnotation( LineType type ); + virtual ~LineAnnotation(); + virtual SubType subType() const; + + /// \since 0.20 + LineType lineType() const; + QLinkedList linePoints() const; void setLinePoints( const QLinkedList &points ); @@ -337,6 +423,10 @@ void setLineIntent( LineIntent intent ); private: + LineAnnotation( const QDomNode &node ); + LineAnnotation( LineAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; + void setLineType( LineType type ); Q_DECLARE_PRIVATE( LineAnnotation ) Q_DISABLE_COPY( LineAnnotation ) }; @@ -349,11 +439,12 @@ */ class POPPLER_QT4_EXPORT GeomAnnotation : public Annotation { + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: GeomAnnotation(); - GeomAnnotation( const QDomNode &node ); virtual ~GeomAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; // common enums @@ -365,10 +456,10 @@ QColor geomInnerColor() const; void setGeomInnerColor( const QColor &color ); - int geomPointWidth() const; - void setGeomPointWidth( int width ); - private: + GeomAnnotation( const QDomNode &node ); + GeomAnnotation( GeomAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( GeomAnnotation ) Q_DISABLE_COPY( GeomAnnotation ) }; @@ -380,11 +471,12 @@ */ class POPPLER_QT4_EXPORT HighlightAnnotation : public Annotation { + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: HighlightAnnotation(); - HighlightAnnotation( const QDomNode &node ); virtual ~HighlightAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; /** @@ -432,6 +524,9 @@ void setHighlightQuads( const QList< Quad > &quads ); private: + HighlightAnnotation( const QDomNode &node ); + HighlightAnnotation( HighlightAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( HighlightAnnotation ) Q_DISABLE_COPY( HighlightAnnotation ) }; @@ -443,11 +538,12 @@ */ class POPPLER_QT4_EXPORT StampAnnotation : public Annotation { + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: StampAnnotation(); - StampAnnotation( const QDomNode &node ); virtual ~StampAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; /** @@ -479,6 +575,9 @@ void setStampIconName( const QString &name ); private: + StampAnnotation( const QDomNode &node ); + StampAnnotation( StampAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( StampAnnotation ) Q_DISABLE_COPY( StampAnnotation ) }; @@ -490,34 +589,39 @@ */ class POPPLER_QT4_EXPORT InkAnnotation : public Annotation { + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: InkAnnotation(); - InkAnnotation( const QDomNode &node ); virtual ~InkAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; QList< QLinkedList > inkPaths() const; void setInkPaths( const QList< QLinkedList > &paths ); private: + InkAnnotation( const QDomNode &node ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; + InkAnnotation(InkAnnotationPrivate &dd); Q_DECLARE_PRIVATE( InkAnnotation ) Q_DISABLE_COPY( InkAnnotation ) }; class POPPLER_QT4_EXPORT LinkAnnotation : public Annotation { + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: - LinkAnnotation(); - LinkAnnotation( const QDomNode &node ); virtual ~LinkAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; // local enums enum HighlightMode { None, Invert, Outline, Push }; - Link* linkDestionation() const; + /** \since 0.20 */ + Link* linkDestination() const; void setLinkDestination( Link *link ); HighlightMode linkHighlightMode() const; @@ -527,6 +631,10 @@ void setLinkRegionPoint( int id, const QPointF &point ); private: + LinkAnnotation(); + LinkAnnotation( const QDomNode &node ); + LinkAnnotation( LinkAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( LinkAnnotation ) Q_DISABLE_COPY( LinkAnnotation ) }; @@ -538,11 +646,12 @@ */ class POPPLER_QT4_EXPORT CaretAnnotation : public Annotation { + friend class AnnotationUtils; + friend class AnnotationPrivate; + public: CaretAnnotation(); - CaretAnnotation( const QDomNode &node ); virtual ~CaretAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; /** @@ -554,6 +663,9 @@ void setCaretSymbol( CaretSymbol symbol ); private: + CaretAnnotation( const QDomNode &node ); + CaretAnnotation( CaretAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( CaretAnnotation ) Q_DISABLE_COPY( CaretAnnotation ) }; @@ -567,11 +679,10 @@ */ class POPPLER_QT4_EXPORT FileAttachmentAnnotation : public Annotation { + friend class AnnotationPrivate; + public: - FileAttachmentAnnotation(); - FileAttachmentAnnotation( const QDomNode &node ); virtual ~FileAttachmentAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; /** @@ -595,6 +706,10 @@ void setEmbeddedFile( EmbeddedFile *ef ); private: + FileAttachmentAnnotation(); + FileAttachmentAnnotation( const QDomNode &node ); + FileAttachmentAnnotation( FileAttachmentAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( FileAttachmentAnnotation ) Q_DISABLE_COPY( FileAttachmentAnnotation ) }; @@ -608,11 +723,10 @@ */ class POPPLER_QT4_EXPORT SoundAnnotation : public Annotation { + friend class AnnotationPrivate; + public: - SoundAnnotation(); - SoundAnnotation( const QDomNode &node ); virtual ~SoundAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; /** @@ -636,6 +750,10 @@ void setSound( SoundObject *ef ); private: + SoundAnnotation(); + SoundAnnotation( const QDomNode &node ); + SoundAnnotation( SoundAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( SoundAnnotation ) Q_DISABLE_COPY( SoundAnnotation ) }; @@ -649,11 +767,10 @@ */ class POPPLER_QT4_EXPORT MovieAnnotation : public Annotation { + friend class AnnotationPrivate; + public: - MovieAnnotation(); - MovieAnnotation( const QDomNode &node ); virtual ~MovieAnnotation(); - virtual void store( QDomNode &parentNode, QDomDocument &document ) const; virtual SubType subType() const; /** @@ -677,10 +794,60 @@ void setMovieTitle( const QString &title ); private: + MovieAnnotation(); + MovieAnnotation( const QDomNode &node ); + MovieAnnotation( MovieAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; Q_DECLARE_PRIVATE( MovieAnnotation ) Q_DISABLE_COPY( MovieAnnotation ) }; +/** + * \short Screen annotation. + * + * The screen annotation represents a screen to be played when activated. + * + * \since 0.20 + */ +class POPPLER_QT4_EXPORT ScreenAnnotation : public Annotation +{ + friend class AnnotationPrivate; + + public: + virtual ~ScreenAnnotation(); + + virtual SubType subType() const; + + /** + * Returns the LinkRendition of this annotation. + */ + LinkRendition* action() const; + + /** + * Sets a new LinkRendition for this annotation. + * + * \note ScreenAnnotation takes ownership of the object + */ + void setAction( LinkRendition *action ); + + /** + * Returns the title of the screen of this annotation. + */ + QString screenTitle() const; + + /** + * Sets a new title for the screen of this annotation. + */ + void setScreenTitle( const QString &title ); + + private: + ScreenAnnotation(); + ScreenAnnotation( ScreenAnnotationPrivate &dd ); + virtual void store( QDomNode &parentNode, QDomDocument &document ) const; // stub + Q_DECLARE_PRIVATE( ScreenAnnotation ) + Q_DISABLE_COPY( ScreenAnnotation ) +}; + } #endif diff -Nru poppler-0.18.4/qt4/src/poppler-document.cc poppler-0.20.5/qt4/src/poppler-document.cc --- poppler-0.18.4/qt4/src/poppler-document.cc 2012-01-30 19:32:08.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-document.cc 2012-05-10 20:05:44.000000000 +0000 @@ -4,6 +4,7 @@ * Copyright (C) 2005-2010, Albert Astals Cid * Copyright (C) 2006-2010, Pino Toscano * Copyright (C) 2010, 2011 Hib Eris + * Copyright (C) 2012 Koji Otani * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -40,7 +41,11 @@ #include "poppler-page-private.h" #if defined(USE_CMS) +#if defined(USE_LCMS1) #include +#else +#include +#endif #endif namespace Poppler { diff -Nru poppler-0.18.4/qt4/src/poppler-embeddedfile-private.h poppler-0.20.5/qt4/src/poppler-embeddedfile-private.h --- poppler-0.18.4/qt4/src/poppler-embeddedfile-private.h 2011-11-22 21:33:21.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-embeddedfile-private.h 2012-08-29 22:45:58.000000000 +0000 @@ -1,5 +1,5 @@ /* poppler-embeddedfile-private.h: Qt4 interface to poppler - * Copyright (C) 2005, 2008, 2009, Albert Astals Cid + * Copyright (C) 2005, 2008, 2009, 2012, Albert Astals Cid * Copyright (C) 2005, Brad Hards * Copyright (C) 2008, 2011, Pino Toscano * @@ -31,6 +31,8 @@ public: EmbeddedFileData(FileSpec *fs); ~EmbeddedFileData(); + + EmbFile *embFile() const; FileSpec *filespec; }; diff -Nru poppler-0.18.4/qt4/src/poppler-embeddedfile.cc poppler-0.20.5/qt4/src/poppler-embeddedfile.cc --- poppler-0.18.4/qt4/src/poppler-embeddedfile.cc 2011-11-22 21:33:21.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-embeddedfile.cc 2012-08-29 22:57:43.000000000 +0000 @@ -1,5 +1,5 @@ /* poppler-document.cc: qt interface to poppler - * Copyright (C) 2005, 2008, 2009, Albert Astals Cid + * Copyright (C) 2005, 2008, 2009, 2012, Albert Astals Cid * Copyright (C) 2005, Brad Hards * Copyright (C) 2008, 2011, Pino Toscano * @@ -44,6 +44,11 @@ delete filespec; } +EmbFile *EmbeddedFileData::embFile() const +{ + return filespec->isOk() ? filespec->getEmbeddedFile() : NULL; +} + EmbeddedFile::EmbeddedFile(EmbFile *embfile) : m_embeddedFile(0) @@ -75,30 +80,30 @@ int EmbeddedFile::size() const { - return m_embeddedFile->filespec->getEmbeddedFile()->size(); + return m_embeddedFile->embFile() ? m_embeddedFile->embFile()->size() : -1; } QDateTime EmbeddedFile::modDate() const { - GooString *goo = m_embeddedFile->filespec->getEmbeddedFile()->modDate(); + GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->modDate() : NULL; return goo ? convertDate(goo->getCString()) : QDateTime(); } QDateTime EmbeddedFile::createDate() const { - GooString *goo = m_embeddedFile->filespec->getEmbeddedFile()->createDate(); + GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->createDate() : NULL; return goo ? convertDate(goo->getCString()) : QDateTime(); } QByteArray EmbeddedFile::checksum() const { - GooString *goo = m_embeddedFile->filespec->getEmbeddedFile()->checksum(); + GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->checksum() : NULL; return goo ? QByteArray::fromRawData(goo->getCString(), goo->getLength()) : QByteArray(); } QString EmbeddedFile::mimeType() const { - GooString *goo = m_embeddedFile->filespec->getEmbeddedFile()->mimeType(); + GooString *goo = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->mimeType() : NULL; return goo ? QString(goo->getCString()) : QString(); } @@ -106,11 +111,10 @@ { if (!isValid()) return QByteArray(); - Stream *stream = m_embeddedFile->filespec->getEmbeddedFile()->stream(); + Stream *stream = m_embeddedFile->embFile() ? m_embeddedFile->embFile()->stream() : NULL; if (!stream) return QByteArray(); - Object obj; stream->reset(); int dataLen = 0; QByteArray fileArray; diff -Nru poppler-0.18.4/qt4/src/poppler-form.cc poppler-0.20.5/qt4/src/poppler-form.cc --- poppler-0.18.4/qt4/src/poppler-form.cc 2011-11-22 21:33:22.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-form.cc 2012-09-16 15:52:34.000000000 +0000 @@ -1,6 +1,6 @@ /* poppler-form.h: qt4 interface to poppler * Copyright (C) 2007-2008, 2011, Pino Toscano - * Copyright (C) 2008, 2011, Albert Astals Cid + * Copyright (C) 2008, 2011, 2012 Albert Astals Cid * Copyright (C) 2011 Carlos Garcia Campos * * This program is free software; you can redistribute it and/or modify @@ -35,26 +35,18 @@ namespace { -Qt::Alignment formTextAlignment(Object *obj) +Qt::Alignment formTextAlignment(::FormWidget *fm) { - Object tmp; - int align = 0; - if (obj->dictLookup("Q", &tmp)->isInt()) + Qt::Alignment qtalign = Qt::AlignLeft; + switch (fm->getField()->getTextQuadding()) { - align = tmp.getInt(); - } - tmp.free(); - Qt::Alignment qtalign; - switch (align) - { - case 1: + case quaddingCentered: qtalign = Qt::AlignHCenter; break; - case 2: + case quaddingRightJustified: qtalign = Qt::AlignRight; break; - case 0: - default: + case quaddingLeftJustified: qtalign = Qt::AlignLeft; } return qtalign; @@ -90,22 +82,6 @@ QPointF bottomRight; XPDFReader::transform( MTX, qMax( left, right ), qMin( top, bottom ), bottomRight ); m_formData->box = QRectF(topLeft, QSizeF(bottomRight.x() - topLeft.x(), bottomRight.y() - topLeft.y())); - - Dict *dict = m_formData->fm->getObj()->getDict(); - Object tmp; - - // reading the flags - if (dict->lookup("Ff", &tmp)->isInt()) - { - m_formData->flags = tmp.getInt(); - } - tmp.free(); - // reading the widget annotation flags - if (dict->lookup("F", &tmp)->isInt()) - { - m_formData->annoflags = tmp.getInt(); - } - tmp.free(); } FormField::~FormField() @@ -139,7 +115,7 @@ QString name; if (GooString *goo = m_formData->fm->getFullyQualifiedName()) { - name = QString::fromLatin1(goo->getCString()); + name = UnicodeParsedString(goo); } return name; } @@ -161,7 +137,7 @@ bool FormField::isVisible() const { - return !(m_formData->annoflags & (1 << 1)); + return !(m_formData->fm->getWidgetAnnotation()->getFlags() & Annot::flagHidden); } Link* FormField::activationAction() const @@ -321,7 +297,7 @@ Qt::Alignment FormFieldText::textAlignment() const { - return formTextAlignment(m_formData->fm->getObj()); + return formTextAlignment(m_formData->fm); } bool FormFieldText::canBeSpellChecked() const @@ -373,7 +349,6 @@ bool FormFieldChoice::multiSelect() const { -// return m_formData->flags & (1 << 21); FormWidgetChoice* fwc = static_cast(m_formData->fm); return !fwc->isCombo() ? fwc->isMultiSelect() : false; } @@ -399,7 +374,7 @@ Qt::Alignment FormFieldChoice::textAlignment() const { - return formTextAlignment(m_formData->fm->getObj()); + return formTextAlignment(m_formData->fm); } bool FormFieldChoice::canBeSpellChecked() const diff -Nru poppler-0.18.4/qt4/src/poppler-link-extractor-private.h poppler-0.20.5/qt4/src/poppler-link-extractor-private.h --- poppler-0.18.4/qt4/src/poppler-link-extractor-private.h 2011-11-22 21:33:22.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-link-extractor-private.h 2012-05-10 20:05:44.000000000 +0000 @@ -40,7 +40,7 @@ virtual GBool upsideDown() { return gFalse; } virtual GBool useDrawChar() { return gFalse; } virtual GBool interpretType3Chars() { return gFalse; } - virtual void processLink(::AnnotLink *link, Catalog *catalog); + virtual void processLink(::AnnotLink *link); // our stuff QList< Link* > links(); diff -Nru poppler-0.18.4/qt4/src/poppler-link-extractor.cc poppler-0.20.5/qt4/src/poppler-link-extractor.cc --- poppler-0.18.4/qt4/src/poppler-link-extractor.cc 2011-11-22 21:33:22.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-link-extractor.cc 2012-05-10 20:05:44.000000000 +0000 @@ -49,7 +49,7 @@ qDeleteAll(m_links); } -void LinkExtractorOutputDev::processLink(::AnnotLink *link, Catalog *catalog) +void LinkExtractorOutputDev::processLink(::AnnotLink *link) { if (!link->isOk()) return; @@ -71,7 +71,7 @@ { m_links.append(popplerLink); } - OutputDev::processLink(link, catalog); + OutputDev::processLink(link); } QList< Link* > LinkExtractorOutputDev::links() diff -Nru poppler-0.18.4/qt4/src/poppler-link.cc poppler-0.20.5/qt4/src/poppler-link.cc --- poppler-0.18.4/qt4/src/poppler-link.cc 2011-11-22 21:33:22.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-link.cc 2012-05-10 20:05:44.000000000 +0000 @@ -2,6 +2,8 @@ * Copyright (C) 2006-2007, Albert Astals Cid * Copyright (C) 2007-2008, Pino Toscano * Copyright (C) 2010 Hib Eris + * Copyright (C) 2012, Tobias Koenig + * Copyright (C) 2012, Guillermo A. Amaral B. * Adapting code from * Copyright (C) 2004 by Enrico Ros * @@ -22,10 +24,19 @@ #include #include +#include #include +#include "poppler-annotation-private.h" + #include "Link.h" +#include "Rendition.h" + +bool operator==( const Ref &r1, const Ref &r2 ) +{ + return r1.num == r2.num && r1.gen == r2.gen; +} namespace Poppler { @@ -154,6 +165,26 @@ delete sound; } +class LinkRenditionPrivate : public LinkPrivate +{ + public: + LinkRenditionPrivate( const QRectF &area, ::MediaRendition *rendition ); + ~LinkRenditionPrivate(); + + MediaRendition *rendition; +}; + + LinkRenditionPrivate::LinkRenditionPrivate( const QRectF &area, ::MediaRendition *r ) + : LinkPrivate( area ) + , rendition( new MediaRendition( r ) ) + { + } + + LinkRenditionPrivate::~LinkRenditionPrivate() + { + delete rendition; + } + class LinkJavaScriptPrivate : public LinkPrivate { public: @@ -167,18 +198,20 @@ { } -#if 0 class LinkMoviePrivate : public LinkPrivate { public: - LinkMoviePrivate( const QRectF &area ); + LinkMoviePrivate( const QRectF &area, LinkMovie::Operation operation, const QString &title, const Ref &reference ); + + LinkMovie::Operation operation; + QString annotationTitle; + Ref annotationReference; }; - LinkMoviePrivate::LinkMoviePrivate( const QRectF &area ) - : LinkPrivate( area ) + LinkMoviePrivate::LinkMoviePrivate( const QRectF &area, LinkMovie::Operation _operation, const QString &title, const Ref &reference ) + : LinkPrivate( area ), operation( _operation ), annotationTitle( title ), annotationReference( reference ) { } -#endif static void cvtUserToDev(::Page *page, double xu, double yu, int *xd, int *yd) { double ctm[6]; @@ -544,6 +577,27 @@ return d->sound; } + // LinkRendition + LinkRendition::LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition ) + : Link( *new LinkRenditionPrivate( linkArea, rendition ) ) + { + } + + LinkRendition::~LinkRendition() + { + } + + Link::LinkType LinkRendition::linkType() const + { + return Rendition; + } + + MediaRendition * LinkRendition::rendition() const + { + Q_D( const LinkRendition ); + return d->rendition; + } + // LinkJavaScript LinkJavaScript::LinkJavaScript( const QRectF &linkArea, const QString &js ) : Link( *new LinkJavaScriptPrivate( linkArea ) ) @@ -567,10 +621,9 @@ return d->js; } -#if 0 // LinkMovie - LinkMovie::LinkMovie( const QRectF &linkArea ) - : Link( *new LinkMoviePrivate( linkArea ) ) + LinkMovie::LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference ) + : Link( *new LinkMoviePrivate( linkArea, operation, annotationTitle, annotationReference ) ) { } @@ -582,6 +635,25 @@ { return Movie; } -#endif + + LinkMovie::Operation LinkMovie::operation() const + { + Q_D( const LinkMovie ); + return d->operation; + } + + bool LinkMovie::isReferencedAnnotation( const MovieAnnotation *annotation ) const + { + Q_D( const LinkMovie ); + if ( d->annotationReference.num != -1 && d->annotationReference == annotation->d_ptr->pdfObjectReference() ) + { + return true; + } + else if ( !d->annotationTitle.isNull() ) + { + return ( annotation->movieTitle() == d->annotationTitle ); + } + return false; + } } diff -Nru poppler-0.18.4/qt4/src/poppler-link.h poppler-0.20.5/qt4/src/poppler-link.h --- poppler-0.18.4/qt4/src/poppler-link.h 2011-11-22 21:33:22.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-link.h 2012-05-10 20:05:44.000000000 +0000 @@ -1,7 +1,8 @@ /* poppler-link.h: qt interface to poppler * Copyright (C) 2006, Albert Astals Cid * Copyright (C) 2007-2008, 2010, Pino Toscano - * Copyright (C) 2010, Guillermo Amaral + * Copyright (C) 2010, 2012, Guillermo Amaral + * Copyright (C) 2012, Tobias Koenig * Adapting code from * Copyright (C) 2004 by Enrico Ros * @@ -28,6 +29,9 @@ #include #include "poppler-export.h" +struct Ref; +class MediaRendition; + namespace Poppler { class LinkPrivate; @@ -40,6 +44,8 @@ class LinkMoviePrivate; class LinkDestinationData; class LinkDestinationPrivate; +class LinkRenditionPrivate; +class MediaRendition; class SoundObject; /** @@ -183,6 +189,7 @@ Action, ///< A "standard" action to be executed in the viewer Sound, ///< A link representing a sound to be played Movie, ///< An action to be executed on a movie + Rendition, ///< A rendition link \since 0.20 JavaScript ///< A JavaScript code to be interpreted \since 0.10 }; @@ -440,6 +447,38 @@ }; /** + * Rendition: Rendition link. + * + * \since 0.20 + */ +class POPPLER_QT4_EXPORT LinkRendition : public Link +{ + public: + /** + * Create a new media rendition link. + * + * \param linkArea the active area of the link + * \param rendition + */ + LinkRendition( const QRectF &linkArea, ::MediaRendition *rendition ); + /** + * Destructor. + */ + virtual ~LinkRendition(); + + LinkType linkType() const; + + /** + * + */ + MediaRendition *rendition() const; + + private: + Q_DECLARE_PRIVATE( LinkRendition ) + Q_DISABLE_COPY( LinkRendition ) +}; + +/** * JavaScript: a JavaScript code to be interpreted. * * \since 0.10 @@ -471,21 +510,52 @@ Q_DISABLE_COPY( LinkJavaScript ) }; -#if 0 -/** Movie: Not yet defined -> think renaming to 'Media' link **/ +/** + * Movie: a movie to be played. + * + * \since 0.20 + */ class POPPLER_QT4_EXPORT LinkMovie : public Link -// TODO this (Movie link) { public: - LinkMovie( const QRectF &linkArea ); + /** + * Describes the operation to be performed on the movie. + */ + enum Operation { Play, + Stop, + Pause, + Resume + }; + + /** + * Create a new Movie link. + * + * \param linkArea the active area of the link + * \param operation the operation to be performed on the movie + * \param annotationTitle the title of the movie annotation identifying the movie to be played + * \param annotationReference the object reference of the movie annotation identifying the movie to be played + * + * Note: This constructor is supposed to be used by Poppler::Page only. + */ + LinkMovie( const QRectF &linkArea, Operation operation, const QString &annotationTitle, const Ref &annotationReference ); + /** + * Destructor. + */ ~LinkMovie(); LinkType linkType() const; + /** + * Returns the operation to be performed on the movie. + */ + Operation operation() const; + /** + * Returns whether the given @p annotation is the referenced movie annotation for this movie @p link. + */ + bool isReferencedAnnotation( const MovieAnnotation *annotation ) const; private: Q_DECLARE_PRIVATE( LinkMovie ) Q_DISABLE_COPY( LinkMovie ) }; -#endif } diff -Nru poppler-0.18.4/qt4/src/poppler-media.cc poppler-0.20.5/qt4/src/poppler-media.cc --- poppler-0.18.4/qt4/src/poppler-media.cc 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-media.cc 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,162 @@ +/* poppler-media.cc: qt interface to poppler + * Copyright (C) 2012 Guillermo A. Amaral B. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "poppler-media.h" + +#include "Rendition.h" + +#include "poppler-private.h" + +#include + +#define BUFFER_MAX 4096 + +namespace Poppler +{ + +class MediaRenditionPrivate +{ +public: + + MediaRenditionPrivate(::MediaRendition *rendition) + : rendition(rendition) + { + } + + ::MediaRendition *rendition; +}; + +MediaRendition::MediaRendition(::MediaRendition *rendition) + : d_ptr(new MediaRenditionPrivate(rendition)) +{ +} + +MediaRendition::~MediaRendition() +{ + delete d_ptr; +} + +bool +MediaRendition::isValid() const +{ + Q_D( const MediaRendition ); + return d->rendition && d->rendition->isOk(); +} + +QString +MediaRendition::contentType() const +{ + Q_ASSERT(isValid() && "Invalid media rendition."); + Q_D( const MediaRendition ); + return UnicodeParsedString(d->rendition->getContentType()); +} + +QString +MediaRendition::fileName() const +{ + Q_ASSERT(isValid() && "Invalid media rendition."); + Q_D( const MediaRendition ); + return UnicodeParsedString(d->rendition->getFileName()); +} + +bool +MediaRendition::isEmbedded() const +{ + Q_ASSERT(isValid() && "Invalid media rendition."); + Q_D( const MediaRendition ); + return d->rendition->getIsEmbedded(); +} + +QByteArray +MediaRendition::data() const +{ + Q_ASSERT(isValid() && "Invalid media rendition."); + Q_D( const MediaRendition ); + + Stream *s = d->rendition->getEmbbededStream(); + if (!s) + return QByteArray(); + + QBuffer buffer; + Guchar data[BUFFER_MAX]; + int bread; + + buffer.open(QIODevice::WriteOnly); + s->reset(); + while ((bread = s->doGetChars(BUFFER_MAX, data)) != 0) + buffer.write(reinterpret_cast(data), bread); + buffer.close(); + + return buffer.data(); +} + +bool +MediaRendition::autoPlay() const +{ + Q_D( const MediaRendition ); + if (d->rendition->getBEParameters()) { + return d->rendition->getBEParameters()->autoPlay; + } else if (d->rendition->getMHParameters()) { + return d->rendition->getMHParameters()->autoPlay; + } else qDebug("No BE or MH paremeters to reference!"); + return false; +} + +bool +MediaRendition::showControls() const +{ + Q_D( const MediaRendition ); + if (d->rendition->getBEParameters()) { + return d->rendition->getBEParameters()->showControls; + } else if (d->rendition->getMHParameters()) { + return d->rendition->getMHParameters()->showControls; + } else qDebug("No BE or MH paremeters to reference!"); + return false; +} + +float +MediaRendition::repeatCount() const +{ + Q_D( const MediaRendition ); + if (d->rendition->getBEParameters()) { + return d->rendition->getBEParameters()->repeatCount; + } else if (d->rendition->getMHParameters()) { + return d->rendition->getMHParameters()->repeatCount; + } else qDebug("No BE or MH paremeters to reference!"); + return 1.f; +} + +QSize +MediaRendition::size() const +{ + Q_D( const MediaRendition ); + MediaParameters *mp = 0; + + if (d->rendition->getBEParameters()) + mp = d->rendition->getBEParameters(); + else if (d->rendition->getMHParameters()) + mp = d->rendition->getMHParameters(); + else qDebug("No BE or MH paremeters to reference!"); + + if (mp) + return QSize(mp->windowParams.width, mp->windowParams.height); + return QSize(); +} + +} + diff -Nru poppler-0.18.4/qt4/src/poppler-media.h poppler-0.20.5/qt4/src/poppler-media.h --- poppler-0.18.4/qt4/src/poppler-media.h 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-media.h 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,97 @@ +/* poppler-media.h: qt interface to poppler + * Copyright (C) 2012 Guillermo A. Amaral B. + * Copyright (C) 2012 Albert Astals Cid + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef __POPPLER_MEDIARENDITION_H__ +#define __POPPLER_MEDIARENDITION_H__ + +#include "poppler-export.h" + +#include +#include + +class MediaRendition; +class QIODevice; + +namespace Poppler +{ + class MediaRenditionPrivate; + + /** + Qt wrapper for MediaRendition. + + \since 0.20 + */ + class POPPLER_QT4_EXPORT MediaRendition { + public: + MediaRendition(::MediaRendition *rendition); + ~MediaRendition(); + + /** + Check if wrapper is holding a valid rendition object. + */ + bool isValid() const; + + /** + Returns content type. + */ + QString contentType() const; + + /** + Returns file name. + */ + QString fileName() const; + + /** + Returns true if media is embedded. + */ + bool isEmbedded() const; + + /** + Returns data buffer. + */ + QByteArray data() const; + + /** + Convenience accessor for auto-play parameter. + */ + bool autoPlay() const; + + /** + Convenience accessor for show controls parameter. + */ + bool showControls() const; + + /** + Convenience accessor for repeat count parameter. + */ + float repeatCount() const; + + /** + Convenience accessor for size parameter. + */ + QSize size() const; + + private: + Q_DECLARE_PRIVATE( MediaRendition ) + MediaRenditionPrivate *d_ptr; + Q_DISABLE_COPY( MediaRendition ) + }; +} + +#endif /* __POPPLER_MEDIARENDITION_H__ */ diff -Nru poppler-0.18.4/qt4/src/poppler-page.cc poppler-0.20.5/qt4/src/poppler-page.cc --- poppler-0.18.4/qt4/src/poppler-page.cc 2011-11-22 21:33:23.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-page.cc 2012-05-10 20:05:44.000000000 +0000 @@ -6,10 +6,12 @@ * Copyright (C) 2006-2011, Pino Toscano * Copyright (C) 2008 Carlos Garcia Campos * Copyright (C) 2009 Shawn Rutledge - * Copyright (C) 2010, Guillermo Amaral + * Copyright (C) 2010, 2012, Guillermo Amaral * Copyright (C) 2010 Suzuki Toshiya * Copyright (C) 2010 Matthias Fauconneau * Copyright (C) 2010 Hib Eris + * Copyright (C) 2012 Tobias Koenig + * Copyright (C) 2012 Fabio D'Urso * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,8 +44,8 @@ #include #include #include -#include #include +#include #if defined(HAVE_SPLASH) #include #include @@ -53,23 +55,12 @@ #include "poppler-page-transition-private.h" #include "poppler-page-private.h" #include "poppler-link-extractor-private.h" -#include "poppler-annotation-helper.h" #include "poppler-annotation-private.h" #include "poppler-form.h" +#include "poppler-media.h" namespace Poppler { -class DummyAnnotation : public Annotation -{ - public: - DummyAnnotation() - : Annotation( *new AnnotationPrivate() ) - { - } - - virtual SubType subType() const { return A_BASE; } -}; - Link* PageData::convertLinkActionToLink(::LinkAction * a, const QRectF &linkArea) { return convertLinkActionToLink(a, parentDoc, linkArea); @@ -171,15 +162,43 @@ break; case actionMovie: -/* TODO this (Movie link) - m_type = Movie; - LinkMovie * m = (LinkMovie *) a; - // copy Movie parameters (2 IDs and a const char *) - Ref * r = m->getAnnotRef(); - m_refNum = r->num; - m_refGen = r->gen; - copyString( m_uri, m->getTitle()->getCString() ); -*/ break; + { + ::LinkMovie *lm = (::LinkMovie *)a; + + const QString title = ( lm->hasAnnotTitle() ? UnicodeParsedString( lm->getAnnotTitle() ) : QString() ); + + Ref reference; + reference.num = reference.gen = -1; + if ( lm->hasAnnotRef() ) + reference = *lm->getAnnotRef(); + + LinkMovie::Operation operation = LinkMovie::Play; + switch ( lm->getOperation() ) + { + case ::LinkMovie::operationTypePlay: + operation = LinkMovie::Play; + break; + case ::LinkMovie::operationTypePause: + operation = LinkMovie::Pause; + break; + case ::LinkMovie::operationTypeResume: + operation = LinkMovie::Resume; + break; + case ::LinkMovie::operationTypeStop: + operation = LinkMovie::Stop; + break; + }; + + popplerLink = new LinkMovie( linkArea, operation, title, reference ); + } + break; + + case actionRendition: + { + ::LinkRendition *lrn = (::LinkRendition *)a; + popplerLink = new LinkRendition( linkArea, lrn->getMedia() ); + } + break; case actionUnknown: break; @@ -330,7 +349,7 @@ QString result; const GBool rawOrder = textLayout == RawOrderLayout; - output_dev = new TextOutputDev(0, gFalse, rawOrder, gFalse); + output_dev = new TextOutputDev(0, gFalse, 0, rawOrder, gFalse); m_page->parentDoc->doc->displayPageSlice(output_dev, m_page->index + 1, 72, 72, 0, false, true, false, -1, -1, -1, -1); if (r.isNull()) @@ -371,19 +390,19 @@ int rotation = (int)rotate * 90; // fetch ourselves a textpage - TextOutputDev td(NULL, gTrue, gFalse, gFalse); + TextOutputDev td(NULL, gTrue, 0, gFalse, gFalse); m_page->parentDoc->doc->displayPage( &td, m_page->index + 1, 72, 72, rotation, false, true, false ); TextPage *textPage=td.takeText(); if (direction == FromTop) found = textPage->findText( u.data(), len, - gTrue, gTrue, gFalse, gFalse, sCase, gFalse, &sLeft, &sTop, &sRight, &sBottom ); + gTrue, gTrue, gFalse, gFalse, sCase, gFalse, gFalse, &sLeft, &sTop, &sRight, &sBottom ); else if ( direction == NextResult ) found = textPage->findText( u.data(), len, - gFalse, gTrue, gTrue, gFalse, sCase, gFalse, &sLeft, &sTop, &sRight, &sBottom ); + gFalse, gTrue, gTrue, gFalse, sCase, gFalse, gFalse, &sLeft, &sTop, &sRight, &sBottom ); else if ( direction == PreviousResult ) found = textPage->findText( u.data(), len, - gFalse, gTrue, gTrue, gFalse, sCase, gTrue, &sLeft, &sTop, &sRight, &sBottom ); + gFalse, gTrue, gTrue, gFalse, sCase, gTrue, gFalse, &sLeft, &sTop, &sRight, &sBottom ); textPage->decRefCnt(); @@ -414,7 +433,7 @@ QList output_list; - output_dev = new TextOutputDev(0, gFalse, gFalse, gFalse); + output_dev = new TextOutputDev(0, gFalse, 0, gFalse, gFalse); int rotation = (int)rotate * 90; @@ -554,762 +573,24 @@ QList Page::annotations() const { - ::Page *pdfPage = m_page->page; - Annots* annots = pdfPage->getAnnots(m_page->parentDoc->doc->getCatalog()); - const uint numAnnotations = annots->getNumAnnots(); - if ( numAnnotations == 0 ) - { - return QList(); - } - - // ID to Annotation/PopupWindow maps - QMap< int, Annotation * > annotationsMap; - QHash< AnnotPopup *, PopupWindow * > popupsMap; - // lists of Windows and Revisions that needs resolution - QLinkedList< ResolveRevision > resolveRevList; - QLinkedList< ResolveWindow > resolvePopList; - QLinkedList< PostProcessText > ppTextList; - - // build a normalized transform matrix for this page at 100% scale - GfxState * gfxState = new GfxState( 72.0, 72.0, pdfPage->getCropBox(), pdfPage->getRotate(), gTrue ); - double * gfxCTM = gfxState->getCTM(); - double MTX[6]; - for ( int i = 0; i < 6; i+=2 ) - { - MTX[i] = gfxCTM[i] / pdfPage->getCropWidth(); - MTX[i+1] = gfxCTM[i+1] / pdfPage->getCropHeight(); - } - delete gfxState; - - /** 1 - PARSE ALL ANNOTATIONS AND POPUPS FROM THE PAGE */ - for ( uint j = 0; j < numAnnotations; j++ ) - { - // get the j-th annotation - Annot * ann = annots->getAnnot( j ); - if ( !ann ) - { - qDebug() << "Annot" << j << "is null."; - continue; - } - - Annotation * annotation = 0; - int annotID = ann->getId(); - AnnotMarkup * markupann = dynamic_cast< AnnotMarkup * >( ann ); - bool addToPage = true; // Popup annots are added to custom queue - - /** 1.1. GET Subtype */ - Annot::AnnotSubtype subType = ann->getType(); - - /** 1.2. CREATE Annotation / PopupWindow and PARSE specific params */ - switch ( subType ) - { - case Annot::typeText: - { - // parse TextAnnotation params - AnnotText * textann = static_cast< AnnotText * >( ann ); - TextAnnotation * t = new TextAnnotation(); - annotation = t; - // -> textType - t->setTextType( TextAnnotation::Linked ); - // -> textIcon - t->setTextIcon( QString::fromLatin1( textann->getIcon()->getCString() ) ); - // request for postprocessing window geometry - PostProcessText request; - request.textAnnotation = t; - request.opened = textann->getOpen(); - ppTextList.append( request ); - break; - } - case Annot::typeFreeText: - { - // parse TextAnnotation params - AnnotFreeText * textann = static_cast< AnnotFreeText * >( ann ); - TextAnnotation * t = new TextAnnotation(); - annotation = t; - // -> textType - t->setTextType( TextAnnotation::InPlace ); -#if 0 - // -> textFont - QString textFormat; - XPDFReader::lookupString( annotDict, "DA", textFormat ); - // TODO, fill t->textFont using textFormat if not empty -#endif - // -> inplaceAlign - t->setInplaceAlign( textann->getQuadding() ); - // -> inplaceText (simple) - QString tmpstring; - GooString *styleString = textann->getStyleString(); - if ( styleString ) - tmpstring = UnicodeParsedString( styleString ); -#if 0 - // -> inplaceText (complex override) - XPDFReader::lookupString( annotDict, "RC", tmpstring ); -#endif - t->setInplaceText( tmpstring ); - // -> inplaceCallout - AnnotCalloutLine *callout = textann->getCalloutLine(); - if ( callout ) - { - QPointF tmppoint; - XPDFReader::transform( MTX, callout->getX1(), callout->getY1(), tmppoint ); - t->setCalloutPoint( 0, tmppoint ); - XPDFReader::transform( MTX, callout->getX2(), callout->getY2(), tmppoint ); - t->setCalloutPoint( 1, tmppoint ); - if ( AnnotCalloutMultiLine * callout_v6 = dynamic_cast< AnnotCalloutMultiLine * >( callout ) ) - { - XPDFReader::transform( MTX, callout_v6->getX3(), callout_v6->getY3(), tmppoint ); - t->setCalloutPoint( 2, tmppoint ); - } - } - // -> inplaceIntent - t->setInplaceIntent( (TextAnnotation::InplaceIntent)textann->getIntent() ); - AnnotBorderEffect *border_effect = textann->getBorderEffect(); - if ( border_effect ) - { - // -> style.effect - t->style.effect = (Annotation::LineEffect)border_effect->getEffectType(); - // -> style.effectIntensity - t->style.effectIntensity = (int)border_effect->getIntensity(); - } - break; - } - case Annot::typeLine: - { - // parse LineAnnotation params - AnnotLine * lineann = static_cast< AnnotLine * >( ann ); - LineAnnotation * l = new LineAnnotation(); - annotation = l; - - // -> linePoints - QLinkedList linePoints; - QPointF p; - XPDFReader::transform( MTX, lineann->getX1(), lineann->getY1(), p ); - linePoints.push_back( p ); - XPDFReader::transform( MTX, lineann->getX2(), lineann->getY2(), p ); - linePoints.push_back( p ); - l->setLinePoints( linePoints ); - // -> lineStartStyle - l->setLineStartStyle( (LineAnnotation::TermStyle)lineann->getStartStyle() ); - // -> lineEndStyle - l->setLineEndStyle( (LineAnnotation::TermStyle)lineann->getEndStyle() ); - // -> lineClosed - l->setLineClosed( false ); - // -> lineInnerColor - l->setLineInnerColor( convertAnnotColor( lineann->getInteriorColor() ) ); - // -> lineLeadingFwdPt - l->setLineLeadingForwardPoint( lineann->getLeaderLineLength() ); - // -> lineLeadingBackPt - l->setLineLeadingBackPoint( lineann->getLeaderLineExtension() ); - // -> lineShowCaption - l->setLineShowCaption( lineann->getCaption() ); - // -> lineIntent - l->setLineIntent( (LineAnnotation::LineIntent)( lineann->getIntent() + 1 ) ); - break; - } - case Annot::typePolygon: - case Annot::typePolyLine: - { - // parse LineAnnotation params - AnnotPolygon * polyann = static_cast< AnnotPolygon * >( ann ); - LineAnnotation * l = new LineAnnotation(); - annotation = l; - - // -> polyPoints - QLinkedList polyPoints; - AnnotPath * vertices = polyann->getVertices(); - for ( int i = 0; i < vertices->getCoordsLength(); ++i ) - { - QPointF p; - XPDFReader::transform( MTX, vertices->getX( i ), vertices->getY( i ), p ); - polyPoints.push_back( p ); - } - l->setLinePoints( polyPoints ); - // -> polyStartStyle - l->setLineStartStyle( (LineAnnotation::TermStyle)polyann->getStartStyle() ); - // -> polyEndStyle - l->setLineEndStyle( (LineAnnotation::TermStyle)polyann->getEndStyle() ); - // -> polyClosed - l->setLineClosed( subType == Annot::typePolygon ); - // -> polyInnerColor - l->setLineInnerColor( convertAnnotColor( polyann->getInteriorColor() ) ); - // -> polyIntent - switch ( polyann->getIntent() ) - { - case AnnotPolygon::polygonCloud: - l->setLineIntent( LineAnnotation::PolygonCloud ); - break; - case AnnotPolygon::polylineDimension: - case AnnotPolygon::polygonDimension: - l->setLineIntent( LineAnnotation::Dimension ); - break; - } - break; - } - case Annot::typeSquare: - case Annot::typeCircle: - { - // parse GeomAnnotation params - AnnotGeometry * geomann = static_cast< AnnotGeometry * >( ann ); - GeomAnnotation * g = new GeomAnnotation(); - annotation = g; - - // -> highlightType - if ( subType == Annot::typeSquare ) - g->setGeomType( GeomAnnotation::InscribedSquare ); - else if ( subType == Annot::typeCircle ) - g->setGeomType( GeomAnnotation::InscribedCircle ); - - // -> geomInnerColor - g->setGeomInnerColor( convertAnnotColor( geomann->getInteriorColor() ) ); - - AnnotBorderEffect *border_effect = geomann->getBorderEffect(); - if ( border_effect ) - { - // -> style.effect - g->style.effect = (Annotation::LineEffect)border_effect->getEffectType(); - // -> style.effectIntensity - g->style.effectIntensity = (int)border_effect->getIntensity(); - } - - // TODO RD - - break; - } - case Annot::typeHighlight: - case Annot::typeUnderline: - case Annot::typeSquiggly: - case Annot::typeStrikeOut: - { - AnnotTextMarkup * hlann = static_cast< AnnotTextMarkup * >( ann ); - HighlightAnnotation * h = new HighlightAnnotation(); - annotation = h; - - // -> highlightType - if ( subType == Annot::typeHighlight ) - h->setHighlightType( HighlightAnnotation::Highlight ); - else if ( subType == Annot::typeUnderline ) - h->setHighlightType( HighlightAnnotation::Underline ); - else if ( subType == Annot::typeSquiggly ) - h->setHighlightType( HighlightAnnotation::Squiggly ); - else if ( subType == Annot::typeStrikeOut ) - h->setHighlightType( HighlightAnnotation::StrikeOut ); - - // -> highlightQuads - AnnotQuadrilaterals *hlquads = hlann->getQuadrilaterals(); - if ( !hlquads || !hlquads->getQuadrilateralsLength() ) - { - qDebug() << "Not enough quads for a Highlight annotation."; - delete annotation; - continue; - } - QList< HighlightAnnotation::Quad > quads; - const int quadsCount = hlquads->getQuadrilateralsLength(); - for ( int q = 0; q < quadsCount; ++q ) - { - HighlightAnnotation::Quad quad; - XPDFReader::transform( MTX, hlquads->getX1( q ), hlquads->getY1( q ), quad.points[ 0 ] ); - XPDFReader::transform( MTX, hlquads->getX2( q ), hlquads->getY2( q ), quad.points[ 1 ] ); - XPDFReader::transform( MTX, hlquads->getX3( q ), hlquads->getY3( q ), quad.points[ 2 ] ); - XPDFReader::transform( MTX, hlquads->getX4( q ), hlquads->getY4( q ), quad.points[ 3 ] ); - // ### PDF1.6 specs says that point are in ccw order, but in fact - // points 3 and 4 are swapped in every PDF around! - QPointF tmpPoint = quad.points[ 2 ]; - quad.points[ 2 ] = quad.points[ 3 ]; - quad.points[ 3 ] = tmpPoint; - // initialize other properties and append quad - quad.capStart = true; // unlinked quads are always capped - quad.capEnd = true; // unlinked quads are always capped - quad.feather = 0.1; // default feather - quads.append( quad ); - } - h->setHighlightQuads( quads ); - break; - } - case Annot::typeStamp: - { - AnnotStamp * stampann = static_cast< AnnotStamp * >( ann ); - StampAnnotation * s = new StampAnnotation(); - annotation = s; - // -> stampIcon - s->setStampIconName( QString::fromLatin1( stampann->getIcon()->getCString() ) ); - break; - } - case Annot::typeInk: - { - // parse InkAnnotation params - AnnotInk * inkann = static_cast< AnnotInk * >( ann ); - InkAnnotation * k = new InkAnnotation(); - annotation = k; - - // -> inkPaths - AnnotPath ** paths = inkann->getInkList(); - if ( !paths || !inkann->getInkListLength() ) - { - qDebug() << "InkList not present for ink annot"; - delete annotation; - continue; - } - QList< QLinkedList > inkPaths; - const int pathsNumber = inkann->getInkListLength(); - for ( int m = 0; m < pathsNumber; m++ ) - { - // transform each path in a list of normalized points .. - QLinkedList localList; - AnnotPath * path = paths[ m ]; - const int pointsNumber = path ? path->getCoordsLength() : 0; - for ( int n = 0; n < pointsNumber; ++n ) - { - // get the x,y numbers for current point - double x = path->getX( n ); - double y = path->getY( n ); - // add normalized point to localList - QPointF np; - XPDFReader::transform( MTX, x, y, np ); - localList.push_back( np ); - } - // ..and add it to the annotation - inkPaths.push_back( localList ); - } - k->setInkPaths( inkPaths ); - break; - } - case Annot::typePopup: - { - AnnotPopup * popupann = static_cast< AnnotPopup * >( ann ); - - // create PopupWindow and add it to the popupsMap - PopupWindow * popup = new PopupWindow(); - popupsMap[ popupann ] = popup; - addToPage = false; - - // get window specific properties if any - popup->shown = popupann->getOpen(); - // no need to parse parent annotation id - //XPDFReader::lookupIntRef( annotDict, "Parent", popup->... ); - - // use the 'dummy annotation' for getting other parameters - popup->dummyAnnotation = new DummyAnnotation(); - annotation = popup->dummyAnnotation; - - break; - } - case Annot::typeLink: - { - // parse Link params - AnnotLink * linkann = static_cast< AnnotLink * >( ann ); - LinkAnnotation * l = new LinkAnnotation(); - annotation = l; - - // -> hlMode - l->setLinkHighlightMode( (LinkAnnotation::HighlightMode)linkann->getLinkEffect() ); - - // -> link region - // TODO - - // reading link action - if ( linkann->getAction() ) - { - Link * popplerLink = m_page->convertLinkActionToLink( linkann->getAction(), QRectF() ); - if ( popplerLink ) - { - l->setLinkDestination( popplerLink ); - } - } - - break; - } - case Annot::typeCaret: - { - // parse CaretAnnotation params - AnnotCaret * caretann = static_cast< AnnotCaret * >( ann ); - CaretAnnotation * c = new CaretAnnotation(); - annotation = c; - - // -> caretSymbol - c->setCaretSymbol( (CaretAnnotation::CaretSymbol)caretann->getSymbol() ); - - // TODO RD - - break; - } - case Annot::typeFileAttachment: - { - AnnotFileAttachment * attachann = static_cast< AnnotFileAttachment * >( ann ); - FileAttachmentAnnotation * f = new FileAttachmentAnnotation(); - annotation = f; - // -> fileIcon - f->setFileIconName( QString::fromLatin1( attachann->getName()->getCString() ) ); - // -> embeddedFile - FileSpec *filespec = new FileSpec( attachann->getFile() ); - f->setEmbeddedFile( new EmbeddedFile( *new EmbeddedFileData( filespec ) ) ); - break; - } - case Annot::typeSound: - { - AnnotSound * soundann = static_cast< AnnotSound * >( ann ); - SoundAnnotation * s = new SoundAnnotation(); - annotation = s; - - // -> soundIcon - s->setSoundIconName( QString::fromLatin1( soundann->getName()->getCString() ) ); - // -> sound - s->setSound( new SoundObject( soundann->getSound() ) ); - - break; - } - case Annot::typeMovie: - { - AnnotMovie * movieann = static_cast< AnnotMovie * >( ann ); - MovieAnnotation * m = new MovieAnnotation(); - annotation = m; - - // -> movie - MovieObject *movie = new MovieObject( movieann ); - m->setMovie( movie ); - // -> movieTitle - GooString * movietitle = movieann->getTitle(); - if ( movietitle ) - { - m->setMovieTitle( QString::fromLatin1( movietitle->getCString() ) ); - } - - break; - } - // special case for ignoring unknwon annotations - case Annot::typeUnknown: - continue; - // handled as forms or some other way - case Annot::typeWidget: - continue; - default: - { -#define CASE_FOR_TYPE( thetype ) \ - case Annot::type ## thetype: \ - type = #thetype ; \ - break; - QByteArray type; - switch ( subType ) - { - CASE_FOR_TYPE( Screen ) - CASE_FOR_TYPE( PrinterMark ) - CASE_FOR_TYPE( TrapNet ) - CASE_FOR_TYPE( Watermark ) - CASE_FOR_TYPE( 3D ) - default: type = QByteArray::number( subType ); - } - // MISSING: Widget, Screen, PrinterMark, TrapNet, Watermark, 3D - qDebug() << "Annotation" << type.constData() << "not supported."; - continue; -#undef CASE_FOR_TYPE - } - } - - /** 1.3. PARSE common parameters */ - // -> boundary - PDFRectangle *boundary = ann->getRect(); - // transform annotation rect to uniform coords - QPointF topLeft, bottomRight; - XPDFReader::transform( MTX, boundary->x1, boundary->y1, topLeft ); - XPDFReader::transform( MTX, boundary->x2, boundary->y2, bottomRight ); - QRectF boundaryRect; - boundaryRect.setTopLeft(topLeft); - boundaryRect.setBottomRight(bottomRight); - if ( boundaryRect.left() > boundaryRect.right() ) - { - double aux = boundaryRect.left(); - boundaryRect.setLeft( boundaryRect.right() ); - boundaryRect.setRight(aux); - } - if ( boundaryRect.top() > boundaryRect.bottom() ) - { - double aux = boundaryRect.top(); - boundaryRect.setTop( boundaryRect.bottom() ); - boundaryRect.setBottom(aux); - //annotation->rUnscaledWidth = (r[2] > r[0]) ? r[2] - r[0] : r[0] - r[2]; - //annotation->rUnscaledHeight = (r[3] > r[1]) ? r[3] - r[1] : r[1] - r[3]; - } - annotation->setBoundary( boundaryRect ); - // -> contents - annotation->setContents( UnicodeParsedString( ann->getContents() ) ); - // -> uniqueName - annotation->setUniqueName( UnicodeParsedString( ann->getName() ) ); - // -> modifyDate (and -> creationDate) - GooString *modDate = ann->getModified(); - if ( modDate ) - { - annotation->setModificationDate( convertDate( modDate->getCString() ) ); - } - if ( annotation->creationDate().isNull() && !annotation->modificationDate().isNull() ) - annotation->setCreationDate( annotation->modificationDate() ); - // -> flags: set the external attribute since it's embedded on file - int annoflags = 0; - annoflags |= Annotation::External; - // -> flags - int flags = ann->getFlags(); - if ( flags & Annot::flagHidden ) - annoflags |= Annotation::Hidden; - if ( flags & Annot::flagNoZoom ) - annoflags |= Annotation::FixedSize; - if ( flags & Annot::flagNoRotate ) - annoflags |= Annotation::FixedRotation; - if ( !( flags & Annot::flagPrint ) ) - annoflags |= Annotation::DenyPrint; - if ( flags & Annot::flagReadOnly ) - annoflags |= (Annotation::DenyWrite | Annotation::DenyDelete); - if ( flags & Annot::flagLocked ) - annoflags |= Annotation::DenyDelete; - if ( flags & Annot::flagToggleNoView ) - annoflags |= Annotation::ToggleHidingOnMouse; - annotation->setFlags( annoflags ); - // -> style - AnnotBorder *border = ann->getBorder(); - if ( border ) - { - if ( border->getType() == AnnotBorder::typeArray ) - { - AnnotBorderArray * border_array = static_cast< AnnotBorderArray * >( border ); - // -> style.xCorners - annotation->style.xCorners = border_array->getHorizontalCorner(); - // -> style.yCorners - annotation->style.yCorners = border_array->getVerticalCorner(); - } - // -> style.width - annotation->style.width = border->getWidth(); - // -> style.style - annotation->style.style = (Annotation::LineStyle)( 1 << border->getStyle() ); -#if 0 - // -> style.marks and style.spaces - // TODO - Object dashArray; - bsObj.getDict()->lookup( "D", &dashArray ); - if ( dashArray.isArray() ) - { - int dashMarks = 3; - int dashSpaces = 0; - Object intObj; - dashArray.arrayGet( 0, &intObj ); - if ( intObj.isInt() ) - dashMarks = intObj.getInt(); - intObj.free(); - dashArray.arrayGet( 1, &intObj ); - if ( intObj.isInt() ) - dashSpaces = intObj.getInt(); - intObj.free(); - annotation->style.marks = dashMarks; - annotation->style.spaces = dashSpaces; - } -#endif - } - // -> style.color - annotation->style.color = convertAnnotColor( ann->getColor() ); - - /** 1.4. PARSE markup { common, Popup, Revision } parameters */ - if ( markupann ) - { - // -> creationDate - GooString *createDate = markupann->getDate(); - if ( createDate ) - { - annotation->setCreationDate( convertDate( createDate->getCString() ) ); - } - // -> style.opacity - annotation->style.opacity = markupann->getOpacity(); - // -> window.title and author - annotation->window.title = UnicodeParsedString( markupann->getLabel() ); - annotation->setAuthor( annotation->window.title ); - // -> window.summary - annotation->window.summary = UnicodeParsedString( markupann->getSubject() ); -#if 0 - // -> window.text - // TODO - XPDFReader::lookupString( annotDict, "RC", annotation->window.text ); -#endif - - // if a popup is referenced, schedule for resolving it later - AnnotPopup *popup = markupann->getPopup(); - if ( popup ) - { - ResolveWindow request; - request.popup = popup; - request.annotation = annotation; - resolvePopList.append( request ); - } - - // if an older version is referenced, schedule for reparenting - int parentID = markupann->getInReplyToID(); - if ( parentID ) - { - ResolveRevision request; - request.nextAnnotation = annotation; - request.nextAnnotationID = annotID; - request.prevAnnotationID = parentID; - - // -> request.nextScope - request.nextScope = Annotation::Reply; - switch ( markupann->getReplyTo() ) - { - case AnnotMarkup::replyTypeR: - request.nextScope = Annotation::Reply; - break; - case AnnotMarkup::replyTypeGroup: - request.nextScope = Annotation::Group; - break; - } - - // -> revision.type (StateModel is deduced from type, not parsed) - request.nextType = Annotation::None; - if ( subType == Annot::typeText ) - { - AnnotText * textann = static_cast< AnnotText * >( ann ); - switch ( textann->getState() ) - { - case AnnotText::stateMarked: - request.nextType = Annotation::Marked; - break; - case AnnotText::stateUnmarked: - request.nextType = Annotation::Unmarked; - break; - case AnnotText::stateAccepted: - request.nextType = Annotation::Accepted; - break; - case AnnotText::stateRejected: - request.nextType = Annotation::Rejected; - break; - case AnnotText::stateCancelled: - request.nextType = Annotation::Cancelled; - break; - case AnnotText::stateCompleted: - request.nextType = Annotation::Completed; - break; - case AnnotText::stateNone: - case AnnotText::stateUnknown: - ; - } - } - - // schedule for later reparenting - resolveRevList.append( request ); - } - } - - /** 1.5. ADD ANNOTATION to the annotationsMap */ - if ( addToPage ) - { - if ( annotationsMap.contains( annotID ) ) - qDebug() << "Clash for annotations with ID:" << annotID; - annotationsMap[ annotID ] = annotation; - } - } // end Annotation/PopupWindow parsing loop - - /** 2 - RESOLVE POPUPS (popup.* -> annotation.window) */ - if ( !resolvePopList.isEmpty() && !popupsMap.isEmpty() ) - { - QLinkedList< ResolveWindow >::iterator it = resolvePopList.begin(), - end = resolvePopList.end(); - for ( ; it != end; ++it ) - { - const ResolveWindow & request = *it; - if ( !popupsMap.contains( request.popup ) ) - // warn aboud problems in popup resolving logic - qDebug() << "Cannot resolve popup" - << request.popup << "."; - else - { - // set annotation's window properties taking ones from popup - PopupWindow * pop = popupsMap[ request.popup ]; - Annotation * pa = pop->dummyAnnotation; - Annotation::Window & w = request.annotation->window; - - // transfer properties to Annotation's window - w.flags = pa->flags() & (Annotation::Hidden | - Annotation::FixedSize | Annotation::FixedRotation); - if ( !pop->shown ) - w.flags |= Annotation::Hidden; - w.topLeft.setX(pa->boundary().left()); - w.topLeft.setY(pa->boundary().top()); - w.width = (int)( pa->boundary().right() - pa->boundary().left() ); - w.height = (int)( pa->boundary().bottom() - pa->boundary().top() ); - } - } - - // clear data - QHash< AnnotPopup *, PopupWindow * >::Iterator dIt = popupsMap.begin(), dEnd = popupsMap.end(); - for ( ; dIt != dEnd; ++dIt ) - { - PopupWindow * p = dIt.value(); - delete p->dummyAnnotation; - delete p; - } - } - - /** 3 - RESOLVE REVISIONS (parent.revisions.append( children )) */ - if ( !resolveRevList.isEmpty() ) - { - // append children to parents - QVarLengthArray< int > excludeIDs( resolveRevList.count() ); // can't even reach this size - int excludeIndex = 0; // index in excludeIDs array - QLinkedList< ResolveRevision >::iterator it = resolveRevList.begin(), end = resolveRevList.end(); - for ( ; it != end; ++it ) - { - const ResolveRevision & request = *it; - int parentID = request.prevAnnotationID; - if ( !annotationsMap.contains( parentID ) ) - // warn about problems in reparenting logic - qDebug() << "Cannot reparent annotation to" - << parentID << "."; - else - { - // compile and add a Revision structure to the parent annotation - Annotation::Revision childRevision; - childRevision.annotation = request.nextAnnotation; - childRevision.scope = request.nextScope; - childRevision.type = request.nextType; - annotationsMap[ parentID ]->revisions().append( childRevision ); - // exclude child annotation from being rooted in page - excludeIDs[ excludeIndex++ ] = request.nextAnnotationID; - } - } - - // prevent children from being attached to page as roots - for ( int i = 0; i < excludeIndex; i++ ) - annotationsMap.remove( excludeIDs[ i ] ); - } + return AnnotationPrivate::findAnnotations(m_page->page, m_page->parentDoc); +} - /** 4 - POSTPROCESS TextAnnotations (when window geom is embedded) */ - if ( !ppTextList.isEmpty() ) - { - QLinkedList< PostProcessText >::const_iterator it = ppTextList.begin(), end = ppTextList.end(); - for ( ; it != end; ++it ) - { - const PostProcessText & request = *it; - Annotation::Window & window = request.textAnnotation->window; - // if not present, 'create' the window in-place over the annotation - if ( window.flags == -1 ) - { - window.flags = 0; - QRectF geom = request.textAnnotation->boundary(); - // initialize window geometry to annotation's one - window.width = (int)( geom.right() - geom.left() ); - window.height = (int)( geom.bottom() - geom.top() ); - window.topLeft.setX( geom.left() > 0.0 ? geom.left() : 0.0 ); - window.topLeft.setY( geom.top() > 0.0 ? geom.top() : 0.0 ); - } - // (pdf) if text is not 'opened', force window hiding. if the window - // was parsed from popup, the flag should already be set - if ( !request.opened && window.flags != -1 ) - window.flags |= Annotation::Hidden; - } - } +void Page::addAnnotation( const Annotation *ann ) +{ + AnnotationPrivate::addAnnotationToPage(m_page->page, m_page->parentDoc, ann); +} - /** 5 - finally RETURN ANNOTATIONS */ - return annotationsMap.values(); +void Page::removeAnnotation( const Annotation *ann ) +{ + AnnotationPrivate::removeAnnotationFromPage(m_page->page, ann); } QList Page::formFields() const { QList fields; ::Page *p = m_page->page; - ::FormPageWidgets * form = p->getFormWidgets(m_page->parentDoc->doc->getCatalog()); + ::FormPageWidgets * form = p->getFormWidgets(); int formcount = form->getNumWidgets(); for (int i = 0; i < formcount; ++i) { diff -Nru poppler-0.18.4/qt4/src/poppler-private.cc poppler-0.20.5/qt4/src/poppler-private.cc --- poppler-0.18.4/qt4/src/poppler-private.cc 2011-11-22 21:33:23.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-private.cc 2012-05-10 20:05:44.000000000 +0000 @@ -53,10 +53,9 @@ Debug::debugClosure = closure; } - void qt4ErrorFunction(int pos, char *msg, va_list args) + void qt4ErrorFunction(void * /*data*/, ErrorCategory /*category*/, int pos, char *msg) { QString emsg; - char buffer[1024]; // should be big enough if (pos >= 0) { @@ -66,8 +65,7 @@ { emsg = QString::fromLatin1("Error: "); } - qvsnprintf(buffer, sizeof(buffer) - 1, msg, args); - emsg += QString::fromAscii(buffer); + emsg += QString::fromAscii(msg); (*Debug::debugFunction)(emsg, Debug::debugClosure); } @@ -252,7 +250,7 @@ { utf8Map = 0; globalParams = new GlobalParams(); - setErrorFunction(qt4ErrorFunction); + setErrorCallback(qt4ErrorFunction, NULL); } count ++; } diff -Nru poppler-0.18.4/qt4/src/poppler-private.h poppler-0.20.5/qt4/src/poppler-private.h --- poppler-0.18.4/qt4/src/poppler-private.h 2011-11-22 21:33:23.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-private.h 2012-05-10 20:05:44.000000000 +0000 @@ -131,7 +131,7 @@ SplashOutputDev * splashOutputDev = new SplashOutputDev(splashModeXBGR8, 4, gFalse, bgColor, gTrue, AA); splashOutputDev->setVectorAntialias(m_hints & Document::Antialiasing ? gTrue : gFalse); splashOutputDev->setFreeTypeHinting(m_hints & Document::TextHinting ? gTrue : gFalse, m_hints & Document::TextSlightHinting ? gTrue : gFalse); - splashOutputDev->startDoc(doc->getXRef()); + splashOutputDev->startDoc(doc); m_outputDev = splashOutputDev; #endif break; @@ -275,7 +275,7 @@ { public: FormFieldData(DocumentData *_doc, ::Page *p, ::FormWidget *w) : - doc(_doc), page(p), fm(w), flags(0), annoflags(0) + doc(_doc), page(p), fm(w) { } @@ -283,8 +283,6 @@ ::Page *page; ::FormWidget *fm; QRectF box; - int flags; - int annoflags; }; } diff -Nru poppler-0.18.4/qt4/src/poppler-ps-converter.cc poppler-0.20.5/qt4/src/poppler-ps-converter.cc --- poppler-0.18.4/qt4/src/poppler-ps-converter.cc 2011-11-22 21:33:23.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-ps-converter.cc 2012-05-10 20:05:44.000000000 +0000 @@ -2,6 +2,8 @@ * Copyright (C) 2007, 2009, 2010, Albert Astals Cid * Copyright (C) 2008, Pino Toscano * Copyright (C) 2010 Hib Eris + * Copyright (C) 2011 Glad Deschrijver + * Copyright (C) 2012 Fabio D'Urso * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +27,7 @@ #include "PSOutputDev.h" -static void outputToQIODevice(void *stream, char *data, int len) +static void outputToQIODevice(void *stream, const char *data, int len) { static_cast(stream)->write(data, len); } @@ -177,6 +179,14 @@ d->pageConvertedPayload = payload; } +static GBool annotDisplayDecideCbk(Annot *annot, void *user_data) +{ + if (annot->getType() == Annot::typeWidget) + return gTrue; // Never hide forms + else + return *(GBool*)user_data; +} + bool PSConverter::convert() { Q_D(PSConverter); @@ -207,11 +217,9 @@ PSOutputDev *psOut = new PSOutputDev(outputToQIODevice, dev, pstitlechar, d->document->doc, - d->document->doc->getXRef(), - d->document->doc->getCatalog(), 1, d->document->doc->getNumPages(), - psModePS, + (d->opts & PrintToEPS) ? psModeEPS : psModePS, d->paperWidth, d->paperHeight, gFalse, @@ -231,9 +239,21 @@ if (psOut->isOk()) { GBool isPrinting = (d->opts & Printing) ? gTrue : gFalse; + GBool showAnnotations = (d->opts & HideAnnotations) ? gFalse : gTrue; foreach(int page, d->pageList) { - d->document->doc->displayPage(psOut, page, d->hDPI, d->vDPI, d->rotate, gFalse, gTrue, isPrinting); + d->document->doc->displayPage(psOut, + page, + d->hDPI, + d->vDPI, + d->rotate, + gFalse, + gTrue, + isPrinting, + NULL, + NULL, + annotDisplayDecideCbk, + &showAnnotations); if (d->pageConvertedCallback) (*d->pageConvertedCallback)(page, d->pageConvertedPayload); } diff -Nru poppler-0.18.4/qt4/src/poppler-qt4.h poppler-0.20.5/qt4/src/poppler-qt4.h --- poppler-0.18.4/qt4/src/poppler-qt4.h 2011-11-24 18:05:53.000000000 +0000 +++ poppler-0.20.5/qt4/src/poppler-qt4.h 2012-06-11 13:19:41.000000000 +0000 @@ -1,13 +1,16 @@ /* poppler-qt.h: qt interface to poppler * Copyright (C) 2005, Net Integration Technologies, Inc. * Copyright (C) 2005, 2007, Brad Hards - * Copyright (C) 2005-2011, Albert Astals Cid + * Copyright (C) 2005-2012, Albert Astals Cid * Copyright (C) 2005, Stefan Kebekus * Copyright (C) 2006-2011, Pino Toscano * Copyright (C) 2009 Shawn Rutledge * Copyright (C) 2010 Suzuki Toshiya * Copyright (C) 2010 Matthias Fauconneau * Copyright (C) 2011 Andreas Hartmetz + * Copyright (C) 2011 Glad Deschrijver + * Copyright (C) 2012, Guillermo A. Amaral B. + * Copyright (C) 2012, Fabio D'Urso * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -306,7 +309,7 @@ */ class POPPLER_QT4_EXPORT EmbeddedFile { friend class DocumentData; - friend class Page; + friend class AnnotationPrivate; public: /// \cond PRIVATE EmbeddedFile(EmbFile *embfile); @@ -673,10 +676,32 @@ /** Returns the annotations of the page + + \note If you call this method twice, you get different objects + pointing to the same annotations (see Annotation). + The caller owns the returned objects and they should be deleted + when no longer required. */ QList annotations() const; /** + Adds an annotation to the page + + \note Ownership of the annotation object stays with the caller, who can + delete it at any time. + \since 0.20 + */ + void addAnnotation( const Annotation *ann ); + + /** + Removes an annotation from the page and destroys the annotation object + + \note There mustn't be other Annotation objects pointing this annotation + \since 0.20 + */ + void removeAnnotation( const Annotation *ann ); + + /** Returns the form fields on the page The caller gets the ownership of the returned objects. @@ -1423,7 +1448,9 @@ enum PSOption { Printing = 0x00000001, ///< The PS is generated for printing purposes StrictMargins = 0x00000002, - ForceRasterization = 0x00000004 + ForceRasterization = 0x00000004, + PrintToEPS = 0x00000008, ///< Output EPS instead of PS \since 0.20 + HideAnnotations = 0x00000010 ///< Don't print annotations \since 0.20 }; Q_DECLARE_FLAGS( PSOptions, PSOption ) @@ -1667,7 +1694,7 @@ \since 0.10 */ class POPPLER_QT4_EXPORT MovieObject { - friend class Page; + friend class AnnotationPrivate; public: /** The play mode for playing the movie diff -Nru poppler-0.18.4/qt4/tests/CMakeLists.txt poppler-0.20.5/qt4/tests/CMakeLists.txt --- poppler-0.18.4/qt4/tests/CMakeLists.txt 2011-11-22 21:33:23.000000000 +0000 +++ poppler-0.20.5/qt4/tests/CMakeLists.txt 2012-09-16 11:48:38.000000000 +0000 @@ -1,4 +1,5 @@ add_definitions(${QT4_DEFINITIONS}) +add_definitions(-DTESTDATADIR=\"${TESTDATADIR}\") include_directories( ${CMAKE_CURRENT_SOURCE_DIR} @@ -55,6 +56,7 @@ qt4_add_qtest(check_permissions check_permissions.cpp) qt4_add_qtest(check_search check_search.cpp) qt4_add_qtest(check_actualtext check_actualtext.cpp) +qt4_add_qtest(check_lexer check_lexer.cpp) if (NOT WIN32) qt4_add_qtest(check_strings check_strings.cpp) endif (NOT WIN32) diff -Nru poppler-0.18.4/qt4/tests/Makefile.am poppler-0.20.5/qt4/tests/Makefile.am --- poppler-0.18.4/qt4/tests/Makefile.am 2012-02-12 22:26:43.000000000 +0000 +++ poppler-0.20.5/qt4/tests/Makefile.am 2012-09-16 12:02:33.000000000 +0000 @@ -4,6 +4,7 @@ -I$(top_srcdir) \ -I$(top_srcdir)/poppler \ -I$(top_srcdir)/qt4/src \ + -DTESTDATADIR=\"$(TESTDATADIR)\" \ $(FONTCONFIG_CFLAGS) \ $(POPPLER_QT4_CFLAGS) @@ -78,7 +79,8 @@ check_password \ check_pagelayout \ check_search \ - check_strings + check_strings \ + check_lexer check_PROGRAMS = $(TESTS) @@ -134,5 +136,9 @@ check_strings.$(OBJEXT): check_strings.moc check_strings_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS) +check_lexer_SOURCES = check_lexer.cpp +check_lexer.$(OBJEXT): check_lexer.moc +check_lexer_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS) + endif diff -Nru poppler-0.18.4/qt4/tests/Makefile.in poppler-0.20.5/qt4/tests/Makefile.in --- poppler-0.18.4/qt4/tests/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/qt4/tests/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -50,7 +67,8 @@ @BUILD_POPPLER_QT4_TRUE@ check_password$(EXEEXT) \ @BUILD_POPPLER_QT4_TRUE@ check_pagelayout$(EXEEXT) \ @BUILD_POPPLER_QT4_TRUE@ check_search$(EXEEXT) \ -@BUILD_POPPLER_QT4_TRUE@ check_strings$(EXEEXT) +@BUILD_POPPLER_QT4_TRUE@ check_strings$(EXEEXT) \ +@BUILD_POPPLER_QT4_TRUE@ check_lexer$(EXEEXT) @BUILD_POPPLER_QT4_TRUE@check_PROGRAMS = $(am__EXEEXT_1) subdir = qt4/tests DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in @@ -81,7 +99,8 @@ @BUILD_POPPLER_QT4_TRUE@ check_password$(EXEEXT) \ @BUILD_POPPLER_QT4_TRUE@ check_pagelayout$(EXEEXT) \ @BUILD_POPPLER_QT4_TRUE@ check_search$(EXEEXT) \ -@BUILD_POPPLER_QT4_TRUE@ check_strings$(EXEEXT) +@BUILD_POPPLER_QT4_TRUE@ check_strings$(EXEEXT) \ +@BUILD_POPPLER_QT4_TRUE@ check_lexer$(EXEEXT) PROGRAMS = $(noinst_PROGRAMS) am__check_actualtext_SOURCES_DIST = check_actualtext.cpp @BUILD_POPPLER_QT4_TRUE@am_check_actualtext_OBJECTS = \ @@ -94,8 +113,8 @@ @BUILD_POPPLER_QT4_TRUE@check_actualtext_DEPENDENCIES = \ @BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \ @BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__check_attachments_SOURCES_DIST = check_attachments.cpp @BUILD_POPPLER_QT4_TRUE@am_check_attachments_OBJECTS = \ @@ -118,6 +137,13 @@ @BUILD_POPPLER_QT4_TRUE@check_fonts_DEPENDENCIES = \ @BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \ @BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1) +am__check_lexer_SOURCES_DIST = check_lexer.cpp +@BUILD_POPPLER_QT4_TRUE@am_check_lexer_OBJECTS = \ +@BUILD_POPPLER_QT4_TRUE@ check_lexer.$(OBJEXT) +check_lexer_OBJECTS = $(am_check_lexer_OBJECTS) +@BUILD_POPPLER_QT4_TRUE@check_lexer_DEPENDENCIES = \ +@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_2) \ +@BUILD_POPPLER_QT4_TRUE@ $(am__DEPENDENCIES_1) am__check_links_SOURCES_DIST = check_links.cpp @BUILD_POPPLER_QT4_TRUE@am_check_links_OBJECTS = \ @BUILD_POPPLER_QT4_TRUE@ check_links.$(OBJEXT) @@ -212,36 +238,38 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(check_actualtext_SOURCES) $(check_attachments_SOURCES) \ $(check_dateConversion_SOURCES) $(check_fonts_SOURCES) \ - $(check_links_SOURCES) $(check_metadata_SOURCES) \ - $(check_optcontent_SOURCES) $(check_pagelayout_SOURCES) \ - $(check_pagemode_SOURCES) $(check_password_SOURCES) \ - $(check_permissions_SOURCES) $(check_search_SOURCES) \ - $(check_strings_SOURCES) $(poppler_attachments_SOURCES) \ - $(poppler_fonts_SOURCES) $(poppler_texts_SOURCES) \ - $(stress_poppler_dir_SOURCES) $(stress_poppler_qt4_SOURCES) \ - $(test_password_qt4_SOURCES) $(test_poppler_qt4_SOURCES) + $(check_lexer_SOURCES) $(check_links_SOURCES) \ + $(check_metadata_SOURCES) $(check_optcontent_SOURCES) \ + $(check_pagelayout_SOURCES) $(check_pagemode_SOURCES) \ + $(check_password_SOURCES) $(check_permissions_SOURCES) \ + $(check_search_SOURCES) $(check_strings_SOURCES) \ + $(poppler_attachments_SOURCES) $(poppler_fonts_SOURCES) \ + $(poppler_texts_SOURCES) $(stress_poppler_dir_SOURCES) \ + $(stress_poppler_qt4_SOURCES) $(test_password_qt4_SOURCES) \ + $(test_poppler_qt4_SOURCES) DIST_SOURCES = $(am__check_actualtext_SOURCES_DIST) \ $(am__check_attachments_SOURCES_DIST) \ $(am__check_dateConversion_SOURCES_DIST) \ $(am__check_fonts_SOURCES_DIST) \ + $(am__check_lexer_SOURCES_DIST) \ $(am__check_links_SOURCES_DIST) \ $(am__check_metadata_SOURCES_DIST) \ $(am__check_optcontent_SOURCES_DIST) \ @@ -255,6 +283,11 @@ $(poppler_texts_SOURCES) $(stress_poppler_dir_SOURCES) \ $(stress_poppler_qt4_SOURCES) $(test_password_qt4_SOURCES) \ $(test_poppler_qt4_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -332,12 +365,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -391,6 +428,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -460,6 +498,7 @@ -I$(top_srcdir) \ -I$(top_srcdir)/poppler \ -I$(top_srcdir)/qt4/src \ + -DTESTDATADIR=\"$(TESTDATADIR)\" \ $(FONTCONFIG_CFLAGS) \ $(POPPLER_QT4_CFLAGS) @@ -523,6 +562,8 @@ @BUILD_POPPLER_QT4_TRUE@check_search_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS) @BUILD_POPPLER_QT4_TRUE@check_strings_SOURCES = check_strings.cpp @BUILD_POPPLER_QT4_TRUE@check_strings_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS) +@BUILD_POPPLER_QT4_TRUE@check_lexer_SOURCES = check_lexer.cpp +@BUILD_POPPLER_QT4_TRUE@check_lexer_LDADD = $(LDADDS) $(POPPLER_QT4_TEST_LIBS) all: all-am .SUFFIXES: @@ -575,64 +616,67 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -check_actualtext$(EXEEXT): $(check_actualtext_OBJECTS) $(check_actualtext_DEPENDENCIES) +check_actualtext$(EXEEXT): $(check_actualtext_OBJECTS) $(check_actualtext_DEPENDENCIES) $(EXTRA_check_actualtext_DEPENDENCIES) @rm -f check_actualtext$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_actualtext_OBJECTS) $(check_actualtext_LDADD) $(LIBS) -check_attachments$(EXEEXT): $(check_attachments_OBJECTS) $(check_attachments_DEPENDENCIES) +check_attachments$(EXEEXT): $(check_attachments_OBJECTS) $(check_attachments_DEPENDENCIES) $(EXTRA_check_attachments_DEPENDENCIES) @rm -f check_attachments$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_attachments_OBJECTS) $(check_attachments_LDADD) $(LIBS) -check_dateConversion$(EXEEXT): $(check_dateConversion_OBJECTS) $(check_dateConversion_DEPENDENCIES) +check_dateConversion$(EXEEXT): $(check_dateConversion_OBJECTS) $(check_dateConversion_DEPENDENCIES) $(EXTRA_check_dateConversion_DEPENDENCIES) @rm -f check_dateConversion$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_dateConversion_OBJECTS) $(check_dateConversion_LDADD) $(LIBS) -check_fonts$(EXEEXT): $(check_fonts_OBJECTS) $(check_fonts_DEPENDENCIES) +check_fonts$(EXEEXT): $(check_fonts_OBJECTS) $(check_fonts_DEPENDENCIES) $(EXTRA_check_fonts_DEPENDENCIES) @rm -f check_fonts$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_fonts_OBJECTS) $(check_fonts_LDADD) $(LIBS) -check_links$(EXEEXT): $(check_links_OBJECTS) $(check_links_DEPENDENCIES) +check_lexer$(EXEEXT): $(check_lexer_OBJECTS) $(check_lexer_DEPENDENCIES) $(EXTRA_check_lexer_DEPENDENCIES) + @rm -f check_lexer$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(check_lexer_OBJECTS) $(check_lexer_LDADD) $(LIBS) +check_links$(EXEEXT): $(check_links_OBJECTS) $(check_links_DEPENDENCIES) $(EXTRA_check_links_DEPENDENCIES) @rm -f check_links$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_links_OBJECTS) $(check_links_LDADD) $(LIBS) -check_metadata$(EXEEXT): $(check_metadata_OBJECTS) $(check_metadata_DEPENDENCIES) +check_metadata$(EXEEXT): $(check_metadata_OBJECTS) $(check_metadata_DEPENDENCIES) $(EXTRA_check_metadata_DEPENDENCIES) @rm -f check_metadata$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_metadata_OBJECTS) $(check_metadata_LDADD) $(LIBS) -check_optcontent$(EXEEXT): $(check_optcontent_OBJECTS) $(check_optcontent_DEPENDENCIES) +check_optcontent$(EXEEXT): $(check_optcontent_OBJECTS) $(check_optcontent_DEPENDENCIES) $(EXTRA_check_optcontent_DEPENDENCIES) @rm -f check_optcontent$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_optcontent_OBJECTS) $(check_optcontent_LDADD) $(LIBS) -check_pagelayout$(EXEEXT): $(check_pagelayout_OBJECTS) $(check_pagelayout_DEPENDENCIES) +check_pagelayout$(EXEEXT): $(check_pagelayout_OBJECTS) $(check_pagelayout_DEPENDENCIES) $(EXTRA_check_pagelayout_DEPENDENCIES) @rm -f check_pagelayout$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_pagelayout_OBJECTS) $(check_pagelayout_LDADD) $(LIBS) -check_pagemode$(EXEEXT): $(check_pagemode_OBJECTS) $(check_pagemode_DEPENDENCIES) +check_pagemode$(EXEEXT): $(check_pagemode_OBJECTS) $(check_pagemode_DEPENDENCIES) $(EXTRA_check_pagemode_DEPENDENCIES) @rm -f check_pagemode$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_pagemode_OBJECTS) $(check_pagemode_LDADD) $(LIBS) -check_password$(EXEEXT): $(check_password_OBJECTS) $(check_password_DEPENDENCIES) +check_password$(EXEEXT): $(check_password_OBJECTS) $(check_password_DEPENDENCIES) $(EXTRA_check_password_DEPENDENCIES) @rm -f check_password$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_password_OBJECTS) $(check_password_LDADD) $(LIBS) -check_permissions$(EXEEXT): $(check_permissions_OBJECTS) $(check_permissions_DEPENDENCIES) +check_permissions$(EXEEXT): $(check_permissions_OBJECTS) $(check_permissions_DEPENDENCIES) $(EXTRA_check_permissions_DEPENDENCIES) @rm -f check_permissions$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_permissions_OBJECTS) $(check_permissions_LDADD) $(LIBS) -check_search$(EXEEXT): $(check_search_OBJECTS) $(check_search_DEPENDENCIES) +check_search$(EXEEXT): $(check_search_OBJECTS) $(check_search_DEPENDENCIES) $(EXTRA_check_search_DEPENDENCIES) @rm -f check_search$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_search_OBJECTS) $(check_search_LDADD) $(LIBS) -check_strings$(EXEEXT): $(check_strings_OBJECTS) $(check_strings_DEPENDENCIES) +check_strings$(EXEEXT): $(check_strings_OBJECTS) $(check_strings_DEPENDENCIES) $(EXTRA_check_strings_DEPENDENCIES) @rm -f check_strings$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(check_strings_OBJECTS) $(check_strings_LDADD) $(LIBS) -poppler-attachments$(EXEEXT): $(poppler_attachments_OBJECTS) $(poppler_attachments_DEPENDENCIES) +poppler-attachments$(EXEEXT): $(poppler_attachments_OBJECTS) $(poppler_attachments_DEPENDENCIES) $(EXTRA_poppler_attachments_DEPENDENCIES) @rm -f poppler-attachments$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_attachments_OBJECTS) $(poppler_attachments_LDADD) $(LIBS) -poppler-fonts$(EXEEXT): $(poppler_fonts_OBJECTS) $(poppler_fonts_DEPENDENCIES) +poppler-fonts$(EXEEXT): $(poppler_fonts_OBJECTS) $(poppler_fonts_DEPENDENCIES) $(EXTRA_poppler_fonts_DEPENDENCIES) @rm -f poppler-fonts$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_fonts_OBJECTS) $(poppler_fonts_LDADD) $(LIBS) -poppler-texts$(EXEEXT): $(poppler_texts_OBJECTS) $(poppler_texts_DEPENDENCIES) +poppler-texts$(EXEEXT): $(poppler_texts_OBJECTS) $(poppler_texts_DEPENDENCIES) $(EXTRA_poppler_texts_DEPENDENCIES) @rm -f poppler-texts$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(poppler_texts_OBJECTS) $(poppler_texts_LDADD) $(LIBS) -stress-poppler-dir$(EXEEXT): $(stress_poppler_dir_OBJECTS) $(stress_poppler_dir_DEPENDENCIES) +stress-poppler-dir$(EXEEXT): $(stress_poppler_dir_OBJECTS) $(stress_poppler_dir_DEPENDENCIES) $(EXTRA_stress_poppler_dir_DEPENDENCIES) @rm -f stress-poppler-dir$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(stress_poppler_dir_OBJECTS) $(stress_poppler_dir_LDADD) $(LIBS) -stress-poppler-qt4$(EXEEXT): $(stress_poppler_qt4_OBJECTS) $(stress_poppler_qt4_DEPENDENCIES) +stress-poppler-qt4$(EXEEXT): $(stress_poppler_qt4_OBJECTS) $(stress_poppler_qt4_DEPENDENCIES) $(EXTRA_stress_poppler_qt4_DEPENDENCIES) @rm -f stress-poppler-qt4$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(stress_poppler_qt4_OBJECTS) $(stress_poppler_qt4_LDADD) $(LIBS) -test-password-qt4$(EXEEXT): $(test_password_qt4_OBJECTS) $(test_password_qt4_DEPENDENCIES) +test-password-qt4$(EXEEXT): $(test_password_qt4_OBJECTS) $(test_password_qt4_DEPENDENCIES) $(EXTRA_test_password_qt4_DEPENDENCIES) @rm -f test-password-qt4$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_password_qt4_OBJECTS) $(test_password_qt4_LDADD) $(LIBS) -test-poppler-qt4$(EXEEXT): $(test_poppler_qt4_OBJECTS) $(test_poppler_qt4_DEPENDENCIES) +test-poppler-qt4$(EXEEXT): $(test_poppler_qt4_OBJECTS) $(test_poppler_qt4_DEPENDENCIES) $(EXTRA_test_poppler_qt4_DEPENDENCIES) @rm -f test-poppler-qt4$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(test_poppler_qt4_OBJECTS) $(test_poppler_qt4_LDADD) $(LIBS) @@ -646,6 +690,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_attachments.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_dateConversion.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_fonts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_lexer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_links.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_metadata.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/check_optcontent.Po@am__quote@ @@ -666,26 +711,23 @@ .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -826,14 +868,15 @@ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ - echo "$$grn$$dashes"; \ + col="$$grn"; \ else \ - echo "$$red$$dashes"; \ + col="$$red"; \ fi; \ - echo "$$banner"; \ - test -z "$$skipped" || echo "$$skipped"; \ - test -z "$$report" || echo "$$report"; \ - echo "$$dashes$$std"; \ + echo "$${col}$$dashes$${std}"; \ + echo "$${col}$$banner$${std}"; \ + test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ + test -z "$$report" || echo "$${col}$$report$${std}"; \ + echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi @@ -883,10 +926,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: distclean-generic: @@ -1004,6 +1052,7 @@ @BUILD_POPPLER_QT4_TRUE@check_password.$(OBJEXT): check_password.moc @BUILD_POPPLER_QT4_TRUE@check_search.$(OBJEXT): check_search.moc @BUILD_POPPLER_QT4_TRUE@check_strings.$(OBJEXT): check_strings.moc +@BUILD_POPPLER_QT4_TRUE@check_lexer.$(OBJEXT): check_lexer.moc # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru poppler-0.18.4/qt4/tests/check_actualtext.cpp poppler-0.20.5/qt4/tests/check_actualtext.cpp --- poppler-0.18.4/qt4/tests/check_actualtext.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_actualtext.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -14,7 +14,7 @@ void TestActualText::checkActualText1() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/WithActualText.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithActualText.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(0); diff -Nru poppler-0.18.4/qt4/tests/check_attachments.cpp poppler-0.20.5/qt4/tests/check_attachments.cpp --- poppler-0.18.4/qt4/tests/check_attachments.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_attachments.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -18,7 +18,7 @@ void TestAttachments::checkNoAttachments() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QCOMPARE( doc->hasEmbeddedFiles(), false ); @@ -30,7 +30,7 @@ { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/WithAttachments.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithAttachments.pdf"); QVERIFY( doc ); QVERIFY( doc->hasEmbeddedFiles() ); @@ -45,7 +45,7 @@ QCOMPARE( embfile->modDate(), QDateTime( QDate(), QTime() ) ); QCOMPARE( embfile->mimeType(), QString() ); - QFile file( "../../../test/unittestcases/kroller.png" ); + QFile file(TESTDATADIR "/unittestcases/kroller.png" ); QVERIFY( file.open( QIODevice::ReadOnly ) ); QByteArray krollerData = file.readAll(); QByteArray embdata = embfile->data(); @@ -59,7 +59,7 @@ QCOMPARE( embfile2->createDate(), QDateTime( QDate(), QTime() ) ); QCOMPARE( embfile2->mimeType(), QString() ); - QFile file2( "../../../test/unittestcases/gnome-64.gif" ); + QFile file2(TESTDATADIR "/unittestcases/gnome-64.gif" ); QVERIFY( file2.open( QIODevice::ReadOnly ) ); QByteArray g64Data = file2.readAll(); QByteArray emb2data = embfile2->data(); @@ -73,7 +73,7 @@ { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/A6EmbeddedFiles.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/A6EmbeddedFiles.pdf"); QVERIFY( doc ); QVERIFY( doc->hasEmbeddedFiles() ); @@ -110,7 +110,7 @@ { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/shapes+attachments.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/shapes+attachments.pdf"); QVERIFY( doc ); QVERIFY( doc->hasEmbeddedFiles() ); @@ -133,7 +133,7 @@ { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/imageretrieve+attachment.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/imageretrieve+attachment.pdf"); QVERIFY( doc ); QVERIFY( doc->hasEmbeddedFiles() ); diff -Nru poppler-0.18.4/qt4/tests/check_fonts.cpp poppler-0.20.5/qt4/tests/check_fonts.cpp --- poppler-0.18.4/qt4/tests/check_fonts.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_fonts.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -53,7 +53,7 @@ void TestFontsData::checkNoFonts() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/image.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/image.pdf"); QVERIFY( doc ); QList listOfFonts = doc->fonts(); @@ -65,7 +65,7 @@ void TestFontsData::checkType1() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/text.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/text.pdf"); QVERIFY( doc ); QList listOfFonts = doc->fonts(); @@ -83,7 +83,7 @@ void TestFontsData::checkType3() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/type3.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf"); QVERIFY( doc ); QList listOfFonts = doc->fonts(); @@ -108,7 +108,7 @@ void TestFontsData::checkTrueType() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QList listOfFonts = doc->fonts(); @@ -134,10 +134,10 @@ { // loading a 1-page document Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/type3.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf"); QVERIFY( doc ); // loading a 6-pages document - Poppler::Document *doc6 = Poppler::Document::load("../../../test/tests/cropbox.pdf"); + Poppler::Document *doc6 = Poppler::Document::load(TESTDATADIR "/tests/cropbox.pdf"); QVERIFY( doc6 ); std::auto_ptr< Poppler::FontIterator > it; @@ -188,7 +188,7 @@ void TestFontsData::checkSecondDocumentQuery() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/type3.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf"); QVERIFY( doc ); QList listOfFonts = doc->fonts(); @@ -203,7 +203,7 @@ void TestFontsData::checkMultipleIterations() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/type3.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/type3.pdf"); QVERIFY( doc ); QList listOfFonts = loadFontsViaIterator( doc ); @@ -217,7 +217,7 @@ void TestFontsData::checkScanForFonts() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/tests/fonts.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/tests/fonts.pdf"); QVERIFY( doc ); QList listOfFonts = doc->fonts(); diff -Nru poppler-0.18.4/qt4/tests/check_lexer.cpp poppler-0.20.5/qt4/tests/check_lexer.cpp --- poppler-0.18.4/qt4/tests/check_lexer.cpp 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_lexer.cpp 2012-09-16 11:48:38.000000000 +0000 @@ -0,0 +1,118 @@ +#include + +#include "Object.h" +#include "Lexer.h" + +class TestLexer : public QObject +{ + Q_OBJECT +private slots: + void testNumbers(); +}; + +void TestLexer::testNumbers() +{ + char *data = "0 1 -1 2147483647 -2147483647 2147483648 -2147483648 4294967297 -2147483649 0.1 1.1 -1.1 2147483647.1 -2147483647.1 2147483648.1 -2147483648.1 4294967297.1 -2147483649.1"; + Object dummy; + MemStream *stream = new MemStream(data, 0, strlen(data), &dummy); + Lexer *lexer = new Lexer(NULL, stream); + QVERIFY( lexer ); + + Object obj; + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objInt); + QCOMPARE(obj.getInt(), 0); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objInt); + QCOMPARE(obj.getInt(), 1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objInt); + QCOMPARE(obj.getInt(), -1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objInt); + QCOMPARE(obj.getInt(), 2147483647); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objInt); + QCOMPARE(obj.getInt(), -2147483647); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objUint); + QCOMPARE(obj.getUint(), (unsigned int)2147483648); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objInt); + QCOMPARE(obj.getInt(), (int)-2147483648); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), (double)4294967297); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), (double)-2147483649); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), 0.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), 1.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), -1.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), 2147483647.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), -2147483647.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), 2147483648.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), -2147483648.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), 4294967297.1); + obj.free(); + + lexer->getObj(&obj); + QCOMPARE(obj.getType(), objReal); + QCOMPARE(obj.getReal(), -2147483649.1); + obj.free(); + + delete lexer; +} + +QTEST_MAIN(TestLexer) +#include "check_lexer.moc" + diff -Nru poppler-0.18.4/qt4/tests/check_links.cpp poppler-0.20.5/qt4/tests/check_links.cpp --- poppler-0.18.4/qt4/tests/check_links.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_links.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -27,7 +27,7 @@ void TestLinks::checkDocumentWithNoDests() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/WithAttachments.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithAttachments.pdf"); QVERIFY( doc ); std::auto_ptr< Poppler::LinkDestination > dest; @@ -41,7 +41,7 @@ void TestLinks::checkDests_xr01() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/xr01.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/xr01.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(0); @@ -74,7 +74,7 @@ void TestLinks::checkDests_xr02() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/xr02.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/xr02.pdf"); QVERIFY( doc ); std::auto_ptr< Poppler::LinkDestination > dest; diff -Nru poppler-0.18.4/qt4/tests/check_metadata.cpp poppler-0.20.5/qt4/tests/check_metadata.cpp --- poppler-0.18.4/qt4/tests/check_metadata.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_metadata.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -41,7 +41,7 @@ void TestMetaData::checkStrings() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf"); QVERIFY( doc ); QFETCH( QString, key ); @@ -68,7 +68,7 @@ void TestMetaData::checkStrings2() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QFETCH( QString, key ); @@ -81,7 +81,7 @@ void TestMetaData::checkStringKeys() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QStringList keyList; @@ -98,14 +98,14 @@ void TestMetaData::checkLinearised() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); QVERIFY( doc->isLinearized() ); delete doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QCOMPARE( doc->isLinearized(), false ); @@ -115,7 +115,7 @@ void TestMetaData::checkPortraitOrientation() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(0); @@ -128,13 +128,13 @@ void TestMetaData::checkNumPages() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf"); QVERIFY( doc ); QCOMPARE( doc->numPages(), 2 ); delete doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QCOMPARE( doc->numPages(), 1 ); @@ -145,7 +145,7 @@ { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); QCOMPARE( doc->date("ModDate"), QDateTime(QDate(2005, 12, 5), QTime(9,44,46), Qt::UTC ) ); QCOMPARE( doc->date("CreationDate"), QDateTime(QDate(2005, 8, 13), QTime(1,12,11), Qt::UTC ) ); @@ -157,7 +157,7 @@ { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/truetype.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/truetype.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(0); QCOMPARE( page->pageSize(), QSize(595, 842) ); @@ -171,7 +171,7 @@ void TestMetaData::checkLandscapeOrientation() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(1); @@ -184,7 +184,7 @@ void TestMetaData::checkUpsideDownOrientation() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(2); @@ -197,7 +197,7 @@ void TestMetaData::checkSeascapeOrientation() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(3); @@ -210,7 +210,7 @@ void TestMetaData::checkVersion() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf"); QVERIFY( doc ); QCOMPARE( doc->pdfVersion(), 1.6 ); @@ -225,7 +225,7 @@ void TestMetaData::checkPdfId() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/A6EmbeddedFiles.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/A6EmbeddedFiles.pdf"); QVERIFY( doc ); const QByteArray referencePermanentId( "00C9D5B6D8FB11D7A902003065D630AA" ); @@ -262,7 +262,7 @@ void TestMetaData::checkNoPdfId() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/WithActualText.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/WithActualText.pdf"); QVERIFY( doc ); QVERIFY( !doc->getPdfId( 0, 0 ) ); diff -Nru poppler-0.18.4/qt4/tests/check_optcontent.cpp poppler-0.20.5/qt4/tests/check_optcontent.cpp --- poppler-0.18.4/qt4/tests/check_optcontent.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_optcontent.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -20,7 +20,7 @@ void TestOptionalContent::checkVisPolicy() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/vis_policy_test.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/vis_policy_test.pdf"); QVERIFY( doc ); QVERIFY( doc->hasOptionalContent() ); @@ -40,7 +40,7 @@ void TestOptionalContent::checkNestedLayers() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/NestedLayers.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/NestedLayers.pdf"); QVERIFY( doc ); QVERIFY( doc->hasOptionalContent() ); @@ -75,7 +75,7 @@ void TestOptionalContent::checkNoOptionalContent() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); QCOMPARE( doc->hasOptionalContent(), false ); @@ -85,7 +85,7 @@ void TestOptionalContent::checkIsVisible() { - GooString *fileName = new GooString("../../../test/unittestcases/vis_policy_test.pdf"); + GooString *fileName = new GooString(TESTDATADIR "/unittestcases/vis_policy_test.pdf"); globalParams = new GlobalParams(); PDFDoc *doc = new PDFDoc( fileName ); QVERIFY( doc ); @@ -169,7 +169,7 @@ void TestOptionalContent::checkVisibilitySetting() { globalParams = new GlobalParams(); - GooString *fileName = new GooString("../../../test/unittestcases/vis_policy_test.pdf"); + GooString *fileName = new GooString(TESTDATADIR "/unittestcases/vis_policy_test.pdf"); PDFDoc *doc = new PDFDoc( fileName ); QVERIFY( doc ); @@ -404,7 +404,7 @@ void TestOptionalContent::checkRadioButtons() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/ClarityOCGs.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/ClarityOCGs.pdf"); QVERIFY( doc ); QVERIFY( doc->hasOptionalContent() ); diff -Nru poppler-0.18.4/qt4/tests/check_pagelayout.cpp poppler-0.20.5/qt4/tests/check_pagelayout.cpp --- poppler-0.18.4/qt4/tests/check_pagelayout.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_pagelayout.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -14,7 +14,7 @@ void TestPageLayout::checkNone() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/UseNone.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseNone.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageLayout(), Poppler::Document::NoLayout ); @@ -25,7 +25,7 @@ void TestPageLayout::checkSingle() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/FullScreen.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/FullScreen.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageLayout(), Poppler::Document::SinglePage ); @@ -36,7 +36,7 @@ void TestPageLayout::checkFacing() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/doublepage.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/doublepage.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageLayout(), Poppler::Document::TwoPageRight ); diff -Nru poppler-0.18.4/qt4/tests/check_pagemode.cpp poppler-0.20.5/qt4/tests/check_pagemode.cpp --- poppler-0.18.4/qt4/tests/check_pagemode.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_pagemode.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -16,7 +16,7 @@ void TestPageMode::checkNone() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/UseNone.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseNone.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageMode(), Poppler::Document::UseNone ); @@ -27,7 +27,7 @@ void TestPageMode::checkFullScreen() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/FullScreen.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/FullScreen.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageMode(), Poppler::Document::FullScreen ); @@ -38,7 +38,7 @@ void TestPageMode::checkAttachments() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/UseAttachments.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseAttachments.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageMode(), Poppler::Document::UseAttach ); @@ -49,7 +49,7 @@ void TestPageMode::checkThumbs() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/UseThumbs.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseThumbs.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageMode(), Poppler::Document::UseThumbs ); @@ -60,7 +60,7 @@ void TestPageMode::checkOC() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/UseOC.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/UseOC.pdf"); QVERIFY( doc ); QCOMPARE( doc->pageMode(), Poppler::Document::UseOC ); diff -Nru poppler-0.18.4/qt4/tests/check_password.cpp poppler-0.20.5/qt4/tests/check_password.cpp --- poppler-0.18.4/qt4/tests/check_password.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_password.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -19,7 +19,7 @@ void TestPassword::password1() { Poppler::Document *doc; - doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - open.pdf"), "", QString::fromUtf8("garçon").toLatin1() ); + doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - open.pdf"), "", QString::fromUtf8("garçon").toLatin1() ); QVERIFY( doc ); QVERIFY( !doc->isLocked() ); @@ -30,7 +30,7 @@ void TestPassword::password1a() { Poppler::Document *doc; - doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - open.pdf") ); + doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - open.pdf") ); QVERIFY( doc ); QVERIFY( doc->isLocked() ); QVERIFY( !doc->unlock( "", QString::fromUtf8("garçon").toLatin1() ) ); @@ -42,7 +42,7 @@ void TestPassword::password2() { Poppler::Document *doc; - doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1(), "" ); + doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1(), "" ); QVERIFY( doc ); QVERIFY( !doc->isLocked() ); @@ -52,7 +52,7 @@ void TestPassword::password2a() { Poppler::Document *doc; - doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1() ); + doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf"), QString::fromUtf8("garçon").toLatin1() ); QVERIFY( doc ); QVERIFY( !doc->isLocked() ); @@ -62,7 +62,7 @@ void TestPassword::password2b() { Poppler::Document *doc; - doc = Poppler::Document::load(QString::fromUtf8("../../../test/unittestcases/Gday garçon - owner.pdf") ); + doc = Poppler::Document::load(QString::fromUtf8(TESTDATADIR "/unittestcases/Gday garçon - owner.pdf") ); QVERIFY( doc ); QVERIFY( !doc->isLocked() ); QVERIFY( !doc->unlock( QString::fromUtf8("garçon").toLatin1(), "" ) ); @@ -74,7 +74,7 @@ void TestPassword::password3() { Poppler::Document *doc; - doc = Poppler::Document::load( QString::fromUtf8("../../../test/unittestcases/PasswordEncrypted.pdf") ); + doc = Poppler::Document::load( QString::fromUtf8(TESTDATADIR "/unittestcases/PasswordEncrypted.pdf") ); QVERIFY( doc ); QVERIFY( doc->isLocked() ); QVERIFY( !doc->unlock( "", "password" ) ); diff -Nru poppler-0.18.4/qt4/tests/check_permissions.cpp poppler-0.20.5/qt4/tests/check_permissions.cpp --- poppler-0.18.4/qt4/tests/check_permissions.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_permissions.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -12,7 +12,7 @@ void TestPermissions::permissions1() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/orientation.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/orientation.pdf"); QVERIFY( doc ); // we are allowed to print diff -Nru poppler-0.18.4/qt4/tests/check_search.cpp poppler-0.20.5/qt4/tests/check_search.cpp --- poppler-0.18.4/qt4/tests/check_search.cpp 2011-11-22 21:33:24.000000000 +0000 +++ poppler-0.20.5/qt4/tests/check_search.cpp 2012-05-10 20:05:44.000000000 +0000 @@ -13,7 +13,7 @@ void TestSearch::bug7063() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/bug7063.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/bug7063.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(0); @@ -39,7 +39,7 @@ void TestSearch::testNextAndPrevious() { Poppler::Document *doc; - doc = Poppler::Document::load("../../../test/unittestcases/xr01.pdf"); + doc = Poppler::Document::load(TESTDATADIR "/unittestcases/xr01.pdf"); QVERIFY( doc ); Poppler::Page *page = doc->page(0); diff -Nru poppler-0.18.4/splash/Makefile.am poppler-0.20.5/splash/Makefile.am --- poppler-0.18.4/splash/Makefile.am 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/Makefile.am 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,24 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/goo \ + $(libjpeg_includes) \ + $(libtiff_includes) \ + $(libpng_includes) \ $(FREETYPE_CFLAGS) +# SplashBitmap includes JpegWriter.h, TiffWriter.h, PNGWriter.h +if BUILD_LIBJPEG +libjpeg_includes = $(LIBJPEG_CFLAGS) +endif + +if BUILD_LIBTIFF +libtiff_includes = $(LIBTIFF_CFLAGS) +endif + +if BUILD_LIBPNG +libpng_includes = $(LIBPNG_CFLAGS) +endif + noinst_LTLIBRARIES = libsplash.la if ENABLE_XPDF_HEADERS diff -Nru poppler-0.18.4/splash/Makefile.in poppler-0.20.5/splash/Makefile.in --- poppler-0.18.4/splash/Makefile.in 2012-02-15 17:22:44.000000000 +0000 +++ poppler-0.20.5/splash/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -17,6 +17,23 @@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -63,8 +80,8 @@ SplashT1FontEngine.lo SplashT1FontFile.lo SplashXPath.lo \ SplashXPathScanner.lo libsplash_la_OBJECTS = $(am_libsplash_la_OBJECTS) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler depcomp = $(SHELL) $(top_srcdir)/depcomp @@ -76,24 +93,29 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libsplash_la_SOURCES) DIST_SOURCES = $(libsplash_la_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__poppler_splash_include_HEADERS_DIST = Splash.h SplashBitmap.h \ SplashClip.h SplashErrorCodes.h SplashFTFont.h \ SplashFTFontEngine.h SplashFTFontFile.h SplashFont.h \ @@ -123,6 +145,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__installdirs = "$(DESTDIR)$(poppler_splash_includedir)" HEADERS = $(poppler_splash_include_HEADERS) ETAGS = etags @@ -200,12 +228,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -259,6 +291,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -326,8 +359,16 @@ INCLUDES = \ -I$(top_srcdir) \ -I$(top_srcdir)/goo \ + $(libjpeg_includes) \ + $(libtiff_includes) \ + $(libpng_includes) \ $(FREETYPE_CFLAGS) + +# SplashBitmap includes JpegWriter.h, TiffWriter.h, PNGWriter.h +@BUILD_LIBJPEG_TRUE@libjpeg_includes = $(LIBJPEG_CFLAGS) +@BUILD_LIBTIFF_TRUE@libtiff_includes = $(LIBTIFF_CFLAGS) +@BUILD_LIBPNG_TRUE@libpng_includes = $(LIBPNG_CFLAGS) noinst_LTLIBRARIES = libsplash.la @ENABLE_XPDF_HEADERS_TRUE@poppler_splash_includedir = $(includedir)/poppler/splash @ENABLE_XPDF_HEADERS_TRUE@poppler_splash_include_HEADERS = \ @@ -419,7 +460,7 @@ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done -libsplash.la: $(libsplash_la_OBJECTS) $(libsplash_la_DEPENDENCIES) +libsplash.la: $(libsplash_la_OBJECTS) $(libsplash_la_DEPENDENCIES) $(EXTRA_libsplash_la_DEPENDENCIES) $(AM_V_CXXLD)$(CXXLINK) $(libsplash_la_OBJECTS) $(libsplash_la_LIBADD) $(LIBS) mostlyclean-compile: @@ -451,26 +492,23 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -479,8 +517,11 @@ -rm -rf .libs _libs install-poppler_splash_includeHEADERS: $(poppler_splash_include_HEADERS) @$(NORMAL_INSTALL) - test -z "$(poppler_splash_includedir)" || $(MKDIR_P) "$(DESTDIR)$(poppler_splash_includedir)" @list='$(poppler_splash_include_HEADERS)'; test -n "$(poppler_splash_includedir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(poppler_splash_includedir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(poppler_splash_includedir)" || exit 1; \ + fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ @@ -494,9 +535,7 @@ @$(NORMAL_UNINSTALL) @list='$(poppler_splash_include_HEADERS)'; test -n "$(poppler_splash_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - test -n "$$files" || exit 0; \ - echo " ( cd '$(DESTDIR)$(poppler_splash_includedir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(poppler_splash_includedir)" && rm -f $$files + dir='$(DESTDIR)$(poppler_splash_includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -597,10 +636,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/splash/Splash.cc poppler-0.20.5/splash/Splash.cc --- poppler-0.18.4/splash/Splash.cc 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/Splash.cc 2012-08-15 13:31:38.000000000 +0000 @@ -11,11 +11,12 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2005-2011 Albert Astals Cid +// Copyright (C) 2005-2012 Albert Astals Cid // Copyright (C) 2005 Marco Pesenti Gritti -// Copyright (C) 2010, 2011 Thomas Freitag +// Copyright (C) 2010-2012 Thomas Freitag // Copyright (C) 2010 Christian Feuersnger -// Copyright (C) 2011 William Bader +// Copyright (C) 2011, 2012 William Bader +// Copyright (C) 2012 Markus Trippelsdorf // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -48,9 +49,12 @@ #include "SplashFont.h" #include "SplashGlyphBitmap.h" #include "Splash.h" +#include //------------------------------------------------------------------------ +#define splashAAGamma 1.5 + // distance of Bezier control point from center for circle approximation // = (4 * (sqrt(2) - 1) / 3) * r #define bezierCircle ((SplashCoord)0.55228475) @@ -61,9 +65,55 @@ return (Guchar)((x + (x >> 8) + 0x80) >> 8); } +// Clip x to lie in [0, 255]. +static inline Guchar clip255(int x) { + return x < 0 ? 0 : x > 255 ? 255 : x; +} + template inline void Guswap( T&a, T&b ) { T tmp = a; a=b; b=tmp; } +// The PDF spec says that all pixels whose *centers* lie within the +// image target region get painted, so we want to round n+0.5 down to +// n. But this causes problems, e.g., with PDF files that fill a +// rectangle with black and then draw an image to the exact same +// rectangle, so we instead use the fill scan conversion rule. +// However, the correct rule works better for glyphs, so we also +// provide that option in fillImageMask. +#if 0 +static inline int imgCoordMungeLower(SplashCoord x) { + return splashCeil(x + 0.5) - 1; +} +static inline int imgCoordMungeUpper(SplashCoord x) { + return splashCeil(x + 0.5) - 1; +} +#else +static inline int imgCoordMungeLower(SplashCoord x) { + return splashFloor(x); +} +static inline int imgCoordMungeUpper(SplashCoord x) { + return splashFloor(x) + 1; +} +static inline int imgCoordMungeLowerC(SplashCoord x, GBool glyphMode) { + return glyphMode ? (splashCeil(x + 0.5) - 1) : splashFloor(x); +} +static inline int imgCoordMungeUpperC(SplashCoord x, GBool glyphMode) { + return glyphMode ? (splashCeil(x + 0.5) - 1) : (splashFloor(x) + 1); +} +#endif + +// Used by drawImage and fillImageMask to divide the target +// quadrilateral into sections. +struct ImageSection { + int y0, y1; // actual y range + int ia0, ia1; // vertex indices for edge A + int ib0, ib1; // vertex indices for edge A + SplashCoord xa0, ya0, xa1, ya1; // edge A + SplashCoord dxdya; // slope of edge A + SplashCoord xb0, yb0, xb1, yb1; // edge B + SplashCoord dxdyb; // slope of edge B +}; + //------------------------------------------------------------------------ // SplashPipe //------------------------------------------------------------------------ @@ -78,15 +128,18 @@ SplashPattern *pattern; // source alpha and color - SplashCoord aInput; + Guchar aInput; GBool usesShape; - Guchar aSrc; SplashColorPtr cSrc; SplashColor cSrcVal; // non-isolated group alpha0 Guchar *alpha0Ptr; + // knockout groups + GBool knockout; + Guchar knockoutOpacity; + // soft mask SplashColorPtr softMaskPtr; @@ -96,18 +149,17 @@ Guchar *destAlphaPtr; // shape - SplashCoord shape; + Guchar shape; // result alpha and color GBool noTransparency; SplashPipeResultColorCtrl resultColorCtrl; // non-isolated group correction - int nonIsolatedGroup; + GBool nonIsolatedGroup; - // stroke / fill operation and pattern for calculate overprint - GBool stroke; - SplashPattern *overprintPattern; + // the "run" function + void (Splash::*run)(SplashPipe *pipe); }; SplashPipeResultColorCtrl Splash::pipeResultColorNoAlphaBlend[] = { @@ -192,8 +244,9 @@ inline void Splash::pipeInit(SplashPipe *pipe, int x, int y, SplashPattern *pattern, SplashColorPtr cSrc, - SplashCoord aInput, GBool usesShape, - GBool nonIsolatedGroup, SplashPattern *opPattern, GBool strokeA) { + Guchar aInput, GBool usesShape, + GBool nonIsolatedGroup, + GBool knockout, Guchar knockoutOpacity) { pipeSetXY(pipe, x, y); pipe->pattern = NULL; @@ -211,18 +264,15 @@ // source alpha pipe->aInput = aInput; - if (!state->softMask) { - if (usesShape) { - pipe->aInput *= 255; - } else { - pipe->aSrc = (Guchar)splashRound(pipe->aInput * 255); - } - } pipe->usesShape = usesShape; + // knockout + pipe->knockout = knockout; + pipe->knockoutOpacity = knockoutOpacity; + // result alpha - if (aInput == 1 && !state->softMask && !usesShape && - !state->inNonIsolatedGroup) { + if (aInput == 255 && !state->softMask && !usesShape && + !state->inNonIsolatedGroup && !nonIsolatedGroup) { pipe->noTransparency = gTrue; } else { pipe->noTransparency = gFalse; @@ -239,19 +289,55 @@ } // non-isolated group correction - if (nonIsolatedGroup) { - pipe->nonIsolatedGroup = splashColorModeNComps[bitmap->mode]; - } else { - pipe->nonIsolatedGroup = 0; + pipe->nonIsolatedGroup = nonIsolatedGroup; + + // select the 'run' function + pipe->run = &Splash::pipeRun; + if (!pipe->pattern && pipe->noTransparency && !state->blendFunc) { + if (bitmap->mode == splashModeMono1 && !pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunSimpleMono1; + } else if (bitmap->mode == splashModeMono8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunSimpleMono8; + } else if (bitmap->mode == splashModeRGB8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunSimpleRGB8; + } else if (bitmap->mode == splashModeXBGR8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunSimpleXBGR8; + } else if (bitmap->mode == splashModeBGR8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunSimpleBGR8; +#if SPLASH_CMYK + } else if (bitmap->mode == splashModeCMYK8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunSimpleCMYK8; +#endif + } + } else if (!pipe->pattern && !pipe->noTransparency && !state->softMask && + pipe->usesShape && + !(state->inNonIsolatedGroup && alpha0Bitmap->alpha) && + !state->blendFunc && !pipe->nonIsolatedGroup) { + if (bitmap->mode == splashModeMono1 && !pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunAAMono1; + } else if (bitmap->mode == splashModeMono8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunAAMono8; + } else if (bitmap->mode == splashModeRGB8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunAARGB8; + } else if (bitmap->mode == splashModeXBGR8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunAAXBGR8; + } else if (bitmap->mode == splashModeBGR8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunAABGR8; +#if SPLASH_CMYK + } else if (bitmap->mode == splashModeCMYK8 && pipe->destAlphaPtr) { + pipe->run = &Splash::pipeRunAACMYK8; +#endif + } } - pipe->stroke = strokeA; - pipe->overprintPattern = opPattern; } -inline void Splash::pipeRun(SplashPipe *pipe) { - Guchar aSrc, aDest, alpha2, alpha0, aResult; - SplashColor cDest, cBlend; +// general case +void Splash::pipeRun(SplashPipe *pipe) { + Guchar aSrc, aDest, alphaI, alphaIm1, alpha0, aResult; + SplashColor cSrcNonIso, cDest, cBlend; + SplashColorPtr cSrc; Guchar cResult0, cResult1, cResult2, cResult3; + int t; //----- source color @@ -272,7 +358,7 @@ switch (bitmap->mode) { case splashModeMono1: - cResult0 = pipe->cSrc[0]; + cResult0 = state->grayTransfer[pipe->cSrc[0]]; if (state->screen->test(pipe->x, pipe->y, cResult0)) { *pipe->destColorPtr |= pipe->destColorMask; } else { @@ -284,45 +370,47 @@ } break; case splashModeMono8: - *pipe->destColorPtr++ = pipe->cSrc[0]; + *pipe->destColorPtr++ = state->grayTransfer[pipe->cSrc[0]]; break; case splashModeRGB8: - *pipe->destColorPtr++ = pipe->cSrc[0]; - *pipe->destColorPtr++ = pipe->cSrc[1]; - *pipe->destColorPtr++ = pipe->cSrc[2]; + *pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]]; + *pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]]; + *pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]]; break; case splashModeXBGR8: - *pipe->destColorPtr++ = pipe->cSrc[2]; - *pipe->destColorPtr++ = pipe->cSrc[1]; - *pipe->destColorPtr++ = pipe->cSrc[0]; + *pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]]; + *pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]]; + *pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]]; *pipe->destColorPtr++ = 255; break; case splashModeBGR8: - *pipe->destColorPtr++ = pipe->cSrc[2]; - *pipe->destColorPtr++ = pipe->cSrc[1]; - *pipe->destColorPtr++ = pipe->cSrc[0]; + *pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]]; + *pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]]; + *pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]]; break; #if SPLASH_CMYK case splashModeCMYK8: - if (pipe->overprintPattern != NULL && - ((pipe->stroke && state->strokeOverprint) || - (!pipe->stroke && state->fillOverprint))) { - SplashColor cResult; - cDest[0] = pipe->destColorPtr[0]; - cDest[1] = pipe->destColorPtr[1]; - cDest[2] = pipe->destColorPtr[2]; - cDest[3] = pipe->destColorPtr[3]; - pipe->overprintPattern->overprint(state->overprintMode == 1, pipe->aSrc, pipe->cSrc, 255, cDest, cResult); - *pipe->destColorPtr++ = cResult[0]; - *pipe->destColorPtr++ = cResult[1]; - *pipe->destColorPtr++ = cResult[2]; - *pipe->destColorPtr++ = cResult[3]; - } else { - *pipe->destColorPtr++ = pipe->cSrc[0]; - *pipe->destColorPtr++ = pipe->cSrc[1]; - *pipe->destColorPtr++ = pipe->cSrc[2]; - *pipe->destColorPtr++ = pipe->cSrc[3]; + if (state->overprintMask & 1) { + pipe->destColorPtr[0] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[0] + state->cmykTransferC[pipe->cSrc[0]], 255) : + state->cmykTransferC[pipe->cSrc[0]]; + } + if (state->overprintMask & 2) { + pipe->destColorPtr[1] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[1] + state->cmykTransferM[pipe->cSrc[1]], 255) : + state->cmykTransferM[pipe->cSrc[1]]; + } + if (state->overprintMask & 4) { + pipe->destColorPtr[2] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[2] + state->cmykTransferY[pipe->cSrc[2]], 255) : + state->cmykTransferY[pipe->cSrc[2]]; + } + if (state->overprintMask & 8) { + pipe->destColorPtr[3] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[3] + state->cmykTransferK[pipe->cSrc[3]], 255) : + state->cmykTransferK[pipe->cSrc[3]]; } + pipe->destColorPtr += 4; break; #endif } @@ -372,41 +460,84 @@ aDest = 0xff; } - //----- blend function - - if (state->blendFunc) { - (*state->blendFunc)(pipe->cSrc, cDest, cBlend, bitmap->mode); - } - //----- source alpha if (state->softMask) { if (pipe->usesShape) { - aSrc = (Guchar)splashRound(pipe->aInput * *pipe->softMaskPtr++ - * pipe->shape); + aSrc = div255(div255(pipe->aInput * *pipe->softMaskPtr++) * + pipe->shape); } else { - aSrc = (Guchar)splashRound(pipe->aInput * *pipe->softMaskPtr++); + aSrc = div255(pipe->aInput * *pipe->softMaskPtr++); } } else if (pipe->usesShape) { - // pipe->aInput is premultiplied by 255 in pipeInit - aSrc = (Guchar)splashRound(pipe->aInput * pipe->shape); + aSrc = div255(pipe->aInput * pipe->shape); + } else { + aSrc = pipe->aInput; + } + + //----- non-isolated group correction + + if (pipe->nonIsolatedGroup) { + // This path is only used when Splash::composite() is called to + // composite a non-isolated group onto the backdrop. In this + // case, pipe->shape is the source (group) alpha. + if (pipe->shape == 0) { + // this value will be multiplied by zero later, so it doesn't + // matter what we use + cSrc = pipe->cSrc; + } else { + t = (aDest * 255) / pipe->shape - aDest; + switch (bitmap->mode) { +#if SPLASH_CMYK + case splashModeCMYK8: + cSrcNonIso[3] = clip255(pipe->cSrc[3] + + ((pipe->cSrc[3] - cDest[3]) * t) / 255); +#endif + case splashModeRGB8: + case splashModeXBGR8: + case splashModeBGR8: + cSrcNonIso[2] = clip255(pipe->cSrc[2] + + ((pipe->cSrc[2] - cDest[2]) * t) / 255); + cSrcNonIso[1] = clip255(pipe->cSrc[1] + + ((pipe->cSrc[1] - cDest[1]) * t) / 255); + case splashModeMono1: + case splashModeMono8: + cSrcNonIso[0] = clip255(pipe->cSrc[0] + + ((pipe->cSrc[0] - cDest[0]) * t) / 255); + break; + } + cSrc = cSrcNonIso; + // knockout: remove backdrop color + if (pipe->knockout && pipe->shape >= pipe->knockoutOpacity) { + aDest = 0; + } + } } else { - // precomputed in pipeInit - aSrc = pipe->aSrc; + cSrc = pipe->cSrc; + } + + //----- blend function + + if (state->blendFunc) { + (*state->blendFunc)(cSrc, cDest, cBlend, bitmap->mode); } //----- result alpha and non-isolated group element correction if (pipe->noTransparency) { - alpha2 = aResult = 255; + alphaI = alphaIm1 = aResult = 255; } else { aResult = aSrc + aDest - div255(aSrc * aDest); + // alphaI = alpha_i + // alphaIm1 = alpha_(i-1) if (pipe->alpha0Ptr) { alpha0 = *pipe->alpha0Ptr++; - alpha2 = aResult + alpha0 - div255(aResult * alpha0); + alphaI = aResult + alpha0 - div255(aResult * alpha0); + alphaIm1 = alpha0 + aDest - div255(alpha0 * aDest); } else { - alpha2 = aResult; + alphaI = aResult; + alphaIm1 = aDest; } } @@ -416,151 +547,132 @@ switch (pipe->resultColorCtrl) { + case splashPipeResultColorNoAlphaBlendMono: + cResult0 = state->grayTransfer[div255((255 - aDest) * cSrc[0] + + aDest * cBlend[0])]; + break; + case splashPipeResultColorNoAlphaBlendRGB: + cResult0 = state->rgbTransferR[div255((255 - aDest) * cSrc[0] + + aDest * cBlend[0])]; + cResult1 = state->rgbTransferG[div255((255 - aDest) * cSrc[1] + + aDest * cBlend[1])]; + cResult2 = state->rgbTransferB[div255((255 - aDest) * cSrc[2] + + aDest * cBlend[2])]; + break; #if SPLASH_CMYK case splashPipeResultColorNoAlphaBlendCMYK: - cResult3 = div255((255 - aDest) * pipe->cSrc[3] + aDest * cBlend[3]); -#endif - case splashPipeResultColorNoAlphaBlendRGB: - cResult2 = div255((255 - aDest) * pipe->cSrc[2] + aDest * cBlend[2]); - cResult1 = div255((255 - aDest) * pipe->cSrc[1] + aDest * cBlend[1]); - case splashPipeResultColorNoAlphaBlendMono: - cResult0 = div255((255 - aDest) * pipe->cSrc[0] + aDest * cBlend[0]); + cResult0 = state->cmykTransferC[div255((255 - aDest) * cSrc[0] + + aDest * cBlend[0])]; + cResult1 = state->cmykTransferM[div255((255 - aDest) * cSrc[1] + + aDest * cBlend[1])]; + cResult2 = state->cmykTransferY[div255((255 - aDest) * cSrc[2] + + aDest * cBlend[2])]; + cResult3 = state->cmykTransferK[div255((255 - aDest) * cSrc[3] + + aDest * cBlend[3])]; break; +#endif case splashPipeResultColorAlphaNoBlendMono: - if (alpha2 == 0) { + if (alphaI == 0) { cResult0 = 0; } else { - cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] + - aSrc * pipe->cSrc[0]) / alpha2); + cResult0 = state->grayTransfer[((alphaI - aSrc) * cDest[0] + + aSrc * cSrc[0]) / alphaI]; } break; case splashPipeResultColorAlphaNoBlendRGB: - if (alpha2 == 0) { + if (alphaI == 0) { cResult0 = 0; cResult1 = 0; cResult2 = 0; } else { - cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] + - aSrc * pipe->cSrc[0]) / alpha2); - cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] + - aSrc * pipe->cSrc[1]) / alpha2); - cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] + - aSrc * pipe->cSrc[2]) / alpha2); + cResult0 = state->rgbTransferR[((alphaI - aSrc) * cDest[0] + + aSrc * cSrc[0]) / alphaI]; + cResult1 = state->rgbTransferG[((alphaI - aSrc) * cDest[1] + + aSrc * cSrc[1]) / alphaI]; + cResult2 = state->rgbTransferB[((alphaI - aSrc) * cDest[2] + + aSrc * cSrc[2]) / alphaI]; } break; #if SPLASH_CMYK case splashPipeResultColorAlphaNoBlendCMYK: - if (alpha2 == 0) { + if (alphaI == 0) { cResult0 = 0; cResult1 = 0; cResult2 = 0; cResult3 = 0; } else { - if (pipe->overprintPattern != NULL && - ((pipe->stroke && state->strokeOverprint) || - (!pipe->stroke && state->fillOverprint))) { - SplashColor cResult; - pipe->overprintPattern->overprint(state->overprintMode == 1, aSrc, pipe->cSrc, alpha2, cDest, cResult); - cResult0 = cResult[0]; - cResult1 = cResult[1]; - cResult2 = cResult[2]; - cResult3 = cResult[3]; - } else { - cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] + - aSrc * pipe->cSrc[0]) / alpha2); - cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] + - aSrc * pipe->cSrc[1]) / alpha2); - cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] + - aSrc * pipe->cSrc[2]) / alpha2); - cResult3 = (Guchar)(((alpha2 - aSrc) * cDest[3] + - aSrc * pipe->cSrc[3]) / alpha2); - } + cResult0 = state->cmykTransferC[((alphaI - aSrc) * cDest[0] + + aSrc * cSrc[0]) / alphaI]; + cResult1 = state->cmykTransferM[((alphaI - aSrc) * cDest[1] + + aSrc * cSrc[1]) / alphaI]; + cResult2 = state->cmykTransferY[((alphaI - aSrc) * cDest[2] + + aSrc * cSrc[2]) / alphaI]; + cResult3 = state->cmykTransferK[((alphaI - aSrc) * cDest[3] + + aSrc * cSrc[3]) / alphaI]; } break; #endif case splashPipeResultColorAlphaBlendMono: - if (alpha2 == 0) { + if (alphaI == 0) { cResult0 = 0; } else { - cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] + - aSrc * ((255 - aDest) * pipe->cSrc[0] + - aDest * cBlend[0]) / 255) / - alpha2); + cResult0 = state->grayTransfer[((alphaI - aSrc) * cDest[0] + + aSrc * ((255 - alphaIm1) * cSrc[0] + + alphaIm1 * cBlend[0]) / 255) / + alphaI]; } break; case splashPipeResultColorAlphaBlendRGB: - if (alpha2 == 0) { + if (alphaI == 0) { cResult0 = 0; cResult1 = 0; cResult2 = 0; } else { - cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] + - aSrc * ((255 - aDest) * pipe->cSrc[0] + - aDest * cBlend[0]) / 255) / - alpha2); - cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] + - aSrc * ((255 - aDest) * pipe->cSrc[1] + - aDest * cBlend[1]) / 255) / - alpha2); - cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] + - aSrc * ((255 - aDest) * pipe->cSrc[2] + - aDest * cBlend[2]) / 255) / - alpha2); + cResult0 = state->rgbTransferR[((alphaI - aSrc) * cDest[0] + + aSrc * ((255 - alphaIm1) * cSrc[0] + + alphaIm1 * cBlend[0]) / 255) / + alphaI]; + cResult1 = state->rgbTransferG[((alphaI - aSrc) * cDest[1] + + aSrc * ((255 - alphaIm1) * cSrc[1] + + alphaIm1 * cBlend[1]) / 255) / + alphaI]; + cResult2 = state->rgbTransferB[((alphaI - aSrc) * cDest[2] + + aSrc * ((255 - alphaIm1) * cSrc[2] + + alphaIm1 * cBlend[2]) / 255) / + alphaI]; } break; #if SPLASH_CMYK case splashPipeResultColorAlphaBlendCMYK: - if (alpha2 == 0) { + if (alphaI == 0) { cResult0 = 0; cResult1 = 0; cResult2 = 0; cResult3 = 0; } else { - cResult0 = (Guchar)(((alpha2 - aSrc) * cDest[0] + - aSrc * ((255 - aDest) * pipe->cSrc[0] + - aDest * cBlend[0]) / 255) / - alpha2); - cResult1 = (Guchar)(((alpha2 - aSrc) * cDest[1] + - aSrc * ((255 - aDest) * pipe->cSrc[1] + - aDest * cBlend[1]) / 255) / - alpha2); - cResult2 = (Guchar)(((alpha2 - aSrc) * cDest[2] + - aSrc * ((255 - aDest) * pipe->cSrc[2] + - aDest * cBlend[2]) / 255) / - alpha2); - cResult3 = (Guchar)(((alpha2 - aSrc) * cDest[3] + - aSrc * ((255 - aDest) * pipe->cSrc[3] + - aDest * cBlend[3]) / 255) / - alpha2); + cResult0 = state->cmykTransferC[((alphaI - aSrc) * cDest[0] + + aSrc * ((255 - alphaIm1) * cSrc[0] + + alphaIm1 * cBlend[0]) / 255) / + alphaI]; + cResult1 = state->cmykTransferM[((alphaI - aSrc) * cDest[1] + + aSrc * ((255 - alphaIm1) * cSrc[1] + + alphaIm1 * cBlend[1]) / 255) / + alphaI]; + cResult2 = state->cmykTransferY[((alphaI - aSrc) * cDest[2] + + aSrc * ((255 - alphaIm1) * cSrc[2] + + alphaIm1 * cBlend[2]) / 255) / + alphaI]; + cResult3 = state->cmykTransferK[((alphaI - aSrc) * cDest[3] + + aSrc * ((255 - alphaIm1) * cSrc[3] + + alphaIm1 * cBlend[3]) / 255) / + alphaI]; } break; #endif } - //----- non-isolated group correction - - if (aResult != 0) { - switch (pipe->nonIsolatedGroup) { -#if SPLASH_CMYK - case 4: - cResult3 += (cResult3 - cDest[3]) * aDest * - (255 - aResult) / (255 * aResult); -#endif - case 3: - cResult2 += (cResult2 - cDest[2]) * aDest * - (255 - aResult) / (255 * aResult); - cResult1 += (cResult1 - cDest[1]) * aDest * - (255 - aResult) / (255 * aResult); - case 1: - cResult0 += (cResult0 - cDest[0]) * aDest * - (255 - aResult) / (255 * aResult); - case 0: - break; - } - } - //----- write destination pixel switch (bitmap->mode) { @@ -596,10 +708,27 @@ break; #if SPLASH_CMYK case splashModeCMYK8: - *pipe->destColorPtr++ = cResult0; - *pipe->destColorPtr++ = cResult1; - *pipe->destColorPtr++ = cResult2; - *pipe->destColorPtr++ = cResult3; + if (state->overprintMask & 1) { + pipe->destColorPtr[0] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[0] + cResult0, 255) : + cResult0; + } + if (state->overprintMask & 2) { + pipe->destColorPtr[1] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[1] + cResult1, 255) : + cResult1; + } + if (state->overprintMask & 4) { + pipe->destColorPtr[2] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[2] + cResult2, 255) : + cResult2; + } + if (state->overprintMask & 8) { + pipe->destColorPtr[3] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[3] + cResult3, 255) : + cResult3; + } + pipe->destColorPtr += 4; break; #endif } @@ -612,6 +741,392 @@ ++pipe->x; } +// special case: +// !pipe->pattern && pipe->noTransparency && !state->blendFunc && +// bitmap->mode == splashModeMono1 && !pipe->destAlphaPtr) { +void Splash::pipeRunSimpleMono1(SplashPipe *pipe) { + Guchar cResult0; + + //----- write destination pixel + cResult0 = state->grayTransfer[pipe->cSrc[0]]; + if (state->screen->test(pipe->x, pipe->y, cResult0)) { + *pipe->destColorPtr |= pipe->destColorMask; + } else { + *pipe->destColorPtr &= ~pipe->destColorMask; + } + if (!(pipe->destColorMask >>= 1)) { + pipe->destColorMask = 0x80; + ++pipe->destColorPtr; + } + + ++pipe->x; +} + +// special case: +// !pipe->pattern && pipe->noTransparency && !state->blendFunc && +// bitmap->mode == splashModeMono8 && pipe->destAlphaPtr) { +void Splash::pipeRunSimpleMono8(SplashPipe *pipe) { + //----- write destination pixel + *pipe->destColorPtr++ = state->grayTransfer[pipe->cSrc[0]]; + *pipe->destAlphaPtr++ = 255; + + ++pipe->x; +} + +// special case: +// !pipe->pattern && pipe->noTransparency && !state->blendFunc && +// bitmap->mode == splashModeRGB8 && pipe->destAlphaPtr) { +void Splash::pipeRunSimpleRGB8(SplashPipe *pipe) { + //----- write destination pixel + *pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]]; + *pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]]; + *pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]]; + *pipe->destAlphaPtr++ = 255; + + ++pipe->x; +} + +// special case: +// !pipe->pattern && pipe->noTransparency && !state->blendFunc && +// bitmap->mode == splashModeXBGR8 && pipe->destAlphaPtr) { +void Splash::pipeRunSimpleXBGR8(SplashPipe *pipe) { + //----- write destination pixel + *pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]]; + *pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]]; + *pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]]; + *pipe->destColorPtr++ = 255; + *pipe->destAlphaPtr++ = 255; + + ++pipe->x; +} + +// special case: +// !pipe->pattern && pipe->noTransparency && !state->blendFunc && +// bitmap->mode == splashModeBGR8 && pipe->destAlphaPtr) { +void Splash::pipeRunSimpleBGR8(SplashPipe *pipe) { + //----- write destination pixel + *pipe->destColorPtr++ = state->rgbTransferB[pipe->cSrc[2]]; + *pipe->destColorPtr++ = state->rgbTransferG[pipe->cSrc[1]]; + *pipe->destColorPtr++ = state->rgbTransferR[pipe->cSrc[0]]; + *pipe->destAlphaPtr++ = 255; + + ++pipe->x; +} + +#if SPLASH_CMYK +// special case: +// !pipe->pattern && pipe->noTransparency && !state->blendFunc && +// bitmap->mode == splashModeCMYK8 && pipe->destAlphaPtr) { +void Splash::pipeRunSimpleCMYK8(SplashPipe *pipe) { + //----- write destination pixel + if (state->overprintMask & 1) { + pipe->destColorPtr[0] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[0] + state->cmykTransferC[pipe->cSrc[0]], 255) : + state->cmykTransferC[pipe->cSrc[0]]; + } + if (state->overprintMask & 2) { + pipe->destColorPtr[1] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[1] + state->cmykTransferM[pipe->cSrc[1]], 255) : + state->cmykTransferM[pipe->cSrc[1]]; + } + if (state->overprintMask & 4) { + pipe->destColorPtr[2] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[2] + state->cmykTransferY[pipe->cSrc[2]], 255) : + state->cmykTransferY[pipe->cSrc[2]]; + } + if (state->overprintMask & 8) { + pipe->destColorPtr[3] = (state->overprintAdditive) ? + std::min(pipe->destColorPtr[3] + state->cmykTransferK[pipe->cSrc[3]], 255) : + state->cmykTransferK[pipe->cSrc[3]]; + } + pipe->destColorPtr += 4; + *pipe->destAlphaPtr++ = 255; + + ++pipe->x; +} +#endif + + +// special case: +// !pipe->pattern && !pipe->noTransparency && !state->softMask && +// pipe->usesShape && !pipe->alpha0Ptr && !state->blendFunc && +// !pipe->nonIsolatedGroup && +// bitmap->mode == splashModeMono1 && !pipe->destAlphaPtr +void Splash::pipeRunAAMono1(SplashPipe *pipe) { + Guchar aSrc; + SplashColor cDest; + Guchar cResult0; + + //----- read destination pixel + cDest[0] = (*pipe->destColorPtr & pipe->destColorMask) ? 0xff : 0x00; + + //----- source alpha + aSrc = div255(pipe->aInput * pipe->shape); + + //----- result color + // note: aDest = alpha2 = aResult = 0xff + cResult0 = state->grayTransfer[(Guchar)div255((0xff - aSrc) * cDest[0] + + aSrc * pipe->cSrc[0])]; + + //----- write destination pixel + if (state->screen->test(pipe->x, pipe->y, cResult0)) { + *pipe->destColorPtr |= pipe->destColorMask; + } else { + *pipe->destColorPtr &= ~pipe->destColorMask; + } + if (!(pipe->destColorMask >>= 1)) { + pipe->destColorMask = 0x80; + ++pipe->destColorPtr; + } + + ++pipe->x; +} + +// special case: +// !pipe->pattern && !pipe->noTransparency && !state->softMask && +// pipe->usesShape && !pipe->alpha0Ptr && !state->blendFunc && +// !pipe->nonIsolatedGroup && +// bitmap->mode == splashModeMono8 && pipe->destAlphaPtr +void Splash::pipeRunAAMono8(SplashPipe *pipe) { + Guchar aSrc, aDest, alpha2, aResult; + SplashColor cDest; + Guchar cResult0; + + //----- read destination pixel + cDest[0] = *pipe->destColorPtr; + aDest = *pipe->destAlphaPtr; + + //----- source alpha + aSrc = div255(pipe->aInput * pipe->shape); + + //----- result alpha and non-isolated group element correction + aResult = aSrc + aDest - div255(aSrc * aDest); + alpha2 = aResult; + + //----- result color + if (alpha2 == 0) { + cResult0 = 0; + } else { + cResult0 = state->grayTransfer[(Guchar)(((alpha2 - aSrc) * cDest[0] + + aSrc * pipe->cSrc[0]) / alpha2)]; + } + + //----- write destination pixel + *pipe->destColorPtr++ = cResult0; + *pipe->destAlphaPtr++ = aResult; + + ++pipe->x; +} + +// special case: +// !pipe->pattern && !pipe->noTransparency && !state->softMask && +// pipe->usesShape && !pipe->alpha0Ptr && !state->blendFunc && +// !pipe->nonIsolatedGroup && +// bitmap->mode == splashModeRGB8 && pipe->destAlphaPtr +void Splash::pipeRunAARGB8(SplashPipe *pipe) { + Guchar aSrc, aDest, alpha2, aResult; + SplashColor cDest; + Guchar cResult0, cResult1, cResult2; + + //----- read destination pixel + cDest[0] = pipe->destColorPtr[0]; + cDest[1] = pipe->destColorPtr[1]; + cDest[2] = pipe->destColorPtr[2]; + aDest = *pipe->destAlphaPtr; + + //----- source alpha + aSrc = div255(pipe->aInput * pipe->shape); + + //----- result alpha and non-isolated group element correction + aResult = aSrc + aDest - div255(aSrc * aDest); + alpha2 = aResult; + + //----- result color + if (alpha2 == 0) { + cResult0 = 0; + cResult1 = 0; + cResult2 = 0; + } else { + cResult0 = state->rgbTransferR[(Guchar)(((alpha2 - aSrc) * cDest[0] + + aSrc * pipe->cSrc[0]) / alpha2)]; + cResult1 = state->rgbTransferG[(Guchar)(((alpha2 - aSrc) * cDest[1] + + aSrc * pipe->cSrc[1]) / alpha2)]; + cResult2 = state->rgbTransferB[(Guchar)(((alpha2 - aSrc) * cDest[2] + + aSrc * pipe->cSrc[2]) / alpha2)]; + } + + //----- write destination pixel + *pipe->destColorPtr++ = cResult0; + *pipe->destColorPtr++ = cResult1; + *pipe->destColorPtr++ = cResult2; + *pipe->destAlphaPtr++ = aResult; + + ++pipe->x; +} + +// special case: +// !pipe->pattern && !pipe->noTransparency && !state->softMask && +// pipe->usesShape && !pipe->alpha0Ptr && !state->blendFunc && +// !pipe->nonIsolatedGroup && +// bitmap->mode == splashModeXBGR8 && pipe->destAlphaPtr +void Splash::pipeRunAAXBGR8(SplashPipe *pipe) { + Guchar aSrc, aDest, alpha2, aResult; + SplashColor cDest; + Guchar cResult0, cResult1, cResult2; + + //----- read destination pixel + cDest[0] = pipe->destColorPtr[2]; + cDest[1] = pipe->destColorPtr[1]; + cDest[2] = pipe->destColorPtr[0]; + aDest = *pipe->destAlphaPtr; + + //----- source alpha + aSrc = div255(pipe->aInput * pipe->shape); + + //----- result alpha and non-isolated group element correction + aResult = aSrc + aDest - div255(aSrc * aDest); + alpha2 = aResult; + + //----- result color + if (alpha2 == 0) { + cResult0 = 0; + cResult1 = 0; + cResult2 = 0; + } else { + cResult0 = state->rgbTransferR[(Guchar)(((alpha2 - aSrc) * cDest[0] + + aSrc * pipe->cSrc[0]) / alpha2)]; + cResult1 = state->rgbTransferG[(Guchar)(((alpha2 - aSrc) * cDest[1] + + aSrc * pipe->cSrc[1]) / alpha2)]; + cResult2 = state->rgbTransferB[(Guchar)(((alpha2 - aSrc) * cDest[2] + + aSrc * pipe->cSrc[2]) / alpha2)]; + } + + //----- write destination pixel + *pipe->destColorPtr++ = cResult2; + *pipe->destColorPtr++ = cResult1; + *pipe->destColorPtr++ = cResult0; + *pipe->destColorPtr++ = 255; + *pipe->destAlphaPtr++ = aResult; + + ++pipe->x; +} + +// special case: +// !pipe->pattern && !pipe->noTransparency && !state->softMask && +// pipe->usesShape && !pipe->alpha0Ptr && !state->blendFunc && +// !pipe->nonIsolatedGroup && +// bitmap->mode == splashModeBGR8 && pipe->destAlphaPtr +void Splash::pipeRunAABGR8(SplashPipe *pipe) { + Guchar aSrc, aDest, alpha2, aResult; + SplashColor cDest; + Guchar cResult0, cResult1, cResult2; + + //----- read destination pixel + cDest[0] = pipe->destColorPtr[2]; + cDest[1] = pipe->destColorPtr[1]; + cDest[2] = pipe->destColorPtr[0]; + aDest = *pipe->destAlphaPtr; + + //----- source alpha + aSrc = div255(pipe->aInput * pipe->shape); + + //----- result alpha and non-isolated group element correction + aResult = aSrc + aDest - div255(aSrc * aDest); + alpha2 = aResult; + + //----- result color + if (alpha2 == 0) { + cResult0 = 0; + cResult1 = 0; + cResult2 = 0; + } else { + cResult0 = state->rgbTransferR[(Guchar)(((alpha2 - aSrc) * cDest[0] + + aSrc * pipe->cSrc[0]) / alpha2)]; + cResult1 = state->rgbTransferG[(Guchar)(((alpha2 - aSrc) * cDest[1] + + aSrc * pipe->cSrc[1]) / alpha2)]; + cResult2 = state->rgbTransferB[(Guchar)(((alpha2 - aSrc) * cDest[2] + + aSrc * pipe->cSrc[2]) / alpha2)]; + } + + //----- write destination pixel + *pipe->destColorPtr++ = cResult2; + *pipe->destColorPtr++ = cResult1; + *pipe->destColorPtr++ = cResult0; + *pipe->destAlphaPtr++ = aResult; + + ++pipe->x; +} + +#if SPLASH_CMYK +// special case: +// !pipe->pattern && !pipe->noTransparency && !state->softMask && +// pipe->usesShape && !pipe->alpha0Ptr && !state->blendFunc && +// !pipe->nonIsolatedGroup && +// bitmap->mode == splashModeCMYK8 && pipe->destAlphaPtr +void Splash::pipeRunAACMYK8(SplashPipe *pipe) { + Guchar aSrc, aDest, alpha2, aResult; + SplashColor cDest; + Guchar cResult0, cResult1, cResult2, cResult3; + + //----- read destination pixel + cDest[0] = pipe->destColorPtr[0]; + cDest[1] = pipe->destColorPtr[1]; + cDest[2] = pipe->destColorPtr[2]; + cDest[3] = pipe->destColorPtr[3]; + aDest = *pipe->destAlphaPtr; + + //----- source alpha + aSrc = div255(pipe->aInput * pipe->shape); + + //----- result alpha and non-isolated group element correction + aResult = aSrc + aDest - div255(aSrc * aDest); + alpha2 = aResult; + + //----- result color + if (alpha2 == 0) { + cResult0 = 0; + cResult1 = 0; + cResult2 = 0; + cResult3 = 0; + } else { + cResult0 = state->cmykTransferC[(Guchar)(((alpha2 - aSrc) * cDest[0] + + aSrc * pipe->cSrc[0]) / alpha2)]; + cResult1 = state->cmykTransferM[(Guchar)(((alpha2 - aSrc) * cDest[1] + + aSrc * pipe->cSrc[1]) / alpha2)]; + cResult2 = state->cmykTransferY[(Guchar)(((alpha2 - aSrc) * cDest[2] + + aSrc * pipe->cSrc[2]) / alpha2)]; + cResult3 = state->cmykTransferK[(Guchar)(((alpha2 - aSrc) * cDest[3] + + aSrc * pipe->cSrc[3]) / alpha2)]; + } + + //----- write destination pixel + if (state->overprintMask & 1) { + pipe->destColorPtr[0] = (state->overprintAdditive && pipe->shape != 0) ? + std::min(pipe->destColorPtr[0] + cResult0, 255) : + cResult0; + } + if (state->overprintMask & 2) { + pipe->destColorPtr[1] = (state->overprintAdditive && pipe->shape != 0) ? + std::min(pipe->destColorPtr[1] + cResult1, 255) : + cResult1; + } + if (state->overprintMask & 4) { + pipe->destColorPtr[2] = (state->overprintAdditive && pipe->shape != 0) ? + std::min(pipe->destColorPtr[2] + cResult2, 255) : + cResult2; + } + if (state->overprintMask & 8) { + pipe->destColorPtr[3] = (state->overprintAdditive && pipe->shape != 0) ? + std::min(pipe->destColorPtr[3] + cResult3, 255) : + cResult3; + } + pipe->destColorPtr += 4; + *pipe->destAlphaPtr++ = aResult; + + ++pipe->x; +} +#endif + inline void Splash::pipeSetXY(SplashPipe *pipe, int x, int y) { pipe->x = x; pipe->y = y; @@ -696,7 +1211,7 @@ if (noClip || state->clip->test(x, y)) { pipeSetXY(pipe, x, y); - pipeRun(pipe); + (this->*pipe->run)(pipe); updateModX(x); updateModY(y); } @@ -757,8 +1272,8 @@ // draw the pixel if (t != 0) { pipeSetXY(pipe, x, y); - pipe->shape *= aaGamma[t]; - pipeRun(pipe); + pipe->shape = div255(aaGamma[t] * pipe->shape); + (this->*pipe->run)(pipe); updateModX(x); updateModY(y); } @@ -768,18 +1283,25 @@ GBool noClip) { int x; - pipeSetXY(pipe, x0, y); if (noClip) { + pipeSetXY(pipe, x0, y); for (x = x0; x <= x1; ++x) { - pipeRun(pipe); + (this->*pipe->run)(pipe); } updateModX(x0); updateModX(x1); updateModY(y); } else { + if (x0 < state->clip->getXMinI()) { + x0 = state->clip->getXMinI(); + } + if (x1 > state->clip->getXMaxI()) { + x1 = state->clip->getXMaxI(); + } + pipeSetXY(pipe, x0, y); for (x = x0; x <= x1; ++x) { if (state->clip->test(x, y)) { - pipeRun(pipe); + (this->*pipe->run)(pipe); updateModX(x); updateModY(y); } else { @@ -833,7 +1355,7 @@ if (t != 0) { pipe->shape = aaGamma[t]; - pipeRun(pipe); + (this->*pipe->run)(pipe); updateModX(x); updateModY(y); } else { @@ -865,19 +1387,22 @@ bitmap = bitmapA; vectorAntialias = vectorAntialiasA; + inShading = gFalse; state = new SplashState(bitmap->width, bitmap->height, vectorAntialias, screenParams); if (vectorAntialias) { aaBuf = new SplashBitmap(splashAASize * bitmap->width, splashAASize, 1, splashModeMono1, gFalse); for (i = 0; i <= splashAASize * splashAASize; ++i) { - aaGamma[i] = splashPow((SplashCoord)i / - (SplashCoord)(splashAASize * splashAASize), - 1.5); + aaGamma[i] = (Guchar)splashRound( + splashPow((SplashCoord)i / + (SplashCoord)(splashAASize * splashAASize), + splashAAGamma) * 255); } } else { aaBuf = NULL; } + minLineWidth = 0; clearModRegion(); debugMode = gFalse; } @@ -887,6 +1412,7 @@ int i; bitmap = bitmapA; + inShading = gFalse; vectorAntialias = vectorAntialiasA; state = new SplashState(bitmap->width, bitmap->height, vectorAntialias, screenA); @@ -894,13 +1420,15 @@ aaBuf = new SplashBitmap(splashAASize * bitmap->width, splashAASize, 1, splashModeMono1, gFalse); for (i = 0; i <= splashAASize * splashAASize; ++i) { - aaGamma[i] = splashPow((SplashCoord)i / - (SplashCoord)(splashAASize * splashAASize), - 1.5); + aaGamma[i] = (Guchar)splashRound( + splashPow((SplashCoord)i / + (SplashCoord)(splashAASize * splashAASize), + splashAAGamma) * 255); } } else { aaBuf = NULL; } + minLineWidth = 0; clearModRegion(); debugMode = gFalse; } @@ -979,6 +1507,10 @@ return state->lineDashPhase; } +GBool Splash::getStrokeAdjust() { + return state->strokeAdjust; +} + SplashClip *Splash::getClip() { return state->clip; } @@ -1094,6 +1626,16 @@ state->inNonIsolatedGroup = gTrue; } +void Splash::setTransfer(Guchar *red, Guchar *green, Guchar *blue, + Guchar *gray) { + state->setTransfer(red, green, blue, gray); +} + +void Splash::setOverprintMask(Guint overprintMask, GBool additive) { + state->overprintMask = overprintMask; + state->overprintAdditive = additive; +} + //------------------------------------------------------------------------ // state save/restore //------------------------------------------------------------------------ @@ -1247,6 +1789,7 @@ SplashError Splash::stroke(SplashPath *path) { SplashPath *path2, *dPath; + SplashCoord d1, d2, t1, t2, w; if (debugMode) { printf("stroke [dash:%d] [width:%.2f]:\n", @@ -1262,12 +1805,44 @@ dPath = makeDashedPath(path2); delete path2; path2 = dPath; + if (path2->length == 0) { + delete path2; + return splashErrEmptyPath; + } } - if (state->lineWidth == 0) { - strokeNarrow(path2); + + // transform a unit square, and take the half the max of the two + // diagonals; the product of this number and the line width is the + // (approximate) transformed line width + t1 = state->matrix[0] + state->matrix[2]; + t2 = state->matrix[1] + state->matrix[3]; + d1 = t1 * t1 + t2 * t2; + t1 = state->matrix[0] - state->matrix[2]; + t2 = state->matrix[1] - state->matrix[3]; + d2 = t1 * t1 + t2 * t2; + if (d2 > d1) { + d1 = d2; + } + d1 *= 0.5; + if (d1 > 0 && + d1 * state->lineWidth * state->lineWidth < minLineWidth * minLineWidth) { + w = minLineWidth / splashSqrt(d1); + strokeWide(path2, w); + } else if (bitmap->mode == splashModeMono1) { + // this gets close to Adobe's behavior in mono mode + if (d1 <= 2) { + strokeNarrow(path2); + } else { + strokeWide(path2, state->lineWidth); + } } else { - strokeWide(path2); + if (state->lineWidth == 0) { + strokeNarrow(path2); + } else { + strokeWide(path2, state->lineWidth); + } } + delete path2; return splashOk; } @@ -1276,8 +1851,8 @@ SplashPipe pipe; SplashXPath *xPath; SplashXPathSeg *seg; - int x0, x1, x2, x3, y0, y1, x, y, t; - SplashCoord dx, dy, dxdy; + int x0, x1, y0, y1, xa, xb, y; + SplashCoord dxdy; SplashClipResult clipRes; int nClipRes[3]; int i; @@ -1286,86 +1861,75 @@ xPath = new SplashXPath(path, state->matrix, state->flatness, gFalse); - pipeInit(&pipe, 0, 0, state->strokePattern, NULL, state->strokeAlpha, - gFalse, gFalse, state->strokePattern, gTrue); + pipeInit(&pipe, 0, 0, state->strokePattern, NULL, + (Guchar)splashRound(state->strokeAlpha * 255), + gFalse, gFalse); for (i = 0, seg = xPath->segs; i < xPath->length; ++i, ++seg) { - - x0 = splashFloor(seg->x0); - x1 = splashFloor(seg->x1); - y0 = splashFloor(seg->y0); - y1 = splashFloor(seg->y1); - - // horizontal segment - if (y0 == y1) { - if (x0 > x1) { - t = x0; x0 = x1; x1 = t; - } - if ((clipRes = state->clip->testSpan(x0, x1, y0)) - != splashClipAllOutside) { - drawSpan(&pipe, x0, x1, y0, clipRes == splashClipAllInside); - } - - // segment with |dx| > |dy| - } else if (splashAbs(seg->dxdy) > 1) { - dx = seg->x1 - seg->x0; - dy = seg->y1 - seg->y0; - dxdy = seg->dxdy; - if (y0 > y1) { - t = y0; y0 = y1; y1 = t; - t = x0; x0 = x1; x1 = t; - dx = -dx; - dy = -dy; - } - if ((clipRes = state->clip->testRect(x0 <= x1 ? x0 : x1, y0, - x0 <= x1 ? x1 : x0, y1)) - != splashClipAllOutside) { - if (dx > 0) { - x2 = x0; - x3 = splashFloor(seg->x0 + ((SplashCoord)y0 + 1 - seg->y0) * dxdy); - drawSpan(&pipe, x2, (x2 <= x3 - 1) ? x3 - 1 : x2, y0, - clipRes == splashClipAllInside); - x2 = x3; - for (y = y0 + 1; y <= y1 - 1; ++y) { - x3 = splashFloor(seg->x0 + ((SplashCoord)y + 1 - seg->y0) * dxdy); - drawSpan(&pipe, x2, x3 - 1, y, clipRes == splashClipAllInside); - x2 = x3; + if (seg->y0 <= seg->y1) { + y0 = splashFloor(seg->y0); + y1 = splashFloor(seg->y1); + x0 = splashFloor(seg->x0); + x1 = splashFloor(seg->x1); + } else { + y0 = splashFloor(seg->y1); + y1 = splashFloor(seg->y0); + x0 = splashFloor(seg->x1); + x1 = splashFloor(seg->x0); + } + if ((clipRes = state->clip->testRect(x0 <= x1 ? x0 : x1, y0, + x0 <= x1 ? x1 : x0, y1)) + != splashClipAllOutside) { + if (y0 == y1) { + if (x0 <= x1) { + drawSpan(&pipe, x0, x1, y0, clipRes == splashClipAllInside); + } else { + drawSpan(&pipe, x1, x0, y0, clipRes == splashClipAllInside); + } + } else { + dxdy = seg->dxdy; + if (y0 < state->clip->getYMinI()) { + y0 = state->clip->getYMinI(); + x0 = splashFloor(seg->x0 + ((SplashCoord)y0 - seg->y0) * dxdy); + } + if (y1 > state->clip->getYMaxI()) { + y1 = state->clip->getYMaxI(); + x1 = splashFloor(seg->x0 + ((SplashCoord)y1 - seg->y0) * dxdy); + } + if (x0 <= x1) { + xa = x0; + for (y = y0; y <= y1; ++y) { + if (y < y1) { + xb = splashFloor(seg->x0 + + ((SplashCoord)y + 1 - seg->y0) * dxdy); + } else { + xb = x1 + 1; + } + if (xa == xb) { + drawPixel(&pipe, xa, y, clipRes == splashClipAllInside); + } else { + drawSpan(&pipe, xa, xb - 1, y, clipRes == splashClipAllInside); + } + xa = xb; } - drawSpan(&pipe, x2, x2 <= x1 ? x1 : x2, y1, - clipRes == splashClipAllInside); } else { - x2 = x0; - x3 = splashFloor(seg->x0 + ((SplashCoord)y0 + 1 - seg->y0) * dxdy); - drawSpan(&pipe, (x3 + 1 <= x2) ? x3 + 1 : x2, x2, y0, - clipRes == splashClipAllInside); - x2 = x3; - for (y = y0 + 1; y <= y1 - 1; ++y) { - x3 = splashFloor(seg->x0 + ((SplashCoord)y + 1 - seg->y0) * dxdy); - drawSpan(&pipe, x3 + 1, x2, y, clipRes == splashClipAllInside); - x2 = x3; + xa = x0; + for (y = y0; y <= y1; ++y) { + if (y < y1) { + xb = splashFloor(seg->x0 + + ((SplashCoord)y + 1 - seg->y0) * dxdy); + } else { + xb = x1 - 1; + } + if (xa == xb) { + drawPixel(&pipe, xa, y, clipRes == splashClipAllInside); + } else { + drawSpan(&pipe, xb + 1, xa, y, clipRes == splashClipAllInside); + } + xa = xb; } - drawSpan(&pipe, x1, (x1 <= x2) ? x2 : x1, y1, - clipRes == splashClipAllInside); } } - - // segment with |dy| > |dx| - } else { - dxdy = seg->dxdy; - if (y0 > y1) { - t = x0; x0 = x1; x1 = t; - t = y0; y0 = y1; y1 = t; - } - if ((clipRes = state->clip->testRect(x0 <= x1 ? x0 : x1, y0, - x0 <= x1 ? x1 : x0, y1)) - != splashClipAllOutside) { - drawPixel(&pipe, x0, y0, clipRes == splashClipAllInside); - for (y = y0 + 1; y <= y1 - 1; ++y) { - x = splashFloor(seg->x0 + ((SplashCoord)y - seg->y0) * dxdy); - drawPixel(&pipe, x, y, clipRes == splashClipAllInside); - } - drawPixel(&pipe, x1, y1, clipRes == splashClipAllInside); - } } ++nClipRes[clipRes]; } @@ -1381,10 +1945,10 @@ delete xPath; } -void Splash::strokeWide(SplashPath *path) { +void Splash::strokeWide(SplashPath *path, SplashCoord w) { SplashPath *path2; - path2 = makeStrokePath(path, gFalse); + path2 = makeStrokePath(path, w, gFalse); fillWithPattern(path2, gFalse, state->strokePattern, state->strokeAlpha); delete path2; } @@ -1397,7 +1961,11 @@ int i; fPath = new SplashPath(); +#if USE_FIXEDPOINT + flatness2 = flatness; +#else flatness2 = flatness * flatness; +#endif i = 0; while (i < path->length) { flag = path->flags[i]; @@ -1462,13 +2030,21 @@ // line) transform(matrix, (xl0 + xr3) * 0.5, (yl0 + yr3) * 0.5, &mx, &my); transform(matrix, xx1, yy1, &tx, &ty); +#if USE_FIXEDPOINT + d1 = splashDist(tx, ty, mx, my); +#else dx = tx - mx; dy = ty - my; d1 = dx*dx + dy*dy; +#endif transform(matrix, xx2, yy2, &tx, &ty); +#if USE_FIXEDPOINT + d2 = splashDist(tx, ty, mx, my); +#else dx = tx - mx; dy = ty - my; d2 = dx*dx + dy*dy; +#endif // if the curve is flat enough, or no more subdivisions are // allowed, add the straight line segment @@ -1478,18 +2054,18 @@ // otherwise, subdivide the curve } else { - xl1 = (xl0 + xx1) * 0.5; - yl1 = (yl0 + yy1) * 0.5; - xh = (xx1 + xx2) * 0.5; - yh = (yy1 + yy2) * 0.5; - xl2 = (xl1 + xh) * 0.5; - yl2 = (yl1 + yh) * 0.5; - xr2 = (xx2 + xr3) * 0.5; - yr2 = (yy2 + yr3) * 0.5; - xr1 = (xh + xr2) * 0.5; - yr1 = (yh + yr2) * 0.5; - xr0 = (xl2 + xr1) * 0.5; - yr0 = (yl2 + yr1) * 0.5; + xl1 = splashAvg(xl0, xx1); + yl1 = splashAvg(yl0, yy1); + xh = splashAvg(xx1, xx2); + yh = splashAvg(yy1, yy2); + xl2 = splashAvg(xl1, xh); + yl2 = splashAvg(yl1, yh); + xr2 = splashAvg(xx2, xr3); + yr2 = splashAvg(yy2, yr3); + xr1 = splashAvg(xh, xr2); + yr1 = splashAvg(yh, yr2); + xr0 = splashAvg(xl2, xr1); + yr0 = splashAvg(yl2, yr1); // add the new subdivision points p3 = (p1 + p2) / 2; cx[p1][1] = xl1; cy[p1][1] = yl1; @@ -1516,15 +2092,21 @@ for (i = 0; i < state->lineDashLength; ++i) { lineDashTotal += state->lineDash[i]; } + // Acrobat simply draws nothing if the dash array is [0] + if (lineDashTotal == 0) { + return new SplashPath(); + } lineDashStartPhase = state->lineDashPhase; i = splashFloor(lineDashStartPhase / lineDashTotal); lineDashStartPhase -= (SplashCoord)i * lineDashTotal; lineDashStartOn = gTrue; lineDashStartIdx = 0; - while (lineDashStartPhase >= state->lineDash[lineDashStartIdx]) { - lineDashStartOn = !lineDashStartOn; - lineDashStartPhase -= state->lineDash[lineDashStartIdx]; - ++lineDashStartIdx; + if (lineDashStartPhase > 0) { + while (lineDashStartPhase >= state->lineDash[lineDashStartIdx]) { + lineDashStartOn = !lineDashStartOn; + lineDashStartPhase -= state->lineDash[lineDashStartIdx]; + ++lineDashStartIdx; + } } dPath = new SplashPath(); @@ -1634,15 +2216,49 @@ if (path->length == 0) { return splashErrEmptyPath; } + if (pathAllOutside(path)) { + opClipRes = splashClipAllOutside; + return splashOk; + } + + // add stroke adjustment hints for filled rectangles -- this only + // applies to paths that consist of a single subpath + // (this appears to match Acrobat's behavior) + if (state->strokeAdjust && !path->hints) { + int n; + n = path->getLength(); + if (n == 4 && + !(path->flags[0] & splashPathClosed) && + !(path->flags[1] & splashPathLast) && + !(path->flags[2] & splashPathLast)) { + path->close(gTrue); + path->addStrokeAdjustHint(0, 2, 0, 4); + path->addStrokeAdjustHint(1, 3, 0, 4); + } else if (n == 5 && + (path->flags[0] & splashPathClosed) && + !(path->flags[1] & splashPathLast) && + !(path->flags[2] & splashPathLast) && + !(path->flags[3] & splashPathLast)) { + path->addStrokeAdjustHint(0, 2, 0, 4); + path->addStrokeAdjustHint(1, 3, 0, 4); + } + } + xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue); - if (vectorAntialias) { + if (vectorAntialias && !inShading) { xPath->aaScale(); } xPath->sort(); - scanner = new SplashXPathScanner(xPath, eo); + yMinI = state->clip->getYMinI(); + yMaxI = state->clip->getYMaxI(); + if (vectorAntialias && !inShading) { + yMinI = yMinI * splashAASize; + yMaxI = (yMaxI + 1) * splashAASize - 1; + } + scanner = new SplashXPathScanner(xPath, eo, yMinI, yMaxI); // get the min and max x and y values - if (vectorAntialias) { + if (vectorAntialias && !inShading) { scanner->getBBoxAA(&xMinI, &yMinI, &xMaxI, &yMaxI); } else { scanner->getBBox(&xMinI, &yMinI, &xMaxI, &yMaxI); @@ -1651,19 +2267,15 @@ // check clipping if ((clipRes = state->clip->testRect(xMinI, yMinI, xMaxI, yMaxI)) != splashClipAllOutside) { - - // limit the y range - if (yMinI < state->clip->getYMinI()) { - yMinI = state->clip->getYMinI(); - } - if (yMaxI > state->clip->getYMaxI()) { - yMaxI = state->clip->getYMaxI(); + if (scanner->hasPartialClip()) { + clipRes = splashClipPartial; } - pipeInit(&pipe, 0, yMinI, pattern, NULL, alpha, vectorAntialias, gFalse, pattern); + pipeInit(&pipe, 0, yMinI, pattern, NULL, (Guchar)splashRound(alpha * 255), + vectorAntialias && !inShading, gFalse); // draw the spans - if (vectorAntialias) { + if (vectorAntialias && !inShading) { for (y = yMinI; y <= yMaxI; ++y) { scanner->renderAALine(aaBuf, &x0, &x1, y); if (clipRes != splashClipAllInside) { @@ -1698,6 +2310,73 @@ return splashOk; } +GBool Splash::pathAllOutside(SplashPath *path) { + SplashCoord xMin1, yMin1, xMax1, yMax1; + SplashCoord xMin2, yMin2, xMax2, yMax2; + SplashCoord x, y; + int xMinI, yMinI, xMaxI, yMaxI; + int i; + + xMin1 = xMax1 = path->pts[0].x; + yMin1 = yMax1 = path->pts[0].y; + for (i = 1; i < path->length; ++i) { + if (path->pts[i].x < xMin1) { + xMin1 = path->pts[i].x; + } else if (path->pts[i].x > xMax1) { + xMax1 = path->pts[i].x; + } + if (path->pts[i].y < yMin1) { + yMin1 = path->pts[i].y; + } else if (path->pts[i].y > yMax1) { + yMax1 = path->pts[i].y; + } + } + + transform(state->matrix, xMin1, yMin1, &x, &y); + xMin2 = xMax2 = x; + yMin2 = yMax2 = y; + transform(state->matrix, xMin1, yMax1, &x, &y); + if (x < xMin2) { + xMin2 = x; + } else if (x > xMax2) { + xMax2 = x; + } + if (y < yMin2) { + yMin2 = y; + } else if (y > yMax2) { + yMax2 = y; + } + transform(state->matrix, xMax1, yMin1, &x, &y); + if (x < xMin2) { + xMin2 = x; + } else if (x > xMax2) { + xMax2 = x; + } + if (y < yMin2) { + yMin2 = y; + } else if (y > yMax2) { + yMax2 = y; + } + transform(state->matrix, xMax1, yMax1, &x, &y); + if (x < xMin2) { + xMin2 = x; + } else if (x > xMax2) { + xMax2 = x; + } + if (y < yMin2) { + yMin2 = y; + } else if (y > yMax2) { + yMax2 = y; + } + xMinI = splashFloor(xMin2); + yMinI = splashFloor(yMin2); + xMaxI = splashFloor(xMax2); + yMaxI = splashFloor(yMax2); + + return state->clip->testRect(xMinI, yMinI, xMaxI, yMaxI) == + splashClipAllOutside; +} + SplashError Splash::xorFill(SplashPath *path, GBool eo) { SplashPipe pipe; SplashXPath *xPath; @@ -1711,7 +2390,8 @@ } xPath = new SplashXPath(path, state->matrix, state->flatness, gTrue); xPath->sort(); - scanner = new SplashXPathScanner(xPath, eo); + scanner = new SplashXPathScanner(xPath, eo, state->clip->getYMinI(), + state->clip->getYMaxI()); // get the min and max x and y values scanner->getBBox(&xMinI, &yMinI, &xMaxI, &yMaxI); @@ -1719,18 +2399,13 @@ // check clipping if ((clipRes = state->clip->testRect(xMinI, yMinI, xMaxI, yMaxI)) != splashClipAllOutside) { - - // limit the y range - if (yMinI < state->clip->getYMinI()) { - yMinI = state->clip->getYMinI(); - } - if (yMaxI > state->clip->getYMaxI()) { - yMaxI = state->clip->getYMaxI(); + if (scanner->hasPartialClip()) { + clipRes = splashClipPartial; } origBlendFunc = state->blendFunc; state->blendFunc = &blendXor; - pipeInit(&pipe, 0, yMinI, state->fillPattern, NULL, 1, gFalse, gFalse, state->fillPattern); + pipeInit(&pipe, 0, yMinI, state->fillPattern, NULL, 255, gFalse, gFalse); // draw the spans for (y = yMinI; y <= yMaxI; ++y) { @@ -1808,7 +2483,8 @@ void Splash::fillGlyph2(int x0, int y0, SplashGlyphBitmap *glyph, GBool noClip) { SplashPipe pipe; - int alpha0, alpha; + int alpha0; + Guchar alpha; Guchar *p; int x1, y1, xx, xx1, yy; @@ -1844,14 +2520,14 @@ if (noClip) { if (glyph->aa) { pipeInit(&pipe, xStart, yStart, - state->fillPattern, NULL, state->fillAlpha, gTrue, gFalse, state->fillPattern); + state->fillPattern, NULL, (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) { pipeSetXY(&pipe, xStart, y1); for (xx = 0, x1 = xStart; xx < xxLimit; ++xx, ++x1) { alpha = p[xx]; if (alpha != 0) { - pipe.shape = (SplashCoord)(alpha / 255.0); - pipeRun(&pipe); + pipe.shape = alpha; + (this->*pipe.run)(&pipe); updateModX(x1); updateModY(y1); } else { @@ -1864,14 +2540,14 @@ const int widthEight = splashCeil(glyph->w / 8.0); pipeInit(&pipe, xStart, yStart, - state->fillPattern, NULL, state->fillAlpha, gFalse, gFalse, state->fillPattern); + state->fillPattern, NULL, (Guchar)splashRound(state->fillAlpha * 255), gFalse, gFalse); for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) { pipeSetXY(&pipe, xStart, y1); for (xx = 0, x1 = xStart; xx < xxLimit; xx += 8) { alpha0 = (xShift > 0 ? (p[xx / 8] << xShift) | (p[xx / 8 + 1] >> (8 - xShift)) : p[xx / 8]); for (xx1 = 0; xx1 < 8 && xx + xx1 < xxLimit; ++xx1, ++x1) { if (alpha0 & 0x80) { - pipeRun(&pipe); + (this->*pipe.run)(&pipe); updateModX(x1); updateModY(y1); } else { @@ -1886,15 +2562,15 @@ } else { if (glyph->aa) { pipeInit(&pipe, xStart, yStart, - state->fillPattern, NULL, state->fillAlpha, gTrue, gFalse, state->fillPattern); + state->fillPattern, NULL, (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) { pipeSetXY(&pipe, xStart, y1); for (xx = 0, x1 = xStart; xx < xxLimit; ++xx, ++x1) { if (state->clip->test(x1, y1)) { alpha = p[xx]; if (alpha != 0) { - pipe.shape = (SplashCoord)(alpha / 255.0); - pipeRun(&pipe); + pipe.shape = alpha; + (this->*pipe.run)(&pipe); updateModX(x1); updateModY(y1); } else { @@ -1910,7 +2586,7 @@ const int widthEight = splashCeil(glyph->w / 8.0); pipeInit(&pipe, xStart, yStart, - state->fillPattern, NULL, state->fillAlpha, gFalse, gFalse, state->fillPattern); + state->fillPattern, NULL, (Guchar)splashRound(state->fillAlpha * 255), gFalse, gFalse); for (yy = 0, y1 = yStart; yy < yyLimit; ++yy, ++y1) { pipeSetXY(&pipe, xStart, y1); for (xx = 0, x1 = xStart; xx < xxLimit; xx += 8) { @@ -1918,7 +2594,7 @@ for (xx1 = 0; xx1 < 8 && xx + xx1 < xxLimit; ++xx1, ++x1) { if (state->clip->test(x1, y1)) { if (alpha0 & 0x80) { - pipeRun(&pipe); + (this->*pipe.run)(&pipe); updateModX(x1); updateModY(y1); } else { @@ -1939,22 +2615,11 @@ SplashError Splash::fillImageMask(SplashImageMaskSource src, void *srcData, int w, int h, SplashCoord *mat, GBool glyphMode) { - SplashPipe pipe; - GBool rot; - SplashCoord xScale, yScale, xShear, yShear, yShear1; - int tx, tx2, ty, ty2, scaledWidth, scaledHeight, xSign, ySign; - int ulx, uly, llx, lly, urx, ury, lrx, lry; - int ulx1, uly1, llx1, lly1, urx1, ury1, lrx1, lry1; - int xMin, xMax, yMin, yMax; - SplashClipResult clipRes, clipRes2; - int yp, yq, yt, yStep, lastYStep; - int xp, xq, xt, xStep, xSrc; - int k1, spanXMin, spanXMax, spanY; - SplashColorPtr pixBuf, p; - int pixAcc; - int x, y, x1, x2, y2; - SplashCoord y1; - int n, m, i, j; + SplashBitmap *scaledMask; + SplashClipResult clipRes; + GBool minorAxisZero; + int x0, y0, x1, y1, scaledWidth, scaledHeight; + int yp; if (debugMode) { printf("fillImageMask: w=%d h=%d mat=[%.2f %.2f %.2f %.2f %.2f %.2f]\n", @@ -1965,289 +2630,739 @@ if (w == 0 && h == 0) return splashErrZeroImage; // check for singular matrix - if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.000001) { + if (!splashCheckDet(mat[0], mat[1], mat[2], mat[3], 0.000001)) { return splashErrSingularMatrix; } - // compute scale, shear, rotation, translation parameters - rot = splashAbs(mat[1]) > splashAbs(mat[0]); - if (rot) { - xScale = -mat[1]; - yScale = mat[2] - (mat[0] * mat[3]) / mat[1]; - xShear = -mat[3] / yScale; - yShear = -mat[0] / mat[1]; - } else { - xScale = mat[0]; - yScale = mat[3] - (mat[1] * mat[2]) / mat[0]; - xShear = mat[2] / yScale; - yShear = mat[1] / mat[0]; - } - // Note 1: The PDF spec says that all pixels whose *centers* lie - // within the region get painted -- but that doesn't seem to match - // up with what Acrobat actually does: it ends up leaving gaps - // between image stripes. So we use the same rule here as for - // fills: any pixel that overlaps the region gets painted. - // Note 2: The "glyphMode" flag is a kludge: it switches back to - // "correct" behavior (matching the spec), for use in rendering Type - // 3 fonts. - // Note 3: The +/-0.01 in these computations is to avoid floating - // point precision problems which can lead to gaps between image - // stripes (it can cause image stripes to overlap, but that's a much - // less visible problem). - if (glyphMode) { - if (xScale >= 0) { - tx = splashRound(mat[4]); - tx2 = splashRound(mat[4] + xScale) - 1; - } else { - tx = splashRound(mat[4]) - 1; - tx2 = splashRound(mat[4] + xScale); - } - } else { - if (xScale >= 0) { - tx = splashFloor(mat[4] - 0.01); - tx2 = splashFloor(mat[4] + xScale + 0.01); - } else { - tx = splashFloor(mat[4] + 0.01); - tx2 = splashFloor(mat[4] + xScale - 0.01); - } - } - scaledWidth = abs(tx2 - tx) + 1; - if (glyphMode) { - if (yScale >= 0) { - ty = splashRound(mat[5]); - ty2 = splashRound(mat[5] + yScale) - 1; - } else { - ty = splashRound(mat[5]) - 1; - ty2 = splashRound(mat[5] + yScale); - } - } else { - if (yScale >= 0) { - ty = splashFloor(mat[5] - 0.01); - ty2 = splashFloor(mat[5] + yScale + 0.01); - } else { - ty = splashFloor(mat[5] + 0.01); - ty2 = splashFloor(mat[5] + yScale - 0.01); - } - } - scaledHeight = abs(ty2 - ty) + 1; - xSign = (xScale < 0) ? -1 : 1; - ySign = (yScale < 0) ? -1 : 1; - yShear1 = (SplashCoord)xSign * yShear; - - // clipping - ulx1 = 0; - uly1 = 0; - urx1 = xSign * (scaledWidth - 1); - ury1 = (int)(yShear * urx1); - llx1 = splashRound(xShear * ySign * (scaledHeight - 1)); - lly1 = ySign * (scaledHeight - 1) + (int)(yShear * llx1); - lrx1 = xSign * (scaledWidth - 1) + - splashRound(xShear * ySign * (scaledHeight - 1)); - lry1 = ySign * (scaledHeight - 1) + (int)(yShear * lrx1); - if (rot) { - ulx = tx + uly1; uly = ty - ulx1; - urx = tx + ury1; ury = ty - urx1; - llx = tx + lly1; lly = ty - llx1; - lrx = tx + lry1; lry = ty - lrx1; - } else { - ulx = tx + ulx1; uly = ty + uly1; - urx = tx + urx1; ury = ty + ury1; - llx = tx + llx1; lly = ty + lly1; - lrx = tx + lrx1; lry = ty + lry1; - } - xMin = (ulx < urx) ? (ulx < llx) ? (ulx < lrx) ? ulx : lrx - : (llx < lrx) ? llx : lrx - : (urx < llx) ? (urx < lrx) ? urx : lrx - : (llx < lrx) ? llx : lrx; - xMax = (ulx > urx) ? (ulx > llx) ? (ulx > lrx) ? ulx : lrx - : (llx > lrx) ? llx : lrx - : (urx > llx) ? (urx > lrx) ? urx : lrx - : (llx > lrx) ? llx : lrx; - yMin = (uly < ury) ? (uly < lly) ? (uly < lry) ? uly : lry - : (lly < lry) ? lly : lry - : (ury < lly) ? (ury < lry) ? ury : lry - : (lly < lry) ? lly : lry; - yMax = (uly > ury) ? (uly > lly) ? (uly > lry) ? uly : lry - : (lly > lry) ? lly : lry - : (ury > lly) ? (ury > lry) ? ury : lry - : (lly > lry) ? lly : lry; - clipRes = state->clip->testRect(xMin, yMin, xMax, yMax); - opClipRes = clipRes; - - // compute Bresenham parameters for x and y scaling - yp = h / scaledHeight; - yq = h % scaledHeight; - xp = w / scaledWidth; - xq = w % scaledWidth; + minorAxisZero = mat[1] == 0 && mat[2] == 0; - // allocate pixel buffer - if (yp < 0 || yp > INT_MAX - 1) { - return splashErrBadArg; - } - pixBuf = (SplashColorPtr)gmallocn((yp + 1), w); + // scaling only + if (mat[0] > 0 && minorAxisZero && mat[3] > 0) { + x0 = imgCoordMungeLowerC(mat[4], glyphMode); + y0 = imgCoordMungeLowerC(mat[5], glyphMode); + x1 = imgCoordMungeUpperC(mat[0] + mat[4], glyphMode); + y1 = imgCoordMungeUpperC(mat[3] + mat[5], glyphMode); + // make sure narrow images cover at least one pixel + if (x0 == x1) { + ++x1; + } + if (y0 == y1) { + ++y1; + } + clipRes = state->clip->testRect(x0, y0, x1 - 1, y1 - 1); + opClipRes = clipRes; + if (clipRes != splashClipAllOutside) { + scaledWidth = x1 - x0; + scaledHeight = y1 - y0; + yp = h / scaledHeight; + if (yp < 0 || yp > INT_MAX - 1) { + return splashErrBadArg; + } + scaledMask = scaleMask(src, srcData, w, h, scaledWidth, scaledHeight); + blitMask(scaledMask, x0, y0, clipRes); + delete scaledMask; + } + + // scaling plus vertical flip + } else if (mat[0] > 0 && minorAxisZero && mat[3] < 0) { + x0 = imgCoordMungeLowerC(mat[4], glyphMode); + y0 = imgCoordMungeLowerC(mat[3] + mat[5], glyphMode); + x1 = imgCoordMungeUpperC(mat[0] + mat[4], glyphMode); + y1 = imgCoordMungeUpperC(mat[5], glyphMode); + // make sure narrow images cover at least one pixel + if (x0 == x1) { + ++x1; + } + if (y0 == y1) { + ++y1; + } + clipRes = state->clip->testRect(x0, y0, x1 - 1, y1 - 1); + opClipRes = clipRes; + if (clipRes != splashClipAllOutside) { + scaledWidth = x1 - x0; + scaledHeight = y1 - y0; + yp = h / scaledHeight; + if (yp < 0 || yp > INT_MAX - 1) { + return splashErrBadArg; + } + scaledMask = scaleMask(src, srcData, w, h, scaledWidth, scaledHeight); + vertFlipImage(scaledMask, scaledWidth, scaledHeight, 1); + blitMask(scaledMask, x0, y0, clipRes); + delete scaledMask; + } - // initialize the pixel pipe - pipeInit(&pipe, 0, 0, state->fillPattern, NULL, state->fillAlpha, - gTrue, gFalse, state->fillPattern); - if (vectorAntialias) { - drawAAPixelInit(); + // all other cases + } else { + arbitraryTransformMask(src, srcData, w, h, mat, glyphMode); } + return splashOk; +} + +void Splash::arbitraryTransformMask(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + SplashCoord *mat, GBool glyphMode) { + SplashBitmap *scaledMask; + SplashClipResult clipRes, clipRes2; + SplashPipe pipe; + int scaledWidth, scaledHeight, t0, t1; + SplashCoord r00, r01, r10, r11, det, ir00, ir01, ir10, ir11; + SplashCoord vx[4], vy[4]; + int xMin, yMin, xMax, yMax; + ImageSection section[3]; + int nSections; + int y, xa, xb, x, i, xx, yy; + + // compute the four vertices of the target quadrilateral + vx[0] = mat[4]; vy[0] = mat[5]; + vx[1] = mat[2] + mat[4]; vy[1] = mat[3] + mat[5]; + vx[2] = mat[0] + mat[2] + mat[4]; vy[2] = mat[1] + mat[3] + mat[5]; + vx[3] = mat[0] + mat[4]; vy[3] = mat[1] + mat[5]; + + // clipping + xMin = imgCoordMungeLowerC(vx[0], glyphMode); + xMax = imgCoordMungeUpperC(vx[0], glyphMode); + yMin = imgCoordMungeLowerC(vy[0], glyphMode); + yMax = imgCoordMungeUpperC(vy[0], glyphMode); + for (i = 1; i < 4; ++i) { + t0 = imgCoordMungeLowerC(vx[i], glyphMode); + if (t0 < xMin) { + xMin = t0; + } + t0 = imgCoordMungeUpperC(vx[i], glyphMode); + if (t0 > xMax) { + xMax = t0; + } + t1 = imgCoordMungeLowerC(vy[i], glyphMode); + if (t1 < yMin) { + yMin = t1; + } + t1 = imgCoordMungeUpperC(vy[i], glyphMode); + if (t1 > yMax) { + yMax = t1; + } + } + clipRes = state->clip->testRect(xMin, yMin, xMax - 1, yMax - 1); + opClipRes = clipRes; + if (clipRes == splashClipAllOutside) { + return; + } + + // compute the scale factors + if (mat[0] >= 0) { + t0 = imgCoordMungeUpperC(mat[0] + mat[4], glyphMode) - + imgCoordMungeLowerC(mat[4], glyphMode); + } else { + t0 = imgCoordMungeUpperC(mat[4], glyphMode) - + imgCoordMungeLowerC(mat[0] + mat[4], glyphMode); + } + if (mat[1] >= 0) { + t1 = imgCoordMungeUpperC(mat[1] + mat[5], glyphMode) - + imgCoordMungeLowerC(mat[5], glyphMode); + } else { + t1 = imgCoordMungeUpperC(mat[5], glyphMode) - + imgCoordMungeLowerC(mat[1] + mat[5], glyphMode); + } + scaledWidth = t0 > t1 ? t0 : t1; + if (mat[2] >= 0) { + t0 = imgCoordMungeUpperC(mat[2] + mat[4], glyphMode) - + imgCoordMungeLowerC(mat[4], glyphMode); + } else { + t0 = imgCoordMungeUpperC(mat[4], glyphMode) - + imgCoordMungeLowerC(mat[2] + mat[4], glyphMode); + } + if (mat[3] >= 0) { + t1 = imgCoordMungeUpperC(mat[3] + mat[5], glyphMode) - + imgCoordMungeLowerC(mat[5], glyphMode); + } else { + t1 = imgCoordMungeUpperC(mat[5], glyphMode) - + imgCoordMungeLowerC(mat[3] + mat[5], glyphMode); + } + scaledHeight = t0 > t1 ? t0 : t1; + if (scaledWidth == 0) { + scaledWidth = 1; + } + if (scaledHeight == 0) { + scaledHeight = 1; + } + + // compute the inverse transform (after scaling) matrix + r00 = mat[0] / scaledWidth; + r01 = mat[1] / scaledWidth; + r10 = mat[2] / scaledHeight; + r11 = mat[3] / scaledHeight; + det = r00 * r11 - r01 * r10; + if (splashAbs(det) < 1e-6) { + // this should be caught by the singular matrix check in fillImageMask + return; + } + ir00 = r11 / det; + ir01 = -r01 / det; + ir10 = -r10 / det; + ir11 = r00 / det; + + // scale the input image + scaledMask = scaleMask(src, srcData, srcWidth, srcHeight, + scaledWidth, scaledHeight); + + // construct the three sections + i = (vy[2] <= vy[3]) ? 2 : 3; + if (vy[1] <= vy[i]) { + i = 1; + } + if (vy[0] < vy[i] || (i != 3 && vy[0] == vy[i])) { + i = 0; + } + if (vy[i] == vy[(i+1) & 3]) { + section[0].y0 = imgCoordMungeLowerC(vy[i], glyphMode); + section[0].y1 = imgCoordMungeUpperC(vy[(i+2) & 3], glyphMode) - 1; + if (vx[i] < vx[(i+1) & 3]) { + section[0].ia0 = i; + section[0].ia1 = (i+3) & 3; + section[0].ib0 = (i+1) & 3; + section[0].ib1 = (i+2) & 3; + } else { + section[0].ia0 = (i+1) & 3; + section[0].ia1 = (i+2) & 3; + section[0].ib0 = i; + section[0].ib1 = (i+3) & 3; + } + nSections = 1; + } else { + section[0].y0 = imgCoordMungeLowerC(vy[i], glyphMode); + section[2].y1 = imgCoordMungeUpperC(vy[(i+2) & 3], glyphMode) - 1; + section[0].ia0 = section[0].ib0 = i; + section[2].ia1 = section[2].ib1 = (i+2) & 3; + if (vx[(i+1) & 3] < vx[(i+3) & 3]) { + section[0].ia1 = section[2].ia0 = (i+1) & 3; + section[0].ib1 = section[2].ib0 = (i+3) & 3; + } else { + section[0].ia1 = section[2].ia0 = (i+3) & 3; + section[0].ib1 = section[2].ib0 = (i+1) & 3; + } + if (vy[(i+1) & 3] < vy[(i+3) & 3]) { + section[1].y0 = imgCoordMungeLowerC(vy[(i+1) & 3], glyphMode); + section[2].y0 = imgCoordMungeUpperC(vy[(i+3) & 3], glyphMode); + if (vx[(i+1) & 3] < vx[(i+3) & 3]) { + section[1].ia0 = (i+1) & 3; + section[1].ia1 = (i+2) & 3; + section[1].ib0 = i; + section[1].ib1 = (i+3) & 3; + } else { + section[1].ia0 = i; + section[1].ia1 = (i+3) & 3; + section[1].ib0 = (i+1) & 3; + section[1].ib1 = (i+2) & 3; + } + } else { + section[1].y0 = imgCoordMungeLowerC(vy[(i+3) & 3], glyphMode); + section[2].y0 = imgCoordMungeUpperC(vy[(i+1) & 3], glyphMode); + if (vx[(i+1) & 3] < vx[(i+3) & 3]) { + section[1].ia0 = i; + section[1].ia1 = (i+1) & 3; + section[1].ib0 = (i+3) & 3; + section[1].ib1 = (i+2) & 3; + } else { + section[1].ia0 = (i+3) & 3; + section[1].ia1 = (i+2) & 3; + section[1].ib0 = i; + section[1].ib1 = (i+1) & 3; + } + } + section[0].y1 = section[1].y0 - 1; + section[1].y1 = section[2].y0 - 1; + nSections = 3; + } + for (i = 0; i < nSections; ++i) { + section[i].xa0 = vx[section[i].ia0]; + section[i].ya0 = vy[section[i].ia0]; + section[i].xa1 = vx[section[i].ia1]; + section[i].ya1 = vy[section[i].ia1]; + section[i].xb0 = vx[section[i].ib0]; + section[i].yb0 = vy[section[i].ib0]; + section[i].xb1 = vx[section[i].ib1]; + section[i].yb1 = vy[section[i].ib1]; + section[i].dxdya = (section[i].xa1 - section[i].xa0) / + (section[i].ya1 - section[i].ya0); + section[i].dxdyb = (section[i].xb1 - section[i].xb0) / + (section[i].yb1 - section[i].yb0); + } + + // initialize the pixel pipe + pipeInit(&pipe, 0, 0, state->fillPattern, NULL, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); + if (vectorAntialias) { + drawAAPixelInit(); + } + + // make sure narrow images cover at least one pixel + if (nSections == 1) { + if (section[0].y0 == section[0].y1) { + ++section[0].y1; + clipRes = opClipRes = splashClipPartial; + } + } else { + if (section[0].y0 == section[2].y1) { + ++section[1].y1; + clipRes = opClipRes = splashClipPartial; + } + } + + // scan all pixels inside the target region + for (i = 0; i < nSections; ++i) { + for (y = section[i].y0; y <= section[i].y1; ++y) { + xa = imgCoordMungeLowerC(section[i].xa0 + + ((SplashCoord)y + 0.5 - section[i].ya0) * + section[i].dxdya, + glyphMode); + xb = imgCoordMungeUpperC(section[i].xb0 + + ((SplashCoord)y + 0.5 - section[i].yb0) * + section[i].dxdyb, + glyphMode); + // make sure narrow images cover at least one pixel + if (xa == xb) { + ++xb; + } + if (clipRes != splashClipAllInside) { + clipRes2 = state->clip->testSpan(xa, xb - 1, y); + } else { + clipRes2 = clipRes; + } + for (x = xa; x < xb; ++x) { + // map (x+0.5, y+0.5) back to the scaled image + xx = splashFloor(((SplashCoord)x + 0.5 - mat[4]) * ir00 + + ((SplashCoord)y + 0.5 - mat[5]) * ir10); + yy = splashFloor(((SplashCoord)x + 0.5 - mat[4]) * ir01 + + ((SplashCoord)y + 0.5 - mat[5]) * ir11); + // xx should always be within bounds, but floating point + // inaccuracy can cause problems + if (xx < 0) { + xx = 0; + } else if (xx >= scaledWidth) { + xx = scaledWidth - 1; + } + if (yy < 0) { + yy = 0; + } else if (yy >= scaledHeight) { + yy = scaledHeight - 1; + } + pipe.shape = scaledMask->data[yy * scaledWidth + xx]; + if (vectorAntialias && clipRes2 != splashClipAllInside) { + drawAAPixel(&pipe, x, y); + } else { + drawPixel(&pipe, x, y, clipRes2 == splashClipAllInside); + } + } + } + } + + delete scaledMask; +} + +// Scale an image mask into a SplashBitmap. +SplashBitmap *Splash::scaleMask(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight) { + SplashBitmap *dest; + + dest = new SplashBitmap(scaledWidth, scaledHeight, 1, splashModeMono8, + gFalse); + if (scaledHeight < srcHeight) { + if (scaledWidth < srcWidth) { + scaleMaskYdXd(src, srcData, srcWidth, srcHeight, + scaledWidth, scaledHeight, dest); + } else { + scaleMaskYdXu(src, srcData, srcWidth, srcHeight, + scaledWidth, scaledHeight, dest); + } + } else { + if (scaledWidth < srcWidth) { + scaleMaskYuXd(src, srcData, srcWidth, srcHeight, + scaledWidth, scaledHeight, dest); + } else { + scaleMaskYuXu(src, srcData, srcWidth, srcHeight, + scaledWidth, scaledHeight, dest); + } + } + return dest; +} + +void Splash::scaleMaskYdXd(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf; + Guint *pixBuf; + Guint pix; + Guchar *destPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx, d, d0, d1; + int i, j; + + // Bresenham parameters for y scale + yp = srcHeight / scaledHeight; + yq = srcHeight % scaledHeight; + + // Bresenham parameters for x scale + xp = srcWidth / scaledWidth; + xq = srcWidth % scaledWidth; + + // allocate buffers + lineBuf = (Guchar *)gmalloc(srcWidth); + pixBuf = (Guint *)gmallocn(srcWidth, sizeof(int)); + // init y scale Bresenham yt = 0; - lastYStep = 1; + destPtr = dest->data; for (y = 0; y < scaledHeight; ++y) { // y scale Bresenham - yStep = yp; - yt += yq; - if (yt >= scaledHeight) { + if ((yt += yq) >= scaledHeight) { yt -= scaledHeight; - ++yStep; + yStep = yp + 1; + } else { + yStep = yp; } - // read row(s) from image - n = (yp > 0) ? yStep : lastYStep; - if (n > 0) { - p = pixBuf; - for (i = 0; i < n; ++i) { - (*src)(srcData, p); - p += w; - } - } - lastYStep = yStep; - - // loop-invariant constants - k1 = splashRound(xShear * ySign * y); - - // clipping test - if (clipRes != splashClipAllInside && - !rot && - (int)(yShear * k1) == - (int)(yShear * (xSign * (scaledWidth - 1) + k1))) { - if (xSign > 0) { - spanXMin = tx + k1; - spanXMax = spanXMin + (scaledWidth - 1); + // read rows from image + memset(pixBuf, 0, srcWidth * sizeof(int)); + for (i = 0; i < yStep; ++i) { + (*src)(srcData, lineBuf); + for (j = 0; j < srcWidth; ++j) { + pixBuf[j] += lineBuf[j]; + } + } + + // init x scale Bresenham + xt = 0; + d0 = (255 << 23) / (yStep * xp); + d1 = (255 << 23) / (yStep * (xp + 1)); + + xx = 0; + for (x = 0; x < scaledWidth; ++x) { + + // x scale Bresenham + if ((xt += xq) >= scaledWidth) { + xt -= scaledWidth; + xStep = xp + 1; + d = d1; } else { - spanXMax = tx + k1; - spanXMin = spanXMax - (scaledWidth - 1); + xStep = xp; + d = d0; } - spanY = ty + ySign * y + (int)(yShear * k1); - clipRes2 = state->clip->testSpan(spanXMin, spanXMax, spanY); - if (clipRes2 == splashClipAllOutside) { - continue; + + // compute the final pixel + pix = 0; + for (i = 0; i < xStep; ++i) { + pix += pixBuf[xx++]; } + // (255 * pix) / xStep * yStep + pix = (pix * d) >> 23; + + // store the pixel + *destPtr++ = (Guchar)pix; + } + } + + gfree(pixBuf); + gfree(lineBuf); +} + +void Splash::scaleMaskYdXu(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf; + Guint *pixBuf; + Guint pix; + Guchar *destPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, d; + int i, j; + + // Bresenham parameters for y scale + yp = srcHeight / scaledHeight; + yq = srcHeight % scaledHeight; + + // Bresenham parameters for x scale + xp = scaledWidth / srcWidth; + xq = scaledWidth % srcWidth; + + // allocate buffers + lineBuf = (Guchar *)gmalloc(srcWidth); + pixBuf = (Guint *)gmallocn(srcWidth, sizeof(int)); + + // init y scale Bresenham + yt = 0; + + destPtr = dest->data; + for (y = 0; y < scaledHeight; ++y) { + + // y scale Bresenham + if ((yt += yq) >= scaledHeight) { + yt -= scaledHeight; + yStep = yp + 1; } else { - clipRes2 = clipRes; + yStep = yp; + } + + // read rows from image + memset(pixBuf, 0, srcWidth * sizeof(int)); + for (i = 0; i < yStep; ++i) { + (*src)(srcData, lineBuf); + for (j = 0; j < srcWidth; ++j) { + pixBuf[j] += lineBuf[j]; + } } // init x scale Bresenham xt = 0; - xSrc = 0; + d = (255 << 23) / yStep; + + for (x = 0; x < srcWidth; ++x) { + + // x scale Bresenham + if ((xt += xq) >= srcWidth) { + xt -= srcWidth; + xStep = xp + 1; + } else { + xStep = xp; + } + + // compute the final pixel + pix = pixBuf[x]; + // (255 * pix) / yStep + pix = (pix * d) >> 23; - // x shear - x1 = k1; + // store the pixel + for (i = 0; i < xStep; ++i) { + *destPtr++ = (Guchar)pix; + } + } + } + + gfree(pixBuf); + gfree(lineBuf); +} + +void Splash::scaleMaskYuXd(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf; + Guint pix; + Guchar *destPtr0, *destPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx, d, d0, d1; + int i; + + // Bresenham parameters for y scale + yp = scaledHeight / srcHeight; + yq = scaledHeight % srcHeight; + + // Bresenham parameters for x scale + xp = srcWidth / scaledWidth; + xq = srcWidth % scaledWidth; + + // allocate buffers + lineBuf = (Guchar *)gmalloc(srcWidth); + + // init y scale Bresenham + yt = 0; + + destPtr0 = dest->data; + for (y = 0; y < srcHeight; ++y) { - // y shear - y1 = (SplashCoord)ySign * y + yShear * x1; - // this is a kludge: if yShear1 is negative, then (int)y1 would - // change immediately after the first pixel, which is not what we - // want - if (yShear1 < 0) { - y1 += 0.999; + // y scale Bresenham + if ((yt += yq) >= srcHeight) { + yt -= srcHeight; + yStep = yp + 1; + } else { + yStep = yp; } - // loop-invariant constants - n = yStep > 0 ? yStep : 1; + // read row from image + (*src)(srcData, lineBuf); + // init x scale Bresenham + xt = 0; + d0 = (255 << 23) / xp; + d1 = (255 << 23) / (xp + 1); + + xx = 0; for (x = 0; x < scaledWidth; ++x) { // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { + if ((xt += xq) >= scaledWidth) { xt -= scaledWidth; - ++xStep; + xStep = xp + 1; + d = d1; + } else { + xStep = xp; + d = d0; } - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; + // compute the final pixel + pix = 0; + for (i = 0; i < xStep; ++i) { + pix += lineBuf[xx++]; } + // (255 * pix) / xStep + pix = (pix * d) >> 23; - // compute the alpha value for (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - p = pixBuf + xSrc; - pixAcc = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc += *p++; - } - p += w - m; - } - - // blend fill color with background - if (pixAcc != 0) { - pipe.shape = (pixAcc == n * m) - ? (SplashCoord)1 - : (SplashCoord)pixAcc / (SplashCoord)(n * m); - if (vectorAntialias && clipRes2 != splashClipAllInside) { - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, clipRes2 == splashClipAllInside); - } + // store the pixel + for (i = 0; i < yStep; ++i) { + destPtr = destPtr0 + i * scaledWidth + x; + *destPtr = (Guchar)pix; } + } + + destPtr0 += yStep * scaledWidth; + } + + gfree(lineBuf); +} + +void Splash::scaleMaskYuXu(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf; + Guint pix; + Guchar *destPtr0, *destPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx; + int i, j; + + // Bresenham parameters for y scale + yp = scaledHeight / srcHeight; + yq = scaledHeight % srcHeight; + + // Bresenham parameters for x scale + xp = scaledWidth / srcWidth; + xq = scaledWidth % srcWidth; + + // allocate buffers + lineBuf = (Guchar *)gmalloc(srcWidth); + + // init y scale Bresenham + yt = 0; + + destPtr0 = dest->data; + for (y = 0; y < srcHeight; ++y) { + + // y scale Bresenham + if ((yt += yq) >= srcHeight) { + yt -= srcHeight; + yStep = yp + 1; + } else { + yStep = yp; + } + + // read row from image + (*src)(srcData, lineBuf); + + // init x scale Bresenham + xt = 0; + + xx = 0; + for (x = 0; x < srcWidth; ++x) { // x scale Bresenham - xSrc += xStep; + if ((xt += xq) >= srcWidth) { + xt -= srcWidth; + xStep = xp + 1; + } else { + xStep = xp; + } + + // compute the final pixel + pix = lineBuf[x] ? 255 : 0; - // x shear - x1 += xSign; + // store the pixel + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destPtr = destPtr0 + i * scaledWidth + xx + j; + *destPtr++ = (Guchar)pix; + } + } - // y shear - y1 += yShear1; + xx += xStep; } + + destPtr0 += yStep * scaledWidth; } - // free memory - gfree(pixBuf); + gfree(lineBuf); +} - return splashOk; +void Splash::blitMask(SplashBitmap *src, int xDest, int yDest, + SplashClipResult clipRes) { + SplashPipe pipe; + Guchar *p; + int w, h, x, y; + + w = src->getWidth(); + h = src->getHeight(); + if (vectorAntialias && clipRes != splashClipAllInside) { + pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); + drawAAPixelInit(); + p = src->getDataPtr(); + for (y = 0; y < h; ++y) { + for (x = 0; x < w; ++x) { + pipe.shape = *p++; + drawAAPixel(&pipe, xDest + x, yDest + y); + } + } + } else { + pipeInit(&pipe, xDest, yDest, state->fillPattern, NULL, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); + p = src->getDataPtr(); + if (clipRes == splashClipAllInside) { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + for (x = 0; x < w; ++x) { + if (*p) { + pipe.shape = *p; + (this->*pipe.run)(&pipe); + } else { + pipeIncX(&pipe); + } + ++p; + } + } + updateModX(xDest); + updateModX(xDest + w - 1); + updateModY(yDest); + updateModY(yDest + h - 1); + } else { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + for (x = 0; x < w; ++x) { + if (*p && state->clip->test(xDest + x, yDest + y)) { + pipe.shape = *p; + (this->*pipe.run)(&pipe); + updateModX(xDest + x); + updateModY(yDest + y); + } else { + pipeIncX(&pipe); + } + ++p; + } + } + } + } } SplashError Splash::drawImage(SplashImageSource src, void *srcData, SplashColorMode srcMode, GBool srcAlpha, - int w, int h, SplashCoord *mat, SplashPattern *opImagePattern) { - SplashPipe pipe; - GBool ok, rot; - SplashCoord xScale, yScale, xShear, yShear, yShear1; - int tx, tx2, ty, ty2, scaledWidth, scaledHeight, xSign, ySign; - int ulx, uly, llx, lly, urx, ury, lrx, lry; - int ulx1, uly1, llx1, lly1, urx1, ury1, lrx1, lry1; - int xMin, xMax, yMin, yMax; - SplashClipResult clipRes, clipRes2; - int yp, yq, yt, yStep, lastYStep; - int xp, xq, xt, xStep, xSrc; - int k1, spanXMin, spanXMax, spanY; - SplashColorPtr colorBuf, p; - SplashColor pix; - Guchar *alphaBuf, *q; -#if SPLASH_CMYK - int pixAcc0, pixAcc1, pixAcc2, pixAcc3; -#else - int pixAcc0, pixAcc1, pixAcc2; -#endif - int alphaAcc; - SplashCoord pixMul, alphaMul, alpha; - int x, y, x1, x2, y2; - SplashCoord y1; - int nComps, n, m, i, j; + int w, int h, SplashCoord *mat, + GBool tilingPattern) { + GBool ok; + SplashBitmap *scaledImg; + SplashClipResult clipRes; + GBool minorAxisZero; + int x0, y0, x1, y1, scaledWidth, scaledHeight; + int nComps; + int yp; if (debugMode) { printf("drawImage: srcMode=%d srcAlpha=%d w=%d h=%d mat=[%.2f %.2f %.2f %.2f %.2f %.2f]\n", @@ -2282,804 +3397,1280 @@ nComps = 4; break; #endif + default: + ok = gFalse; + break; } if (!ok) { return splashErrModeMismatch; } // check for singular matrix - if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.000001) { + if (!splashCheckDet(mat[0], mat[1], mat[2], mat[3], 0.000001)) { return splashErrSingularMatrix; } - // compute scale, shear, rotation, translation parameters - rot = splashAbs(mat[1]) > splashAbs(mat[0]); - if (rot) { - xScale = -mat[1]; - yScale = mat[2] - (mat[0] * mat[3]) / mat[1]; - xShear = -mat[3] / yScale; - yShear = -mat[0] / mat[1]; - } else { - xScale = mat[0]; - yScale = mat[3] - (mat[1] * mat[2]) / mat[0]; - xShear = mat[2] / yScale; - yShear = mat[1] / mat[0]; - } - // Note 1: The PDF spec says that all pixels whose *centers* lie - // within the region get painted -- but that doesn't seem to match - // up with what Acrobat actually does: it ends up leaving gaps - // between image stripes. So we use the same rule here as for - // fills: any pixel that overlaps the region gets painted. - // Note 2: The +/-0.01 in these computations is to avoid floating - // point precision problems which can lead to gaps between image - // stripes (it can cause image stripes to overlap, but that's a much - // less visible problem). - if (xScale >= 0) { - tx = splashFloor(mat[4] - 0.01); - tx2 = splashFloor(mat[4] + xScale + 0.01); - } else { - tx = splashFloor(mat[4] + 0.01); - tx2 = splashFloor(mat[4] + xScale - 0.01); - } - scaledWidth = abs(tx2 - tx) + 1; - if (yScale >= 0) { - ty = splashFloor(mat[5] - 0.01); - ty2 = splashFloor(mat[5] + yScale + 0.01); - } else { - ty = splashFloor(mat[5] + 0.01); - ty2 = splashFloor(mat[5] + yScale - 0.01); - } - scaledHeight = abs(ty2 - ty) + 1; - xSign = (xScale < 0) ? -1 : 1; - ySign = (yScale < 0) ? -1 : 1; - yShear1 = (SplashCoord)xSign * yShear; + minorAxisZero = mat[1] == 0 && mat[2] == 0; + + // scaling only + if (mat[0] > 0 && minorAxisZero && mat[3] > 0) { + x0 = imgCoordMungeLower(mat[4]); + y0 = imgCoordMungeLower(mat[5]); + x1 = imgCoordMungeUpper(mat[0] + mat[4]); + y1 = imgCoordMungeUpper(mat[3] + mat[5]); + // make sure narrow images cover at least one pixel + if (x0 == x1) { + ++x1; + } + if (y0 == y1) { + ++y1; + } + clipRes = state->clip->testRect(x0, y0, x1 - 1, y1 - 1); + opClipRes = clipRes; + if (clipRes != splashClipAllOutside) { + scaledWidth = x1 - x0; + scaledHeight = y1 - y0; + yp = h / scaledHeight; + if (yp < 0 || yp > INT_MAX - 1) { + return splashErrBadArg; + } + scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h, + scaledWidth, scaledHeight); + if (scaledImg == NULL) { + return splashErrBadArg; + } + blitImage(scaledImg, srcAlpha, x0, y0, clipRes); + delete scaledImg; + } + + // scaling plus vertical flip + } else if (mat[0] > 0 && minorAxisZero && mat[3] < 0) { + x0 = imgCoordMungeLower(mat[4]); + y0 = imgCoordMungeLower(mat[3] + mat[5]); + x1 = imgCoordMungeUpper(mat[0] + mat[4]); + y1 = imgCoordMungeUpper(mat[5]); + if (x0 == x1) { + if (mat[4] + mat[0] * 0.5 < x0) { + --x0; + } else { + ++x1; + } + } + if (y0 == y1) { + if (mat[5] + mat[1] * 0.5 < y0) { + --y0; + } else { + ++y1; + } + } + clipRes = state->clip->testRect(x0, y0, x1 - 1, y1 - 1); + opClipRes = clipRes; + if (clipRes != splashClipAllOutside) { + scaledWidth = x1 - x0; + scaledHeight = y1 - y0; + yp = h / scaledHeight; + if (yp < 0 || yp > INT_MAX - 1) { + return splashErrBadArg; + } + scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, w, h, + scaledWidth, scaledHeight); + if (scaledImg == NULL) { + return splashErrBadArg; + } + vertFlipImage(scaledImg, scaledWidth, scaledHeight, nComps); + blitImage(scaledImg, srcAlpha, x0, y0, clipRes); + delete scaledImg; + } + + // all other cases + } else { + return arbitraryTransformImage(src, srcData, srcMode, nComps, srcAlpha, + w, h, mat, tilingPattern); + } + + return splashOk; +} + +SplashError Splash::arbitraryTransformImage(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, + int srcWidth, int srcHeight, + SplashCoord *mat, + GBool tilingPattern) { + SplashBitmap *scaledImg; + SplashClipResult clipRes, clipRes2; + SplashPipe pipe; + SplashColor pixel; + int scaledWidth, scaledHeight, t0, t1, th; + SplashCoord r00, r01, r10, r11, det, ir00, ir01, ir10, ir11; + SplashCoord vx[4], vy[4]; + int xMin, yMin, xMax, yMax; + ImageSection section[3]; + int nSections; + int y, xa, xb, x, i, xx, yy, yp; + + // compute the four vertices of the target quadrilateral + vx[0] = mat[4]; vy[0] = mat[5]; + vx[1] = mat[2] + mat[4]; vy[1] = mat[3] + mat[5]; + vx[2] = mat[0] + mat[2] + mat[4]; vy[2] = mat[1] + mat[3] + mat[5]; + vx[3] = mat[0] + mat[4]; vy[3] = mat[1] + mat[5]; // clipping - ulx1 = 0; - uly1 = 0; - urx1 = xSign * (scaledWidth - 1); - ury1 = (int)(yShear * urx1); - llx1 = splashRound(xShear * ySign * (scaledHeight - 1)); - lly1 = ySign * (scaledHeight - 1) + (int)(yShear * llx1); - lrx1 = xSign * (scaledWidth - 1) + - splashRound(xShear * ySign * (scaledHeight - 1)); - lry1 = ySign * (scaledHeight - 1) + (int)(yShear * lrx1); - if (rot) { - ulx = tx + uly1; uly = ty - ulx1; - urx = tx + ury1; ury = ty - urx1; - llx = tx + lly1; lly = ty - llx1; - lrx = tx + lry1; lry = ty - lrx1; - } else { - ulx = tx + ulx1; uly = ty + uly1; - urx = tx + urx1; ury = ty + ury1; - llx = tx + llx1; lly = ty + lly1; - lrx = tx + lrx1; lry = ty + lry1; - } - xMin = (ulx < urx) ? (ulx < llx) ? (ulx < lrx) ? ulx : lrx - : (llx < lrx) ? llx : lrx - : (urx < llx) ? (urx < lrx) ? urx : lrx - : (llx < lrx) ? llx : lrx; - xMax = (ulx > urx) ? (ulx > llx) ? (ulx > lrx) ? ulx : lrx - : (llx > lrx) ? llx : lrx - : (urx > llx) ? (urx > lrx) ? urx : lrx - : (llx > lrx) ? llx : lrx; - yMin = (uly < ury) ? (uly < lly) ? (uly < lry) ? uly : lry - : (lly < lry) ? lly : lry - : (ury < lly) ? (ury < lry) ? ury : lry - : (lly < lry) ? lly : lry; - yMax = (uly > ury) ? (uly > lly) ? (uly > lry) ? uly : lry - : (lly > lry) ? lly : lry - : (ury > lly) ? (ury > lry) ? ury : lry - : (lly > lry) ? lly : lry; - clipRes = state->clip->testRect(xMin, yMin, xMax, yMax); + xMin = imgCoordMungeLower(vx[0]); + xMax = imgCoordMungeUpper(vx[0]); + yMin = imgCoordMungeLower(vy[0]); + yMax = imgCoordMungeUpper(vy[0]); + for (i = 1; i < 4; ++i) { + t0 = imgCoordMungeLower(vx[i]); + if (t0 < xMin) { + xMin = t0; + } + t0 = imgCoordMungeUpper(vx[i]); + if (t0 > xMax) { + xMax = t0; + } + t1 = imgCoordMungeLower(vy[i]); + if (t1 < yMin) { + yMin = t1; + } + t1 = imgCoordMungeUpper(vy[i]); + if (t1 > yMax) { + yMax = t1; + } + } + clipRes = state->clip->testRect(xMin, yMin, xMax - 1, yMax - 1); opClipRes = clipRes; if (clipRes == splashClipAllOutside) { return splashOk; } - // compute Bresenham parameters for x and y scaling - yp = h / scaledHeight; - yq = h % scaledHeight; - xp = w / scaledWidth; - xq = w % scaledWidth; + // compute the scale factors + if (splashAbs(mat[0]) >= splashAbs(mat[1])) { + scaledWidth = xMax - xMin; + scaledHeight = yMax - yMin; + } else { + scaledWidth = yMax - yMin; + scaledHeight = xMax - xMin; + } + if (scaledHeight <= 1 || scaledHeight <= 1 || tilingPattern) { + if (mat[0] >= 0) { + t0 = imgCoordMungeUpper(mat[0] + mat[4]) - imgCoordMungeLower(mat[4]); + } else { + t0 = imgCoordMungeUpper(mat[4]) - imgCoordMungeLower(mat[0] + mat[4]); + } + if (mat[1] >= 0) { + t1 = imgCoordMungeUpper(mat[1] + mat[5]) - imgCoordMungeLower(mat[5]); + } else { + t1 = imgCoordMungeUpper(mat[5]) - imgCoordMungeLower(mat[1] + mat[5]); + } + scaledWidth = t0 > t1 ? t0 : t1; + if (mat[2] >= 0) { + t0 = imgCoordMungeUpper(mat[2] + mat[4]) - imgCoordMungeLower(mat[4]); + if (splashAbs(mat[1]) >= 1) { + th = imgCoordMungeUpper(mat[2]) - imgCoordMungeLower(mat[0] * mat[3] / mat[1]); + if (th > t0) t0 = th; + } + } else { + t0 = imgCoordMungeUpper(mat[4]) - imgCoordMungeLower(mat[2] + mat[4]); + if (splashAbs(mat[1]) >= 1) { + th = imgCoordMungeUpper(mat[0] * mat[3] / mat[1]) - imgCoordMungeLower(mat[2]); + if (th > t0) t0 = th; + } + } + if (mat[3] >= 0) { + t1 = imgCoordMungeUpper(mat[3] + mat[5]) - imgCoordMungeLower(mat[5]); + if (splashAbs(mat[0]) >= 1) { + th = imgCoordMungeUpper(mat[3]) - imgCoordMungeLower(mat[1] * mat[2] / mat[0]); + if (th > t1) t1 = th; + } + } else { + t1 = imgCoordMungeUpper(mat[5]) - imgCoordMungeLower(mat[3] + mat[5]); + if (splashAbs(mat[0]) >= 1) { + th = imgCoordMungeUpper(mat[1] * mat[2] / mat[0]) - imgCoordMungeLower(mat[3]); + if (th > t1) t1 = th; + } + } + scaledHeight = t0 > t1 ? t0 : t1; + } + if (scaledWidth == 0) { + scaledWidth = 1; + } + if (scaledHeight == 0) { + scaledHeight = 1; + } + + // compute the inverse transform (after scaling) matrix + r00 = mat[0] / scaledWidth; + r01 = mat[1] / scaledWidth; + r10 = mat[2] / scaledHeight; + r11 = mat[3] / scaledHeight; + det = r00 * r11 - r01 * r10; + if (splashAbs(det) < 1e-6) { + // this should be caught by the singular matrix check in drawImage + return splashErrBadArg; + } + ir00 = r11 / det; + ir01 = -r01 / det; + ir10 = -r10 / det; + ir11 = r00 / det; - // allocate pixel buffers + // scale the input image + yp = srcHeight / scaledHeight; if (yp < 0 || yp > INT_MAX - 1) { return splashErrBadArg; } - colorBuf = (SplashColorPtr)gmallocn3((yp + 1), w, nComps); - if (srcAlpha) { - alphaBuf = (Guchar *)gmallocn((yp + 1), w); - } else { - alphaBuf = NULL; + scaledImg = scaleImage(src, srcData, srcMode, nComps, srcAlpha, + srcWidth, srcHeight, scaledWidth, scaledHeight); + + if (scaledImg == NULL) { + return splashErrBadArg; } - pixAcc0 = pixAcc1 = pixAcc2 = 0; // make gcc happy -#if SPLASH_CMYK - pixAcc3 = 0; // make gcc happy -#endif + // construct the three sections + i = 0; + if (vy[1] < vy[i]) { + i = 1; + } + if (vy[2] < vy[i]) { + i = 2; + } + if (vy[3] < vy[i]) { + i = 3; + } + // NB: if using fixed point, 0.000001 will be truncated to zero, + // so these two comparisons must be <=, not < + if (splashAbs(vy[i] - vy[(i-1) & 3]) <= 0.000001 && + vy[(i-1) & 3] < vy[(i+1) & 3]) { + i = (i-1) & 3; + } + if (splashAbs(vy[i] - vy[(i+1) & 3]) <= 0.000001) { + section[0].y0 = imgCoordMungeLower(vy[i]); + section[0].y1 = imgCoordMungeUpper(vy[(i+2) & 3]) - 1; + if (vx[i] < vx[(i+1) & 3]) { + section[0].ia0 = i; + section[0].ia1 = (i+3) & 3; + section[0].ib0 = (i+1) & 3; + section[0].ib1 = (i+2) & 3; + } else { + section[0].ia0 = (i+1) & 3; + section[0].ia1 = (i+2) & 3; + section[0].ib0 = i; + section[0].ib1 = (i+3) & 3; + } + nSections = 1; + } else { + section[0].y0 = imgCoordMungeLower(vy[i]); + section[2].y1 = imgCoordMungeUpper(vy[(i+2) & 3]) - 1; + section[0].ia0 = section[0].ib0 = i; + section[2].ia1 = section[2].ib1 = (i+2) & 3; + if (vx[(i+1) & 3] < vx[(i+3) & 3]) { + section[0].ia1 = section[2].ia0 = (i+1) & 3; + section[0].ib1 = section[2].ib0 = (i+3) & 3; + } else { + section[0].ia1 = section[2].ia0 = (i+3) & 3; + section[0].ib1 = section[2].ib0 = (i+1) & 3; + } + if (vy[(i+1) & 3] < vy[(i+3) & 3]) { + section[1].y0 = imgCoordMungeLower(vy[(i+1) & 3]); + section[2].y0 = imgCoordMungeUpper(vy[(i+3) & 3]); + if (vx[(i+1) & 3] < vx[(i+3) & 3]) { + section[1].ia0 = (i+1) & 3; + section[1].ia1 = (i+2) & 3; + section[1].ib0 = i; + section[1].ib1 = (i+3) & 3; + } else { + section[1].ia0 = i; + section[1].ia1 = (i+3) & 3; + section[1].ib0 = (i+1) & 3; + section[1].ib1 = (i+2) & 3; + } + } else { + section[1].y0 = imgCoordMungeLower(vy[(i+3) & 3]); + section[2].y0 = imgCoordMungeUpper(vy[(i+1) & 3]); + if (vx[(i+1) & 3] < vx[(i+3) & 3]) { + section[1].ia0 = i; + section[1].ia1 = (i+1) & 3; + section[1].ib0 = (i+3) & 3; + section[1].ib1 = (i+2) & 3; + } else { + section[1].ia0 = (i+3) & 3; + section[1].ia1 = (i+2) & 3; + section[1].ib0 = i; + section[1].ib1 = (i+1) & 3; + } + } + section[0].y1 = section[1].y0 - 1; + section[1].y1 = section[2].y0 - 1; + nSections = 3; + } + for (i = 0; i < nSections; ++i) { + section[i].xa0 = vx[section[i].ia0]; + section[i].ya0 = vy[section[i].ia0]; + section[i].xa1 = vx[section[i].ia1]; + section[i].ya1 = vy[section[i].ia1]; + section[i].xb0 = vx[section[i].ib0]; + section[i].yb0 = vy[section[i].ib0]; + section[i].xb1 = vx[section[i].ib1]; + section[i].yb1 = vy[section[i].ib1]; + section[i].dxdya = (section[i].xa1 - section[i].xa0) / + (section[i].ya1 - section[i].ya0); + section[i].dxdyb = (section[i].xb1 - section[i].xb0) / + (section[i].yb1 - section[i].yb0); + } // initialize the pixel pipe - pipeInit(&pipe, 0, 0, NULL, pix, state->fillAlpha, + pipeInit(&pipe, 0, 0, NULL, pixel, + (Guchar)splashRound(state->fillAlpha * 255), srcAlpha || (vectorAntialias && clipRes != splashClipAllInside), - gFalse, opImagePattern); + gFalse); if (vectorAntialias) { drawAAPixelInit(); } - if (srcAlpha) { - - // init y scale Bresenham - yt = 0; - lastYStep = 1; - - for (y = 0; y < scaledHeight; ++y) { + // make sure narrow images cover at least one pixel + if (nSections == 1) { + if (section[0].y0 == section[0].y1) { + ++section[0].y1; + clipRes = opClipRes = splashClipPartial; + } + } else { + if (section[0].y0 == section[2].y1) { + ++section[1].y1; + clipRes = opClipRes = splashClipPartial; + } + } - // y scale Bresenham - yStep = yp; - yt += yq; - if (yt >= scaledHeight) { - yt -= scaledHeight; - ++yStep; - } - - // read row(s) from image - n = (yp > 0) ? yStep : lastYStep; - if (n > 0) { - p = colorBuf; - q = alphaBuf; - for (i = 0; i < n; ++i) { - (*src)(srcData, p, q); - p += w * nComps; - q += w; - } - } - lastYStep = yStep; - - // loop-invariant constants - k1 = splashRound(xShear * ySign * y); - - // clipping test - if (clipRes != splashClipAllInside && - !rot && - (int)(yShear * k1) == - (int)(yShear * (xSign * (scaledWidth - 1) + k1))) { - if (xSign > 0) { - spanXMin = tx + k1; - spanXMax = spanXMin + (scaledWidth - 1); + // scan all pixels inside the target region + for (i = 0; i < nSections; ++i) { + for (y = section[i].y0; y <= section[i].y1; ++y) { + xa = imgCoordMungeLower(section[i].xa0 + + ((SplashCoord)y + 0.5 - section[i].ya0) * + section[i].dxdya); + xb = imgCoordMungeUpper(section[i].xb0 + + ((SplashCoord)y + 0.5 - section[i].yb0) * + section[i].dxdyb); + // make sure narrow images cover at least one pixel + if (xa == xb) { + ++xb; + } + if (clipRes != splashClipAllInside) { + clipRes2 = state->clip->testSpan(xa, xb - 1, y); + } else { + clipRes2 = clipRes; + } + for (x = xa; x < xb; ++x) { + // map (x+0.5, y+0.5) back to the scaled image + xx = splashFloor(((SplashCoord)x + 0.5 - mat[4]) * ir00 + + ((SplashCoord)y + 0.5 - mat[5]) * ir10); + yy = splashFloor(((SplashCoord)x + 0.5 - mat[4]) * ir01 + + ((SplashCoord)y + 0.5 - mat[5]) * ir11); + // xx should always be within bounds, but floating point + // inaccuracy can cause problems + if (xx < 0) { + xx = 0; + } else if (xx >= scaledWidth) { + xx = scaledWidth - 1; + } + if (yy < 0) { + yy = 0; + } else if (yy >= scaledHeight) { + yy = scaledHeight - 1; + } + scaledImg->getPixel(xx, yy, pixel); + if (srcAlpha) { + pipe.shape = scaledImg->alpha[yy * scaledWidth + xx]; } else { - spanXMax = tx + k1; - spanXMin = spanXMax - (scaledWidth - 1); + pipe.shape = 255; } - spanY = ty + ySign * y + (int)(yShear * k1); - clipRes2 = state->clip->testSpan(spanXMin, spanXMax, spanY); - if (clipRes2 == splashClipAllOutside) { - continue; + if (vectorAntialias && clipRes2 != splashClipAllInside) { + drawAAPixel(&pipe, x, y); + } else { + drawPixel(&pipe, x, y, clipRes2 == splashClipAllInside); } - } else { - clipRes2 = clipRes; } + } + } - // init x scale Bresenham - xt = 0; - xSrc = 0; - - // x shear - x1 = k1; - - // y shear - y1 = (SplashCoord)ySign * y + yShear * x1; - // this is a kludge: if yShear1 is negative, then (int)y1 would - // change immediately after the first pixel, which is not what - // we want - if (yShear1 < 0) { - y1 += 0.999; + delete scaledImg; + return splashOk; +} + +// Scale an image into a SplashBitmap. +SplashBitmap *Splash::scaleImage(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight) { + SplashBitmap *dest; + + dest = new SplashBitmap(scaledWidth, scaledHeight, 1, srcMode, srcAlpha); + if (dest->getDataPtr() != NULL) { + if (scaledHeight < srcHeight) { + if (scaledWidth < srcWidth) { + scaleImageYdXd(src, srcData, srcMode, nComps, srcAlpha, + srcWidth, srcHeight, scaledWidth, scaledHeight, dest); + } else { + scaleImageYdXu(src, srcData, srcMode, nComps, srcAlpha, + srcWidth, srcHeight, scaledWidth, scaledHeight, dest); } + } else { + if (scaledWidth < srcWidth) { + scaleImageYuXd(src, srcData, srcMode, nComps, srcAlpha, + srcWidth, srcHeight, scaledWidth, scaledHeight, dest); + } else { + scaleImageYuXu(src, srcData, srcMode, nComps, srcAlpha, + srcWidth, srcHeight, scaledWidth, scaledHeight, dest); + } + } + } else { + delete dest; + dest = NULL; + } + return dest; +} - // loop-invariant constants - n = yStep > 0 ? yStep : 1; +void Splash::scaleImageYdXd(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf, *alphaLineBuf; + Guint *pixBuf, *alphaPixBuf; + Guint pix0, pix1, pix2; +#if SPLASH_CMYK + Guint pix3; +#endif + Guint alpha; + Guchar *destPtr, *destAlphaPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx, xxa, d, d0, d1; + int i, j; + + // Bresenham parameters for y scale + yp = srcHeight / scaledHeight; + yq = srcHeight % scaledHeight; + + // Bresenham parameters for x scale + xp = srcWidth / scaledWidth; + xq = srcWidth % scaledWidth; + + // allocate buffers + lineBuf = (Guchar *)gmallocn(srcWidth, nComps); + pixBuf = (Guint *)gmallocn(srcWidth, nComps * sizeof(int)); + if (srcAlpha) { + alphaLineBuf = (Guchar *)gmalloc(srcWidth); + alphaPixBuf = (Guint *)gmallocn(srcWidth, sizeof(int)); + } else { + alphaLineBuf = NULL; + alphaPixBuf = NULL; + } - switch (srcMode) { + // init y scale Bresenham + yt = 0; - case splashModeMono1: - case splashModeMono8: - for (x = 0; x < scaledWidth; ++x) { + destPtr = dest->data; + destAlphaPtr = dest->alpha; + for (y = 0; y < scaledHeight; ++y) { - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } + // y scale Bresenham + if ((yt += yq) >= scaledHeight) { + yt -= scaledHeight; + yStep = yp + 1; + } else { + yStep = yp; + } - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; - } + // read rows from image + memset(pixBuf, 0, srcWidth * nComps * sizeof(int)); + if (srcAlpha) { + memset(alphaPixBuf, 0, srcWidth * sizeof(int)); + } + for (i = 0; i < yStep; ++i) { + (*src)(srcData, lineBuf, alphaLineBuf); + for (j = 0; j < srcWidth * nComps; ++j) { + pixBuf[j] += lineBuf[j]; + } + if (srcAlpha) { + for (j = 0; j < srcWidth; ++j) { + alphaPixBuf[j] += alphaLineBuf[j]; + } + } + } - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - alphaAcc = 0; - p = colorBuf + xSrc; - q = alphaBuf + xSrc; - pixAcc0 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - alphaAcc += *q++; - } - p += w - m; - q += w - m; - } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); - alphaMul = pixMul * (1.0 / 255.0); - alpha = (SplashCoord)alphaAcc * alphaMul; + // init x scale Bresenham + xt = 0; + d0 = (1 << 23) / (yStep * xp); + d1 = (1 << 23) / (yStep * (xp + 1)); - if (alpha > 0) { - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); + xx = xxa = 0; + for (x = 0; x < scaledWidth; ++x) { - // set pixel - pipe.shape = alpha; - if (vectorAntialias && clipRes != splashClipAllInside) { - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); - } - } + // x scale Bresenham + if ((xt += xq) >= scaledWidth) { + xt -= scaledWidth; + xStep = xp + 1; + d = d1; + } else { + xStep = xp; + d = d0; + } - // x scale Bresenham - xSrc += xStep; + switch (srcMode) { - // x shear - x1 += xSign; + case splashModeMono8: - // y shear - y1 += yShear1; + // compute the final pixel + pix0 = 0; + for (i = 0; i < xStep; ++i) { + pix0 += pixBuf[xx++]; } + // pix / xStep * yStep + pix0 = (pix0 * d) >> 23; + + // store the pixel + *destPtr++ = (Guchar)pix0; break; case splashModeRGB8: + + // compute the final pixel + pix0 = pix1 = pix2 = 0; + for (i = 0; i < xStep; ++i) { + pix0 += pixBuf[xx]; + pix1 += pixBuf[xx+1]; + pix2 += pixBuf[xx+2]; + xx += 3; + } + // pix / xStep * yStep + pix0 = (pix0 * d) >> 23; + pix1 = (pix1 * d) >> 23; + pix2 = (pix2 * d) >> 23; + + // store the pixel + *destPtr++ = (Guchar)pix0; + *destPtr++ = (Guchar)pix1; + *destPtr++ = (Guchar)pix2; + break; + + case splashModeXBGR8: + + // compute the final pixel + pix0 = pix1 = pix2 = 0; + for (i = 0; i < xStep; ++i) { + pix0 += pixBuf[xx]; + pix1 += pixBuf[xx+1]; + pix2 += pixBuf[xx+2]; + xx += 4; + } + // pix / xStep * yStep + pix0 = (pix0 * d) >> 23; + pix1 = (pix1 * d) >> 23; + pix2 = (pix2 * d) >> 23; + + // store the pixel + *destPtr++ = (Guchar)pix2; + *destPtr++ = (Guchar)pix1; + *destPtr++ = (Guchar)pix0; + *destPtr++ = (Guchar)255; + break; + case splashModeBGR8: - for (x = 0; x < scaledWidth; ++x) { - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } + // compute the final pixel + pix0 = pix1 = pix2 = 0; + for (i = 0; i < xStep; ++i) { + pix0 += pixBuf[xx]; + pix1 += pixBuf[xx+1]; + pix2 += pixBuf[xx+2]; + xx += 3; + } + // pix / xStep * yStep + pix0 = (pix0 * d) >> 23; + pix1 = (pix1 * d) >> 23; + pix2 = (pix2 * d) >> 23; + + // store the pixel + *destPtr++ = (Guchar)pix2; + *destPtr++ = (Guchar)pix1; + *destPtr++ = (Guchar)pix0; + break; - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; - } +#if SPLASH_CMYK + case splashModeCMYK8: - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - alphaAcc = 0; - p = colorBuf + xSrc * 3; - q = alphaBuf + xSrc; - pixAcc0 = pixAcc1 = pixAcc2 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - pixAcc1 += *p++; - pixAcc2 += *p++; - alphaAcc += *q++; - } - p += 3 * (w - m); - q += w - m; - } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); - alphaMul = pixMul * (1.0 / 255.0); - alpha = (SplashCoord)alphaAcc * alphaMul; - - if (alpha > 0) { - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - pix[1] = (int)((SplashCoord)pixAcc1 * pixMul); - pix[2] = (int)((SplashCoord)pixAcc2 * pixMul); + // compute the final pixel + pix0 = pix1 = pix2 = pix3 = 0; + for (i = 0; i < xStep; ++i) { + pix0 += pixBuf[xx]; + pix1 += pixBuf[xx+1]; + pix2 += pixBuf[xx+2]; + pix3 += pixBuf[xx+3]; + xx += 4; + } + // pix / xStep * yStep + pix0 = (pix0 * d) >> 23; + pix1 = (pix1 * d) >> 23; + pix2 = (pix2 * d) >> 23; + pix3 = (pix3 * d) >> 23; + + // store the pixel + *destPtr++ = (Guchar)pix0; + *destPtr++ = (Guchar)pix1; + *destPtr++ = (Guchar)pix2; + *destPtr++ = (Guchar)pix3; + break; +#endif - // set pixel - pipe.shape = alpha; - if (vectorAntialias && clipRes != splashClipAllInside) { - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); - } - } - // x scale Bresenham - xSrc += xStep; + case splashModeMono1: // mono1 is not allowed + default: + break; + } + + // process alpha + if (srcAlpha) { + alpha = 0; + for (i = 0; i < xStep; ++i, ++xxa) { + alpha += alphaPixBuf[xxa]; + } + // alpha / xStep * yStep + alpha = (alpha * d) >> 23; + *destAlphaPtr++ = (Guchar)alpha; + } + } + } + + gfree(alphaPixBuf); + gfree(alphaLineBuf); + gfree(pixBuf); + gfree(lineBuf); +} + +void Splash::scaleImageYdXu(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf, *alphaLineBuf; + Guint *pixBuf, *alphaPixBuf; + Guint pix[splashMaxColorComps]; + Guint alpha; + Guchar *destPtr, *destAlphaPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, d; + int i, j; + + // Bresenham parameters for y scale + yp = srcHeight / scaledHeight; + yq = srcHeight % scaledHeight; + + // Bresenham parameters for x scale + xp = scaledWidth / srcWidth; + xq = scaledWidth % srcWidth; + + // allocate buffers + lineBuf = (Guchar *)gmallocn(srcWidth, nComps); + pixBuf = (Guint *)gmallocn(srcWidth, nComps * sizeof(int)); + if (srcAlpha) { + alphaLineBuf = (Guchar *)gmalloc(srcWidth); + alphaPixBuf = (Guint *)gmallocn(srcWidth, sizeof(int)); + } else { + alphaLineBuf = NULL; + alphaPixBuf = NULL; + } - // x shear - x1 += xSign; + // init y scale Bresenham + yt = 0; - // y shear - y1 += yShear1; + destPtr = dest->data; + destAlphaPtr = dest->alpha; + for (y = 0; y < scaledHeight; ++y) { + + // y scale Bresenham + if ((yt += yq) >= scaledHeight) { + yt -= scaledHeight; + yStep = yp + 1; + } else { + yStep = yp; + } + + // read rows from image + memset(pixBuf, 0, srcWidth * nComps * sizeof(int)); + if (srcAlpha) { + memset(alphaPixBuf, 0, srcWidth * sizeof(int)); + } + for (i = 0; i < yStep; ++i) { + (*src)(srcData, lineBuf, alphaLineBuf); + for (j = 0; j < srcWidth * nComps; ++j) { + pixBuf[j] += lineBuf[j]; + } + if (srcAlpha) { + for (j = 0; j < srcWidth; ++j) { + alphaPixBuf[j] += alphaLineBuf[j]; } - break; + } + } + // init x scale Bresenham + xt = 0; + d = (1 << 23) / yStep; + + for (x = 0; x < srcWidth; ++x) { + + // x scale Bresenham + if ((xt += xq) >= srcWidth) { + xt -= srcWidth; + xStep = xp + 1; + } else { + xStep = xp; + } + + // compute the final pixel + for (i = 0; i < nComps; ++i) { + // pixBuf[] / yStep + pix[i] = (pixBuf[x * nComps + i] * d) >> 23; + } + + // store the pixel + switch (srcMode) { + case splashModeMono1: // mono1 is not allowed + break; + case splashModeMono8: + for (i = 0; i < xStep; ++i) { + *destPtr++ = (Guchar)pix[0]; + } + break; + case splashModeRGB8: + for (i = 0; i < xStep; ++i) { + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[2]; + } + break; case splashModeXBGR8: - for (x = 0; x < scaledWidth; ++x) { - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } + for (i = 0; i < xStep; ++i) { + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)255; + } + break; + case splashModeBGR8: + for (i = 0; i < xStep; ++i) { + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[0]; + } + break; +#if SPLASH_CMYK + case splashModeCMYK8: + for (i = 0; i < xStep; ++i) { + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[3]; + } + break; +#endif + } - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; - } + // process alpha + if (srcAlpha) { + // alphaPixBuf[] / yStep + alpha = (alphaPixBuf[x] * d) >> 23; + for (i = 0; i < xStep; ++i) { + *destAlphaPtr++ = (Guchar)alpha; + } + } + } + } - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - alphaAcc = 0; - p = colorBuf + xSrc * 4; - q = alphaBuf + xSrc; - pixAcc0 = pixAcc1 = pixAcc2 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - pixAcc1 += *p++; - pixAcc2 += *p++; - p++; - alphaAcc += *q++; - } - p += 4 * (w - m); - q += w - m; - } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); - alphaMul = pixMul * (1.0 / 255.0); - alpha = (SplashCoord)alphaAcc * alphaMul; - - if (alpha > 0) { - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - pix[1] = (int)((SplashCoord)pixAcc1 * pixMul); - pix[2] = (int)((SplashCoord)pixAcc2 * pixMul); - pix[3] = 255; + gfree(alphaPixBuf); + gfree(alphaLineBuf); + gfree(pixBuf); + gfree(lineBuf); +} + +void Splash::scaleImageYuXd(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf, *alphaLineBuf; + Guint pix[splashMaxColorComps]; + Guint alpha; + Guchar *destPtr0, *destPtr, *destAlphaPtr0, *destAlphaPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx, xxa, d, d0, d1; + int i, j; + + // Bresenham parameters for y scale + yp = scaledHeight / srcHeight; + yq = scaledHeight % srcHeight; + + // Bresenham parameters for x scale + xp = srcWidth / scaledWidth; + xq = srcWidth % scaledWidth; + + // allocate buffers + lineBuf = (Guchar *)gmallocn(srcWidth, nComps); + if (srcAlpha) { + alphaLineBuf = (Guchar *)gmalloc(srcWidth); + } else { + alphaLineBuf = NULL; + } + + // init y scale Bresenham + yt = 0; + + destPtr0 = dest->data; + destAlphaPtr0 = dest->alpha; + for (y = 0; y < srcHeight; ++y) { + + // y scale Bresenham + if ((yt += yq) >= srcHeight) { + yt -= srcHeight; + yStep = yp + 1; + } else { + yStep = yp; + } + + // read row from image + (*src)(srcData, lineBuf, alphaLineBuf); - // set pixel - pipe.shape = alpha; - if (vectorAntialias && clipRes != splashClipAllInside) { - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); - } - } + // init x scale Bresenham + xt = 0; + d0 = (1 << 23) / xp; + d1 = (1 << 23) / (xp + 1); - // x scale Bresenham - xSrc += xStep; + xx = xxa = 0; + for (x = 0; x < scaledWidth; ++x) { - // x shear - x1 += xSign; + // x scale Bresenham + if ((xt += xq) >= scaledWidth) { + xt -= scaledWidth; + xStep = xp + 1; + d = d1; + } else { + xStep = xp; + d = d0; + } - // y shear - y1 += yShear1; + // compute the final pixel + for (i = 0; i < nComps; ++i) { + pix[i] = 0; + } + for (i = 0; i < xStep; ++i) { + for (j = 0; j < nComps; ++j, ++xx) { + pix[j] += lineBuf[xx]; } - break; - + } + for (i = 0; i < nComps; ++i) { + // pix[] / xStep + pix[i] = (pix[i] * d) >> 23; + } + // store the pixel + switch (srcMode) { + case splashModeMono1: // mono1 is not allowed + break; + case splashModeMono8: + for (i = 0; i < yStep; ++i) { + destPtr = destPtr0 + (i * scaledWidth + x) * nComps; + *destPtr++ = (Guchar)pix[0]; + } + break; + case splashModeRGB8: + for (i = 0; i < yStep; ++i) { + destPtr = destPtr0 + (i * scaledWidth + x) * nComps; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[2]; + } + break; + case splashModeXBGR8: + for (i = 0; i < yStep; ++i) { + destPtr = destPtr0 + (i * scaledWidth + x) * nComps; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)255; + } + break; + case splashModeBGR8: + for (i = 0; i < yStep; ++i) { + destPtr = destPtr0 + (i * scaledWidth + x) * nComps; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[0]; + } + break; #if SPLASH_CMYK case splashModeCMYK8: - for (x = 0; x < scaledWidth; ++x) { - - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } + for (i = 0; i < yStep; ++i) { + destPtr = destPtr0 + (i * scaledWidth + x) * nComps; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[3]; + } + break; +#endif + } - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; - } + // process alpha + if (srcAlpha) { + alpha = 0; + for (i = 0; i < xStep; ++i, ++xxa) { + alpha += alphaLineBuf[xxa]; + } + // alpha / xStep + alpha = (alpha * d) >> 23; + for (i = 0; i < yStep; ++i) { + destAlphaPtr = destAlphaPtr0 + i * scaledWidth + x; + *destAlphaPtr = (Guchar)alpha; + } + } + } - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - alphaAcc = 0; - p = colorBuf + xSrc * 4; - q = alphaBuf + xSrc; - pixAcc0 = pixAcc1 = pixAcc2 = pixAcc3 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - pixAcc1 += *p++; - pixAcc2 += *p++; - pixAcc3 += *p++; - alphaAcc += *q++; - } - p += 4 * (w - m); - q += w - m; - } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); - alphaMul = pixMul * (1.0 / 255.0); - alpha = (SplashCoord)alphaAcc * alphaMul; - - if (alpha > 0) { - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - pix[1] = (int)((SplashCoord)pixAcc1 * pixMul); - pix[2] = (int)((SplashCoord)pixAcc2 * pixMul); - pix[3] = (int)((SplashCoord)pixAcc3 * pixMul); + destPtr0 += yStep * scaledWidth * nComps; + if (srcAlpha) { + destAlphaPtr0 += yStep * scaledWidth; + } + } - // set pixel - pipe.shape = alpha; - if (vectorAntialias && clipRes != splashClipAllInside) { - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); - } - } + gfree(alphaLineBuf); + gfree(lineBuf); +} - // x scale Bresenham - xSrc += xStep; +void Splash::scaleImageYuXu(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest) { + Guchar *lineBuf, *alphaLineBuf; + Guint pix[splashMaxColorComps]; + Guint alpha; + Guchar *destPtr0, *destPtr, *destAlphaPtr0, *destAlphaPtr; + int yp, yq, xp, xq, yt, y, yStep, xt, x, xStep, xx; + int i, j; - // x shear - x1 += xSign; + // Bresenham parameters for y scale + yp = scaledHeight / srcHeight; + yq = scaledHeight % srcHeight; - // y shear - y1 += yShear1; - } - break; -#endif // SPLASH_CMYK - } - } + // Bresenham parameters for x scale + xp = scaledWidth / srcWidth; + xq = scaledWidth % srcWidth; + // allocate buffers + lineBuf = (Guchar *)gmallocn(srcWidth, nComps); + if (srcAlpha) { + alphaLineBuf = (Guchar *)gmalloc(srcWidth); } else { + alphaLineBuf = NULL; + } - // init y scale Bresenham - yt = 0; - lastYStep = 1; + // init y scale Bresenham + yt = 0; - for (y = 0; y < scaledHeight; ++y) { + destPtr0 = dest->data; + destAlphaPtr0 = dest->alpha; + for (y = 0; y < srcHeight; ++y) { - // y scale Bresenham + // y scale Bresenham + if ((yt += yq) >= srcHeight) { + yt -= srcHeight; + yStep = yp + 1; + } else { yStep = yp; - yt += yq; - if (yt >= scaledHeight) { - yt -= scaledHeight; - ++yStep; - } - - // read row(s) from image - n = (yp > 0) ? yStep : lastYStep; - if (n > 0) { - p = colorBuf; - for (i = 0; i < n; ++i) { - (*src)(srcData, p, NULL); - p += w * nComps; - } - } - lastYStep = yStep; - - // loop-invariant constants - k1 = splashRound(xShear * ySign * y); - - // clipping test - if (clipRes != splashClipAllInside && - !rot && - (int)(yShear * k1) == - (int)(yShear * (xSign * (scaledWidth - 1) + k1))) { - if (xSign > 0) { - spanXMin = tx + k1; - spanXMax = spanXMin + (scaledWidth - 1); - } else { - spanXMax = tx + k1; - spanXMin = spanXMax - (scaledWidth - 1); - } - spanY = ty + ySign * y + (int)(yShear * k1); - clipRes2 = state->clip->testSpan(spanXMin, spanXMax, spanY); - if (clipRes2 == splashClipAllOutside) { - continue; - } + } + + // read row from image + (*src)(srcData, lineBuf, alphaLineBuf); + + // init x scale Bresenham + xt = 0; + + xx = 0; + for (x = 0; x < srcWidth; ++x) { + + // x scale Bresenham + if ((xt += xq) >= srcWidth) { + xt -= srcWidth; + xStep = xp + 1; } else { - clipRes2 = clipRes; + xStep = xp; } - // init x scale Bresenham - xt = 0; - xSrc = 0; - - // x shear - x1 = k1; - - // y shear - y1 = (SplashCoord)ySign * y + yShear * x1; - // this is a kludge: if yShear1 is negative, then (int)y1 would - // change immediately after the first pixel, which is not what - // we want - if (yShear1 < 0) { - y1 += 0.999; + // compute the final pixel + for (i = 0; i < nComps; ++i) { + pix[i] = lineBuf[x * nComps + i]; } - // loop-invariant constants - n = yStep > 0 ? yStep : 1; - + // store the pixel switch (srcMode) { - - case splashModeMono1: + case splashModeMono1: // mono1 is not allowed + break; case splashModeMono8: - for (x = 0; x < scaledWidth; ++x) { - - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } - - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destPtr = destPtr0 + (i * scaledWidth + xx + j) * nComps; + *destPtr++ = (Guchar)pix[0]; } - - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - p = colorBuf + xSrc; - pixAcc0 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - } - p += w - m; + } + break; + case splashModeRGB8: + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destPtr = destPtr0 + (i * scaledWidth + xx + j) * nComps; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[2]; } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); - - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - - // set pixel - if (vectorAntialias && clipRes != splashClipAllInside) { - pipe.shape = (SplashCoord)1; - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); + } + break; + case splashModeXBGR8: + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destPtr = destPtr0 + (i * scaledWidth + xx + j) * nComps; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)255; } - - // x scale Bresenham - xSrc += xStep; - - // x shear - x1 += xSign; - - // y shear - y1 += yShear1; } break; - - case splashModeRGB8: case splashModeBGR8: - for (x = 0; x < scaledWidth; ++x) { - - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } - - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destPtr = destPtr0 + (i * scaledWidth + xx + j) * nComps; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[0]; } - - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - p = colorBuf + xSrc * 3; - pixAcc0 = pixAcc1 = pixAcc2 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - pixAcc1 += *p++; - pixAcc2 += *p++; - } - p += 3 * (w - m); + } + break; +#if SPLASH_CMYK + case splashModeCMYK8: + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destPtr = destPtr0 + (i * scaledWidth + xx + j) * nComps; + *destPtr++ = (Guchar)pix[0]; + *destPtr++ = (Guchar)pix[1]; + *destPtr++ = (Guchar)pix[2]; + *destPtr++ = (Guchar)pix[3]; } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); + } + break; +#endif + } - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - pix[1] = (int)((SplashCoord)pixAcc1 * pixMul); - pix[2] = (int)((SplashCoord)pixAcc2 * pixMul); - - // set pixel - if (vectorAntialias && clipRes != splashClipAllInside) { - pipe.shape = (SplashCoord)1; - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); + // process alpha + if (srcAlpha) { + alpha = alphaLineBuf[x]; + for (i = 0; i < yStep; ++i) { + for (j = 0; j < xStep; ++j) { + destAlphaPtr = destAlphaPtr0 + i * scaledWidth + xx + j; + *destAlphaPtr = (Guchar)alpha; } - - // x scale Bresenham - xSrc += xStep; - - // x shear - x1 += xSign; - - // y shear - y1 += yShear1; } - break; + } - case splashModeXBGR8: - for (x = 0; x < scaledWidth; ++x) { + xx += xStep; + } - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } + destPtr0 += yStep * scaledWidth * nComps; + if (srcAlpha) { + destAlphaPtr0 += yStep * scaledWidth; + } + } - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; - } else { - x2 = x1; - y2 = (int)y1; - } + gfree(alphaLineBuf); + gfree(lineBuf); +} - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - p = colorBuf + xSrc * 4; - pixAcc0 = pixAcc1 = pixAcc2 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - pixAcc1 += *p++; - pixAcc2 += *p++; - p++; - } - p += 4 * (w - m); - } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); +void Splash::vertFlipImage(SplashBitmap *img, int width, int height, + int nComps) { + Guchar *lineBuf; + Guchar *p0, *p1; + int w; - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - pix[1] = (int)((SplashCoord)pixAcc1 * pixMul); - pix[2] = (int)((SplashCoord)pixAcc2 * pixMul); - pix[3] = 255; - - // set pixel - if (vectorAntialias && clipRes != splashClipAllInside) { - pipe.shape = (SplashCoord)1; - drawAAPixel(&pipe, tx + x2, ty + y2); - } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); - } + w = width * nComps; + lineBuf = (Guchar *)gmalloc(w); + for (p0 = img->data, p1 = img->data + (height - 1) * w; + p0 < p1; + p0 += w, p1 -= w) { + memcpy(lineBuf, p0, w); + memcpy(p0, p1, w); + memcpy(p1, lineBuf, w); + } + if (img->alpha) { + for (p0 = img->alpha, p1 = img->alpha + (height - 1) * width; + p0 < p1; + p0 += width, p1 -= width) { + memcpy(lineBuf, p0, width); + memcpy(p0, p1, width); + memcpy(p1, lineBuf, width); + } + } + gfree(lineBuf); +} - // x scale Bresenham - xSrc += xStep; +void Splash::blitImage(SplashBitmap *src, GBool srcAlpha, int xDest, int yDest, + SplashClipResult clipRes) { + SplashPipe pipe; + SplashColor pixel; + Guchar *ap; + int w, h, x0, y0, x1, y1, x, y; - // x shear - x1 += xSign; + // split the image into clipped and unclipped regions + w = src->getWidth(); + h = src->getHeight(); + if (clipRes == splashClipAllInside) { + x0 = 0; + y0 = 0; + x1 = w; + y1 = h; + } else { + if (state->clip->getNumPaths()) { + x0 = x1 = w; + y0 = y1 = h; + } else { + if ((x0 = splashCeil(state->clip->getXMin()) - xDest) < 0) { + x0 = 0; + } + if ((y0 = splashCeil(state->clip->getYMin()) - yDest) < 0) { + y0 = 0; + } + if ((x1 = splashFloor(state->clip->getXMax()) - xDest) > w) { + x1 = w; + } + if (x1 < x0) { + x1 = x0; + } + if ((y1 = splashFloor(state->clip->getYMax()) - yDest) > h) { + y1 = h; + } + if (y1 < y0) { + y1 = y0; + } + } + } - // y shear - y1 += yShear1; + // draw the unclipped region + if (x0 < w && y0 < h && x0 < x1 && y0 < y1) { + pipeInit(&pipe, xDest + x0, yDest + y0, NULL, pixel, + (Guchar)splashRound(state->fillAlpha * 255), srcAlpha, gFalse); + if (srcAlpha) { + for (y = y0; y < y1; ++y) { + pipeSetXY(&pipe, xDest + x0, yDest + y); + ap = src->getAlphaPtr() + y * w + x0; + for (x = x0; x < x1; ++x) { + src->getPixel(x, y, pixel); + pipe.shape = *ap++; + (this->*pipe.run)(&pipe); } - break; + } + } else { + for (y = y0; y < y1; ++y) { + pipeSetXY(&pipe, xDest + x0, yDest + y); + for (x = x0; x < x1; ++x) { + src->getPixel(x, y, pixel); + (this->*pipe.run)(&pipe); + } + } + } + updateModX(xDest + x0); + updateModX(xDest + x1 - 1); + updateModY(yDest + y0); + updateModY(yDest + y1 - 1); + } -#if SPLASH_CMYK - case splashModeCMYK8: - for (x = 0; x < scaledWidth; ++x) { + // draw the clipped regions + if (y0 > 0) { + blitImageClipped(src, srcAlpha, 0, 0, xDest, yDest, w, y0); + } + if (y1 < h) { + blitImageClipped(src, srcAlpha, 0, y1, xDest, yDest + y1, w, h - y1); + } + if (x0 > 0 && y0 < y1) { + blitImageClipped(src, srcAlpha, 0, y0, xDest, yDest + y0, x0, y1 - y0); + } + if (x1 < w && y0 < y1) { + blitImageClipped(src, srcAlpha, x1, y0, xDest + x1, yDest + y0, + w - x1, y1 - y0); + } +} - // x scale Bresenham - xStep = xp; - xt += xq; - if (xt >= scaledWidth) { - xt -= scaledWidth; - ++xStep; - } +void Splash::blitImageClipped(SplashBitmap *src, GBool srcAlpha, + int xSrc, int ySrc, int xDest, int yDest, + int w, int h) { + SplashPipe pipe; + SplashColor pixel; + Guchar *ap; + int x, y; - // rotation - if (rot) { - x2 = (int)y1; - y2 = -x1; + if (vectorAntialias) { + pipeInit(&pipe, xDest, yDest, NULL, pixel, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, gFalse); + drawAAPixelInit(); + if (srcAlpha) { + for (y = 0; y < h; ++y) { + ap = src->getAlphaPtr() + (ySrc + y) * src->getWidth() + xSrc; + for (x = 0; x < w; ++x) { + src->getPixel(xSrc + x, ySrc + y, pixel); + pipe.shape = *ap++; + drawAAPixel(&pipe, xDest + x, yDest + y); + } + } + } else { + for (y = 0; y < h; ++y) { + for (x = 0; x < w; ++x) { + src->getPixel(xSrc + x, ySrc + y, pixel); + pipe.shape = 255; + drawAAPixel(&pipe, xDest + x, yDest + y); + } + } + } + } else { + pipeInit(&pipe, xDest, yDest, NULL, pixel, + (Guchar)splashRound(state->fillAlpha * 255), srcAlpha, gFalse); + if (srcAlpha) { + for (y = 0; y < h; ++y) { + ap = src->getAlphaPtr() + (ySrc + y) * src->getWidth() + xSrc; + pipeSetXY(&pipe, xDest, yDest + y); + for (x = 0; x < w; ++x) { + if (state->clip->test(xDest + x, yDest + y)) { + src->getPixel(xSrc + x, ySrc + y, pixel); + pipe.shape = *ap++; + (this->*pipe.run)(&pipe); + updateModX(xDest + x); + updateModY(yDest + y); } else { - x2 = x1; - y2 = (int)y1; + pipeIncX(&pipe); + ++ap; } - - // compute the filtered pixel at (x,y) after the x and y scaling - // operations - m = xStep > 0 ? xStep : 1; - p = colorBuf + xSrc * 4; - pixAcc0 = pixAcc1 = pixAcc2 = pixAcc3 = 0; - for (i = 0; i < n; ++i) { - for (j = 0; j < m; ++j) { - pixAcc0 += *p++; - pixAcc1 += *p++; - pixAcc2 += *p++; - pixAcc3 += *p++; - } - p += 4 * (w - m); - } - pixMul = (SplashCoord)1 / (SplashCoord)(n * m); - - pix[0] = (int)((SplashCoord)pixAcc0 * pixMul); - pix[1] = (int)((SplashCoord)pixAcc1 * pixMul); - pix[2] = (int)((SplashCoord)pixAcc2 * pixMul); - pix[3] = (int)((SplashCoord)pixAcc3 * pixMul); - - // set pixel - if (vectorAntialias && clipRes != splashClipAllInside) { - pipe.shape = (SplashCoord)1; - drawAAPixel(&pipe, tx + x2, ty + y2); + } + } + } else { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + for (x = 0; x < w; ++x) { + if (state->clip->test(xDest + x, yDest + y)) { + src->getPixel(xSrc + x, ySrc + y, pixel); + (this->*pipe.run)(&pipe); + updateModX(xDest + x); + updateModY(yDest + y); } else { - drawPixel(&pipe, tx + x2, ty + y2, - clipRes2 == splashClipAllInside); + pipeIncX(&pipe); } - - // x scale Bresenham - xSrc += xStep; - - // x shear - x1 += xSign; - - // y shear - y1 += yShear1; } - break; -#endif // SPLASH_CMYK } } - } - - gfree(colorBuf); - gfree(alphaBuf); - - return splashOk; } SplashError Splash::composite(SplashBitmap *src, int xSrc, int ySrc, int xDest, int yDest, int w, int h, - GBool noClip, GBool nonIsolated) { + GBool noClip, GBool nonIsolated, + GBool knockout, SplashCoord knockoutOpacity) { SplashPipe pipe; SplashColor pixel; Guchar alpha; @@ -3091,39 +4682,73 @@ } if (src->alpha) { - pipeInit(&pipe, xDest, yDest, NULL, pixel, state->fillAlpha, - gTrue, nonIsolated); - for (y = 0; y < h; ++y) { - pipeSetXY(&pipe, xDest, yDest + y); - ap = src->getAlphaPtr() + (ySrc + y) * src->getWidth() + xSrc; - for (x = 0; x < w; ++x) { - alpha = *ap++; - if (noClip || state->clip->test(xDest + x, yDest + y)) { + pipeInit(&pipe, xDest, yDest, NULL, pixel, + (Guchar)splashRound(state->fillAlpha * 255), gTrue, nonIsolated, + knockout, (Guchar)splashRound(knockoutOpacity * 255)); + if (noClip) { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + ap = src->getAlphaPtr() + (ySrc + y) * src->getWidth() + xSrc; + for (x = 0; x < w; ++x) { + src->getPixel(xSrc + x, ySrc + y, pixel); + alpha = *ap++; // this uses shape instead of alpha, which isn't technically // correct, but works out the same + pipe.shape = alpha; + (this->*pipe.run)(&pipe); + } + } + updateModX(xDest); + updateModX(xDest + w - 1); + updateModY(yDest); + updateModY(yDest + h - 1); + } else { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + ap = src->getAlphaPtr() + (ySrc + y) * src->getWidth() + xSrc; + for (x = 0; x < w; ++x) { src->getPixel(xSrc + x, ySrc + y, pixel); - pipe.shape = (SplashCoord)(alpha / 255.0); - pipeRun(&pipe); - updateModX(xDest + x); - updateModY(yDest + y); - } else { - pipeIncX(&pipe); + alpha = *ap++; + if (state->clip->test(xDest + x, yDest + y)) { + // this uses shape instead of alpha, which isn't technically + // correct, but works out the same + pipe.shape = alpha; + (this->*pipe.run)(&pipe); + updateModX(xDest + x); + updateModY(yDest + y); + } else { + pipeIncX(&pipe); + } } } } } else { - pipeInit(&pipe, xDest, yDest, NULL, pixel, state->fillAlpha, - gFalse, nonIsolated); - for (y = 0; y < h; ++y) { - pipeSetXY(&pipe, xDest, yDest + y); - for (x = 0; x < w; ++x) { - if (noClip || state->clip->test(xDest + x, yDest + y)) { + pipeInit(&pipe, xDest, yDest, NULL, pixel, + (Guchar)splashRound(state->fillAlpha * 255), gFalse, nonIsolated); + if (noClip) { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + for (x = 0; x < w; ++x) { src->getPixel(xSrc + x, ySrc + y, pixel); - pipeRun(&pipe); - updateModX(xDest + x); - updateModY(yDest + y); - } else { - pipeIncX(&pipe); + (this->*pipe.run)(&pipe); + } + } + updateModX(xDest); + updateModX(xDest + w - 1); + updateModY(yDest); + updateModY(yDest + h - 1); + } else { + for (y = 0; y < h; ++y) { + pipeSetXY(&pipe, xDest, yDest + y); + for (x = 0; x < w; ++x) { + src->getPixel(xSrc + x, ySrc + y, pixel); + if (state->clip->test(xDest + x, yDest + y)) { + (this->*pipe.run)(&pipe); + updateModX(xDest + x); + updateModY(yDest + y); + } else { + pipeIncX(&pipe); + } } } } @@ -3142,7 +4767,7 @@ int x, y, mask; if (unlikely(bitmap->alpha == NULL)) { - error(-1, "bitmap->alpha is NULL in Splash::compositeBackground"); + error(errInternal, -1, "bitmap->alpha is NULL in Splash::compositeBackground"); return; } @@ -3248,11 +4873,21 @@ q = &bitmap->alpha[y * bitmap->width]; for (x = 0; x < bitmap->width; ++x) { alpha = *q++; - alpha1 = 255 - alpha; - p[0] = div255(alpha1 * color0 + alpha * p[0]); - p[1] = div255(alpha1 * color1 + alpha * p[1]); - p[2] = div255(alpha1 * color2 + alpha * p[2]); - p[3] = div255(alpha1 * color3 + alpha * p[3]); + if (alpha == 0) + { + p[0] = color0; + p[1] = color1; + p[2] = color2; + p[3] = color3; + } + else if (alpha != 255) + { + alpha1 = 255 - alpha; + p[0] = div255(alpha1 * color0 + alpha * p[0]); + p[1] = div255(alpha1 * color1 + alpha * p[1]); + p[2] = div255(alpha1 * color2 + alpha * p[2]); + p[3] = div255(alpha1 * color3 + alpha * p[3]); + } p += 4; } } @@ -3322,7 +4957,7 @@ SplashPipe pipe; SplashColor cSrcVal; - pipeInit(&pipe, 0, 0, NULL, cSrcVal, state->strokeAlpha, gFalse, gFalse, NULL, gTrue); + pipeInit(&pipe, 0, 0, NULL, cSrcVal, (Guchar)splashRound(state->strokeAlpha * 255), gFalse, gFalse); if (vectorAntialias) { if (aaBuf == NULL) @@ -3577,7 +5212,7 @@ int xDest, int yDest, int w, int h) { SplashColorPtr p, sp; Guchar *q; - int x, y, mask; + int x, y, mask, srcMask; if (src->mode != bitmap->mode) { return splashErrModeMismatch; @@ -3587,10 +5222,11 @@ case splashModeMono1: for (y = 0; y < h; ++y) { p = &bitmap->data[(yDest + y) * bitmap->rowSize + (xDest >> 3)]; - sp = &src->data[(ySrc + y) * bitmap->rowSize + (xSrc >> 3)]; mask = 0x80 >> (xDest & 7); + sp = &src->data[(ySrc + y) * src->rowSize + (xSrc >> 3)]; + srcMask = 0x80 >> (xSrc & 7); for (x = 0; x < w; ++x) { - if (sp[0] & (0x80 >> (x & 7))) { + if (*sp & srcMask) { *p |= mask; } else { *p &= ~mask; @@ -3598,6 +5234,9 @@ if (!(mask >>= 1)) { mask = 0x80; ++p; + } + if (!(srcMask >>= 1)) { + srcMask = 0x80; ++sp; } } @@ -3641,7 +5280,7 @@ case splashModeCMYK8: for (y = 0; y < h; ++y) { p = &bitmap->data[(yDest + y) * bitmap->rowSize + 4 * xDest]; - sp = &src->data[(ySrc + y) * bitmap->rowSize + 4 * xSrc]; + sp = &src->data[(ySrc + y) * src->rowSize + 4 * xSrc]; for (x = 0; x < w; ++x) { *p++ = *sp++; *p++ = *sp++; @@ -3663,166 +5302,246 @@ return splashOk; } -SplashPath *Splash::makeStrokePath(SplashPath *path, GBool flatten) { - SplashPath *pathIn, *pathOut; - SplashCoord w, d, dx, dy, wdx, wdy, dxNext, dyNext, wdxNext, wdyNext; +SplashPath *Splash::makeStrokePath(SplashPath *path, SplashCoord w, + GBool flatten) { +SplashPath *pathIn, *dashPath, *pathOut; + SplashCoord d, dx, dy, wdx, wdy, dxNext, dyNext, wdxNext, wdyNext; SplashCoord crossprod, dotprod, miter, m; GBool first, last, closed; - int subpathStart, next, i; + int subpathStart0, subpathStart1, seg, i0, i1, j0, j1, k0, k1; int left0, left1, left2, right0, right1, right2, join0, join1, join2; int leftFirst, rightFirst, firstPt; + pathOut = new SplashPath(); + + if (path->length == 0) { + return pathOut; + } + if (flatten) { pathIn = flattenPath(path, state->matrix, state->flatness); if (state->lineDashLength > 0) { - pathOut = makeDashedPath(pathIn); + dashPath = makeDashedPath(pathIn); delete pathIn; - pathIn = pathOut; + pathIn = dashPath; + if (pathIn->length == 0) { + delete pathIn; + return pathOut; + } } } else { pathIn = path; } - subpathStart = 0; // make gcc happy + subpathStart0 = subpathStart1 = 0; // make gcc happy + seg = 0; // make gcc happy closed = gFalse; // make gcc happy left0 = left1 = right0 = right1 = join0 = join1 = 0; // make gcc happy leftFirst = rightFirst = firstPt = 0; // make gcc happy - pathOut = new SplashPath(); - w = state->lineWidth; - - for (i = 0; i < pathIn->length - 1; ++i) { - if (pathIn->flags[i] & splashPathLast) { + i0 = 0; + for (i1 = i0; + !(pathIn->flags[i1] & splashPathLast) && + i1 + 1 < pathIn->length && + pathIn->pts[i1+1].x == pathIn->pts[i1].x && + pathIn->pts[i1+1].y == pathIn->pts[i1].y; + ++i1) ; + + while (i1 < pathIn->length) { + if ((first = pathIn->flags[i0] & splashPathFirst)) { + subpathStart0 = i0; + subpathStart1 = i1; + seg = 0; + closed = pathIn->flags[i0] & splashPathClosed; + } + j0 = i1 + 1; + if (j0 < pathIn->length) { + for (j1 = j0; + !(pathIn->flags[j1] & splashPathLast) && + j1 + 1 < pathIn->length && + pathIn->pts[j1+1].x == pathIn->pts[j1].x && + pathIn->pts[j1+1].y == pathIn->pts[j1].y; + ++j1) ; + } else { + j1 = j0; + } + if (pathIn->flags[i1] & splashPathLast) { + if (first && state->lineCap == splashLineCapRound) { + // special case: zero-length subpath with round line caps --> + // draw a circle + pathOut->moveTo(pathIn->pts[i0].x + (SplashCoord)0.5 * w, + pathIn->pts[i0].y); + pathOut->curveTo(pathIn->pts[i0].x + (SplashCoord)0.5 * w, + pathIn->pts[i0].y + bezierCircle2 * w, + pathIn->pts[i0].x + bezierCircle2 * w, + pathIn->pts[i0].y + (SplashCoord)0.5 * w, + pathIn->pts[i0].x, + pathIn->pts[i0].y + (SplashCoord)0.5 * w); + pathOut->curveTo(pathIn->pts[i0].x - bezierCircle2 * w, + pathIn->pts[i0].y + (SplashCoord)0.5 * w, + pathIn->pts[i0].x - (SplashCoord)0.5 * w, + pathIn->pts[i0].y + bezierCircle2 * w, + pathIn->pts[i0].x - (SplashCoord)0.5 * w, + pathIn->pts[i0].y); + pathOut->curveTo(pathIn->pts[i0].x - (SplashCoord)0.5 * w, + pathIn->pts[i0].y - bezierCircle2 * w, + pathIn->pts[i0].x - bezierCircle2 * w, + pathIn->pts[i0].y - (SplashCoord)0.5 * w, + pathIn->pts[i0].x, + pathIn->pts[i0].y - (SplashCoord)0.5 * w); + pathOut->curveTo(pathIn->pts[i0].x + bezierCircle2 * w, + pathIn->pts[i0].y - (SplashCoord)0.5 * w, + pathIn->pts[i0].x + (SplashCoord)0.5 * w, + pathIn->pts[i0].y - bezierCircle2 * w, + pathIn->pts[i0].x + (SplashCoord)0.5 * w, + pathIn->pts[i0].y); + pathOut->close(); + } + i0 = j0; + i1 = j1; continue; } - if ((first = pathIn->flags[i] & splashPathFirst)) { - subpathStart = i; - closed = pathIn->flags[i] & splashPathClosed; - } - last = pathIn->flags[i+1] & splashPathLast; - - // compute the deltas for segment (i, i+1) - d = splashDist(pathIn->pts[i].x, pathIn->pts[i].y, - pathIn->pts[i+1].x, pathIn->pts[i+1].y); - if (d == 0) { - // we need to draw end caps on zero-length lines - //~ not clear what the behavior should be for splashLineCapButt - //~ with d==0 - dx = 0; - dy = 1; - } else { - d = (SplashCoord)1 / d; - dx = d * (pathIn->pts[i+1].x - pathIn->pts[i].x); - dy = d * (pathIn->pts[i+1].y - pathIn->pts[i].y); + last = pathIn->flags[j1] & splashPathLast; + if (last) { + k0 = subpathStart1 + 1; + } else { + k0 = j1 + 1; } + for (k1 = k0; + !(pathIn->flags[k1] & splashPathLast) && + k1 + 1 < pathIn->length && + pathIn->pts[k1+1].x == pathIn->pts[k1].x && + pathIn->pts[k1+1].y == pathIn->pts[k1].y; + ++k1) ; + + // compute the deltas for segment (i1, j0) +#if USE_FIXEDPOINT + // the 1/d value can be small, which introduces significant + // inaccuracies in fixed point mode + d = splashDist(pathIn->pts[i1].x, pathIn->pts[i1].y, + pathIn->pts[j0].x, pathIn->pts[j0].y); + dx = (pathIn->pts[j0].x - pathIn->pts[i1].x) / d; + dy = (pathIn->pts[j0].y - pathIn->pts[i1].y) / d; +#else + d = (SplashCoord)1 / splashDist(pathIn->pts[i1].x, pathIn->pts[i1].y, + pathIn->pts[j0].x, pathIn->pts[j0].y); + dx = d * (pathIn->pts[j0].x - pathIn->pts[i1].x); + dy = d * (pathIn->pts[j0].y - pathIn->pts[i1].y); +#endif wdx = (SplashCoord)0.5 * w * dx; wdy = (SplashCoord)0.5 * w * dy; - // compute the deltas for segment (i+1, next) - next = last ? subpathStart + 1 : i + 2; - d = splashDist(pathIn->pts[i+1].x, pathIn->pts[i+1].y, - pathIn->pts[next].x, pathIn->pts[next].y); - if (d == 0) { - // we need to draw end caps on zero-length lines - //~ not clear what the behavior should be for splashLineCapButt - //~ with d==0 - dxNext = 0; - dyNext = 1; - } else { - d = (SplashCoord)1 / d; - dxNext = d * (pathIn->pts[next].x - pathIn->pts[i+1].x); - dyNext = d * (pathIn->pts[next].y - pathIn->pts[i+1].y); - } - wdxNext = (SplashCoord)0.5 * w * dxNext; - wdyNext = (SplashCoord)0.5 * w * dyNext; - // draw the start cap - pathOut->moveTo(pathIn->pts[i].x - wdy, pathIn->pts[i].y + wdx); - if (i == subpathStart) { + pathOut->moveTo(pathIn->pts[i0].x - wdy, pathIn->pts[i0].y + wdx); + if (i0 == subpathStart0) { firstPt = pathOut->length - 1; } if (first && !closed) { switch (state->lineCap) { case splashLineCapButt: - pathOut->lineTo(pathIn->pts[i].x + wdy, pathIn->pts[i].y - wdx); + pathOut->lineTo(pathIn->pts[i0].x + wdy, pathIn->pts[i0].y - wdx); break; case splashLineCapRound: - pathOut->curveTo(pathIn->pts[i].x - wdy - bezierCircle * wdx, - pathIn->pts[i].y + wdx - bezierCircle * wdy, - pathIn->pts[i].x - wdx - bezierCircle * wdy, - pathIn->pts[i].y - wdy + bezierCircle * wdx, - pathIn->pts[i].x - wdx, - pathIn->pts[i].y - wdy); - pathOut->curveTo(pathIn->pts[i].x - wdx + bezierCircle * wdy, - pathIn->pts[i].y - wdy - bezierCircle * wdx, - pathIn->pts[i].x + wdy - bezierCircle * wdx, - pathIn->pts[i].y - wdx - bezierCircle * wdy, - pathIn->pts[i].x + wdy, - pathIn->pts[i].y - wdx); + pathOut->curveTo(pathIn->pts[i0].x - wdy - bezierCircle * wdx, + pathIn->pts[i0].y + wdx - bezierCircle * wdy, + pathIn->pts[i0].x - wdx - bezierCircle * wdy, + pathIn->pts[i0].y - wdy + bezierCircle * wdx, + pathIn->pts[i0].x - wdx, + pathIn->pts[i0].y - wdy); + pathOut->curveTo(pathIn->pts[i0].x - wdx + bezierCircle * wdy, + pathIn->pts[i0].y - wdy - bezierCircle * wdx, + pathIn->pts[i0].x + wdy - bezierCircle * wdx, + pathIn->pts[i0].y - wdx - bezierCircle * wdy, + pathIn->pts[i0].x + wdy, + pathIn->pts[i0].y - wdx); break; case splashLineCapProjecting: - pathOut->lineTo(pathIn->pts[i].x - wdx - wdy, - pathIn->pts[i].y + wdx - wdy); - pathOut->lineTo(pathIn->pts[i].x - wdx + wdy, - pathIn->pts[i].y - wdx - wdy); - pathOut->lineTo(pathIn->pts[i].x + wdy, - pathIn->pts[i].y - wdx); + pathOut->lineTo(pathIn->pts[i0].x - wdx - wdy, + pathIn->pts[i0].y + wdx - wdy); + pathOut->lineTo(pathIn->pts[i0].x - wdx + wdy, + pathIn->pts[i0].y - wdx - wdy); + pathOut->lineTo(pathIn->pts[i0].x + wdy, + pathIn->pts[i0].y - wdx); break; } } else { - pathOut->lineTo(pathIn->pts[i].x + wdy, pathIn->pts[i].y - wdx); + pathOut->lineTo(pathIn->pts[i0].x + wdy, pathIn->pts[i0].y - wdx); } // draw the left side of the segment rectangle left2 = pathOut->length - 1; - pathOut->lineTo(pathIn->pts[i+1].x + wdy, pathIn->pts[i+1].y - wdx); + pathOut->lineTo(pathIn->pts[j0].x + wdy, pathIn->pts[j0].y - wdx); // draw the end cap if (last && !closed) { switch (state->lineCap) { case splashLineCapButt: - pathOut->lineTo(pathIn->pts[i+1].x - wdy, pathIn->pts[i+1].y + wdx); + pathOut->lineTo(pathIn->pts[j0].x - wdy, pathIn->pts[j0].y + wdx); break; case splashLineCapRound: - pathOut->curveTo(pathIn->pts[i+1].x + wdy + bezierCircle * wdx, - pathIn->pts[i+1].y - wdx + bezierCircle * wdy, - pathIn->pts[i+1].x + wdx + bezierCircle * wdy, - pathIn->pts[i+1].y + wdy - bezierCircle * wdx, - pathIn->pts[i+1].x + wdx, - pathIn->pts[i+1].y + wdy); - pathOut->curveTo(pathIn->pts[i+1].x + wdx - bezierCircle * wdy, - pathIn->pts[i+1].y + wdy + bezierCircle * wdx, - pathIn->pts[i+1].x - wdy + bezierCircle * wdx, - pathIn->pts[i+1].y + wdx + bezierCircle * wdy, - pathIn->pts[i+1].x - wdy, - pathIn->pts[i+1].y + wdx); + pathOut->curveTo(pathIn->pts[j0].x + wdy + bezierCircle * wdx, + pathIn->pts[j0].y - wdx + bezierCircle * wdy, + pathIn->pts[j0].x + wdx + bezierCircle * wdy, + pathIn->pts[j0].y + wdy - bezierCircle * wdx, + pathIn->pts[j0].x + wdx, + pathIn->pts[j0].y + wdy); + pathOut->curveTo(pathIn->pts[j0].x + wdx - bezierCircle * wdy, + pathIn->pts[j0].y + wdy + bezierCircle * wdx, + pathIn->pts[j0].x - wdy + bezierCircle * wdx, + pathIn->pts[j0].y + wdx + bezierCircle * wdy, + pathIn->pts[j0].x - wdy, + pathIn->pts[j0].y + wdx); break; case splashLineCapProjecting: - pathOut->lineTo(pathIn->pts[i+1].x + wdy + wdx, - pathIn->pts[i+1].y - wdx + wdy); - pathOut->lineTo(pathIn->pts[i+1].x - wdy + wdx, - pathIn->pts[i+1].y + wdx + wdy); - pathOut->lineTo(pathIn->pts[i+1].x - wdy, - pathIn->pts[i+1].y + wdx); + pathOut->lineTo(pathIn->pts[j0].x + wdy + wdx, + pathIn->pts[j0].y - wdx + wdy); + pathOut->lineTo(pathIn->pts[j0].x - wdy + wdx, + pathIn->pts[j0].y + wdx + wdy); + pathOut->lineTo(pathIn->pts[j0].x - wdy, + pathIn->pts[j0].y + wdx); break; } } else { - pathOut->lineTo(pathIn->pts[i+1].x - wdy, pathIn->pts[i+1].y + wdx); + pathOut->lineTo(pathIn->pts[j0].x - wdy, pathIn->pts[j0].y + wdx); } // draw the right side of the segment rectangle + // (NB: if stroke adjustment is enabled, the closepath operation MUST + // add a segment because this segment is used for a hint) right2 = pathOut->length - 1; - pathOut->close(); + pathOut->close(state->strokeAdjust); // draw the join join2 = pathOut->length; if (!last || closed) { + + // compute the deltas for segment (j1, k0) +#if USE_FIXEDPOINT + // the 1/d value can be small, which introduces significant + // inaccuracies in fixed point mode + d = splashDist(pathIn->pts[j1].x, pathIn->pts[j1].y, + pathIn->pts[k0].x, pathIn->pts[k0].y); + dxNext = (pathIn->pts[k0].x - pathIn->pts[j1].x) / d; + dyNext = (pathIn->pts[k0].y - pathIn->pts[j1].y) / d; +#else + d = (SplashCoord)1 / splashDist(pathIn->pts[j1].x, pathIn->pts[j1].y, + pathIn->pts[k0].x, pathIn->pts[k0].y); + dxNext = d * (pathIn->pts[k0].x - pathIn->pts[j1].x); + dyNext = d * (pathIn->pts[k0].y - pathIn->pts[j1].y); +#endif + wdxNext = (SplashCoord)0.5 * w * dxNext; + wdyNext = (SplashCoord)0.5 * w * dyNext; + + // compute the join parameters crossprod = dx * dyNext - dy * dxNext; dotprod = -(dx * dxNext + dy * dyNext); - if (dotprod > 0.99999) { + if (dotprod > 0.9999) { // avoid a divide-by-zero -- set miter to something arbitrary // such that sqrt(miter) will exceed miterLimit (and m is never // used in that situation) + // (note: the comparison value (0.9999) has to be less than + // 1-epsilon, where epsilon is the smallest value + // representable in the fixed point format) miter = (state->miterLimit + 1) * (state->miterLimit + 1); m = 0; } else { @@ -3836,67 +5555,68 @@ // round join if (state->lineJoin == splashLineJoinRound) { - pathOut->moveTo(pathIn->pts[i+1].x + (SplashCoord)0.5 * w, - pathIn->pts[i+1].y); - pathOut->curveTo(pathIn->pts[i+1].x + (SplashCoord)0.5 * w, - pathIn->pts[i+1].y + bezierCircle2 * w, - pathIn->pts[i+1].x + bezierCircle2 * w, - pathIn->pts[i+1].y + (SplashCoord)0.5 * w, - pathIn->pts[i+1].x, - pathIn->pts[i+1].y + (SplashCoord)0.5 * w); - pathOut->curveTo(pathIn->pts[i+1].x - bezierCircle2 * w, - pathIn->pts[i+1].y + (SplashCoord)0.5 * w, - pathIn->pts[i+1].x - (SplashCoord)0.5 * w, - pathIn->pts[i+1].y + bezierCircle2 * w, - pathIn->pts[i+1].x - (SplashCoord)0.5 * w, - pathIn->pts[i+1].y); - pathOut->curveTo(pathIn->pts[i+1].x - (SplashCoord)0.5 * w, - pathIn->pts[i+1].y - bezierCircle2 * w, - pathIn->pts[i+1].x - bezierCircle2 * w, - pathIn->pts[i+1].y - (SplashCoord)0.5 * w, - pathIn->pts[i+1].x, - pathIn->pts[i+1].y - (SplashCoord)0.5 * w); - pathOut->curveTo(pathIn->pts[i+1].x + bezierCircle2 * w, - pathIn->pts[i+1].y - (SplashCoord)0.5 * w, - pathIn->pts[i+1].x + (SplashCoord)0.5 * w, - pathIn->pts[i+1].y - bezierCircle2 * w, - pathIn->pts[i+1].x + (SplashCoord)0.5 * w, - pathIn->pts[i+1].y); + pathOut->moveTo(pathIn->pts[j0].x + (SplashCoord)0.5 * w, + pathIn->pts[j0].y); + pathOut->curveTo(pathIn->pts[j0].x + (SplashCoord)0.5 * w, + pathIn->pts[j0].y + bezierCircle2 * w, + pathIn->pts[j0].x + bezierCircle2 * w, + pathIn->pts[j0].y + (SplashCoord)0.5 * w, + pathIn->pts[j0].x, + pathIn->pts[j0].y + (SplashCoord)0.5 * w); + pathOut->curveTo(pathIn->pts[j0].x - bezierCircle2 * w, + pathIn->pts[j0].y + (SplashCoord)0.5 * w, + pathIn->pts[j0].x - (SplashCoord)0.5 * w, + pathIn->pts[j0].y + bezierCircle2 * w, + pathIn->pts[j0].x - (SplashCoord)0.5 * w, + pathIn->pts[j0].y); + pathOut->curveTo(pathIn->pts[j0].x - (SplashCoord)0.5 * w, + pathIn->pts[j0].y - bezierCircle2 * w, + pathIn->pts[j0].x - bezierCircle2 * w, + pathIn->pts[j0].y - (SplashCoord)0.5 * w, + pathIn->pts[j0].x, + pathIn->pts[j0].y - (SplashCoord)0.5 * w); + pathOut->curveTo(pathIn->pts[j0].x + bezierCircle2 * w, + pathIn->pts[j0].y - (SplashCoord)0.5 * w, + pathIn->pts[j0].x + (SplashCoord)0.5 * w, + pathIn->pts[j0].y - bezierCircle2 * w, + pathIn->pts[j0].x + (SplashCoord)0.5 * w, + pathIn->pts[j0].y); } else { - pathOut->moveTo(pathIn->pts[i+1].x, pathIn->pts[i+1].y); + pathOut->moveTo(pathIn->pts[j0].x, pathIn->pts[j0].y); // angle < 180 if (crossprod < 0) { - pathOut->lineTo(pathIn->pts[i+1].x - wdyNext, - pathIn->pts[i+1].y + wdxNext); + pathOut->lineTo(pathIn->pts[j0].x - wdyNext, + pathIn->pts[j0].y + wdxNext); // miter join inside limit if (state->lineJoin == splashLineJoinMiter && splashSqrt(miter) <= state->miterLimit) { - pathOut->lineTo(pathIn->pts[i+1].x - wdy + wdx * m, - pathIn->pts[i+1].y + wdx + wdy * m); - pathOut->lineTo(pathIn->pts[i+1].x - wdy, - pathIn->pts[i+1].y + wdx); + pathOut->lineTo(pathIn->pts[j0].x - wdy + wdx * m, + pathIn->pts[j0].y + wdx + wdy * m); + pathOut->lineTo(pathIn->pts[j0].x - wdy, + pathIn->pts[j0].y + wdx); // bevel join or miter join outside limit } else { - pathOut->lineTo(pathIn->pts[i+1].x - wdy, pathIn->pts[i+1].y + wdx); + pathOut->lineTo(pathIn->pts[j0].x - wdy, + pathIn->pts[j0].y + wdx); } // angle >= 180 } else { - pathOut->lineTo(pathIn->pts[i+1].x + wdy, - pathIn->pts[i+1].y - wdx); + pathOut->lineTo(pathIn->pts[j0].x + wdy, + pathIn->pts[j0].y - wdx); // miter join inside limit if (state->lineJoin == splashLineJoinMiter && splashSqrt(miter) <= state->miterLimit) { - pathOut->lineTo(pathIn->pts[i+1].x + wdy + wdx * m, - pathIn->pts[i+1].y - wdx + wdy * m); - pathOut->lineTo(pathIn->pts[i+1].x + wdyNext, - pathIn->pts[i+1].y - wdxNext); + pathOut->lineTo(pathIn->pts[j0].x + wdy + wdx * m, + pathIn->pts[j0].y - wdx + wdy * m); + pathOut->lineTo(pathIn->pts[j0].x + wdyNext, + pathIn->pts[j0].y - wdxNext); // bevel join or miter join outside limit } else { - pathOut->lineTo(pathIn->pts[i+1].x + wdyNext, - pathIn->pts[i+1].y - wdxNext); + pathOut->lineTo(pathIn->pts[j0].x + wdyNext, + pathIn->pts[j0].y - wdxNext); } } } @@ -3906,8 +5626,28 @@ // add stroke adjustment hints if (state->strokeAdjust) { - if (i >= subpathStart + 1) { - if (i >= subpathStart + 2) { + if (seg == 0 && !closed) { + if (state->lineCap == splashLineCapButt) { + pathOut->addStrokeAdjustHint(firstPt, left2 + 1, + firstPt, firstPt + 1); + if (last) { + pathOut->addStrokeAdjustHint(firstPt, left2 + 1, + left2 + 1, left2 + 2); + } + } else if (state->lineCap == splashLineCapProjecting) { + if (last) { + pathOut->addStrokeAdjustHint(firstPt + 1, left2 + 2, + firstPt + 1, firstPt + 2); + pathOut->addStrokeAdjustHint(firstPt + 1, left2 + 2, + left2 + 2, left2 + 3); + } else { + pathOut->addStrokeAdjustHint(firstPt + 1, left2 + 1, + firstPt + 1, firstPt + 2); + } + } + } + if (seg >= 1) { + if (seg >= 2) { pathOut->addStrokeAdjustHint(left1, right1, left0 + 1, right0); pathOut->addStrokeAdjustHint(left1, right1, join0, left2); } else { @@ -3921,12 +5661,12 @@ right1 = right2; join0 = join1; join1 = join2; - if (i == subpathStart) { + if (seg == 0) { leftFirst = left2; rightFirst = right2; } if (last) { - if (i >= subpathStart + 2) { + if (seg >= 2) { pathOut->addStrokeAdjustHint(left1, right1, left0 + 1, right0); pathOut->addStrokeAdjustHint(left1, right1, join0, pathOut->length - 1); @@ -3943,8 +5683,21 @@ pathOut->addStrokeAdjustHint(leftFirst, rightFirst, join1, pathOut->length - 1); } + if (!closed && seg > 0) { + if (state->lineCap == splashLineCapButt) { + pathOut->addStrokeAdjustHint(left1 - 1, left1 + 1, + left1 + 1, left1 + 2); + } else if (state->lineCap == splashLineCapProjecting) { + pathOut->addStrokeAdjustHint(left1 - 1, left1 + 2, + left1 + 2, left1 + 3); + } + } } } + + i0 = j0; + i1 = j1; + ++seg; } if (pathIn != path) { @@ -3971,13 +5724,9 @@ int i; for (i = 0; i < path->length; ++i) { - printf(" %4d: x0=%8.2f y0=%8.2f x1=%8.2f y1=%8.2f %s%s%s%s%s%s%s\n", + printf(" %4d: x0=%8.2f y0=%8.2f x1=%8.2f y1=%8.2f %s%s%s\n", i, (double)path->segs[i].x0, (double)path->segs[i].y0, (double)path->segs[i].x1, (double)path->segs[i].y1, - (path->segs[i].flags & splashXPathFirst) ? "F" : " ", - (path->segs[i].flags & splashXPathLast) ? "L" : " ", - (path->segs[i].flags & splashXPathEnd0) ? "0" : " ", - (path->segs[i].flags & splashXPathEnd1) ? "1" : " ", (path->segs[i].flags & splashXPathHoriz) ? "H" : " ", (path->segs[i].flags & splashXPathVert) ? "V" : " ", (path->segs[i].flags & splashXPathFlip) ? "P" : " "); @@ -4003,7 +5752,13 @@ xPath->aaScale(); } xPath->sort(); - scanner = new SplashXPathScanner(xPath, gFalse); + yMinI = state->clip->getYMinI(); + yMaxI = state->clip->getYMaxI(); + if (vectorAntialias && !inShading) { + yMinI = yMinI * splashAASize; + yMaxI = (yMaxI + 1) * splashAASize - 1; + } + scanner = new SplashXPathScanner(xPath, gFalse, yMinI, yMaxI); // get the min and max x and y values if (vectorAntialias) { @@ -4022,7 +5777,7 @@ yMaxI = state->clip->getYMaxI(); } - pipeInit(&pipe, 0, yMinI, pattern, NULL, state->fillAlpha, vectorAntialias && !hasBBox, gFalse, pattern); + pipeInit(&pipe, 0, yMinI, pattern, NULL, (Guchar)splashRound(state->fillAlpha * 255), vectorAntialias && !hasBBox, gFalse); // draw the spans if (vectorAntialias) { diff -Nru poppler-0.18.4/splash/Splash.h poppler-0.20.5/splash/Splash.h --- poppler-0.18.4/splash/Splash.h 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/Splash.h 2012-08-15 13:31:38.000000000 +0000 @@ -13,7 +13,7 @@ // // Copyright (C) 2005 Marco Pesenti Gritti // Copyright (C) 2007, 2011 Albert Astals Cid -// Copyright (C) 2010, 2011 Thomas Freitag +// Copyright (C) 2010-2012 Thomas Freitag // Copyright (C) 2010 Christian Feuersnger // // To see a description of the changes please see the Changelog file that @@ -108,6 +108,7 @@ SplashCoord *getLineDash(); int getLineDashLength(); SplashCoord getLineDashPhase(); + GBool getStrokeAdjust(); SplashClip *getClip(); SplashBitmap *getSoftMask(); GBool getInNonIsolatedGroup(); @@ -144,6 +145,8 @@ void setSoftMask(SplashBitmap *softMask); void setInNonIsolatedGroup(SplashBitmap *alpha0BitmapA, int alpha0XA, int alpha0YA); + void setTransfer(Guchar *red, Guchar *green, Guchar *blue, Guchar *gray); + void setOverprintMask(Guint overprintMask, GBool additive); //----- state save/restore @@ -206,13 +209,14 @@ // The matrix behaves as for fillImageMask. SplashError drawImage(SplashImageSource src, void *srcData, SplashColorMode srcMode, GBool srcAlpha, - int w, int h, SplashCoord *mat, SplashPattern *overprintPattern = NULL); + int w, int h, SplashCoord *mat, GBool tilingPattern = gFalse); // Composite a rectangular region from onto this Splash // object. SplashError composite(SplashBitmap *src, int xSrc, int ySrc, int xDest, int yDest, int w, int h, - GBool noClip, GBool nonIsolated); + GBool noClip, GBool nonIsolated, + GBool knockout = gFalse, SplashCoord knockoutOpacity = 1.0); // Composite this Splash object onto a background color. The // background alpha is assumed to be 1. @@ -226,14 +230,19 @@ //----- misc - // Construct a path for a stroke, given the path to be stroked, and - // using the current line parameters. If is true, this - // function will first flatten the path and handle the linedash. - SplashPath *makeStrokePath(SplashPath *path, GBool flatten = gTrue); + // Construct a path for a stroke, given the path to be stroked and + // the line width . All other stroke parameters are taken from + // the current state. If is true, this function will + // first flatten the path and handle the linedash. + SplashPath *makeStrokePath(SplashPath *path, SplashCoord w, + GBool flatten = gTrue); // Return the associated bitmap. SplashBitmap *getBitmap() { return bitmap; } + // Set the minimum line width. + void setMinLineWidth(SplashCoord w) { minLineWidth = w; } + // Get a bounding box which includes all modifications since the // last call to clearModRegion. void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax) @@ -250,6 +259,7 @@ void setDebugMode(GBool debugModeA) { debugMode = debugModeA; } #if 1 //~tmp: turn off anti-aliasing temporarily + void setInShading(GBool sh) { inShading = sh; } GBool getVectorAntialias() { return vectorAntialias; } void setVectorAntialias(GBool vaa) { vectorAntialias = vaa; } #endif @@ -264,9 +274,26 @@ void pipeInit(SplashPipe *pipe, int x, int y, SplashPattern *pattern, SplashColorPtr cSrc, - SplashCoord aInput, GBool usesShape, - GBool nonIsolatedGroup, SplashPattern *overprintPattern = NULL, GBool stroke = gFalse); + Guchar aInput, GBool usesShape, + GBool nonIsolatedGroup, + GBool knockout = gFalse, Guchar knockoutOpacity = 255); void pipeRun(SplashPipe *pipe); + void pipeRunSimpleMono1(SplashPipe *pipe); + void pipeRunSimpleMono8(SplashPipe *pipe); + void pipeRunSimpleRGB8(SplashPipe *pipe); + void pipeRunSimpleXBGR8(SplashPipe *pipe); + void pipeRunSimpleBGR8(SplashPipe *pipe); +#if SPLASH_CMYK + void pipeRunSimpleCMYK8(SplashPipe *pipe); +#endif + void pipeRunAAMono1(SplashPipe *pipe); + void pipeRunAAMono8(SplashPipe *pipe); + void pipeRunAARGB8(SplashPipe *pipe); + void pipeRunAAXBGR8(SplashPipe *pipe); + void pipeRunAABGR8(SplashPipe *pipe); +#if SPLASH_CMYK + void pipeRunAACMYK8(SplashPipe *pipe); +#endif void pipeSetXY(SplashPipe *pipe, int x, int y); void pipeIncX(SplashPipe *pipe); void drawPixel(SplashPipe *pipe, int x, int y, GBool noClip); @@ -279,7 +306,7 @@ void updateModX(int x); void updateModY(int y); void strokeNarrow(SplashPath *path); - void strokeWide(SplashPath *path); + void strokeWide(SplashPath *path, SplashCoord w); SplashPath *flattenPath(SplashPath *path, SplashCoord *matrix, SplashCoord flatness); void flattenCurve(SplashCoord x0, SplashCoord y0, @@ -291,7 +318,68 @@ SplashPath *makeDashedPath(SplashPath *xPath); SplashError fillWithPattern(SplashPath *path, GBool eo, SplashPattern *pattern, SplashCoord alpha); + GBool pathAllOutside(SplashPath *path); void fillGlyph2(int x0, int y0, SplashGlyphBitmap *glyph, GBool noclip); + void arbitraryTransformMask(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + SplashCoord *mat, GBool glyphMode); + SplashBitmap *scaleMask(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight); + void scaleMaskYdXd(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void scaleMaskYdXu(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void scaleMaskYuXd(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void scaleMaskYuXu(SplashImageMaskSource src, void *srcData, + int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void blitMask(SplashBitmap *src, int xDest, int yDest, + SplashClipResult clipRes); + SplashError arbitraryTransformImage(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, + int srcWidth, int srcHeight, + SplashCoord *mat, GBool tilingPattern = gFalse); + SplashBitmap *scaleImage(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight); + void scaleImageYdXd(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void scaleImageYdXu(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void scaleImageYuXd(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void scaleImageYuXu(SplashImageSource src, void *srcData, + SplashColorMode srcMode, int nComps, + GBool srcAlpha, int srcWidth, int srcHeight, + int scaledWidth, int scaledHeight, + SplashBitmap *dest); + void vertFlipImage(SplashBitmap *img, int width, int height, + int nComps); + void blitImage(SplashBitmap *src, GBool srcAlpha, int xDest, int yDest, + SplashClipResult clipRes); + void blitImageClipped(SplashBitmap *src, GBool srcAlpha, + int xSrc, int ySrc, int xDest, int yDest, + int w, int h); void dumpPath(SplashPath *path); void dumpXPath(SplashXPath *path); @@ -308,9 +396,11 @@ // bitmap containing the alpha0 values int alpha0X, alpha0Y; // offset within alpha0Bitmap SplashCoord aaGamma[splashAASize * splashAASize + 1]; + SplashCoord minLineWidth; int modXMin, modYMin, modXMax, modYMax; SplashClipResult opClipRes; GBool vectorAntialias; + GBool inShading; GBool debugMode; }; diff -Nru poppler-0.18.4/splash/SplashBitmap.cc poppler-0.20.5/splash/SplashBitmap.cc --- poppler-0.18.4/splash/SplashBitmap.cc 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashBitmap.cc 2012-08-15 13:31:38.000000000 +0000 @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2006, 2009, 2010 Albert Astals Cid +// Copyright (C) 2006, 2009, 2010, 2012 Albert Astals Cid // Copyright (C) 2007 Ilmari Heikkinen // Copyright (C) 2009 Shen Liang // Copyright (C) 2009 Stefan Thomas @@ -19,7 +19,8 @@ // Copyright (C) 2010 Harry Roberts // Copyright (C) 2010 Christian Feuersnger // Copyright (C) 2010 William Bader -// Copyright (C) 2011 Thomas Freitag +// Copyright (C) 2011, 2012 Thomas Freitag +// Copyright (C) 2012 Anthony Wesley // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -33,6 +34,7 @@ #endif #include +#include #include #include #include "goo/gmem.h" @@ -99,24 +101,49 @@ rowSize += rowPad - 1; rowSize -= rowSize % rowPad; } - data = (SplashColorPtr)gmallocn(rowSize, height); - if (!topDown) { - data += (height - 1) * rowSize; - rowSize = -rowSize; - } - if (alphaA) { - alpha = (Guchar *)gmallocn(width, height); + data = (SplashColorPtr)gmallocn_checkoverflow(rowSize, height); + if (data != NULL) { + if (!topDown) { + data += (height - 1) * rowSize; + rowSize = -rowSize; + } + if (alphaA) { + alpha = (Guchar *)gmallocn(width, height); + } else { + alpha = NULL; + } } else { alpha = NULL; } } +SplashBitmap *SplashBitmap::copy(SplashBitmap *src) { + SplashBitmap *result = new SplashBitmap(src->getWidth(), src->getHeight(), src->getRowPad(), + src->getMode(), src->getAlphaPtr() != NULL, src->getRowSize() >= 0); + Guchar *dataSource = src->getDataPtr(); + Guchar *dataDest = result->getDataPtr(); + int amount = src->getRowSize(); + if (amount < 0) { + dataSource = dataSource + (src->getHeight() - 1) * amount; + dataDest = dataDest + (src->getHeight() - 1) * amount; + amount *= -src->getHeight(); + } else { + amount *= src->getHeight(); + } + memcpy(dataDest, dataSource, amount); + if (src->getAlphaPtr() != NULL) { + memcpy(result->getAlphaPtr(), src->getAlphaPtr(), src->getWidth() * src->getHeight()); + } + return result; +} SplashBitmap::~SplashBitmap() { - if (rowSize < 0) { - gfree(data + (height - 1) * rowSize); - } else { - gfree(data); + if (data) { + if (rowSize < 0) { + gfree(data + (height - 1) * rowSize); + } else { + gfree(data); + } } gfree(alpha); } @@ -160,11 +187,7 @@ fprintf(f, "P5\n%d %d\n255\n", width, height); row = data; for (y = 0; y < height; ++y) { - p = row; - for (x = 0; x < width; ++x) { - fputc(*p, f); - ++p; - } + fwrite(row, 1, width, f); row += rowSize; } break; @@ -173,13 +196,7 @@ fprintf(f, "P6\n%d %d\n255\n", width, height); row = data; for (y = 0; y < height; ++y) { - p = row; - for (x = 0; x < width; ++x) { - fputc(splashRGB8R(p), f); - fputc(splashRGB8G(p), f); - fputc(splashRGB8B(p), f); - p += 3; - } + fwrite(row, 1, 3 * width, f); row += rowSize; } break; @@ -218,7 +235,7 @@ #if SPLASH_CMYK case splashModeCMYK8: // PNM doesn't support CMYK - error(-1, "unsupported SplashBitmap mode"); + error(errInternal, -1, "unsupported SplashBitmap mode"); return splashErrGeneric; break; #endif @@ -226,6 +243,20 @@ return splashOk; } +SplashError SplashBitmap::writeAlphaPGMFile(char *fileName) { + FILE *f; + + if (!alpha) { + return splashErrModeMismatch; + } + if (!(f = fopen(fileName, "wb"))) { + return splashErrOpenFile; + } + fprintf(f, "P5\n%d %d\n255\n", width, height); + fwrite(alpha, 1, width * height, f); + fclose(f); + return splashOk; +} void SplashBitmap::getPixel(int x, int y, SplashColorPtr pixel) { SplashColorPtr p; @@ -277,6 +308,14 @@ return alpha[y * width + x]; } +SplashColorPtr SplashBitmap::takeData() { + SplashColorPtr data2; + + data2 = data; + data = NULL; + return data2; +} + SplashError SplashBitmap::writeImgFile(SplashImageFileFormat format, char *fileName, int hDPI, int vDPI, const char *compressionString) { FILE *f; SplashError e; @@ -326,7 +365,7 @@ default: // Not the greatest error message, but users of this function should // have already checked whether their desired format is compiled in. - error(-1, "Support for this image type not compiled in"); + error(errInternal, -1, "Support for this image type not compiled in"); return splashErrGeneric; } @@ -364,7 +403,7 @@ && mode != splashModeCMYK8 #endif ) { - error(-1, "unsupported SplashBitmap mode"); + error(errInternal, -1, "unsupported SplashBitmap mode"); return splashErrGeneric; } @@ -485,7 +524,7 @@ break; } - if (writer->close()) { + if (!writer->close()) { return splashErrGeneric; } diff -Nru poppler-0.18.4/splash/SplashBitmap.h poppler-0.20.5/splash/SplashBitmap.h --- poppler-0.18.4/splash/SplashBitmap.h 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashBitmap.h 2012-05-10 20:05:44.000000000 +0000 @@ -19,6 +19,7 @@ // Copyright (C) 2010 Harry Roberts // Copyright (C) 2010 Christian Feuersnger // Copyright (C) 2010 William Bader +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -51,6 +52,7 @@ SplashBitmap(int widthA, int heightA, int rowPad, SplashColorMode modeA, GBool alphaA, GBool topDown = gTrue); + static SplashBitmap *copy(SplashBitmap *src); ~SplashBitmap(); @@ -65,6 +67,7 @@ SplashError writePNMFile(char *fileName); SplashError writePNMFile(FILE *f); + SplashError writeAlphaPGMFile(char *fileName); SplashError writeImgFile(SplashImageFileFormat format, char *fileName, int hDPI, int vDPI, const char *compressionString = ""); SplashError writeImgFile(SplashImageFileFormat format, FILE *f, int hDPI, int vDPI, const char *compressionString = ""); @@ -74,6 +77,11 @@ void getRGBLine(int y, SplashColorPtr line); Guchar getAlpha(int x, int y); + // Caller takes ownership of the bitmap data. The SplashBitmap + // object is no longer valid -- the next call should be to the + // destructor. + SplashColorPtr takeData(); + private: int width, height; // size of bitmap diff -Nru poppler-0.18.4/splash/SplashClip.cc poppler-0.20.5/splash/SplashClip.cc --- poppler-0.18.4/splash/SplashClip.cc 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashClip.cc 2012-09-09 20:52:41.000000000 +0000 @@ -64,8 +64,8 @@ } xMinI = splashFloor(xMin); yMinI = splashFloor(yMin); - xMaxI = splashFloor(xMax); - yMaxI = splashFloor(yMax); + xMaxI = splashCeil(xMax) - 1; + yMaxI = splashCeil(yMax) - 1; paths = NULL; flags = NULL; scanners = NULL; @@ -73,6 +73,7 @@ } SplashClip::SplashClip(SplashClip *clip) { + int yMinAA, yMaxAA; int i; antialias = clip->antialias; @@ -93,7 +94,15 @@ for (i = 0; i < length; ++i) { paths[i] = clip->paths[i]->copy(); flags[i] = clip->flags[i]; - scanners[i] = new SplashXPathScanner(paths[i], flags[i] & splashClipEO); + if (antialias) { + yMinAA = yMinI * splashAASize; + yMaxAA = (yMaxI + 1) * splashAASize - 1; + } else { + yMinAA = yMinI; + yMaxAA = yMaxI; + } + scanners[i] = new SplashXPathScanner(paths[i], flags[i] & splashClipEO, + yMinAA, yMaxAA); } } @@ -156,8 +165,8 @@ } xMinI = splashFloor(xMin); yMinI = splashFloor(yMin); - xMaxI = splashFloor(xMax); - yMaxI = splashFloor(yMax); + xMaxI = splashCeil(xMax) - 1; + yMaxI = splashCeil(yMax) - 1; } SplashError SplashClip::clipToRect(SplashCoord x0, SplashCoord y0, @@ -169,7 +178,7 @@ } if (x1 < xMax) { xMax = x1; - xMaxI = splashFloor(xMax); + xMaxI = splashCeil(xMax) - 1; } } else { if (x1 > xMin) { @@ -178,7 +187,7 @@ } if (x0 < xMax) { xMax = x0; - xMaxI = splashFloor(xMax); + xMaxI = splashCeil(xMax) - 1; } } if (y0 < y1) { @@ -188,7 +197,7 @@ } if (y1 < yMax) { yMax = y1; - yMaxI = splashFloor(yMax); + yMaxI = splashCeil(yMax) - 1; } } else { if (y1 > yMin) { @@ -197,7 +206,7 @@ } if (y0 < yMax) { yMax = y0; - yMaxI = splashFloor(yMax); + yMaxI = splashCeil(yMax) - 1; } } return splashOk; @@ -206,6 +215,7 @@ SplashError SplashClip::clipToPath(SplashPath *path, SplashCoord *matrix, SplashCoord flatness, GBool eo) { SplashXPath *xPath; + int yMinAA, yMaxAA; xPath = new SplashXPath(path, matrix, flatness, gTrue); @@ -213,8 +223,8 @@ if (xPath->length == 0) { xMax = xMin - 1; yMax = yMin - 1; - xMaxI = splashFloor(xMax); - yMaxI = splashFloor(yMax); + xMaxI = splashCeil(xMax) - 1; + yMaxI = splashCeil(yMax) - 1; delete xPath; // check for a rectangle @@ -255,7 +265,14 @@ xPath->sort(); paths[length] = xPath; flags[length] = eo ? splashClipEO : 0; - scanners[length] = new SplashXPathScanner(xPath, eo); + if (antialias) { + yMinAA = yMinI * splashAASize; + yMaxAA = (yMaxI + 1) * splashAASize - 1; + } else { + yMinAA = yMinI; + yMaxAA = yMaxI; + } + scanners[length] = new SplashXPathScanner(xPath, eo, yMinAA, yMaxAA); ++length; } @@ -268,10 +285,10 @@ // x = [rectXMin, rectXMax + 1) (note: rect coords are ints) // y = [rectYMin, rectYMax + 1) // against the clipping region: - // x = [xMin, xMax] (note: clipping coords are fp) - // y = [yMin, yMax] - if ((SplashCoord)(rectXMax + 1) <= xMin || (SplashCoord)rectXMin > xMax || - (SplashCoord)(rectYMax + 1) <= yMin || (SplashCoord)rectYMin > yMax) { + // x = [xMin, xMax) (note: clipping coords are fp) + // y = [yMin, yMax) + if ((SplashCoord)(rectXMax + 1) <= xMin || (SplashCoord)rectXMin >= xMax || + (SplashCoord)(rectYMax + 1) <= yMin || (SplashCoord)rectYMin >= yMax) { return splashClipAllOutside; } if ((SplashCoord)rectXMin >= xMin && (SplashCoord)(rectXMax + 1) <= xMax && @@ -289,10 +306,10 @@ // x = [spanXMin, spanXMax + 1) (note: span coords are ints) // y = [spanY, spanY + 1) // against the clipping region: - // x = [xMin, xMax] (note: clipping coords are fp) - // y = [yMin, yMax] - if ((SplashCoord)(spanXMax + 1) <= xMin || (SplashCoord)spanXMin > xMax || - (SplashCoord)(spanY + 1) <= yMin || (SplashCoord)spanY > yMax) { + // x = [xMin, xMax) (note: clipping coords are fp) + // y = [yMin, yMax) + if ((SplashCoord)(spanXMax + 1) <= xMin || (SplashCoord)spanXMin >= xMax || + (SplashCoord)(spanY + 1) <= yMin || (SplashCoord)spanY >= yMax) { return splashClipAllOutside; } if (!((SplashCoord)spanXMin >= xMin && (SplashCoord)(spanXMax + 1) <= xMax && @@ -367,4 +384,27 @@ for (i = 0; i < length; ++i) { scanners[i]->clipAALine(aaBuf, x0, x1, y); } + if (*x0 > *x1) { + *x0 = *x1; + } + if (*x0 < 0) { + *x0 = 0; + } + if ((*x0>>1) >= aaBuf->getRowSize()) { + xx0 = *x0; + *x0 = (aaBuf->getRowSize() - 1) << 1; + if (xx0 & 1) { + *x0 = *x0 + 1; + } + } + if (*x1 < *x0) { + *x1 = *x0; + } + if ((*x1>>1) >= aaBuf->getRowSize()) { + xx0 = *x1; + *x1 = (aaBuf->getRowSize() - 1) << 1; + if (xx0 & 1) { + *x1 = *x1 + 1; + } + } } diff -Nru poppler-0.18.4/splash/SplashClip.h poppler-0.20.5/splash/SplashClip.h --- poppler-0.18.4/splash/SplashClip.h 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashClip.h 2012-05-10 20:05:44.000000000 +0000 @@ -118,6 +118,12 @@ // will update and . void clipAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y); + // Get the rectangle part of the clip region. + SplashCoord getXMin() { return xMin; } + SplashCoord getXMax() { return xMax; } + SplashCoord getYMin() { return yMin; } + SplashCoord getYMax() { return yMax; } + // Get the rectangle part of the clip region, in integer coordinates. int getXMinI() { return xMinI; } int getXMaxI() { return xMaxI; } diff -Nru poppler-0.18.4/splash/SplashFTFont.cc poppler-0.20.5/splash/SplashFTFont.cc --- poppler-0.18.4/splash/SplashFTFont.cc 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashFTFont.cc 2012-10-03 22:50:48.000000000 +0000 @@ -16,6 +16,7 @@ // Copyright (C) 2009 Petr Gajdos // Copyright (C) 2010 Suzuki Toshiya // Copyright (C) 2011 Andreas Hartmetz +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -62,27 +63,84 @@ enableSlightHinting(fontFileA->engine->enableSlightHinting) { FT_Face face; - double div; + int div; int x, y; +#if USE_FIXEDPOINT + SplashCoord scale; +#endif face = fontFileA->face; if (FT_New_Size(face, &sizeObj)) { return; } face->size = sizeObj; - size = splashSqrt(mat[2]*mat[2] + mat[3]*mat[3]); - if ((int)size < 1) { + size = splashRound(splashDist(0, 0, mat[2], mat[3])); + if (size < 1) { size = 1; } - if (FT_Set_Pixel_Sizes(face, 0, (int)size)) { + if (FT_Set_Pixel_Sizes(face, 0, size)) { return; } // if the textMat values are too small, FreeType's fixed point // arithmetic doesn't work so well - textScale = splashSqrt(textMat[2]*textMat[2] + textMat[3]*textMat[3]) / size; + textScale = splashDist(0, 0, textMat[2], textMat[3]) / size; div = face->bbox.xMax > 20000 ? 65536 : 1; +#if USE_FIXEDPOINT + scale = (SplashCoord)1 / (SplashCoord)face->units_per_EM; + + // transform the four corners of the font bounding box -- the min + // and max values form the bounding box of the transformed font + x = (int)(mat[0] * (scale * (face->bbox.xMin / div)) + + mat[2] * (scale * (face->bbox.yMin / div))); + xMin = xMax = x; + y = (int)(mat[1] * (scale * (face->bbox.xMin / div)) + + mat[3] * (scale * (face->bbox.yMin / div))); + yMin = yMax = y; + x = (int)(mat[0] * (scale * (face->bbox.xMin / div)) + + mat[2] * (scale * (face->bbox.yMax / div))); + if (x < xMin) { + xMin = x; + } else if (x > xMax) { + xMax = x; + } + y = (int)(mat[1] * (scale * (face->bbox.xMin / div)) + + mat[3] * (scale * (face->bbox.yMax / div))); + if (y < yMin) { + yMin = y; + } else if (y > yMax) { + yMax = y; + } + x = (int)(mat[0] * (scale * (face->bbox.xMax / div)) + + mat[2] * (scale * (face->bbox.yMin / div))); + if (x < xMin) { + xMin = x; + } else if (x > xMax) { + xMax = x; + } + y = (int)(mat[1] * (scale * (face->bbox.xMax / div)) + + mat[3] * (scale * (face->bbox.yMin / div))); + if (y < yMin) { + yMin = y; + } else if (y > yMax) { + yMax = y; + } + x = (int)(mat[0] * (scale * (face->bbox.xMax / div)) + + mat[2] * (scale * (face->bbox.yMax / div))); + if (x < xMin) { + xMin = x; + } else if (x > xMax) { + xMax = x; + } + y = (int)(mat[1] * (scale * (face->bbox.xMax / div)) + + mat[3] * (scale * (face->bbox.yMax / div))); + if (y < yMin) { + yMin = y; + } else if (y > yMax) { + yMax = y; + } +#else // USE_FIXEDPOINT // transform the four corners of the font bounding box -- the min // and max values form the bounding box of the transformed font x = (int)((mat[0] * face->bbox.xMin + mat[2] * face->bbox.yMin) / @@ -133,11 +191,12 @@ } else if (y > yMax) { yMax = y; } +#endif // USE_FIXEDPOINT // This is a kludge: some buggy PDF generators embed fonts with // zero bounding boxes. if (xMax == xMin) { xMin = 0; - xMax = (int)size; + xMax = size; } if (yMax == yMin) { yMin = 0; @@ -146,23 +205,23 @@ // compute the transform matrix #if USE_FIXEDPOINT - matrix.xx = (FT_Fixed)((mat[0] / size).getRaw()); - matrix.yx = (FT_Fixed)((mat[1] / size).getRaw()); - matrix.xy = (FT_Fixed)((mat[2] / size).getRaw()); - matrix.yy = (FT_Fixed)((mat[3] / size).getRaw()); - textMatrix.xx = (FT_Fixed)((textMat[0] / (textScale * size)).getRaw()); - textMatrix.yx = (FT_Fixed)((textMat[1] / (textScale * size)).getRaw()); - textMatrix.xy = (FT_Fixed)((textMat[2] / (textScale * size)).getRaw()); - textMatrix.yy = (FT_Fixed)((textMat[3] / (textScale * size)).getRaw()); + matrix.xx = (FT_Fixed)((mat[0] / size).get16Dot16()); + matrix.yx = (FT_Fixed)((mat[1] / size).get16Dot16()); + matrix.xy = (FT_Fixed)((mat[2] / size).get16Dot16()); + matrix.yy = (FT_Fixed)((mat[3] / size).get16Dot16()); + textMatrix.xx = (FT_Fixed)((textMat[0] / (textScale * size)).get16Dot16()); + textMatrix.yx = (FT_Fixed)((textMat[1] / (textScale * size)).get16Dot16()); + textMatrix.xy = (FT_Fixed)((textMat[2] / (textScale * size)).get16Dot16()); + textMatrix.yy = (FT_Fixed)((textMat[3] / (textScale * size)).get16Dot16()); #else matrix.xx = (FT_Fixed)((mat[0] / size) * 65536); matrix.yx = (FT_Fixed)((mat[1] / size) * 65536); matrix.xy = (FT_Fixed)((mat[2] / size) * 65536); matrix.yy = (FT_Fixed)((mat[3] / size) * 65536); - textMatrix.xx = (FT_Fixed)((textMat[0] / (size * textScale)) * 65536); - textMatrix.yx = (FT_Fixed)((textMat[1] / (size * textScale)) * 65536); - textMatrix.xy = (FT_Fixed)((textMat[2] / (size * textScale)) * 65536); - textMatrix.yy = (FT_Fixed)((textMat[3] / (size * textScale)) * 65536); + textMatrix.xx = (FT_Fixed)((textMat[0] / (textScale * size)) * 65536); + textMatrix.yx = (FT_Fixed)((textMat[1] / (textScale * size)) * 65536); + textMatrix.xy = (FT_Fixed)((textMat[2] / (textScale * size)) * 65536); + textMatrix.yy = (FT_Fixed)((textMat[3] / (textScale * size)) * 65536); #endif } @@ -174,15 +233,29 @@ return SplashFont::getGlyph(c, xFrac, 0, bitmap, x0, y0, clip, clipRes); } -static FT_Int32 getFTLoadFlags(GBool aa, GBool enableFreeTypeHinting, GBool enableSlightHinting) +static FT_Int32 getFTLoadFlags(GBool type1, GBool trueType, GBool aa, GBool enableFreeTypeHinting, GBool enableSlightHinting) { int ret = FT_LOAD_DEFAULT; if (aa) ret |= FT_LOAD_NO_BITMAP; if (enableFreeTypeHinting) { - if (enableSlightHinting) + if (enableSlightHinting) { ret |= FT_LOAD_TARGET_LIGHT; + } else { + if (trueType) { + // FT2's autohinting doesn't always work very well (especially with + // font subsets), so turn it off if anti-aliasing is enabled; if + // anti-aliasing is disabled, this seems to be a tossup - some fonts + // look better with hinting, some without, so leave hinting on + if (aa) { + ret |= FT_LOAD_NO_AUTOHINT; + } + } else if (type1) { + // Type 1 fonts seem to look better with 'light' hinting mode + ret |= FT_LOAD_TARGET_LIGHT; + } + } } else { ret |= FT_LOAD_NO_HINTING; } @@ -213,7 +286,7 @@ gid = (FT_UInt)c; } - if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(aa, enableFreeTypeHinting, enableSlightHinting))) { + if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(ff->type1, ff->trueType, aa, enableFreeTypeHinting, enableSlightHinting))) { return gFalse; } @@ -240,6 +313,12 @@ return gFalse; } + if (slot->bitmap.width == 0 || slot->bitmap.rows == 0) { + // this can happen if (a) the glyph is really tiny or (b) the + // metrics in the TrueType file are broken + return gFalse; + } + bitmap->x = -slot->bitmap_left; bitmap->y = slot->bitmap_top; bitmap->w = slot->bitmap.width; @@ -291,12 +370,12 @@ } else { gid = (FT_UInt)c; } - if (ff->trueType && gid == 0) { + if (ff->trueType && gid < 0) { // skip the TrueType notdef glyph return -1; } - if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(aa, enableFreeTypeHinting, enableSlightHinting))) { + if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(ff->type1, ff->trueType, aa, enableFreeTypeHinting, enableSlightHinting))) { return -1; } @@ -340,16 +419,19 @@ } else { gid = (FT_UInt)c; } - if (ff->trueType && gid == 0) { + if (ff->trueType && gid < 0) { // skip the TrueType notdef glyph return NULL; } - if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(aa, enableFreeTypeHinting, enableSlightHinting))) { + if (FT_Load_Glyph(ff->face, gid, getFTLoadFlags(ff->type1, ff->trueType, aa, enableFreeTypeHinting, enableSlightHinting))) { return NULL; } if (FT_Get_Glyph(slot, &glyph)) { return NULL; } + if (FT_Outline_Check(&((FT_OutlineGlyph)glyph)->outline)) { + return NULL; + } path.path = new SplashPath(); path.textScale = textScale; path.needClose = gFalse; diff -Nru poppler-0.18.4/splash/SplashFTFont.h poppler-0.20.5/splash/SplashFTFont.h --- poppler-0.18.4/splash/SplashFTFont.h 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashFTFont.h 2012-08-15 13:31:38.000000000 +0000 @@ -23,7 +23,7 @@ #ifndef SPLASHFTFONT_H #define SPLASHFTFONT_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H @@ -70,7 +70,7 @@ FT_Matrix matrix; FT_Matrix textMatrix; SplashCoord textScale; - double size; + int size; GBool enableFreeTypeHinting; GBool enableSlightHinting; }; diff -Nru poppler-0.18.4/splash/SplashFTFontEngine.cc poppler-0.20.5/splash/SplashFTFontEngine.cc --- poppler-0.18.4/splash/SplashFTFontEngine.cc 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashFTFontEngine.cc 2012-05-10 20:05:44.000000000 +0000 @@ -50,7 +50,7 @@ //------------------------------------------------------------------------ #if 0 -static void fileWrite(void *stream, char *data, int len) { +static void fileWrite(void *stream, const char *data, int len) { fwrite(data, 1, len, (FILE *)stream); } #endif @@ -90,26 +90,26 @@ SplashFontFile *SplashFTFontEngine::loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { return SplashFTFontFile::loadType1Font(this, idA, src, enc); } SplashFontFile *SplashFTFontEngine::loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { return SplashFTFontFile::loadType1Font(this, idA, src, enc); } SplashFontFile *SplashFTFontEngine::loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { return SplashFTFontFile::loadType1Font(this, idA, src, enc); } SplashFontFile *SplashFTFontEngine::loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src) { FoFiType1C *ff; - Gushort *cidToGIDMap; + int *cidToGIDMap; int nCIDs; SplashFontFile *ret; @@ -139,29 +139,34 @@ } SplashFontFile *SplashFTFontEngine::loadOpenTypeCFFFont(SplashFontFileID *idA, - SplashFontSrc *src) { + SplashFontSrc *src, + int *codeToGID, + int codeToGIDLen) { FoFiTrueType *ff; - Gushort *cidToGIDMap; + int *cidToGIDMap; int nCIDs; SplashFontFile *ret; cidToGIDMap = NULL; nCIDs = 0; - if (!useCIDs) { - if (src->isFile) { - ff = FoFiTrueType::load(src->fileName->getCString()); - } else { - ff = FoFiTrueType::make(src->buf, src->bufLen); - } - if (ff) { - if (ff->isOpenTypeCFF()) { - cidToGIDMap = ff->getCIDToGIDMap(&nCIDs); + if (!codeToGID) { + if (!useCIDs) { + if (src->isFile) { + ff = FoFiTrueType::load(src->fileName->getCString()); + } else { + ff = FoFiTrueType::make(src->buf, src->bufLen); + } + if (ff) { + if (ff->isOpenTypeCFF()) { + cidToGIDMap = ff->getCIDToGIDMap(&nCIDs); + } + delete ff; } - delete ff; } } ret = SplashFTFontFile::loadCIDFont(this, idA, src, - cidToGIDMap, nCIDs); + codeToGID ? codeToGID : cidToGIDMap, + codeToGID ? codeToGIDLen : nCIDs); if (!ret) { gfree(cidToGIDMap); } @@ -170,7 +175,7 @@ SplashFontFile *SplashFTFontEngine::loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGID, + int *codeToGID, int codeToGIDLen, int faceIndex) { #if 0 diff -Nru poppler-0.18.4/splash/SplashFTFontEngine.h poppler-0.20.5/splash/SplashFTFontEngine.h --- poppler-0.18.4/splash/SplashFTFontEngine.h 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashFTFontEngine.h 2012-05-10 20:05:44.000000000 +0000 @@ -50,13 +50,14 @@ ~SplashFTFontEngine(); // Load fonts. - SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc); - SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc); - SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc); + SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); + SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); + SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src); - SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src); + SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src, + int *codeToGID, int codeToGIDLen); SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGID, int codeToGIDLen, int faceIndex = 0); + int *codeToGID, int codeToGIDLen, int faceIndex = 0); private: diff -Nru poppler-0.18.4/splash/SplashFTFontFile.cc poppler-0.20.5/splash/SplashFTFontFile.cc --- poppler-0.18.4/splash/SplashFTFontFile.cc 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashFTFontFile.cc 2012-05-10 20:05:44.000000000 +0000 @@ -39,10 +39,10 @@ SplashFontFile *SplashFTFontFile::loadType1Font(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - char **encA) { + const char **encA) { FT_Face faceA; - Gushort *codeToGIDA; - char *name; + int *codeToGIDA; + const char *name; int i; if (src->isFile) { @@ -52,22 +52,22 @@ if (FT_New_Memory_Face(engineA->lib, (const FT_Byte *)src->buf, src->bufLen, 0, &faceA)) return NULL; } - codeToGIDA = (Gushort *)gmallocn(256, sizeof(int)); + codeToGIDA = (int *)gmallocn(256, sizeof(int)); for (i = 0; i < 256; ++i) { codeToGIDA[i] = 0; if ((name = encA[i])) { - codeToGIDA[i] = (Gushort)FT_Get_Name_Index(faceA, name); + codeToGIDA[i] = (int)FT_Get_Name_Index(faceA, (char *)name); } } return new SplashFTFontFile(engineA, idA, src, - faceA, codeToGIDA, 256, gFalse); + faceA, codeToGIDA, 256, gFalse, gTrue); } SplashFontFile *SplashFTFontFile::loadCIDFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGIDA, + int *codeToGIDA, int codeToGIDLenA) { FT_Face faceA; @@ -80,13 +80,13 @@ } return new SplashFTFontFile(engineA, idA, src, - faceA, codeToGIDA, codeToGIDLenA, gFalse); + faceA, codeToGIDA, codeToGIDLenA, gFalse, gFalse); } SplashFontFile *SplashFTFontFile::loadTrueTypeFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGIDA, + int *codeToGIDA, int codeToGIDLenA, int faceIndexA) { FT_Face faceA; @@ -100,15 +100,15 @@ } return new SplashFTFontFile(engineA, idA, src, - faceA, codeToGIDA, codeToGIDLenA, gTrue); + faceA, codeToGIDA, codeToGIDLenA, gTrue, gFalse); } SplashFTFontFile::SplashFTFontFile(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, FT_Face faceA, - Gushort *codeToGIDA, int codeToGIDLenA, - GBool trueTypeA): + int *codeToGIDA, int codeToGIDLenA, + GBool trueTypeA, GBool type1A): SplashFontFile(idA, src) { engine = engineA; @@ -116,6 +116,7 @@ codeToGID = codeToGIDA; codeToGIDLen = codeToGIDLenA; trueType = trueTypeA; + type1 = type1A; } SplashFTFontFile::~SplashFTFontFile() { diff -Nru poppler-0.18.4/splash/SplashFTFontFile.h poppler-0.20.5/splash/SplashFTFontFile.h --- poppler-0.18.4/splash/SplashFTFontFile.h 2011-11-22 21:33:26.000000000 +0000 +++ poppler-0.20.5/splash/SplashFTFontFile.h 2012-05-10 20:05:44.000000000 +0000 @@ -43,15 +43,15 @@ static SplashFontFile *loadType1Font(SplashFTFontEngine *engineA, SplashFontFileID *idA, - SplashFontSrc *src, char **encA); + SplashFontSrc *src, const char **encA); static SplashFontFile *loadCIDFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToCIDA, int codeToGIDLenA); + int *codeToCIDA, int codeToGIDLenA); static SplashFontFile *loadTrueTypeFont(SplashFTFontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGIDA, + int *codeToGIDA, int codeToGIDLenA, int faceIndexA=0); @@ -68,14 +68,15 @@ SplashFontFileID *idA, SplashFontSrc *src, FT_Face faceA, - Gushort *codeToGIDA, int codeToGIDLenA, - GBool trueTypeA); + int *codeToGIDA, int codeToGIDLenA, + GBool trueTypeA, GBool type1A); SplashFTFontEngine *engine; FT_Face face; - Gushort *codeToGID; + int *codeToGID; int codeToGIDLen; GBool trueType; + GBool type1; friend class SplashFTFont; }; diff -Nru poppler-0.18.4/splash/SplashFontEngine.cc poppler-0.20.5/splash/SplashFontEngine.cc --- poppler-0.18.4/splash/SplashFontEngine.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashFontEngine.cc 2012-05-10 20:05:44.000000000 +0000 @@ -133,7 +133,7 @@ SplashFontFile *SplashFontEngine::loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { SplashFontFile *fontFile; fontFile = NULL; @@ -162,7 +162,7 @@ SplashFontFile *SplashFontEngine::loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { SplashFontFile *fontFile; fontFile = NULL; @@ -191,7 +191,7 @@ SplashFontFile *SplashFontEngine::loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { SplashFontFile *fontFile; fontFile = NULL; @@ -235,13 +235,15 @@ } SplashFontFile *SplashFontEngine::loadOpenTypeCFFFont(SplashFontFileID *idA, - SplashFontSrc *src) { + SplashFontSrc *src, + int *codeToGID, + int codeToGIDLen) { SplashFontFile *fontFile; fontFile = NULL; #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H if (!fontFile && ftEngine) { - fontFile = ftEngine->loadOpenTypeCFFFont(idA, src); + fontFile = ftEngine->loadOpenTypeCFFFont(idA, src, codeToGID, codeToGIDLen); } #endif @@ -257,7 +259,7 @@ SplashFontFile *SplashFontEngine::loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGID, + int *codeToGID, int codeToGIDLen, int faceIndex) { SplashFontFile *fontFile; @@ -297,7 +299,7 @@ mat[1] = -(textMat[0] * ctm[1] + textMat[1] * ctm[3]); mat[2] = textMat[2] * ctm[0] + textMat[3] * ctm[2]; mat[3] = -(textMat[2] * ctm[1] + textMat[3] * ctm[3]); - if (splashAbs(mat[0] * mat[3] - mat[1] * mat[2]) < 0.01) { + if (!splashCheckDet(mat[0], mat[1], mat[2], mat[3], 0.01)) { // avoid a singular (or close-to-singular) matrix mat[0] = 0.01; mat[1] = 0; mat[2] = 0; mat[3] = 0.01; diff -Nru poppler-0.18.4/splash/SplashFontEngine.h poppler-0.20.5/splash/SplashFontEngine.h --- poppler-0.18.4/splash/SplashFontEngine.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashFontEngine.h 2012-05-10 20:05:44.000000000 +0000 @@ -70,13 +70,14 @@ SplashFontFile *getFontFile(SplashFontFileID *id); // Load fonts - these create new SplashFontFile objects. - SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc); - SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc); - SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc); + SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); + SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); + SplashFontFile *loadOpenTypeT1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); SplashFontFile *loadCIDFont(SplashFontFileID *idA, SplashFontSrc *src); - SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src); + SplashFontFile *loadOpenTypeCFFFont(SplashFontFileID *idA, SplashFontSrc *src, + int *codeToGID, int codeToGIDLen); SplashFontFile *loadTrueTypeFont(SplashFontFileID *idA, SplashFontSrc *src, - Gushort *codeToGID, int codeToGIDLen, int faceIndex = 0); + int *codeToGID, int codeToGIDLen, int faceIndex = 0); // Get a font - this does a cache lookup first, and if not found, // creates a new SplashFont object and adds it to the cache. The diff -Nru poppler-0.18.4/splash/SplashMath.h poppler-0.20.5/splash/SplashMath.h --- poppler-0.18.4/splash/SplashMath.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashMath.h 2012-08-15 13:31:39.000000000 +0000 @@ -21,7 +21,7 @@ #ifndef SPLASHMATH_H #define SPLASHMATH_H -#include "poppler/poppler-config.h" +#include "poppler-config.h" #if USE_FIXEDPOINT #include "goo/FixedPoint.h" @@ -45,6 +45,42 @@ return FixedPoint::floor(x); #elif USE_FLOAT return (int)floorf(x); + #elif __GNUC__ && __i386__ + // floor() and (int)() are implemented separately, which results + // in changing the FPCW multiple times - so we optimize it with + // some inline assembly + Gushort oldCW, newCW, t; + int result; + + __asm__ volatile("fldl %4\n" + "fnstcw %0\n" + "movw %0, %3\n" + "andw $0xf3ff, %3\n" + "orw $0x0400, %3\n" + "movw %3, %1\n" // round down + "fldcw %1\n" + "fistpl %2\n" + "fldcw %0\n" + : "=m" (oldCW), "=m" (newCW), "=m" (result), "=r" (t) + : "m" (x)); + return result; + #elif defined(WIN32) && defined(_M_IX86) + // floor() and (int)() are implemented separately, which results + // in changing the FPCW multiple times - so we optimize it with + // some inline assembly + Gushort oldCW, newCW; + int result; + + __asm fld QWORD PTR x + __asm fnstcw WORD PTR oldCW + __asm mov ax, WORD PTR oldCW + __asm and ax, 0xf3ff + __asm or ax, 0x0400 + __asm mov WORD PTR newCW, ax // round down + __asm fldcw WORD PTR newCW + __asm fistp DWORD PTR result + __asm fldcw WORD PTR oldCW + return result; #else if (x > 0) return (int)x; else return (int)floor(x); @@ -56,6 +92,42 @@ return FixedPoint::ceil(x); #elif USE_FLOAT return (int)ceilf(x); +#elif __GNUC__ && __i386__ + // ceil() and (int)() are implemented separately, which results + // in changing the FPCW multiple times - so we optimize it with + // some inline assembly + Gushort oldCW, newCW, t; + int result; + + __asm__ volatile("fldl %4\n" + "fnstcw %0\n" + "movw %0, %3\n" + "andw $0xf3ff, %3\n" + "orw $0x0800, %3\n" + "movw %3, %1\n" // round up + "fldcw %1\n" + "fistpl %2\n" + "fldcw %0\n" + : "=m" (oldCW), "=m" (newCW), "=m" (result), "=r" (t) + : "m" (x)); + return result; +#elif defined(WIN32) && defined(_M_IX86) + // ceil() and (int)() are implemented separately, which results + // in changing the FPCW multiple times - so we optimize it with + // some inline assembly + Gushort oldCW, newCW; + int result; + + __asm fld QWORD PTR x + __asm fnstcw WORD PTR oldCW + __asm mov ax, WORD PTR oldCW + __asm and ax, 0xf3ff + __asm or ax, 0x0800 + __asm mov WORD PTR newCW, ax // round up + __asm fldcw WORD PTR newCW + __asm fistp DWORD PTR result + __asm fldcw WORD PTR oldCW + return result; #else return (int)ceil(x); #endif @@ -64,11 +136,57 @@ static inline int splashRound(SplashCoord x) { #if USE_FIXEDPOINT return FixedPoint::round(x); +#elif __GNUC__ && __i386__ + // this could use round-to-nearest mode and avoid the "+0.5", + // but that produces slightly different results (because i+0.5 + // sometimes rounds up and sometimes down using the even rule) + Gushort oldCW, newCW, t; + int result; + + x += 0.5; + __asm__ volatile("fldl %4\n" + "fnstcw %0\n" + "movw %0, %3\n" + "andw $0xf3ff, %3\n" + "orw $0x0400, %3\n" + "movw %3, %1\n" // round down + "fldcw %1\n" + "fistpl %2\n" + "fldcw %0\n" + : "=m" (oldCW), "=m" (newCW), "=m" (result), "=r" (t) + : "m" (x)); + return result; +#elif defined(WIN32) && defined(_M_IX86) + // this could use round-to-nearest mode and avoid the "+0.5", + // but that produces slightly different results (because i+0.5 + // sometimes rounds up and sometimes down using the even rule) + Gushort oldCW, newCW; + int result; + + x += 0.5; + __asm fld QWORD PTR x + __asm fnstcw WORD PTR oldCW + __asm mov ax, WORD PTR oldCW + __asm and ax, 0xf3ff + __asm or ax, 0x0400 + __asm mov WORD PTR newCW, ax // round down + __asm fldcw WORD PTR newCW + __asm fistp DWORD PTR result + __asm fldcw WORD PTR oldCW + return result; #else return (int)splashFloor(x + 0.5); #endif } +static inline SplashCoord splashAvg(SplashCoord x, SplashCoord y) { +#if USE_FIXEDPOINT + return FixedPoint::avg(x, y); +#else + return 0.5 * (x + y); +#endif +} + static inline SplashCoord splashSqrt(SplashCoord x) { #if USE_FIXEDPOINT return FixedPoint::sqrt(x); @@ -97,19 +215,31 @@ #if USE_FIXEDPOINT // this handles the situation where dx*dx or dy*dy is too large to // fit in the 16.16 fixed point format - SplashCoord dxa, dya; + SplashCoord dxa, dya, d; dxa = splashAbs(dx); dya = splashAbs(dy); if (dxa == 0 && dya == 0) { return 0; } else if (dxa > dya) { - return dxa * FixedPoint::sqrt(dya / dxa + 1); + d = dya / dxa; + return dxa * FixedPoint::sqrt(d*d + 1); } else { - return dya * FixedPoint::sqrt(dxa / dya + 1); + d = dxa / dya; + return dya * FixedPoint::sqrt(d*d + 1); } #else return splashSqrt(dx * dx + dy * dy); #endif } +static inline GBool splashCheckDet(SplashCoord m11, SplashCoord m12, + SplashCoord m21, SplashCoord m22, + SplashCoord epsilon) { +#if USE_FIXEDPOINT + return FixedPoint::checkDet(m11, m12, m21, m22, epsilon); +#else + return fabs(m11 * m22 - m12 * m21) >= epsilon; +#endif +} + #endif diff -Nru poppler-0.18.4/splash/SplashPath.cc poppler-0.20.5/splash/SplashPath.cc --- poppler-0.18.4/splash/SplashPath.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashPath.cc 2012-05-10 20:05:44.000000000 +0000 @@ -136,11 +136,12 @@ return splashOk; } -SplashError SplashPath::close() { +SplashError SplashPath::close(GBool force) { if (noCurrentPoint()) { return splashErrNoCurPt; } - if (curSubpath == length - 1 || + if (force || + curSubpath == length - 1 || pts[length - 1].x != pts[curSubpath].x || pts[length - 1].y != pts[curSubpath].y) { lineTo(pts[curSubpath].x, pts[curSubpath].y); diff -Nru poppler-0.18.4/splash/SplashPath.h poppler-0.20.5/splash/SplashPath.h --- poppler-0.18.4/splash/SplashPath.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashPath.h 2012-05-10 20:05:44.000000000 +0000 @@ -77,8 +77,10 @@ SplashCoord x2, SplashCoord y2, SplashCoord x3, SplashCoord y3); - // Close the last subpath, adding a line segment if necessary. - SplashError close(); + // Close the last subpath, adding a line segment if necessary. If + // is true, this adds a line segment even if the current + // point is equal to the first point in the subpath. + SplashError close(GBool force = gFalse); // Add a stroke adjustment hint. The controlling segments are // and (where segments are identified by their first diff -Nru poppler-0.18.4/splash/SplashPattern.cc poppler-0.20.5/splash/SplashPattern.cc --- poppler-0.18.4/splash/SplashPattern.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashPattern.cc 2012-05-10 20:05:44.000000000 +0000 @@ -53,17 +53,3 @@ splashColorCopy(c, color); return gTrue; } - -void SplashSolidColor::overprint(GBool op, Guchar aSrc, SplashColorPtr cSrc, - Guchar aDest, SplashColorPtr cDest, - SplashColorPtr colorResult) { - // default for overprint is knockout: - colorResult[0] = (Guchar)(((aDest - aSrc) * cDest[0] + - aSrc * cSrc[0]) / aDest); - colorResult[1] = (Guchar)(((aDest - aSrc) * cDest[1] + - aSrc * cSrc[1]) / aDest); - colorResult[2] = (Guchar)(((aDest - aSrc) * cDest[2] + - aSrc * cSrc[2]) / aDest); - colorResult[3] = (Guchar)(((aDest - aSrc) * cDest[3] + - aSrc * cSrc[3]) / aDest); -} diff -Nru poppler-0.18.4/splash/SplashPattern.h poppler-0.20.5/splash/SplashPattern.h --- poppler-0.18.4/splash/SplashPattern.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashPattern.h 2012-05-10 20:05:44.000000000 +0000 @@ -52,10 +52,6 @@ // value for all pixels. virtual GBool isStatic() = 0; - // calculate destination color if overprint is enables - virtual void overprint(GBool op, Guchar alphaSrc, SplashColorPtr colorSrc, - Guchar alphaDest, SplashColorPtr colorDest, SplashColorPtr colorResult) = 0; - private: }; @@ -78,9 +74,6 @@ virtual GBool isStatic() { return gTrue; } - virtual void overprint(GBool op, Guchar alphaSrc, SplashColorPtr colorSrc, - Guchar alphaDest, SplashColorPtr colorDest, SplashColorPtr colorResult); - private: SplashColor color; diff -Nru poppler-0.18.4/splash/SplashScreen.cc poppler-0.20.5/splash/SplashScreen.cc --- poppler-0.18.4/splash/SplashScreen.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashScreen.cc 2012-09-08 16:07:00.000000000 +0000 @@ -26,6 +26,7 @@ #include #include +#include #include "goo/gmem.h" #include "SplashMath.h" #include "SplashScreen.h" @@ -46,9 +47,12 @@ int dist; }; -static int cmpDistances(const void *p0, const void *p1) { - return ((SplashScreenPoint *)p0)->dist - ((SplashScreenPoint *)p1)->dist; -} + +struct cmpDistancesFunctor { + bool operator()(const SplashScreenPoint &p0, const SplashScreenPoint &p1) { + return p0.dist < p1.dist; + } +}; //------------------------------------------------------------------------ // SplashScreen @@ -74,41 +78,38 @@ void SplashScreen::createMatrix() { - Guchar u, black, white; - int i; + Guchar u; + int black, white, i; SplashScreenParams *params = screenParams; + // size must be a power of 2, and at least 2 + for (size = 2, log2Size = 1; size < params->size; size <<= 1, ++log2Size) ; + switch (params->type) { case splashScreenDispersed: - // size must be a power of 2 - for (size = 1; size < params->size; size <<= 1) ; mat = (Guchar *)gmallocn(size * size, sizeof(Guchar)); buildDispersedMatrix(size/2, size/2, 1, size/2, 1); break; case splashScreenClustered: - // size must be even - size = (params->size >> 1) << 1; - if (size < 2) { - size = 2; - } mat = (Guchar *)gmallocn(size * size, sizeof(Guchar)); buildClusteredMatrix(); break; case splashScreenStochasticClustered: // size must be at least 2*r - if (params->size < 2 * params->dotRadius) { - size = 2 * params->dotRadius; - } else { - size = params->size; + while (size < (params->dotRadius << 1)) { + size <<= 1; + ++log2Size; } mat = (Guchar *)gmallocn(size * size, sizeof(Guchar)); buildSCDMatrix(params->dotRadius); break; } + + sizeM1 = size - 1; // do gamma correction and compute minVal/maxVal minVal = 255; @@ -127,9 +128,9 @@ u = splashRound((SplashCoord)255.0 * splashPow((SplashCoord)mat[i] / 255.0, params->gamma)); if (u < black) { - u = black; + u = (Guchar)black; } else if (u >= white) { - u = white; + u = (Guchar)white; } mat[i] = u; if (u < minVal) { @@ -144,7 +145,7 @@ int delta, int offset) { if (delta == 0) { // map values in [1, size^2] --> [1, 255] - mat[i * size + j] = 1 + (254 * (val - 1)) / (size * size - 1); + mat[(i << log2Size) + j] = 1 + (254 * (val - 1)) / (size * size - 1); } else { buildDispersedMatrix(i, j, val, delta / 2, 4*offset); @@ -168,7 +169,7 @@ // initialize the threshold matrix for (y = 0; y < size; ++y) { for (x = 0; x < size; ++x) { - mat[y * size + x] = 0; + mat[(y << log2Size) + x] = 0; } } @@ -200,14 +201,12 @@ } // build the threshold matrix - minVal = 1; - maxVal = 0; x1 = y1 = 0; // make gcc happy for (i = 0; i < size * size2; ++i) { d = -1; for (y = 0; y < size; ++y) { for (x = 0; x < size2; ++x) { - if (mat[y * size + x] == 0 && + if (mat[(y << log2Size) + x] == 0 && dist[y * size2 + x] > d) { x1 = x; y1 = y; @@ -217,12 +216,12 @@ } // map values in [0, 2*size*size2-1] --> [1, 255] val = 1 + (254 * (2*i)) / (2*size*size2 - 1); - mat[y1 * size + x1] = val; + mat[(y1 << log2Size) + x1] = val; val = 1 + (254 * (2*i+1)) / (2*size*size2 - 1); if (y1 < size2) { - mat[(y1 + size2) * size + x1 + size2] = val; + mat[((y1 + size2) << log2Size) + x1 + size2] = val; } else { - mat[(y1 - size2) * size + x1 + size2] = val; + mat[((y1 - size2) << log2Size) + x1 + size2] = val; } } @@ -290,7 +289,7 @@ grid = (char *)gmallocn(size * size, sizeof(char)); for (y = 0; y < size; ++y) { for (x = 0; x < size; ++x) { - grid[y*size + x] = 0; + grid[(y << log2Size) + x] = 0; } } @@ -301,7 +300,7 @@ for (i = 0; i < size * size; ++i) { x = pts[i].x; y = pts[i].y; - if (!grid[y*size + x]) { + if (!grid[(y << log2Size) + x]) { if (dotsLen == dotsSize) { dotsSize *= 2; dots = (SplashScreenPoint *)greallocn(dots, dotsSize, @@ -315,10 +314,10 @@ if (tmpl[yy*(r+1) + xx]) { x0 = (x + xx) % size; x1 = (x - xx + size) % size; - grid[y0*size + x0] = 1; - grid[y0*size + x1] = 1; - grid[y1*size + x0] = 1; - grid[y1*size + x1] = 1; + grid[(y0 << log2Size) + x0] = 1; + grid[(y0 << log2Size) + x1] = 1; + grid[(y1 << log2Size) + x0] = 1; + grid[(y1 << log2Size) + x1] = 1; } } } @@ -342,8 +341,8 @@ dMin = d; } } - region[y*size + x] = iMin; - dist[y*size + x] = dMin; + region[(y << log2Size) + x] = iMin; + dist[(y << log2Size) + x] = dMin; } } @@ -352,7 +351,7 @@ n = 0; for (y = 0; y < size; ++y) { for (x = 0; x < size; ++x) { - if (region[y*size + x] == i) { + if (region[(y << log2Size) + x] == i) { pts[n].x = x; pts[n].y = y; pts[n].dist = distance(dots[i].x, dots[i].y, x, y); @@ -360,10 +359,10 @@ } } } - qsort(pts, n, sizeof(SplashScreenPoint), &cmpDistances); + std::sort(pts, pts + n, cmpDistancesFunctor()); for (j = 0; j < n; ++j) { // map values in [0 .. n-1] --> [255 .. 1] - mat[pts[j].y * size + pts[j].x] = 255 - (254 * j) / (n - 1); + mat[(pts[j].y << log2Size) + pts[j].x] = 255 - (254 * j) / (n - 1); } } @@ -377,6 +376,8 @@ SplashScreen::SplashScreen(SplashScreen *screen) { screenParams = screen->screenParams; size = screen->size; + sizeM1 = screen->sizeM1; + log2Size = screen->log2Size; mat = (Guchar *)gmallocn(size * size, sizeof(Guchar)); memcpy(mat, screen->mat, size * size * sizeof(Guchar)); minVal = screen->minVal; @@ -386,29 +387,3 @@ SplashScreen::~SplashScreen() { gfree(mat); } - -int SplashScreen::test(int x, int y, Guchar value) { - int xx, yy; - - if (mat == NULL) createMatrix(); - - if (value < minVal) { - return 0; - } - if (value >= maxVal) { - return 1; - } - if ((xx = x % size) < 0) { - xx = -xx; - } - if ((yy = y % size) < 0) { - yy = -yy; - } - return value < mat[yy * size + xx] ? 0 : 1; -} - -GBool SplashScreen::isStatic(Guchar value) { - if (mat == NULL) createMatrix(); - - return value < minVal || value >= maxVal; -} diff -Nru poppler-0.18.4/splash/SplashScreen.h poppler-0.20.5/splash/SplashScreen.h --- poppler-0.18.4/splash/SplashScreen.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashScreen.h 2012-05-10 20:05:44.000000000 +0000 @@ -27,6 +27,8 @@ #include "SplashTypes.h" +#include + //------------------------------------------------------------------------ // SplashScreen //------------------------------------------------------------------------ @@ -42,12 +44,18 @@ // Return the computed pixel value (0=black, 1=white) for the gray // level at (, ). - int test(int x, int y, Guchar value); + int test(int x, int y, Guchar value) { + int xx, yy; + if (mat == NULL) createMatrix(); + xx = x & sizeM1; + yy = y & sizeM1; + return value < mat[(yy << log2Size) + xx] ? 0 : 1; + } // Returns true if value is above the white threshold or below the // black threshold, i.e., if the corresponding halftone will be // solid white or black. - GBool isStatic(Guchar value); + GBool isStatic(Guchar value) { if (mat == NULL) createMatrix(); return value < minVal || value >= maxVal; } private: void createMatrix(); @@ -61,6 +69,8 @@ SplashScreenParams *screenParams; // params to create the other members Guchar *mat; // threshold matrix int size; // size of the threshold matrix + int sizeM1; // size - 1 + int log2Size; // log2(size) Guchar minVal; // any pixel value below minVal generates // solid black Guchar maxVal; // any pixel value above maxVal generates diff -Nru poppler-0.18.4/splash/SplashState.cc poppler-0.20.5/splash/SplashState.cc --- poppler-0.18.4/splash/SplashState.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashState.cc 2012-05-10 20:05:44.000000000 +0000 @@ -11,7 +11,7 @@ // All changes made under the Poppler project to this file are licensed // under GPL version 2 or later // -// Copyright (C) 2009, 2011 Thomas Freitag +// Copyright (C) 2009, 2011, 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -47,6 +47,7 @@ SplashState::SplashState(int width, int height, GBool vectorAntialias, SplashScreenParams *screenParams) { SplashColor color; + int i; matrix[0] = 1; matrix[1] = 0; matrix[2] = 0; matrix[3] = 1; @@ -74,12 +75,25 @@ fillOverprint = gFalse; strokeOverprint = gFalse; overprintMode = 0; + for (i = 0; i < 256; ++i) { + rgbTransferR[i] = (Guchar)i; + rgbTransferG[i] = (Guchar)i; + rgbTransferB[i] = (Guchar)i; + grayTransfer[i] = (Guchar)i; + cmykTransferC[i] = (Guchar)i; + cmykTransferM[i] = (Guchar)i; + cmykTransferY[i] = (Guchar)i; + cmykTransferK[i] = (Guchar)i; + } + overprintMask = 0xffffffff; + overprintAdditive = gFalse; next = NULL; } SplashState::SplashState(int width, int height, GBool vectorAntialias, SplashScreen *screenA) { SplashColor color; + int i; matrix[0] = 1; matrix[1] = 0; matrix[2] = 0; matrix[3] = 1; @@ -107,6 +121,18 @@ fillOverprint = gFalse; strokeOverprint = gFalse; overprintMode = 0; + for (i = 0; i < 256; ++i) { + rgbTransferR[i] = (Guchar)i; + rgbTransferG[i] = (Guchar)i; + rgbTransferB[i] = (Guchar)i; + grayTransfer[i] = (Guchar)i; + cmykTransferC[i] = (Guchar)i; + cmykTransferM[i] = (Guchar)i; + cmykTransferY[i] = (Guchar)i; + cmykTransferK[i] = (Guchar)i; + } + overprintMask = 0xffffffff; + overprintAdditive = gFalse; next = NULL; } @@ -140,6 +166,16 @@ fillOverprint = state->fillOverprint; strokeOverprint = state->strokeOverprint; overprintMode = state->overprintMode; + memcpy(rgbTransferR, state->rgbTransferR, 256); + memcpy(rgbTransferG, state->rgbTransferG, 256); + memcpy(rgbTransferB, state->rgbTransferB, 256); + memcpy(grayTransfer, state->grayTransfer, 256); + memcpy(cmykTransferC, state->cmykTransferC, 256); + memcpy(cmykTransferM, state->cmykTransferM, 256); + memcpy(cmykTransferY, state->cmykTransferY, 256); + memcpy(cmykTransferK, state->cmykTransferK, 256); + overprintMask = state->overprintMask; + overprintAdditive = state->overprintAdditive; next = NULL; } @@ -189,3 +225,19 @@ softMask = softMaskA; deleteSoftMask = gTrue; } + +void SplashState::setTransfer(Guchar *red, Guchar *green, Guchar *blue, + Guchar *gray) { + int i; + + memcpy(rgbTransferR, red, 256); + memcpy(rgbTransferG, green, 256); + memcpy(rgbTransferB, blue, 256); + memcpy(grayTransfer, gray, 256); + for (i = 0; i < 256; ++i) { + cmykTransferC[i] = 255 - rgbTransferR[255 - i]; + cmykTransferM[i] = 255 - rgbTransferG[255 - i]; + cmykTransferY[i] = 255 - rgbTransferB[255 - i]; + cmykTransferK[i] = 255 - grayTransfer[255 - i]; + } +} diff -Nru poppler-0.18.4/splash/SplashState.h poppler-0.20.5/splash/SplashState.h --- poppler-0.18.4/splash/SplashState.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashState.h 2012-05-10 20:05:44.000000000 +0000 @@ -1,123 +1,136 @@ -//======================================================================== -// -// SplashState.h -// -//======================================================================== - -//======================================================================== -// -// Modified under the Poppler project - http://poppler.freedesktop.org -// -// All changes made under the Poppler project to this file are licensed -// under GPL version 2 or later -// -// Copyright (C) 2011 Thomas Freitag -// -// To see a description of the changes please see the Changelog file that -// came with your tarball or type make ChangeLog if you are building from git -// -//======================================================================== - -#ifndef SPLASHSTATE_H -#define SPLASHSTATE_H - -#ifdef USE_GCC_PRAGMAS -#pragma interface -#endif - -#include "SplashTypes.h" - -class SplashPattern; -class SplashScreen; -class SplashClip; -class SplashBitmap; - -//------------------------------------------------------------------------ -// line cap values -//------------------------------------------------------------------------ - -#define splashLineCapButt 0 -#define splashLineCapRound 1 -#define splashLineCapProjecting 2 - -//------------------------------------------------------------------------ -// line join values -//------------------------------------------------------------------------ - -#define splashLineJoinMiter 0 -#define splashLineJoinRound 1 -#define splashLineJoinBevel 2 - -//------------------------------------------------------------------------ -// SplashState -//------------------------------------------------------------------------ - -class SplashState { -public: - - // Create a new state object, initialized with default settings. - SplashState(int width, int height, GBool vectorAntialias, - SplashScreenParams *screenParams); - SplashState(int width, int height, GBool vectorAntialias, - SplashScreen *screenA); - - // Copy a state object. - SplashState *copy() { return new SplashState(this); } - - ~SplashState(); - - // Set the stroke pattern. This does not copy . - void setStrokePattern(SplashPattern *strokePatternA); - - // Set the fill pattern. This does not copy . - void setFillPattern(SplashPattern *fillPatternA); - - // Set the screen. This does not copy . - void setScreen(SplashScreen *screenA); - - // Set the line dash pattern. This copies the array. - void setLineDash(SplashCoord *lineDashA, int lineDashLengthA, - SplashCoord lineDashPhaseA); - - // Set the soft mask bitmap. - void setSoftMask(SplashBitmap *softMaskA); - - // Set the overprint parametes. - void setFillOverprint(GBool fillOverprintA) { fillOverprint = fillOverprintA; } - void setStrokeOverprint(GBool strokeOverprintA) { strokeOverprint = strokeOverprintA; } - void setOverprintMode(int overprintModeA) { overprintMode = overprintModeA; } - -private: - - SplashState(SplashState *state); - - SplashCoord matrix[6]; - SplashPattern *strokePattern; - SplashPattern *fillPattern; - SplashScreen *screen; - SplashBlendFunc blendFunc; - SplashCoord strokeAlpha; - SplashCoord fillAlpha; - SplashCoord lineWidth; - int lineCap; - int lineJoin; - SplashCoord miterLimit; - SplashCoord flatness; - SplashCoord *lineDash; - int lineDashLength; - SplashCoord lineDashPhase; - GBool strokeAdjust; - SplashClip *clip; - SplashBitmap *softMask; - GBool deleteSoftMask; - GBool inNonIsolatedGroup; - GBool fillOverprint; - GBool strokeOverprint; - int overprintMode; - - SplashState *next; // used by Splash class - - friend class Splash; -}; - -#endif +//======================================================================== +// +// SplashState.h +// +//======================================================================== + +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2011, 2012 Thomas Freitag +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + +#ifndef SPLASHSTATE_H +#define SPLASHSTATE_H + +#ifdef USE_GCC_PRAGMAS +#pragma interface +#endif + +#include "SplashTypes.h" + +class SplashPattern; +class SplashScreen; +class SplashClip; +class SplashBitmap; + +//------------------------------------------------------------------------ +// line cap values +//------------------------------------------------------------------------ + +#define splashLineCapButt 0 +#define splashLineCapRound 1 +#define splashLineCapProjecting 2 + +//------------------------------------------------------------------------ +// line join values +//------------------------------------------------------------------------ + +#define splashLineJoinMiter 0 +#define splashLineJoinRound 1 +#define splashLineJoinBevel 2 + +//------------------------------------------------------------------------ +// SplashState +//------------------------------------------------------------------------ + +class SplashState { +public: + + // Create a new state object, initialized with default settings. + SplashState(int width, int height, GBool vectorAntialias, + SplashScreenParams *screenParams); + SplashState(int width, int height, GBool vectorAntialias, + SplashScreen *screenA); + + // Copy a state object. + SplashState *copy() { return new SplashState(this); } + + ~SplashState(); + + // Set the stroke pattern. This does not copy . + void setStrokePattern(SplashPattern *strokePatternA); + + // Set the fill pattern. This does not copy . + void setFillPattern(SplashPattern *fillPatternA); + + // Set the screen. This does not copy . + void setScreen(SplashScreen *screenA); + + // Set the line dash pattern. This copies the array. + void setLineDash(SplashCoord *lineDashA, int lineDashLengthA, + SplashCoord lineDashPhaseA); + + // Set the soft mask bitmap. + void setSoftMask(SplashBitmap *softMaskA); + + // Set the overprint parametes. + void setFillOverprint(GBool fillOverprintA) { fillOverprint = fillOverprintA; } + void setStrokeOverprint(GBool strokeOverprintA) { strokeOverprint = strokeOverprintA; } + void setOverprintMode(int overprintModeA) { overprintMode = overprintModeA; } + + // Set the transfer function. + void setTransfer(Guchar *red, Guchar *green, Guchar *blue, Guchar *gray); + +private: + + SplashState(SplashState *state); + + SplashCoord matrix[6]; + SplashPattern *strokePattern; + SplashPattern *fillPattern; + SplashScreen *screen; + SplashBlendFunc blendFunc; + SplashCoord strokeAlpha; + SplashCoord fillAlpha; + SplashCoord lineWidth; + int lineCap; + int lineJoin; + SplashCoord miterLimit; + SplashCoord flatness; + SplashCoord *lineDash; + int lineDashLength; + SplashCoord lineDashPhase; + GBool strokeAdjust; + SplashClip *clip; + SplashBitmap *softMask; + GBool deleteSoftMask; + GBool inNonIsolatedGroup; + GBool fillOverprint; + GBool strokeOverprint; + int overprintMode; + Guchar rgbTransferR[256], + rgbTransferG[256], + rgbTransferB[256]; + Guchar grayTransfer[256]; + Guchar cmykTransferC[256], + cmykTransferM[256], + cmykTransferY[256], + cmykTransferK[256]; + Guint overprintMask; + GBool overprintAdditive; + + SplashState *next; // used by Splash class + + friend class Splash; +}; + +#endif diff -Nru poppler-0.18.4/splash/SplashT1Font.cc poppler-0.20.5/splash/SplashT1Font.cc --- poppler-0.18.4/splash/SplashT1Font.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashT1Font.cc 2012-05-10 20:05:44.000000000 +0000 @@ -90,7 +90,7 @@ outlineID = -1; // compute font size - size = (float)splashSqrt(mat[2]*mat[2] + mat[3]*mat[3]); + size = (float)splashDist(0, 0, mat[2], mat[3]); // transform the four corners of the font bounding box -- the min // and max values form the bounding box of the transformed font @@ -239,13 +239,12 @@ T1_OUTLINE *outline; T1_PATHSEGMENT *seg; T1_BEZIERSEGMENT *bez; - SplashCoord x, y, x1, y1; + int x, y, x1, y1; GBool needClose; if (outlineID < 0) { outlineID = T1_CopyFont(((SplashT1FontFile *)fontFile)->t1libID); - outlineSize = (float)splashSqrt(textMat[2]*textMat[2] + - textMat[3]*textMat[3]); + outlineSize = (float)splashDist(0, 0, textMat[2], textMat[3]); matrix.cxx = (double)textMat[0] / outlineSize; matrix.cxy = (double)textMat[1] / outlineSize; matrix.cyx = (double)textMat[2] / outlineSize; @@ -259,8 +258,11 @@ path = new SplashPath(); if ((outline = T1_GetCharOutline(outlineID, c, outlineSize, NULL))) { - x = 0; - y = 0; + // NB: t1lib uses integer coordinates here; we keep a running + // (x,y) total as integers, so that the final point in the path is + // exactly the same as the first point, thus avoiding weird + // mitered join glitches + x = y = 0; needClose = gFalse; for (seg = outline; seg; seg = seg->link) { switch (seg->type) { @@ -269,25 +271,26 @@ path->close(); needClose = gFalse; } - x += seg->dest.x * outlineMul; - y += seg->dest.y * outlineMul; - path->moveTo(x, -y); + x += seg->dest.x; + y += seg->dest.y; + path->moveTo(outlineMul * x, -outlineMul * y); break; case T1_PATHTYPE_LINE: - x += seg->dest.x * outlineMul; - y += seg->dest.y * outlineMul; - path->lineTo(x, -y); + x += seg->dest.x; + y += seg->dest.y; + path->lineTo(outlineMul * x, -outlineMul * y); needClose = gTrue; break; case T1_PATHTYPE_BEZIER: bez = (T1_BEZIERSEGMENT *)seg; - x1 = x + (SplashCoord)(bez->dest.x * outlineMul); - y1 = y + (SplashCoord)(bez->dest.y * outlineMul); - path->curveTo(x + (SplashCoord)(bez->B.x * outlineMul), - -(y + (SplashCoord)(bez->B.y * outlineMul)), - x + (SplashCoord)(bez->C.x * outlineMul), - -(y + (SplashCoord)(bez->C.y * outlineMul)), - x1, -y1); + x1 = x + bez->dest.x; + y1 = y + bez->dest.y; + path->curveTo(outlineMul * (x + bez->B.x), + -outlineMul * (y + bez->B.y), + outlineMul * (x + bez->C.x), + -outlineMul * (y + bez->C.y), + outlineMul * x1, + -outlineMul * y1); x = x1; y = y1; needClose = gTrue; diff -Nru poppler-0.18.4/splash/SplashT1FontEngine.cc poppler-0.20.5/splash/SplashT1FontEngine.cc --- poppler-0.18.4/splash/SplashT1FontEngine.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashT1FontEngine.cc 2012-05-10 20:05:44.000000000 +0000 @@ -51,7 +51,7 @@ //------------------------------------------------------------------------ -static void fileWrite(void *stream, char *data, int len) { +static void fileWrite(void *stream, const char *data, int len) { fwrite(data, 1, len, (FILE *)stream); } @@ -98,13 +98,13 @@ SplashFontFile *SplashT1FontEngine::loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { return SplashT1FontFile::loadType1Font(this, idA, src, enc); } SplashFontFile *SplashT1FontEngine::loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, - char **enc) { + const char **enc) { FoFiType1C *ff; GooString *tmpFileName; FILE *tmpFile; diff -Nru poppler-0.18.4/splash/SplashT1FontEngine.h poppler-0.20.5/splash/SplashT1FontEngine.h --- poppler-0.18.4/splash/SplashT1FontEngine.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashT1FontEngine.h 2012-05-10 20:05:44.000000000 +0000 @@ -31,8 +31,8 @@ ~SplashT1FontEngine(); // Load fonts. - SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, char **enc); - SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, char **enc); + SplashFontFile *loadType1Font(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); + SplashFontFile *loadType1CFont(SplashFontFileID *idA, SplashFontSrc *src, const char **enc); private: diff -Nru poppler-0.18.4/splash/SplashT1FontFile.cc poppler-0.20.5/splash/SplashT1FontFile.cc --- poppler-0.18.4/splash/SplashT1FontFile.cc 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashT1FontFile.cc 2012-05-10 20:05:44.000000000 +0000 @@ -43,9 +43,9 @@ SplashFontFile *SplashT1FontFile::loadType1Font(SplashT1FontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - char **encA) { + const char **encA) { int t1libIDA; - char **encTmp; + const char **encTmp; char *encStrTmp; int encStrSize; char *encPtr; @@ -82,7 +82,7 @@ encStrSize += strlen(encA[i]) + 1; } } - encTmp = (char **)gmallocn(257, sizeof(char *)); + encTmp = (const char **)gmallocn(257, sizeof(char *)); encStrTmp = (char *)gmallocn(encStrSize, sizeof(char)); encPtr = encStrTmp; for (i = 0; i < 256; ++i) { @@ -95,7 +95,7 @@ } } encTmp[256] = "custom"; - T1_ReencodeFont(t1libIDA, encTmp); + T1_ReencodeFont(t1libIDA, (char **)encTmp); ff = new SplashT1FontFile(engineA, idA, src, t1libIDA, encTmp, encStrTmp); @@ -107,7 +107,7 @@ SplashT1FontFile::SplashT1FontFile(SplashT1FontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *srcA, - int t1libIDA, char **encA, char *encStrA): + int t1libIDA, const char **encA, char *encStrA): SplashFontFile(idA, srcA) { engine = engineA; diff -Nru poppler-0.18.4/splash/SplashT1FontFile.h poppler-0.20.5/splash/SplashT1FontFile.h --- poppler-0.18.4/splash/SplashT1FontFile.h 2011-11-22 21:33:27.000000000 +0000 +++ poppler-0.20.5/splash/SplashT1FontFile.h 2012-05-10 20:05:44.000000000 +0000 @@ -41,7 +41,7 @@ static SplashFontFile *loadType1Font(SplashT1FontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - char **encA); + const char **encA); virtual ~SplashT1FontFile(); @@ -55,11 +55,11 @@ SplashT1FontFile(SplashT1FontEngine *engineA, SplashFontFileID *idA, SplashFontSrc *src, - int t1libIDA, char **encA, char *encStrA); + int t1libIDA, const char **encA, char *encStrA); SplashT1FontEngine *engine; int t1libID; // t1lib font ID - char **enc; + const char **enc; char *encStr; friend class SplashT1Font; diff -Nru poppler-0.18.4/splash/SplashXPath.cc poppler-0.20.5/splash/SplashXPath.cc --- poppler-0.18.4/splash/SplashXPath.cc 2012-02-15 17:12:33.000000000 +0000 +++ poppler-0.20.5/splash/SplashXPath.cc 2012-05-10 20:05:44.000000000 +0000 @@ -13,7 +13,6 @@ // // Copyright (C) 2010 Paweł Wiejacha // Copyright (C) 2010, 2011 Albert Astals Cid -// Copyright (C) 2012 Alexander Saprykin // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -66,19 +65,13 @@ // SplashXPath //------------------------------------------------------------------------ -SplashXPath::SplashXPath() { - segs = NULL; - length = size = 0; -} - SplashXPath::SplashXPath(SplashPath *path, SplashCoord *matrix, SplashCoord flatness, GBool closeSubpaths) { SplashPathHint *hint; SplashXPathPoint *pts; SplashXPathAdjust *adjusts, *adjust; SplashCoord x0, y0, x1, y1, x2, y2, x3, y3, xsp, ysp; - SplashCoord adj0, adj1, w; - int ww; + SplashCoord adj0, adj1; int curSubpath, i, j; // transform the points @@ -120,19 +113,24 @@ adj0 = adj1; adj1 = x0; } - w = adj1 - adj0; - ww = splashRound(w); - if (ww == 0) { - ww = 1; - } adjusts[i].x0a = adj0 - 0.01; adjusts[i].x0b = adj0 + 0.01; adjusts[i].xma = (SplashCoord)0.5 * (adj0 + adj1) - 0.01; adjusts[i].xmb = (SplashCoord)0.5 * (adj0 + adj1) + 0.01; adjusts[i].x1a = adj1 - 0.01; adjusts[i].x1b = adj1 + 0.01; - adjusts[i].x0 = (SplashCoord)splashRound(adj0); - adjusts[i].x1 = adjusts[i].x0 + ww - 0.01; + // rounding both edge coordinates can result in lines of + // different widths (e.g., adj=10.1, adj1=11.3 --> x0=10, x1=11; + // adj0=10.4, adj1=11.6 --> x0=10, x1=12), but it has the + // benefit of making adjacent strokes/fills line up without any + // gaps between them + x0 = splashRound(adj0); + x1 = splashRound(adj1); + if (x1 == x0) { + x1 = x1 + 1; + } + adjusts[i].x0 = (SplashCoord)x0; + adjusts[i].x1 = (SplashCoord)x1 - 0.01; adjusts[i].xm = (SplashCoord)0.5 * (adjusts[i].x0 + adjusts[i].x1); adjusts[i].firstPt = hint->firstPt; adjusts[i].lastPt = hint->lastPt; @@ -198,15 +196,7 @@ } else { x1 = pts[i].x; y1 = pts[i].y; - addSegment(x0, y0, x1, y1, - path->flags[i-1] & splashPathFirst, - path->flags[i] & splashPathLast, - !closeSubpaths && - (path->flags[i-1] & splashPathFirst) && - !(path->flags[i-1] & splashPathClosed), - !closeSubpaths && - (path->flags[i] & splashPathLast) && - !(path->flags[i] & splashPathClosed)); + addSegment(x0, y0, x1, y1); x0 = x1; y0 = y1; ++i; @@ -217,8 +207,7 @@ (path->flags[i-1] & splashPathLast) && (pts[i-1].x != pts[curSubpath].x || pts[i-1].y != pts[curSubpath].y)) { - addSegment(x0, y0, xsp, ysp, - gFalse, gTrue, gFalse, gFalse); + addSegment(x0, y0, xsp, ysp); } } } @@ -290,7 +279,11 @@ SplashCoord dx, dy, mx, my, d1, d2, flatness2; int p1, p2, p3; +#if USE_FIXEDPOINT + flatness2 = flatness; +#else flatness2 = flatness * flatness; +#endif // initial segment p1 = 0; @@ -330,21 +323,22 @@ // line) mx = (xl0 + xr3) * 0.5; my = (yl0 + yr3) * 0.5; +#if USE_FIXEDPOINT + d1 = splashDist(xx1, yy1, mx, my); + d2 = splashDist(xx2, yy2, mx, my); +#else dx = xx1 - mx; dy = yy1 - my; d1 = dx*dx + dy*dy; dx = xx2 - mx; dy = yy2 - my; d2 = dx*dx + dy*dy; +#endif // if the curve is flat enough, or no more subdivisions are // allowed, add the straight line segment if (p2 - p1 == 1 || (d1 <= flatness2 && d2 <= flatness2)) { - addSegment(xl0, yl0, xr3, yr3, - p1 == 0 && first, - p2 == splashMaxCurveSplits && last, - p1 == 0 && end0, - p2 == splashMaxCurveSplits && end1); + addSegment(xl0, yl0, xr3, yr3); p1 = p2; // otherwise, subdivide the curve @@ -390,26 +384,13 @@ } void SplashXPath::addSegment(SplashCoord x0, SplashCoord y0, - SplashCoord x1, SplashCoord y1, - GBool first, GBool last, GBool end0, GBool end1) { + SplashCoord x1, SplashCoord y1) { grow(1); segs[length].x0 = x0; segs[length].y0 = y0; segs[length].x1 = x1; segs[length].y1 = y1; segs[length].flags = 0; - if (first) { - segs[length].flags |= splashXPathFirst; - } - if (last) { - segs[length].flags |= splashXPathLast; - } - if (end0) { - segs[length].flags |= splashXPathEnd0; - } - if (end1) { - segs[length].flags |= splashXPathEnd1; - } if (y1 == y0) { segs[length].dxdy = segs[length].dydx = 0; segs[length].flags |= splashXPathHoriz; @@ -442,31 +423,27 @@ ++length; } -static bool cmpXPathSegs(const SplashXPathSeg &seg0, const SplashXPathSeg &seg1) { - SplashCoord x0, y0, x1, y1; - - if (seg0.flags & splashXPathFlip) { - x0 = seg0.x1; - y0 = seg0.y1; - } else { - x0 = seg0.x0; - y0 = seg0.y0; - } - if (seg1.flags & splashXPathFlip) { - x1 = seg1.x1; - y1 = seg1.y1; - } else { - x1 = seg1.x0; - y1 = seg1.y0; - } - if (y0 != y1) { - return (y0 < y1) ? true : false; - } - if (x0 != x1) { - return (x0 < x1) ? true : false; +struct cmpXPathSegsFunctor { + bool operator()(const SplashXPathSeg &seg0, const SplashXPathSeg &seg1) { + SplashCoord x0, y0, x1, y1; + + if (seg0.flags & splashXPathFlip) { + x0 = seg0.x1; + y0 = seg0.y1; + } else { + x0 = seg0.x0; + y0 = seg0.y0; + } + if (seg1.flags & splashXPathFlip) { + x1 = seg1.x1; + y1 = seg1.y1; + } else { + x1 = seg1.x0; + y1 = seg1.y0; + } + return (y0 != y1) ? (y0 < y1) : (x0 < x1); } - return false; -} +}; void SplashXPath::aaScale() { SplashXPathSeg *seg; @@ -481,5 +458,5 @@ } void SplashXPath::sort() { - std::sort(segs, segs + length, &cmpXPathSegs); + std::sort(segs, segs + length, cmpXPathSegsFunctor()); } diff -Nru poppler-0.18.4/splash/SplashXPath.h poppler-0.20.5/splash/SplashXPath.h --- poppler-0.18.4/splash/SplashXPath.h 2011-11-22 21:33:28.000000000 +0000 +++ poppler-0.20.5/splash/SplashXPath.h 2012-05-10 20:05:44.000000000 +0000 @@ -32,15 +32,11 @@ Guint flags; }; -#define splashXPathFirst 0x01 // first segment of a subpath -#define splashXPathLast 0x02 // last segment of a subpath -#define splashXPathEnd0 0x04 // first endpoint is end of an open subpath -#define splashXPathEnd1 0x08 // second endpoint is end of an open subpath -#define splashXPathHoriz 0x10 // segment is vertical (y0 == y1) +#define splashXPathHoriz 0x01 // segment is vertical (y0 == y1) // (dxdy is undef) -#define splashXPathVert 0x20 // segment is horizontal (x0 == x1) +#define splashXPathVert 0x02 // segment is horizontal (x0 == x1) // (dydx is undef) -#define splashXPathFlip 0x40 // y0 > y1 +#define splashXPathFlip 0x04 // y0 > y1 //------------------------------------------------------------------------ // SplashXPath @@ -70,7 +66,6 @@ protected: - SplashXPath(); SplashXPath(SplashXPath *xPath); void transform(SplashCoord *matrix, SplashCoord xi, SplashCoord yi, SplashCoord *xo, SplashCoord *yo); @@ -84,8 +79,7 @@ SplashCoord flatness, GBool first, GBool last, GBool end0, GBool end1); void addSegment(SplashCoord x0, SplashCoord y0, - SplashCoord x1, SplashCoord y1, - GBool first, GBool last, GBool end0, GBool end1); + SplashCoord x1, SplashCoord y1); SplashXPathSeg *segs; int length, size; // length and size of segs array diff -Nru poppler-0.18.4/splash/SplashXPathScanner.cc poppler-0.20.5/splash/SplashXPathScanner.cc --- poppler-0.18.4/splash/SplashXPathScanner.cc 2011-11-22 21:33:28.000000000 +0000 +++ poppler-0.20.5/splash/SplashXPathScanner.cc 2012-09-09 20:52:41.000000000 +0000 @@ -37,25 +37,30 @@ //------------------------------------------------------------------------ struct SplashIntersect { + int y; int x0, x1; // intersection of segment with [y, y+1) int count; // EO/NZWN counter increment }; -static bool cmpIntersect(const SplashIntersect &p0, const SplashIntersect &p1) { - return p0.x0 < p1.x0; -} +struct cmpIntersectFunctor { + bool operator()(const SplashIntersect &i0, const SplashIntersect &i1) { + return (i0.y != i1.y) ? (i0.y < i1.y) : (i0.x0 < i1.x0); + } +}; //------------------------------------------------------------------------ // SplashXPathScanner //------------------------------------------------------------------------ -SplashXPathScanner::SplashXPathScanner(SplashXPath *xPathA, GBool eoA) { +SplashXPathScanner::SplashXPathScanner(SplashXPath *xPathA, GBool eoA, + int clipYMin, int clipYMax) { SplashXPathSeg *seg; SplashCoord xMinFP, yMinFP, xMaxFP, yMaxFP; int i; xPath = xPathA; eo = eoA; + partialClip = gFalse; // compute the bbox if (xPath->length == 0) { @@ -103,16 +108,25 @@ xMax = splashFloor(xMaxFP); yMin = splashFloor(yMinFP); yMax = splashFloor(yMaxFP); + if (clipYMin > yMin) { + yMin = clipYMin; + partialClip = gTrue; + } + if (clipYMax < yMax) { + yMax = clipYMax; + partialClip = gTrue; + } } - interY = yMin - 1; - xPathIdx = 0; + allInter = NULL; inter = NULL; - interLen = interSize = 0; + computeIntersections(); + interY = yMin - 1; } SplashXPathScanner::~SplashXPathScanner() { gfree(inter); + gfree(allInter); } void SplashXPathScanner::getBBoxAA(int *xMinA, int *yMinA, @@ -124,12 +138,23 @@ } void SplashXPathScanner::getSpanBounds(int y, int *spanXMin, int *spanXMax) { - if (interY != y) { - computeIntersections(y); + int interBegin, interEnd, xx, i; + + if (y < yMin || y > yMax) { + interBegin = interEnd = 0; + } else { + interBegin = inter[y - yMin]; + interEnd = inter[y - yMin + 1]; } - if (interLen > 0) { - *spanXMin = inter[0].x0; - *spanXMax = inter[interLen - 1].x1; + if (interBegin < interEnd) { + *spanXMin = allInter[interBegin].x0; + xx = allInter[interBegin].x1; + for (i = interBegin + 1; i < interEnd; ++i) { + if (allInter[i].x1 > xx) { + xx = allInter[i].x1; + } + } + *spanXMax = xx; } else { *spanXMin = xMax + 1; *spanXMax = xMax; @@ -137,47 +162,50 @@ } GBool SplashXPathScanner::test(int x, int y) { - int count, i; + int interBegin, interEnd, count, i; - if (interY != y) { - computeIntersections(y); + if (y < yMin || y > yMax) { + return gFalse; } + interBegin = inter[y - yMin]; + interEnd = inter[y - yMin + 1]; count = 0; - for (i = 0; i < interLen && inter[i].x0 <= x; ++i) { - if (x <= inter[i].x1) { + for (i = interBegin; i < interEnd && allInter[i].x0 <= x; ++i) { + if (x <= allInter[i].x1) { return gTrue; } - count += inter[i].count; + count += allInter[i].count; } return eo ? (count & 1) : (count != 0); } GBool SplashXPathScanner::testSpan(int x0, int x1, int y) { - int count, xx1, i; + int interBegin, interEnd, count, xx1, i; - if (interY != y) { - computeIntersections(y); + if (y < yMin || y > yMax) { + return gFalse; } - + interBegin = inter[y - yMin]; + interEnd = inter[y - yMin + 1]; count = 0; - for (i = 0; i < interLen && inter[i].x1 < x0; ++i) { - count += inter[i].count; + for (i = interBegin; i < interEnd && allInter[i].x1 < x0; ++i) { + count += allInter[i].count; } // invariant: the subspan [x0,xx1] is inside the path xx1 = x0 - 1; while (xx1 < x1) { - if (i >= interLen) { + if (i >= interEnd) { return gFalse; } - if (inter[i].x0 > xx1 + 1 && + if (allInter[i].x0 > xx1 + 1 && !(eo ? (count & 1) : (count != 0))) { return gFalse; } - if (inter[i].x1 > xx1) { - xx1 = inter[i].x1; + if (allInter[i].x1 > xx1) { + xx1 = allInter[i].x1; } - count += inter[i].count; + count += allInter[i].count; ++i; } @@ -185,25 +213,31 @@ } GBool SplashXPathScanner::getNextSpan(int y, int *x0, int *x1) { - int xx0, xx1; + int interEnd, xx0, xx1; + if (y < yMin || y > yMax) { + return gFalse; + } if (interY != y) { - computeIntersections(y); + interY = y; + interIdx = inter[y - yMin]; + interCount = 0; } - if (interIdx >= interLen) { + interEnd = inter[y - yMin + 1]; + if (interIdx >= interEnd) { return gFalse; } - xx0 = inter[interIdx].x0; - xx1 = inter[interIdx].x1; - interCount += inter[interIdx].count; + xx0 = allInter[interIdx].x0; + xx1 = allInter[interIdx].x1; + interCount += allInter[interIdx].count; ++interIdx; - while (interIdx < interLen && - (inter[interIdx].x0 <= xx1 || + while (interIdx < interEnd && + (allInter[interIdx].x0 <= xx1 || (eo ? (interCount & 1) : (interCount != 0)))) { - if (inter[interIdx].x1 > xx1) { - xx1 = inter[interIdx].x1; + if (allInter[interIdx].x1 > xx1) { + xx1 = allInter[interIdx].x1; } - interCount += inter[interIdx].count; + interCount += allInter[interIdx].count; ++interIdx; } *x0 = xx0; @@ -211,214 +245,269 @@ return gTrue; } -void SplashXPathScanner::computeIntersections(int y) { - SplashCoord xSegMin, xSegMax, ySegMin, ySegMax, xx0, xx1; +void SplashXPathScanner::computeIntersections() { SplashXPathSeg *seg; - int i, j; + SplashCoord segXMin, segXMax, segYMin, segYMax, xx0, xx1; + int x, y, y0, y1, i; - // find the first segment that intersects [y, y+1) - i = (y >= interY) ? xPathIdx : 0; - while (i < xPath->length && - xPath->segs[i].y0 < y && xPath->segs[i].y1 < y) { - ++i; + if (yMin > yMax) { + return; } - xPathIdx = i; - // find all of the segments that intersect [y, y+1) and create an - // Intersect element for each one - interLen = 0; - for (j = i; j < xPath->length; ++j) { - seg = &xPath->segs[j]; + // build the list of all intersections + allInterLen = 0; + allInterSize = 16; + allInter = (SplashIntersect *)gmallocn(allInterSize, + sizeof(SplashIntersect)); + for (i = 0; i < xPath->length; ++i) { + seg = &xPath->segs[i]; if (seg->flags & splashXPathFlip) { - ySegMin = seg->y1; - ySegMax = seg->y0; + segYMin = seg->y1; + segYMax = seg->y0; } else { - ySegMin = seg->y0; - ySegMax = seg->y1; - } - - // ensure that: ySegMin < y+1 - // y <= ySegMax - if (ySegMin >= y + 1) { - break; - } - if (ySegMax < y) { - continue; - } - - if (interLen == interSize) { - if (interSize == 0) { - interSize = 16; - } else { - interSize *= 2; - } - inter = (SplashIntersect *)greallocn(inter, interSize, - sizeof(SplashIntersect)); + segYMin = seg->y0; + segYMax = seg->y1; } - if (seg->flags & splashXPathHoriz) { - xx0 = seg->x0; - xx1 = seg->x1; + y = splashFloor(seg->y0); + if (y >= yMin && y <= yMax) { + addIntersection(segYMin, segYMax, seg->flags, + y, splashFloor(seg->x0), splashFloor(seg->x1)); + } } else if (seg->flags & splashXPathVert) { - xx0 = xx1 = seg->x0; + y0 = splashFloor(segYMin); + if (y0 < yMin) { + y0 = yMin; + } + y1 = splashFloor(segYMax); + if (y1 > yMax) { + y1 = yMax; + } + x = splashFloor(seg->x0); + for (y = y0; y <= y1; ++y) { + addIntersection(segYMin, segYMax, seg->flags, y, x, x); + } } else { if (seg->x0 < seg->x1) { - xSegMin = seg->x0; - xSegMax = seg->x1; + segXMin = seg->x0; + segXMax = seg->x1; } else { - xSegMin = seg->x1; - xSegMax = seg->x0; + segXMin = seg->x1; + segXMax = seg->x0; + } + y0 = splashFloor(segYMin); + if (y0 < yMin) { + y0 = yMin; + } + y1 = splashFloor(segYMax); + if (y1 > yMax) { + y1 = yMax; + } + // this loop could just add seg->dxdy to xx1 on each iteration, + // but that introduces numerical accuracy problems + xx1 = seg->x0 + ((SplashCoord)y0 - seg->y0) * seg->dxdy; + for (y = y0; y <= y1; ++y) { + xx0 = xx1; + xx1 = seg->x0 + ((SplashCoord)(y + 1) - seg->y0) * seg->dxdy; + // the segment may not actually extend to the top and/or bottom edges + if (xx0 < segXMin) { + xx0 = segXMin; + } else if (xx0 > segXMax) { + xx0 = segXMax; + } + if (xx1 < segXMin) { + xx1 = segXMin; + } else if (xx1 > segXMax) { + xx1 = segXMax; + } + addIntersection(segYMin, segYMax, seg->flags, y, + splashFloor(xx0), splashFloor(xx1)); } - // intersection with top edge - xx0 = seg->x0 + ((SplashCoord)y - seg->y0) * seg->dxdy; - // intersection with bottom edge - xx1 = seg->x0 + ((SplashCoord)y + 1 - seg->y0) * seg->dxdy; - // the segment may not actually extend to the top and/or bottom edges - if (xx0 < xSegMin) { - xx0 = xSegMin; - } else if (xx0 > xSegMax) { - xx0 = xSegMax; - } - if (xx1 < xSegMin) { - xx1 = xSegMin; - } else if (xx1 > xSegMax) { - xx1 = xSegMax; - } - } - if (xx0 < xx1) { - inter[interLen].x0 = splashFloor(xx0); - inter[interLen].x1 = splashFloor(xx1); - } else { - inter[interLen].x0 = splashFloor(xx1); - inter[interLen].x1 = splashFloor(xx0); - } - if (ySegMin <= y && - (SplashCoord)y < ySegMax && - !(seg->flags & splashXPathHoriz)) { - inter[interLen].count = eo ? 1 - : (seg->flags & splashXPathFlip) ? 1 : -1; - } else { - inter[interLen].count = 0; } - ++interLen; } - - std::sort(inter, inter + interLen, cmpIntersect); - - interY = y; - interIdx = 0; - interCount = 0; + std::sort(allInter, allInter + allInterLen, cmpIntersectFunctor()); + + // build the list of y pointers + inter = (int *)gmallocn(yMax - yMin + 2, sizeof(int)); + i = 0; + for (y = yMin; y <= yMax; ++y) { + inter[y - yMin] = i; + while (i < allInterLen && allInter[i].y <= y) { + ++i; + } + } + inter[yMax - yMin + 1] = i; +} + +void SplashXPathScanner::addIntersection(double segYMin, double segYMax, + Guint segFlags, + int y, int x0, int x1) { + if (allInterLen == allInterSize) { + allInterSize *= 2; + allInter = (SplashIntersect *)greallocn(allInter, allInterSize, + sizeof(SplashIntersect)); + } + allInter[allInterLen].y = y; + if (x0 < x1) { + allInter[allInterLen].x0 = x0; + allInter[allInterLen].x1 = x1; + } else { + allInter[allInterLen].x0 = x1; + allInter[allInterLen].x1 = x0; + } + if (segYMin <= y && + (SplashCoord)y < segYMax && + !(segFlags & splashXPathHoriz)) { + allInter[allInterLen].count = eo ? 1 + : (segFlags & splashXPathFlip) ? 1 : -1; + } else { + allInter[allInterLen].count = 0; + } + ++allInterLen; } void SplashXPathScanner::renderAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y) { - int xx0, xx1, xx, xxMin, xxMax, yy; + int xx0, xx1, xx, xxMin, xxMax, yy, interEnd; Guchar mask; SplashColorPtr p; memset(aaBuf->getDataPtr(), 0, aaBuf->getRowSize() * aaBuf->getHeight()); xxMin = aaBuf->getWidth(); xxMax = -1; - for (yy = 0; yy < splashAASize; ++yy) { - computeIntersections(splashAASize * y + yy); - while (interIdx < interLen) { - xx0 = inter[interIdx].x0; - xx1 = inter[interIdx].x1; - interCount += inter[interIdx].count; - ++interIdx; - while (interIdx < interLen && - (inter[interIdx].x0 <= xx1 || - (eo ? (interCount & 1) : (interCount != 0)))) { - if (inter[interIdx].x1 > xx1) { - xx1 = inter[interIdx].x1; - } - interCount += inter[interIdx].count; - ++interIdx; - } - if (xx0 < 0) { - xx0 = 0; + if (yMin <= yMax) { + if (splashAASize * y < yMin) { + interIdx = inter[0]; + } else if (splashAASize * y > yMax) { + interIdx = inter[yMax - yMin + 1]; + } else { + interIdx = inter[splashAASize * y - yMin]; + } + for (yy = 0; yy < splashAASize; ++yy) { + if (splashAASize * y + yy < yMin) { + interEnd = inter[0]; + } else if (splashAASize * y + yy > yMax) { + interEnd = inter[yMax - yMin + 1]; + } else { + interEnd = inter[splashAASize * y + yy - yMin + 1]; } - ++xx1; - if (xx1 > aaBuf->getWidth()) { - xx1 = aaBuf->getWidth(); - } - // set [xx0, xx1) to 1 - if (xx0 < xx1) { - xx = xx0; - p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3); - if (xx & 7) { - mask = 0xff >> (xx & 7); - if ((xx & ~7) == (xx1 & ~7)) { - mask &= (Guchar)(0xff00 >> (xx1 & 7)); + interCount = 0; + while (interIdx < interEnd) { + xx0 = allInter[interIdx].x0; + xx1 = allInter[interIdx].x1; + interCount += allInter[interIdx].count; + ++interIdx; + while (interIdx < interEnd && + (allInter[interIdx].x0 <= xx1 || + (eo ? (interCount & 1) : (interCount != 0)))) { + if (allInter[interIdx].x1 > xx1) { + xx1 = allInter[interIdx].x1; } - *p++ |= mask; - xx = (xx & ~7) + 8; + interCount += allInter[interIdx].count; + ++interIdx; } - for (; xx + 7 < xx1; xx += 8) { - *p++ |= 0xff; + if (xx0 < 0) { + xx0 = 0; } - if (xx < xx1) { - *p |= (Guchar)(0xff00 >> (xx1 & 7)); + ++xx1; + if (xx1 > aaBuf->getWidth()) { + xx1 = aaBuf->getWidth(); + } + // set [xx0, xx1) to 1 + if (xx0 < xx1) { + xx = xx0; + p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3); + if (xx & 7) { + mask = 0xff >> (xx & 7); + if ((xx & ~7) == (xx1 & ~7)) { + mask &= (Guchar)(0xff00 >> (xx1 & 7)); + } + *p++ |= mask; + xx = (xx & ~7) + 8; + } + for (; xx + 7 < xx1; xx += 8) { + *p++ |= 0xff; + } + if (xx < xx1) { + *p |= (Guchar)(0xff00 >> (xx1 & 7)); + } + } + if (xx0 < xxMin) { + xxMin = xx0; + } + if (xx1 > xxMax) { + xxMax = xx1; } - } - if (xx0 < xxMin) { - xxMin = xx0; - } - if (xx1 > xxMax) { - xxMax = xx1; } } } + if (xxMin > xxMax) { + xxMin = xxMax; + } *x0 = xxMin / splashAASize; *x1 = (xxMax - 1) / splashAASize; } void SplashXPathScanner::clipAALine(SplashBitmap *aaBuf, int *x0, int *x1, int y) { - int xx0, xx1, xx, yy; + int xx0, xx1, xx, yy, interEnd; Guchar mask; SplashColorPtr p; for (yy = 0; yy < splashAASize; ++yy) { xx = *x0 * splashAASize; - computeIntersections(splashAASize * y + yy); - while (interIdx < interLen && xx < (*x1 + 1) * splashAASize) { - xx0 = inter[interIdx].x0; - xx1 = inter[interIdx].x1; - interCount += inter[interIdx].count; - ++interIdx; - while (interIdx < interLen && - (inter[interIdx].x0 <= xx1 || - (eo ? (interCount & 1) : (interCount != 0)))) { - if (inter[interIdx].x1 > xx1) { - xx1 = inter[interIdx].x1; + if (yMin <= yMax) { + if (splashAASize * y + yy < yMin) { + interIdx = interEnd = inter[0]; + } else if (splashAASize * y + yy > yMax) { + interIdx = interEnd = inter[yMax - yMin + 1]; + } else { + interIdx = inter[splashAASize * y + yy - yMin]; + if (splashAASize * y + yy > yMax) { + interEnd = inter[yMax - yMin + 1]; + } else { + interEnd = inter[splashAASize * y + yy - yMin + 1]; } - interCount += inter[interIdx].count; - ++interIdx; } - if (xx0 > aaBuf->getWidth()) { - xx0 = aaBuf->getWidth(); - } - // set [xx, xx0) to 0 - if (xx < xx0) { - p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3); - if (xx & 7) { - mask = (Guchar)(0xff00 >> (xx & 7)); - if ((xx & ~7) == (xx0 & ~7)) { - mask |= 0xff >> (xx0 & 7); + interCount = 0; + while (interIdx < interEnd && xx < (*x1 + 1) * splashAASize) { + xx0 = allInter[interIdx].x0; + xx1 = allInter[interIdx].x1; + interCount += allInter[interIdx].count; + ++interIdx; + while (interIdx < interEnd && + (allInter[interIdx].x0 <= xx1 || + (eo ? (interCount & 1) : (interCount != 0)))) { + if (allInter[interIdx].x1 > xx1) { + xx1 = allInter[interIdx].x1; } - *p++ &= mask; - xx = (xx & ~7) + 8; + interCount += allInter[interIdx].count; + ++interIdx; } - for (; xx + 7 <= xx0; xx += 8) { - *p++ = 0x00; + if (xx0 > aaBuf->getWidth()) { + xx0 = aaBuf->getWidth(); } + // set [xx, xx0) to 0 if (xx < xx0) { - *p &= 0xff >> (xx0 & 7); + p = aaBuf->getDataPtr() + yy * aaBuf->getRowSize() + (xx >> 3); + if (xx & 7) { + mask = (Guchar)(0xff00 >> (xx & 7)); + if ((xx & ~7) == (xx0 & ~7)) { + mask |= 0xff >> (xx0 & 7); + } + *p++ &= mask; + xx = (xx & ~7) + 8; + } + for (; xx + 7 < xx0; xx += 8) { + *p++ = 0x00; + } + if (xx < xx0) { + *p &= 0xff >> (xx0 & 7); + } + } + if (xx1 >= xx) { + xx = xx1 + 1; } - } - if (xx1 >= xx) { - xx = xx1 + 1; } } xx0 = (*x1 + 1) * splashAASize; @@ -434,7 +523,7 @@ *p++ &= mask; xx = (xx & ~7) + 8; } - for (; xx + 7 <= xx0; xx += 8) { + for (; xx + 7 < xx0; xx += 8) { *p++ = 0x00; } if (xx < xx0) { diff -Nru poppler-0.18.4/splash/SplashXPathScanner.h poppler-0.20.5/splash/SplashXPathScanner.h --- poppler-0.18.4/splash/SplashXPathScanner.h 2011-11-22 21:33:28.000000000 +0000 +++ poppler-0.20.5/splash/SplashXPathScanner.h 2012-05-10 20:05:44.000000000 +0000 @@ -25,7 +25,8 @@ public: // Create a new SplashXPathScanner object. must be sorted. - SplashXPathScanner(SplashXPath *xPathA, GBool eoA); + SplashXPathScanner(SplashXPath *xPathA, GBool eoA, + int clipYMin, int clipYMax); ~SplashXPathScanner(); @@ -36,6 +37,10 @@ // Return the path's bounding box. void getBBoxAA(int *xMinA, int *yMinA, int *xMaxA, int *yMaxA); + // Returns true if at least part of the path was outside the + // clipYMin/clipYMax bounds passed to the constructor. + GBool hasPartialClip() { return partialClip; } + // Return the min/max x values for the span at . void getSpanBounds(int y, int *spanXMin, int *spanXMax); @@ -64,22 +69,25 @@ private: - void computeIntersections(int y); + void computeIntersections(); + void addIntersection(double segYMin, double segYMax, + Guint segFlags, + int y, int x0, int x1); SplashXPath *xPath; GBool eo; int xMin, yMin, xMax, yMax; + GBool partialClip; - int interY; // current y value + SplashIntersect *allInter; // array of intersections + int allInterLen; // number of intersections in + int allInterSize; // size of the array + int *inter; // indexes into for each y value + int interY; // current y value - used by getNextSpan int interIdx; // current index into - used by // getNextSpan int interCount; // current EO/NZWN counter - used by // getNextSpan - int xPathIdx; // current index into - used by - // computeIntersections - SplashIntersect *inter; // intersections array for - int interLen; // number of intersections in - int interSize; // size of the array }; #endif diff -Nru poppler-0.18.4/test/Makefile.in poppler-0.20.5/test/Makefile.in --- poppler-0.18.4/test/Makefile.in 2012-02-15 17:22:45.000000000 +0000 +++ poppler-0.20.5/test/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -64,8 +81,8 @@ gtk_test_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \ $(top_builddir)/glib/libpoppler-glib.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am_pdf_fullrewrite_OBJECTS = pdf-fullrewrite.$(OBJEXT) pdf_fullrewrite_OBJECTS = $(am_pdf_fullrewrite_OBJECTS) @@ -92,26 +109,31 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(gtk_test_SOURCES) $(pdf_fullrewrite_SOURCES) \ $(pdf_inspector_SOURCES) $(perf_test_SOURCES) DIST_SOURCES = $(gtk_test_SOURCES) $(pdf_fullrewrite_SOURCES) \ $(pdf_inspector_SOURCES) $(perf_test_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -187,12 +209,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -246,6 +272,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -422,16 +449,16 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -gtk-test$(EXEEXT): $(gtk_test_OBJECTS) $(gtk_test_DEPENDENCIES) +gtk-test$(EXEEXT): $(gtk_test_OBJECTS) $(gtk_test_DEPENDENCIES) $(EXTRA_gtk_test_DEPENDENCIES) @rm -f gtk-test$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(gtk_test_OBJECTS) $(gtk_test_LDADD) $(LIBS) -pdf-fullrewrite$(EXEEXT): $(pdf_fullrewrite_OBJECTS) $(pdf_fullrewrite_DEPENDENCIES) +pdf-fullrewrite$(EXEEXT): $(pdf_fullrewrite_OBJECTS) $(pdf_fullrewrite_DEPENDENCIES) $(EXTRA_pdf_fullrewrite_DEPENDENCIES) @rm -f pdf-fullrewrite$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdf_fullrewrite_OBJECTS) $(pdf_fullrewrite_LDADD) $(LIBS) -pdf_inspector$(EXEEXT): $(pdf_inspector_OBJECTS) $(pdf_inspector_DEPENDENCIES) +pdf_inspector$(EXEEXT): $(pdf_inspector_OBJECTS) $(pdf_inspector_DEPENDENCIES) $(EXTRA_pdf_inspector_DEPENDENCIES) @rm -f pdf_inspector$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdf_inspector_OBJECTS) $(pdf_inspector_LDADD) $(LIBS) -perf-test$(EXEEXT): $(perf_test_OBJECTS) $(perf_test_DEPENDENCIES) +perf-test$(EXEEXT): $(perf_test_OBJECTS) $(perf_test_DEPENDENCIES) $(EXTRA_perf_test_DEPENDENCIES) @rm -f perf-test$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(perf_test_OBJECTS) $(perf_test_LDADD) $(LIBS) @@ -450,26 +477,23 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo @@ -573,10 +597,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/test/gtk-test.cc poppler-0.20.5/test/gtk-test.cc --- poppler-0.18.4/test/gtk-test.cc 2011-11-22 21:33:28.000000000 +0000 +++ poppler-0.20.5/test/gtk-test.cc 2012-06-11 13:19:41.000000000 +0000 @@ -329,7 +329,7 @@ view->out = new GDKSplashOutputDev (gtk_widget_get_screen (window), redraw_callback, (void*) view, sc); - view->out->startDoc(view->doc->doc->getXRef()); + view->out->startDoc(view->doc->doc); } g_signal_connect (view->drawing_area, diff -Nru poppler-0.18.4/test/pdf-inspector.cc poppler-0.20.5/test/pdf-inspector.cc --- poppler-0.18.4/test/pdf-inspector.cc 2011-11-22 21:33:28.000000000 +0000 +++ poppler-0.20.5/test/pdf-inspector.cc 2012-05-10 20:05:44.000000000 +0000 @@ -310,7 +310,7 @@ gtk_spin_button_set_range (GTK_SPIN_BUTTON (spin), 0, doc->getNumPages()-1); gtk_spin_button_set_value (GTK_SPIN_BUTTON (spin), 0); - output->startDoc (doc->getXRef(), doc->getCatalog()); + output->startDoc (doc); } else { diff -Nru poppler-0.18.4/test/pdf-operators.c poppler-0.20.5/test/pdf-operators.c --- poppler-0.18.4/test/pdf-operators.c 2011-11-22 21:33:28.000000000 +0000 +++ poppler-0.20.5/test/pdf-operators.c 2012-05-10 20:05:44.000000000 +0000 @@ -1,7 +1,7 @@ typedef struct { - char *op; - char *description; + const char *op; + const char *description; } OperatorMapping; OperatorMapping op_mapping[] = { diff -Nru poppler-0.18.4/test/perf-test.cc poppler-0.20.5/test/perf-test.cc --- poppler-0.18.4/test/perf-test.cc 2011-11-22 21:33:29.000000000 +0000 +++ poppler-0.20.5/test/perf-test.cc 2012-06-11 13:19:41.000000000 +0000 @@ -431,7 +431,7 @@ GBool bitmapTopDown = gTrue; _outputDev = new SplashOutputDev(gSplashColorMode, 4, gFalse, gBgColor, bitmapTopDown); if (_outputDev) - _outputDev->startDoc(_pdfDoc->getXRef()); + _outputDev->startDoc(_pdfDoc); } return _outputDev; } @@ -742,7 +742,7 @@ #define _vsnprintf vsnprintf #endif -void my_error(int pos, char *msg, va_list args) { +void my_error(void *, ErrorCategory, int pos, char *msg) { #if 0 char buf[4096], *p = buf; @@ -796,7 +796,7 @@ #endif } -void LogInfo(char *fmt, ...) +void LogInfo(const char *fmt, ...) { va_list args; char buf[4096], *p = buf; @@ -840,7 +840,7 @@ LogInfo("started: %s\n", fileName); - TextOutputDev * textOut = new TextOutputDev(NULL, gTrue, gFalse, gFalse); + TextOutputDev * textOut = new TextOutputDev(NULL, gTrue, 0, gFalse, gFalse); if (!textOut->isOk()) { delete textOut; return; @@ -854,7 +854,7 @@ pdfDoc = new PDFDoc(fileNameStr, NULL, NULL, NULL); if (!pdfDoc->isOk()) { - error(-1, "RenderPdfFile(): failed to open PDF file %s\n", fileName); + error(errIO, -1, "RenderPdfFile(): failed to open PDF file {0:s}\n", fileName); goto Exit; } @@ -1225,13 +1225,13 @@ RenderFileList(cmdLineArg); #endif } else { - error(-1, "unexpected argument '%s'", cmdLineArg); + error(errCommandLine, -1, "unexpected argument '{0:s}'", cmdLineArg); } } int main(int argc, char **argv) { - setErrorFunction(my_error); + setErrorCallback(my_error, NULL); ParseCommandLine(argc, argv); if (0 == StrList_Len(&gArgsListRoot)) PrintUsageAndExit(argc, argv); diff -Nru poppler-0.18.4/utils/CMakeLists.txt poppler-0.20.5/utils/CMakeLists.txt --- poppler-0.18.4/utils/CMakeLists.txt 2011-11-22 21:33:29.000000000 +0000 +++ poppler-0.20.5/utils/CMakeLists.txt 2012-05-10 20:05:44.000000000 +0000 @@ -39,10 +39,22 @@ if(LCMS_FOUND) target_link_libraries(pdftocairo ${LCMS_LIBRARIES}) endif(LCMS_FOUND) + if(LCMS2_FOUND) + target_link_libraries(pdftocairo ${LCMS2_LIBRARIES}) + endif(LCMS2_FOUND) install(TARGETS pdftocairo DESTINATION bin) install(FILES pdftocairo.1 DESTINATION share/man/man1) endif (HAVE_CAIRO) +# pdfdetach +set(pdfdetach_SOURCES ${common_srcs} + pdfdetach.cc +) +add_executable(pdfdetach ${pdfdetach_SOURCES}) +target_link_libraries(pdfdetach ${common_libs}) +install(TARGETS pdfdetach DESTINATION bin) +install(FILES pdfdetach.1 DESTINATION share/man/man1) + # pdffonts set(pdffonts_SOURCES ${common_srcs} pdffonts.cc diff -Nru poppler-0.18.4/utils/HtmlFonts.cc poppler-0.20.5/utils/HtmlFonts.cc --- poppler-0.18.4/utils/HtmlFonts.cc 2011-11-22 21:33:29.000000000 +0000 +++ poppler-0.20.5/utils/HtmlFonts.cc 2012-08-15 13:31:39.000000000 +0000 @@ -23,6 +23,7 @@ // Copyright (C) 2010 OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar Potdar (onkar@cdacmumbai.in) // Copyright (C) 2011 Joshua Richardson // Copyright (C) 2011 Stephen Reichling +// Copyright (C) 2012 Igor Slepchin // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -33,11 +34,12 @@ #include "HtmlUtils.h" #include "GlobalParams.h" #include "UnicodeMap.h" +#include "GfxFont.h" #include struct Fonts{ - char *Fontname; - char *name; + const char *Fontname; + const char *name; }; const int font_num=13; @@ -101,10 +103,12 @@ return tmp; } -HtmlFont::HtmlFont(GooString* ftname,int _size, GfxRGB rgb){ +HtmlFont::HtmlFont(GfxFont *font, int _size, GfxRGB rgb){ //if (col) color=HtmlFontColor(col); //else color=HtmlFontColor(); color=HtmlFontColor(rgb); + GooString* ftname=font->getName(); + if (!ftname) ftname = getDefaultFont(); GooString *fontname = NULL; @@ -124,12 +128,20 @@ bold = gFalse; rotOrSkewed = gFalse; + if (font->isBold() || font->getWeight() >= GfxFont::W700) bold=gTrue; + if (font->isItalic()) italic=gTrue; + if (fontname){ - if (strstr(fontname->lowerCase()->getCString(),"bold")) bold=gTrue; - - if (strstr(fontname->lowerCase()->getCString(),"italic")|| - strstr(fontname->lowerCase()->getCString(),"oblique")) italic=gTrue; - + if (!bold && strstr(fontname->lowerCase()->getCString(),"bold")) { + bold=gTrue; + } + + if (!italic && + (strstr(fontname->lowerCase()->getCString(),"italic")|| + strstr(fontname->lowerCase()->getCString(),"oblique"))) { + italic=gTrue; + } + int i=0; while (strcmp(ftname->getCString(),fonts[i].Fontname)&&(i // Copyright (C) 2011 Steven Murdoch // Copyright (C) 2011 Joshua Richardson +// Copyright (C) 2012 Igor Slepchin // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -72,7 +73,7 @@ public: HtmlFont(){FontName=NULL; rotOrSkewed = gFalse;} - HtmlFont(GooString* fontname,int _size, GfxRGB rgb); + HtmlFont(GfxFont *font,int _size, GfxRGB rgb); HtmlFont(const HtmlFont& x); HtmlFont& operator=(const HtmlFont& x); HtmlFontColor getColor() const {return color;} diff -Nru poppler-0.18.4/utils/HtmlOutputDev.cc poppler-0.20.5/utils/HtmlOutputDev.cc --- poppler-0.18.4/utils/HtmlOutputDev.cc 2012-02-09 20:55:34.000000000 +0000 +++ poppler-0.20.5/utils/HtmlOutputDev.cc 2012-08-30 20:31:05.000000000 +0000 @@ -30,7 +30,8 @@ // Copyright (C) 2010 OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar Potdar (onkar@cdacmumbai.in) // Copyright (C) 2011 Joshua Richardson // Copyright (C) 2011 Stephen Reichling -// Copyright (C) 2012 Igor Slepchin +// Copyright (C) 2011, 2012 Igor Slepchin +// Copyright (C) 2012 Ihar Filipau // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -67,13 +68,24 @@ #define DEBUG __FILE__ << ": " << __LINE__ << ": DEBUG: " +class HtmlImage +{ +public: + HtmlImage(GooString *_fName, GfxState *state) + : fName(_fName) { + state->transform(0, 0, &xMin, &yMax); + state->transform(1, 1, &xMax, &yMin); + } + ~HtmlImage() { delete fName; } + + double xMin, xMax; // image x coordinates + double yMin, yMax; // image y coordinates + GooString *fName; // image file name +}; + // returns true if x is closer to y than x is to z static inline bool IS_CLOSER(float x, float y, float z) { return fabs((x)-(y)) < fabs((x)-(z)); } -int HtmlPage::pgNum=0; -int HtmlOutputDev::imgNum=1; -GooList *HtmlOutputDev::imgList=new GooList(); - extern GBool complexMode; extern GBool singleHtml; extern GBool ignore; @@ -85,6 +97,8 @@ extern GBool showHidden; extern GBool noMerge; +extern double wordBreakThreshold; + static GBool debug = gFalse; static GooString *gstr_buff0 = NULL; // a workspace in which I format strings @@ -160,9 +174,7 @@ yMax = y - descent * fontSize; GfxRGB rgb; state->getFillRGB(&rgb); - GooString *name = state->getFont()->getName(); - if (!name) name = HtmlFont::getDefaultFont(); //new GooString("default"); - HtmlFont hfont=HtmlFont(name, static_cast(fontSize-1), rgb); + HtmlFont hfont=HtmlFont(font, static_cast(fontSize-1), rgb); if (isMatRotOrSkew(state->getTextMat())) { double normalizedMatrix[4]; memcpy(normalizedMatrix, state->getTextMat(), sizeof(normalizedMatrix)); @@ -258,6 +270,7 @@ yxCur1 = yxCur2 = NULL; fonts=new HtmlFontAccu(); links=new HtmlLinks(); + imgList=new GooList(); pageWidth=0; pageHeight=0; fontsPageMarker = 0; @@ -268,10 +281,11 @@ HtmlPage::~HtmlPage() { clear(); - if (DocName) delete DocName; - if (fonts) delete fonts; - if (links) delete links; - if (imgExt) delete imgExt; + delete DocName; + delete fonts; + delete links; + delete imgExt; + deleteGooList(imgList, HtmlImage); } void HtmlPage::updateFont(GfxState *state) { @@ -366,7 +380,7 @@ // right, which will not necessarily be the case, e.g. if rotated; // It assesses whether or not two characters are close enough to // be part of the same string - fabs(x1 - curStr->xRight[n-1]) > 0.1 * (curStr->yMax - curStr->yMin) && + fabs(x1 - curStr->xRight[n-1]) > wordBreakThreshold * (curStr->yMax - curStr->yMin) && // rotation is (cos q, sin q, -sin q, cos q, 0, 0) // sin q is zero iff there is no rotation, or 180 deg. rotation; // for 180 rotation, cos q will be negative @@ -385,7 +399,19 @@ h1 /= uLen; } for (i = 0; i < uLen; ++i) { - curStr->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u[i]); + Unicode u1 = u[i]; + if (u1 >= 0xd800 && u1 <= 0xdbff && i < uLen) { + // surrogate pair + const Unicode u2 = u[i + 1]; + if (u2 >= 0xdc00 && u2 <= 0xdfff) { + u1 = 0x10000 + ((u1 - 0xd800) << 10) + (u2 - 0xdc00); + + curStr->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u1); + } + ++i; + } else { + curStr->addChar(state, x1 + i*w1, y1 + i*h1, w1, h1, u1); + } } } @@ -600,7 +626,7 @@ { // printf("yes\n"); n = str1->len + str2->len; - if ((addSpace = horSpace > 0.1 * space)) { + if ((addSpace = horSpace > wordBreakThreshold * space)) { ++n; } if (addLineBreak) { @@ -728,6 +754,15 @@ delete fontCSStyle; } + int listlen=imgList->getLength(); + for (int i = 0; i < listlen; i++) { + HtmlImage *img = (HtmlImage*)imgList->del(0); + fprintf(f,"yMin),xoutRound(img->xMin)); + fprintf(f,"width=\"%d\" height=\"%d\" ",xoutRound(img->xMax-img->xMin),xoutRound(img->yMax-img->yMin)); + fprintf(f,"src=\"%s\"/>\n",img->fName->getCString()); + delete img; + } + for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){ if (tmp->htext){ fprintf(f,"yMin),xoutRound(tmp->xMin)); @@ -740,6 +775,42 @@ fputs("\n",f); } +static void printCSS(FILE *f) +{ + // Image flip/flop CSS + // Source: + // http://stackoverflow.com/questions/1309055/cross-browser-way-to-flip-html-image-via-javascript-css + // tested in Chrome, Fx (Linux) and IE9 (W7) + static const char css[] = + "" "\n"; + + fwrite( css, sizeof(css)-1, 1, f ); +} + int HtmlPage::dumpComplexHeaders(FILE * const file, FILE *& pageFile, int page) { GooString* tmp; @@ -756,7 +827,7 @@ } delete pgNum; if (!pageFile) { - error(-1, "Couldn't open html file '%s'", tmp->getCString()); + error(errIO, -1, "Couldn't open html file '{0:t}'", tmp); delete tmp; return 1; } @@ -791,7 +862,7 @@ if( firstPage == -1 ) firstPage = page; - if (dumpComplexHeaders(file, pageFile, page)) { error(-1, "Couldn't write headers."); return; } + if (dumpComplexHeaders(file, pageFile, page)) { error(errIO, -1, "Couldn't write headers."); return; } tmp=basename(DocName); @@ -865,13 +936,19 @@ { fprintf(f,"",pageNum); // Loop over the list of image names on this page - int listlen=HtmlOutputDev::imgList->getLength(); + int listlen=imgList->getLength(); for (int i = 0; i < listlen; i++) { - GooString *fName= (GooString *)HtmlOutputDev::imgList->del(0); - fprintf(f,"
\n",fName->getCString()); - delete fName; + HtmlImage *img = (HtmlImage*)imgList->del(0); + + // see printCSS() for class names + const char *styles[4] = { "", " class=\"xflip\"", " class=\"yflip\"", " class=\"xyflip\"" }; + int style_index=0; + if (img->xMin > img->xMax) style_index += 1; // xFlip + if (img->yMin > img->yMax) style_index += 2; // yFlip + + fprintf(f,"
\n",styles[style_index],img->fName->getCString()); + delete img; } - HtmlOutputDev::imgNum=1; GooString* str; for(HtmlString *tmp=yxStrings;tmp;tmp=tmp->yxNext){ @@ -924,11 +1001,16 @@ DocName=new GooString(fname); } +void HtmlPage::addImage(GooString *fname, GfxState *state) { + HtmlImage *img = new HtmlImage(fname, state); + imgList->append(img); +} + //------------------------------------------------------------------------ // HtmlMetaVar //------------------------------------------------------------------------ -HtmlMetaVar::HtmlMetaVar(char *_name, char *_content) +HtmlMetaVar::HtmlMetaVar(const char *_name, const char *_content) { name = new GooString(_name); content = new GooString(_content); @@ -954,7 +1036,7 @@ // HtmlOutputDev //------------------------------------------------------------------------ -static char* HtmlEncodings[][2] = { +static const char* HtmlEncodings[][2] = { {"Latin1", "ISO-8859-1"}, {NULL, NULL} }; @@ -979,7 +1061,7 @@ fName->append(".html"); if (!(fContentsFrame = fopen(fName->getCString(), "w"))){ - error(-1, "Couldn't open html file '%s'", fName->getCString()); + error(errIO, -1, "Couldn't open html file '{0:t}'", fName); delete fName; return; } @@ -1010,11 +1092,12 @@ fclose(fContentsFrame); } -HtmlOutputDev::HtmlOutputDev(char *fileName, char *title, +HtmlOutputDev::HtmlOutputDev(Catalog *catalogA, char *fileName, char *title, char *author, char *keywords, char *subject, char *date, char *extension, GBool rawOrder, int firstPage, GBool outline) { + catalog = catalogA; fContentsFrame = NULL; docTitle = new GooString(title); pages = NULL; @@ -1023,7 +1106,6 @@ this->rawOrder = rawOrder; this->doOutline = outline; ok = gFalse; - imgNum=1; //this->firstPage = firstPage; //pageNum=firstPage; // open file @@ -1055,7 +1137,7 @@ if (!(fContentsFrame = fopen(left->getCString(), "w"))) { - error(-1, "Couldn't open html file '%s'", left->getCString()); + error(errIO, -1, "Couldn't open html file '{0:t}'", left); delete left; return; } @@ -1077,13 +1159,15 @@ right->append("s.html"); if (!(page=fopen(right->getCString(),"w"))){ - error(-1, "Couldn't open html file '%s'", right->getCString()); + error(errIO, -1, "Couldn't open html file '{0:t}'", right); delete right; return; } delete right; fputs(DOCTYPE, page); - fputs("\n\n\n\n\n",page); + fputs("\n\n\n",page); + printCSS(page); + fputs("\n\n",page); } } @@ -1094,7 +1178,7 @@ if (!xml) right->append(".html"); if (xml) right->append(".xml"); if (!(page=fopen(right->getCString(),"w"))){ - error(-1, "Couldn't open html file '%s'", right->getCString()); + error(errIO, -1, "Couldn't open html file '{0:t}'", right); delete right; return; } @@ -1106,7 +1190,7 @@ { fprintf(page, "\n", htmlEncoding->getCString()); fputs("\n\n", page); - fputs("\n",page); + fprintf(page,"\n", PACKAGE_NAME, PACKAGE_VERSION); } else { @@ -1115,6 +1199,7 @@ fprintf(page, "\n", htmlEncoding->getCString()); dumpMetaVars(page); + printCSS(page); fprintf(page,"\n"); fprintf(page,"\n"); } @@ -1135,14 +1220,16 @@ fputs("\n\n",fContentsFrame); fclose(fContentsFrame); } - if (xml) { - fputs("\n",page); - fclose(page); - } else - if ( !complexMode || xml || noframes ) - { - fputs("\n\n",page); - fclose(page); + if (page != NULL) { + if (xml) { + fputs("\n",page); + fclose(page); + } else + if ( !complexMode || xml || noframes ) + { + fputs("\n\n",page); + fclose(page); + } } if (pages) delete pages; @@ -1191,7 +1278,7 @@ void HtmlOutputDev::endPage() { - Links *linksList = docPage->getLinks(catalog); + Links *linksList = docPage->getLinks(); for (int i = 0; i < linksList->getNumLinks(); ++i) { doProcessLink(linksList->getLink(i)); @@ -1235,133 +1322,68 @@ pages->addChar(state, x, y, dx, dy, originX, originY, u, uLen); } -void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { - - if (ignore||complexMode) { - OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); - return; - } - +void HtmlOutputDev::drawJpegImage(GfxState *state, Stream *str) +{ FILE *f1; int c; - - // dump JPEG file - if (dumpJPEG && str->getKind() == strDCT) { - GooString *fName=new GooString(Docname); - fName->append("-"); - GooString *pgNum=GooString::fromInt(pageNum); - GooString *imgnum=GooString::fromInt(imgNum); - // open the image file - fName->append(pgNum)->append("_")->append(imgnum)->append(".jpg"); - delete pgNum; - delete imgnum; - - ++imgNum; - if (!(f1 = fopen(fName->getCString(), "wb"))) { - error(-1, "Couldn't open image file '%s'", fName->getCString()); - delete fName; - return; - } - - // initialize stream - str = str->getNextStream(); - str->reset(); - - // copy the stream - while ((c = str->getChar()) != EOF) - fputc(c, f1); - fclose(f1); - - if (fName) imgList->append(fName); + // open the image file + GooString *fName=createImageFileName("jpg"); + if (!(f1 = fopen(fName->getCString(), "wb"))) { + error(errIO, -1, "Couldn't open image file '%s'", fName->getCString()); + delete fName; + return; } - else { - OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); + + // initialize stream + str = str->getNextStream(); + str->reset(); + + // copy the stream + while ((c = str->getChar()) != EOF) + fputc(c, f1); + + fclose(f1); + + if (fName) { + pages->addImage(fName, state); } } -void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) { +void HtmlOutputDev::drawPngImage(GfxState *state, Stream *str, int width, int height, + GfxImageColorMap *colorMap, GBool isMask) +{ +#ifdef ENABLE_LIBPNG + FILE *f1; - if (ignore||complexMode) { - OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, - maskColors, inlineImg); + if (!colorMap && !isMask) { + error(errInternal, -1, "Can't have color image without a color map"); return; } - FILE *f1; - int c; - - /*if( !globalParams->getErrQuiet() ) - printf("image stream of kind %d\n", str->getKind());*/ - // dump JPEG file - if (dumpJPEG && str->getKind() == strDCT) { - GooString *fName=new GooString(Docname); - fName->append("-"); - GooString *pgNum= GooString::fromInt(pageNum); - GooString *imgnum= GooString::fromInt(imgNum); - - // open the image file - fName->append(pgNum)->append("_")->append(imgnum)->append(".jpg"); - delete pgNum; - delete imgnum; - - ++imgNum; - - if (!(f1 = fopen(fName->getCString(), "wb"))) { - error(-1, "Couldn't open image file '%s'", fName->getCString()); - delete fName; - return; - } + // open the image file + GooString *fName=createImageFileName("png"); + if (!(f1 = fopen(fName->getCString(), "wb"))) { + error(errIO, -1, "Couldn't open image file '%s'", fName->getCString()); + delete fName; + return; + } - // initialize stream - str = str->getNextStream(); - str->reset(); - - // copy the stream - while ((c = str->getChar()) != EOF) - fputc(c, f1); - + PNGWriter *writer = new PNGWriter( isMask ? PNGWriter::MONOCHROME : PNGWriter::RGB ); + // TODO can we calculate the resolution of the image? + if (!writer->init(f1, width, height, 72, 72)) { + error(errInternal, -1, "Can't init PNG for image '%s'", fName->getCString()); + delete writer; fclose(f1); - - if (fName) imgList->append(fName); + return; } - else { -#ifdef ENABLE_LIBPNG - // Dump the image as a PNG file. Much of the PNG code - // comes from an example by Guillaume Cottenceau. + + if (!isMask) { Guchar *p; GfxRGB rgb; - png_byte *row = (png_byte *) malloc(3 * width); // 3 bytes/pixel: RGB + png_byte *row = (png_byte *) gmalloc(3 * width); // 3 bytes/pixel: RGB png_bytep *row_pointer= &row; - // Create the image filename - GooString *fName=new GooString(Docname); - fName->append("-"); - GooString *pgNum= GooString::fromInt(pageNum); - GooString *imgnum= GooString::fromInt(imgNum); - fName->append(pgNum)->append("_")->append(imgnum)->append(".png"); - delete pgNum; - delete imgnum; - - // Open the image file - if (!(f1 = fopen(fName->getCString(), "wb"))) { - error(-1, "Couldn't open image file '%s'", fName->getCString()); - delete fName; - return; - } - - PNGWriter *writer = new PNGWriter(); - // TODO can we calculate the resolution of the image? - if (!writer->init(f1, width, height, 72, 72)) { - delete writer; - fclose(f1); - return; - } - // Initialize the image stream ImageStream *imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits()); @@ -1374,32 +1396,125 @@ p = imgStr->getLine(); for (int x = 0; x < width; x++) { colorMap->getRGB(p, &rgb); - // Write the RGB pixels into the row - row[3*x]= colToByte(rgb.r); - row[3*x+1]= colToByte(rgb.g); - row[3*x+2]= colToByte(rgb.b); - p += colorMap->getNumPixelComps(); + // Write the RGB pixels into the row + row[3*x]= colToByte(rgb.r); + row[3*x+1]= colToByte(rgb.g); + row[3*x+2]= colToByte(rgb.b); + p += colorMap->getNumPixelComps(); } if (!writer->writeRow(row_pointer)) { + error(errIO, -1, "Failed to write into PNG '%s'", fName->getCString()); delete writer; + delete imgStr; fclose(f1); return; } } + gfree(row); + imgStr->close(); + delete imgStr; + } + else { // isMask == true + ImageStream *imgStr = new ImageStream(str, width, 1, 1); + imgStr->reset(); - writer->close(); - delete writer; - fclose(f1); + Guchar *png_row = (Guchar *)gmalloc( width ); + + for (int ri = 0; ri < height; ++ri) + { + // read the row of the mask + Guchar *bit_row = imgStr->getLine(); - free(row); - imgList->append(fName); - ++imgNum; + // invert for PNG + for(int i = 0; i < width; i++) + png_row[i] = bit_row[i] ? 0xff : 0x00; + + if (!writer->writeRow( &png_row )) + { + error(errIO, -1, "Failed to write into PNG '%s'", fName->getCString()); + delete writer; + fclose(f1); + delete imgStr; + gfree(png_row); + return; + } + } imgStr->close(); delete imgStr; + gfree(png_row); + } + + str->close(); + + writer->close(); + delete writer; + fclose(f1); + + pages->addImage(fName, state); +#else + return; +#endif +} + +GooString *HtmlOutputDev::createImageFileName(const char *ext) +{ + GooString *fName=new GooString(Docname); + fName->append("-"); + GooString *pgNum= GooString::fromInt(pageNum); + GooString *imgnum= GooString::fromInt(pages->getNumImages()+1); + + fName->append(pgNum)->append("_")->append(imgnum)->append(".")->append(ext); + delete pgNum; + delete imgnum; + + return fName; +} + +void HtmlOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, + int width, int height, GBool invert, + GBool interpolate, GBool inlineImg) { + + if (ignore||(complexMode && !xml)) { + OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); + return; + } + + // dump JPEG file + if (dumpJPEG && str->getKind() == strDCT) { + drawJpegImage(state, str); + } + else { +#ifdef ENABLE_LIBPNG + drawPngImage(state, str, width, height, NULL, gTrue); #else + OutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); +#endif + } +} + +void HtmlOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, + GBool interpolate, int *maskColors, GBool inlineImg) { + + if (ignore||(complexMode && !xml)) { OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg); + return; + } + + /*if( !globalParams->getErrQuiet() ) + printf("image stream of kind %d\n", str->getKind());*/ + // dump JPEG file + if (dumpJPEG && str->getKind() == strDCT) { + drawJpegImage(state, str); + } + else { +#ifdef ENABLE_LIBPNG + drawPngImage(state, str, width, height, colorMap ); +#else + OutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, + maskColors, inlineImg); #endif } } @@ -1416,13 +1531,13 @@ cvtUserToDev(_x2,_y2,&x2,&y2); - GooString* _dest=getLinkDest(link,catalog); + GooString* _dest=getLinkDest(link); HtmlLink t((double) x1,(double) y2,(double) x2,(double) y1,_dest); pages->AddLink(t); delete _dest; } -GooString* HtmlOutputDev::getLinkDest(AnnotLink *link,Catalog* catalog){ +GooString* HtmlOutputDev::getLinkDest(AnnotLink *link){ char *p; if (!link->getAction()) return new GooString(); @@ -1563,7 +1678,7 @@ GBool bClose = gFalse; Catalog *catalog = doc->getCatalog(); - if (!ok || xml) + if (!ok) return gFalse; Outline *outline = doc->getOutline(); @@ -1574,7 +1689,7 @@ if (!outlines) return gFalse; - if (!complexMode && !xml) + if (!complexMode || xml) { output = page; } @@ -1609,21 +1724,30 @@ } } - GBool done = newOutlineLevel(output, outlines, catalog); - if (done && !complexMode) - fputs("
\n", output); - - if (bClose) + if (!xml) { - fputs("\n\n", output); - fclose(output); + GBool done = newHtmlOutlineLevel(output, outlines, catalog); + if (done && !complexMode) + fputs("
\n", output); + + if (bClose) + { + fputs("\n\n", output); + fclose(output); + } } - return done; + else + newXmlOutlineLevel(output, outlines, catalog); + + return gTrue; #endif } -GBool HtmlOutputDev::newOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog, int level) +GBool HtmlOutputDev::newHtmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog, int level) { +#ifdef DISABLE_OUTLINE + return gFalse; +#else GBool atLeastOne = gFalse; if (level == 1) @@ -1639,30 +1763,10 @@ GooString *titleStr = HtmlFont::HtmlFilter(item->getTitle(), item->getTitleLength()); - // get corresponding link GooString *linkName = NULL;; - LinkAction *action = item->getAction(); - LinkGoTo *link = NULL; - Object dest; - if (action && action->getKind() == actionGoTo) - link = dynamic_cast(action); - if (link && link->isOk()) { - LinkDest *linkdest=NULL; - if (link->getDest()!=NULL) - linkdest=link->getDest()->copy(); - else if (link->getNamedDest()!=NULL) - linkdest=catalog->findDest(link->getNamedDest()); - - if (linkdest) { - int page; - if (linkdest->isPageRef()) { - Ref pageref=linkdest->getPageRef(); - page=catalog->findPage(pageref.num,pageref.gen); - } else { - page=linkdest->getPageNum(); - } - delete linkdest; - + int page = getOutlinePageNum(item); + if (page > 0) + { /* complex simple frames file-4.html files.html#4 noframes file.html#4 file.html#4 @@ -1683,9 +1787,7 @@ } } delete str; - } } - dest.free(); fputs("
  • ",output); if (linkName) @@ -1702,7 +1804,7 @@ if (item->hasKids()) { fputs("\n",output); - newOutlineLevel(output, item->getKids(), catalog, level+1); + newHtmlOutlineLevel(output, item->getKids(), catalog, level+1); } item->close(); fputs("
  • \n",output); @@ -1710,4 +1812,75 @@ fputs("\n",output); return atLeastOne; +#endif } + +void HtmlOutputDev::newXmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog) +{ +#ifndef DISABLE_OUTLINE + fputs("\n", output); + + for (int i = 0; i < outlines->getLength(); i++) + { + OutlineItem *item = (OutlineItem*)outlines->get(i); + GooString *titleStr = HtmlFont::HtmlFilter(item->getTitle(), + item->getTitleLength()); + int page = getOutlinePageNum(item); + if (page > 0) + { + fprintf(output, "%s\n", + page, titleStr->getCString()); + } + else + { + fprintf(output, "%s\n", titleStr->getCString()); + } + delete titleStr; + + item->open(); + if (item->hasKids()) + { + newXmlOutlineLevel(output, item->getKids(), catalog); + } + item->close(); + } + + fputs("\n", output); +#endif +} + +#ifndef DISABLE_OUTLINE +int HtmlOutputDev::getOutlinePageNum(OutlineItem *item) +{ + LinkAction *action = item->getAction(); + LinkGoTo *link = NULL; + LinkDest *linkdest = NULL; + int pagenum = -1; + + if (!action || action->getKind() != actionGoTo) + return pagenum; + + link = dynamic_cast(action); + + if (!link || !link->isOk()) + return pagenum; + + if (link->getDest()) + linkdest = link->getDest()->copy(); + else if (link->getNamedDest()) + linkdest = catalog->findDest(link->getNamedDest()); + + if (!linkdest) + return pagenum; + + if (linkdest->isPageRef()) { + Ref pageref = linkdest->getPageRef(); + pagenum = catalog->findPage(pageref.num, pageref.gen); + } else { + pagenum = linkdest->getPageNum(); + } + + delete linkdest; + return pagenum; +} +#endif diff -Nru poppler-0.18.4/utils/HtmlOutputDev.h poppler-0.20.5/utils/HtmlOutputDev.h --- poppler-0.18.4/utils/HtmlOutputDev.h 2012-02-08 22:57:03.000000000 +0000 +++ poppler-0.20.5/utils/HtmlOutputDev.h 2012-05-10 20:05:44.000000000 +0000 @@ -22,6 +22,7 @@ // Copyright (C) 2011 Joshua Richardson // Copyright (C) 2011 Stephen Reichling // Copyright (C) 2012 Igor Slepchin +// Copyright (C) 2012 Fabio D'Urso // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -60,6 +61,7 @@ class GfxState; class GooString; class PDFDoc; +class OutlineItem; //------------------------------------------------------------------------ // HtmlString //------------------------------------------------------------------------ @@ -155,7 +157,13 @@ links->AddLink(x); } - void dump(FILE *f, int pageNum); + // add an image to the current page + void addImage(GooString *fname, GfxState *state); + + // number of images on the current page + int getNumImages() { return imgList->getLength(); } + + void dump(FILE *f, int pageNum); // Clear the page. void clear(); @@ -182,12 +190,12 @@ int fontsPageMarker; HtmlFontAccu *fonts; HtmlLinks *links; + GooList *imgList; GooString *DocName; GooString *imgExt; int pageWidth; int pageHeight; - static int pgNum; int firstPage; // used to begin the numeration of pages friend class HtmlOutputDev; @@ -198,7 +206,7 @@ //------------------------------------------------------------------------ class HtmlMetaVar { public: - HtmlMetaVar(char *_name, char *_content); + HtmlMetaVar(const char *_name, const char *_content); ~HtmlMetaVar(); GooString* toString(); @@ -222,7 +230,7 @@ // 8-bit ISO Latin-1. should also be set for Japanese // (EUC-JP) text. If is true, the text is kept in content // stream order. - HtmlOutputDev(char *fileName, char *title, + HtmlOutputDev(Catalog *catalogA, char *fileName, char *title, char *author, char *keywords, char *subject, @@ -259,12 +267,13 @@ virtual GBool checkPageSlice(Page *page, double hDPI, double vDPI, int rotate, GBool useMediaBox, GBool crop, int sliceX, int sliceY, int sliceW, int sliceH, - GBool printing, Catalog * catalogA, + GBool printing, GBool (* abortCheckCbk)(void *data) = NULL, - void * abortCheckCbkData = NULL) + void * abortCheckCbkData = NULL, + GBool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = NULL, + void *annotDisplayDecideCbkData = NULL) { docPage = page; - catalog = catalogA; return gTrue; } @@ -300,7 +309,7 @@ int getPageWidth() { return maxPageWidth; } int getPageHeight() { return maxPageHeight; } - GBool dumpDocOutline(PDFDoc* catalog); + GBool dumpDocOutline(PDFDoc* doc); private: // convert encoding into a HTML standard, or encoding->getCString if not @@ -308,10 +317,18 @@ // that you have to delete static GooString* mapEncodingToHtml(GooString* encoding); void doProcessLink(AnnotLink *link); - GooString* getLinkDest(AnnotLink *link,Catalog *catalog); + GooString* getLinkDest(AnnotLink *link); void dumpMetaVars(FILE *); void doFrame(int firstPage); - GBool newOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog, int level = 1); + GBool newHtmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog, int level = 1); + void newXmlOutlineLevel(FILE *output, GooList *outlines, Catalog* catalog); +#ifndef DISABLE_OUTLINE + int getOutlinePageNum(OutlineItem *item); +#endif + void drawJpegImage(GfxState *state, Stream *str); + void drawPngImage(GfxState *state, Stream *str, int width, int height, + GfxImageColorMap *colorMap, GBool isMask = gFalse); + GooString *createImageFileName(const char *ext); FILE *fContentsFrame; FILE *page; // html file @@ -326,8 +343,6 @@ int pageNum; int maxPageWidth; int maxPageHeight; - static int imgNum; - static GooList *imgList; GooString *Docname; GooString *docTitle; GooList *glMetaVars; diff -Nru poppler-0.18.4/utils/ImageOutputDev.cc poppler-0.20.5/utils/ImageOutputDev.cc --- poppler-0.18.4/utils/ImageOutputDev.cc 2011-11-22 21:33:29.000000000 +0000 +++ poppler-0.20.5/utils/ImageOutputDev.cc 2012-05-10 20:05:44.000000000 +0000 @@ -20,6 +20,7 @@ // Copyright (C) 2009 Carlos Garcia Campos // Copyright (C) 2009 William Bader // Copyright (C) 2010 Jakob Voss +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -44,19 +45,29 @@ #include "Stream.h" #include "ImageOutputDev.h" -ImageOutputDev::ImageOutputDev(char *fileRootA, GBool pageNamesA, GBool dumpJPEGA) { - fileRoot = copyString(fileRootA); - fileName = (char *)gmalloc(strlen(fileRoot) + 45); +ImageOutputDev::ImageOutputDev(char *fileRootA, GBool pageNamesA, GBool dumpJPEGA, GBool listImagesA) { + listImages = listImagesA; + if (!listImages) { + fileRoot = copyString(fileRootA); + fileName = (char *)gmalloc(strlen(fileRoot) + 45); + } dumpJPEG = dumpJPEGA; pageNames = pageNamesA; imgNum = 0; pageNum = 0; ok = gTrue; + if (listImages) { + printf("page num type width height color comp bpc enc interp object ID\n"); + printf("---------------------------------------------------------------------\n"); + } } + ImageOutputDev::~ImageOutputDev() { - gfree(fileName); - gfree(fileRoot); + if (!listImages) { + gfree(fileName); + gfree(fileRoot); + } } void ImageOutputDev::setFilename(const char *fileExt) { @@ -67,9 +78,124 @@ } } -void ImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, - int width, int height, GBool invert, - GBool interpolate, GBool inlineImg) { +void ImageOutputDev::listImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, + GBool interpolate, GBool inlineImg, + ImageType imageType) { + const char *type; + const char *colorspace; + const char *enc; + int components, bpc; + + printf("%4d %5d ", pageNum, imgNum); + type = ""; + switch (imageType) { + case imgImage: + type = "image"; + break; + case imgStencil: + type = "stencil"; + break; + case imgMask: + type = "mask"; + break; + case imgSmask: + type = "smask"; + break; + } + printf("%-7s %5d %5d ", type, width, height); + + colorspace = "-"; + /* masks and stencils default to ncomps = 1 and bpc = 1 */ + components = 1; + bpc = 1; + if (colorMap && colorMap->isOk()) { + switch (colorMap->getColorSpace()->getMode()) { + case csDeviceGray: + case csCalGray: + colorspace = "gray"; + break; + case csDeviceRGB: + case csCalRGB: + colorspace = "rgb"; + break; + case csDeviceCMYK: + colorspace = "cmyk"; + break; + case csLab: + colorspace = "lab"; + break; + case csICCBased: + colorspace = "icc"; + break; + case csIndexed: + colorspace = "index"; + break; + case csSeparation: + colorspace = "sep"; + break; + case csDeviceN: + colorspace = "devn"; + break; + case csPattern: + default: + colorspace = "-"; + break; + } + components = colorMap->getNumPixelComps(); + bpc = colorMap->getBits(); + } + printf("%-5s %2d %2d ", colorspace, components, bpc); + + switch (str->getKind()) { + case strCCITTFax: + enc = "ccitt"; + break; + case strDCT: + enc = "jpeg"; + break; + case strJPX: + enc = "jpx"; + break; + case strJBIG2: + enc = "jbig2"; + break; + case strFile: + case strFlate: + case strCachedFile: + case strASCIIHex: + case strASCII85: + case strLZW: + case strRunLength: + case strWeird: + default: + enc = "image"; + break; + } + printf("%-5s ", enc); + + printf("%-3s ", interpolate ? "yes" : "no"); + + if (inlineImg) { + printf("[inline]\n"); + } else if (ref->isRef()) { + const Ref imageRef = ref->getRef(); + if (imageRef.gen >= 100000) { + printf("[none]\n"); + } else { + printf(" %6d %2d\n", imageRef.num, imageRef.gen); + } + } else { + printf("[none]\n"); + } + + ++imgNum; +} + +void ImageOutputDev::writeMask(GfxState *state, Object *ref, Stream *str, + int width, int height, GBool invert, + GBool interpolate, GBool inlineImg) { FILE *f; int c; int size, i; @@ -81,7 +207,7 @@ setFilename("jpg"); ++imgNum; if (!(f = fopen(fileName, "wb"))) { - error(-1, "Couldn't open image file '%s'", fileName); + error(errIO, -1, "Couldn't open image file '{0:s}'", fileName); return; } @@ -103,7 +229,7 @@ setFilename("pbm"); ++imgNum; if (!(f = fopen(fileName, "wb"))) { - error(-1, "Couldn't open image file '%s'", fileName); + error(errIO, -1, "Couldn't open image file '{0:s}'", fileName); return; } fprintf(f, "P4\n"); @@ -123,10 +249,10 @@ } } -void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, - int width, int height, - GfxImageColorMap *colorMap, - GBool interpolate, int *maskColors, GBool inlineImg) { +void ImageOutputDev::writeImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, + GBool interpolate, int *maskColors, GBool inlineImg) { FILE *f; ImageStream *imgStr; Guchar *p; @@ -148,7 +274,7 @@ setFilename("jpg"); ++imgNum; if (!(f = fopen(fileName, "wb"))) { - error(-1, "Couldn't open image file '%s'", fileName); + error(errIO, -1, "Couldn't open image file '{0:s}'", fileName); return; } @@ -171,7 +297,7 @@ setFilename("pbm"); ++imgNum; if (!(f = fopen(fileName, "wb"))) { - error(-1, "Couldn't open image file '%s'", fileName); + error(errIO, -1, "Couldn't open image file '{0:s}'", fileName); return; } fprintf(f, "P4\n"); @@ -202,7 +328,7 @@ setFilename("ppm"); ++imgNum; if (!(f = fopen(fileName, "wb"))) { - error(-1, "Couldn't open image file '%s'", fileName); + error(errIO, -1, "Couldn't open image file '{0:s}'", fileName); return; } fprintf(f, "P6\n"); @@ -218,13 +344,20 @@ for (y = 0; y < height; ++y) { // write the line - p = imgStr->getLine(); - for (x = 0; x < width; ++x) { - colorMap->getRGB(p, &rgb); - fputc(colToByte(rgb.r), f); - fputc(colToByte(rgb.g), f); - fputc(colToByte(rgb.b), f); - p += colorMap->getNumPixelComps(); + if ((p = imgStr->getLine())) { + for (x = 0; x < width; ++x) { + colorMap->getRGB(p, &rgb); + fputc(colToByte(rgb.r), f); + fputc(colToByte(rgb.g), f); + fputc(colToByte(rgb.b), f); + p += colorMap->getNumPixelComps(); + } + } else { + for (x = 0; x < width; ++x) { + fputc(0, f); + fputc(0, f); + fputc(0, f); + } } } imgStr->close(); @@ -234,13 +367,46 @@ } } +GBool ImageOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, + double *pmat, int paintType, int tilingType, Dict *resDict, + double *mat, double *bbox, + int x0, int y0, int x1, int y1, + double xStep, double yStep) { + return gTrue; + // do nothing -- this avoids the potentially slow loop in Gfx.cc +} + +void ImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, + int width, int height, GBool invert, + GBool interpolate, GBool inlineImg) { + if (listImages) + listImage(state, ref, str, width, height, NULL, interpolate, inlineImg, imgMask); + else + writeMask(state, ref, str, width, height, invert, interpolate, inlineImg); +} + +void ImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, + GBool interpolate, int *maskColors, GBool inlineImg) { + if (listImages) + listImage(state, ref, str, width, height, colorMap, interpolate, inlineImg, imgImage); + else + writeImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg); +} + void ImageOutputDev::drawMaskedImage( GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GBool maskInvert, GBool maskInterpolate) { - drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse); - drawImageMask(state, ref, maskStr, maskWidth, maskHeight, maskInvert, - maskInterpolate, gFalse); + if (listImages) { + listImage(state, ref, str, width, height, colorMap, interpolate, gFalse, imgImage); + listImage(state, ref, str, maskWidth, maskHeight, NULL, maskInterpolate, gFalse, imgMask); + } else { + drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse); + drawImageMask(state, ref, maskStr, maskWidth, maskHeight, maskInvert, + maskInterpolate, gFalse); + } } void ImageOutputDev::drawSoftMaskedImage( @@ -248,7 +414,12 @@ int width, int height, GfxImageColorMap *colorMap, GBool interpolate, Stream *maskStr, int maskWidth, int maskHeight, GfxImageColorMap *maskColorMap, GBool maskInterpolate) { - drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse); - drawImage(state, ref, maskStr, maskWidth, maskHeight, - maskColorMap, maskInterpolate, NULL, gFalse); + if (listImages) { + listImage(state, ref, str, width, height, colorMap, interpolate, gFalse, imgImage); + listImage(state, ref, maskStr, maskWidth, height, maskColorMap, maskInterpolate, gFalse, imgSmask); + } else { + drawImage(state, ref, str, width, height, colorMap, interpolate, NULL, gFalse); + drawImage(state, ref, maskStr, maskWidth, maskHeight, + maskColorMap, maskInterpolate, NULL, gFalse); + } } diff -Nru poppler-0.18.4/utils/ImageOutputDev.h poppler-0.20.5/utils/ImageOutputDev.h --- poppler-0.18.4/utils/ImageOutputDev.h 2011-11-22 21:33:29.000000000 +0000 +++ poppler-0.20.5/utils/ImageOutputDev.h 2012-05-10 20:05:44.000000000 +0000 @@ -17,6 +17,7 @@ // Copyright (C) 2008 Timothy Lee // Copyright (C) 2009 Carlos Garcia Campos // Copyright (C) 2010 Jakob Voss +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -44,13 +45,19 @@ class ImageOutputDev: public OutputDev { public: + enum ImageType { + imgImage, + imgStencil, + imgMask, + imgSmask + }; // Create an OutputDev which will write images to files named // -NNN. or -PPP-NNN., if // is set. Normally, all images are written as PBM // (.pbm) or PPM (.ppm) files. If is set, JPEG images // are written as JPEG (.jpg) files. - ImageOutputDev(char *fileRootA, GBool pageNamesA, GBool dumpJPEGA); + ImageOutputDev(char *fileRootA, GBool pageNamesA, GBool dumpJPEGA, GBool listImagesA); // Destructor. virtual ~ImageOutputDev(); @@ -58,6 +65,11 @@ // Check if file was successfully created. virtual GBool isOk() { return ok; } + // Does this device use tilingPatternFill()? If this returns false, + // tiling pattern fills will be reduced to a series of other drawing + // operations. + virtual GBool useTilingPatternFill() { return gTrue; } + // Does this device use beginType3Char/endType3Char? Otherwise, // text in Type 3 fonts will be drawn with drawChar/drawString. virtual GBool interpretType3Chars() { return gFalse; } @@ -78,6 +90,13 @@ // Does this device use drawChar() or drawString()? virtual GBool useDrawChar() { return gFalse; } + //----- path painting + virtual GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, + double *pmat, int paintType, int tilingType, Dict *resDict, + double *mat, double *bbox, + int x0, int y0, int x1, int y1, + double xStep, double yStep); + //----- image drawing virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, @@ -103,10 +122,22 @@ private: // Sets the output filename with a given file extension void setFilename(const char *fileExt); + void listImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, + GBool interpolate, GBool inlineImg, + ImageType imageType); + void writeMask(GfxState *state, Object *ref, Stream *str, + int width, int height, GBool invert, + GBool interpolate, GBool inlineImg); + void writeImage(GfxState *state, Object *ref, Stream *str, + int width, int height, GfxImageColorMap *colorMap, + GBool interpolate, int *maskColors, GBool inlineImg); char *fileRoot; // root of output file names char *fileName; // buffer for output file names + GBool listImages; // list images instead of dumping GBool dumpJPEG; // set to dump native JPEG files GBool pageNames; // set to include page number in file names int pageNum; // current page number diff -Nru poppler-0.18.4/utils/Makefile.am poppler-0.20.5/utils/Makefile.am --- poppler-0.18.4/utils/Makefile.am 2012-01-30 19:33:24.000000000 +0000 +++ poppler-0.20.5/utils/Makefile.am 2012-05-10 20:05:44.000000000 +0000 @@ -49,6 +49,7 @@ AM_LDFLAGS = @auto_import_flags@ bin_PROGRAMS = \ + pdfdetach \ pdffonts \ pdfimages \ pdfinfo \ @@ -61,6 +62,7 @@ $(pdftocairo_binary) dist_man1_MANS = \ + pdfdetach.1 \ pdffonts.1 \ pdfimages.1 \ pdfinfo.1 \ @@ -74,6 +76,10 @@ common = parseargs.cc parseargs.h +pdfdetach_SOURCES = \ + pdfdetach.cc \ + $(common) + pdffonts_SOURCES = \ pdffonts.cc \ $(common) @@ -111,6 +117,12 @@ HtmlUtils.h \ $(common) +# HtmlOutputDev uses goo/PNGWriter.h that may depend on libpng header +pdftohtml_CXXFLAGS = $(AM_CXXFLAGS) +if BUILD_LIBPNG +pdftohtml_CXXFLAGS += $(LIBPNG_CFLAGS) +endif + pdfseparate_SOURCES = \ pdfseparate.cc \ $(common) diff -Nru poppler-0.18.4/utils/Makefile.in poppler-0.20.5/utils/Makefile.in --- poppler-0.18.4/utils/Makefile.in 2012-02-15 17:22:45.000000000 +0000 +++ poppler-0.20.5/utils/Makefile.in 2012-10-10 17:34:55.000000000 +0000 @@ -1,9 +1,9 @@ -# Makefile.in generated by automake 1.11.1 from Makefile.am. +# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -16,6 +16,23 @@ @SET_MAKE@ VPATH = @srcdir@ +am__make_dryrun = \ + { \ + am__dry=no; \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ + | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ + *) \ + for am__flg in $$MAKEFLAGS; do \ + case $$am__flg in \ + *=*|--*) ;; \ + *n*) am__dry=yes; break;; \ + esac; \ + done;; \ + esac; \ + test $$am__dry = yes; \ + } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -36,10 +53,11 @@ host_triplet = @host@ @BUILD_CAIRO_OUTPUT_TRUE@@USE_CMS_TRUE@am__append_1 = $(LCMS_CFLAGS) @BUILD_CAIRO_OUTPUT_TRUE@@USE_CMS_TRUE@am__append_2 = $(LCMS_LIBS) -bin_PROGRAMS = pdffonts$(EXEEXT) pdfimages$(EXEEXT) pdfinfo$(EXEEXT) \ - pdftops$(EXEEXT) pdftotext$(EXEEXT) pdftohtml$(EXEEXT) \ - pdfseparate$(EXEEXT) pdfunite$(EXEEXT) $(am__EXEEXT_1) \ - $(am__EXEEXT_2) +bin_PROGRAMS = pdfdetach$(EXEEXT) pdffonts$(EXEEXT) pdfimages$(EXEEXT) \ + pdfinfo$(EXEEXT) pdftops$(EXEEXT) pdftotext$(EXEEXT) \ + pdftohtml$(EXEEXT) pdfseparate$(EXEEXT) pdfunite$(EXEEXT) \ + $(am__EXEEXT_1) $(am__EXEEXT_2) +@BUILD_LIBPNG_TRUE@am__append_3 = $(LIBPNG_CFLAGS) subdir = utils DIST_COMMON = $(dist_man1_MANS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in @@ -63,15 +81,20 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" PROGRAMS = $(bin_PROGRAMS) am__objects_1 = parseargs.$(OBJEXT) +am_pdfdetach_OBJECTS = pdfdetach.$(OBJEXT) $(am__objects_1) +pdfdetach_OBJECTS = $(am_pdfdetach_OBJECTS) +pdfdetach_LDADD = $(LDADD) +am__DEPENDENCIES_1 = +pdfdetach_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \ + $(am__DEPENDENCIES_1) +AM_V_lt = $(am__v_lt_@AM_V@) +am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) +am__v_lt_0 = --silent am_pdffonts_OBJECTS = pdffonts.$(OBJEXT) $(am__objects_1) pdffonts_OBJECTS = $(am_pdffonts_OBJECTS) pdffonts_LDADD = $(LDADD) -am__DEPENDENCIES_1 = pdffonts_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \ $(am__DEPENDENCIES_1) -AM_V_lt = $(am__v_lt_$(V)) -am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY)) -am__v_lt_0 = --silent am_pdfimages_OBJECTS = pdfimages.$(OBJEXT) ImageOutputDev.$(OBJEXT) \ $(am__objects_1) pdfimages_OBJECTS = $(am_pdfimages_OBJECTS) @@ -101,12 +124,17 @@ @BUILD_CAIRO_OUTPUT_TRUE@pdftocairo_DEPENDENCIES = $(top_builddir)/poppler/libpoppler-cairo.la \ @BUILD_CAIRO_OUTPUT_TRUE@ $(am__DEPENDENCIES_2) \ @BUILD_CAIRO_OUTPUT_TRUE@ $(am__DEPENDENCIES_4) -am_pdftohtml_OBJECTS = pdftohtml.$(OBJEXT) HtmlFonts.$(OBJEXT) \ - HtmlLinks.$(OBJEXT) HtmlOutputDev.$(OBJEXT) $(am__objects_1) +am__objects_2 = pdftohtml-parseargs.$(OBJEXT) +am_pdftohtml_OBJECTS = pdftohtml-pdftohtml.$(OBJEXT) \ + pdftohtml-HtmlFonts.$(OBJEXT) pdftohtml-HtmlLinks.$(OBJEXT) \ + pdftohtml-HtmlOutputDev.$(OBJEXT) $(am__objects_2) pdftohtml_OBJECTS = $(am_pdftohtml_OBJECTS) pdftohtml_LDADD = $(LDADD) pdftohtml_DEPENDENCIES = $(top_builddir)/poppler/libpoppler.la \ $(am__DEPENDENCIES_1) +pdftohtml_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ + $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(pdftohtml_CXXFLAGS) \ + $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__pdftoppm_SOURCES_DIST = pdftoppm.cc parseargs.cc parseargs.h @BUILD_SPLASH_OUTPUT_TRUE@am_pdftoppm_OBJECTS = pdftoppm.$(OBJEXT) \ @BUILD_SPLASH_OUTPUT_TRUE@ $(am__objects_1) @@ -140,18 +168,18 @@ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_$(V)) -am__v_CXX_ = $(am__v_CXX_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXX = $(am__v_CXX_@AM_V@) +am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; -AM_V_at = $(am__v_at_$(V)) -am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY)) +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_$(V)) -am__v_CXXLD_ = $(am__v_CXXLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) +am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -159,28 +187,33 @@ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_$(V)) -am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY)) +AM_V_CC = $(am__v_CC_@AM_V@) +am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_$(V)) -am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY)) +AM_V_CCLD = $(am__v_CCLD_@AM_V@) +am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_$(V)) -am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY)) +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; -SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) $(pdfinfo_SOURCES) \ - $(pdfseparate_SOURCES) $(pdftocairo_SOURCES) \ - $(pdftohtml_SOURCES) $(pdftoppm_SOURCES) $(pdftops_SOURCES) \ - $(pdftotext_SOURCES) $(pdfunite_SOURCES) -DIST_SOURCES = $(pdffonts_SOURCES) $(pdfimages_SOURCES) \ - $(pdfinfo_SOURCES) $(pdfseparate_SOURCES) \ +SOURCES = $(pdfdetach_SOURCES) $(pdffonts_SOURCES) \ + $(pdfimages_SOURCES) $(pdfinfo_SOURCES) $(pdfseparate_SOURCES) \ + $(pdftocairo_SOURCES) $(pdftohtml_SOURCES) $(pdftoppm_SOURCES) \ + $(pdftops_SOURCES) $(pdftotext_SOURCES) $(pdfunite_SOURCES) +DIST_SOURCES = $(pdfdetach_SOURCES) $(pdffonts_SOURCES) \ + $(pdfimages_SOURCES) $(pdfinfo_SOURCES) $(pdfseparate_SOURCES) \ $(am__pdftocairo_SOURCES_DIST) $(pdftohtml_SOURCES) \ $(am__pdftoppm_SOURCES_DIST) $(pdftops_SOURCES) \ $(pdftotext_SOURCES) $(pdfunite_SOURCES) +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -202,6 +235,12 @@ am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man1_MANS) @@ -280,12 +319,16 @@ LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ LIBCURL_LIBS = @LIBCURL_LIBS@ LIBICONV = @LIBICONV@ +LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ LIBJPEG_LIBS = @LIBJPEG_LIBS@ LIBOBJS = @LIBOBJS@ +LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ LIBPNG_LIBS = @LIBPNG_LIBS@ LIBS = @LIBS@ +LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ +LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ LIBTIFF_LIBS = @LIBTIFF_LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ @@ -339,6 +382,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ +TESTDATADIR = @TESTDATADIR@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ @@ -435,6 +479,7 @@ @BUILD_CAIRO_OUTPUT_TRUE@pdftocairo_manpage = pdftocairo.1 AM_LDFLAGS = @auto_import_flags@ dist_man1_MANS = \ + pdfdetach.1 \ pdffonts.1 \ pdfimages.1 \ pdfinfo.1 \ @@ -447,6 +492,10 @@ $(pdftocairo_manpage) common = parseargs.cc parseargs.h +pdfdetach_SOURCES = \ + pdfdetach.cc \ + $(common) + pdffonts_SOURCES = \ pdffonts.cc \ $(common) @@ -484,6 +533,9 @@ HtmlUtils.h \ $(common) + +# HtmlOutputDev uses goo/PNGWriter.h that may depend on libpng header +pdftohtml_CXXFLAGS = $(AM_CXXFLAGS) $(am__append_3) pdfseparate_SOURCES = \ pdfseparate.cc \ $(common) @@ -532,8 +584,11 @@ $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ + if test -n "$$list"; then \ + echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ + fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ @@ -573,34 +628,37 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list -pdffonts$(EXEEXT): $(pdffonts_OBJECTS) $(pdffonts_DEPENDENCIES) +pdfdetach$(EXEEXT): $(pdfdetach_OBJECTS) $(pdfdetach_DEPENDENCIES) $(EXTRA_pdfdetach_DEPENDENCIES) + @rm -f pdfdetach$(EXEEXT) + $(AM_V_CXXLD)$(CXXLINK) $(pdfdetach_OBJECTS) $(pdfdetach_LDADD) $(LIBS) +pdffonts$(EXEEXT): $(pdffonts_OBJECTS) $(pdffonts_DEPENDENCIES) $(EXTRA_pdffonts_DEPENDENCIES) @rm -f pdffonts$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdffonts_OBJECTS) $(pdffonts_LDADD) $(LIBS) -pdfimages$(EXEEXT): $(pdfimages_OBJECTS) $(pdfimages_DEPENDENCIES) +pdfimages$(EXEEXT): $(pdfimages_OBJECTS) $(pdfimages_DEPENDENCIES) $(EXTRA_pdfimages_DEPENDENCIES) @rm -f pdfimages$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdfimages_OBJECTS) $(pdfimages_LDADD) $(LIBS) -pdfinfo$(EXEEXT): $(pdfinfo_OBJECTS) $(pdfinfo_DEPENDENCIES) +pdfinfo$(EXEEXT): $(pdfinfo_OBJECTS) $(pdfinfo_DEPENDENCIES) $(EXTRA_pdfinfo_DEPENDENCIES) @rm -f pdfinfo$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdfinfo_OBJECTS) $(pdfinfo_LDADD) $(LIBS) -pdfseparate$(EXEEXT): $(pdfseparate_OBJECTS) $(pdfseparate_DEPENDENCIES) +pdfseparate$(EXEEXT): $(pdfseparate_OBJECTS) $(pdfseparate_DEPENDENCIES) $(EXTRA_pdfseparate_DEPENDENCIES) @rm -f pdfseparate$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdfseparate_OBJECTS) $(pdfseparate_LDADD) $(LIBS) -pdftocairo$(EXEEXT): $(pdftocairo_OBJECTS) $(pdftocairo_DEPENDENCIES) +pdftocairo$(EXEEXT): $(pdftocairo_OBJECTS) $(pdftocairo_DEPENDENCIES) $(EXTRA_pdftocairo_DEPENDENCIES) @rm -f pdftocairo$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdftocairo_OBJECTS) $(pdftocairo_LDADD) $(LIBS) -pdftohtml$(EXEEXT): $(pdftohtml_OBJECTS) $(pdftohtml_DEPENDENCIES) +pdftohtml$(EXEEXT): $(pdftohtml_OBJECTS) $(pdftohtml_DEPENDENCIES) $(EXTRA_pdftohtml_DEPENDENCIES) @rm -f pdftohtml$(EXEEXT) - $(AM_V_CXXLD)$(CXXLINK) $(pdftohtml_OBJECTS) $(pdftohtml_LDADD) $(LIBS) -pdftoppm$(EXEEXT): $(pdftoppm_OBJECTS) $(pdftoppm_DEPENDENCIES) + $(AM_V_CXXLD)$(pdftohtml_LINK) $(pdftohtml_OBJECTS) $(pdftohtml_LDADD) $(LIBS) +pdftoppm$(EXEEXT): $(pdftoppm_OBJECTS) $(pdftoppm_DEPENDENCIES) $(EXTRA_pdftoppm_DEPENDENCIES) @rm -f pdftoppm$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdftoppm_OBJECTS) $(pdftoppm_LDADD) $(LIBS) -pdftops$(EXEEXT): $(pdftops_OBJECTS) $(pdftops_DEPENDENCIES) +pdftops$(EXEEXT): $(pdftops_OBJECTS) $(pdftops_DEPENDENCIES) $(EXTRA_pdftops_DEPENDENCIES) @rm -f pdftops$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdftops_OBJECTS) $(pdftops_LDADD) $(LIBS) -pdftotext$(EXEEXT): $(pdftotext_OBJECTS) $(pdftotext_DEPENDENCIES) +pdftotext$(EXEEXT): $(pdftotext_OBJECTS) $(pdftotext_DEPENDENCIES) $(EXTRA_pdftotext_DEPENDENCIES) @rm -f pdftotext$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdftotext_OBJECTS) $(pdftotext_LDADD) $(LIBS) -pdfunite$(EXEEXT): $(pdfunite_OBJECTS) $(pdfunite_DEPENDENCIES) +pdfunite$(EXEEXT): $(pdfunite_OBJECTS) $(pdfunite_DEPENDENCIES) $(EXTRA_pdfunite_DEPENDENCIES) @rm -f pdfunite$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(pdfunite_OBJECTS) $(pdfunite_LDADD) $(LIBS) @@ -610,17 +668,19 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlFonts.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlLinks.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlOutputDev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ImageOutputDev.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parseargs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfdetach.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdffonts.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfimages.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfinfo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdfseparate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftocairo.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml-HtmlFonts.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml-HtmlLinks.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml-HtmlOutputDev.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml-parseargs.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftohtml-pdftohtml.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftoppm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftops.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pdftotext.Po@am__quote@ @@ -630,26 +690,93 @@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@am__fastdepCXX_FALSE@ $(AM_V_CXX) @AM_BACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< + +pdftohtml-pdftohtml.o: pdftohtml.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-pdftohtml.o -MD -MP -MF $(DEPDIR)/pdftohtml-pdftohtml.Tpo -c -o pdftohtml-pdftohtml.o `test -f 'pdftohtml.cc' || echo '$(srcdir)/'`pdftohtml.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-pdftohtml.Tpo $(DEPDIR)/pdftohtml-pdftohtml.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pdftohtml.cc' object='pdftohtml-pdftohtml.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-pdftohtml.o `test -f 'pdftohtml.cc' || echo '$(srcdir)/'`pdftohtml.cc + +pdftohtml-pdftohtml.obj: pdftohtml.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-pdftohtml.obj -MD -MP -MF $(DEPDIR)/pdftohtml-pdftohtml.Tpo -c -o pdftohtml-pdftohtml.obj `if test -f 'pdftohtml.cc'; then $(CYGPATH_W) 'pdftohtml.cc'; else $(CYGPATH_W) '$(srcdir)/pdftohtml.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-pdftohtml.Tpo $(DEPDIR)/pdftohtml-pdftohtml.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='pdftohtml.cc' object='pdftohtml-pdftohtml.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-pdftohtml.obj `if test -f 'pdftohtml.cc'; then $(CYGPATH_W) 'pdftohtml.cc'; else $(CYGPATH_W) '$(srcdir)/pdftohtml.cc'; fi` + +pdftohtml-HtmlFonts.o: HtmlFonts.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-HtmlFonts.o -MD -MP -MF $(DEPDIR)/pdftohtml-HtmlFonts.Tpo -c -o pdftohtml-HtmlFonts.o `test -f 'HtmlFonts.cc' || echo '$(srcdir)/'`HtmlFonts.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-HtmlFonts.Tpo $(DEPDIR)/pdftohtml-HtmlFonts.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='HtmlFonts.cc' object='pdftohtml-HtmlFonts.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-HtmlFonts.o `test -f 'HtmlFonts.cc' || echo '$(srcdir)/'`HtmlFonts.cc + +pdftohtml-HtmlFonts.obj: HtmlFonts.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-HtmlFonts.obj -MD -MP -MF $(DEPDIR)/pdftohtml-HtmlFonts.Tpo -c -o pdftohtml-HtmlFonts.obj `if test -f 'HtmlFonts.cc'; then $(CYGPATH_W) 'HtmlFonts.cc'; else $(CYGPATH_W) '$(srcdir)/HtmlFonts.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-HtmlFonts.Tpo $(DEPDIR)/pdftohtml-HtmlFonts.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='HtmlFonts.cc' object='pdftohtml-HtmlFonts.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-HtmlFonts.obj `if test -f 'HtmlFonts.cc'; then $(CYGPATH_W) 'HtmlFonts.cc'; else $(CYGPATH_W) '$(srcdir)/HtmlFonts.cc'; fi` + +pdftohtml-HtmlLinks.o: HtmlLinks.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-HtmlLinks.o -MD -MP -MF $(DEPDIR)/pdftohtml-HtmlLinks.Tpo -c -o pdftohtml-HtmlLinks.o `test -f 'HtmlLinks.cc' || echo '$(srcdir)/'`HtmlLinks.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-HtmlLinks.Tpo $(DEPDIR)/pdftohtml-HtmlLinks.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='HtmlLinks.cc' object='pdftohtml-HtmlLinks.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-HtmlLinks.o `test -f 'HtmlLinks.cc' || echo '$(srcdir)/'`HtmlLinks.cc + +pdftohtml-HtmlLinks.obj: HtmlLinks.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-HtmlLinks.obj -MD -MP -MF $(DEPDIR)/pdftohtml-HtmlLinks.Tpo -c -o pdftohtml-HtmlLinks.obj `if test -f 'HtmlLinks.cc'; then $(CYGPATH_W) 'HtmlLinks.cc'; else $(CYGPATH_W) '$(srcdir)/HtmlLinks.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-HtmlLinks.Tpo $(DEPDIR)/pdftohtml-HtmlLinks.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='HtmlLinks.cc' object='pdftohtml-HtmlLinks.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-HtmlLinks.obj `if test -f 'HtmlLinks.cc'; then $(CYGPATH_W) 'HtmlLinks.cc'; else $(CYGPATH_W) '$(srcdir)/HtmlLinks.cc'; fi` + +pdftohtml-HtmlOutputDev.o: HtmlOutputDev.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-HtmlOutputDev.o -MD -MP -MF $(DEPDIR)/pdftohtml-HtmlOutputDev.Tpo -c -o pdftohtml-HtmlOutputDev.o `test -f 'HtmlOutputDev.cc' || echo '$(srcdir)/'`HtmlOutputDev.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-HtmlOutputDev.Tpo $(DEPDIR)/pdftohtml-HtmlOutputDev.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='HtmlOutputDev.cc' object='pdftohtml-HtmlOutputDev.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-HtmlOutputDev.o `test -f 'HtmlOutputDev.cc' || echo '$(srcdir)/'`HtmlOutputDev.cc + +pdftohtml-HtmlOutputDev.obj: HtmlOutputDev.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-HtmlOutputDev.obj -MD -MP -MF $(DEPDIR)/pdftohtml-HtmlOutputDev.Tpo -c -o pdftohtml-HtmlOutputDev.obj `if test -f 'HtmlOutputDev.cc'; then $(CYGPATH_W) 'HtmlOutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/HtmlOutputDev.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-HtmlOutputDev.Tpo $(DEPDIR)/pdftohtml-HtmlOutputDev.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='HtmlOutputDev.cc' object='pdftohtml-HtmlOutputDev.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-HtmlOutputDev.obj `if test -f 'HtmlOutputDev.cc'; then $(CYGPATH_W) 'HtmlOutputDev.cc'; else $(CYGPATH_W) '$(srcdir)/HtmlOutputDev.cc'; fi` + +pdftohtml-parseargs.o: parseargs.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-parseargs.o -MD -MP -MF $(DEPDIR)/pdftohtml-parseargs.Tpo -c -o pdftohtml-parseargs.o `test -f 'parseargs.cc' || echo '$(srcdir)/'`parseargs.cc +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-parseargs.Tpo $(DEPDIR)/pdftohtml-parseargs.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parseargs.cc' object='pdftohtml-parseargs.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-parseargs.o `test -f 'parseargs.cc' || echo '$(srcdir)/'`parseargs.cc + +pdftohtml-parseargs.obj: parseargs.cc +@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -MT pdftohtml-parseargs.obj -MD -MP -MF $(DEPDIR)/pdftohtml-parseargs.Tpo -c -o pdftohtml-parseargs.obj `if test -f 'parseargs.cc'; then $(CYGPATH_W) 'parseargs.cc'; else $(CYGPATH_W) '$(srcdir)/parseargs.cc'; fi` +@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/pdftohtml-parseargs.Tpo $(DEPDIR)/pdftohtml-parseargs.Po +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='parseargs.cc' object='pdftohtml-parseargs.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(pdftohtml_CXXFLAGS) $(CXXFLAGS) -c -o pdftohtml-parseargs.obj `if test -f 'parseargs.cc'; then $(CYGPATH_W) 'parseargs.cc'; else $(CYGPATH_W) '$(srcdir)/parseargs.cc'; fi` mostlyclean-libtool: -rm -f *.lo @@ -658,9 +785,18 @@ -rm -rf .libs _libs install-man1: $(dist_man1_MANS) @$(NORMAL_INSTALL) - test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)" - @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \ - { for i in $$list; do echo "$$i"; done; \ + @list1='$(dist_man1_MANS)'; \ + list2=''; \ + test -n "$(man1dir)" \ + && test -n "`echo $$list1$$list2`" \ + || exit 0; \ + echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ + $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ + { for i in $$list1; do echo "$$i"; done; \ + if test -n "$$list2"; then \ + for i in $$list2; do echo "$$i"; done \ + | sed -n '/\.1[a-z]*$$/p'; \ + fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ @@ -687,9 +823,7 @@ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ - test -z "$$files" || { \ - echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(man1dir)" && rm -f $$files; } + dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ @@ -803,10 +937,15 @@ installcheck: installcheck-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - `test -z '$(STRIP)' || \ - echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi mostlyclean-generic: clean-generic: diff -Nru poppler-0.18.4/utils/parseargs.cc poppler-0.20.5/utils/parseargs.cc --- poppler-0.18.4/utils/parseargs.cc 2012-01-15 14:13:41.000000000 +0000 +++ poppler-0.20.5/utils/parseargs.cc 2012-05-10 20:05:44.000000000 +0000 @@ -59,9 +59,9 @@ return ok; } -void printUsage(char *program, char *otherArgs, const ArgDesc *args) { +void printUsage(const char *program, const char *otherArgs, const ArgDesc *args) { const ArgDesc *arg; - char *typ; + const char *typ; int w, w1; w = 0; diff -Nru poppler-0.18.4/utils/parseargs.h poppler-0.20.5/utils/parseargs.h --- poppler-0.18.4/utils/parseargs.h 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/parseargs.h 2012-05-10 20:05:44.000000000 +0000 @@ -56,11 +56,11 @@ * Argument descriptor. */ typedef struct { - char *arg; /* the command line switch */ + const char *arg; /* the command line switch */ ArgKind kind; /* kind of arg */ void *val; /* place to store value */ int size; /* for argString: size of string */ - char *usage; /* usage string */ + const char *usage; /* usage string */ } ArgDesc; /* @@ -73,7 +73,7 @@ /* * Print usage message, based on arg descriptor list. */ -extern void printUsage(char *program, char *otherArgs, const ArgDesc *args); +extern void printUsage(const char *program, const char *otherArgs, const ArgDesc *args); /* * Check if a string is a valid integer or floating point number. diff -Nru poppler-0.18.4/utils/pdf2xml.dtd poppler-0.20.5/utils/pdf2xml.dtd --- poppler-0.18.4/utils/pdf2xml.dtd 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdf2xml.dtd 2012-05-10 20:05:44.000000000 +0000 @@ -1,6 +1,10 @@ - - - + + + + - + - - + + + + + + + + + diff -Nru poppler-0.18.4/utils/pdfdetach.1 poppler-0.20.5/utils/pdfdetach.1 --- poppler-0.18.4/utils/pdfdetach.1 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/utils/pdfdetach.1 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,103 @@ +.\" Copyright 2011 Glyph & Cog, LLC +.TH pdfdetach 1 "15 August 2011" +.SH NAME +pdfdetach \- Portable Document Format (PDF) document embedded file +extractor (version 3.03) +.SH SYNOPSIS +.B pdfdetach +[options] +.RI [ PDF-file ] +.SH DESCRIPTION +.B Pdfdetach +lists or extracts embedded files (attachments) from a Portable +Document Format (PDF) file. +.SH CONFIGURATION FILE +Pdfdetach reads a configuration file at startup. It first tries to +find the user's private config file, ~/.xpdfrc. If that doesn't +exist, it looks for a system-wide config file, typically +/usr/local/etc/xpdfrc (but this location can be changed when pdfinfo +is built). See the +.BR xpdfrc (5) +man page for details. +.SH OPTIONS +Some of the following options can be set with configuration file +commands. These are listed in square brackets with the description of +the corresponding command line option. +.TP +.B \-list +List all of the embedded files in the PDF file. File names are +converted to the text encoding specified by the "\-enc" switch. +.TP +.BI \-save " number" +Save the specified embedded file. By default, this uses the file name +associated with the embedded file (as printed by the "\-list" switch); +the file name can be changed with the "\-o" switch. +.TP +.BI \-saveall +Save all of the embedded files. This uses the file names associated +with the embedded files (as printed by the "\-list" switch). By +default, the files are saved in the current directory; this can be +changed with the "\-o" switch. +.TP +.BI \-o " path" +Set the file name used when saving an embedded file with the "\-save" +switch, or the directory used by "\-saveall". +.TP +.BI \-enc " encoding-name" +Sets the encoding to use for text output (embedded file names). The +.I encoding\-name +must be defined with the unicodeMap command (see +.BR xpdfrc (5)). +This defaults to "Latin1" (which is a built-in encoding). +.RB "[config file: " textEncoding ] +.TP +.BI \-opw " password" +Specify the owner password for the PDF file. Providing this will +bypass all security restrictions. +.TP +.BI \-upw " password" +Specify the user password for the PDF file. +.TP +.BI \-cfg " config-file" +Read +.I config-file +in place of ~/.xpdfrc or the system-wide config file. +.TP +.B \-v +Print copyright and version information. +.TP +.B \-h +Print usage information. +.RB ( \-help +and +.B \-\-help +are equivalent.) +.SH EXIT CODES +The Xpdf tools use the following exit codes: +.TP +0 +No error. +.TP +1 +Error opening a PDF file. +.TP +2 +Error opening an output file. +.TP +3 +Error related to PDF permissions. +.TP +99 +Other error. +.SH AUTHOR +The pdfinfo software and documentation are copyright 1996-2011 Glyph & +Cog, LLC. +.SH "SEE ALSO" +.BR pdfimages (1), +.BR pdffonts (1), +.BR pdfinfo (1), +.BR pdftocairo (1), +.BR pdftohtml (1), +.BR pdftoppm (1), +.BR pdftops (1), +.BR pdftotext (1) \ No newline at end of file diff -Nru poppler-0.18.4/utils/pdfdetach.cc poppler-0.20.5/utils/pdfdetach.cc --- poppler-0.18.4/utils/pdfdetach.cc 1970-01-01 00:00:00.000000000 +0000 +++ poppler-0.20.5/utils/pdfdetach.cc 2012-05-10 20:05:44.000000000 +0000 @@ -0,0 +1,318 @@ +//======================================================================== +// +// pdfdetach.cc +// +// Copyright 2010 Glyph & Cog, LLC +// +//======================================================================== + +//======================================================================== +// +// Modified under the Poppler project - http://poppler.freedesktop.org +// +// All changes made under the Poppler project to this file are licensed +// under GPL version 2 or later +// +// Copyright (C) 2011 Carlos Garcia Campos +// +// To see a description of the changes please see the Changelog file that +// came with your tarball or type make ChangeLog if you are building from git +// +//======================================================================== + +#include "config.h" +#include +#include +#include "goo/gtypes.h" +#include "goo/gmem.h" +#include "goo/GooList.h" +#include "parseargs.h" +#include "Annot.h" +#include "GlobalParams.h" +#include "Page.h" +#include "PDFDoc.h" +#include "PDFDocFactory.h" +#include "FileSpec.h" +#include "CharTypes.h" +#include "Catalog.h" +#include "UnicodeMap.h" +#include "PDFDocEncoding.h" +#include "Error.h" + +static GBool doList = gFalse; +static int saveNum = 0; +static GBool saveAll = gFalse; +static char savePath[1024] = ""; +static char textEncName[128] = ""; +static char ownerPassword[33] = "\001"; +static char userPassword[33] = "\001"; +static char cfgFileName[256] = ""; +static GBool printVersion = gFalse; +static GBool printHelp = gFalse; + +static ArgDesc argDesc[] = { + {"-list", argFlag, &doList, 0, + "list all embedded files"}, + {"-save", argInt, &saveNum, 0, + "save the specified embedded file"}, + {"-saveall", argFlag, &saveAll, 0, + "save all embedded files"}, + {"-o", argString, savePath, sizeof(savePath), + "file name for the saved embedded file"}, + {"-enc", argString, textEncName, sizeof(textEncName), + "output text encoding name"}, + {"-opw", argString, ownerPassword, sizeof(ownerPassword), + "owner password (for encrypted files)"}, + {"-upw", argString, userPassword, sizeof(userPassword), + "user password (for encrypted files)"}, + {"-cfg", argString, cfgFileName, sizeof(cfgFileName), + "configuration file to use in place of .xpdfrc"}, + {"-v", argFlag, &printVersion, 0, + "print copyright and version info"}, + {"-h", argFlag, &printHelp, 0, + "print usage information"}, + {"-help", argFlag, &printHelp, 0, + "print usage information"}, + {"--help", argFlag, &printHelp, 0, + "print usage information"}, + {"-?", argFlag, &printHelp, 0, + "print usage information"}, + {NULL} +}; + +int main(int argc, char *argv[]) { + GooString *fileName; + UnicodeMap *uMap; + GooString *ownerPW, *userPW; + PDFDoc *doc; + char uBuf[8]; + char path[1024]; + char *p; + GBool ok; + int exitCode; + GooList *embeddedFiles = NULL; + int nFiles, nPages, n, i, j; + FileSpec *fileSpec; + Page *page; + Annots *annots; + Annot *annot; + GooString *s1; + Unicode u; + GBool isUnicode; + + exitCode = 99; + + // parse args + ok = parseArgs(argDesc, &argc, argv); + if ((doList ? 1 : 0) + + ((saveNum != 0) ? 1 : 0) + + (saveAll ? 1 : 0) != 1) { + ok = gFalse; + } + if (!ok || argc != 2 || printVersion || printHelp) { + fprintf(stderr, "pdfdetach version %s\n", PACKAGE_VERSION); + fprintf(stderr, "%s\n", popplerCopyright); + fprintf(stderr, "%s\n", xpdfCopyright); + if (!printVersion) { + printUsage("pdfdetach", "", argDesc); + } + goto err0; + } + fileName = new GooString(argv[1]); + + // read config file + globalParams = new GlobalParams(cfgFileName); + if (textEncName[0]) { + globalParams->setTextEncoding(textEncName); + } + + // get mapping to output encoding + if (!(uMap = globalParams->getTextEncoding())) { + error(errConfig, -1, "Couldn't get text encoding"); + delete fileName; + goto err1; + } + + // open PDF file + if (ownerPassword[0] != '\001') { + ownerPW = new GooString(ownerPassword); + } else { + ownerPW = NULL; + } + if (userPassword[0] != '\001') { + userPW = new GooString(userPassword); + } else { + userPW = NULL; + } + + doc = PDFDocFactory().createPDFDoc(*fileName, ownerPW, userPW); + + if (userPW) { + delete userPW; + } + if (ownerPW) { + delete ownerPW; + } + if (!doc->isOk()) { + exitCode = 1; + goto err2; + } + + embeddedFiles = new GooList(); + for (i = 0; i < doc->getCatalog()->numEmbeddedFiles(); ++i) + embeddedFiles->append(doc->getCatalog()->embeddedFile(i)); + + nPages = doc->getCatalog()->getNumPages(); + for (i = 0; i < nPages; ++i) { + page = doc->getCatalog()->getPage(i + 1); + annots = page->getAnnots(); + if (!annots) + break; + + for (j = 0; j < annots->getNumAnnots(); ++j) { + annot = annots->getAnnot(j); + if (annot->getType() != Annot::typeFileAttachment) + continue; + embeddedFiles->append(new FileSpec(static_cast(annot)->getFile())); + } + } + + nFiles = embeddedFiles->getLength(); + + // list embedded files + if (doList) { + printf("%d embedded files\n", nFiles); + for (i = 0; i < nFiles; ++i) { + fileSpec = static_cast(embeddedFiles->get(i)); + printf("%d: ", i+1); + s1 = fileSpec->getFileName(); + if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) { + isUnicode = gTrue; + j = 2; + } else { + isUnicode = gFalse; + j = 0; + } + while (j < fileSpec->getFileName()->getLength()) { + if (isUnicode) { + u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff); + j += 2; + } else { + u = pdfDocEncoding[s1->getChar(j) & 0xff]; + ++j; + } + n = uMap->mapUnicode(u, uBuf, sizeof(uBuf)); + fwrite(uBuf, 1, n, stdout); + } + fputc('\n', stdout); + } + + // save all embedded files + } else if (saveAll) { + for (i = 0; i < nFiles; ++i) { + fileSpec = static_cast(embeddedFiles->get(i)); + if (savePath[0]) { + n = strlen(savePath); + if (n > (int)sizeof(path) - 2) { + n = sizeof(path) - 2; + } + memcpy(path, savePath, n); + path[n] = '/'; + p = path + n + 1; + } else { + p = path; + } + s1 = fileSpec->getFileName(); + if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) { + isUnicode = gTrue; + j = 2; + } else { + isUnicode = gFalse; + j = 0; + } + while (j < fileSpec->getFileName()->getLength()) { + if (isUnicode) { + u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff); + j += 2; + } else { + u = pdfDocEncoding[s1->getChar(j) & 0xff]; + ++j; + } + n = uMap->mapUnicode(u, uBuf, sizeof(uBuf)); + if (p + n >= path + sizeof(path)) + break; + memcpy(p, uBuf, n); + p += n; + } + *p = '\0'; + + if (!fileSpec->getEmbeddedFile()->save(path)) { + error(errIO, -1, "Error saving embedded file as '{0:s}'", p); + exitCode = 2; + goto err2; + } + } + + // save an embedded file + } else { + if (saveNum < 1 || saveNum > nFiles) { + error(errCommandLine, -1, "Invalid file number"); + goto err2; + } + + fileSpec = static_cast(embeddedFiles->get(saveNum - 1)); + if (savePath[0]) { + p = savePath; + } else { + p = path; + s1 = fileSpec->getFileName(); + if ((s1->getChar(0) & 0xff) == 0xfe && (s1->getChar(1) & 0xff) == 0xff) { + isUnicode = gTrue; + j = 2; + } else { + isUnicode = gFalse; + j = 0; + } + while (j < fileSpec->getFileName()->getLength()) { + if (isUnicode) { + u = ((s1->getChar(j) & 0xff) << 8) | (s1->getChar(j+1) & 0xff); + j += 2; + } else { + u = pdfDocEncoding[s1->getChar(j) & 0xff]; + ++j; + } + n = uMap->mapUnicode(u, uBuf, sizeof(uBuf)); + if (p + n >= path + sizeof(path)) + break; + memcpy(p, uBuf, n); + p += n; + } + *p = '\0'; + p = path; + } + + if (!fileSpec->getEmbeddedFile()->save(p)) { + error(errIO, -1, "Error saving embedded file as '{0:s}'", p); + exitCode = 2; + goto err2; + } + } + + exitCode = 0; + + // clean up + err2: + if (embeddedFiles) + deleteGooList(embeddedFiles, FileSpec); + uMap->decRefCnt(); + delete doc; + err1: + delete globalParams; + err0: + + // check for memory leaks + Object::memCheck(stderr); + gMemReport(stderr); + + return exitCode; +} diff -Nru poppler-0.18.4/utils/pdffonts.1 poppler-0.20.5/utils/pdffonts.1 --- poppler-0.18.4/utils/pdffonts.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdffonts.1 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,8 @@ -.\" Copyright 1999-2004 Glyph & Cog, LLC -.TH pdffonts 1 "22 January 2004" +.\" Copyright 1999-2011 Glyph & Cog, LLC +.TH pdffonts 1 "15 August 2011" .SH NAME pdffonts \- Portable Document Format (PDF) font analyzer (version -3.00) +3.03) .SH SYNOPSIS .B pdffonts [options] @@ -21,6 +21,9 @@ .B type the font type -- see below for details .TP +.B encoding +the font encoding +.TP .B emb "yes" if the font is embedded in the PDF file .TP @@ -66,6 +69,9 @@ .BI \-l " number" Specifies the last page to analyze. .TP +.BI \-subst +List the substitute fonts that poppler will use for non embedded fonts. +.TP .BI \-opw " password" Specify the owner password for the PDF file. Providing this will bypass all security restrictions. @@ -100,9 +106,10 @@ 99 Other error. .SH AUTHOR -The pdffonts software and documentation are copyright 1996-2004 Glyph +The pdffonts software and documentation are copyright 1996-2011 Glyph & Cog, LLC. .SH "SEE ALSO" +.BR pdfdetach (1), .BR pdfimages (1), .BR pdfinfo (1), .BR pdftocairo (1), diff -Nru poppler-0.18.4/utils/pdffonts.cc poppler-0.20.5/utils/pdffonts.cc --- poppler-0.18.4/utils/pdffonts.cc 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdffonts.cc 2012-05-10 20:05:44.000000000 +0000 @@ -16,6 +16,7 @@ // Copyright (C) 2006 Dominic Lachowicz // Copyright (C) 2007-2008, 2010 Albert Astals Cid // Copyright (C) 2010 Hib Eris +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -38,7 +39,7 @@ #include "PDFDocFactory.h" #include "FontInfo.h" -static char *fontTypeNames[] = { +static const char *fontTypeNames[] = { "unknown", "Type 1", "Type 1C", @@ -55,6 +56,7 @@ static int firstPage = 1; static int lastPage = 0; +static GBool showSubst = gFalse; static char ownerPassword[33] = "\001"; static char userPassword[33] = "\001"; static GBool printVersion = gFalse; @@ -65,6 +67,8 @@ "first page to examine"}, {"-l", argInt, &lastPage, 0, "last page to examine"}, + {"-subst", argFlag, &showSubst, 0, + "show font substitutions"}, {"-opw", argString, ownerPassword, sizeof(ownerPassword), "owner password (for encrypted files)"}, {"-upw", argString, userPassword, sizeof(userPassword), @@ -152,27 +156,54 @@ FontInfoScanner scanner(doc, firstPage - 1); GooList *fonts = scanner.scan(lastPage - firstPage + 1); - // print the font info - printf("name type emb sub uni object ID\n"); - printf("------------------------------------ ----------------- --- --- --- ---------\n"); - if (fonts) { - for (int i = 0; i < fonts->getLength(); ++i) { - FontInfo *font = (FontInfo *)fonts->get(i); - printf("%-36s %-17s %-3s %-3s %-3s", - font->getName() ? font->getName()->getCString() : "[none]", - fontTypeNames[font->getType()], - font->getEmbedded() ? "yes" : "no", - font->getSubset() ? "yes" : "no", - font->getToUnicode() ? "yes" : "no"); - const Ref fontRef = font->getRef(); - if (fontRef.gen >= 100000) { - printf(" [none]\n"); - } else { - printf(" %6d %2d\n", fontRef.num, fontRef.gen); + if (showSubst) { + // print the font substitutions + printf("name object ID substitute font substitute font file\n"); + printf("------------------------------------ --------- ------------------------------------ ------------------------------------\n"); + if (fonts) { + for (int i = 0; i < fonts->getLength(); ++i) { + FontInfo *font = (FontInfo *)fonts->get(i); + if (font->getFile()) { + printf("%-36s", + font->getName() ? font->getName()->getCString() : "[none]"); + const Ref fontRef = font->getRef(); + if (fontRef.gen >= 100000) { + printf(" [none]"); + } else { + printf(" %6d %2d", fontRef.num, fontRef.gen); + } + printf(" %-36s %s\n", + font->getSubstituteName() ? font->getSubstituteName()->getCString() : "[none]", + font->getFile()->getCString()); + } + delete font; } - delete font; + delete fonts; + } + } else { + // print the font info + printf("name type encoding emb sub uni object ID\n"); + printf("------------------------------------ ----------------- ---------------- --- --- --- ---------\n"); + if (fonts) { + for (int i = 0; i < fonts->getLength(); ++i) { + FontInfo *font = (FontInfo *)fonts->get(i); + printf("%-36s %-17s %-16s %-3s %-3s %-3s", + font->getName() ? font->getName()->getCString() : "[none]", + fontTypeNames[font->getType()], + font->getEncoding()->getCString(), + font->getEmbedded() ? "yes" : "no", + font->getSubset() ? "yes" : "no", + font->getToUnicode() ? "yes" : "no"); + const Ref fontRef = font->getRef(); + if (fontRef.gen >= 100000) { + printf(" [none]\n"); + } else { + printf(" %6d %2d\n", fontRef.num, fontRef.gen); + } + delete font; + } + delete fonts; } - delete fonts; } } diff -Nru poppler-0.18.4/utils/pdfimages.1 poppler-0.20.5/utils/pdfimages.1 --- poppler-0.18.4/utils/pdfimages.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdfimages.1 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,8 @@ -.\" Copyright 1998-2004 Glyph & Cog, LLC -.TH pdfimages 1 "22 January 2004" +.\" Copyright 1998-2011 Glyph & Cog, LLC +.TH pdfimages 1 "15 August 2011" .SH NAME pdfimages \- Portable Document Format (PDF) image extractor -(version 3.00) +(version 3.03) .SH SYNOPSIS .B pdfimages [options] @@ -35,6 +35,107 @@ format are saved as JPEG files. All non-DCT images are saved in PBM/PPM format as usual. .TP +.B \-list +Instead of writing the images, list the images along with various information for each image. Do not specify an +.IR image-root +with this option. +.IP +The following information is listed for each font: +.RS +.TP +.B page +the page number containing the image +.TP +.B num +the image number +.TP +.B type +the image type: +.PP +.RS +image - an opaque image +.RE +.RS +mask - a monochrome mask image +.RE +.RS +smask - a soft-mask image +.RE +.RS +stencil - a monochrome mask image used for painting a color or pattern +.RE +.PP +Note: Tranparency in images is represented in PDF using a separate image for the image and the mask/smask. +The mask/smask used as part of a transparent image always immediately follows the image in the image list. +.TP +.B width +image width (in pixels) +.TP +.B height +image height (in pixels) +.PP +Note: the image width/height is the size of the embedded image, not the size the image will be rendered at. +.TP +.B color +image color space: +.PP +.RS +gray - Gray +.RE +.RS +rgb - RGB +.RE +.RS +cmyk - CMYK +.RE +.RS +lab - L*a*b +.RE +.RS +icc - ICC Based +.RE +.RS +index - Indexed Color +.RE +.RS +sep - Separation +.RE +.RS +devn - DeviceN +.RE +.TP +.B comp +number of color components +.TP +.B bpc +bits per component +.TP +.B enc +encoding: +.PP +.RS +image - raster image (may be Flate or LZW compressed but does not use an image encoding) +.RE +.RS +jpeg - Joint Photographic Experts Group +.RE +.RS +jp2 - JPEG2000 +.RE +.RS +jbig2 - Joint Bi-Level Image Experts Group +.RE +.RS +ccitt - CCITT Group 3 or Group 4 Fax +.RE +.TP +.B interp +"yes" if the interpolation is to be performed when scaling up the image +.TP +.B object ID +the font dictionary object ID (number and generation) +.RE +.TP .BI \-opw " password" Specify the owner password for the PDF file. Providing this will bypass all security restrictions. @@ -75,9 +176,10 @@ 99 Other error. .SH AUTHOR -The pdfimages software and documentation are copyright 1998-2004 Glyph +The pdfimages software and documentation are copyright 1998-2011 Glyph & Cog, LLC. .SH "SEE ALSO" +.BR pdfdetach (1) .BR pdffonts (1), .BR pdfinfo (1), .BR pdftocairo (1), diff -Nru poppler-0.18.4/utils/pdfimages.cc poppler-0.20.5/utils/pdfimages.cc --- poppler-0.18.4/utils/pdfimages.cc 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdfimages.cc 2012-05-10 20:05:44.000000000 +0000 @@ -18,6 +18,7 @@ // Copyright (C) 2007-2008, 2010 Albert Astals Cid // Copyright (C) 2010 Hib Eris // Copyright (C) 2010 Jakob Voss +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -48,6 +49,7 @@ static int firstPage = 1; static int lastPage = 0; +static GBool listImages = gFalse; static GBool dumpJPEG = gFalse; static GBool pageNames = gFalse; static char ownerPassword[33] = "\001"; @@ -63,6 +65,8 @@ "last page to convert"}, {"-j", argFlag, &dumpJPEG, 0, "write JPEG images as JPEG files"}, + {"-list", argFlag, &listImages, 0, + "print list of images instead of saving"}, {"-opw", argString, ownerPassword, sizeof(ownerPassword), "owner password (for encrypted files)"}, {"-upw", argString, userPassword, sizeof(userPassword), @@ -87,7 +91,7 @@ int main(int argc, char *argv[]) { PDFDoc *doc; GooString *fileName; - char *imgRoot; + char *imgRoot = NULL; GooString *ownerPW, *userPW; ImageOutputDev *imgOut; GBool ok; @@ -97,7 +101,7 @@ // parse args ok = parseArgs(argDesc, &argc, argv); - if (!ok || argc != 3 || printVersion || printHelp) { + if (!ok || (listImages && argc != 2) || (!listImages && argc != 3) || printVersion || printHelp) { fprintf(stderr, "pdfimages version %s\n", PACKAGE_VERSION); fprintf(stderr, "%s\n", popplerCopyright); fprintf(stderr, "%s\n", xpdfCopyright); @@ -109,7 +113,8 @@ goto err0; } fileName = new GooString(argv[1]); - imgRoot = argv[2]; + if (!listImages) + imgRoot = argv[2]; // read config file globalParams = new GlobalParams(); @@ -150,7 +155,7 @@ // check for copy permission #ifdef ENFORCE_PERMISSIONS if (!doc->okToCopy()) { - error(-1, "Copying of images from this document is not allowed."); + error(errNotAllowed, -1, "Copying of images from this document is not allowed."); exitCode = 3; goto err1; } @@ -163,7 +168,7 @@ lastPage = doc->getNumPages(); // write image files - imgOut = new ImageOutputDev(imgRoot, pageNames, dumpJPEG); + imgOut = new ImageOutputDev(imgRoot, pageNames, dumpJPEG, listImages); if (imgOut->isOk()) { doc->displayPages(imgOut, firstPage, lastPage, 72, 72, 0, gTrue, gFalse, gFalse); diff -Nru poppler-0.18.4/utils/pdfinfo.1 poppler-0.20.5/utils/pdfinfo.1 --- poppler-0.18.4/utils/pdfinfo.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdfinfo.1 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,8 @@ -.\" Copyright 1999-2004 Glyph & Cog, LLC -.TH pdfinfo 1 "22 January 2004" +.\" Copyright 1999-2011 Glyph & Cog, LLC +.TH pdfinfo 1 "15 August 2011" .SH NAME pdfinfo \- Portable Document Format (PDF) document information -extractor (version 3.00) +extractor (version 3.03) .SH SYNOPSIS .B pdfinfo [options] @@ -45,6 +45,9 @@ tagged (yes/no) .RE .RS +form (AcroForm / XFA / none) +.RE +.RS page count .RE .RS @@ -87,6 +90,9 @@ Prints document-level metadata. (This is the "Metadata" stream from the PDF file's Catalog object.) .TP +.B \-rawdates +Prints the raw (undecoded) date strings, directly from the PDF file. +.TP .BI \-enc " encoding-name" Sets the encoding to use for text output. This defaults to "UTF-8". .TP @@ -127,9 +133,10 @@ 99 Other error. .SH AUTHOR -The pdfinfo software and documentation are copyright 1996-2004 Glyph & +The pdfinfo software and documentation are copyright 1996-2011 Glyph & Cog, LLC. .SH "SEE ALSO" +.BR pdfdetach (1), .BR pdffonts (1), .BR pdfimages (1), .BR pdftocairo (1), diff -Nru poppler-0.18.4/utils/pdfinfo.cc poppler-0.20.5/utils/pdfinfo.cc --- poppler-0.18.4/utils/pdfinfo.cc 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdfinfo.cc 2012-09-08 16:07:00.000000000 +0000 @@ -14,8 +14,10 @@ // under GPL version 2 or later // // Copyright (C) 2006 Dom Lachowicz -// Copyright (C) 2007-2010 Albert Astals Cid +// Copyright (C) 2007-2010, 2012 Albert Astals Cid // Copyright (C) 2010 Hib Eris +// Copyright (C) 2011 Vittal Aithal +// Copyright (C) 2012 Adrian Johnson // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -50,15 +52,16 @@ #include "Error.h" #include "DateInfo.h" -static void printInfoString(Dict *infoDict, char *key, char *text, +static void printInfoString(Dict *infoDict, const char *key, const char *text, UnicodeMap *uMap); -static void printInfoDate(Dict *infoDict, char *key, char *text); -static void printBox(char *text, PDFRectangle *box); +static void printInfoDate(Dict *infoDict, const char *key, const char *text); +static void printBox(const char *text, PDFRectangle *box); static int firstPage = 1; static int lastPage = 0; static GBool printBoxes = gFalse; static GBool printMetadata = gFalse; +static GBool rawDates = gFalse; static char textEncName[128] = ""; static char ownerPassword[33] = "\001"; static char userPassword[33] = "\001"; @@ -75,6 +78,8 @@ "print the page bounding boxes"}, {"-meta", argFlag, &printMetadata, 0, "print the document metadata (XML)"}, + {"-rawdates", argFlag, &rawDates, 0, + "print the undecoded date strings directly from the PDF file"}, {"-enc", argString, textEncName, sizeof(textEncName), "output text encoding name"}, {"-listenc",argFlag, &printEnc, 0, @@ -102,7 +107,8 @@ GooString *ownerPW, *userPW; UnicodeMap *uMap; Page *page; - Object info; + Object info, xfa; + Object *acroForm; char buf[256]; double w, h, wISO, hISO; FILE *f; @@ -111,6 +117,7 @@ int exitCode; int pg, i; GBool multiPage; + int r; exitCode = 99; @@ -146,7 +153,7 @@ // get mapping to output encoding if (!(uMap = globalParams->getTextEncoding())) { - error(-1, "Couldn't get text encoding"); + error(errCommandLine, -1, "Couldn't get text encoding"); delete fileName; goto err1; } @@ -204,8 +211,15 @@ printInfoString(info.getDict(), "Author", "Author: ", uMap); printInfoString(info.getDict(), "Creator", "Creator: ", uMap); printInfoString(info.getDict(), "Producer", "Producer: ", uMap); - printInfoDate(info.getDict(), "CreationDate", "CreationDate: "); - printInfoDate(info.getDict(), "ModDate", "ModDate: "); + if (rawDates) { + printInfoString(info.getDict(), "CreationDate", "CreationDate: ", + uMap); + printInfoString(info.getDict(), "ModDate", "ModDate: ", + uMap); + } else { + printInfoDate(info.getDict(), "CreationDate", "CreationDate: "); + printInfoDate(info.getDict(), "ModDate", "ModDate: "); + } } info.free(); @@ -213,6 +227,19 @@ printf("Tagged: %s\n", doc->getStructTreeRoot()->isDict() ? "yes" : "no"); + // print form info + if ((acroForm = doc->getCatalog()->getAcroForm())->isDict()) { + acroForm->dictLookup("XFA", &xfa); + if (xfa.isStream() || xfa.isArray()) { + printf("Form: XFA\n"); + } else { + printf("Form: AcroForm\n"); + } + xfa.free(); + } else { + printf("Form: none\n"); + } + // print page count printf("Pages: %d\n", doc->getNumPages()); @@ -254,6 +281,12 @@ } } printf("\n"); + r = doc->getPageRotate(pg); + if (multiPage) { + printf("Page %4d rot: %d\n", pg, r); + } else { + printf("Page rot: %d\n", r); + } } // print the boxes @@ -262,7 +295,7 @@ for (pg = firstPage; pg <= lastPage; ++pg) { page = doc->getPage(pg); if (!page) { - error(-1, "Failed to print boxes for page %d", pg); + error(errSyntaxError, -1, "Failed to print boxes for page {0:d}", pg); continue; } sprintf(buf, "Page %4d MediaBox: ", pg); @@ -279,7 +312,7 @@ } else { page = doc->getPage(firstPage); if (!page) { - error(-1, "Failed to print boxes for page %d", firstPage); + error(errSyntaxError, -1, "Failed to print boxes for page {0:d}", firstPage); } else { printBox("MediaBox: ", page->getMediaBox()); printBox("CropBox: ", page->getCropBox()); @@ -342,12 +375,12 @@ return exitCode; } -static void printInfoString(Dict *infoDict, char *key, char *text, +static void printInfoString(Dict *infoDict, const char *key, const char *text, UnicodeMap *uMap) { Object obj; GooString *s1; GBool isUnicode; - Unicode u; + Unicode u, u2; char buf[8]; int i, n; @@ -367,6 +400,15 @@ u = ((s1->getChar(i) & 0xff) << 8) | (s1->getChar(i+1) & 0xff); i += 2; + if (u >= 0xd800 && u <= 0xdbff && i < obj.getString()->getLength()) { + // surrogate pair + u2 = ((s1->getChar(i) & 0xff) << 8) | + (s1->getChar(i+1) & 0xff); + i += 2; + if (u2 >= 0xdc00 && u2 <= 0xdfff) { + u = 0x10000 + ((u - 0xd800) << 10) + (u2 - 0xdc00); + } + } } else { u = pdfDocEncoding[s1->getChar(i) & 0xff]; ++i; @@ -379,7 +421,7 @@ obj.free(); } -static void printInfoDate(Dict *infoDict, char *key, char *text) { +static void printInfoDate(Dict *infoDict, const char *key, const char *text) { Object obj; char *s; int year, mon, day, hour, min, sec, tz_hour, tz_minute; @@ -416,7 +458,7 @@ obj.free(); } -static void printBox(char *text, PDFRectangle *box) { +static void printBox(const char *text, PDFRectangle *box) { printf("%s%8.2f %8.2f %8.2f %8.2f\n", text, box->x1, box->y1, box->x2, box->y2); } diff -Nru poppler-0.18.4/utils/pdfseparate.1 poppler-0.20.5/utils/pdfseparate.1 --- poppler-0.18.4/utils/pdfseparate.1 2012-02-12 22:26:43.000000000 +0000 +++ poppler-0.20.5/utils/pdfseparate.1 2012-08-15 13:31:39.000000000 +0000 @@ -13,10 +13,10 @@ pdfseparate reads the PDF file .IR PDF-file , extracts one or more pages, and writes one PDF file for each page to -.IR PDF-page-pattern, +.IR PDF-page-pattern , PDF-page-pattern should contain -.B %d -. %d is replaced by the page number. +.BR %d . +%d is replaced by the page number. .TP The PDF-file should not be encrypted. .SH OPTIONS diff -Nru poppler-0.18.4/utils/pdfseparate.cc poppler-0.20.5/utils/pdfseparate.cc --- poppler-0.18.4/utils/pdfseparate.cc 2012-01-15 14:04:23.000000000 +0000 +++ poppler-0.20.5/utils/pdfseparate.cc 2012-09-11 17:43:58.000000000 +0000 @@ -5,6 +5,7 @@ // This file is licensed under the GPLv2 or later // // Copyright (C) 2011, 2012 Thomas Freitag +// Copyright (C) 2012 Albert Astals Cid // //======================================================================== #include "config.h" @@ -48,11 +49,11 @@ PDFDoc *doc = new PDFDoc (gfileName, NULL, NULL, NULL); if (!doc->isOk()) { - error(-1, "Could not extract page(s) from damaged file ('%s')", srcFileName); + error(errSyntaxError, -1, "Could not extract page(s) from damaged file ('{0:s}')", srcFileName); return false; } if (doc->isEncrypted()) { - error(-1, "Could not extract page(s) from encrypted file ('%s')", srcFileName); + error(errSyntaxError, -1, "Could not extract page(s) from encrypted file ('{0:s}')", srcFileName); return false; } @@ -65,7 +66,7 @@ if (firstPage == 0) firstPage = 1; if (firstPage != lastPage && strstr(destFileName, "%d") == NULL) { - error(-1, "'%s' must contain '%%d' if more than one page should be extracted", destFileName); + error(errSyntaxError, -1, "'{0:s}' must contain '%%d' if more than one page should be extracted", destFileName); return false; } for (int pageNo = firstPage; pageNo <= lastPage; pageNo++) { @@ -109,7 +110,10 @@ goto err0; } globalParams = new GlobalParams(); - extractPages (argv[1], argv[2]); + ok = extractPages (argv[1], argv[2]); + if (ok) { + exitCode = 0; + } delete globalParams; err0: diff -Nru poppler-0.18.4/utils/pdftocairo.1 poppler-0.20.5/utils/pdftocairo.1 --- poppler-0.18.4/utils/pdftocairo.1 2012-02-12 22:26:43.000000000 +0000 +++ poppler-0.20.5/utils/pdftocairo.1 2012-05-10 20:05:44.000000000 +0000 @@ -112,13 +112,19 @@ Specifies the Y resolution, in pixels per inch of image files (or rasterized regions in vector output). The default is 150 PPI. .TP .BI \-scale-to " number" -Scales each page to fit in scale-to*scale-to pixel box (PNG/JPEG only). +Scales the long side of each page (width for landscape pages, height +for portrait pages) to fit in scale-to pixels. The size of the short +side will be determined by the aspect ratio of the page (PNG/JPEG only). .TP .BI \-scale-to-x " number" -Scales each page horizontally to fit in scale-to-x pixels (PNG/JPEG only). +Scales each page horizontally to fit in scale-to-x pixels. If +scale-to-y is set to -1, the vertical size will determined by the +aspect ratio of the page (PNG/JPEG only). .TP .BI \-scale-to-y " number" -Scales each page vertically to fit in scale-to-y pixels (PNG/JPEG only). +Scales each page vertically to fit in scale-to-y pixels. If scale-to-x +is set to -1, the horizontal size will determined by the aspect ratio +of the page (PNG/JPEG only). .TP .BI \-x " number" Specifies the x-coordinate of the crop area top left corner in pixels (image output) or points (vector output) @@ -245,6 +251,7 @@ The pdftocairo software and documentation are copyright 1996-2004 Glyph & Cog, LLC and copyright 2005-2011 The Poppler Developers. .SH "SEE ALSO" +.BR pdfdetach (1), .BR pdffonts (1), .BR pdfimages (1), .BR pdfinfo (1), diff -Nru poppler-0.18.4/utils/pdftocairo.cc poppler-0.20.5/utils/pdftocairo.cc --- poppler-0.18.4/utils/pdftocairo.cc 2012-01-30 19:32:08.000000000 +0000 +++ poppler-0.20.5/utils/pdftocairo.cc 2012-05-10 20:05:44.000000000 +0000 @@ -19,12 +19,13 @@ // Copyright (C) 2009 Shen Liang // Copyright (C) 2009 Stefan Thomas // Copyright (C) 2009, 2010 Albert Astals Cid -// Copyright (C) 2010, 2011 Adrian Johnson +// Copyright (C) 2010, 2011, 2012 Adrian Johnson // Copyright (C) 2010 Hib Eris // Copyright (C) 2010 Jonathan Liu // Copyright (C) 2010 William Bader // Copyright (C) 2011 Thomas Freitag // Copyright (C) 2011 Carlos Garcia Campos +// Copyright (C) 2012 Koji Otani // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -50,7 +51,11 @@ #include "PDFDocFactory.h" #include "CairoOutputDev.h" #if USE_CMS +#ifdef USE_LCMS1 #include +#else +#include +#endif #endif #include #if CAIRO_HAS_PS_SURFACE @@ -257,10 +262,22 @@ writer = new PNGWriter(PNGWriter::RGB); #if USE_CMS +#ifdef USE_LCMS1 if (icc_data) static_cast(writer)->setICCProfile(cmsTakeProductName(profile), icc_data, icc_data_size); else static_cast(writer)->setSRGBProfile(); +#else + if (icc_data) { + cmsUInt8Number profileID[17]; + profileID[16] = '\0'; + + cmsGetHeaderProfileID(profile,profileID); + static_cast(writer)->setICCProfile(reinterpret_cast(profileID), icc_data, icc_data_size); + } else { + static_cast(writer)->setSRGBProfile(); + } +#endif #endif #endif @@ -533,7 +550,7 @@ status = cairo_status(cr); if (status) - error(-1, "cairo error: %s\n", cairo_status_to_string(status)); + error(errInternal, -1, "cairo error: {0:s}\n", cairo_status_to_string(status)); cairo_destroy (cr); } @@ -548,7 +565,7 @@ cairo_surface_finish(surface); status = cairo_surface_status(surface); if (status) - error(-1, "cairo error: %s\n", cairo_status_to_string(status)); + error(errInternal, -1, "cairo error: {0:s}\n", cairo_status_to_string(status)); cairo_surface_destroy(surface); } @@ -562,7 +579,7 @@ cairo_surface_finish(surface); status = cairo_surface_status(surface); if (status) - error(-1, "cairo error: %s\n", cairo_status_to_string(status)); + error(errInternal, -1, "cairo error: {0:s}\n", cairo_status_to_string(status)); cairo_surface_destroy(surface); fclose(output_file); } @@ -682,7 +699,7 @@ return name; } -static void checkInvalidPrintOption(GBool option, char *option_name) +static void checkInvalidPrintOption(GBool option, const char *option_name) { if (option) { fprintf(stderr, "Error: %s may only be used with the -png or -jpeg output options.\n", option_name); @@ -690,7 +707,7 @@ } } -static void checkInvalidImageOption(GBool option, char *option_name) +static void checkInvalidImageOption(GBool option, const char *option_name) { if (option) { fprintf(stderr, "Error: %s may only be used with the -ps, -eps, -pdf, or -svg output options.\n", option_name); @@ -909,7 +926,7 @@ firstPage++; cairoOut = new CairoOutputDev(); - cairoOut->startDoc(doc->getXRef(), doc->getCatalog()); + cairoOut->startDoc(doc); if (sz != 0) crop_w = crop_h = sz; pg_num_len = numberOfCharacters(doc->getNumPages()); @@ -935,11 +952,15 @@ resolution = (72.0 * scaleTo) / (pg_w > pg_h ? pg_w : pg_h); x_resolution = y_resolution = resolution; } else { - if (x_scaleTo != 0) { + if (x_scaleTo > 0) { x_resolution = (72.0 * x_scaleTo) / pg_w; + if (y_scaleTo == -1) + y_resolution = x_resolution; } - if (y_scaleTo != 0) { + if (y_scaleTo > 0) { y_resolution = (72.0 * y_scaleTo) / pg_h; + if (x_scaleTo == -1) + x_resolution = y_resolution; } } if ((doc->getPageRotate(pg) == 90) || (doc->getPageRotate(pg) == 270)) { diff -Nru poppler-0.18.4/utils/pdftohtml.1 poppler-0.20.5/utils/pdftohtml.1 --- poppler-0.18.4/utils/pdftohtml.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftohtml.1 2012-06-11 13:19:41.000000000 +0000 @@ -84,6 +84,11 @@ .TP .B \-nodrm override document DRM settings +.TP +.B \-wbt +adjust the word break threshold percent. Default is 10. +Word break occurs when distance between two adjacent characters is +greater than this percent of character height. .SH AUTHOR @@ -93,6 +98,7 @@ This manual page was written by Søren Boll Overgaard , for the Debian GNU/Linux system (but may be used by others). .SH "SEE ALSO" +.BR pdfdetach (1), .BR pdffonts (1), .BR pdfimages (1), .BR pdfinfo (1), diff -Nru poppler-0.18.4/utils/pdftohtml.cc poppler-0.20.5/utils/pdftohtml.cc --- poppler-0.18.4/utils/pdftohtml.cc 2012-02-08 22:41:40.000000000 +0000 +++ poppler-0.20.5/utils/pdftohtml.cc 2012-06-11 13:19:41.000000000 +0000 @@ -20,6 +20,7 @@ // Copyright (C) 2010 OSSD CDAC Mumbai by Leena Chourey (leenac@cdacmumbai.in) and Onkar Potdar (onkar@cdacmumbai.in) // Copyright (C) 2011 Steven Murdoch // Copyright (C) 2012 Igor Slepchin +// Copyright (C) 2012 Ihar Filipau // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -46,6 +47,7 @@ #include "XRef.h" #include "Catalog.h" #include "Page.h" +#include "Outline.h" #include "PDFDoc.h" #include "PDFDocFactory.h" #include "HtmlOutputDev.h" @@ -81,6 +83,7 @@ GBool xml=gFalse; static GBool errQuiet=gFalse; static GBool noDrm=gFalse; +double wordBreakThreshold=10; // 10%, below converted into a coefficient - 0.1 GBool showHidden = gFalse; GBool noMerge = gFalse; @@ -89,8 +92,8 @@ static char gsDevice[33] = "none"; static GBool printVersion = gFalse; -static GooString* getInfoString(Dict *infoDict, char *key); -static GooString* getInfoDate(Dict *infoDict, char *key); +static GooString* getInfoString(Dict *infoDict, const char *key); +static GooString* getInfoDate(Dict *infoDict, const char *key); static char textEncName[128] = ""; @@ -141,6 +144,8 @@ "user password (for encrypted files)"}, {"-nodrm", argFlag, &noDrm, 0, "override document DRM settings"}, + {"-wbt", argFP, &wordBreakThreshold, 0, + "word break threshold (default 10 percent)"}, {NULL} }; @@ -182,11 +187,12 @@ SplashOutputDev *splashOut = NULL; #endif PSOutputDev *psOut = NULL; + GBool doOutline; GBool ok; char *p; GooString *ownerPW, *userPW; Object info; - char * extsList[] = {"png", "jpeg", "bmp", "pcx", "tiff", "pbm", NULL}; + const char * extsList[] = {"png", "jpeg", "bmp", "pcx", "tiff", "pbm", NULL}; // parse args ok = parseArgs(argDesc, &argc, argv); @@ -219,6 +225,9 @@ } } + // convert from user-friendly percents into a coefficient + wordBreakThreshold /= 100.0; + // open PDF file if (ownerPassword[0]) { ownerPW = new GooString(ownerPassword); @@ -253,7 +262,7 @@ // check for copy permission if (!doc->okToCopy()) { if (!noDrm) { - error(-1, "Copying of text from this document is not allowed."); + error(errNotAllowed, -1, "Copying of text from this document is not allowed."); goto error; } fprintf(stderr, "Document has copy-protection bit set.\n"); @@ -282,7 +291,7 @@ } delete tmp; } else if (fileName->cmp("fd://0") == 0) { - error(-1, "You have to provide an output filename when reading form stdin."); + error(errCommandLine, -1, "You have to provide an output filename when reading form stdin."); goto error; } else { p = fileName->getCString() + fileName->getLength() - 4; @@ -370,8 +379,13 @@ else rawOrder = singleHtml; +#ifdef DISABLE_OUTLINE + doOutline = gFalse; +#else + doOutline = doc->getOutline()->getItems() != NULL; +#endif // write text file - htmlOut = new HtmlOutputDev(htmlFileName->getCString(), + htmlOut = new HtmlOutputDev(doc->getCatalog(), htmlFileName->getCString(), docTitle->getCString(), author ? author->getCString() : NULL, keywords ? keywords->getCString() : NULL, @@ -380,7 +394,7 @@ extension, rawOrder, firstPage, - doc->getCatalog()->getOutline()->isDict()); + doOutline); delete docTitle; if( author ) { @@ -403,10 +417,7 @@ { doc->displayPages(htmlOut, firstPage, lastPage, 72 * scale, 72 * scale, 0, gTrue, gFalse, gFalse); - if (!xml) - { - htmlOut->dumpDocOutline(doc); - } + htmlOut->dumpDocOutline(doc); } if ((complexMode || singleHtml) && !xml && !ignore) { @@ -421,7 +432,7 @@ splashFormatPng : splashFormatJpeg; splashOut = new SplashOutputDevNoText(splashModeRGB8, 4, gFalse, color); - splashOut->startDoc(doc->getXRef()); + splashOut->startDoc(doc); for (int pg = firstPage; pg <= lastPage; ++pg) { doc->displayPage(splashOut, pg, @@ -449,8 +460,8 @@ psFileName = new GooString(htmlFileName->getCString()); psFileName->append(".ps"); - psOut = new PSOutputDev(psFileName->getCString(), doc, doc->getXRef(), - doc->getCatalog(), NULL, firstPage, lastPage, psModePS, w, h); + psOut = new PSOutputDev(psFileName->getCString(), doc, + NULL, firstPage, lastPage, psModePS, w, h); psOut->setDisplayText(gFalse); doc->displayPages(psOut, firstPage, lastPage, 72, 72, 0, gTrue, gFalse, gFalse); @@ -476,14 +487,13 @@ gsCmd->append(tw); gsCmd->append("x"); th = GooString::fromInt(static_cast(scale*h)); - th = GooString::fromInt(static_cast(scale*h)); gsCmd->append(th); gsCmd->append(" -q \""); gsCmd->append(psFileName); gsCmd->append("\""); // printf("running: %s\n", gsCmd->getCString()); if( !executeCommand(gsCmd->getCString()) && !errQuiet) { - error(-1, "Failed to launch Ghostscript!\n"); + error(errIO, -1, "Failed to launch Ghostscript!\n"); } unlink(psFileName->getCString()); delete tw; @@ -512,7 +522,7 @@ return 0; } -static GooString* getInfoString(Dict *infoDict, char *key) { +static GooString* getInfoString(Dict *infoDict, const char *key) { Object obj; // Raw value as read from PDF (may be in pdfDocEncoding or UCS2) GooString *rawString; @@ -555,7 +565,7 @@ return encodedString; } -static GooString* getInfoDate(Dict *infoDict, char *key) { +static GooString* getInfoDate(Dict *infoDict, const char *key) { Object obj; char *s; int year, mon, day, hour, min, sec, tz_hour, tz_minute; diff -Nru poppler-0.18.4/utils/pdftoppm.1 poppler-0.20.5/utils/pdftoppm.1 --- poppler-0.18.4/utils/pdftoppm.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftoppm.1 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,8 @@ -.\" Copyright 2004 Glyph & Cog, LLC -.TH pdftoppm 1 "22 January 2004" +.\" Copyright 2005-2011 Glyph & Cog, LLC +.TH pdftoppm 1 "15 August 2011" .SH NAME pdftoppm \- Portable Document Format (PDF) to Portable Pixmap (PPM) -converter (version 3.00) +converter (version 3.03) .SH SYNOPSIS .B pdftoppm [options] @@ -17,9 +17,9 @@ Pdftoppm reads the PDF file, .IR PDF-file , and writes one PPM file for each page, -.IR PPM-root - nnnnnn .ppm, +.IR PPM-root - number .ppm, where -.I nnnnnn +.I number is the page number. .SH OPTIONS .TP @@ -48,13 +48,19 @@ Specifies the Y resolution, in DPI. The default is 150 DPI. .TP .BI \-scale-to " number" -Scales each page to fit in scale-to*scale-to pixel box. +Scales the long side of each page (width for landscape pages, height +for portrait pages) to fit in scale-to pixels. The size of the short +side will be determined by the aspect ratio of the page. .TP .BI \-scale-to-x " number" -Scales each page horizontally to fit in scale-to-x pixels. +Scales each page horizontally to fit in scale-to-x pixels. If +scale-to-y is set to -1, the vertical size will determined by the +aspect ratio of the page. .TP .BI \-scale-to-y " number" -Scales each page vertically to fit in scale-to-y pixels. +Scales each page vertically to fit in scale-to-y pixels. If scale-to-x +is set to -1, the horizontal size will determined by the aspect ratio +of the page. .TP .BI \-x " number" Specifies the x-coordinate of the crop area top left corner @@ -139,9 +145,10 @@ 99 Other error. .SH AUTHOR -The pdftoppm software and documentation are copyright 1996-2004 Glyph +The pdftoppm software and documentation are copyright 1996-2011 Glyph & Cog, LLC. .SH "SEE ALSO" +.BR pdfdetach (1), .BR pdffonts (1), .BR pdfimages (1), .BR pdfinfo (1), diff -Nru poppler-0.18.4/utils/pdftoppm.cc poppler-0.20.5/utils/pdftoppm.cc --- poppler-0.18.4/utils/pdftoppm.cc 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftoppm.cc 2012-05-10 20:05:44.000000000 +0000 @@ -19,7 +19,7 @@ // Copyright (C) 2009 Shen Liang // Copyright (C) 2009 Stefan Thomas // Copyright (C) 2009-2011 Albert Astals Cid -// Copyright (C) 2010 Adrian Johnson +// Copyright (C) 2010, 2012 Adrian Johnson // Copyright (C) 2010 Hib Eris // Copyright (C) 2010 Jonathan Liu // Copyright (C) 2010 William Bader @@ -49,8 +49,6 @@ #include "splash/Splash.h" #include "SplashOutputDev.h" -#define PPM_FILE_SZ 512 - static int firstPage = 1; static int lastPage = 0; static GBool printOnlyOdd = gFalse; @@ -244,7 +242,7 @@ PDFDoc *doc; GooString *fileName = NULL; char *ppmRoot = NULL; - char ppmFile[PPM_FILE_SZ]; + char *ppmFile; GooString *ownerPW, *userPW; SplashColor paperColor; SplashOutputDev *splashOut; @@ -354,6 +352,7 @@ // write PPM files #if SPLASH_CMYK if (jpegcmyk || overprint) { + globalParams->setOverprintPreview(gTrue); paperColor[0] = 0; paperColor[1] = 0; paperColor[2] = 0; @@ -372,7 +371,7 @@ #endif splashModeRGB8, 4, gFalse, paperColor); - splashOut->startDoc(doc->getXRef()); + splashOut->startDoc(doc); if (sz != 0) w = h = sz; pg_num_len = numberOfCharacters(doc->getNumPages()); for (pg = firstPage; pg <= lastPage; ++pg) { @@ -390,11 +389,15 @@ resolution = (72.0 * scaleTo) / (pg_w > pg_h ? pg_w : pg_h); x_resolution = y_resolution = resolution; } else { - if (x_scaleTo != 0) { + if (x_scaleTo > 0) { x_resolution = (72.0 * x_scaleTo) / pg_w; + if (y_scaleTo == -1) + y_resolution = x_resolution; } - if (y_scaleTo != 0) { + if (y_scaleTo > 0) { y_resolution = (72.0 * y_scaleTo) / pg_h; + if (x_scaleTo == -1) + x_resolution = y_resolution; } } pg_w = pg_w * (x_resolution / 72.0); @@ -407,13 +410,14 @@ if (ppmRoot != NULL) { const char *ext = png ? "png" : (jpeg || jpegcmyk) ? "jpg" : tiff ? "tif" : mono ? "pbm" : gray ? "pgm" : "ppm"; if (singleFile) { - snprintf(ppmFile, PPM_FILE_SZ, "%.*s.%s", - PPM_FILE_SZ - 32, ppmRoot, ext); + ppmFile = new char[strlen(ppmRoot) + 1 + strlen(ext) + 1]; + sprintf(ppmFile, "%s.%s", ppmRoot, ext); } else { - snprintf(ppmFile, PPM_FILE_SZ, "%.*s-%0*d.%s", - PPM_FILE_SZ - 32, ppmRoot, pg_num_len, pg, ext); + ppmFile = new char[strlen(ppmRoot) + 1 + pg_num_len + 1 + strlen(ext) + 1]; + sprintf(ppmFile, "%s-%0*d.%s", ppmRoot, pg_num_len, pg, ext); } savePageSlice(doc, splashOut, pg, x, y, w, h, pg_w, pg_h, ppmFile); + delete[] ppmFile; } else { savePageSlice(doc, splashOut, pg, x, y, w, h, pg_w, pg_h, NULL); } diff -Nru poppler-0.18.4/utils/pdftops.1 poppler-0.20.5/utils/pdftops.1 --- poppler-0.18.4/utils/pdftops.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftops.1 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,8 @@ -.\" Copyright 1996-2004 Glyph & Cog, LLC -.TH pdftops 1 "31 July 2009" +.\" Copyright 1996-2011 Glyph & Cog, LLC +.TH pdftops 1 "15 August 2011" .SH NAME pdftops \- Portable Document Format (PDF) to PostScript converter -(version 3.00) +(version 3.03) .SH SYNOPSIS .B pdftops [options] @@ -214,9 +214,10 @@ 99 Other error. .SH AUTHOR -The pdftops software and documentation are copyright 1996-2004 Glyph & +The pdftops software and documentation are copyright 1996-2011 Glyph & Cog, LLC. .SH "SEE ALSO" +.BR pdfdetach (1), .BR pdffonts (1), .BR pdfimages (1), .BR pdfinfo (1), diff -Nru poppler-0.18.4/utils/pdftops.cc poppler-0.20.5/utils/pdftops.cc --- poppler-0.18.4/utils/pdftops.cc 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftops.cc 2012-05-10 20:05:44.000000000 +0000 @@ -19,8 +19,9 @@ // Copyright (C) 2007-2008, 2010 Albert Astals Cid // Copyright (C) 2009 Till Kamppeter // Copyright (C) 2009 Sanjoy Mahajan -// Copyright (C) 2009, 2011 William Bader +// Copyright (C) 2009, 2011, 2012 William Bader // Copyright (C) 2010 Hib Eris +// Copyright (C) 2012 Thomas Freitag // // To see a description of the changes please see the Changelog file that // came with your tarball or type make ChangeLog if you are building from git @@ -91,7 +92,7 @@ static GBool noEmbedTTFonts = gFalse; static GBool noEmbedCIDPSFonts = gFalse; static GBool noEmbedCIDTTFonts = gFalse; -static GBool noSubstFonts = gFalse; +static GBool fontPassthrough = gFalse; static GBool preload = gFalse; static char paperSize[15] = ""; static int paperWidth = -1; @@ -106,6 +107,9 @@ static GBool quiet = gFalse; static GBool printVersion = gFalse; static GBool printHelp = gFalse; +#if SPLASH_CMYK +static GBool overprint = gFalse; +#endif static const ArgDesc argDesc[] = { {"-f", argInt, &firstPage, 0, @@ -146,7 +150,7 @@ "don't embed CID PostScript fonts"}, {"-noembcidtt", argFlag, &noEmbedCIDTTFonts, 0, "don't embed CID TrueType fonts"}, - {"-passfonts", argFlag, &noSubstFonts,0, + {"-passfonts", argFlag, &fontPassthrough,0, "don't substitute missing fonts"}, {"-preload", argFlag, &preload, 0, "preload images and forms"}, @@ -170,6 +174,10 @@ "owner password (for encrypted files)"}, {"-upw", argString, userPassword, sizeof(userPassword), "user password (for encrypted files)"}, +#if SPLASH_CMYK + {"-overprint",argFlag, &overprint, 0, + "enable overprint"}, +#endif {"-q", argFlag, &quiet, 0, "don't print any messages or errors"}, {"-v", argFlag, &printVersion, 0, @@ -260,6 +268,11 @@ goto err0; } } +#if SPLASH_CMYK + if (overprint) { + globalParams->setOverprintPreview(gTrue); + } +#endif if (expand) { globalParams->setPSExpandSmaller(gTrue); } @@ -273,7 +286,7 @@ globalParams->setPSLevel(level); } if (splashResolution > 0) { - globalParams->setSplashResolution(splashResolution); + globalParams->setPSRasterResolution(splashResolution); } if (noEmbedT1Fonts) { globalParams->setPSEmbedType1(!noEmbedT1Fonts); @@ -287,8 +300,8 @@ if (noEmbedCIDTTFonts) { globalParams->setPSEmbedCIDTrueType(!noEmbedCIDTTFonts); } - if (noSubstFonts) { - globalParams->setPSSubstFonts(!noSubstFonts); + if (fontPassthrough) { + globalParams->setPSFontPassthrough(fontPassthrough); } if (preload) { globalParams->setPSPreload(preload); @@ -337,7 +350,7 @@ #ifdef ENFORCE_PERMISSIONS // check for print permission if (!doc->okToPrint()) { - error(-1, "Printing this document is not allowed."); + error(errNotAllowed, -1, "Printing this document is not allowed."); exitCode = 3; goto err1; } @@ -347,7 +360,7 @@ if (argc == 3) { psFileName = new GooString(argv[2]); } else if (fileName->cmp("fd://0") == 0) { - error(-1, "You have to provide an output filename when reading form stdin."); + error(errCommandLine, -1, "You have to provide an output filename when reading form stdin."); goto err1; } else { p = fileName->getCString() + fileName->getLength() - 4; @@ -370,13 +383,13 @@ // check for multi-page EPS or form if ((doEPS || doForm) && firstPage != lastPage) { - error(-1, "EPS and form files can only contain one page."); + error(errCommandLine, -1, "EPS and form files can only contain one page."); goto err2; } // write PostScript file - psOut = new PSOutputDev(psFileName->getCString(), doc, doc->getXRef(), - doc->getCatalog(), NULL, firstPage, lastPage, mode, + psOut = new PSOutputDev(psFileName->getCString(), doc, + NULL, firstPage, lastPage, mode, paperWidth, paperHeight, duplex); diff -Nru poppler-0.18.4/utils/pdftotext.1 poppler-0.20.5/utils/pdftotext.1 --- poppler-0.18.4/utils/pdftotext.1 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftotext.1 2012-05-10 20:05:44.000000000 +0000 @@ -1,8 +1,8 @@ -.\" Copyright 1997-2004 Glyph & Cog, LLC -.TH pdftotext 1 "22 January 2004" +.\" Copyright 1997-2011 Glyph & Cog, LLC +.TH pdftotext 1 "15 August 2011" .SH NAME pdftotext \- Portable Document Format (PDF) to text converter -(version 3.00) +(version 3.03) .SH SYNOPSIS .B pdftotext [options] @@ -53,6 +53,10 @@ text. The default is to \'undo' physical layout (columns, hyphenation, etc.) and output the text in reading order. .TP +.BI \-fixed " number" +Assume fixed-pitch (or tabular) text, with the specified character +width (in points). This forces physical layout mode. +.TP .B \-raw Keep the text in content stream order. This is a hack which often "undoes" column formatting, etc. Use of raw mode is no longer @@ -120,8 +124,10 @@ 99 Other error. .SH AUTHOR -The pdftotext software and documentation are copyright 1996-2004 Glyph +The pdftotext software and documentation are copyright 1996-2011 Glyph & Cog, LLC. +.SH "SEE ALSO" +.BR pdfdetach (1), .BR pdffonts (1), .BR pdfimages (1), .BR pdfinfo (1), diff -Nru poppler-0.18.4/utils/pdftotext.cc poppler-0.20.5/utils/pdftotext.cc --- poppler-0.18.4/utils/pdftotext.cc 2011-11-22 21:33:30.000000000 +0000 +++ poppler-0.20.5/utils/pdftotext.cc 2012-05-10 20:05:44.000000000 +0000 @@ -55,9 +55,9 @@ #include "Error.h" #include -static void printInfoString(FILE *f, Dict *infoDict, char *key, - char *text1, char *text2, UnicodeMap *uMap); -static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt); +static void printInfoString(FILE *f, Dict *infoDict, const char *key, + const char *text1, const char *text2, UnicodeMap *uMap); +static void printInfoDate(FILE *f, Dict *infoDict, const char *key, const char *fmt); static int firstPage = 1; static int lastPage = 0; @@ -68,6 +68,7 @@ static int h = 0; static GBool bbox = gFalse; static GBool physLayout = gFalse; +static double fixedPitch = 0; static GBool rawOrder = gFalse; static GBool htmlMeta = gFalse; static char textEncName[128] = ""; @@ -97,6 +98,8 @@ "height of crop area in pixels (default is 0)"}, {"-layout", argFlag, &physLayout, 0, "maintain original physical layout"}, + {"-fixed", argFP, &fixedPitch, 0, + "assume fixed-pitch (or tabular) text"}, {"-raw", argFlag, &rawOrder, 0, "keep strings in content stream order"}, {"-htmlmeta", argFlag, &htmlMeta, 0, @@ -197,6 +200,9 @@ } fileName = new GooString(argv[1]); + if (fixedPitch) { + physLayout = gTrue; + } if (textEncName[0]) { globalParams->setTextEncoding(textEncName); @@ -215,7 +221,7 @@ // get mapping to output encoding if (!(uMap = globalParams->getTextEncoding())) { - error(-1, "Couldn't get text encoding"); + error(errCommandLine, -1, "Couldn't get text encoding"); delete fileName; goto err1; } @@ -253,7 +259,7 @@ #ifdef ENFORCE_PERMISSIONS // check for copy permission if (!doc->okToCopy()) { - error(-1, "Copying of text from this document is not allowed."); + error(errNotAllowed, -1, "Copying of text from this document is not allowed."); exitCode = 3; goto err2; } @@ -263,7 +269,7 @@ if (argc == 3) { textFileName = new GooString(argv[2]); } else if (fileName->cmp("fd://0") == 0) { - error(-1, "You have to provide an output filename when reading form stdin."); + error(errCommandLine, -1, "You have to provide an output filename when reading form stdin."); goto err2; } else { p = fileName->getCString() + fileName->getLength() - 4; @@ -290,7 +296,7 @@ f = stdout; } else { if (!(f = fopen(textFileName->getCString(), "wb"))) { - error(-1, "Couldn't open text file '%s'", textFileName->getCString()); + error(errIO, -1, "Couldn't open text file '{0:t}'", textFileName); exitCode = 2; goto err3; } @@ -333,9 +339,9 @@ // write text file if (bbox) { - textOut = new TextOutputDev(NULL, physLayout, rawOrder, htmlMeta); + textOut = new TextOutputDev(NULL, physLayout, fixedPitch, rawOrder, htmlMeta); if (!(f = fopen(textFileName->getCString(), "ab"))) { - error(-1, "Couldn't open text file '%s' for append", textFileName->getCString()); + error(errIO, -1, "Couldn't open text file '{0:t}' for append", textFileName); exitCode = 2; delete textOut; goto err3; @@ -367,7 +373,7 @@ fclose(f); } else { textOut = new TextOutputDev(textFileName->getCString(), - physLayout, rawOrder, htmlMeta); + physLayout, fixedPitch, rawOrder, htmlMeta); if (textOut->isOk()) { if ((w==0) && (h==0) && (x==0) && (y==0)) { doc->displayPages(textOut, firstPage, lastPage, resolution, resolution, 0, @@ -395,7 +401,7 @@ f = stdout; } else { if (!(f = fopen(textFileName->getCString(), "ab"))) { - error(-1, "Couldn't open text file '%s'", textFileName->getCString()); + error(errIO, -1, "Couldn't open text file '{0:t}'", textFileName); exitCode = 2; goto err3; } @@ -428,8 +434,8 @@ return exitCode; } -static void printInfoString(FILE *f, Dict *infoDict, char *key, - char *text1, char *text2, UnicodeMap *uMap) { +static void printInfoString(FILE *f, Dict *infoDict, const char *key, + const char *text1, const char *text2, UnicodeMap *uMap) { Object obj; GooString *s1; GBool isUnicode; @@ -465,7 +471,7 @@ obj.free(); } -static void printInfoDate(FILE *f, Dict *infoDict, char *key, char *fmt) { +static void printInfoDate(FILE *f, Dict *infoDict, const char *key, const char *fmt) { Object obj; char *s; diff -Nru poppler-0.18.4/utils/pdfunite.cc poppler-0.20.5/utils/pdfunite.cc --- poppler-0.18.4/utils/pdfunite.cc 2012-01-13 17:56:01.000000000 +0000 +++ poppler-0.20.5/utils/pdfunite.cc 2012-09-08 16:07:00.000000000 +0000 @@ -6,6 +6,7 @@ // // Copyright (C) 2011 Thomas Freitag // Copyright (C) 2012 Arseny Solokha +// Copyright (C) 2012 Fabio D'Urso // //======================================================================== #include @@ -84,16 +85,16 @@ } } } else if (doc->isOk()) { - error(-1, "Could not merge encrypted files ('%s')", argv[i]); + error(errUnimplemented, -1, "Could not merge encrypted files ('{0:s}')", argv[i]); return -1; } else { - error(-1, "Could not merge damaged documents ('%s')", argv[i]); + error(errSyntaxError, -1, "Could not merge damaged documents ('{0:s}')", argv[i]); return -1; } } if (!(f = fopen(fileName, "wb"))) { - error(-1, "Could not open file '%s'", fileName); + error(errIO, -1, "Could not open file '{0:s}'", fileName); return -1; } outStr = new FileOutStream(f, 0); @@ -161,13 +162,14 @@ objectsCount++; } Guint uxrefOffset = outStr->getPos(); - yRef->writeToFile(outStr, gFalse /* do not write unnecessary entries */ ); - Ref ref; ref.num = rootNum; ref.gen = 0; - PDFDoc::writeTrailer(uxrefOffset, objectsCount, outStr, (GBool) gFalse, 0, - &ref, yRef, fileName, outStr->getPos()); + Dict *trailerDict = PDFDoc::createTrailerDict(objectsCount, gFalse, 0, &ref, yRef, + fileName, outStr->getPos()); + PDFDoc::writeXRefTableTrailer(trailerDict, yRef, gFalse /* do not write unnecessary entries */, + uxrefOffset, outStr, yRef); + delete trailerDict; outStr->close(); fclose(f);