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

Free Support Forum - aspose.com

Image on new page after floating box crashes on save

This crashes at Save(); with the message “Invalid scale value (should be a float number greater than 0):-2.693333”.


var pdf = new Aspose.Pdf.Generator.Pdf();
var section1 = pdf.Sections.Add();

var floatingBox = new Aspose.Pdf.Generator.FloatingBox();

var image1 = new Aspose.Pdf.Generator.Image();
image1.ImageInfo.File = @“big.png”;

var image2 = new Aspose.Pdf.Generator.Image();
image2.ImageInfo.File = @“small.png”;

var section2 = pdf.Sections.Add();
section2.IsNewPage = true;

var image3 = new Aspose.Pdf.Generator.Image();
image3.ImageInfo.File = @“small.png”;

using (var stream = new MemoryStream())
File.WriteAllBytes(@“c:\temp\test.pdf”, stream.ToArray());

Hi there,

Thanks for your inquiry. Please use new DOM approach for Image to PDF conversion, it is more efficient and improved. It will help you to accomplish the task.

Please feel free to contact us for any further assistance.

Best Regards,