![]() Distribute PEERNET Software Bundled with your Product.Discounts for Purchasing Multiple Licenses.Enterprise Licensing for your Corporation.PEERNET Reports – Barcode, Report and Label Software.File Conversion Center – Desktop Batch Converter.Document Conversion Service – Unattended 24/7 Batch Converter.PDF Creator Plus – Merge, Edit, Create Searchable PDF.PDF Image Printer – Create Searchable PDF.Raster Image Printer – Create TIFF, PDF, JPEG, etc.TIFF Image Printer – Create TIFF Images.Presentation.SaveToFile("CustomizeSlideSize.pptx", FileFormat.Pptx2013) ĭim convertor As PdfUnitConvertor = New PdfUnitConvertor()ĭim imageData As IImageData = presentation.Images. PdfUnitConvertor convertor = new PdfUnitConvertor() įloat widthPoint = convertor.ConvertUnits(width, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point) įloat heightPoint= convertor.ConvertUnits(height, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point) String picFiles = a PdfUnitConvertor object Set the image as the background image of the slide through the properties under ISlide.SlideBackground object.Set the slide size of the presentation based on the image size through property.Get the image width and height, and convert them to point.Create a PdfUnitConvertor object, which is used to convert pixel to point.The following are the steps to convert images to a PowerPoint document with customized slide size using Spire.Presentation for. This will prevent the image from being over stretched or compressed. If the aspect ratio of your images is not 16:9, or they are not in a standard slide size, you can create slides based on the actual size of the pictures. Presentation.SaveToFile("ImageToShape.pptx", FileFormat.Pptx2013)Ĭonvert Image to PowerPoint with Customized Slide Size in C# and VB.NET ![]() 'Add a shape with a size equal to the slideĭim shape As IAutoShape = (ShapeType.Rectangle,New RectangleF(New PointF(0,0),)) Presentation.SaveToFile("ImageToShape.pptx", FileFormat.Pptx2013) IAutoShape shape = (ShapeType.Rectangle, new RectangleF(new PointF(0, 0), )) Add a shape with a size equal to the slide Save the document to a PowerPoint file using Presentation.SaveToFile() method.Fill the shape with the image through the properties under IAutoShape.Fill object.Add a shape with the size equal to the slide using () method.Add a slide to the document using () method.Get a specific image and append it to the image collection of the document using () method.Get the image paths from a folder and save in a string array.Below are the steps to convert images to shapes in a PowerPoint document using Spire.Presentation for. If you would like the images are moveable and resizable in the PowerPoint file, you can convert them as shapes. ![]() Presentation.SaveToFile("ImagesToBackground.pptx", FileFormat.Pptx2013)Ĭonvert Image to Shape in PowerPoint in C# and VB.NET ![]() 'Set the image as the background image of the slide = SlideSizeType.Screen16x9ĭim picFiles() As String = Directory.GetFiles("C:\Users\Administrator\Desktop\Images")įor i = 0 To picFiles.Length- 1 Step i 1ĭim slide As ISlide = ()ĭim image As Image = Image.FromFile(imageFile)ĭim imageData As IImageData = (image) Presentation.SaveToFile("ImagesToBackground.pptx", FileFormat.Pptx2013) ĭim presentation As Presentation = New Presentation() Set the image as the background image of the slide = SlideSizeType.Screen16x9 įor (int i = 0 i < picFiles.Length i ) Presentation presentation = new Presentation() ![]()
0 Comments
Leave a Reply. |