View previous topic :: View next topic |
Author |
Message |
josep
Joined: 13 Sep 2007 Posts: 1
|
Posted: Thu Sep 13, 2007 4:41 pm Post subject: Current aspx page to pdf |
|
|
Sorry, if this sounds silly, but I have looked in all the samples and in all questions of the forum and could not figure this out... I did see the samples with strings and images(tried them and they work great), but nothing that will generate a pdf from the current page.
I have a aspx page with a gridview in it and I want the user to click a button and generate a pdf file from that page with the current contents. How do I do that?
Thanks. |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Mon Sep 17, 2007 8:27 am Post subject: |
|
|
PDFsharp cannot read HTML.
The best way to do this is using MigraDoc to create a table and fill this table with the values from the GridView.
A few lines of code, two nested loops (rows and columns) - MigraDoc will take care of pagebreaks automatically and the header row appears on every page. _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
Charlie_Lee
Joined: 19 Sep 2007 Posts: 4 Location: Birmingham, UK
|
Posted: Wed Sep 19, 2007 10:10 am Post subject: |
|
|
Is anyone working on an expansion to PDFSharp to allow the basic rendering of HTML. It wouldn't take much I wouldn't have thought to expand the component to allow HTML to be sent to it and then output to the PDF document.
I'm not thinking full CSS support just basic formatting tags initially. Is this something that has been looked at? _________________ =====================
Charles Lee
Software Developer |
|
Back to top |
|
|
Thomas Hoevel
Joined: 16 Oct 2006 Posts: 387 Location: Cologne, Germany
|
Posted: Wed Sep 19, 2007 11:20 am Post subject: |
|
|
The PDFsharp team has discussed the idea of an HTML2PDF tool, but AFAIK noone has ever started working on that project.
How to start? Write an HTML parser? Use an existing parser (can IE objects be used?)?
The idea is not forgotten, but we have many other tasks with higher priority.
So if you write something useful we'll consider adding that to PDFsharp _________________ Regards
Thomas Hoevel
PDFsharp Team |
|
Back to top |
|
|
m4ri0
Joined: 14 Dec 2007 Posts: 1
|
Posted: Sat Dec 15, 2007 11:40 am Post subject: |
|
|
I have the same problem.
Are there some news or is it still impossible?
And are there any alternatives? |
|
Back to top |
|
|
|