PDF Focus .Net - .Net assembly to convert PDF to Word (RTF)
version 1.0.2.0 (July 17th, 2008)
   HelpContent | About PDF Focus .Net| Methods and properties | Samples of using in C#, VB.Net, ASP.Net | Purchase | License | Support and Contanst

Using PDF Focus.Net version in VB.Net and C#

Here you can download samples of using our PDF Focus .Net for Net 2.0 platform.

Examples for using DLL in:

 C#
 VB.Net
 ASP.Net


C# sample - download

1. Place the files "PdfFocus.dll" into your bin directory.

2. In VisualStudio.net manually add a reference to the file PdfFocus.dll via "Add reference" for the current project
.

3. C# code sample:

SautinSoft.PdfFocus p = new SautinSoft.PdfFocus();
p.ConvertFile("d:\\Example.pdf","d:\\Example.rtf", "");


VB.Net sample - download

1. Place the files "PdfFocus.dll" into your bin directory.

2. In VisualStudio.net manually add a reference to the file PdfFocus.dll via "Add reference" for the current project
.

 

3. VB.Net code sample:

Dim p As New SautinSoft.PdfFocus()
p.ConvertFile("D:\Example.pdf", "D:\Example.rtf", "")

ASP.Net sample C# - download
Place the files "PdfFocus.dll" into your bin directory.

SautinSoft.PdfFocus conv = new SautinSoft.PdfFocus();

PdfFile.SaveAs(@"D:\Example.pdf");
conv.ConvertFile(@"D:\Example.pdf", @"D:\Example.rtf", "");
FileStream readfile = File.Open(@"D:\Example.rtf", FileMode.Open);
BinaryReader reader = new BinaryReader(readfile);
long len = reader.BaseStream.Length;
byte[] word_doc = new byte[len];
int uuu = reader.BaseStream.Read(word_doc, 0, (int)len);
readfile.Close();
Response.ContentType = "application/msword";
Response.Charset = "windows-1251";
Response.OutputStream.Write((byte[])word_doc, 0, (int)len);
Response.Flush();

ASP.Net sample VB.Net - download
Place the files "PdfFocus.dll" into your bin directory.

Dim p As New SautinSoft.PdfFocus()

Dim PdfBytes As New Object
PdfFile.SaveAs("D:\\Example.pdf")
p.ConvertFile("D:\\Example.pdf", "D:\\Example.rtf", "")
Dim path As String
Dim mode As FileMode
Dim readfile As FileStream
readfile = File.Open("D:\\Example.rtf", FileMode.Open)

Dim reader As New BinaryReader(readfile)

Dim len As Long
len = reader.BaseStream.Length
Dim word_doc(len) As Byte
Dim uuu As Integer
uuu = reader.BaseStream.Read(word_doc, 0, len)
readfile.Close()
Response.ContentType = "application/msword"
Response.Charset = "windows-1251"
Response.OutputStream.Write(word_doc, 0, len)
Response.Flush()