473,399 Members | 3,401 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,399 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 1120
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...

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.