//// This code is part of Document Solutions for PDF .NET demos.// Copyright (c) MESCIUS inc. All rights reserved.//usingSystem.IO;usingSystem.Drawing;usingGrapeCity.Documents.Pdf;usingGrapeCity.Documents.Svg;usingGCTEXT = GrapeCity.Documents.Text;usingGCDRAW = GrapeCity.Documents.Drawing;usingDsPdfWeb.Demos.Common; namespaceDsPdfWeb.Demos{// This sample shows how to render an SVGZ (compressed SVG) image. // The SVG art used in this sample is from freesvg.org.publicclassRenderSvgz {publicintCreatePDF(Stream stream) {var svgPath = Path.Combine("Resources", "SvgMisc", "Smiling-Girl.svgz");usingvar svg = GcSvgDocument.FromSvgz(File.ReadAllBytes(svgPath)); // Render the image and a border around it:var doc = newGcPdfDocument();var g = doc.NewPage().Graphics;var pt = newPointF(72, 72); g.DrawSvg(svg, pt);var sz = svg.GetIntrinsicSize(SvgLengthUnits.Points); g.DrawRectangle(newRectangleF(pt, sz), Color.MediumPurple); // Done: doc.Save(stream);return doc.Pages.Count; } }}