node-poppler 5.1.4 → 5.1.5

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 (172) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/package.json +10 -10
  3. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Annot.h +0 -1783
  4. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/AnnotStampImageHelper.h +0 -68
  5. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Array.h +0 -92
  6. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/BBoxOutputDev.h +0 -54
  7. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CMap.h +0 -128
  8. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CachedFile.h +0 -149
  9. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoFontEngine.h +0 -122
  10. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoOutputDev.h +0 -468
  11. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CairoRescaleBox.h +0 -60
  12. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Catalog.h +0 -318
  13. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CertificateInfo.h +0 -129
  14. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharCodeToUnicode.h +0 -143
  15. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CharTypes.h +0 -24
  16. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlCachedFile.h +0 -37
  17. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/CurlPDFDocBuilder.h +0 -32
  18. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/DateInfo.h +0 -44
  19. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Decrypt.h +0 -147
  20. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Dict.h +0 -126
  21. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Error.h +0 -59
  22. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ErrorCodes.h +0 -54
  23. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FDPDFDocBuilder.h +0 -36
  24. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FILECacheLoader.h +0 -34
  25. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FileSpec.h +0 -85
  26. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontEncodingTables.h +0 -20
  27. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/FontInfo.h +0 -109
  28. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Form.h +0 -734
  29. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Function.h +0 -251
  30. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Gfx.h +0 -373
  31. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxFont.h +0 -466
  32. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState.h +0 -1759
  33. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GfxState_helpers.h +0 -90
  34. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/GlobalParams.h +0 -221
  35. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Hints.h +0 -91
  36. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JArithmeticDecoder.h +0 -131
  37. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JBIG2Stream.h +0 -130
  38. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JPEG2000Stream.h +0 -54
  39. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/JSInfo.h +0 -65
  40. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Lexer.h +0 -113
  41. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Linearization.h +0 -43
  42. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Link.h +0 -566
  43. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/LocalPDFDocBuilder.h +0 -32
  44. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/MarkedContentOutputDev.h +0 -132
  45. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Movie.h +0 -123
  46. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToCharCode.h +0 -52
  47. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/NameToUnicodeTable.h +0 -4300
  48. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Object.h +0 -678
  49. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OptionalContent.h +0 -117
  50. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Outline.h +0 -122
  51. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/OutputDev.h +0 -379
  52. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDoc.h +0 -419
  53. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocBuilder.h +0 -47
  54. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocEncoding.h +0 -43
  55. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PDFDocFactory.h +0 -58
  56. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSOutputDev.h +0 -549
  57. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PSTokenizer.h +0 -47
  58. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Page.h +0 -273
  59. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PageTransition.h +0 -105
  60. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Parser.h +0 -76
  61. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PopplerCache.h +0 -65
  62. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/PreScanOutputDev.h +0 -148
  63. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ProfileData.h +0 -35
  64. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Rendition.h +0 -164
  65. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SecurityHandler.h +0 -131
  66. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Sound.h +0 -82
  67. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/SplashOutputDev.h +0 -413
  68. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream-CCITT.h +0 -334
  69. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/Stream.h +0 -1504
  70. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructElement.h +0 -406
  71. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/StructTreeRoot.h +0 -89
  72. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/TextOutputDev.h +0 -918
  73. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UTF.h +0 -112
  74. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCClassTables.h +0 -983
  75. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeCompTables.h +0 -328
  76. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeDecompTables.h +0 -7181
  77. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMap.h +0 -128
  78. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapFuncs.h +0 -35
  79. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeMapTables.h +0 -84
  80. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/UnicodeTypeTable.h +0 -49
  81. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/ViewerPreferences.h +0 -87
  82. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/XRef.h +0 -325
  83. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-destination.h +0 -69
  84. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-document.h +0 -135
  85. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-embedded-file.h +0 -55
  86. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font-private.h +0 -68
  87. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-font.h +0 -95
  88. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-global.h +0 -132
  89. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-image.h +0 -74
  90. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-renderer.h +0 -77
  91. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page-transition.h +0 -85
  92. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-page.h +0 -225
  93. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-rectangle.h +0 -66
  94. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-toc.h +0 -72
  95. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler-version.h +0 -39
  96. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/cpp/poppler_cpp_export.h +0 -42
  97. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiBase.h +0 -66
  98. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiEncodings.h +0 -43
  99. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiIdentifier.h +0 -52
  100. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiTrueType.h +0 -190
  101. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1.h +0 -70
  102. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/fofi/FoFiType1C.h +0 -263
  103. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-action.h +0 -454
  104. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-annot.h +0 -333
  105. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-attachment.h +0 -123
  106. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-date.h +0 -32
  107. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-document.h +0 -541
  108. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-enums.h +0 -191
  109. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-features.h +0 -88
  110. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-form-field.h +0 -254
  111. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-layer.h +0 -50
  112. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-macros.h +0 -42
  113. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-media.h +0 -80
  114. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-movie.h +0 -81
  115. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-page.h +0 -424
  116. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler-structure-element.h +0 -425
  117. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/glib/poppler.h +0 -259
  118. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooCheckedOps.h +0 -116
  119. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooLikely.h +0 -22
  120. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooString.h +0 -262
  121. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/GooTimer.h +0 -59
  122. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/ImgWriter.h +0 -39
  123. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/JpegWriter.h +0 -69
  124. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/PNGWriter.h +0 -68
  125. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/TiffWriter.h +0 -70
  126. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gdir.h +0 -96
  127. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gfile.h +0 -156
  128. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gmem.h +0 -201
  129. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/grandom.h +0 -21
  130. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/goo/gstrtod.h +0 -45
  131. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler-config.h +0 -155
  132. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/poppler_private_export.h +0 -42
  133. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/Splash.h +0 -336
  134. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashBitmap.h +0 -127
  135. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashClip.h +0 -131
  136. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashErrorCodes.h +0 -50
  137. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFont.h +0 -71
  138. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontEngine.h +0 -72
  139. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFTFontFile.h +0 -64
  140. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFont.h +0 -116
  141. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontEngine.h +0 -89
  142. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFile.h +0 -98
  143. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashFontFileID.h +0 -40
  144. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashGlyphBitmap.h +0 -23
  145. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashMath.h +0 -215
  146. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPath.h +0 -138
  147. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashPattern.h +0 -107
  148. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashScreen.h +0 -87
  149. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashState.h +0 -132
  150. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashTypes.h +0 -248
  151. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPath.h +0 -95
  152. package/src/lib/win32/poppler-22.04.0/Library/include/poppler/splash/SplashXPathScanner.h +0 -136
  153. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-cpp.pc +0 -12
  154. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler-glib.pc +0 -12
  155. package/src/lib/win32/poppler-22.04.0/Library/lib/pkgconfig/poppler.pc +0 -10
  156. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-cpp.lib +0 -0
  157. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler-glib.lib +0 -0
  158. package/src/lib/win32/poppler-22.04.0/Library/lib/poppler.lib +0 -0
  159. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfattach.1 +0 -60
  160. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfdetach.1 +0 -94
  161. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdffonts.1 +0 -128
  162. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfimages.1 +0 -265
  163. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfinfo.1 +0 -198
  164. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfseparate.1 +0 -60
  165. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftocairo.1 +0 -346
  166. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftohtml.1 +0 -118
  167. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftoppm.1 +0 -230
  168. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftops.1 +0 -267
  169. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdftotext.1 +0 -157
  170. package/src/lib/win32/poppler-22.04.0/Library/share/man/man1/pdfunite.1 +0 -43
  171. package/src/lib/win32/poppler-22.04.0/share/poppler/CMakeLists.txt +0 -309
  172. package/src/lib/win32/poppler-22.04.0/share/poppler/Makefile +0 -333
