Hello Aspose,
currently I'm evaluating Aspose.pdf 9.6.0.
I observe a problem with image margin and image title.
The following snippet should demonstrate the code fragment which is running for two images. One small and one oversize which is zoomed automatically to fit to page:
Gerd
currently I'm evaluating Aspose.pdf 9.6.0.
I observe a problem with image margin and image title.
The following snippet should demonstrate the code fragment which is running for two images. One small and one oversize which is zoomed automatically to fit to page:
Image image = new Image( section );image.ImageInfo.ImageStream = new MemoryStream(myImageData.ImageDataBytes);image.ImageInfo.ImageFileType = ImageFileType.Jpeg;image.ImageInfo.Title = myImageData.Caption.TextContent;image.IsInList = false;// Scaling if too largefloat pageWidth = (section.Section.PageInfo.PageWidth - section.Section.PageInfo.Margin.Left - section.Section.PageInfo.Margin.Right) / 72;float imageWidth = (float)this.myImageData.ImageWidth/this.myImageData.ImageHorizontalResolution;if ( pageWidth < imageWidth ) { float scale = pageWidth / imageWidth; image.ImageScale = scale; image.ImageInfo.Title += string.Format( ReportingServiceRenderer.AutoZoomString, Convert.ToInt32(scale * 100) ); }image.Margin.Bottom = 50;image.Margin.Top = 50;Regards
image.Margin.Left = 0;image.Margin.Right = 0;
1) In the resulting PDF I cannot see that the bottom margin of 50pt is used, but top margin seems to work.
2) The image text appears very close to the image. Are there any formating options for it?
Gerd