#if NETFRAMEWORK using System.IO; #endif namespace EnvelopeGenerator.PdfEditor { public static class Extensions { /// /// Writes the stream contents to a byte array, regardless of the System.IO.MemoryStream.Position property. /// /// /// /// A new byte array public static byte[] ToBytes(this TPdf pdf) where TPdf : Pdf => pdf.OutputStream.ToArray(); } }