Some test text!

Search
Hamburger Icon

UWP / Guides / Convert any printable document

Convert to PDF with virtual printer in UWP

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

Only available on Microsoft Windows systems
// Start with a PDFDoc (the conversion destination)
PDFDoc doc = new PDFDoc();

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

PDF Converter (SVG, XPS, TIFF, JPG, RTF, TXT, More)
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).

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales