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();
 }
Esempio n. 2
0
        /// <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);
                }
            }
        }