Link Search Menu Expand Document

Reduce Memory Usage During PDF to HTML Conversion - VB.NET

PDF To HTML SDK sample in VB.NET demonstrating ‘Reduce Memory Usage During PDF to HTML Conversion’

Imports Bytescout.PDF2HTML

Class Program
    Friend Shared Sub Main(args As String())

        ' When processing huge PDF documents you may run into OutOfMemoryException.
        ' This example demonstrates a way to spare the memory by disabling page data caching.

        ' Create Bytescout.PDF2HTML.HTMLExtractor instance
        Using extractor As New HTMLExtractor("demo", "demo")

                ' Load sample PDF document

                ' Disable page data caching, so processed pages will be disposed automatically
                extractor.PageDataCaching = PageDataCaching.None

                ' Save result to file

            Catch exception As PDF2HTMLException
            End Try

        End Using

        ' Open the output file in default associated application

    End Sub
End Class

Download Source Code (.zip)

Return to the previous page Explore PDF To HTML SDK