Is there an easy to use PDF library (C++) to write a sequence of images to a PDF file?

  • 1
    which platform are you on? On Windows you don't need any libraries
    – phuclv
    Dec 28, 2019 at 3:52

2 Answers 2


ImageMagick CLI would be the easiest, you could trigger a shell execute from C++ using the OS C++ API, or maybe glib if you are on Linux.

Though there is also a C++ library for ImageMagick.



You can do this using LEADTOOLS. (Disclaimer: I am an employee of the vendor of this library).

The following C++ code takes the name of any image file and saves the image into a PDF file. Subsequent calls to this function with different images will append the new images to the same file.

void AppendImageToPdf(TCHAR* pszInputImageName, TCHAR* pszOutputPDF)
   BITMAPHANDLE BmpPage = { 0 };
   L_LoadBitmap(pszInputImageName, &BmpPage, sizeof BITMAPHANDLE, 0, ORDER_BGR, NULL, NULL);
   L_SaveFile(pszOutputPDF, &BmpPage, FILE_RAS_PDF_JPEG_411, 24, 25, SAVEFILE_MULTIPAGE, NULL, NULL, NULL);

There’s a free evaluation (with free tech support) on this page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.