Fix xref table - wrong total number of objects.

Update pdfioContentDrawImage to take x/y offsets and sizes.
This commit is contained in:
Michael R Sweet
2021-05-28 22:05:44 -04:00
parent fb853dadda
commit 94cb915885
5 changed files with 86 additions and 23 deletions

View File

@ -38,11 +38,26 @@ pdfioObjClose(pdfio_obj_t *obj) // I - Object
// Write what remains for the object...
if (!obj->offset)
return (write_obj_header(obj)); // Just write the object value
{
// Write the object value
if (!write_obj_header(obj))
return (false);
}
else if (obj->stream)
return (pdfioStreamClose(obj->stream));
{
// Close the stream...
if (!pdfioStreamClose(obj->stream))
return (false);
}
else
return (true); // Already closed
{
// Already closed
return (true);
}
// If we get here we wrote the object header or closed the stream and still
// need to write the "endobj" line...
return (_pdfioFilePuts(obj->pdf, "endobj\n"));
}