Instruction set reference
HIPE_OP_TAKE_SNAPSHOT
This instruction is used to generate either a vector (PDF or SVG) or raster (PNG) screenshot of the frame managed by the calling client. For example, a framing manager might include an event binding which responds to the Print Screen key by calling this instruction.
The snapshot captures the frame exactly as it appears on screen — at its full content size, as a single page, in screen media (so, for instance, drop shadows and screen-only stylesheet rules are preserved). In the PDF output, graphical elements can be zoomed without loss of clarity and text is embedded as selectable text rather than outlines.
The resulting screenshot data is not written to a file on disk. Instead, the image file data is streamed back to the calling client process, which can then write this to a file on disk as needed.
For security reasons, a client process cannot obtain screenshot data outside the frame it manages. Therefore, to obtain a screenshot of the entire screen, the framing manager that manages the entire screen would need to make the call.
- location: not used. The whole frame is captured.
- arg[0]: The required image format: "pdf" or "svg" for a vector screenshot, or "png" for a raster screenshot. Any other value is ignored.
Notes
The "svg" format has one known limitation: an element that has both a CSS gradient background and a plain border (one without rounded corners) loses its gradient in the output, and is drawn with no background. A gradient with no border, or with rounded corners and no border, is not affected, and nor are the "pdf" and "png" formats.
The image data will be sent back to your client application as a HIPE_OP_FILE_RETURN instruction.
