[Root] / Welcome to Xceed Words for .NET v5.2 / [Root] / Code Snippets / Converting to PDF
In This Topic
    Converting to PDF
    In This Topic

    The example below demonstrates how to convert a .docx Document to PDF.

    • Most of the .docx features will be converted to PDF, but some of them might not. We are currently working on expanding this feature's capabilities.
    • The Xceed.Pdf.dll reference is needed in order to convert to PDF.
    • To convert a Document with a specific font to PDF, the font (a ttf file) must be installed in "Control Panel\All Control Panel Items\Fonts", otherwise the default Arial font will be used to generate the PDF Document.

    The PDF converter currently supports only fonts that use TrueType outlines and are digitally signed. Character mapping and glyph resolution for documents content that use non supported fonts — such as Chinese (CJK), Japanese, Korean, Arabic, Russian, Greek, or Cyrillic fonts — are not yet supported. Given these limitations, users should perform thorough and conclusive testing to verify whether their specific document content converts correctly to PDF; we strongly recommend validating the full workflow to ensure the results meet the needs of your scenario.

    C#
    Copy Code
        // Load a document
        using( var document = DocX.Load( "DocumentToConvert.docx" ) )
        {
          // Convert the Document to PDF.
          DocX.ConvertToPdf( document, "ConvertedDocument.pdf" );
        }