473,473 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

HTML to PDF or DOC

3 New Member
I'm currently working on a ASP.NET (C#) web application to process bids. Right now the user will enter in some rich text into a textbox (I'm using FreeTextBox for this) and the text gets saved as HTML to a MYSQL database. I need some suggestions on how to take this HTML and put it into either a PDF or Word. The problem I'm having is keeping the formatting like it would show in a browser, but have it in a PDF.

For example I might grab something like this from the database
<ul>
<li><font face="Century Gothic" size="2">Image</font></li>
<li><font face="Century Gothic" size="2">Question</font></li>
<li><font face="Century Gothic" size="2">Answer</font></li>
</ul>
and that's what will get put into a PDF or Word. I need it to retain the formatting as if it were viewed in a browser but inside a PDF or Word DOC. Does anyone have any suggestions for this?

I've done lots of searching on the Internet for possible solutions to this, but so far I have not found anything that will do what I need it to. All the PDF plug-ins seem to just insert the text, I need it to insert HTML and not see the tags, but see the formatting of the tags.

Thanks for any help. If you need any more details I can post more information/code/etc
Mar 29 '07 #1
2 1609
Motoma
3,237 Recognized Expert Specialist
I'm currently working on a ASP.NET (C#) web application to process bids. Right now the user will enter in some rich text into a textbox (I'm using FreeTextBox for this) and the text gets saved as HTML to a MYSQL database. I need some suggestions on how to take this HTML and put it into either a PDF or Word. The problem I'm having is keeping the formatting like it would show in a browser, but have it in a PDF.

For example I might grab something like this from the database
<ul>
<li><font face="Century Gothic" size="2">Image</font></li>
<li><font face="Century Gothic" size="2">Question</font></li>
<li><font face="Century Gothic" size="2">Answer</font></li>
</ul>
and that's what will get put into a PDF or Word. I need it to retain the formatting as if it were viewed in a browser but inside a PDF or Word DOC. Does anyone have any suggestions for this?

I've done lots of searching on the Internet for possible solutions to this, but so far I have not found anything that will do what I need it to. All the PDF plug-ins seem to just insert the text, I need it to insert HTML and not see the tags, but see the formatting of the tags.

Thanks for any help. If you need any more details I can post more information/code/etc
There are two ways you could do this with a PDF. The first would be to completely build the page in the PDF, formatting, text, images would all need to be placed. The second would be to load up a PDF with the layout you desire, and then overlay the text onto that. I have not used PDF generation in .NET, so I do not know how easily this could be done.
You may be able to do this easier in Word using a COM call to load up an HTML page, and then save it in as a .doc file.
Mar 29 '07 #2
Motoma
3,237 Recognized Expert Specialist
If you didn't have the requirement of taking raw HTML (and maybe even if you do), you could try using Crystal Reports to do this.
Jul 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

4
by: VK | last post by:
09/30/03 Phil Powell posted his "Radio buttons do not appear checked" question. This question led to a long discussion about the naming rules applying to variables, objects, methods and properties...
4
by: Francois Keyeux | last post by:
hello everyone: i have a web site built using vbasic active server scripting running on iis (it works on either iis 50 and 60, but is designed for iis 50) i know how to create a plain text...
1
by: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
33
by: LRW | last post by:
http://gto.ie-studios.net/index.php When you view the above site in IE, if the 1st of the three product images is tall enough to push the cell down a couple of pixels, IE somehow doesn't show...
0
by: Boris Ammerlaan | last post by:
This notice is posted about every week. I'll endeavor to use the same subject line so that those of you who have seen it can kill-file the subject; additionally, Supersedes: headers are used to...
9
by: Patient Guy | last post by:
Taking the BODY element as an example, all of its style attributes ('alink', 'vlink', 'background', 'text', etc.) are deprecated in HTML 4.01, a fact noted in the DOM Level 2 HTML specification. ...
5
by: serge calderara | last post by:
Dear all, I am new in asp.net and prepare myself for exam I still have dificulties to understand the difference between server control and HTML control. Okey things whcih are clear are the fact...
6
by: Guy Macon | last post by:
cwdjrxyz wrote: HTML 5 has solved the above probem. See the following web page: HTML 5, one vocabulary, two serializations http://www.w3.org/QA/2008/01/html5-is-html-and-xml.html
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.