Hi Thulasi,
Thanks for your inquiry.
thulasinycsca:I was able to generate pdf from html but some how my html page width is not fitting into the pdf ( i have around 12 columns in my html page but in pdf its displaying only 3 columns)
I did implemented the below post but still having same issue.
My html does not fit to aspose pdf pagefor your better understanding please find the attached screen shot.
You can increase the page width by using
PageSetup.PageWidth property. In your case, I suggest you please use the following code snippet to achieve your requirements. Hope this helps you.
Document doc = new Document(MyDir + “in.html”);
foreach (Section
section in doc.Sections)
{
section.PageSetup.Orientation = Aspose.Words.Orientation.Landscape;
//You can set the page width if required
section.PageSetup.PageWidth = 1000;
}
doc.Save(MyDir + "Out.pdf");
thulasinycsca:
I did implemented the below post but still having same issue.
https://forum.aspose.com/t/83348
for your better understanding please find the attached screen shot.
I am moving this forum thread to Aspose.Total forum. My colleagues from Aspose.Pdf team will reply you shortly.
thulasinycsca:
2. Is there any possibility of displaying html styles in pdf???( my current html page is having styles but in pdf its not displaying)
Please note that Aspose.Words mimics the same behavior as MS Word do. If you convert your HTML to Pdf by using MS Word, you will get the same output. Upon processing HTML, some features of HTML might be lost. You can find a list of limitations upon HTML exporting/importing here:
http://www.aspose.com/docs/display/wordsnet/Load+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Formathttp://www.aspose.com/docs/display/wordsnet/Save+in+the+HTML+%28.HTML%2C+.XHTML%2C+.MHTML%29+Format
It would be great if you please share following detail for investigation purposes.
- Please attach your input HTML document.
- Please supply us with the code from your application that is causing the issue
- Please attach the output Pdf file that shows the undesired behavior.
Unfortunately,
it is difficult to say what the problem is without the Document(s) and
simplified application. We need your Document(s) and simple project to
reproduce the problem. As soon as you get these pieces of information to
us we'll start our investigation into your issue.