XML export tool finished

This commit is contained in:
Jakub Melka
2020-10-01 13:27:45 +02:00
parent a6163978bc
commit 7bded071ea
3 changed files with 60 additions and 10 deletions

View File

@ -152,7 +152,9 @@ void PDFToolAbstractApplication::initializeCommandLineParser(QCommandLineParser*
if (optionFlags.testFlag(XmlExport))
{
parser->addOption(QCommandLineOption("xml-export-streams", "Export streams as hexadecimally encoded data. By default, stream data are not exported."));
parser->addOption(QCommandLineOption("xml-export-streams-as-text", "Export streams as text, if possible. This flag enforces exporting stream data (possibly as hexadecimal strings)."));
parser->addOption(QCommandLineOption("xml-export-streams-as-text", "Export streams as text, if possible."));
parser->addOption(QCommandLineOption("xml-use-indent", "Use automatic indent when writing output xml file."));
parser->addOption(QCommandLineOption("xml-always-binary", "Do not try to attempt transform strings to text."));
}
}
@ -227,6 +229,14 @@ PDFToolOptions PDFToolAbstractApplication::getOptions(QCommandLineParser* parser
}
}
if (optionFlags.testFlag(XmlExport))
{
options.xmlExportStreams = parser->isSet("xml-export-streams");
options.xmlExportStreamsAsText = parser->isSet("xml-export-streams-as-text");
options.xmlUseIndent = parser->isSet("xml-use-indent");
options.xmlAlwaysBinaryStrings = parser->isSet("xml-always-binary");
}
return options;
}