Convert remote documents to PDF in .NET

SVG

To load and convert an SVG image from a remote URL, use the LoadFromHttp method from the [GdPictureDocumentConverter class][]. This method requires the following parameters:

  • HttpUri — A Uri variable pointing to an SVG image.
  • DocumentFormat — The file format represented as a member of the DocumentFormat enumeration.

To load and convert an SVG image from a remote URL, use the following code:

using GdPictureDocumentConverter gdpictureDocumentConverter = new GdPictureDocumentConverter();
// Create a `Uri` variable.
Uri fileUri = new Uri("https://pspdfkit.com/downloads/load-a-file/source.svg");
// Specify the file format.
GdPicture14.DocumentFormat format = GdPicture14.DocumentFormat.DocumentFormatSVG;
// Load an SVG image from a URL.
gdpictureDocumentConverter.LoadFromHttp(fileUri, format);
// Save the PDF document to file.
gdpictureDocumentConverter.SaveAsPDF(@"C:\temp\output.pdf");