Opens PDF document through Uri class

Namespace:  SautinSoft
Assembly:  SautinSoft.PdfFocus (in SautinSoft.PdfFocus.dll) Version: 6.6.9.7 (6.6.9.7)

Syntax

      
 C#  Visual Basic 
public void OpenPdf(
	Uri uri
)
Public Sub OpenPdf ( _
	uri As Uri _
)

Parameters

uri
Uri
Uri path to the PDF document

Remarks

To start the process, please download the most fresh version of PDF Focus .Net.



Examples

CopyHow to convert URL-PDF from Internet to a Word file in C#
using System;
using System.IO;

namespace Sample
{
    class Sample
    {
        static void Main(string[] args)
        {
            string remotePdfUrl = @"http://www.sautinsoft.com/how-to/documents/pdf/simple%20text.pdf";
            string pathToWord = @"..\..\..\..\..\Result.docx";

            //Convert URL-PDF from Internet to a Word file
            SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
            //this property is necessary only for registered version
            //f.Serial = "XXXXXXXXXXX";

            Uri uri = new Uri(remotePdfUrl);

            f.OpenPdf(uri);

            if (f.PageCount > 0)
            {
                int result = f.ToWord(pathToWord);

                //Show the resulting Word document
                if (result == 0)
                {
                    System.Diagnostics.Process.Start(pathToWord);
                }
            }
        }
    }
}
CopyHow to convert URL-PDF from Internet to a Word file in VB.Net
Imports System.IO
Imports System.Drawing.Imaging
Imports System.Collections.Generic
Imports SautinSoft

Module Sample

    Sub Main()
        Dim remotePdfUrl As String = "http://www.sautinsoft.com/how-to/documents/pdf/simple%20text.pdf"
        Dim pathToWord As String = "..\..\..\..\Result.docx"

        'Convert URL-PDF from Internet to a Word file
        Dim f As New SautinSoft.PdfFocus()
        'this property is necessary only for registered version
        'f.Serial = "XXXXXXXXXXX";


        Dim uri As New Uri(remotePdfUrl)

        f.OpenPdf(uri)

        If f.PageCount > 0 Then
            Dim result As Integer = f.ToWord(pathToWord)

            'Show the resulting Word document
            If result = 0 Then
                System.Diagnostics.Process.Start(pathToWord)
            End If
        End If

    End Sub
End Module

See Also