mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 19:08:59 +00:00
In QPDFWriter::willFilterStream remember unfilterable streams
This commit is contained in:
parent
2bb9e06d1e
commit
634d924986
@ -1236,8 +1236,8 @@ QPDFWriter::writeTrailer(
|
|||||||
bool
|
bool
|
||||||
QPDFWriter::willFilterStream(
|
QPDFWriter::willFilterStream(
|
||||||
QPDFObjectHandle stream,
|
QPDFObjectHandle stream,
|
||||||
bool& compress_stream,
|
bool& compress_stream, // out only
|
||||||
bool& is_metadata,
|
bool& is_metadata, // out only
|
||||||
std::shared_ptr<Buffer>* stream_data)
|
std::shared_ptr<Buffer>* stream_data)
|
||||||
{
|
{
|
||||||
compress_stream = false;
|
compress_stream = false;
|
||||||
@ -1299,9 +1299,10 @@ QPDFWriter::willFilterStream(
|
|||||||
throw std::runtime_error(
|
throw std::runtime_error(
|
||||||
"error while getting stream data for " + stream.unparse() + ": " + e.what());
|
"error while getting stream data for " + stream.unparse() + ": " + e.what());
|
||||||
}
|
}
|
||||||
if (filter && (!filtered)) {
|
if (filter && !filtered) {
|
||||||
// Try again
|
// Try again
|
||||||
filter = false;
|
filter = false;
|
||||||
|
stream.setFilterOnWrite(false);
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user