Skip to content

ChristophKn/EasyPdfWriter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EasyPdfWriter

A wrapper around the ITextSharp library

Usage

var pdfValues = new 
                  {
                    Date = DateTime.Now.ToString(),
                    Name = "Karl",
                    Information = "Information-Text"
                    
                    //// Supports nested fields eg. Tables in a pdf document.
                    TableName = new[] 
                                    {
                                      new
                                      {
                                        RowName = new[]
                                        {
                                          new
                                          {
                                            FirstCell = "FirstCell",
                                            SecondCell = "SecondCell"
                                          }
                                        }
                                      }
                                    }
                  };

Creating an anonymous object with the pdf-fieldnames as the property names.

Usage with wrapper

var pdfToFillBytes = File.ReadAllBytes("PathToYourPdf");

PdfWriterWrapper pdfWriter = new PdfWriterWrapper();
var filledPdfBytes = pdfWriter.FillPdf(pdfToFillBytes, pdfValues);

Usage with extensions

var pdfToFillBytes = File.ReadAllBytes("PathToYourPdf");
var filledPdfBytes = pdfValues.ToPdf(pdfToFillBytes);

About

A wrapper around the ITextSharp library

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages