2
1
mirror of https://github.com/qpdf/qpdf.git synced 2024-12-22 02:49:00 +00:00

Add QPDFObjGen::unparse

This commit is contained in:
Jay Berkenbilt 2021-02-21 16:09:16 -05:00
parent 7540d2082a
commit a76decd2d5
3 changed files with 12 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2021-02-21 Jay Berkenbilt <ejb@ql.org>
* Add QPDFObjGen::unparse()
* Add QPDFObjectHandle::copyStream() for making a copy of a stream
within the same QPDF instance.

View File

@ -43,6 +43,8 @@ class QPDFObjGen
int getObj() const;
QPDF_DLL
int getGen() const;
QPDF_DLL
std::string unparse() const;
QPDF_DLL
friend std::ostream& operator<<(std::ostream&, const QPDFObjGen&);

View File

@ -1,4 +1,5 @@
#include <qpdf/QPDFObjGen.hh>
#include <qpdf/QUtil.hh>
QPDFObjGen::QPDFObjGen() :
obj(0),
@ -42,3 +43,10 @@ std::ostream& operator<<(std::ostream& os, const QPDFObjGen& og)
os << og.obj << "," << og.gen;
return os;
}
std::string
QPDFObjGen::unparse() const
{
return QUtil::int_to_string(this->obj) + "," +
QUtil::int_to_string(this->gen);
}