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,35 +0,0 @@
1
- //========================================================================
2
- //
3
- // ProfileData.h
4
- //
5
- // Copyright 2005 Jonathan Blandford <jrb@gnome.org>
6
- // Copyright 2018 Adam Reichold <adam.reichold@t-online.de>
7
- // Copyright 2021 Albert Astals Cid <aacid@kde.org>
8
- //
9
- //========================================================================
10
-
11
- #ifndef PROFILE_DATA_H
12
- #define PROFILE_DATA_H
13
-
14
- //------------------------------------------------------------------------
15
- // ProfileData
16
- //------------------------------------------------------------------------
17
-
18
- class ProfileData
19
- {
20
- public:
21
- void addElement(double elapsed);
22
-
23
- int getCount() const { return count; }
24
- double getTotal() const { return total; }
25
- double getMin() const { return min; }
26
- double getMax() const { return max; }
27
-
28
- private:
29
- int count = 0; // size of <elems> array
30
- double total = 0.0; // number of elements in array
31
- double min = 0.0; // reference count
32
- double max = 0.0; // reference count
33
- };
34
-
35
- #endif
@@ -1,164 +0,0 @@
1
- //*********************************************************************************
2
- // Rendition.h
3
- //---------------------------------------------------------------------------------
4
- //
5
- //---------------------------------------------------------------------------------
6
- // Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
7
- // Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010
8
- // Albert Astals Cid <aacid@kde.org> (C) 2017, 2018, 2021
9
- //
10
- // This program is free software; you can redistribute it and/or modify
11
- // it under the terms of the GNU General Public License as published by
12
- // the Free Software Foundation; either version 2 of the License, or
13
- // (at your option) any later version.
14
- //
15
- // This program is distributed in the hope that it will be useful,
16
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
17
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
- // GNU General Public License for more details.
19
- //
20
- // You should have received a copy of the GNU General Public License
21
- // along with this program; if not, write to the Free Software
22
- // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
- //*********************************************************************************
24
-
25
- #ifndef _RENDITION_H_
26
- #define _RENDITION_H_
27
-
28
- #include "Object.h"
29
-
30
- struct MediaWindowParameters
31
- {
32
-
33
- MediaWindowParameters();
34
- ~MediaWindowParameters();
35
-
36
- // parse from a floating window parameters dictionary
37
- void parseFWParams(Object *obj);
38
-
39
- enum MediaWindowType
40
- {
41
- windowFloating = 0,
42
- windowFullscreen,
43
- windowHidden,
44
- windowEmbedded
45
- };
46
-
47
- enum MediaWindowRelativeTo
48
- {
49
- windowRelativeToDocument = 0,
50
- windowRelativeToApplication,
51
- windowRelativeToDesktop
52
- };
53
-
54
- // DEFAULT VALUE
55
-
56
- MediaWindowType type; // movieWindowEmbedded
57
-
58
- int width; // -1
59
- int height; // -1
60
-
61
- // floating window position
62
- MediaWindowRelativeTo relativeTo; // windowRelativeToDocument (or to desktop)
63
- double XPosition; // 0.5
64
- double YPosition; // 0.5
65
-
66
- bool hasTitleBar; // true
67
- bool hasCloseButton; // true
68
- bool isResizeable; // true
69
- };
70
-
71
- struct MediaParameters
72
- {
73
-
74
- MediaParameters();
75
- ~MediaParameters();
76
-
77
- // parse from a "Media Play Parameters" dictionary
78
- void parseMediaPlayParameters(Object *playObj);
79
- // parse from a "Media Screen Parameters" dictionary
80
- void parseMediaScreenParameters(Object *screenObj);
81
-
82
- enum MediaFittingPolicy
83
- {
84
- fittingMeet = 0,
85
- fittingSlice,
86
- fittingFill,
87
- fittingScroll,
88
- fittingHidden,
89
- fittingUndefined
90
- };
91
-
92
- struct Color
93
- {
94
- double r, g, b;
95
- };
96
-
97
- int duration; // 0
98
-
99
- int volume; // 100
100
-
101
- // defined in media play parameters, p 770
102
- // correspond to 'fit' SMIL's attribute
103
- MediaFittingPolicy fittingPolicy; // fittingUndefined
104
-
105
- bool autoPlay; // true
106
-
107
- // repeat count, can be real values, 0 means forever
108
- double repeatCount; // 1.0
109
-
110
- // background color // black = (0.0 0.0 0.0)
111
- Color bgColor;
112
-
113
- // opacity in [0.0 1.0]
114
- double opacity; // 1.0
115
-
116
- bool showControls; // false
117
-
118
- MediaWindowParameters windowParams;
119
- };
120
-
121
- class POPPLER_PRIVATE_EXPORT MediaRendition
122
- {
123
- public:
124
- explicit MediaRendition(Object *obj);
125
- MediaRendition(const MediaRendition &other);
126
- ~MediaRendition();
127
- MediaRendition &operator=(const MediaRendition &) = delete;
128
-
129
- bool isOk() const { return ok; }
130
-
131
- const MediaParameters *getMHParameters() const { return &MH; }
132
- const MediaParameters *getBEParameters() const { return &BE; }
133
-
134
- const GooString *getContentType() const { return contentType; }
135
- const GooString *getFileName() const { return fileName; }
136
-
137
- bool getIsEmbedded() const { return isEmbedded; }
138
- Stream *getEmbbededStream() const { return isEmbedded ? embeddedStreamObject.getStream() : nullptr; }
139
- const Object *getEmbbededStreamObject() const { return isEmbedded ? &embeddedStreamObject : nullptr; }
140
- // write embedded stream to file
141
- void outputToFile(FILE *);
142
-
143
- MediaRendition *copy() const;
144
-
145
- private:
146
- bool ok;
147
-
148
- // "Must Honor" parameters
149
- MediaParameters MH;
150
- // "Best Effort" parameters
151
- MediaParameters BE;
152
-
153
- bool isEmbedded;
154
-
155
- GooString *contentType;
156
-
157
- // if it's embedded
158
- Object embeddedStreamObject;
159
-
160
- // if it's not embedded
161
- GooString *fileName;
162
- };
163
-
164
- #endif /* _RENDITION_H_ */
@@ -1,131 +0,0 @@
1
- //========================================================================
2
- //
3
- // SecurityHandler.h
4
- //
5
- // Copyright 2004 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) 2012, 2018, 2020-2022 Albert Astals Cid <aacid@kde.org>
17
- //
18
- // To see a description of the changes please see the Changelog file that
19
- // came with your tarball or type make ChangeLog if you are building from git
20
- //
21
- //========================================================================
22
-
23
- #ifndef SECURITYHANDLER_H
24
- #define SECURITYHANDLER_H
25
-
26
- #include "poppler-config.h"
27
-
28
- #include "Object.h"
29
-
30
- #include <optional>
31
-
32
- class GooString;
33
- class PDFDoc;
34
-
35
- //------------------------------------------------------------------------
36
- // SecurityHandler
37
- //------------------------------------------------------------------------
38
-
39
- class SecurityHandler
40
- {
41
- public:
42
- static SecurityHandler *make(PDFDoc *docA, Object *encryptDictA);
43
-
44
- explicit SecurityHandler(PDFDoc *docA);
45
- virtual ~SecurityHandler();
46
-
47
- SecurityHandler(const SecurityHandler &) = delete;
48
- SecurityHandler &operator=(const SecurityHandler &) = delete;
49
-
50
- // Returns true if the file is actually unencrypted.
51
- virtual bool isUnencrypted() const { return false; }
52
-
53
- // Check the document's encryption. If the document is encrypted,
54
- // this will first try <ownerPassword> and <userPassword> (in
55
- // "batch" mode), and if those fail, it will attempt to request a
56
- // password from the user. This is the high-level function that
57
- // calls the lower level functions for the specific security handler
58
- // (requesting a password three times, etc.). Returns true if the
59
- // document can be opened (if it's unencrypted, or if a correct
60
- // password is obtained); false otherwise (encrypted and no correct
61
- // password).
62
- bool checkEncryption(const std::optional<GooString> &ownerPassword, const std::optional<GooString> &userPassword);
63
-
64
- // Create authorization data for the specified owner and user
65
- // passwords. If the security handler doesn't support "batch" mode,
66
- // this function should return NULL.
67
- virtual void *makeAuthData(const std::optional<GooString> &ownerPassword, const std::optional<GooString> &userPassword) = 0;
68
-
69
- // Free the authorization data returned by makeAuthData or
70
- // getAuthData.
71
- virtual void freeAuthData(void *authData) = 0;
72
-
73
- // Attempt to authorize the document, using the supplied
74
- // authorization data (which may be NULL). Returns true if
75
- // successful (i.e., if at least the right to open the document was
76
- // granted).
77
- virtual bool authorize(void *authData) = 0;
78
-
79
- // Return the various authorization parameters. These are only
80
- // valid after authorize has returned true.
81
- virtual int getPermissionFlags() const = 0;
82
- virtual bool getOwnerPasswordOk() const = 0;
83
- virtual const unsigned char *getFileKey() const = 0;
84
- virtual int getFileKeyLength() const = 0;
85
- virtual int getEncVersion() const = 0;
86
- virtual int getEncRevision() const = 0;
87
- virtual CryptAlgorithm getEncAlgorithm() const = 0;
88
-
89
- protected:
90
- PDFDoc *doc;
91
- };
92
-
93
- //------------------------------------------------------------------------
94
- // StandardSecurityHandler
95
- //------------------------------------------------------------------------
96
-
97
- class StandardSecurityHandler : public SecurityHandler
98
- {
99
- public:
100
- StandardSecurityHandler(PDFDoc *docA, Object *encryptDictA);
101
- ~StandardSecurityHandler() override;
102
-
103
- bool isUnencrypted() const override;
104
- void *makeAuthData(const std::optional<GooString> &ownerPassword, const std::optional<GooString> &userPassword) override;
105
- void freeAuthData(void *authData) override;
106
- bool authorize(void *authData) override;
107
- int getPermissionFlags() const override { return permFlags; }
108
- bool getOwnerPasswordOk() const override { return ownerPasswordOk; }
109
- const unsigned char *getFileKey() const override { return fileKey; }
110
- int getFileKeyLength() const override { return ok ? fileKeyLength : 0; }
111
- int getEncVersion() const override { return encVersion; }
112
- int getEncRevision() const override { return encRevision; }
113
- CryptAlgorithm getEncAlgorithm() const override { return encAlgorithm; }
114
-
115
- private:
116
- int permFlags;
117
- bool ownerPasswordOk;
118
- unsigned char fileKey[32];
119
- int fileKeyLength;
120
- int encVersion;
121
- int encRevision;
122
- bool encryptMetadata;
123
- CryptAlgorithm encAlgorithm;
124
-
125
- GooString *ownerKey, *userKey;
126
- GooString *ownerEnc, *userEnc;
127
- GooString *fileID;
128
- bool ok;
129
- };
130
-
131
- #endif
@@ -1,82 +0,0 @@
1
- /* Sound.h - an object that holds the sound structure
2
- * Copyright (C) 2006-2007, Pino Toscano <pino@kde.org>
3
- * Copyright (C) 2017-2021, Albert Astals Cid <aacid@kde.org>
4
- * Copyright (C) 2020, Oliver Sander <oliver.sander@tu-dresden.de>
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License as published by
8
- * the Free Software Foundation; either version 2, or (at your option)
9
- * any later version.
10
- *
11
- * This program is distributed in the hope that it will be useful,
12
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
- * GNU General Public License for more details.
15
- *
16
- * You should have received a copy of the GNU General Public License
17
- * along with this program; if not, write to the Free Software
18
- * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19
- */
20
-
21
- #ifndef Sound_H
22
- #define Sound_H
23
-
24
- #include <memory>
25
-
26
- class Object;
27
- class Stream;
28
-
29
- //------------------------------------------------------------------------
30
-
31
- enum SoundKind
32
- {
33
- soundEmbedded, // embedded sound
34
- soundExternal // external sound
35
- };
36
-
37
- enum SoundEncoding
38
- {
39
- soundRaw, // raw encoding
40
- soundSigned, // twos-complement values
41
- soundMuLaw, // mu-law-encoded samples
42
- soundALaw // A-law-encoded samples
43
- };
44
-
45
- class POPPLER_PRIVATE_EXPORT Sound
46
- {
47
- public:
48
- // Try to parse the Object obj
49
- static std::unique_ptr<Sound> parseSound(Object *obj);
50
-
51
- // Destructor
52
- ~Sound();
53
-
54
- Sound(const Sound &) = delete;
55
- Sound &operator=(const Sound &) = delete;
56
-
57
- const Object *getObject() const { return &streamObj; }
58
- Stream *getStream();
59
-
60
- SoundKind getSoundKind() const { return kind; }
61
- const std::string &getFileName() const { return fileName; }
62
- double getSamplingRate() const { return samplingRate; }
63
- int getChannels() const { return channels; }
64
- int getBitsPerSample() const { return bitsPerSample; }
65
- SoundEncoding getEncoding() const { return encoding; }
66
-
67
- Sound *copy() const;
68
-
69
- private:
70
- // Create a sound. The Object obj is ensured to be a Stream with a Dict
71
- explicit Sound(const Object *obj, bool readAttrs = true);
72
-
73
- Object streamObj;
74
- SoundKind kind;
75
- std::string fileName;
76
- double samplingRate;
77
- int channels;
78
- int bitsPerSample;
79
- SoundEncoding encoding;
80
- };
81
-
82
- #endif