The AddToBody
methods in PdfWriter and derived classes appear to be gone in iText7. I would have expected that functionality to have been migrated to the PdfDocument class, but it was not clear to me if that class or the underlying writer had anything similar. I'm trying to add a key/value pair to a dictionary where the value is an indirect reference to a PdfStream
. My itext 5 code looked something like this:
dict.Put(new PdfName("IndexerReportNames"), writer.AddToBody(new PdfStream(GetReportNames(reports))).IndirectReference);
The question is, how do I port this, and similar code to iText7?