-
What is the current behavior?
PdfMetadata::GetKeywords returns a different list of keywords than the one set by PdfMetadata::SetKeywords.
-
What is the expected behavior?
It should return the same list.
-
Please provide the steps to reproduce and if possible a minimal reproduction code of the problem
- Create a document
- Set a list of keywords on the metadata object
- Get the list of keywords back and compare. Separator characters will have bled into list items.
auto doc = new PoDoFo::PdfMemDocument();
std::vector<std::string> keywords = {"one", "two", "three"};
doc->GetMetadata().SetKeywords(keywords);
if(keywords != doc->GetMetadata().GetKeywords()) {
throw std::runtime_error("Keyword mismatch. " + std::string(doc->GetMetadata().GetKeywordsRaw()->GetString()));
};
The keyword parser implementation at https://github.com/podofo/podofo/blob/master/src/podofo/private/PdfDeclarationsPrivate.cpp#L294 looks like it consumes the separator \r\n incorrectly.
What is the current behavior?
PdfMetadata::GetKeywordsreturns a different list of keywords than the one set byPdfMetadata::SetKeywords.What is the expected behavior?
It should return the same list.
Please provide the steps to reproduce and if possible a minimal reproduction code of the problem
Please tell us about your environment:
Other information
The keyword parser implementation at https://github.com/podofo/podofo/blob/master/src/podofo/private/PdfDeclarationsPrivate.cpp#L294 looks like it consumes the separator
\r\nincorrectly.