Hi Adnan,
Well thanks for trying. In case anyone else is interested in doing this, I extracted the slides as bitmaps and paste them into PDF pages and that is working though probably not all that efficient. A code snippet is below:
’–get PowerPoint
Dim sf As New Aspose.Slides.Presentation(strSlides)
sf.SlideSize.Orientation = Aspose.Slides.SlideOrienation.Landscape
sf.ViewProperties.ShowComments = Aspose.Slides.NullableBool.False
’–create pdf
Dim pdf As New Aspose.Pdf.Document
’–add first page
Dim pdfpage As Aspose.Pdf.Page = pdf.Pages.Add()
pdfpage.SetPageSize(610.997, 790.702)
’–select slide
for i as integer = 1 to 2
Dim sld As Aspose.Slides.Slide = sf.Slides(i)
'Convert slide to image
Dim bmp As Bitmap = sld.GetThumbnail(1.0, 1.0)
-then followed aspose instructions for inserting bitmap into page
Dim imageStream As MemoryStream = New MemoryStream
bmp.Save(imageStream, System.Drawing.Imaging.ImageFormat.Jpeg)
’ Add image to Images collection of Page Resources
pdfPage.Resources.Images.Add(imageStream, 100)
’ Using GSave operator: this operator saves current graphics state
pdfPage.Contents.Add(New Aspose.Pdf.Operator.GSave())
’ Create Rectangle and Matrix objects
Dim rectangle As New Aspose.Pdf.Rectangle(lowerleftx, lowerlefty, upperrightx, upperrighty)
Dim matrix As New Aspose.Pdf.Matrix(New Double() {rectangle.URX - rectangle.LLX, 0, 0, rectangle.URY - rectangle.LLY, rectangle.LLX, rectangle.LLY})
'Dim matrix As New Aspose.Pdf.Matrix(New Double() {rectangle.URX - rectangle.LLX, 0, 0, rectangle.LLY - rectangle.URY, rectangle.LLX, rectangle.LLY})
’ Using ConcatenateMatrix (concatenate matrix) operator: defines how image must be placed
pdfPage.Contents.Add(New Aspose.Pdf.Operator.ConcatenateMatrix(matrix))
Dim ximage As Aspose.Pdf.XImage = pdfPage.Resources.Images(pdfPage.Resources.Images.Count)
’ Using Do operator: this operator draws image
pdfPage.Contents.Add(New Aspose.Pdf.Operator.Do(ximage.Name))
’ Using GRestore operator: this operator restores graphics state
pdfPage.Contents.Add(New Aspose.Pdf.Operator.GRestore())
imageStream.Close()
next i
pdf.Save(“myfile”)