Ejemplo 1: flujo de salida de itext7 pdfwriter c #
public byte[] CreatePdf()
{
var stream = new MemoryStream();
var writer = new PdfWriter(stream);
var pdf = new PdfDocument(writer);
var document = new Document(pdf);
document.Add(new Paragraph("Hello world!"));
document.Close();
return stream.ToArray();
}
Ejemplo 2: itext7 c # memorystream
public byte[] GeneratePdf()
{
var stream = new MemoryStream();
var writer = new PdfWriter(stream);
var pdf = new PdfDocument(writer);
var document = new Document(pdf);
document.Add(new Paragraph("Lorem Ipsum ..."));
document.Close();
return stream.ToArray();
}
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)