@@ -1,549 +0,0 @@
1
- //========================================================================
2
- //
3
- // PSOutputDev.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) 2005 Martin Kretzschmar <martink@gnome.org>
17
- // Copyright (C) 2005 Kristian Høgsberg <krh@redhat.com>
18
- // Copyright (C) 2006-2008, 2012, 2013, 2015, 2017-2022 Albert Astals Cid <aacid@kde.org>
19
- // Copyright (C) 2007 Brad Hards <bradh@kde.org>
20
- // Copyright (C) 2009-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
21
- // Copyright (C) 2009 Till Kamppeter <till.kamppeter@gmail.com>
22
- // Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
23
- // Copyright (C) 2009, 2011, 2015-2017, 2020 William Bader <williambader@hotmail.com>
24
- // Copyright (C) 2010 Hib Eris <hib@hiberis.nl>
25
- // Copyright (C) 2011, 2014, 2017, 2020 Adrian Johnson <ajohnson@redneon.com>
26
- // Copyright (C) 2012 Fabio D'Urso <fabiodurso@hotmail.it>
27
- // 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
28
- // Copyright (C) 2018 Adam Reichold <adam.reichold@t-online.de>
29
- // Copyright (C) 2018, 2020 Philipp Knechtges <philipp-dev@knechtges.com>
30
- // Copyright (C) 2019 Oliver Sander <oliver.sander@tu-dresden.de>
31
- // Copyright (C) 2021 Hubert Figuiere <hub@figuiere.net>
32
- // Copyright (C) 2021 Christian Persch <chpe@src.gnome.org>
33
- //
34
- // To see a description of the changes please see the Changelog file that
35
- // came with your tarball or type make ChangeLog if you are building from git
36
- //
37
- //========================================================================
38
-
39
- #ifndef PSOUTPUTDEV_H
40
- #define PSOUTPUTDEV_H
41
-
42
- #include "poppler-config.h"
43
- #include "poppler_private_export.h"
44
- #include <cstddef>
45
- #include "Object.h"
46
- #include "GfxState.h"
47
- #include "GlobalParams.h"
48
- #include "OutputDev.h"
49
- #include <set>
50
- #include <map>
51
- #include <vector>
52
- #include <unordered_set>
53
- #include <unordered_map>
54
- #include <string>
55
-
56
- #include "splash/Splash.h"
57
-
58
- class PDFDoc;
59
- class XRef;
60
- class Function;
61
- class GfxPath;
62
- class GfxFont;
63
- class GfxColorSpace;
64
- class GfxSeparationColorSpace;
65
- class PDFRectangle;
66
- struct PST1FontName;
67
- struct PSFont8Info;
68
- struct PSFont16Enc;
69
- class PSOutCustomColor;
70
- struct PSOutPaperSize;
71
- class PSOutputDev;
72
-
73
- //------------------------------------------------------------------------
74
- // PSOutputDev
75
- //------------------------------------------------------------------------
76
-
77
- enum PSLevel
78
- {
79
- psLevel1,
80
- psLevel1Sep,
81
- psLevel2,
82
- psLevel2Sep,
83
- psLevel3,
84
- psLevel3Sep
85
- };
86
-
87
- enum PSOutMode
88
- {
89
- psModePS,
90
- psModeEPS,
91
- psModeForm
92
- };
93
-
94
- enum PSFileType
95
- {
96
- psFile, // write to file
97
- psPipe, // write to pipe
98
- psStdout, // write to stdout
99
- psGeneric // write to a generic stream
100
- };
101
-
102
- enum PSOutCustomCodeLocation
103
- {
104
- psOutCustomDocSetup,
105
- psOutCustomPageSetup
106
- };
107
-
108
- enum PSForceRasterize
109
- {
110
- psRasterizeWhenNeeded, // default
111
- psAlwaysRasterize, // always rasterize, useful for testing
112
- psNeverRasterize // never rasterize, may produce incorrect output
113
- };
114
-
115
- typedef void (*PSOutputFunc)(void *stream, const char *data, int len);
116
-
117
- typedef GooString *(*PSOutCustomCodeCbk)(PSOutputDev *psOut, PSOutCustomCodeLocation loc, int n, void *data);
118
-
119
- class POPPLER_PRIVATE_EXPORT PSOutputDev : public OutputDev
120
- {
121
- public:
122
- // Open a PostScript output file, and write the prolog.
123
- // pages has to be sorted in increasing order
124
- PSOutputDev(const char *fileName, PDFDoc *docA, char *psTitleA, const std::vector<int> &pages, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, bool noCrop = false, bool duplexA = true, int imgLLXA = 0, int imgLLYA = 0,
125
- int imgURXA = 0, int imgURYA = 0, PSForceRasterize forceRasterizeA = psRasterizeWhenNeeded, bool manualCtrlA = false, PSOutCustomCodeCbk customCodeCbkA = nullptr, void *customCodeCbkDataA = nullptr,
126
- PSLevel levelA = psLevel2);
127
-
128
- // Open a PSOutputDev that will write to a file descriptor
129
- PSOutputDev(int fdA, PDFDoc *docA, char *psTitleA, const std::vector<int> &pages, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, bool noCrop = false, bool duplexA = true, int imgLLXA = 0, int imgLLYA = 0, int imgURXA = 0,
130
- int imgURYA = 0, PSForceRasterize forceRasterizeA = psRasterizeWhenNeeded, bool manualCtrlA = false, PSOutCustomCodeCbk customCodeCbkA = nullptr, void *customCodeCbkDataA = nullptr, PSLevel levelA = psLevel2);
131
-
132
- // Open a PSOutputDev that will write to a generic stream.
133
- // pages has to be sorted in increasing order
134
- PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA, char *psTitleA, PDFDoc *docA, const std::vector<int> &pages, PSOutMode modeA, int paperWidthA = -1, int paperHeightA = -1, bool noCrop = false, bool duplexA = true,
135
- int imgLLXA = 0, int imgLLYA = 0, int imgURXA = 0, int imgURYA = 0, PSForceRasterize forceRasterizeA = psRasterizeWhenNeeded, bool manualCtrlA = false, PSOutCustomCodeCbk customCodeCbkA = nullptr,
136
- void *customCodeCbkDataA = nullptr, PSLevel levelA = psLevel2);
137
-
138
- // Destructor -- writes the trailer and closes the file.
139
- ~PSOutputDev() override;
140
-
141
- // Check if file was successfully created.
142
- virtual bool isOk() { return ok; }
143
-
144
- //---- get info about output device
145
-
146
- // Does this device use upside-down coordinates?
147
- // (Upside-down means (0,0) is the top left corner of the page.)
148
- bool upsideDown() override { return false; }
149
-
150
- // Does this device use drawChar() or drawString()?
151
- bool useDrawChar() override { return false; }
152
-
153
- // Does this device use tilingPatternFill()? If this returns false,
154
- // tiling pattern fills will be reduced to a series of other drawing
155
- // operations.
156
- bool useTilingPatternFill() override { return true; }
157
-
158
- // Does this device use functionShadedFill(), axialShadedFill(), and
159
- // radialShadedFill()? If this returns false, these shaded fills
160
- // will be reduced to a series of other drawing operations.
161
- bool useShadedFills(int type) override { return (type < 4 && level >= psLevel2) || (type == 7 && level >= psLevel3); }
162
-
163
- // Does this device use drawForm()? If this returns false,
164
- // form-type XObjects will be interpreted (i.e., unrolled).
165
- bool useDrawForm() override { return preloadImagesForms; }
166
-
167
- // Does this device use beginType3Char/endType3Char? Otherwise,
168
- // text in Type 3 fonts will be drawn with drawChar/drawString.
169
- bool interpretType3Chars() override { return false; }
170
-
171
- bool needClipToCropBox() override { return mode == psModeEPS; }
172
-
173
- //----- header/trailer (used only if manualCtrl is true)
174
-
175
- // Write the document-level header.
176
- void writeHeader(int nPages, const PDFRectangle *mediaBox, const PDFRectangle *cropBox, int pageRotate, const char *title);
177
-
178
- // Write the Xpdf procset.
179
- void writeXpdfProcset();
180
-
181
- // Write the trailer for the current page.
182
- void writePageTrailer();
183
-
184
- // Write the document trailer.
185
- void writeTrailer();
186
-
187
- //----- initialization and control
188
-
189
- // Check to see if a page slice should be displayed. If this
190
- // returns false, the page display is aborted. Typically, an
191
- // OutputDev will use some alternate means to display the page
192
- // before returning false.
193
- bool checkPageSlice(Page *page, double hDPI, double vDPI, int rotate, bool useMediaBox, bool crop, int sliceX, int sliceY, int sliceW, int sliceH, bool printing, bool (*abortCheckCbk)(void *data) = nullptr,
194
- void *abortCheckCbkData = nullptr, bool (*annotDisplayDecideCbk)(Annot *annot, void *user_data) = nullptr, void *annotDisplayDecideCbkData = nullptr) override;
195
-
196
- // Start a page.
197
- void startPage(int pageNum, GfxState *state, XRef *xref) override;
198
-
199
- // End a page.
200
- void endPage() override;
201
-
202
- //----- save/restore graphics state
203
- void saveState(GfxState *state) override;
204
- void restoreState(GfxState *state) override;
205
-
206
- //----- update graphics state
207
- void updateCTM(GfxState *state, double m11, double m12, double m21, double m22, double m31, double m32) override;
208
- void updateLineDash(GfxState *state) override;
209
- void updateFlatness(GfxState *state) override;
210
- void updateLineJoin(GfxState *state) override;
211
- void updateLineCap(GfxState *state) override;
212
- void updateMiterLimit(GfxState *state) override;
213
- void updateLineWidth(GfxState *state) override;
214
- void updateFillColorSpace(GfxState *state) override;
215
- void updateStrokeColorSpace(GfxState *state) override;
216
- void updateFillColor(GfxState *state) override;
217
- void updateStrokeColor(GfxState *state) override;
218
- void updateFillOverprint(GfxState *state) override;
219
- void updateStrokeOverprint(GfxState *state) override;
220
- void updateOverprintMode(GfxState *state) override;
221
- void updateTransfer(GfxState *state) override;
222
-
223
- //----- update text state
224
- void updateFont(GfxState *state) override;
225
- void updateTextMat(GfxState *state) override;
226
- void updateCharSpace(GfxState *state) override;
227
- void updateRender(GfxState *state) override;
228
- void updateRise(GfxState *state) override;
229
- void updateWordSpace(GfxState *state) override;
230
- void updateHorizScaling(GfxState *state) override;
231
- void updateTextPos(GfxState *state) override;
232
- void updateTextShift(GfxState *state, double shift) override;
233
- void saveTextPos(GfxState *state) override;
234
- void restoreTextPos(GfxState *state) override;
235
-
236
- //----- path painting
237
- void stroke(GfxState *state) override;
238
- void fill(GfxState *state) override;
239
- void eoFill(GfxState *state) override;
240
- bool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, GfxTilingPattern *tPat, const double *mat, int x0, int y0, int x1, int y1, double xStep, double yStep) override;
241
- bool functionShadedFill(GfxState *state, GfxFunctionShading *shading) override;
242
- bool axialShadedFill(GfxState *state, GfxAxialShading *shading, double /*tMin*/, double /*tMax*/) override;
243
- bool radialShadedFill(GfxState *state, GfxRadialShading *shading, double /*sMin*/, double /*sMax*/) override;
244
- bool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) override;
245
-
246
- //----- path clipping
247
- void clip(GfxState *state) override;
248
- void eoClip(GfxState *state) override;
249
- void clipToStrokePath(GfxState *state) override;
250
-
251
- //----- text drawing
252
- void drawString(GfxState *state, const GooString *s) override;
253
- void beginTextObject(GfxState *state) override;
254
- void endTextObject(GfxState *state) override;
255
-
256
- //----- image drawing
257
- void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool interpolate, bool inlineImg) override;
258
- void setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, bool invert, bool inlineImg, double *baseMatrix) override;
259
- void unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) override;
260
- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, const int *maskColors, bool inlineImg) override;
261
- void drawMaskedImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, bool interpolate, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert, bool maskInterpolate) override;
262
-
263
- #ifdef OPI_SUPPORT
264
- //----- OPI functions
265
- void opiBegin(GfxState *state, Dict *opiDict) override;
266
- void opiEnd(GfxState *state, Dict *opiDict) override;
267
- #endif
268
-
269
- //----- Type 3 font operators
270
- void type3D0(GfxState *state, double wx, double wy) override;
271
- void type3D1(GfxState *state, double wx, double wy, double llx, double lly, double urx, double ury) override;
272
-
273
- //----- form XObjects
274
- void drawForm(Ref ref) override;
275
-
276
- //----- PostScript XObjects
277
- void psXObject(Stream *psStream, Stream *level1Stream) override;
278
-
279
- //----- miscellaneous
280
- void setOffset(double x, double y)
281
- {
282
- tx0 = x;
283
- ty0 = y;
284
- }
285
- void setScale(double x, double y)
286
- {
287
- xScale0 = x;
288
- yScale0 = y;
289
- }
290
- void setRotate(int rotateA) { rotate0 = rotateA; }
291
- void setClip(double llx, double lly, double urx, double ury)
292
- {
293
- clipLLX0 = llx;
294
- clipLLY0 = lly;
295
- clipURX0 = urx;
296
- clipURY0 = ury;
297
- }
298
- void setUnderlayCbk(void (*cbk)(PSOutputDev *psOut, void *data), void *data)
299
- {
300
- underlayCbk = cbk;
301
- underlayCbkData = data;
302
- }
303
- void setOverlayCbk(void (*cbk)(PSOutputDev *psOut, void *data), void *data)
304
- {
305
- overlayCbk = cbk;
306
- overlayCbkData = data;
307
- }
308
- void setDisplayText(bool display) { displayText = display; }
309
-
310
- void setPSCenter(bool center) { psCenter = center; }
311
- void setPSExpandSmaller(bool expand) { psExpandSmaller = expand; }
312
- void setPSShrinkLarger(bool shrink) { psShrinkLarger = shrink; }
313
- void setOverprintPreview(bool overprintPreviewA) { overprintPreview = overprintPreviewA; }
314
- void setRasterAntialias(bool a) { rasterAntialias = a; }
315
- void setForceRasterize(PSForceRasterize f) { forceRasterize = f; }
316
- void setRasterResolution(double r) { rasterResolution = r; }
317
- void setRasterMono(bool b)
318
- {
319
- processColorFormat = splashModeMono8;
320
- processColorFormatSpecified = true;
321
- }
322
-
323
- void setUncompressPreloadedImages(bool b) { uncompressPreloadedImages = b; }
324
-
325
- bool getEmbedType1() const { return embedType1; }
326
- bool getEmbedTrueType() const { return embedTrueType; }
327
- bool getEmbedCIDPostScript() const { return embedCIDPostScript; }
328
- bool getEmbedCIDTrueType() const { return embedCIDTrueType; }
329
- bool getFontPassthrough() const { return fontPassthrough; }
330
- bool getOptimizeColorSpace() const { return optimizeColorSpace; }
331
- bool getPassLevel1CustomColor() const { return passLevel1CustomColor; }
332
- bool getEnableLZW() const { return enableLZW; };
333
- bool getEnableFlate() const
334
- #ifdef ENABLE_ZLIB
335
- {
336
- return enableFlate;
337
- }
338
- #else
339
- {
340
- return false;
341
- }
342
- #endif
343
- void setEmbedType1(bool b) { embedType1 = b; }
344
- void setEmbedTrueType(bool b) { embedTrueType = b; }
345
- void setEmbedCIDPostScript(bool b) { embedCIDPostScript = b; }
346
- void setEmbedCIDTrueType(bool b) { embedCIDTrueType = b; }
347
- void setFontPassthrough(bool b) { fontPassthrough = b; }
348
- void setOptimizeColorSpace(bool b) { optimizeColorSpace = b; }
349
- void setPassLevel1CustomColor(bool b) { passLevel1CustomColor = b; }
350
- void setPreloadImagesForms(bool b) { preloadImagesForms = b; }
351
- void setGenerateOPI(bool b) { generateOPI = b; }
352
- void setUseASCIIHex(bool b) { useASCIIHex = b; }
353
- void setUseBinary(bool b) { useBinary = b; }
354
- void setEnableLZW(bool b) { enableLZW = b; }
355
- void setEnableFlate(bool b) { enableFlate = b; }
356
-
357
- void setProcessColorFormat(SplashColorMode format)
358
- {
359
- processColorFormat = format;
360
- processColorFormatSpecified = true;
361
- }
362
-
363
- private:
364
- void init(PSOutputFunc outputFuncA, void *outputStreamA, PSFileType fileTypeA, char *psTitleA, PDFDoc *doc, const std::vector<int> &pages, PSOutMode modeA, int imgLLXA, int imgLLYA, int imgURXA, int imgURYA, bool manualCtrlA,
365
- int paperWidthA, int paperHeightA, bool noCropA, bool duplexA, PSLevel levelA);
366
- void postInit();
367
- void setupResources(Dict *resDict);
368
- void setupFonts(Dict *resDict);
369
- void setupFont(GfxFont *font, Dict *parentResDict);
370
- void setupEmbeddedType1Font(Ref *id, GooString *psName);
371
- void updateFontMaxValidGlyph(GfxFont *font, int maxValidGlyph);
372
- void setupExternalType1Font(const GooString *fileName, GooString *psName);
373
- void setupEmbeddedType1CFont(GfxFont *font, Ref *id, GooString *psName);
374
- void setupEmbeddedOpenTypeT1CFont(GfxFont *font, Ref *id, GooString *psName);
375
- void setupEmbeddedTrueTypeFont(GfxFont *font, Ref *id, GooString *psName);
376
- void setupExternalTrueTypeFont(GfxFont *font, const GooString *fileName, GooString *psName);
377
- void setupEmbeddedCIDType0Font(GfxFont *font, Ref *id, GooString *psName);
378
- void setupEmbeddedCIDTrueTypeFont(GfxFont *font, Ref *id, GooString *psName, bool needVerticalMetrics);
379
- void setupExternalCIDTrueTypeFont(GfxFont *font, const GooString *fileName, GooString *psName, bool needVerticalMetrics);
380
- void setupEmbeddedOpenTypeCFFFont(GfxFont *font, Ref *id, GooString *psName);
381
- void setupType3Font(GfxFont *font, GooString *psName, Dict *parentResDict);
382
- GooString *makePSFontName(GfxFont *font, const Ref *id);
383
- void setupImages(Dict *resDict);
384
- void setupImage(Ref id, Stream *str, bool mask);
385
- void setupForms(Dict *resDict);
386
- void setupForm(Ref id, Object *strObj);
387
- void addProcessColor(double c, double m, double y, double k);
388
- void addCustomColor(GfxSeparationColorSpace *sepCS);
389
- void doPath(const GfxPath *path);
390
- void maskToClippingPath(Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert);
391
- void doImageL1(Object *ref, GfxImageColorMap *colorMap, bool invert, bool inlineImg, Stream *str, int width, int height, int len, const int *maskColors, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert);
392
- void doImageL1Sep(Object *ref, GfxImageColorMap *colorMap, bool invert, bool inlineImg, Stream *str, int width, int height, int len, const int *maskColors, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert);
393
- void doImageL2(GfxState *state, Object *ref, GfxImageColorMap *colorMap, bool invert, bool inlineImg, Stream *str, int width, int height, int len, const int *maskColors, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert);
394
- void doImageL3(GfxState *state, Object *ref, GfxImageColorMap *colorMap, bool invert, bool inlineImg, Stream *str, int width, int height, int len, const int *maskColors, Stream *maskStr, int maskWidth, int maskHeight, bool maskInvert);
395
- void dumpColorSpaceL2(GfxState *state, GfxColorSpace *colorSpace, bool genXform, bool updateColors, bool map01);
396
- bool tilingPatternFillL1(GfxState *state, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep);
397
- bool tilingPatternFillL2(GfxState *state, Catalog *cat, Object *str, const double *pmat, int paintType, int tilingType, Dict *resDict, const double *mat, const double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep);
398
-
399
- #ifdef OPI_SUPPORT
400
- void opiBegin20(GfxState *state, Dict *dict);
401
- void opiBegin13(GfxState *state, Dict *dict);
402
- void opiTransform(GfxState *state, double x0, double y0, double *x1, double *y1);
403
- #endif
404
- void cvtFunction(const Function *func, bool invertPSFunction = false);
405
- GooString *filterPSName(const std::string &name);
406
-
407
- // Write the document-level setup.
408
- void writeDocSetup(Catalog *catalog, const std::vector<int> &pageList, bool duplexA);
409
-
410
- void writePSChar(char c);
411
- void writePS(const char *s);
412
- void writePSBuf(const char *s, int len);
413
- void writePSFmt(const char *fmt, ...);
414
- void writePSString(const std::string &s);
415
- void writePSName(const char *s);
416
- GooString *filterPSLabel(GooString *label, bool *needParens = nullptr);
417
- void writePSTextLine(const GooString *s);
418
-
419
- PSLevel level; // PostScript level (1, 2, separation)
420
- PSOutMode mode; // PostScript mode (PS, EPS, form)
421
- int paperWidth; // width of paper, in pts
422
- int paperHeight; // height of paper, in pts
423
- bool paperMatch; // true if paper size is set to match each page
424
- int prevWidth; // width of previous page
425
- // (only psModePSOrigPageSizes output mode)
426
- int prevHeight; // height of previous page
427
- // (only psModePSOrigPageSizes output mode)
428
- int imgLLX, imgLLY, // imageable area, in pts
429
- imgURX, imgURY;
430
- bool noCrop;
431
- bool duplex;
432
- std::vector<int> pages;
433
- char *psTitle;
434
- bool postInitDone; // true if postInit() was called
435
-
436
- PSOutputFunc outputFunc;
437
- void *outputStream;
438
- PSFileType fileType; // file / pipe / stdout
439
- bool manualCtrl;
440
- int seqPage; // current sequential page number
441
- void (*underlayCbk)(PSOutputDev *psOut, void *data);
442
- void *underlayCbkData;
443
- void (*overlayCbk)(PSOutputDev *psOut, void *data);
444
- void *overlayCbkData;
445
- GooString *(*customCodeCbk)(PSOutputDev *psOut, PSOutCustomCodeLocation loc, int n, void *data);
446
- void *customCodeCbkData;
447
-
448
- PDFDoc *doc;
449
- XRef *xref; // the xref table for this PDF file
450
-
451
- Ref *fontIDs; // list of object IDs of all used fonts
452
- int fontIDLen; // number of entries in fontIDs array
453
- int fontIDSize; // size of fontIDs array
454
- std::set<int> resourceIDs; // list of object IDs of objects containing Resources we've already set up
455
- std::unordered_set<std::string> fontNames; // all used font names
456
- std::unordered_map<std::string, int> perFontMaxValidGlyph; // max valid glyph of each font
457
- PST1FontName *t1FontNames; // font names for Type 1/1C fonts
458
- int t1FontNameLen; // number of entries in t1FontNames array
459
- int t1FontNameSize; // size of t1FontNames array
460
- PSFont8Info *font8Info; // info for 8-bit fonts
461
- int font8InfoLen; // number of entries in font8Info array
462
- int font8InfoSize; // size of font8Info array
463
- PSFont16Enc *font16Enc; // encodings for substitute 16-bit fonts
464
- int font16EncLen; // number of entries in font16Enc array
465
- int font16EncSize; // size of font16Enc array
466
- Ref *imgIDs; // list of image IDs for in-memory images
467
- int imgIDLen; // number of entries in imgIDs array
468
- int imgIDSize; // size of imgIDs array
469
- Ref *formIDs; // list of IDs for predefined forms
470
- int formIDLen; // number of entries in formIDs array
471
- int formIDSize; // size of formIDs array
472
- int numSaves; // current number of gsaves
473
- int numTilingPatterns; // current number of nested tiling patterns
474
- int nextFunc; // next unique number to use for a function
475
-
476
- std::vector<PSOutPaperSize *> *paperSizes; // list of used paper sizes, if paperMatch
477
- // is true
478
- std::map<int, int> pagePaperSize; // page num to paperSize entry mapping
479
- double tx0, ty0; // global translation
480
- double xScale0, yScale0; // global scaling
481
- int rotate0; // rotation angle (0, 90, 180, 270)
482
- double clipLLX0, clipLLY0, clipURX0, clipURY0;
483
- double tx, ty; // global translation for current page
484
- double xScale, yScale; // global scaling for current page
485
- int rotate; // rotation angle for current page
486
- double epsX1, epsY1, // EPS bounding box (unrotated)
487
- epsX2, epsY2;
488
-
489
- GooString *embFontList; // resource comments for embedded fonts
490
-
491
- int processColors; // used process colors
492
- PSOutCustomColor // used custom colors
493
- *customColors;
494
-
495
- bool haveTextClip; // set if text has been drawn with a
496
- // clipping render mode
497
-
498
- bool inType3Char; // inside a Type 3 CharProc
499
- bool inUncoloredPattern; // inside a uncolored pattern (PaintType = 2)
500
- GooString *t3String; // Type 3 content string
501
- double t3WX, t3WY, // Type 3 character parameters
502
- t3LLX, t3LLY, t3URX, t3URY;
503
- bool t3FillColorOnly; // operators should only use the fill color
504
- bool t3Cacheable; // cleared if char is not cacheable
505
- bool t3NeedsRestore; // set if a 'q' operator was issued
506
- PSForceRasterize forceRasterize; // controls the rasterization of pages into images
507
- bool displayText; // displayText
508
- bool psCenter; // center pages on the paper
509
- bool psExpandSmaller = false; // expand smaller pages to fill paper
510
- bool psShrinkLarger = true; // shrink larger pages to fit paper
511
- bool overprintPreview = false; // enable overprint preview
512
- bool rasterAntialias; // antialias on rasterize
513
- bool uncompressPreloadedImages;
514
- double rasterResolution; // PostScript rasterization resolution (dpi)
515
- bool embedType1; // embed Type 1 fonts?
516
- bool embedTrueType; // embed TrueType fonts?
517
- bool embedCIDPostScript; // embed CID PostScript fonts?
518
- bool embedCIDTrueType; // embed CID TrueType fonts?
519
- bool fontPassthrough; // pass all fonts through as-is?
520
- bool optimizeColorSpace; // false to keep gray RGB images in their original color space
521
- // true to optimize gray images to DeviceGray color space
522
- bool passLevel1CustomColor; // false to convert all custom colors to CMYK
523
- // true to pass custom colors
524
- // has effect only when doing a level1sep
525
- bool preloadImagesForms; // preload PostScript images and forms into
526
- // memory
527
- bool generateOPI; // generate PostScript OPI comments?
528
- bool useASCIIHex; // use ASCIIHex instead of ASCII85?
529
- bool useBinary; // use binary instead of hex
530
- bool enableLZW; // enable LZW compression
531
- bool enableFlate; // enable Flate compression
532
-
533
- SplashColorMode processColorFormat;
534
- bool processColorFormatSpecified;
535
-
536
- std::unordered_set<std::string> iccEmitted; // contains ICCBased CSAs that have been emitted
537
-
538
- #ifdef OPI_SUPPORT
539
- int opi13Nest; // nesting level of OPI 1.3 objects
540
- int opi20Nest; // nesting level of OPI 2.0 objects
541
- #endif
542
-
543
- bool ok; // set up ok?
544
- std::set<int> patternsBeingTiled; // the patterns that are being tiled
545
-
546
- friend class WinPDFPrinter;
547
- };
548
-
549
- #endif
@@ -1,47 +0,0 @@
1
- //========================================================================
2
- //
3
- // PSTokenizer.h
4
- //
5
- // Copyright 2002-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 Scott Turner <scotty1024@mac.com>
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 PSTOKENIZER_H
24
- #define PSTOKENIZER_H
25
-
26
- //------------------------------------------------------------------------
27
-
28
- class PSTokenizer
29
- {
30
- public:
31
- PSTokenizer(int (*getCharFuncA)(void *), void *dataA);
32
- ~PSTokenizer();
33
-
34
- // Get the next PostScript token. Returns false at end-of-stream.
35
- bool getToken(char *buf, int size, int *length);
36
-
37
- private:
38
- int lookChar();
39
- void consumeChar();
40
- int getChar();
41
-
42
- int (*getCharFunc)(void *);
43
- void *data;
44
- int charBuf;
45
- };
46
-
47
- #endif