Based on this and other similar threads you've started about adding images
to PDF files, you should know by now that you cannot do this with just
changing one line in your code that reads JPEG images. It does not work
this way, as was explained to you again and again.
You need to stop trying to come up with a change to your code and start
reading the documentation. You need to read (and understand!) the PDF
specification - not once, but multiple times until you can look at the
structure of a PDF file and know why things are where they are. You cannot
write software that modifies PDF files without a solid understanding of how
PDF works. And once you've done that, start reading the documentation for
the plug-in interface. Again, reading this stuff once is not sufficient,
it's an ongoing effort.
Yes, this is hard, and it takes a long time to get familiar with just the
basis concepts of working with PDF documents. This is why it's in most
cases cheaper and faster to not even attempt to write your own plug-in, but
to hire somebody with who did invest that time to learn how to do this.
So, again: With the exception of JPEG files, you have to extract the bitmap
data from our images outside of the Acrobat SDK. You need to either
be familiar with how these files are composed, or you need to use 3rd party
software to extract that information. Once you've done that, you can then
pass the image size, bit depth, color space and bitmap information to the
Acrobat SDK functions to create your image in the PDF data structure. What
you need to provide does not make any sense until you have a good
understanding of the PDF structure and the API.
Karl Heinz Kremer
PDF Acrobatics Without a Net
PDF Software Development, Training and More...