How to Use PdfConverter for .NET

The PdfConverter class in Aspose.Diagram.LowCode namespace provides a simplified API for converting Visio diagram files to PDF in .NET applications. It accepts all major Visio input formats and always produces PDF output — for Visio-to-Visio conversion, use DiagramConverter.

Key Features

  1. Visio-to-PDF conversion — Convert VSDX, VSD, VDX, VSDM, and other Visio formats to PDF in a single method call.
  2. PDF compliance options — Use LowCodePdfSaveOptions.PdfOptions (type PdfSaveOptions) to configure compliance level (e.g., PDF/A-1b).
  3. Minimal code — A single static method call (PdfConverter.Process()) handles the conversion with no boilerplate.
  4. File-path and stream-based API — Pass file paths directly or use LowCodeLoadOptions/LowCodePdfSaveOptions for stream-based, in-memory processing.
  5. Batch processing support — Loop over file collections and call Process() for each; the API is stateless and thread-safe per call.
  6. No external dependencies — Conversion runs entirely in-process; no Visio or PDF writer installation required on the server.

Use Cases

  • Document delivery pipelines — Convert Visio diagrams to PDF for distribution, email attachments, or document management systems.
  • Web APIs — Accept Visio file uploads via HTTP and return PDF using stream-based processing without temporary file writes.
  • Compliance archiving — Generate PDF/A-compliant output for long-term archiving by setting PdfOptions.Compliance.
  • Report generation — Programmatically convert diagram-based reports from VSDX to PDF as part of a reporting workflow.
  • CI/CD pipelines — Generate PDF snapshots of architecture diagrams as part of documentation build steps.
  • Batch export — Convert entire libraries of Visio diagrams to PDF for bulk sharing or publishing.

Getting Started

Step 1 — Install Aspose.Diagram via NuGet:

dotnet add package Aspose.Diagram

Step 2 — Apply your metered license:

using Aspose.Diagram;

Metered metered = new Metered();
metered.SetMeteredKey("publicKey", "privateKey");

Step 3 — Convert a Visio file to PDF:

using Aspose.Diagram.LowCode;

PdfConverter.Process("input.vsdx", "output.pdf");

Step 4 — Explore advanced options and articles below.

Articles

Prerequisites

  • Aspose.Diagram for .NET (version 26.4.0 or later)
  • Valid Aspose license or metered API key

Basic Usage

using Aspose.Diagram.LowCode;

// Convert a Visio diagram to PDF
PdfConverter.Process("input.vsdx", "output.pdf");

Advanced Usage with Options

using Aspose.Diagram.LowCode;

var loadOptions = new LowCodeLoadOptions();
loadOptions.InputFile = "input.vsdx";

var saveOptions = new LowCodePdfSaveOptions();
saveOptions.OutputFile = "output.pdf";

PdfConverter.Process(loadOptions, saveOptions);

See Also