createTemplate method

PdfTemplate createTemplate()

Creates a template from the page content.

//Loads an existing PDF document and create the template
PdfTemplate template =
    PdfDocument(inputBytes: File('input.pdf').readAsBytesSync())
//Create a new PDF documentation
PdfDocument document = PdfDocument();
//Sets the page settings margin
//Create a new PDF page
PdfPage page = document.pages.add();
//Draw the Pdf template by using created template
    template, Offset(20, 0), Size(page.size.width / 2, page.size.height));
//Save the document.
List<int> bytes = await;
//Dispose the document.


PdfTemplate createTemplate() {
  return _helper._getContent();