Only files with the following extensions are allowed: zip,cab,jpg,gif,png,mpg,mpeg,avi,wmv,wma,mp3,ra,rar,rm,sql,txt,xls,doc,pdf,rdl,ppt,docx,xlsx,pptx,xlsm,tif,rtf,dot,xml,odt,odp,jrprint,ods,csv,xsn,xps,7z,XPS,OXPS. Please select a valid file.
Thanks for sharing your source document. Please use Width and Height property of PageInfo for controlling dimension of output PDF as following it will resolve the issue.
var doc = newDocument();<o:p></o:p>
Aspose.Pdf.Page
page = doc.Pages.Add();
Aspose.Pdf.Image
image1 = new Aspose.Pdf.Image();
var myimage = newBitmap(myDir + "ForConversion.bmp");
page.PageInfo.Margin.Bottom = 0;
page.PageInfo.Margin.Top = 0;
page.PageInfo.Margin.Left = 0;
page.PageInfo.Margin.Right = 0;
page.PageInfo.Width = myimage.Width;
page.PageInfo.Height = myimage.Height;
page.Paragraphs.Add(image1);
image1.File = myDir + "ForConversion.bmp";
doc.Save(myDir+"AfterConversion.pdf");
Please feel free to contact us for any further assistance.