Package com.itextpdf.svg.xobject
Class SvgImageXObject
java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfStream>
com.itextpdf.kernel.pdf.xobject.PdfXObject
com.itextpdf.kernel.pdf.xobject.PdfFormXObject
com.itextpdf.svg.xobject.SvgImageXObject
A wrapper for Form XObject for SVG images.
-
Field Summary
Fields inherited from class com.itextpdf.kernel.pdf.xobject.PdfFormXObject
resources
-
Constructor Summary
ConstructorDescriptionSvgImageXObject
(Rectangle bBox, ISvgProcessorResult result, ResourceResolver resourceResolver) Creates a new instance of Form XObject for the SVG image. -
Method Summary
Modifier and TypeMethodDescriptionvoid
generate
(PdfDocument document) Processes xObject before first image generation to avoid drawing it twice or more.Returns resource resolver for the SVG image.Returns processor result containing the SVG information.Methods inherited from class com.itextpdf.kernel.pdf.xobject.PdfFormXObject
calculateBBoxMultipliedByMatrix, flush, getBBox, getHeight, getMarkStyle, getProcessColorModel, getResources, getSeparationColorNames, getTrapRegions, getTrapStyles, getWidth, put, setBBox, setGroup, setMarkStyle, setProcessColorModel, setSeparationColorNames, setTrapRegions, setTrapStyles
Methods inherited from class com.itextpdf.kernel.pdf.xobject.PdfXObject
addAssociatedFile, calculateProportionallyFitRectangleWithHeight, calculateProportionallyFitRectangleWithWidth, getAssociatedFiles, isWrappedObjectMustBeIndirect, makeXObject, setLayer
Methods inherited from class com.itextpdf.kernel.pdf.PdfObjectWrapper
ensureObjectIsAddedToDocument, ensureUnderlyingObjectHasIndirectReference, getPdfObject, isFlushed, makeIndirect, makeIndirect, markObjectAsIndirect, setForbidRelease, setModified, setPdfObject, unsetForbidRelease
-
Constructor Details
-
SvgImageXObject
public SvgImageXObject(Rectangle bBox, ISvgProcessorResult result, ResourceResolver resourceResolver) Creates a new instance of Form XObject for the SVG image.- Parameters:
-
bBox
- the form XObject’s bounding box. -
result
- processor result containing the SVG information. -
resourceResolver
-ResourceResolver
for the SVG image.
-
-
Method Details
-
getResult
Returns processor result containing the SVG information.- Returns:
- {ISvgProcessorResult} processor result.
-
getResourceResolver
Returns resource resolver for the SVG image.- Returns:
-
ResourceResolver
instance
-
generate
Processes xObject before first image generation to avoid drawing it twice or more. It allows to reuse the same Form XObject multiple times.- Parameters:
-
document
- pdf that shall contain the SVG image.
-