aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2018-06-21 20:03:45 +0200
committerJay Berkenbilt <ejb@ql.org>2018-06-21 21:57:13 +0200
commit952a665a4ed51400b5925e7cd69f08f0aeb374fe (patch)
tree080fef42cc7978c01e88a854ce9b96fb1b1916c0 /include
parente44c395c51518bafbf8f8466ea5a0f4b1f2b2efe (diff)
downloadqpdf-952a665a4ed51400b5925e7cd69f08f0aeb374fe.tar.zst
Better support for creating Unicode strings
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDFObjectHandle.hh10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index 967e786c..868b5c07 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -344,6 +344,12 @@ class QPDFObjectHandle
static QPDFObjectHandle newName(std::string const& name);
QPDF_DLL
static QPDFObjectHandle newString(std::string const& str);
+ // Create a string encoded in UTF-16 from the given utf8-encoded
+ // string. Such strings are appropriately encoded to appear in PDF
+ // files outside of content streams, such as in document metadata
+ // form field values, page labels, outlines, and similar locations.
+ QPDF_DLL
+ static QPDFObjectHandle newUnicodeString(std::string const& utf8_str);
QPDF_DLL
static QPDFObjectHandle newOperator(std::string const&);
QPDF_DLL
@@ -715,6 +721,10 @@ class QPDFObjectHandle
std::string unparse();
QPDF_DLL
std::string unparseResolved();
+ // For strings only, force binary representation. Otherwise, same
+ // as unparse.
+ QPDF_DLL
+ std::string unparseBinary();
// Legacy helper methods for commonly performed operations on
// pages. Newer code should use QPDFPageObjectHelper instead. The