PDFGeneratorImageDelegate

public protocol PDFGeneratorImageDelegate : AnyObject

Protocol used to delegate drawing of images

  • Called directly before a PDFImage is drawn into the graphics context

    As the image is a reference object, it is possible to read and manipulate the object before rendering.

    One use-case could be overlaying the image with a watermark, after it final frame is calculated.

    Declaration

    Swift

    func generator(willBeginDrawingImage image: PDFImage, with context: PDFContext, in frame: CGRect)