I need to supply pages of a loaded pdf document to a stream for working with it in another component.
It's important that this stream contains the pdf data and not some kind of image format.
So far I have found out only one solution for this requirement:
Code: Select all
Public Sub SetPreview(ByVal page As PDFSplitterDocumentPage)
m_gdPicture.PdfReaderSelectPage(page.FileID, page.PageNumber)
Dim pdfSample As Integer = m_gdPicture.PdfReaderRenderPageToGdPictureImage(page.FileID, 200, False)
Dim readStream as MemoryStream = New MemoryStream()
m_gdPicture.SaveAsPDFStream(pdfSample , readStream, False, "", "", "", "", "")
'Further handling...
End Sub
Is there a possiblity to reach a faster loading?
Thanks and best regards!
Tobias Herold