alias ProcessPdfImageContentCallback
When a page from a PDF file is embedded its page stream as well as related objects are copied to the target file. However, it can be that the page stream has operators that assume additional resources, for instance marked text. You can decide to filter that for which LuaTeX provides a callback. Here is a simple demonstration of use:
pdf.setrecompress(1)
callback.register("process_pdf_image_content",function(s)
print(s)
return s
end)
You need to explicitly enable recompression because otherwise the content stream gets just passed on in its original compressed form.
Reference:
- Corresponding C source code: pdftoepdf.c#L440
😱 Types incomplete or incorrect? 🙏 Please contribute!