PDF Focus .Net - 100 % managed .Net assembly to convert PDF documents into DOC, RTF, Text and extract Text from PDF.
version 1.3.3 (February 9th, 2009)

Content | About PDF Focus .Net| Methods and properties | Samples of using in C#, VB.Net, ASP.Net | Purchase | License | Support and Contacts

PDF Focus .Net - methods and properties

The component can convert PDF file, URL to PDF or bytes of PDF array into DOC and RTF document.
This scheme shows all methods and properties of the PDF Focus .Net:

Methods:

ConvertFile()

ConvertFileToString()
ConvertBytesToFile()

ConvertBytesToString()

Properties:

OutputFormat - Allows to specify output format: Text, Rtf, Doc
Pages - Helps to extract text/rtf by pages
Serial - Allows to activate your copy of the PDF Focus .Net after purchasing
Password
- Use this property for password protected documents
Exception
- Get exception details if converting was failed

int ConvertFile(string pdfFile, string destFile) - this method converts PDF file or URL to PDF into DOC, RTF file

Parameters:

string pdfFile - path our URL to PDF file, for example @"d:\brochure.pdf" or "http://www.site.com/file.pdf"

string destFile - path to output file, for example @"d:\brochure.rtf". If this file is exist, it will be overwritten

Return values:

0 - converting successfully

1 - can't open PDF file

2 - can't create output file

3 - converting failed

To get more details about error, see the property Exception.

 

string ConvertFileToString(string pdfFile) - this method converts PDF file or URL to PDF into DOC, RTF string

Parameters:

string pdfFile - path our URL to PDF file, for example @"d:\brochure.pdf" or "http://www.site.com/file.pdf"

Return values:

RTF, DOC document as string or null if converting was failed.

To get more details about error, see the property Exception.

 

int ConvertBytesToFile(byte[] pdfBytes, string destFile) - this method converts array of PDF bytes into DOC, RTF file

Parameters:

pdfBytes - PDF document as bytes array

string destFile - path to output file, for example @"d:\brochure.rtf". If this file is exist, it will be overwritten

Return values:

0 - converting successfully

1 - can't open PDF file

2 - can't create output file

3 - converting failed

To get more details about error, see the property Exception.

string ConvertBytesToString(byte[] pdfBytes) - this method converts array of PDF bytes into DOC, RTF string

Parameters:

pdfBytes - PDF document as bytes array

Return values:

RTF, DOC document as string or null if converting was failed.

To get more details about error, see the property Exception.

eOutputFormat OutputFormat - type of format for output file (Rtf, Doc or Text)
Possible values: Rtf, Doc, Text.

eOutputFormat
Rtf
Text
Doc

Default value: Text
Example:
p.OutputFormat = SautinSoft.PdfFocus.eOutputFormat.Rtf;

string Serial - this property is necessary to activate your full version. Your will get your own serial number(s) after purchasing. In trial version this property is optional.

string Password - some PDF files can be protected by password even for opening/reading. This property is necessary only when you are converting protected PDF document. Usually it's unnecessary.

 

Exception Exception - this is very helpful property to find extra info about issue. This is a variable of standard System.Exception class.

For example, if you get an error during PDF transformation, please take a look at "p.Exception.Message" to see error's details.

 

ArrayList Pages - array list of string objects, it represents a collection of document pages in plain Text or RTF format, depends of the property 'OutputFormat'.

In this picture you can see that property 'Pages' contains plain Text strings, because the property 'OutputFormat' is set to eOutputFormat.Text:

In this picture you can see that property 'Pages' contains Rich Text strings, because the property 'OutputFormat' is set to eOutputFormat.Rtf: