mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-08 22: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 << >> >>"));
|
QPDFObjectHandle::parse("<< /XObject << >> >>"));
|
||||||
InlineImageTracker iit(this->oh.getOwningQPDF(), min_size, resources);
|
InlineImageTracker iit(this->oh.getOwningQPDF(), min_size, resources);
|
||||||
Pl_Buffer b("new page content");
|
Pl_Buffer b("new page content");
|
||||||
filterContents(&iit, &b);
|
bool filtered = false;
|
||||||
if (iit.any_images)
|
try
|
||||||
|
{
|
||||||
|
filterContents(&iit, &b);
|
||||||
|
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())
|
if (this->oh.isFormXObject())
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user