> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/uwp/conversion/convert-other.md).

# Convert to PDF with virtual printer in UWP

Convert various file types to PDF documents with PDF Converter on Windows systems. Learn how to convert any printable document to PDF using pdftron.PDF.Convert.ToPdf method. Supported formats include

To convert of different file types to PDF Documents acting as a virtual printer.

{% hint style="warning" %}
Only available on Microsoft Windows systems
{% endhint %}

{% tabs %}
{% tab title="C#" %}
{% code lineNumbers="true" %}

```csharp
// Start with a PDFDoc (the conversion destination)
PDFDoc doc = new PDFDoc();

// perform the conversion with no optional parameters
Convert.ToPdf(doc, filename);
```

{% endcode %}
{% endtab %}
{% endtabs %}

[PDF Converter (SVG, XPS, TIFF, JPG, RTF, TXT, More)](/uwp/get-started/samples.md#convert) Full sample code which shows how to convert any printable document (e.g. Word, HTML, RTF, MS Office, DXF, DWG, etc) to PDF

## About converting to PDF

The `pdftron.PDF.Convert.ToPdf` method (`ToPdf` for short, and relatedly, `ToXod` or `ToXps`), converts multiple file formats to the requested file output format. It supports several input formats like docx, xlsx, rtf, txt, html, pub, etc.

Formats that require external applications for conversion use the Printer class and the PDFNet printer to be installed. This is only supported on Windows platforms. Document formats in this category include RTF (MS Word or Wordpad), TXT (Notepad or Wordpad), DOC and DOCX (MS Word), PPT and PPTX (MS PowerPoint), XLS and XLSX (MS Excel), OpenOffice documents, HTML and MHT (Internet Explorer), PUB (MS Publisher), MSG (MS Outlook).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/uwp/conversion/convert-other.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
