node-poppler 5.1.4 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (176) hide show
  1. package/README.md +2 -0
  2. package/package.json +13 -13
  3. package/src/index.js +20 -8
  4. package/API.md +0 -465
  5. package/CHANGELOG.md +0 -976
  6. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Annot.h +0 -1783
  7. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/AnnotStampImageHelper.h +0 -68
  8. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Array.h +0 -92
  9. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/BBoxOutputDev.h +0 -54
  10. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CMap.h +0 -128
  11. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CachedFile.h +0 -149
  12. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoFontEngine.h +0 -122
  13. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoOutputDev.h +0 -468
  14. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoRescaleBox.h +0 -60
  15. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Catalog.h +0 -318
  16. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CertificateInfo.h +0 -129
  17. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharCodeToUnicode.h +0 -143
  18. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharTypes.h +0 -24
  19. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlCachedFile.h +0 -37
  20. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlPDFDocBuilder.h +0 -32
  21. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/DateInfo.h +0 -44
  22. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Decrypt.h +0 -147
  23. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Dict.h +0 -126
  24. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Error.h +0 -59
  25. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ErrorCodes.h +0 -54
  26. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FDPDFDocBuilder.h +0 -36
  27. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FILECacheLoader.h +0 -34
  28. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FileSpec.h +0 -85
  29. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontEncodingTables.h +0 -20
  30. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontInfo.h +0 -109
  31. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Form.h +0 -734
  32. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Function.h +0 -251
  33. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Gfx.h +0 -373
  34. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxFont.h +0 -466
  35. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState.h +0 -1759
  36. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState_helpers.h +0 -90
  37. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GlobalParams.h +0 -221
  38. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Hints.h +0 -91
  39. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JArithmeticDecoder.h +0 -131
  40. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JBIG2Stream.h +0 -130
  41. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JPEG2000Stream.h +0 -54
  42. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JSInfo.h +0 -65
  43. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Lexer.h +0 -113
  44. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Linearization.h +0 -43
  45. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Link.h +0 -566
  46. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/LocalPDFDocBuilder.h +0 -32
  47. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/MarkedContentOutputDev.h +0 -132
  48. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Movie.h +0 -123
  49. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToCharCode.h +0 -52
  50. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToUnicodeTable.h +0 -4300
  51. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Object.h +0 -678
  52. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OptionalContent.h +0 -117
  53. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Outline.h +0 -122
  54. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OutputDev.h +0 -379
  55. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDoc.h +0 -419
  56. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocBuilder.h +0 -47
  57. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocEncoding.h +0 -43
  58. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocFactory.h +0 -58
  59. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSOutputDev.h +0 -549
  60. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSTokenizer.h +0 -47
  61. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Page.h +0 -273
  62. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PageTransition.h +0 -105
  63. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Parser.h +0 -76
  64. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PopplerCache.h +0 -65
  65. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PreScanOutputDev.h +0 -148
  66. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ProfileData.h +0 -35
  67. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Rendition.h +0 -164
  68. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SecurityHandler.h +0 -131
  69. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Sound.h +0 -82
  70. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SplashOutputDev.h +0 -413
  71. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream-CCITT.h +0 -334
  72. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream.h +0 -1504
  73. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructElement.h +0 -406
  74. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructTreeRoot.h +0 -89
  75. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/TextOutputDev.h +0 -918
  76. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UTF.h +0 -112
  77. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCClassTables.h +0 -983
  78. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCompTables.h +0 -328
  79. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeDecompTables.h +0 -7181
  80. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMap.h +0 -128
  81. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapFuncs.h +0 -35
  82. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapTables.h +0 -84
  83. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeTypeTable.h +0 -49
  84. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ViewerPreferences.h +0 -87
  85. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/XRef.h +0 -325
  86. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-destination.h +0 -69
  87. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-document.h +0 -135
  88. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-embedded-file.h +0 -55
  89. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font-private.h +0 -68
  90. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font.h +0 -95
  91. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-global.h +0 -132
  92. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-image.h +0 -74
  93. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-renderer.h +0 -77
  94. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-transition.h +0 -85
  95. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page.h +0 -225
  96. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-rectangle.h +0 -66
  97. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-toc.h +0 -72
  98. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-version.h +0 -39
  99. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler_cpp_export.h +0 -42
  100. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiBase.h +0 -66
  101. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiEncodings.h +0 -43
  102. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiIdentifier.h +0 -52
  103. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiTrueType.h +0 -190
  104. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1.h +0 -70
  105. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1C.h +0 -263
  106. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-action.h +0 -454
  107. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-annot.h +0 -333
  108. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-attachment.h +0 -123
  109. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-date.h +0 -32
  110. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-document.h +0 -541
  111. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-enums.h +0 -191
  112. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-features.h +0 -88
  113. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-form-field.h +0 -254
  114. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-layer.h +0 -50
  115. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-macros.h +0 -42
  116. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-media.h +0 -80
  117. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-movie.h +0 -81
  118. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-page.h +0 -424
  119. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-structure-element.h +0 -425
  120. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler.h +0 -259
  121. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooCheckedOps.h +0 -116
  122. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooLikely.h +0 -22
  123. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooString.h +0 -262
  124. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooTimer.h +0 -59
  125. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/ImgWriter.h +0 -39
  126. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/JpegWriter.h +0 -69
  127. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/PNGWriter.h +0 -68
  128. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/TiffWriter.h +0 -70
  129. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gdir.h +0 -96
  130. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gfile.h +0 -156
  131. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gmem.h +0 -201
  132. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/grandom.h +0 -21
  133. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gstrtod.h +0 -45
  134. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler-config.h +0 -155
  135. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler_private_export.h +0 -42
  136. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/Splash.h +0 -336
  137. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashBitmap.h +0 -127
  138. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashClip.h +0 -131
  139. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashErrorCodes.h +0 -50
  140. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFont.h +0 -71
  141. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontEngine.h +0 -72
  142. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontFile.h +0 -64
  143. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFont.h +0 -116
  144. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontEngine.h +0 -89
  145. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFile.h +0 -98
  146. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFileID.h +0 -40
  147. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashGlyphBitmap.h +0 -23
  148. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashMath.h +0 -215
  149. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPath.h +0 -138
  150. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPattern.h +0 -107
  151. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashScreen.h +0 -87
  152. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashState.h +0 -132
  153. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashTypes.h +0 -248
  154. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPath.h +0 -95
  155. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPathScanner.h +0 -136
  156. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-cpp.pc +0 -12
  157. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-glib.pc +0 -12
  158. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler.pc +0 -10
  159. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-cpp.lib +0 -0
  160. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-glib.lib +0 -0
  161. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler.lib +0 -0
  162. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfattach.1 +0 -60
  163. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfdetach.1 +0 -94
  164. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdffonts.1 +0 -128
  165. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfimages.1 +0 -265
  166. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfinfo.1 +0 -198
  167. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfseparate.1 +0 -60
  168. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftocairo.1 +0 -346
  169. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftohtml.1 +0 -118
  170. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftoppm.1 +0 -230
  171. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftops.1 +0 -267
  172. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftotext.1 +0 -157
  173. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfunite.1 +0 -43
  174. package/src/lib/win32/poppler-22.04.0/share/poppler/CMakeLists.txt +0 -309
  175. package/src/lib/win32/poppler-22.04.0/share/poppler/Makefile +0 -333
  176. package/tsconfig.json +0 -9
