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!!
Giro
Member
47 Points
77 Posts
need to convert html text into pdf without losing formatting like color style tags
Dec 29, 2011 05:49 PM|LINK
Hello,
I need to save the formatting of the text below
html text
I need to convert html text to pdf without lsing formatting as style tags .It needs to be a c# based solution.
AZMatt
Star
10652 Points
1898 Posts
Re: need to convert html text into pdf without losing formatting like color style tags
Dec 29, 2011 09:47 PM|LINK
I use the RadEditor to do this type of functionality...
http://demos.telerik.com/aspnet-ajax/editor/examples/pdfexport/defaultcs.aspx
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...
http://sourceforge.net/projects/itextsharp/
Matt
Giro
Member
47 Points
77 Posts
Re: need to convert html text into pdf without losing formatting like color style tags
Dec 30, 2011 06:21 AM|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?
AZMatt
Star
10652 Points
1898 Posts
Re: need to convert html text into pdf without losing formatting like color style tags
Dec 30, 2011 01:17 PM|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!!
Matt
Decker Dong ...
All-Star
118619 Points
18779 Posts
Re: need to convert html text into pdf without losing formatting like color style tags
Dec 31, 2011 12:20 AM|LINK
Hello Giro:)
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……
Best reguards!