Hi,
Adding text to an existing PDF file and creating new PDF file are very much the same. So you can use any interface that you use to create new PDF file to add text to existing PDF file. The key is you need to supply the existing file/page. For example, the following code create a new PDF file:
Code: C#
//Create a new PdfDocument
PdfDocument doc = new PdfDocument();
//Output "test" to it
HtmlToPdf.ConvertHtml("test", doc);
The following code do the same on an existing file:
Code: C#
//Open an existing PDF file
PdfDocument doc = new PdfDocument("your_existing_file.pdf");
//Output "test" to it --- Note that this line is the same
HtmlToPdf.ConvertHtml("test", doc);
Note that the difference is on the first line, not on the second line. All options that applies to the new document applies to existing document as well. For example, to set page margins, you would set HtmlToPdf.Options.OutputArea.
While almost all options work the same way for new document and existing document, some options matters more to one scenario than other. For example, HtmlToPdf.Options.StartPageIndex may matter more and used much more often for an existing document than a new document.
The PDF creator interface always works with both new PDF document and existing PDF document in very similar way ---- the main difference is the document you supplied.
Hope this helps. Please feel free to let us know if you still have any more question.
Thanks!