aboutsummaryrefslogtreecommitdiffstats
path: root/include/qpdf/Pl_Buffer.hh
diff options
context:
space:
mode:
Diffstat (limited to 'include/qpdf/Pl_Buffer.hh')
-rw-r--r--include/qpdf/Pl_Buffer.hh8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/qpdf/Pl_Buffer.hh b/include/qpdf/Pl_Buffer.hh
index 5030e10e..5def8b4f 100644
--- a/include/qpdf/Pl_Buffer.hh
+++ b/include/qpdf/Pl_Buffer.hh
@@ -33,7 +33,7 @@
#include <qpdf/PointerHolder.hh> // unused -- remove in qpdf 12 (see #785)
#include <memory>
-#include <vector>
+#include <string>
class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
{
@@ -64,6 +64,10 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
QPDF_DLL
void getMallocBuffer(unsigned char** buf, size_t* len);
+ // Same as getBuffer but returns the result as a string.
+ QPDF_DLL
+ std::string getString();
+
private:
class QPDF_DLL_PRIVATE Members
{
@@ -78,7 +82,7 @@ class QPDF_DLL_CLASS Pl_Buffer: public Pipeline
Members(Members const&) = delete;
bool ready{true};
- std::vector<unsigned char> data;
+ std::string data;
};
std::shared_ptr<Members> m;