GetPageFromPDF = " " Dim pdfDoc As New PDFLibNet.PDFWrapper Optional ByVal searchDir As SearchDirection = 0) As String Optional ByVal searchText As String = " ", _ Optional ByVal Password As String = " ", _ Optional ByVal DPI As Integer = RENDER_DPI, _
To place a PDF Viewer User Control on a web page:Ĭopy Code ' Modified for ASP usage Public Shared Function GetPageFromPDF( ByVal filename As String, _īyVal destPath As String, ByRef PageNumber As Integer, _ This project consists of 3 DLLs that must all be in the same directory: If x86 is used, you must set the advanced settings of the AppPool to allow execution of 32-bit applications if you are on a 64-bit OS.PDFLibNet.dll and PDFLibCmdLine.exe must both be compiled with the same architecture (x86 or 圆4).You might have to register it with the GAC depending on your operating system to make it available to the application. The DLL PDFLibNet.dll must be available to the page.You must give the ASPNET user (IISUSR or ASPNET or Network services user) permission to Read & Execute the /bin diirectory.You must give the ASPNET user (IISUSR or ASPNET or Network services user) permission to modify (read/write) the /PDF and /render directories.Using the Code ASP Server Configuration Requirements PDFViewer.ascx (contains client side HTML/JavaScript for the PDF Viewer User Control).(contains code behind for the PDF Viewer User Control).ASPPDFLib.vb (contains generic wrapper functions that call specific technologies).ImageUtil.vb (contains methods for image manipulation such as resize, rotation, conversion, etc.).AFPDFLibUtil.vb (contains methods to create Bookmark HTML, Search, get page count, convert PDF to PNG).Several utility classes were created or added from others which expose functionality needed from the various helper libraries. Display the PNG file in an image on a web page.Convert the current page to be viewed into a PNG file.
Convert the PDF document (specific page on demand) to a raster image format (PdfLibNet - XPDF).Get a page count of the PDF document that needs to be viewed to define your page number boundaries (PdfLibNet - XPDF).
This article discusses how to create an ASP.NET PDF Viewer User Control that is not dependent on Acrobat software being installed.