There shouldn't be any problem adding "ABC_Test_2" to a PDF (see attached)
Here is the pseudo code (sorry, my Pdfium implementation is a bit abstracted):
```
// get pixel data
void* data = GetData();
// load page
FPDF_PAGE page = LoadPage(page_index);
// create new bitmap
// determine parameters
int unpadded_width = width * bytes_per_pixel;
int remainder = unpadded_width % 4;
int padding = remainder > 0 ? (4 - remainder) : 0;
int bmp_stride = width * bytes_per_pixel + padding;
int format = FPDFBitmap_BGRA;
switch (bytes_per_pixel)
{
case 3:
format = FPDFBitmap_BGR;
break;
case 4:
format = FPDFBitmap_BGRA;
break;
default:
Err::Throw("Invalid bytes-per-pixel (%d) for bitmap", bytes_per_pixel);
break;
}
// create bitmap
FPDF_BITMAP bitmap = CreateBitamp(width, height, format, data, bmp_stride);
// create new image object
FPDF_PAGEOBJECT object = CreateImageObject(GetHandle());
// assign bitmap to image object
SetBitmap(&page, 1, object, bitmap);
// configure bitmap
SetImageMatrix(object, desired_width, 0, 0, desired_height, x, y);
// add image object to page
InsertObject(page, object);
GenerateContent(page);
```
Provided all your Pdfium calls are correct, I assume you're just not extracting pixel data from the png properly or messing up the PDF in some other way.
Cheers,
Justin Pierce