Could you please tell me how to do center alignment of the image that i am writing to the PDF file
i am sending you the code and the PDF file that i am getting through that code.
If you observe the attached PDF file the image is not properly aligned.Can you tell me the code changes for getting the alignment of the image at the center.
And in the PDF file that i had sent to you the top margin was so much.So Please tell me how to set the margin heights also.
//Instantiate the Pdf instance and pass the file stream object to its constructor Pdf pdf1 = new Pdf(); //Create a section in the Pdf object Aspose.Pdf.Section sec1 = pdf1.Sections.Add(); //Create an image object in the section Aspose.Pdf.Image image1 = new Aspose.Pdf.Image(sec1); //Add image object into the Paragraphs collection of the section sec1.Paragraphs.Add(image1); //Set the path of image file image1.ImageInfo.File = "c:/dwclogo.jpg"; //Set the type of image using ImageFileType enumeration image1.ImageInfo.ImageFileType = ImageFileType.Jpeg; Text t = new Text(pdfinfo.ToString()); t.IsHtmlTagSupported=true; sec1.Paragraphs.Add(t); pdf1.Save(pdfpath);
Thanks in advance.