Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

itext7 pdfwriter outputstream 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();
    }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pdfwriter #outputstream
ADD COMMENT
Topic
Name
2+4 =