471,325 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,325 software developers and data experts.

Writing to DOC and then to PDF format

I have designed a method that returns a DataSet object.
Based on that, i create a DOC file and then return it
to the client as follows.

Response.Clear();
Response.AddHeader(
"content-disposition",
string.Format("attachment;filename=SearchResult_{0 }_{1}.doc",
DateTime.Now.ToShortDateString(),
DateTime.Now.ToShortTimeString()));
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.ContentType = "application/vnd.word";
System.IO.StringWriter stringWrite
= new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite
= new HtmlTextWriter(stringWrite);
newGrid.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();

By changing the code slightly, i can make the printout
to give me XLS file as well, which is great.

My question is - how can i make my DataSet object to
return a PDF? Today i'm using a solution which isn't
feasible. Can the above be redesigned to give me what
i need? Please advise.
--
Regards
Konrad Viltersten
Jun 27 '08 #1
4 1045
Search for .NET PDF liblaries. There are number of comercial products and
even a few free open source projects. I personally used and would highly
recommand Siberix Report Writer (www.siberix.com) . Great product really
robust and easy to use

"K Viltersten" wrote:
I have designed a method that returns a DataSet object.
Based on that, i create a DOC file and then return it
to the client as follows.

Response.Clear();
Response.AddHeader(
"content-disposition",
string.Format("attachment;filename=SearchResult_{0 }_{1}.doc",
DateTime.Now.ToShortDateString(),
DateTime.Now.ToShortTimeString()));
Response.Charset = "";
Response.Cache.SetCacheability(HttpCacheability.No Cache);
Response.ContentType = "application/vnd.word";
System.IO.StringWriter stringWrite
= new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWrite
= new HtmlTextWriter(stringWrite);
newGrid.RenderControl(htmlWrite);
Response.Write(stringWrite.ToString());
Response.End();

By changing the code slightly, i can make the printout
to give me XLS file as well, which is great.

My question is - how can i make my DataSet object to
return a PDF? Today i'm using a solution which isn't
feasible. Can the above be redesigned to give me what
i need? Please advise.
--
Regards
Konrad Viltersten
Jun 27 '08 #2
Search for .NET PDF liblaries. There are number of comercial products and
even a few free open source projects. I personally used and would highly
recommand Siberix Report Writer (www.siberix.com) . Great product really
robust and easy to use
It seems to be a very nice and smotth product. It's just a little
bit outside the price range for my project, right now. It doesn't
need to be free but should be close to...

Thanks for the hint, anyway.

--
Regards
Konrad Viltersten
Jun 27 '08 #3

I'd say $299 for a corporate license is probably very close to the cheapest
..NET component you will be able to find. I'd recommend searching for open
source PDF
implementation. For example:
http://csharp-source.net/open-source/pdf-libraries


"K Viltersten" wrote:
Search for .NET PDF liblaries. There are number of comercial products and
even a few free open source projects. I personally used and would highly
recommand Siberix Report Writer (www.siberix.com) . Great product really
robust and easy to use

It seems to be a very nice and smotth product. It's just a little
bit outside the price range for my project, right now. It doesn't
need to be free but should be close to...

Thanks for the hint, anyway.

--
Regards
Konrad Viltersten
Jun 27 '08 #4
I'd say $299 for a corporate license is probably veryclose to the
cheapest .NET component you will be ableto find. I'd recommend searching
for open source PDF
implementation. For example:
http://csharp-source.net/open-source/pdf-libraries
I agree that it's not much money. However, the budget
i've got doesn't allow it, unfortunately. It's mostly
because we're already creating PDF's successfully and
i'm only looking for an improvement of the methods
we're using.

From the list of software the link above points to,
i'd like to know if you have a personal
recommendation based on experience (your own or one
that you've heard of).

--
Regards
Konrad Viltersten
Jun 27 '08 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Raaijmakers, Vincent (IndSys, GE Interlogix) | last post: by
385 posts views Thread by Xah Lee | last post: by
18 posts views Thread by Mad Programmer | last post: by
2 posts views Thread by simonc | last post: by
12 posts views Thread by Chris Springer | last post: by
3 posts views Thread by jitu.csewizard | last post: by
6 posts views Thread by arne.muller | last post: by

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.