public void Save(Stream stream, DocumentContainerViewModel document) { using var pdf = SKDocument.CreatePdf(stream, _targetDpi); foreach (var container in document.Pages) { Add(pdf, container); } pdf.Close(); _renderer.ClearCache(); }
/// <inheritdoc/> void IProjectExporter.Save(string path, IDocumentContainer document) { using (var stream = new SKFileWStream(path)) { using (var pdf = SKDocument.CreatePdf(stream, _targetDpi)) { foreach (var container in document.Pages) { Add(pdf, container); } pdf.Close(); _renderer.ClearCache(isZooming: false); } } }