I have an application that used aspose.pdf 22.2 version to convert multiple jpeg files to single PDF. but after conversion, one page getting fully blackout. But it is working fine with older 11.5 version. Below is the code I have used
foreach (var attachment in workItem.Attachments)
{
ms = new MemoryStream(attachment.FileContent);
Bitmap myimage = new Bitmap(ms);
FrameDimension dimension = new FrameDimension(myimage.FrameDimensionsList[0]);
int frameCount = myimage.GetFrameCount(dimension);
Aspose.Pdf.Image OutImage = null;
for (int frameIdx = 0; frameIdx < frameCount; frameIdx++)
{
Page sec = pdfDoc.Pages.Add();
myimage.SelectActiveFrame(dimension, frameIdx);
currentImage = new MemoryStream();
myimage.Save(currentImage, ImageFormat.Jpeg);
OutImage = new Aspose.Pdf.Image();
OutImage.ImageStream = currentImage;
sec.Paragraphs.Add(OutImage);
}
}
if (pdfDoc != null)
{
pdfDoc.Save(outputPDF);
}