public static string AsBase64(this IPdfPage target) { if (target == null) { return(null); } var bytes = target.AsBytes(); return(Convert.ToBase64String(bytes)); }
public static byte[] AsBytes(this IPdfPage target) { if (target == null) { return(null); } using (var stream = new MemoryStream()) { target.Save(stream); return(stream.ToArray()); } }
public static async Task <byte[]> AsBytesAsync(this IPdfPage target) { if (target == null) { return(null); } using (var stream = new MemoryStream()) { await target.SaveAsync(stream); return(stream.ToArray()); } }
public static Stream AsStream(this IPdfPage target) { if (target == null) { return(null); } var stream = new MemoryStream(); target.Save(stream); stream.Position = 0; return(stream); }
public IPdfDest CreateDest(IPdfPage Page, object Param = null) { throw new NotImplementedException(); }