How do I solve the error of "classes can only inherit from other classes" at "Inherits IDocumentReadyListener"? This is in VB.net using iText v7 api. I am trying to get the bytearray from the pdf splitter.
Class ByteArrayPdfSplitter
Inherits iText.Kernel.Utils.PdfSplitter
Private currentOutputStream As MemoryStream
Public Sub New(ByVal pdfDocument As iText.Kernel.Pdf.PdfDocument)
MyBase.New(pdfDocument)
End Sub
Protected Overrides Function GetNextPdfWriter(ByVal documentPageRange As iText.Kernel.Utils.PageRange) As iText.Kernel.Pdf.PdfWriter
currentOutputStream = New MemoryStream()
Return New iText.Kernel.Pdf.PdfWriter(currentOutputStream)
End Function
Public ReadOnly Property CurrentMemoryStream As MemoryStream
Get
Return currentOutputStream
End Get
End Property
Public Class DocumentReadyListender
Inherits IDocumentReadyListener
Private splitter As ByteArrayPdfSplitter
Public Sub New(ByVal splitter As ByteArrayPdfSplitter)
Me.splitter = splitter
End Sub
Public Sub DocumentReady(ByVal pdfDocument As iText.Kernel.Pdf.PdfDocument, ByVal pageRange As iText.Kernel.Utils.PageRange)
pdfDocument.Close()
Dim contents As Byte() = splitter.CurrentMemoryStream.ToArray()
Dim pageNumber As String = pageRange.ToString()
End Sub
End Class
End Class