@@ -1,318 +0,0 @@
1
- //========================================================================
2
- //
3
- // Catalog.h
4
- //
5
- // Copyright 1996-2007 Glyph & Cog, LLC
6
- //
7
- //========================================================================
8
-
9
- //========================================================================
10
- //
11
- // Modified under the Poppler project - http://poppler.freedesktop.org
12
- //
13
- // All changes made under the Poppler project to this file are licensed
14
- // under GPL version 2 or later
15
- //
16
- // Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
17
- // Copyright (C) 2005, 2007, 2009-2011, 2013, 2017-2022 Albert Astals Cid <aacid@kde.org>
18
- // Copyright (C) 2005 Jonathan Blandford <jrb@redhat.com>
19
- // Copyright (C) 2005, 2006, 2008 Brad Hards <bradh@frogmouth.net>
20
- // Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
21
- // Copyright (C) 2008, 2011 Pino Toscano <pino@kde.org>
22
- // Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
23
- // Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
24
- // Copyright (C) 2013 Thomas Freitag <Thomas.Freitag@alfa.de>
25
- // Copyright (C) 2013 Adrian Perez de Castro <aperez@igalia.com>
26
- // Copyright (C) 2013, 2017 Adrian Johnson <ajohnson@redneon.com>
27
- // Copyright (C) 2013 José Aliste <jaliste@src.gnome.org>
28
- // Copyright (C) 2016 Masamichi Hosoda <trueroad@trueroad.jp>
29
- // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
30
- // Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
31
- // Copyright (C) 2020 Oliver Sander <oliver.sander@tu-dresden.de>
32
- // Copyright (C) 2020 Katarina Behrens <Katarina.Behrens@cib.de>
33
- // Copyright (C) 2020 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by Technische Universität Dresden
34
- // Copyright (C) 2021 RM <rm+git@arcsin.org>
35
- //
36
- // To see a description of the changes please see the Changelog file that
37
- // came with your tarball or type make ChangeLog if you are building from git
38
- //
39
- //========================================================================
40
-
41
- #ifndef CATALOG_H
42
- #define CATALOG_H
43
-
44
- #include "poppler-config.h"
45
- #include "poppler_private_export.h"
46
- #include "Object.h"
47
- #include "Link.h"
48
-
49
- #include <memory>
50
- #include <optional>
51
- #include <vector>
52
-
53
- class PDFDoc;
54
- class XRef;
55
- class Object;
56
- class Page;
57
- class PageAttrs;
58
- struct Ref;
59
- class PageLabelInfo;
60
- class Form;
61
- class OCGs;
62
- class ViewerPreferences;
63
- class FileSpec;
64
- class StructTreeRoot;
65
-
66
- //------------------------------------------------------------------------
67
- // NameTree
68
- //------------------------------------------------------------------------
69
-
70
- class POPPLER_PRIVATE_EXPORT NameTree
71
- {
72
- public:
73
- NameTree();
74
- ~NameTree();
75
-
76
- NameTree(const NameTree &) = delete;
77
- NameTree &operator=(const NameTree &) = delete;
78
-
79
- void init(XRef *xref, Object *tree);
80
- Object lookup(const GooString *name);
81
- int numEntries() { return length; };
82
- // iterator accessor, note it returns a pointer to the internal object, do not free nor delete it
83
- Object *getValue(int i);
84
- const GooString *getName(int i) const;
85
-
86
- private:
87
- struct Entry
88
- {
89
- Entry(Array *array, int index);
90
- ~Entry();
91
- GooString name;
92
- Object value;
93
- static int cmpEntry(const void *voidEntry, const void *voidOtherEntry);
94
- static int cmp(const void *key, const void *entry);
95
- };
96
-
97
- void parse(const Object *tree, std::set<int> &seen);
98
- void addEntry(Entry *entry);
99
-
100
- XRef *xref;
101
- Entry **entries;
102
- int size, length; // size is the number of entries in
103
- // the array of Entry*
104
- // length is the number of real Entry
105
- };
106
-
107
- //------------------------------------------------------------------------
108
- // Catalog
109
- //------------------------------------------------------------------------
110
-
111
- class POPPLER_PRIVATE_EXPORT Catalog
112
- {
113
- public:
114
- // Constructor.
115
- explicit Catalog(PDFDoc *docA);
116
-
117
- // Destructor.
118
- ~Catalog();
119
-
120
- Catalog(const Catalog &) = delete;
121
- Catalog &operator=(const Catalog &) = delete;
122
-
123
- // Is catalog valid?
124
- bool isOk() { return ok; }
125
-
126
- // Get number of pages.
127
- int getNumPages();
128
-
129
- // Get a page.
130
- Page *getPage(int i);
131
-
132
- // Get the reference for a page object.
133
- Ref *getPageRef(int i);
134
-
135
- // Return base URI, or NULL if none.
136
- const std::optional<std::string> &getBaseURI() const { return baseURI; }
137
-
138
- // Return the contents of the metadata stream, or NULL if there is
139
- // no metadata.
140
- std::unique_ptr<GooString> readMetadata();
141
-
142
- // Return the structure tree root object.
143
- StructTreeRoot *getStructTreeRoot();
144
-
145
- // Return values from the MarkInfo dictionary as flags in a bitfield.
146
- enum MarkInfoFlags
147
- {
148
- markInfoNull = 1 << 0,
149
- markInfoMarked = 1 << 1,
150
- markInfoUserProperties = 1 << 2,
151
- markInfoSuspects = 1 << 3,
152
- };
153
- unsigned int getMarkInfo();
154
-
155
- // Find a page, given its object ID. Returns page number, or 0 if
156
- // not found.
157
- int findPage(const Ref pageRef);
158
-
159
- // Find a named destination. Returns the link destination, or
160
- // NULL if <name> is not a destination.
161
- std::unique_ptr<LinkDest> findDest(const GooString *name);
162
-
163
- Object *getDests();
164
-
165
- // Get the number of named destinations in name-dict
166
- int numDests();
167
-
168
- // Get the i'th named destination name in name-dict
169
- const char *getDestsName(int i);
170
-
171
- // Get the i'th named destination link destination in name-dict
172
- std::unique_ptr<LinkDest> getDestsDest(int i);
173
-
174
- // Get the number of named destinations in name-tree
175
- int numDestNameTree() { return getDestNameTree()->numEntries(); }
176
-
177
- // Get the i'th named destination name in name-tree
178
- const GooString *getDestNameTreeName(int i) { return getDestNameTree()->getName(i); }
179
-
180
- // Get the i'th named destination link destination in name-tree
181
- std::unique_ptr<LinkDest> getDestNameTreeDest(int i);
182
-
183
- // Get the number of embedded files
184
- int numEmbeddedFiles() { return getEmbeddedFileNameTree()->numEntries(); }
185
-
186
- // Get the i'th file embedded (at the Document level) in the document
187
- std::unique_ptr<FileSpec> embeddedFile(int i);
188
-
189
- // Is there an embedded file with the given name?
190
- bool hasEmbeddedFile(const std::string &fileName);
191
-
192
- // Adds and embeddedFile
193
- // If there is already an existing embedded file with the given fileName
194
- // it gets replaced, if that's not what you want check hasEmbeddedFile first
195
- void addEmbeddedFile(GooFile *file, const std::string &fileName);
196
-
197
- // Get the number of javascript scripts
198
- int numJS() { return getJSNameTree()->numEntries(); }
199
- const GooString *getJSName(int i) { return getJSNameTree()->getName(i); }
200
-
201
- // Get the i'th JavaScript script (at the Document level) in the document
202
- GooString *getJS(int i);
203
-
204
- // Convert between page indices and page labels.
205
- bool labelToIndex(GooString *label, int *index);
206
- bool indexToLabel(int index, GooString *label);
207
-
208
- Object *getOutline();
209
- // returns the existing outline or new one if it doesn't exist
210
- Object *getCreateOutline();
211
-
212
- Object *getAcroForm() { return &acroForm; }
213
- void addFormToAcroForm(const Ref formRef);
214
- void removeFormFromAcroForm(const Ref formRef);
215
-
216
- OCGs *getOptContentConfig() { return optContent; }
217
-
218
- int getPDFMajorVersion() const { return catalogPdfMajorVersion; }
219
- int getPDFMinorVersion() const { return catalogPdfMinorVersion; }
220
-
221
- enum FormType
222
- {
223
- NoForm,
224
- AcroForm,
225
- XfaForm
226
- };
227
-
228
- FormType getFormType();
229
- Form *getForm();
230
-
231
- ViewerPreferences *getViewerPreferences();
232
-
233
- enum PageMode
234
- {
235
- pageModeNone,
236
- pageModeOutlines,
237
- pageModeThumbs,
238
- pageModeFullScreen,
239
- pageModeOC,
240
- pageModeAttach,
241
- pageModeNull
242
- };
243
- enum PageLayout
244
- {
245
- pageLayoutNone,
246
- pageLayoutSinglePage,
247
- pageLayoutOneColumn,
248
- pageLayoutTwoColumnLeft,
249
- pageLayoutTwoColumnRight,
250
- pageLayoutTwoPageLeft,
251
- pageLayoutTwoPageRight,
252
- pageLayoutNull
253
- };
254
-
255
- // Returns the page mode.
256
- PageMode getPageMode();
257
- PageLayout getPageLayout();
258
-
259
- enum DocumentAdditionalActionsType
260
- {
261
- actionCloseDocument, ///< Performed before closing the document
262
- actionSaveDocumentStart, ///< Performed before saving the document
263
- actionSaveDocumentFinish, ///< Performed after saving the document
264
- actionPrintDocumentStart, ///< Performed before printing the document
265
- actionPrintDocumentFinish, ///< Performed after printing the document
266
- };
267
-
268
- std::unique_ptr<LinkAction> getAdditionalAction(DocumentAdditionalActionsType type);
269
-
270
- private:
271
- // Get page label info.
272
- PageLabelInfo *getPageLabelInfo();
273
-
274
- PDFDoc *doc;
275
- XRef *xref; // the xref table for this PDF file
276
- std::vector<std::pair<std::unique_ptr<Page>, Ref>> pages;
277
- std::vector<Object> *pagesList;
278
- std::vector<Ref> *pagesRefList;
279
- std::vector<PageAttrs *> *attrsList;
280
- std::vector<int> *kidsIdxList;
281
- Form *form;
282
- ViewerPreferences *viewerPrefs;
283
- int numPages; // number of pages
284
- Object dests; // named destination dictionary
285
- Object names; // named names dictionary
286
- NameTree *destNameTree; // named destination name-tree
287
- NameTree *embeddedFileNameTree; // embedded file name-tree
288
- NameTree *jsNameTree; // Java Script name-tree
289
- std::optional<std::string> baseURI; // base URI for URI-type links
290
- Object metadata; // metadata stream
291
- StructTreeRoot *structTreeRoot; // structure tree root
292
- unsigned int markInfo; // Flags from MarkInfo dictionary
293
- Object outline; // outline dictionary
294
- Object acroForm; // AcroForm dictionary
295
- Object viewerPreferences; // ViewerPreference dictionary
296
- OCGs *optContent; // Optional Content groups
297
- bool ok; // true if catalog is valid
298
- PageLabelInfo *pageLabelInfo; // info about page labels
299
- PageMode pageMode; // page mode
300
- PageLayout pageLayout; // page layout
301
- Object additionalActions; // page additional actions
302
-
303
- bool cachePageTree(int page); // Cache first <page> pages.
304
- Object *findDestInTree(Object *tree, GooString *name, Object *obj);
305
-
306
- Object *getNames();
307
- NameTree *getDestNameTree();
308
- NameTree *getEmbeddedFileNameTree();
309
- NameTree *getJSNameTree();
310
- std::unique_ptr<LinkDest> createLinkDest(Object *obj);
311
-
312
- int catalogPdfMajorVersion = -1;
313
- int catalogPdfMinorVersion = -1;
314
-
315
- mutable std::recursive_mutex mutex;
316
- };
317
-
318
- #endif
@@ -1,129 +0,0 @@
1
- //========================================================================
2
- //
3
- // CertificateInfo.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright 2018 Chinmoy Ranjan Pradhan <chinmoyrp65@gmail.com>
8
- // Copyright 2018, 2019 Albert Astals Cid <aacid@kde.org>
9
- // Copyright 2018 Oliver Sander <oliver.sander@tu-dresden.de>
10
- // Copyright 2020 Thorsten Behrens <Thorsten.Behrens@CIB.de>
11
- //
12
- //========================================================================
13
-
14
- #ifndef CERTIFICATEINFO_H
15
- #define CERTIFICATEINFO_H
16
-
17
- #include <memory>
18
- #include <ctime>
19
- #include "goo/GooString.h"
20
- #include "poppler_private_export.h"
21
-
22
- enum CertificateKeyUsageExtension
23
- {
24
- KU_DIGITAL_SIGNATURE = 0x80,
25
- KU_NON_REPUDIATION = 0x40,
26
- KU_KEY_ENCIPHERMENT = 0x20,
27
- KU_DATA_ENCIPHERMENT = 0x10,
28
- KU_KEY_AGREEMENT = 0x08,
29
- KU_KEY_CERT_SIGN = 0x04,
30
- KU_CRL_SIGN = 0x02,
31
- KU_ENCIPHER_ONLY = 0x01,
32
- KU_NONE = 0x00
33
- };
34
-
35
- enum PublicKeyType
36
- {
37
- RSAKEY,
38
- DSAKEY,
39
- ECKEY,
40
- OTHERKEY
41
- };
42
-
43
- class POPPLER_PRIVATE_EXPORT X509CertificateInfo
44
- {
45
- public:
46
- X509CertificateInfo();
47
- ~X509CertificateInfo();
48
-
49
- X509CertificateInfo(const X509CertificateInfo &) = delete;
50
- X509CertificateInfo &operator=(const X509CertificateInfo &) = delete;
51
-
52
- struct PublicKeyInfo
53
- {
54
- PublicKeyInfo();
55
-
56
- PublicKeyInfo(PublicKeyInfo &&) noexcept;
57
- PublicKeyInfo &operator=(PublicKeyInfo &&) noexcept;
58
-
59
- PublicKeyInfo(const PublicKeyInfo &) = delete;
60
- PublicKeyInfo &operator=(const PublicKeyInfo &) = delete;
61
-
62
- GooString publicKey;
63
- PublicKeyType publicKeyType;
64
- unsigned int publicKeyStrength; // in bits
65
- };
66
-
67
- struct EntityInfo
68
- {
69
- EntityInfo();
70
- ~EntityInfo();
71
-
72
- EntityInfo(EntityInfo &&) noexcept;
73
- EntityInfo &operator=(EntityInfo &&) noexcept;
74
-
75
- EntityInfo(const EntityInfo &) = delete;
76
- EntityInfo &operator=(const EntityInfo &) = delete;
77
-
78
- std::string commonName;
79
- std::string distinguishedName;
80
- std::string email;
81
- std::string organization;
82
- };
83
-
84
- struct Validity
85
- {
86
- Validity() : notBefore(0), notAfter(0) { }
87
-
88
- time_t notBefore;
89
- time_t notAfter;
90
- };
91
-
92
- /* GETTERS */
93
- int getVersion() const;
94
- const GooString &getSerialNumber() const;
95
- const GooString &getNickName() const;
96
- const EntityInfo &getIssuerInfo() const;
97
- const Validity &getValidity() const;
98
- const EntityInfo &getSubjectInfo() const;
99
- const PublicKeyInfo &getPublicKeyInfo() const;
100
- unsigned int getKeyUsageExtensions() const;
101
- const GooString &getCertificateDER() const;
102
- bool getIsSelfSigned() const;
103
-
104
- /* SETTERS */
105
- void setVersion(int);
106
- void setSerialNumber(const GooString &);
107
- void setNickName(const GooString &);
108
- void setIssuerInfo(EntityInfo &&);
109
- void setValidity(Validity);
110
- void setSubjectInfo(EntityInfo &&);
111
- void setPublicKeyInfo(PublicKeyInfo &&);
112
- void setKeyUsageExtensions(unsigned int);
113
- void setCertificateDER(const GooString &);
114
- void setIsSelfSigned(bool);
115
-
116
- private:
117
- EntityInfo issuer_info;
118
- EntityInfo subject_info;
119
- PublicKeyInfo public_key_info;
120
- Validity cert_validity;
121
- GooString cert_serial;
122
- GooString cert_der;
123
- GooString cert_nick;
124
- unsigned int ku_extensions;
125
- int cert_version;
126
- bool is_self_signed;
127
- };
128
-
129
- #endif
@@ -1,143 +0,0 @@
1
- //========================================================================
2
- //
3
- // CharCodeToUnicode.h
4
- //
5
- // Mapping from character codes to Unicode.
6
- //
7
- // Copyright 2001-2003 Glyph & Cog, LLC
8
- //
9
- //========================================================================
10
-
11
- //========================================================================
12
- //
13
- // Modified under the Poppler project - http://poppler.freedesktop.org
14
- //
15
- // All changes made under the Poppler project to this file are licensed
16
- // under GPL version 2 or later
17
- //
18
- // Copyright (C) 2007 Julien Rebetez <julienr@svn.gnome.org>
19
- // Copyright (C) 2007 Koji Otani <sho@bbr.jp>
20
- // Copyright (C) 2008, 2011, 2012, 2018, 2019, 2021, 2022 Albert Astals Cid <aacid@kde.org>
21
- // Copyright (C) 2017 Adrian Johnson <ajohnson@redneon.com>
22
- // Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
23
- // Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
24
- // Copyright (C) 2019 <corentinf@free.fr>
25
- //
26
- // To see a description of the changes please see the Changelog file that
27
- // came with your tarball or type make ChangeLog if you are building from git
28
- //
29
- //========================================================================
30
-
31
- #ifndef CHARCODETOUNICODE_H
32
- #define CHARCODETOUNICODE_H
33
-
34
- #include <atomic>
35
- #include <optional>
36
-
37
- #include "poppler-config.h"
38
- #include "CharTypes.h"
39
-
40
- struct CharCodeToUnicodeString;
41
- class GooString;
42
-
43
- //------------------------------------------------------------------------
44
-
45
- class CharCodeToUnicode
46
- {
47
- friend class UnicodeToCharCode;
48
-
49
- public:
50
- // Create an identity mapping (Unicode = CharCode).
51
- static CharCodeToUnicode *makeIdentityMapping();
52
-
53
- // Read the CID-to-Unicode mapping for <collection> from the file
54
- // specified by <fileName>. Sets the initial reference count to 1.
55
- // Returns NULL on failure.
56
- static CharCodeToUnicode *parseCIDToUnicode(const char *fileName, const GooString *collection);
57
-
58
- // Create a Unicode-to-Unicode mapping from the file specified by
59
- // <fileName>. Sets the initial reference count to 1. Returns NULL
60
- // on failure.
61
- static CharCodeToUnicode *parseUnicodeToUnicode(const GooString *fileName);
62
-
63
- // Create the CharCode-to-Unicode mapping for an 8-bit font.
64
- // <toUnicode> is an array of 256 Unicode indexes. Sets the initial
65
- // reference count to 1.
66
- static CharCodeToUnicode *make8BitToUnicode(Unicode *toUnicode);
67
-
68
- // Parse a ToUnicode CMap for an 8- or 16-bit font.
69
- static CharCodeToUnicode *parseCMap(const GooString *buf, int nBits);
70
- static CharCodeToUnicode *parseCMapFromFile(const GooString *fileName, int nBits);
71
-
72
- // Parse a ToUnicode CMap for an 8- or 16-bit font, merging it into
73
- // <this>.
74
- void mergeCMap(const GooString *buf, int nBits);
75
-
76
- ~CharCodeToUnicode();
77
-
78
- CharCodeToUnicode(const CharCodeToUnicode &) = delete;
79
- CharCodeToUnicode &operator=(const CharCodeToUnicode &) = delete;
80
-
81
- void incRefCnt();
82
- void decRefCnt();
83
-
84
- // Return true if this mapping matches the specified <tagA>.
85
- bool match(const GooString *tagA);
86
-
87
- // Set the mapping for <c>.
88
- void setMapping(CharCode c, Unicode *u, int len);
89
-
90
- // Map a CharCode to Unicode. Returns a pointer in u to internal storage
91
- // so never store the pointers it returns, just the data, otherwise
92
- // your pointed values might get changed by future calls
93
- int mapToUnicode(CharCode c, Unicode const **u) const;
94
-
95
- // Map a Unicode to CharCode.
96
- int mapToCharCode(const Unicode *u, CharCode *c, int usize) const;
97
-
98
- // Return the mapping's length, i.e., one more than the max char
99
- // code supported by the mapping.
100
- CharCode getLength() const { return mapLen; }
101
-
102
- private:
103
- bool parseCMap1(int (*getCharFunc)(void *), void *data, int nBits);
104
- void addMapping(CharCode code, char *uStr, int n, int offset);
105
- void addMappingInt(CharCode code, Unicode u);
106
- CharCodeToUnicode();
107
- explicit CharCodeToUnicode(const std::optional<std::string> &tagA);
108
- CharCodeToUnicode(const std::optional<std::string> &tagA, Unicode *mapA, CharCode mapLenA, bool copyMap, CharCodeToUnicodeString *sMapA, int sMapLenA, int sMapSizeA);
109
-
110
- const std::optional<std::string> tag;
111
- Unicode *map;
112
- CharCode mapLen;
113
- CharCodeToUnicodeString *sMap;
114
- int sMapLen, sMapSize;
115
- std::atomic_int refCnt;
116
- bool isIdentity;
117
- };
118
-
119
- //------------------------------------------------------------------------
120
-
121
- class CharCodeToUnicodeCache
122
- {
123
- public:
124
- explicit CharCodeToUnicodeCache(int sizeA);
125
- ~CharCodeToUnicodeCache();
126
-
127
- CharCodeToUnicodeCache(const CharCodeToUnicodeCache &) = delete;
128
- CharCodeToUnicodeCache &operator=(const CharCodeToUnicodeCache &) = delete;
129
-
130
- // Get the CharCodeToUnicode object for <tag>. Increments its
131
- // reference count; there will be one reference for the cache plus
132
- // one for the caller of this function. Returns NULL on failure.
133
- CharCodeToUnicode *getCharCodeToUnicode(const GooString *tag);
134
-
135
- // Insert <ctu> into the cache, in the most-recently-used position.
136
- void add(CharCodeToUnicode *ctu);
137
-
138
- private:
139
- CharCodeToUnicode **cache;
140
- int size;
141
- };
142
-
143
- #endif
@@ -1,24 +0,0 @@
1
- //========================================================================
2
- //
3
- // CharTypes.h
4
- //
5
- // Copyright 2001-2003 Glyph & Cog, LLC
6
- //
7
- //========================================================================
8
-
9
- #ifndef CHARTYPES_H
10
- #define CHARTYPES_H
11
-
12
- // Unicode character.
13
- typedef unsigned int Unicode;
14
-
15
- // Character ID for CID character collections.
16
- typedef unsigned int CID;
17
-
18
- // This is large enough to hold any of the following:
19
- // - 8-bit char code
20
- // - 16-bit CID
21
- // - Unicode
22
- typedef unsigned int CharCode;
23
-
24
- #endif
@@ -1,37 +0,0 @@
1
- //========================================================================
2
- //
3
- // CurlCachedFile.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright 2010 Hib Eris <hib@hiberis.nl>
8
- // Copyright 2010, 2022 Albert Astals Cid <aacid@kde.org>
9
- //
10
- //========================================================================
11
-
12
- #ifndef CURLCACHELOADER_H
13
- #define CURLCACHELOADER_H
14
-
15
- #include "poppler-config.h"
16
- #include "CachedFile.h"
17
-
18
- #include <curl/curl.h>
19
-
20
- //------------------------------------------------------------------------
21
-
22
- class CurlCachedFileLoader : public CachedFileLoader
23
- {
24
-
25
- public:
26
- explicit CurlCachedFileLoader(const std::string &urlA);
27
- ~CurlCachedFileLoader() override;
28
- size_t init(CachedFile *cachedFile) override;
29
- int load(const std::vector<ByteRange> &ranges, CachedFileWriter *writer) override;
30
-
31
- private:
32
- const std::string url;
33
- CachedFile *cachedFile;
34
- CURL *curl;
35
- };
36
-
37
- #endif
@@ -1,32 +0,0 @@
1
- //========================================================================
2
- //
3
- // CurlPDFDocBuilder.h
4
- //
5
- // This file is licensed under the GPLv2 or later
6
- //
7
- // Copyright 2010 Hib Eris <hib@hiberis.nl>
8
- // Copyright 2010, 2018, 2022 Albert Astals Cid <aacid@kde.org>
9
- // Copyright 2021 Oliver Sander <oliver.sander@tu-dresden.de>
10
- //
11
- //========================================================================
12
-
13
- #ifndef CURLPDFDOCBUILDER_H
14
- #define CURLPDFDOCBUILDER_H
15
-
16
- #include "PDFDocBuilder.h"
17
-
18
- //------------------------------------------------------------------------
19
- // CurlPDFDocBuilder
20
- //
21
- // The CurlPDFDocBuilder implements a PDFDocBuilder for 'http(s)://'.
22
- //------------------------------------------------------------------------
23
-
24
- class CurlPDFDocBuilder : public PDFDocBuilder
25
- {
26
-
27
- public:
28
- std::unique_ptr<PDFDoc> buildPDFDoc(const GooString &uri, const std::optional<GooString> &ownerPassword = {}, const std::optional<GooString> &userPassword = {}, void *guiDataA = nullptr) override;
29
- bool supports(const GooString &uri) override;
30
- };
31
-
32
- #endif /* CURLPDFDOCBUILDER_H */