Free Support Forum - aspose.com

How can I convert image to pdf

Hi,

I bought Total for C++.
I was wondering how to convert image to pdf.

@kngstr

You can use Aspose.Words for C++ to convert image to PDF. Please refer to the following article.
Convert an Image to PDF

Hope this helps you.

@tahir.manzoor

I already tried this example, but it didn’t work.

GITHUB\Aspose.Words-for-C\cpp\Loading-and-Saving\ImageToPdf.cpp

BTW: Why are you using Words?
Can I use Aspose.Pdf for C++?
Thanks.

@kngstr

Yes, you can use Aspose.PDF to convert image to PDF. Please check the code example in the following article. Hope this helps you.
Working with Images

Thanks. I’ll try it.

BTW: Will compile error be finxed in this demo?

GITHUB\Aspose.Words-for-C\cpp\Loading-and-Saving\ImageToPdf.cpp

error:System::NotImplementedException: class System::SmartPtr<class System::Array > __cdecl System::Drawing::Image::get_FrameDimensionsList(void) const

@kngstr

Could you please share the version of Visual Studio that your are using? Thanks for your cooperation.

@tahir.manzoor

Here is my vs version: vs/15.0.0-rtw+26228.4

@kngstr

We are investigating this issue and will update you as soon as possible.

@kngstr

We have logged this problem in our issue tracking system as WORDSCPP-919. You will be notified via this forum thread once this issue is resolved.

We apologize for your inconvenience.

@tahir.manzoor
OK. Thanks.