473,241 Members | 1,472 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,241 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 1107
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Raaijmakers, Vincent (IndSys, GE Interlogix) | last post by:
Ok, perhaps a question on a newbie level. I try to create a simple 'write to a console application' where all the items in a string do have a variable size: items = Well, actually, I need to...
385
by: Xah Lee | last post by:
Jargons of Info Tech industry (A Love of Jargons) Xah Lee, 2002 Feb People in the computing field like to spur the use of spurious jargons. The less educated they are, the more they like...
18
by: Mad Programmer | last post by:
I'm writing a destructive trojan with C++ and I need to know how I can destroy the target's monitor and format the target's harddisk before the target can stop the program. What do I need to do?
2
by: Jeevan | last post by:
Hi, I have an array of data (which I am getting from a socket connection). I am working on a program which acts on this data but the program is written to work on data from a file (not from an...
7
by: Moti | last post by:
Hi all I use C# to read messages from msmq queue. When I knew that it is writing in c# I can read it. When I knew that it is writing in VB6 I can read it. How can I know in which format the...
2
by: simonc | last post by:
Is there an easy way of writing a number in 32 bit integer format into four bytes of a file? I am experimenting with FilePut but I can only make it work by defining a four byte array and doing some...
12
by: Chris Springer | last post by:
I'd like to get some feedback on the issue of storing data out to disk and where to store it. I've never been in a production environment in programming so you'll have to bear with me... My...
3
by: jitu.csewizard | last post by:
hi overview: function sprintf(<buffername>,<format string>, .....) in this function you need to allocate the size of buffername before hand. question: function ssprintf(<buffername>,<format...
6
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.