/// <summary> /// Converts the sequence to a PDF content stream. /// </summary> public byte[] ToContent() { Stream stream = new MemoryStream(); ContentWriter writer = new ContentWriter(stream); WriteObject(writer); writer.Close(false); stream.Position = 0; int count = (int)stream.Length; byte[] bytes = new byte[count]; stream.Read(bytes, 0, count); stream.Dispose(); return(bytes); }
/// <summary> /// Converts the sequence to a PDF conent stream. /// </summary> public byte[] ToContent() { Stream stream = new MemoryStream(); ContentWriter writer = new ContentWriter(stream); WriteObject(writer); writer.Close(false); stream.Position = 0; int count = (int)stream.Length; byte[] bytes = new byte[count]; stream.Read(bytes, 0, count); stream.Close(); return bytes; }