Last post Dec 31, 2011 01:20 AM by Decker Dong - MSFT
Dec 29, 2011 06: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 10: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 07: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 02:17 PM|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 31, 2011 01:20 AM|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……