mirror of
https://github.com/JakubMelka/PDF4QT.git
synced 2025-06-05 21:59:17 +02:00
Finishing of text extracting tool
This commit is contained in:
@ -204,7 +204,18 @@ void PDFToolAbstractApplication::initializeCommandLineParser(QCommandLineParser*
|
||||
|
||||
if (optionFlags.testFlag(TextAnalysis))
|
||||
{
|
||||
parser->addOption(QCommandLineOption("text-analysis-alg", "Text analysis algorithm (auto - select automatically, layout - perform automatic layout algorithm, content - simple content stream reading order, structure - use tagged document structure", "algorithm", "auto"));
|
||||
parser->addOption(QCommandLineOption("text-analysis-alg", "Text analysis algorithm (auto - select automatically, layout - perform automatic layout algorithm, content - simple content stream reading order, structure - use tagged document structure).", "algorithm", "auto"));
|
||||
}
|
||||
|
||||
if (optionFlags.testFlag(TextShow))
|
||||
{
|
||||
parser->addOption(QCommandLineOption("text-show-page-numbers", "Show page numbers in extracted text."));
|
||||
parser->addOption(QCommandLineOption("text-show-struct-title", "Show title extracted from structure tree."));
|
||||
parser->addOption(QCommandLineOption("text-show-struct-lang", "Show language extracted from structure tree."));
|
||||
parser->addOption(QCommandLineOption("text-show-struct-alt-desc", "Show alternative description extracted from structure tree."));
|
||||
parser->addOption(QCommandLineOption("text-show-struct-expanded-form", "Show expanded form extracted from structure tree."));
|
||||
parser->addOption(QCommandLineOption("text-show-struct-act-text", "Show actual text extracted from structure tree."));
|
||||
parser->addOption(QCommandLineOption("text-show-phoneme", "Show phoneme extracted from structure tree."));
|
||||
}
|
||||
}
|
||||
|
||||
@ -338,6 +349,17 @@ PDFToolOptions PDFToolAbstractApplication::getOptions(QCommandLineParser* parser
|
||||
}
|
||||
}
|
||||
|
||||
if (optionFlags.testFlag(TextShow))
|
||||
{
|
||||
options.textShowPageNumbers = parser->isSet("text-show-page-numbers");
|
||||
options.textShowStructTitles = parser->isSet("text-show-struct-title");
|
||||
options.textShowStructLanguage = parser->isSet("text-show-struct-lang");
|
||||
options.textShowStructAlternativeDescription = parser->isSet("text-show-struct-alt-desc");
|
||||
options.textShowStructExpandedForm = parser->isSet("text-show-struct-expanded-form");
|
||||
options.textShowStructActualText = parser->isSet("text-show-struct-act-text");
|
||||
options.textShowStructPhoneme = parser->isSet("text-show-phoneme");
|
||||
}
|
||||
|
||||
return options;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user