Categories: Document ImagingPDF

Convert Word Doc to PDF in C++

LEAD is continuously updating and adding new features to LEADTOOLS. One feature that was rolled into Version 19 after the initial release includes enhanced SVG support. This enhancement allows users to load document and vector formats as SVG, which can then be handed off to other parts of LEADTOOLS such as the Document Writers. In other words, you can convert from formats such as DOC, PDF, DWG, DXF, etc. to other document formats such as PDF/A, HTML, and SVG without rasterization or OCR.

In Convert a Word Document to PDF (C#), I pushed a project on GitHub to show how to do the conversion in .NET. Now I have pushed a C/C++ version of the project that will convert vector and document formats to PDF.

What it Does

This C/C++ console application project shows how to use LEADTOOLS to convert a Word DOC to document-based PDF.

Features Used

Git the Code

The project is on GitHub: https://github.com/LEADTOOLS/demo-cpp-convert-to-pdf

Supports More Than Just PDF!

Changing the output format to something other than PDF is trivial. Just find the line below and change the format.

nRet = L_DocWriterInit(


This is why getting LEADTOOLS annual maintenance is so important; it ensures that you always get the latest features of LEADTOOLS such as these SVG enhancements.


Developer Advocate

Gabriel Smith: Developer Advocate