Free Support Forum - aspose.com

Docx to pdf using Aspose.Word C++ Library

I’ve had success converting a docx file to a pdf using the .net library, but when I try and do the same thing using the C++ library, the code fails to execute properly. Here is what I’m attempting to do:

auto doc = System::MakeObjectAspose::Words::Document(System::String(uR"(Input\abc.doc)"));

doc->Save(uR"(Output\abc.pdf)");

Basically I’m trying to replicate the logic from the Doc2Pdf.cs example you provided. Clearly I’m missing something, because the document won’t even get created using anything with a .docx extension. Any advice, or is this feature not supported in c++?

Thanks!

@jhgroves,

I am afraid, the current version of Aspose.Words for C++ API supports only the DOC format. Saving to PDF is not supported at the moment. Your thread has been linked to the appropriate issue (WORDSCPP-678) and you will be notified as soon as it is supported. Sorry for the inconvenience.

However, we will release a new version of Aspose.Words for C++ in next few days which will support the following more formats:

  • WordprocessingML (DOCX, XML) - DOCX, WML, FlatOpc
  • Rich Text Format (RTF)
  • Plain Text (TXT)

As mentioned in release notes, we will also add the following features in next version of Aspose.Words for C++:

  • Updating fields (except fields that require updating page layout)
  • OfficeMath
  • Mail Merge support

Okay, thank you for the update!