Public Class pdf_portfolio
    Inherits System.Web.UI.Page

    Protected Sub BtnCreatePdf_Click(sender As Object, e As EventArgs)
        ' the test files
        Dim filePdf As String = Server.MapPath("~/files/doc.pdf")
        Dim fileHtml As String = Server.MapPath("~/files/document.html")
        Dim fileImage As String = Server.MapPath("~/files/logo.png")

        ' instantiate the pdf portfolio manager
        Dim portfolio As New PdfPortfolioManager()

        ' add files to the portfolio
        Dim pdfFilePdf As New PdfPortfolioFile(filePdf)
        pdfFilePdf.Description = "PDF document"
        portfolio.Files.Add(pdfFilePdf)

        Dim pdfFileHtml As New PdfPortfolioFile(fileHtml)
        pdfFileHtml.Description = "HTML document"
        portfolio.Files.Add(pdfFileHtml)

        Dim pdfFileImage As New PdfPortfolioFile(fileImage)
        pdfFileImage.Description = "Image file"
        portfolio.Files.Add(pdfFileImage)

        ' set view mode
        portfolio.ViewMode = PdfPortfolioViewMode.Details

        ' set startup file
        portfolio.StartupFileName = "logo.png"

        ' save pdf document
        portfolio.Save(Response, False, "Sample.pdf")

        ' close pdf document
        portfolio.Close()

    End Sub

End Class