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

PDF Text Converter VB.NET Library
Convert text to PDF file using VB.NET in Windows Forms, WPF, Console application


Empower VB.NET Users to Create PDF File from Text Using Visual Basic .NET Demo Code





In this VB.NET tutorial, you will learn how to convert text file to PDF document without Acrobat in Visual Basic .NET applications.

  • Convert single or multiple text files to PDF
  • Combine multiple text files and convert to a PDF file
  • Insert text file content into existing PDF file
  • Easy to integrate in your VB.NET Windows Forms, WPF, Console applications

How to convert text file to PDF using VB.NET

  1. Download XDoc.PDF Text Converter vb.net library
  2. Install VB library to convert text file to PDF document
  3. Step by Step Tutorial
















How to convert text file to PDF document in VB.NET code?


VB.NET demo code for creating PDF document from .txt format



        '.txt convert to pdf(file to file)
        Dim inputFilePath As String = "C:\dmeo.txt"
        Dim outputFilePath As String = "C:\output.pdf"
        DocumentConverter.ToDocument(inputFilePath, outputFilePath, FileType.DOC_PDF)




How to convert text file in Stream object to PDF in stream object using VB.NET code?


The VB.NET source code below will show how to convert a text file in Stream object to PDF file in Stream object using VB.NET. You can also convert text file in byte array to PDF file in byte array.



        '.txt convert to pdf(stream to stream)
        Dim inputFilePath As String = "C:\dmeo.txt"
        Dim stream As Stream = File.Open(inputFilePath, FileMode.Open)
        Dim outputStream As MemoryStream = New MemoryStream()
        DocumentConverter.ToDocument(stream, outputStream, FileType.DOC_PDF)