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,566 +0,0 @@
1
- //========================================================================
2
- //
3
- // Link.h
4
- //
5
- // Copyright 1996-2003 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) 2006, 2008 Pino Toscano <pino@kde.org>
17
- // Copyright (C) 2008 Hugo Mercier <hmercier31@gmail.com>
18
- // Copyright (C) 2010, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
19
- // Copyright (C) 2012 Tobias Koening <tobias.koenig@kdab.com>
20
- // Copyright (C) 2018-2022 Albert Astals Cid <aacid@kde.org>
21
- // 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
22
- // Copyright (C) 2018 Intevation GmbH <intevation@intevation.de>
23
- // Copyright (C) 2019, 2020 Oliver Sander <oliver.sander@tu-dresden.de>
24
- // Copyright (C) 2020 Adam Reichold <adam.reichold@t-online.de>
25
- // Copyright (C) 2020 Marek Kasik <mkasik@redhat.com>
26
- //
27
- // To see a description of the changes please see the Changelog file that
28
- // came with your tarball or type make ChangeLog if you are building from git
29
- //
30
- //========================================================================
31
-
32
- #ifndef LINK_H
33
- #define LINK_H
34
-
35
- #include "Object.h"
36
- #include "poppler_private_export.h"
37
- #include <memory>
38
- #include <optional>
39
- #include <set>
40
-
41
- class GooString;
42
- class Array;
43
- class Dict;
44
- class Sound;
45
- class MediaRendition;
46
- class AnnotLink;
47
- class Annots;
48
-
49
- //------------------------------------------------------------------------
50
- // LinkAction
51
- //------------------------------------------------------------------------
52
-
53
- enum LinkActionKind
54
- {
55
- actionGoTo, // go to destination
56
- actionGoToR, // go to destination in new file
57
- actionLaunch, // launch app (or open document)
58
- actionURI, // URI
59
- actionNamed, // named action
60
- actionMovie, // movie action
61
- actionRendition, // rendition action
62
- actionSound, // sound action
63
- actionJavaScript, // JavaScript action
64
- actionOCGState, // Set-OCG-State action
65
- actionHide, // Hide action
66
- actionResetForm, // ResetForm action
67
- actionUnknown // anything else
68
- };
69
-
70
- class POPPLER_PRIVATE_EXPORT LinkAction
71
- {
72
- public:
73
- LinkAction();
74
- LinkAction(const LinkAction &) = delete;
75
- LinkAction &operator=(const LinkAction &other) = delete;
76
-
77
- // Destructor.
78
- virtual ~LinkAction();
79
-
80
- // Was the LinkAction created successfully?
81
- virtual bool isOk() const = 0;
82
-
83
- // Check link action type.
84
- virtual LinkActionKind getKind() const = 0;
85
-
86
- // Parse a destination (old-style action) name, string, or array.
87
- static std::unique_ptr<LinkAction> parseDest(const Object *obj);
88
-
89
- // Parse an action dictionary.
90
- static std::unique_ptr<LinkAction> parseAction(const Object *obj, const std::optional<std::string> &baseURI = {});
91
-
92
- // A List of the next actions to execute in order.
93
- const std::vector<std::unique_ptr<LinkAction>> &nextActions() const;
94
-
95
- private:
96
- static std::unique_ptr<LinkAction> parseAction(const Object *obj, const std::optional<std::string> &baseURI, std::set<int> *seenNextActions);
97
-
98
- std::vector<std::unique_ptr<LinkAction>> nextActionList;
99
- };
100
-
101
- //------------------------------------------------------------------------
102
- // LinkDest
103
- //------------------------------------------------------------------------
104
-
105
- enum LinkDestKind
106
- {
107
- destXYZ,
108
- destFit,
109
- destFitH,
110
- destFitV,
111
- destFitR,
112
- destFitB,
113
- destFitBH,
114
- destFitBV
115
- };
116
-
117
- class POPPLER_PRIVATE_EXPORT LinkDest
118
- {
119
- public:
120
- // Build a LinkDest from the array.
121
- explicit LinkDest(const Array *a);
122
-
123
- // Was the LinkDest created successfully?
124
- bool isOk() const { return ok; }
125
-
126
- // Accessors.
127
- LinkDestKind getKind() const { return kind; }
128
- bool isPageRef() const { return pageIsRef; }
129
- int getPageNum() const { return pageNum; }
130
- Ref getPageRef() const { return pageRef; }
131
- double getLeft() const { return left; }
132
- double getBottom() const { return bottom; }
133
- double getRight() const { return right; }
134
- double getTop() const { return top; }
135
- double getZoom() const { return zoom; }
136
- bool getChangeLeft() const { return changeLeft; }
137
- bool getChangeTop() const { return changeTop; }
138
- bool getChangeZoom() const { return changeZoom; }
139
-
140
- private:
141
- LinkDestKind kind; // destination type
142
- bool pageIsRef; // is the page a reference or number?
143
- union {
144
- Ref pageRef; // reference to page
145
- int pageNum; // one-relative page number
146
- };
147
- double left, bottom; // position
148
- double right, top;
149
- double zoom; // zoom factor
150
- bool changeLeft, changeTop; // which position components to change:
151
- bool changeZoom; // destXYZ uses all three;
152
- // destFitH/BH use changeTop;
153
- // destFitV/BV use changeLeft
154
- bool ok; // set if created successfully
155
- };
156
-
157
- //------------------------------------------------------------------------
158
- // LinkGoTo
159
- //------------------------------------------------------------------------
160
-
161
- class POPPLER_PRIVATE_EXPORT LinkGoTo : public LinkAction
162
- {
163
- public:
164
- // Build a LinkGoTo from a destination (dictionary, name, or string).
165
- explicit LinkGoTo(const Object *destObj);
166
-
167
- ~LinkGoTo() override;
168
-
169
- // Was the LinkGoTo created successfully?
170
- bool isOk() const override { return dest || namedDest; }
171
-
172
- // Accessors.
173
- LinkActionKind getKind() const override { return actionGoTo; }
174
- const LinkDest *getDest() const { return dest.get(); }
175
- const GooString *getNamedDest() const { return namedDest.get(); }
176
-
177
- private:
178
- std::unique_ptr<LinkDest> dest; // regular destination (nullptr for remote
179
- // link with bad destination)
180
- std::unique_ptr<GooString> namedDest; // named destination (only one of dest and
181
- // and namedDest may be non-nullptr)
182
- };
183
-
184
- //------------------------------------------------------------------------
185
- // LinkGoToR
186
- //------------------------------------------------------------------------
187
-
188
- class LinkGoToR : public LinkAction
189
- {
190
- public:
191
- // Build a LinkGoToR from a file spec (dictionary) and destination
192
- // (dictionary, name, or string).
193
- LinkGoToR(Object *fileSpecObj, Object *destObj);
194
-
195
- ~LinkGoToR() override;
196
-
197
- // Was the LinkGoToR created successfully?
198
- bool isOk() const override { return fileName && (dest || namedDest); }
199
-
200
- // Accessors.
201
- LinkActionKind getKind() const override { return actionGoToR; }
202
- const GooString *getFileName() const { return fileName.get(); }
203
- const LinkDest *getDest() const { return dest.get(); }
204
- const GooString *getNamedDest() const { return namedDest.get(); }
205
-
206
- private:
207
- std::unique_ptr<GooString> fileName; // file name
208
- std::unique_ptr<LinkDest> dest; // regular destination (nullptr for remote
209
- // link with bad destination)
210
- std::unique_ptr<GooString> namedDest; // named destination (only one of dest and
211
- // and namedDest may be non-nullptr)
212
- };
213
-
214
- //------------------------------------------------------------------------
215
- // LinkLaunch
216
- //------------------------------------------------------------------------
217
-
218
- class LinkLaunch : public LinkAction
219
- {
220
- public:
221
- // Build a LinkLaunch from an action dictionary.
222
- explicit LinkLaunch(const Object *actionObj);
223
- ~LinkLaunch() override;
224
-
225
- // Was the LinkLaunch created successfully?
226
- bool isOk() const override { return fileName != nullptr; }
227
-
228
- // Accessors.
229
- LinkActionKind getKind() const override { return actionLaunch; }
230
- const GooString *getFileName() const { return fileName.get(); }
231
- const GooString *getParams() const { return params.get(); }
232
-
233
- private:
234
- std::unique_ptr<GooString> fileName; // file name
235
- std::unique_ptr<GooString> params; // parameters
236
- };
237
-
238
- //------------------------------------------------------------------------
239
- // LinkURI
240
- //------------------------------------------------------------------------
241
-
242
- class POPPLER_PRIVATE_EXPORT LinkURI : public LinkAction
243
- {
244
- public:
245
- // Build a LinkURI given the URI (string) and base URI.
246
- LinkURI(const Object *uriObj, const std::optional<std::string> &baseURI);
247
-
248
- ~LinkURI() override;
249
-
250
- // Was the LinkURI created successfully?
251
- bool isOk() const override { return hasURIFlag; }
252
-
253
- // Accessors.
254
- LinkActionKind getKind() const override { return actionURI; }
255
- const std::string &getURI() const { return uri; }
256
-
257
- private:
258
- std::string uri; // the URI
259
- bool hasURIFlag;
260
- };
261
-
262
- //------------------------------------------------------------------------
263
- // LinkNamed
264
- //------------------------------------------------------------------------
265
-
266
- class LinkNamed : public LinkAction
267
- {
268
- public:
269
- // Build a LinkNamed given the action name.
270
- explicit LinkNamed(const Object *nameObj);
271
-
272
- ~LinkNamed() override;
273
-
274
- bool isOk() const override { return hasNameFlag; }
275
-
276
- LinkActionKind getKind() const override { return actionNamed; }
277
- const std::string &getName() const { return name; }
278
-
279
- private:
280
- std::string name;
281
- bool hasNameFlag;
282
- };
283
-
284
- //------------------------------------------------------------------------
285
- // LinkMovie
286
- //------------------------------------------------------------------------
287
-
288
- class LinkMovie : public LinkAction
289
- {
290
- public:
291
- enum OperationType
292
- {
293
- operationTypePlay,
294
- operationTypePause,
295
- operationTypeResume,
296
- operationTypeStop
297
- };
298
-
299
- explicit LinkMovie(const Object *obj);
300
-
301
- ~LinkMovie() override;
302
-
303
- bool isOk() const override { return hasAnnotRef() || hasAnnotTitleFlag; }
304
- LinkActionKind getKind() const override { return actionMovie; }
305
-
306
- // a movie action stores either an indirect reference to a movie annotation
307
- // or the movie annotation title
308
-
309
- bool hasAnnotRef() const { return annotRef != Ref::INVALID(); }
310
- bool hasAnnotTitle() const { return hasAnnotTitleFlag; }
311
- const Ref *getAnnotRef() const { return &annotRef; }
312
- const std::string &getAnnotTitle() const { return annotTitle; }
313
-
314
- OperationType getOperation() const { return operation; }
315
-
316
- private:
317
- Ref annotRef; // Annotation
318
- std::string annotTitle; // T
319
- bool hasAnnotTitleFlag;
320
-
321
- OperationType operation; // Operation
322
- };
323
-
324
- //------------------------------------------------------------------------
325
- // LinkRendition
326
- //------------------------------------------------------------------------
327
-
328
- class LinkRendition : public LinkAction
329
- {
330
- public:
331
- /**
332
- * Describes the possible rendition operations.
333
- */
334
- enum RenditionOperation
335
- {
336
- NoRendition,
337
- PlayRendition,
338
- StopRendition,
339
- PauseRendition,
340
- ResumeRendition
341
- };
342
-
343
- explicit LinkRendition(const Object *Obj);
344
-
345
- ~LinkRendition() override;
346
-
347
- bool isOk() const override { return true; }
348
-
349
- LinkActionKind getKind() const override { return actionRendition; }
350
-
351
- bool hasScreenAnnot() const { return screenRef != Ref::INVALID(); }
352
- Ref getScreenAnnot() const { return screenRef; }
353
-
354
- RenditionOperation getOperation() const { return operation; }
355
-
356
- const MediaRendition *getMedia() const { return media; }
357
-
358
- const std::string &getScript() const { return js; }
359
-
360
- private:
361
- Ref screenRef;
362
- RenditionOperation operation;
363
-
364
- MediaRendition *media;
365
-
366
- std::string js;
367
- };
368
-
369
- //------------------------------------------------------------------------
370
- // LinkSound
371
- //------------------------------------------------------------------------
372
-
373
- class LinkSound : public LinkAction
374
- {
375
- public:
376
- explicit LinkSound(const Object *soundObj);
377
-
378
- ~LinkSound() override;
379
-
380
- bool isOk() const override { return sound != nullptr; }
381
-
382
- LinkActionKind getKind() const override { return actionSound; }
383
-
384
- double getVolume() const { return volume; }
385
- bool getSynchronous() const { return sync; }
386
- bool getRepeat() const { return repeat; }
387
- bool getMix() const { return mix; }
388
- Sound *getSound() const { return sound.get(); }
389
-
390
- private:
391
- double volume;
392
- bool sync;
393
- bool repeat;
394
- bool mix;
395
- std::unique_ptr<Sound> sound;
396
- };
397
-
398
- //------------------------------------------------------------------------
399
- // LinkJavaScript
400
- //------------------------------------------------------------------------
401
-
402
- class LinkJavaScript : public LinkAction
403
- {
404
- public:
405
- // Build a LinkJavaScript given the action name.
406
- explicit LinkJavaScript(Object *jsObj);
407
-
408
- ~LinkJavaScript() override;
409
-
410
- bool isOk() const override { return isValid; }
411
-
412
- LinkActionKind getKind() const override { return actionJavaScript; }
413
- const std::string &getScript() const { return js; }
414
-
415
- static Object createObject(XRef *xref, const GooString &js);
416
-
417
- private:
418
- std::string js;
419
- bool isValid;
420
- };
421
-
422
- //------------------------------------------------------------------------
423
- // LinkOCGState
424
- //------------------------------------------------------------------------
425
- class LinkOCGState : public LinkAction
426
- {
427
- public:
428
- explicit LinkOCGState(const Object *obj);
429
-
430
- ~LinkOCGState() override;
431
-
432
- bool isOk() const override { return isValid; }
433
-
434
- LinkActionKind getKind() const override { return actionOCGState; }
435
-
436
- enum State
437
- {
438
- On,
439
- Off,
440
- Toggle
441
- };
442
- struct StateList
443
- {
444
- StateList() = default;
445
- ~StateList() = default;
446
- State st;
447
- std::vector<Ref> list;
448
- };
449
-
450
- const std::vector<StateList> &getStateList() const { return stateList; }
451
- bool getPreserveRB() const { return preserveRB; }
452
-
453
- private:
454
- std::vector<StateList> stateList;
455
- bool isValid;
456
- bool preserveRB;
457
- };
458
-
459
- //------------------------------------------------------------------------
460
- // LinkHide
461
- //------------------------------------------------------------------------
462
-
463
- class LinkHide : public LinkAction
464
- {
465
- public:
466
- explicit LinkHide(const Object *hideObj);
467
-
468
- ~LinkHide() override;
469
-
470
- bool isOk() const override { return hasTargetNameFlag; }
471
- LinkActionKind getKind() const override { return actionHide; }
472
-
473
- // According to spec the target can be either:
474
- // a) A text string containing the fully qualified name of the target
475
- // field.
476
- // b) An indirect reference to an annotation dictionary.
477
- // c) An array of "such dictionaries or text strings".
478
- //
479
- // While b / c appear to be very uncommon and can't easily be
480
- // created with Adobe Acrobat DC. So only support hide
481
- // actions with named targets (yet).
482
- bool hasTargetName() const { return hasTargetNameFlag; }
483
- const std::string &getTargetName() const { return targetName; }
484
-
485
- // Should this action show or hide.
486
- bool isShowAction() const { return show; }
487
-
488
- private:
489
- bool hasTargetNameFlag;
490
- std::string targetName;
491
- bool show;
492
- };
493
-
494
- //------------------------------------------------------------------------
495
- // LinkResetForm
496
- //------------------------------------------------------------------------
497
-
498
- class POPPLER_PRIVATE_EXPORT LinkResetForm : public LinkAction
499
- {
500
- public:
501
- // Build a LinkResetForm.
502
- explicit LinkResetForm(const Object *nameObj);
503
-
504
- ~LinkResetForm() override;
505
-
506
- bool isOk() const override { return true; }
507
-
508
- LinkActionKind getKind() const override { return actionResetForm; }
509
-
510
- const std::vector<std::string> &getFields() const { return fields; }
511
- bool getExclude() const { return exclude; }
512
-
513
- private:
514
- std::vector<std::string> fields;
515
- bool exclude;
516
- };
517
-
518
- //------------------------------------------------------------------------
519
- // LinkUnknown
520
- //------------------------------------------------------------------------
521
-
522
- class LinkUnknown : public LinkAction
523
- {
524
- public:
525
- // Build a LinkUnknown with the specified action type.
526
- explicit LinkUnknown(const char *actionA);
527
-
528
- ~LinkUnknown() override;
529
-
530
- // Was the LinkUnknown create successfully?
531
- // Yes: nothing can go wrong when creating LinkUnknown objects
532
- bool isOk() const override { return true; }
533
-
534
- // Accessors.
535
- LinkActionKind getKind() const override { return actionUnknown; }
536
- const std::string &getAction() const { return action; }
537
-
538
- private:
539
- std::string action; // action subtype
540
- };
541
-
542
- //------------------------------------------------------------------------
543
- // Links
544
- //------------------------------------------------------------------------
545
-
546
- class POPPLER_PRIVATE_EXPORT Links
547
- {
548
- public:
549
- // Extract links from array of annotations.
550
- explicit Links(Annots *annots);
551
-
552
- // Destructor.
553
- ~Links();
554
-
555
- Links(const Links &) = delete;
556
- Links &operator=(const Links &) = delete;
557
-
558
- // Iterate through list of links.
559
- int getNumLinks() const { return links.size(); }
560
- AnnotLink *getLink(int i) const { return links[i]; }
561
-
562
- private:
563
- std::vector<AnnotLink *> links;
564
- };
565
-
566
- #endif
@@ -1,32 +0,0 @@
1
- //========================================================================
2
- //
3
- // LocalPDFDocBuilder.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 LOCALPDFDOCBUILDER_H
14
- #define LOCALPDFDOCBUILDER_H
15
-
16
- #include "PDFDocBuilder.h"
17
-
18
- //------------------------------------------------------------------------
19
- // LocalPDFDocBuilder
20
- //
21
- // The LocalPDFDocBuilder implements a PDFDocBuilder for local files.
22
- //------------------------------------------------------------------------
23
-
24
- class LocalPDFDocBuilder : 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 /* LOCALPDFDOCBUILDER_H */