VB.NET: Read PDF Document
How to view, read, convert PDF documents using VB.NET
Yiigo provides .NET PDF reading support included in Yiigo.Image for .NET, which can be easily added to your document imaging applications with fully-automated, dynamic, and feature-packed PDF reading, viewing and conversion functionalities. Find more PDF viewing information on Yiigo.Imaging for .NET PDF Reading Plugin.
Yiigo.Imaging for .NET PDF Reading Plugin has those following functionalities:
- Read, Edit PDF documents from file, stream, http, ftp...
- Extract text, images, hyperlinks and more information from PDF documents
- Merge existing PDF files into a single PDF
- Swap, delete, append, rotate pages of PDF images
- Support for rasterizing PDF files
- Convert PDF Documents into any supported Yiigo .NET Image SDK
- Save to the PDF/A format
Read PDF Documents with VB.NET Sample Code Requirements
Before loading, viewing PDF documents in VB.NET, make sure that you have installed Start to Read PDF Documents
- Start your Microsoft Visual Studio;
- Choose "Project" in "File-New" from the menu;
- In "New Project" dialog box, choose "Visual Basic Projects";
- Choose "Windows Application" in the "Templates" List and name it "YiigoImagingPdfReadVBNET";
- In the "Solution Explorer" window from the context menu, right-click on the "References" folder, and select "Add Reference...";
- In the "Add Reference" dialog box, select the ".NET" tab and browse to Yiigo.Imaging.Net.dll library and Yiigo.Imaging.Net.Pdf.Read.dll;
- Add it to your VB.NET applications;
- Import Yiigo .NET Image Namespace & copy those following codes:
Imports System.IO Imports System.Drawing.Printing Imports Yiigo.Imaging Imports Yiigo.Imaging.Processing Imports Yiigo.Imaging.PdfRead
' View a PDF Dim pdf As New PdfReader() RegisteredReaders.Readers.Add(pdf) myWorkapceViewer.Open("1.pdf")
' Convert to searchable PDF Public Sub TranslateToPdf(engine As OcrEngine, images As ImageSource, outputStream As Stream) engine.Translate(images, "application/pdf", outputStream) End Sub
' Combine a couple of PDF PdfReader.Combination("output.pdf", "MobyDick.pdf", "Pride and Prejudice.pdf", "Metamorphosis.pdf")
' Encrypt & decrypt PDF Dim pdf As New PdfReader("plaintext.pdf") pdf.Save(password, "encrypted.pdf")
Try Dim pdf As New PdfReader(password, "encrypted.pdf") pdf.Save("cleartext.pdf") Catch e As CodecException Console.WriteLine("Unable to open pdfument: " + e.Message) End Try
' Extract text from PDF pdf.ExtractText() pdf.ExtractTextPosition(Single Left, Single Top, Single Width, Single Height) pdf.SearchText(String Text, int Occurrence, Boolean CaseSensitive, Boolean WholeWords, ref Single Left, ref Single Top, ref Single Width, ref Single Height)
' Save & print PDF pdf.SaveToFile(String FilePath) pdf.SaveToStream(Stream Stream) pdf.print() | 
Products Overview Tech Specs Features Other Plugins Image Viewer CoreBarcode PluginPDF Read & WriteTesseract OCR PluginForm Processing PluginJBIG2 CodecJPEG2000 CodecISIS ScannerTwain ScannerDICOM ReaderCAD Scanner
|