OEWriteReportToString¶
std::string OEWriteReportToString(const std::string &ext,
const OEReport &report, unsigned int page=0)
Writes the report into a string.
- ext
The extension which determine the type of the image.
- report
The OEReport object of which page(s) is/are being written into the string.
- pageidx
This value has to be in the range from 0 to
OEReport::NumPages()
.
Note
If \(pageidx\) is a valid page number i.e in the range from 1 to
OEReport::NumPages()
,
then only the \(pageidx^{th}\) page of the report is written into the
string.
If \(pageidx\) is zero and the file extension is recognized as a multi-page
format, than all pages of the report are written into the string.
Example:
OEGraphMol mol;
OESmilesToMol(mol, "c1ccccc1");
OEPrepareDepiction(mol);
OEReport report(3, 1);
OERenderMolecule(*report.NewCell(), mol);
const std::string data = OEWriteReportToString("pdf", report);
See also
OEIsRegisteredMultiPageImageFile
function