This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/load-a-file/converter/from-remote-url-more.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Load any file for conversion from remote URL in C# .NET | Nutrient .NET SDK
More...

To load any supported file for conversion from a remote URL, use the LoadFromHttp method from the GdPictureDocumentConverter class.

LoadFromHttp accepts:

  • HttpUri — A Uri pointing to the source file.
  • DocumentFormat (optional) — A member of the DocumentFormat enumeration. You can also pass DocumentFormat.DocumentFormatUNKNOWN for auto-detection.

LoadFromHttp returns a GdPictureStatus, which should always be checked before conversion.

To load and convert a file from a remote URL (example: Excel to PDF), use the following code:

using GdPicture14;
using System;
using GdPictureDocumentConverter converter = new GdPictureDocumentConverter();
// Create a Uri variable.
Uri fileUri = new Uri("https://pspdfkit.com/downloads/load-a-file/source.xlsx");
GdPictureStatus status = converter.LoadFromHttp(fileUri, DocumentFormat.DocumentFormatXLSX);
if (status != GdPictureStatus.OK)
{
Console.WriteLine($"LoadFromHttp failed: {status}");
return;
}
status = converter.SaveAsPDF(@"C:\temp\output.pdf");
if (status != GdPictureStatus.OK)
{
Console.WriteLine($"SaveAsPDF failed: {status}");
}