PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sat Apr 27, 2024 7:42 am

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Current aspx page to pdf
PostPosted: Thu Sep 13, 2007 4:41 pm 
Offline

Joined: Thu Sep 13, 2007 4:37 pm
Posts: 1
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.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon Sep 17, 2007 8:27 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Sep 19, 2007 10:10 am 
Offline

Joined: Wed Sep 19, 2007 10:07 am
Posts: 4
Location: Birmingham, UK
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Sep 19, 2007 11:20 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3096
Location: Cologne, Germany
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


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat Dec 15, 2007 11:40 am 
Offline

Joined: Fri Dec 14, 2007 12:36 pm
Posts: 1
I have the same problem.
Are there some news or is it still impossible?

And are there any alternatives?


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 397 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group