Free Support Forum -

Convert image to PDF using Aspose.Imaging for .NET

Is there any way I can get Aspose.pdf.image from Aspose.imaging.image.

My C# code like below:

pdfDocument = new Aspose.Pdf.Document();

asposePdfImage = new Aspose.Pdf.Image();
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(OriginalFilePathName))
x = image.Width;
y = image.Height;

                    if (x > y) // landscape
                        image.Resize(792, 612, Aspose.Imaging.ResizeType.LanczosResample);
                    else     //
                        image.Resize(612, 792, Aspose.Imaging.ResizeType.LanczosResample);


               // asposePdfImage.ImageStream = postFile.InputStream;



I have observed your comments. I like to inform that Aspose.Imaging like other Aspose products does not include any other product dependencies in API, but you are free to save image to stream or to file and use it as per API of other products i.e. Pdf in such case.