PdfFocusOpenPdf(Uri) Method |
Open PDF document as
Uri.
Namespace: SautinSoftAssembly: SautinSoft.PdfFocus (in SautinSoft.PdfFocus.dll) Version: 2024.8.6
Syntax public void OpenPdf(
Uri uri
)
Public Sub OpenPdf (
uri As Uri
)
Parameters
- uri Uri
- Uri path to the PDF document.
Example How 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 = @"https://sautinsoft.com/products/pdf-focus/help/net/developer-guide/data/files/parkmap.pdf";
string pathToWord = @"Result.docx";
SautinSoft.PdfFocus f = new SautinSoft.PdfFocus();
Uri uri = new Uri(remotePdfUrl);
f.OpenPdf(uri);
if (f.PageCount > 0)
{
int result = f.ToWord(pathToWord);
if (result == 0)
{
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo(pathToWord) { UseShellExecute = true });
}
}
}
}
}
How 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 = "https://sautinsoft.com/products/pdf-focus/help/net/developer-guide/data/files/parkmap.pdf"
Dim pathToWord As String = "Result.docx"
Dim f As New SautinSoft.PdfFocus()
Dim uri As New Uri(remotePdfUrl)
f.OpenPdf(uri)
If f.PageCount > 0 Then
Dim result As Integer = f.ToWord(pathToWord)
If result = 0 Then
System.Diagnostics.Process.Start(New System.Diagnostics.ProcessStartInfo(pathToWord) With {.UseShellExecute = True})
End If
End If
End Sub
End Module
See Also