XDoc.PDF
Features
Tech Specs
How-to VB.NET
Pricing
How to Start Convert PDF Work with PDF Modules PDF Document PDF Pages Text Image Graph & Path Annotation, Markup & Drawing Redaction Security Digital Signature Forms Watermark Bookmark Link File Attachment File Metadata Printing Work with Other SDKs Barcode read Barcode create OCR Twain

VB.NET PDF - Create PDF from Tiff in VB.NET


Online VB.NET Tutorial for Converting Tiff Image to PDF Document in VB.NET Project





Look for HTML5 PDF Editor?

EdgePDF: ASP.NET PDF Editor is the best HTML5 PDF Editor and ASP.NET PDF Viewer based on XDoc.PDF, JQuery, HTML5. It supports ASP.NET MVC and WebForms projects.


Best tiff to adobe PDF converter SDK for VB .NET


.NET component for batch converting tiff images to PDF documents in Visual Studio .NET


High quality PDF files are created from tiff in .NET WinForms application


Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint


Turning tiff into searchable PDF or scanned PDF in Visual Basic .NET class


Convert tiff to PDF document in ASP.NET webpage free online


Source codes are provided to use in VB.NET class


Free library and components for downloading and using in .NET framework


Except PDF to Tiff conversion, RasterEdge SDK has related Tiff to PDF converting control, which supports conversion from Tiff image to PDF document in VB.NET program. This page will guide you with VB.NET sample code to finish Tiff to PDF conversion work. Tiff image with single page or multiple pages is supported.


Furthermore, if you are a Visual C# .NET programmer, you can go to this Visual C# tutorial for Tiff to PDF conversion in .NET project.




VB.NET Tiff to PDF Conversion Demo Code



Add necessary references:


  RasterEdge.Imaging.Basic.dll


  RasterEdge.Imaging.Basic.Codec.dll


  RasterEdge.Imaging.Drawing.dll


  RasterEdge.Imaging.Font.dll


  RasterEdge.Imaging.Processing.dll


  RasterEdge.XDoc.Raster.dll


  RasterEdge.XDoc.Raster.Core.dll


  RasterEdge.XDoc.PDF.dll


  RasterEdge.XDoc.TIFF.dll


Use corresponding namespaces;


  using RasterEdge.Imaging.Basic;


  using RasterEdge.XDoc.TIFF;


  using RasterEdge.XDoc.PDF;


Note: When you get the error "Could not load file or assembly 'RasterEdge.Imaging.Basic' or any other assembly or one of its dependencies. An attempt to load a program with an incorrect format", please check your configure as follows:

       

       If you are using x64 libraries/dlls, Right click the project -> Properties -> Build -> Platform target: x64.

       

       If using x86, the platform target should be x86.




VB.NET Sample Code: Convert TIFF to PDF in VB.NET Project



Following is VB.NET demo code for TIFF(.tif/.tiff) to PDF conversion.



Dim inputFilePath As String = "C:\1.tif"
Dim outputFilePath As String = "C:\Output.pdf"

' Load a TIFF(.tif) document.
Dim doc As TIFFDocument = New TIFFDocument(inputFilePath)

' Convert it to PDF document.
doc.ConvertToDocument(DocumentType.PDF, outputFilePath)





VB.NET Convert two or multiple TIFF files to PDF (batch convert)



Following is VB.NET demo code for TIFF(.tif/.tiff) to PDF conversion.



Dim inputDirectory As String = "C:\input\"
Dim outputDirectory As String = "C:\Output\"
Dim files() As String = Directory.GetFiles(inputDirectory, "*.tif")

' convert tiff document to pdf one by one.
For Each filePath As String In  files
       Dim doc As TIFFDocument = New TIFFDocument(filePath)
       Dim startIdx As Integer = filePath.LastIndexOf("\")
       Dim endIdx As Integer = filePath.LastIndexOf(".")
       Dim docName As String = filePath.SubString(startIdx + 1, endIdx - startIdx - 1)
       ' Convert it to PDF document.
       doc.ConvertToDocument(DocumentType.PDF, outputDirectory + docName + ".pdf")
Next





VB.NET Convert two or multiple TIFF files to one PDF



Following is VB.NET demo code for TIFF(.tif/.tiff) to PDF conversion.



Dim files() As String = { "C:\demo1.tif, C:\demo2.tif, C:\demo3.tif" }
Dim outputFilePath As String = "C:\output.pdf"
Dim streams As List(Of MemoryStream) = New List(Of MemoryStream)()
For Each filePath As String In  files
       Dim doc As TIFFDocument = New TIFFDocument(filePath)
       Dim outputStream As MemoryStream = New MemoryStream()
       ' Convert it to PDF document.
       doc.ConvertToDocument(DocumentType.PDF, outputStream)
       streams.Add(outputStream)
Next
PDFDocument.CombineDocument(streams, outputFilePath)





VB.NET insert TIFF file into pdf document, and create a new PDF file



Following is VB.NET demo code to Insert TIFF(.tif/.tiff) to PDF at specific location.



Dim filePath As String = "C:\demo.tif
Dim doc As TIFFDocument = New TIFFDocument(filePath)
Dim stream As MemoryStream = New MemoryStream()
doc.ConvertToDocument(DocumentType.PDF, stream)
Dim pdf As PDFDocument = New PDFDocument(stream)
Dim pageCount As Integer = pdf.GetPageCount()
Dim pages List(Of BasePage) = New List(Of BasePage)() 
For i As Integer = 0 To pageCount - 1
       pages.Add(pdf.GetPage(i))
Next
Dim outputPdf As String = "C:\demo.pdf"
Dim desDoc As PDFDocument = New PDFDocument(outputPdf)
Dim insertLocation As Integer = 2
desDoc.InsertPages(pages.ToArray(), insertLocation)
desDoc.Save("C:\desDocument.pdf")