Last post Dec 30, 2011 08:20 PM by Decker Dong - MSFT
Dec 29, 2011 01:49 PM|Giro|LINK
I need to save the formatting of the text below
<font size="2"><span style="font-family: Arial;">hello<br><br>
<br style="font-weight: bold; text-decoration: underline;"></span></font>
<div style="text-align: center;"><font size="2"><span style="font-family: Arial;">
<span style="font-weight: bold; text-decoration: underline;">I need to save the formatting</span>
<span style="font-weight: bold;"> <span style="color: rgb(255, 0, 0);">of this text.</span>
<br><div style="text-align: left;"><br></div><br><div style="text-align: left;"><br></div><font size="2">
<span style="font-family: Arial;"></span></font></div>
I need to convert html text to pdf without lsing formatting as style tags .It needs to be a c# based solution.
Dec 29, 2011 05:47 PM|AZMatt|LINK
I use the RadEditor to do this type of functionality...
There are several other WYSIWYG editors out there like Cute Editor, CKEditor, etc. I am not sure which ones are free.
Also, you might look into iTextSharp...
Dec 30, 2011 02:21 AM|Giro|LINK
is there a solution without third party controls..
I am able to generate pdf thru itextsharp but the reqmt is to have css in pddf without losing style tags and fonts.....
is there a csharp solution avalible or any idea thru code?
Dec 30, 2011 09:17 AM|AZMatt|LINK
Not without re-inventing what others have already done. I still suggest a WISYWIG editor because they make it so much easier. If this is not an option, you will need to go through the documentation from Adobe (or others) in order to find out all of their
API calls to create a PDF file from your own code. Honestly, I have never done this because it wopuld take weeks of work to figure out. If somebody else has a suggestion, I would love to hear it as well!!
Dec 30, 2011 08:20 PM|decker dong - msft|LINK
For converting from a pure html to pdf，you can use this tool：http://www.winnovative-software.com/Html-To-Pdf-Converter.aspx
PS：This is a 3-rd party library，So microsoft doesn't take the responsibility for that usage。Only a recommand……