SetaPDF_Stamper_Stamp_XObject The XObject stamp class
File: /SetaPDF v2/Stamper/Stamp/XObject.php
A form XObject is a PDF content stream that is a self-contained description of any sequence of graphics objects (including path objects, text objects and sampled images).
This stamp class allows you to stamp separately form XObjects or image XObjects. A form XObject could include for example drawing operations:
// Create a form XObject with the dimensions of 100 x 100 $xObject = SetaPDF_Core_XObject_Form::create($document, array(0, 0, 100, 100)); $canvas = $xObject->getCanvas(); $canvas->path()->setLineWidth(1); $canvas->draw() ->rect(0, 0, 100, 100) // Draw a rectangle into the form XObject ->circle(50, 50, 50); // Draw a circle into the form XObject $stamp = new SetaPDF_Stamper_Stamp_XObject($xObject);
Ensures that all stamp resources are added to the page.
This is needed to reuse a cached stamp stream.
An array of resource names
Method which is called after the main stamp method is executed.
Put the action via an link annotation above the stamp object.
Writes the xobject draw operators of this stamp onto the canvas.
Try to stamp with the page with a cached content stream part.
True if the stamp was written by a cache object, a cache key if it was not found
Set the opacity and blend mode of the stamp object.
- $alpha : float
A value between 0 and 1, whereas 1 is defined as 100% opacity
- $blendMode : string
A blend mode defined in PDF 32000-1:2008 - 11.3.5, "Blend Mode"
Set the visibility of the stamp object.
This method controls the visibility of the stamp object on screen view and/or printer output.
- $visibility : null|string
Use the constants VISIBILITY_XXX or null(equal to VISIBILITY_ALL)
Stamp this stamp object onto a page.