Flags

Details

class Rsvg.HandleFlags(value)

Bases: GObject.GFlags

Configuration flags for an [class`Rsvg`.Handle]. Note that not all of [class`Rsvg`.Handle]’s constructors let you specify flags. For this reason, [ctor`Rsvg`.Handle.new_from_gfile_sync] and [ctor`Rsvg`.Handle.new_from_stream_sync] are the preferred ways to create a handle.

New in version 2.40.3.

FLAGS_NONE = 0

No flags are set.

FLAG_UNLIMITED = 1

Disable safety limits in the XML parser. Libxml2 has several limits designed to keep malicious XML content from consuming too much memory while parsing. For security reasons, this should only be used for trusted input!

New in version 2.40.3.

FLAG_KEEP_IMAGE_DATA = 2

Use this if the Cairo surface to which you are rendering is a PDF, PostScript, SVG, or Win32 Printing surface. This will make librsvg and Cairo use the original, compressed data for images in the final output, instead of passing uncompressed images. For example, this will make the a resulting PDF file smaller and faster. Please see the Cairo documentation for details.