All other formats (png,tiff,gif) work! Only jpeg/jpg doesn't work.
When I run the code, I am accepted to see an image in the pdf at the given location. All of the format work fine. I am able to see the image. But when I read a .jpeg/jpg image from the stream, the area where the image is suppose to be at is blank.
No Exceptions thrown.
Code Executes just fine.
Just Image is not placed in the pdf
I am using this version of pdfsharp: 1.32.3057.0
Here is the code that I am using:
AmazonS3Client client;
using (client = new AmazonS3Client(accessKey, secretKey))
{
GetObjectRequest request = new GetObjectRequest
{
BucketName = bucket,
Key = //File Location
using (GetObjectResponse response = client.GetObject(request))
{
Image imgFromStream = Image.FromStream(response.ResponseStream, true, true);
XImage image = XImage.FromGdiPlusImage(imgFromStream);
gfx.DrawImage(image, layoutItem.Left, layoutItem.Top, image.PointWidth, image.PointHeight);
}
}