We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Aspose.Pdf.Generator.Image Vs Aspose.Pdf.Image

Hi,


In process of moving to Aspose.Pdf.Document, i am not getting enough information how i should use New Image class to add an image at specified location in page. Earlier i was using following code to add image.

var logoImage = new Aspose.Pdf.Generator.Image
{
PositioningType = PositioningType.ParagraphRelative,
ReferenceParagraphID = root.ID,

Left = 24- section.PageInfo.Margin.Left,
Top = 18- section.PageInfo.Margin.Top,
ImageInfo =
{
ImageStream = MyImage.ImageStream,
FixWidth = MyImage.FinalImageWidth,
FixHeight = MyImage.FinalImageHeight,
ImageFileType = ImageFileType.Png,
},
};
section.Paragraphs.Add(logoImage);
Now how i can use new Aspose.Pdf.Image.

Regards,
Sandeep

Hi Sandeep,


Thanks for contacting support.

Aspose.Pdf namespace has a little different approach as compared to Aspose.Pdf.Generator. This namespace contains Aspose.Pdf.Image class but in order to add image over specific location, you need to use Matrix and operator classes. For further details, please visit


In the event of any further query, please feel free to contact.