Guide for VB.NET
Document File Operation
Core Document Formats
Additional Features

VB.NET Imaging - Web Doc File Operation Guide

How to Operate and Process Document File on Web Application in VB.NET

Home > .NET Imaging SDK > VB.NET > HTML5 Viewer Document File Operation
To get started with DocImage SDK for .NET, you are supposed to read VB.NET Imaging: Get Started first!

VB.NET Web Document File Operation Overview
Using RasterEdge .NET Imaging SDK and its Web Document Viewer control library, developers can easily build VB.NET web based document file viewing and operating application in your system. Users will be able to freely handle and manage your documents in your VB.NET web project in various ways with user friendly interface designed by RasterEdge.
This VB.NET web document file operator is developed by RasterEdge imaging team, providing you with easier access to your web files and better control over your docs, and thus offering you brand new experience for file processing and editing. Built for .NET development environment, this VB.NET web viewer component toolkit can be integrated into Microsoft Visual Studio easily, with perfect compatibility for various projects such as ASP.NET web form application.
With this powerful web document viewer installed, VB.NET users can freely handle many commonly used file types, such as PDF, multi-page TIFF, and other image formats like Png, Jpeg, Gif, Bmp and SVG. Also, it is easy to upload the selected document to server, load & open files, save files from your web browser, print documents and download document files within VB.NET web doc image viewer.
This page is a guide to help you get started with simple document file operation and processing in VB.NET programming application. Listed here are the functions that will be demonstrated:
  • How to upload a document file with our VB.NET web viewer control
  • How to open a document file in VB.NET using this web document viewer
  • How to print a document file in Visual Basic .NET web viewing project
  • How to save a document file in web viewer within VB.NET application
  • How to download a document file directly from web document viewer
RasterEdge document file web viewer also provides many other file processing features, such as annotating VB project document files online so you can add many shapes, like polygons, lines & texts, into a file as annotations. You can also learn how to zoom file in VB.NET web viewer, how to process files online and also how to create a VB.NET document web viewer.
How to Upload Doc File with VB.NET Web Viewer
JavaScrip API AjaxFileUpload, provided by our VB.NET Web Doc & Image Viewer, can be used to upload the chosen document to RasterEdge_Cache folder of server and display this document.
How to Open Document File in VB.NET Web Viewer
When you have successfully integrated this web viewer into your Visual Basic .NET imaging project, you can now easily load and open document files with simply a few button clicks, as long as the file type is supported by RasterEdge Web Document Viewer library. These file formats include the common image and document formats such as JPEG, PNG, GIF, TIFF, BMP and PDF. Our Web Doc Viewer for VB.NET provides developers with JavaScript API for opening file, which is called OpenFile. VB.NET demo codes for customizing document file opening are offered below and three methods are demonstrated.
' load the file initial displayed in the area
Me.REWebViewer1.LoadFile("/RasterEdge_Demo_Docs/Sample.pdf", Me.SessionId)

' load the selected file in the server file folder
Me.REWebViewer1.LoadFile(fileName, Me.SessionId)

'load the file just uploaded to the RasterEdge_Cache folder in the server
Dim filename__1 As String = "/RasterEdge_Cache/" & uploadFile
Me.REWebViewer1.LoadFile(filename__1, Me.SessionId)
How to Print Document File in VB.NET Web Viewer
If you want to print out the document file to view it offline, just click on the button which is for printing document. This button is shaped like a printer, and you can customize your printing styles, pages or other settings after clicking it. The JavaScript API for printing document file is PrintFile. Again, this functionality can be applied to all the file formats supported by VB.NET Imaging SDK.
How to Save Document File in Web Viewer Using VB.NET
What do you do when you have finished processing and editing the document file in view? You might want to save the current document file to your local directory instantly. This feature is also supported by our VB.NET document file web viewer. To use the saving function, you may call SaveFile JavaScript API. And you can refer to the following VB.NET code to control the effect.
Dim doc As REDocument = DirectCast(Session(Convert.ToString(Me.SessionId) & "Save"), REDocument)
If doc IsNot Nothing Then
REFile.SaveDocumentFile(doc, "c:/save.pdf", New PDFEncoder())
End If
How to Download Document File in Web Viewer Using VB.NET
After saving all changes you have made to the current web document, you can click the download button to download this document file with our VB.NET web viewer. We provide JavaScript API for file downloading on web page: DownloadFile.

Recommend this to Google+