Issue #78: Errror decompressing stream

This commit is contained in:
Jakub Melka 2023-08-06 16:04:11 +02:00
parent 67a84bfc3c
commit c9d528a075
2 changed files with 1 additions and 4 deletions

View File

@ -428,7 +428,7 @@ bool PDFOptimizer::performRecompressFlateStreams()
return;
}
const PDFStreamFilter* streamFilter = streamFilters.filterObjects.front();
const PDFStreamFilter* streamFilter = streamFilters.filterObjects.back();
if (dynamic_cast<const PDFFlateDecodeFilter*>(streamFilter))
{
// Try to recompress. If we end with less data, then we use recompressed stream

View File

@ -669,9 +669,6 @@ PDFStreamFilterStorage::StreamFilters PDFStreamFilterStorage::getStreamFilters(c
}
result.filterParameterObjects.resize(result.filterObjects.size());
std::reverse(result.filterObjects.begin(), result.filterObjects.end());
std::reverse(result.filterParameterObjects.begin(), result.filterParameterObjects.end());
return result;
}