Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old July 20th, 2007, 05:13 PM
Registered User
 
Join Date: May 2006
Location: Delhi, Delhi, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default PDF from ASP.NET application

Hi guys,
Can anyone tell me how i can open a report(which exists as a simple text file) in PDF format. It is a ASP.NET application & language used is VB/NET. Does .NET class library has a class which supports PDF format? Or we need to take help of some third party component? Plz suggest.

  #2 (permalink)  
Old July 20th, 2007, 10:35 PM
planoie's Avatar
Friend of Wrox
Points: 16,481, Level: 55
Points: 16,481, Level: 55 Points: 16,481, Level: 55 Points: 16,481, Level: 55
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2003
Location: Clifton Park, New York, USA.
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

.NET does not have a way of converting to PDF. You will need a third party conversion tool.

-Peter
  #3 (permalink)  
Old July 24th, 2007, 10:55 AM
Registered User
 
Join Date: May 2006
Location: Delhi, Delhi, India.
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks.....

  #4 (permalink)  
Old July 26th, 2007, 04:24 PM
Friend of Wrox
 
Join Date: Feb 2006
Location: , , USA.
Posts: 116
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Two years ago I had to implement dynamic PDF document creation in an ASP.NET application and it was far more difficult than I anticipated because the third party tools that existed were just not very good.

What we really needed was a tool that could just take an HTML document and turn that into a PDF page keeping it's formatting and layout. I never found such a tool that could actually pull that off. One of the tools I found had a very strange object model and in many cases documentation was sparse. I eventually picked one and getting it to format documents how we needed was a pain in the ass considering the documents really weren't very complex.

If you find a good PDF library, could you let me know? I am sure I will get another project requiring that functionality again at some point!
  #5 (permalink)  
Old July 29th, 2007, 12:39 AM
Friend of Wrox
 
Join Date: Aug 2006
Location: Amman, , Jordan.
Posts: 109
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ok look, if this text file contains a defined data, you can create a dataset, use an oleDP data adapter and fill the dataset, and bind it to a cystal report, and then export this report to a PDF

Nothing is impossible. The impossible only takes longer. "Digital Fortress, Dan Brown"
  #6 (permalink)  
Old December 12th, 2013, 04:48 AM
Registered User
Points: 21, Level: 1
Points: 21, Level: 1 Points: 21, Level: 1 Points: 21, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2013
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: PDF from ASP.NET application

For future references here is one VB.NET Word component which I found to have a very satisfying PDF results. It offers a feature for converting a HTML to a PDF file in .NET or you can just use a plain text while creating a PDF file.
Also it has this really nice feature for exporting PDF files in ASP.NET, here is an example of it usage:
Code:
' Create a new empty document.
Dim document = New DocumentModel()

' Add document content.
document.Sections.Add(
    New Section(document,
        New Paragraph(document, "Hello world!")))

/ Stream file to browser in PDF file format.
document.Save(Me.Response, "Document.pdf");


Similar Threads
Thread Thread Starter Forum Replies Last Post
Readin a pdf file from asp.net application ashwinjp ASP.NET 2.0 Basics 1 July 13th, 2019 11:45 AM
Convert html to pdf file by using asp.net in c# dey.susanta.kolkata ASP.NET 2.0 Professional 4 September 19th, 2016 07:20 AM
Word to Pdf Convertor c#.net Web Application aveekb ASP.NET 1.0 and 1.1 Professional 2 July 24th, 2013 04:11 AM
Exporting Crystal Reports to PDF using ASP.NET Gyto Crystal Reports 2 November 22nd, 2006 12:53 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.