mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-02 11:58:25 +00:00
Recover from exceptions during filtering for inline images
This commit is contained in:
parent
4ae93a73c5
commit
178f995fc2
@ -501,8 +501,20 @@ QPDFPageObjectHelper::externalizeInlineImages(size_t min_size, bool shallow)
|
||||
QPDFObjectHandle::parse("<< /XObject << >> >>"));
|
||||
InlineImageTracker iit(this->oh.getOwningQPDF(), min_size, resources);
|
||||
Pl_Buffer b("new page content");
|
||||
bool filtered = false;
|
||||
try
|
||||
{
|
||||
filterContents(&iit, &b);
|
||||
if (iit.any_images)
|
||||
filtered = true;
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
this->oh.warnIfPossible(
|
||||
std::string("Unable to filter content stream: ") + e.what() +
|
||||
"; not attempting to externalize inline images"
|
||||
" from this stream");
|
||||
}
|
||||
if (filtered && iit.any_images)
|
||||
{
|
||||
if (this->oh.isFormXObject())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user