#1
Posted
:
Monday, January 14, 2019 4:14:50 PM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 199
Was thanked: 28 time(s) in 28 post(s)
This is an update for our
Convert Word Doc to PDF in C++ blog post in October 2016. The project has been updated to use our v20 C/C++ libraries, and was built with Visual Studio 2017.
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:Supports More Than Just PDF!Changing the output format to something other than PDF is trivial. Just locate the call below (
convert2pdf.cpp line 17) and change the format.
Code:
nRet = L_DocWriterInit(
&hDocWriter,
(L_TCHAR*)targetFile,
DOCUMENTFORMAT_PDF, // Change this
NULL, NULL, NULL);
Note: The sample project below also configures PDF specific options. If you wish to convert to another format, either pass NULL as the third parameter, as shown in the snippet above, or supply the corresponding
options struct.
Anthony Northrup
Developer Support Engineer
LEAD Technologies, Inc.
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.