Wrox Programmer Forums
|
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 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
 
Old September 19th, 2006, 04:17 AM
Authorized User
 
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default converting web page to pdf file

hi all,

I am creating the reports in my web application using aspx page and datagrid control. This can be a multipage report. I want to print this report to PDF file.

Can anybody suggest how to do it. I have already tried many tools. and I don't want to buy any third part component for the conversion.

Is there any way to convert web page into pdf file.

Alternatively I would like know whether I can create a print preview of the web page and print it. if there is no way to convert web page to pdf file.

 
Old September 19th, 2006, 07:22 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Unless you understand how to progmatically create a PDF file you are going ot have to puchase a 3rd party component.

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
 
Old September 19th, 2006, 07:39 AM
Authorized User
 
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I heard of printer drivers which directly print any document to PDF file. If you know such driver that will also do. The main problem is I am using datagrid for displaying the report and the datagrid has multiple pages. before printing this report from the web I want to display the user all the records in the datagrid.

Like in print preview of internet explorer we can see the total pages and can browse through the pages before printing. I want to create that effect. Is there any other method to atleast create print preview of the html page???

 
Old September 19th, 2006, 07:43 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

You can export the entire datagrid to word and present the user with a word document, but there is no real way to present a print preview. (About the only way you could do this would be to spawn a Javascript window that has no tool bars, etc and just display the information of the report and even that is only so accurate because of margins and such)

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
 
Old September 19th, 2006, 07:53 AM
Authorized User
 
Join Date: Mar 2006
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have already tried that. But In word the table borders do not look good. event if you set border style equal to none the borders of the grid gets displayed which do not look good.

I thought of another way but don't know how to implement it. Can we access Internet explorer as object and call it's print preview functionality throgh coding. If this can be done, that will be the best solution. Also I want to manipulate the header and footer that bydefault gets displayed. but that is on least priority.

 
Old September 19th, 2006, 07:58 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I dont *think* its possible to access IE as an object and call its print preview function, even if it could be though what would happen if I came to this site on, say, Firefox?

--Stole this from a moderator

I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Open a PDF file in a web application zaghmout ASP.NET 2.0 Professional 2 September 19th, 2008 12:53 PM
open pdf file within aspx page shaktis General .NET 3 November 2nd, 2007 12:58 PM
Show a pdf file on the page gabrieldcr2 ASP.NET 1.0 and 1.1 Professional 2 October 5th, 2006 05:17 PM
Access report print each page to separate PDF file conh2so4aq Access VBA 5 July 3rd, 2006 08:00 PM
creating pdf of web page on the fly ghari ASP.NET 1.0 and 1.1 Basics 1 December 12th, 2005 04:27 PM





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