PDF Converter VB.NET Library
Create PDF from RTF in VB.NET
Tutorial for VB.NET Users to Convert RTF File to PDF Document in Visual Basic Program
- Free VB.NET RTF to PDF converter SDK for Visual Studio .NET
- Online C# guide: how to convert RTF to PDF file using C#
-
asp net replace text from pdf javascript,
open word document file in browser in asp.net,
asp.net display excel spreadsheet,
asp.net pdf editor,
pdf viewer in asp.net web application,
asp net mvc show pdf in div,
preview pdf in asp.net.
- An advanced .NET library which able to batch convert multiple RTF files to adobe PDF files
- Users are able to convert RTF to PDF programmatically with VB.NET code
- Able to create PDF from RTF in both .NET WinForms application and ASP.NET class
-
sharepoint 2013 convert word to pdf c#,
c# code to convert pdf to word document,
convert pdf to png c#,
c# convert pdf to tiff free library,
convert pdf to image c#,
convert image to pdf c#,
convert ppt to pdf using c#.
- Support .NET WinForms, ASP.NET MVC in IIS, ASP.NET Ajax, Azure cloud service, DNN (DotNetNuke), SharePoint
- Online source codes are given for using in VB.NET class
- Access to free .NET components and controls downloading
VB.NET Demo Code for Converting RTF to PDF
How to VB.NET: Convert single RTF file to PDF
VB.NET demo code for creating PDF document from RTF format.
'rtf convert to pdf(file to file)
Dim doc As RTFDocument = New RTFDocument("C:\dmeo.rtf")
doc.ConvertToDocument(DocumentType.PDF, "C:\output.pdf")
|
'rtf convert to pdf(Stream to Stream)
Dim inputFilePath As String = "C:\demo.rtf"
Dim arr() As Byte = File.ReadAllBytes(inputFilePath)
Dim inputStream As MemoryStream = New MemoryStream(arr)
Dim doc As RTFDocument = New RTFDocument(inputStream)
Dim outputStream As MemoryStream = New MemoryStream()
doc.ConvertToDocument(DocumentType.PDF, outputStream)
|
How to VB.NET: Convert two or multiple RTF files to PDF(batch convert)
Following demo codes will show how to convert rtf files to pdf documents.
Dim inputDirectory As String = "C:\input\"
Dim outputDirectory As String = "C:\Output\"
Dim files() As String = Directory.GetFiles(inputDirectory, "*.rtf")
'convert rtf document to pdf one by one.
For Each filePath As String In files
Dim doc As RTFDocument = New RTFDocument(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
|
How to VB.NET: Combine multiple RTF files, and convert to PDF
Following is VB.NET demo code for rtf files to PDF conversion.
Dim files() As String = { "C:\demo1.rtf, C:\demo2.rtf, C:\demo3.rtf" }
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 RTFDocument = New RTFDocument(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)
|
How to VB.NET: Insert RTF file into pdf document, and create a new PDF file
Following is VB.NET demo code to Insert rtf file to PDF at specific location.
Dim filePath As String = "C:\demo.rtf"
Dim doc As RTFDocument = New RTFDocument(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:\output.pdf"
Dim desDoc As PDFDocument = New PDFDocument(outputPdf)
Dim insertLocation As Integer = 2
desDoc.InsertPages(pages.ToArray(), insertLocation)
desDoc.Save("C:\desDocument.pdf")
|