diff options
Diffstat (limited to 'qpdf/pdf_from_scratch.cc')
-rw-r--r-- | qpdf/pdf_from_scratch.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/qpdf/pdf_from_scratch.cc b/qpdf/pdf_from_scratch.cc index 2d7d8a3d..2f853c24 100644 --- a/qpdf/pdf_from_scratch.cc +++ b/qpdf/pdf_from_scratch.cc @@ -21,10 +21,7 @@ void usage() static QPDFObjectHandle createPageContents(QPDF& pdf, std::string const& text) { std::string contents = "BT /F1 15 Tf 72 720 Td (" + text + ") Tj ET\n"; - PointerHolder<Buffer> b = new Buffer(contents.length()); - unsigned char* bp = b->getBuffer(); - memcpy(bp, (char*)contents.c_str(), contents.length()); - return QPDFObjectHandle::newStream(&pdf, b); + return QPDFObjectHandle::newStream(&pdf, contents); } QPDFObjectHandle newName(std::string const& name) |