Posted on: 4/8/2014 9:47:08 PM | Views : 426

I have an asp.net public function that creates a MemoryStream from multiple PDF files.  I would like to search the stream and do a replace of text found in the stream before I write it out to the browser.  Is this possible?  I have included the code I use to build the stream below.  Thanks.
Public Shared Sub MergePDFs(ByVal files() As String, ByVal filename As String) Dim MemStream As New System.IO.MemoryStream Dim doc As New iTextSharp.text.Document Dim reader As iTextSharp.text.pdf.PdfReader Dim numberOfPages As Integer Dim currentPageNumber As Integer Dim writer As iTextSharp.text.pdf.PdfWriter = iTextSharp.text.pdf.PdfWriter.GetInstance(doc, MemStream) doc.Open() Dim cb As iTextSharp.text.pdf.PdfContentByte = writer.DirectContent Dim page As iTextSharp.text.pdf.PdfImportedPage For i As Int32 = 0 To files.Length - 1 ...

Go to the complete details ...