Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 29th, 2005, 03:24 AM
Authorized User
 
Join Date: Jun 2005
Location: , , Philippines.
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default Creating PDF Files

How do i generate a pdf file from a dataset?
I want to display all tables in the dataset into a pdf format using c#.




Aldwin Enriquez
President,Software Engineer - Narrasoft Philippines Inc.
"When it's getting harder,push harder,never give it up!"
__________________
\"Dont you ever give up!\"
  #2 (permalink)  
Old June 29th, 2005, 03:04 PM
Friend of Wrox
 
Join Date: Jul 2003
Location: , , .
Posts: 121
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hi,
I did not understand. Do you want to display PDF file on the page or generate one? One of the ways to consider is to generate Crystal Report based on data from your database and to convert this report into PDF format physically or programmatically.
-Dmitriy
  #3 (permalink)  
Old June 30th, 2005, 05:15 AM
Authorized User
 
Join Date: Jun 2005
Location: , , Philippines.
Posts: 97
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to aldwinenriquez
Default

I want to generate a pdf file programmatically from the dataset and send the pdf file as a WebResponse so the client user can just open or save it to their disk

Aldwin Enriquez
"Dont you ever give up!"
  #4 (permalink)  
Old January 12th, 2006, 06:43 AM
Authorized User
 
Join Date: Mar 2005
Location: Mumbai, Maharastra, India.
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

try this code----


Response.Clear();
        Response.ContentType = "application/pdf";

        Response.AddHeader("content-disposition", "attachment;filename=FileName.pdf");

        Response.Charset = "";



      (HttpCacheability.NoCache);


        System.IO.StringWriter stringWrite = new System.IO.StringWriter();

        System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite);

        GridView1.RenderControl(htmlWrite);

        Response.Write(stringWrite.ToString());

        Response.End();


 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help w/ creating PDF files in Excel ArtDecade VB.NET 2002/2003 Basics 2 June 14th, 2006 11:06 PM
creating thumbnail for pdf files via php pritz PHP How-To 0 March 10th, 2006 04:09 AM
Creating a PDF in .Net sureshbabu VB.NET 1 June 14th, 2005 06:22 AM
Creating a PDF file niravp Classic ASP Databases 2 September 30th, 2004 07:51 PM
Creating Adobe PDF files from VBA baNTON Access VBA 3 March 11th, 2004 02:41 AM



All times are GMT -4. The time now is 01:26 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.