PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index PDFsharp - moved to http://forum.pdfsharp.net/
Please visit the new PDFsharp forum at http://forum.pdfsharp.net/
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to create a Pdf from an asp page

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/
View previous topic :: View next topic  
Author Message
Lug16



Joined: 18 Sep 2008
Posts: 3

PostPosted: Thu Sep 18, 2008 5:11 pm    Post subject: How to create a Pdf from an asp page Reply with quote

Hello everyone:

I'm understanding the PdfSharp library and I want to create a PDF from a existing ASP page in my application, I've read the clock example, and I dont know how to create the pdf from the current page (with images and styles).

Any help will be grateful

Thank you
Back to top
View user's profile Send private message
stardust



Joined: 05 Sep 2008
Posts: 5

PostPosted: Fri Sep 19, 2008 5:55 pm    Post subject: Reply with quote

Havn't had a look at the Clock example yet, but I would imagine you need to parse the HTML in the redendered asp page and translate the parsed HTML document into a PDF.

Sounds like what I am trying to do but I havn't got a page to begin with, all I have is data from databases.
Back to top
View user's profile Send private message
Lug16



Joined: 18 Sep 2008
Posts: 3

PostPosted: Fri Sep 19, 2008 7:50 pm    Post subject: Reply with quote

stardust wrote:
Havn't had a look at the Clock example yet, but I would imagine you need to parse the HTML in the redendered asp page and translate the parsed HTML document into a PDF.

Sounds like what I am trying to do but I havn't got a page to begin with, all I have is data from databases.


Thanks for the answer...
Do you have any example to follow?
Thank you...
Back to top
View user's profile Send private message
stardust



Joined: 05 Sep 2008
Posts: 5

PostPosted: Sun Sep 21, 2008 8:10 am    Post subject: Reply with quote

I don't have any example for you because there are so many ways to parse HTML into some kind of Object collection which is application specific. What you can do is try to look at some example of parsing XML and get some ideas from those.

Once you have the Object representation of the HTML document, you then need to defind some rules how to translate those objects into PdfSharp object or using the DOM objects from MigraDoc API.

For example:
If you have translated a <p> into a customParagraph object, then you can translate it into the Paragraph object in MigraDoc. Then assign the content of the <p> tag as the text of the Paragraph.

Of coz you need to take into account of tags can be nested.
Back to top
View user's profile Send private message
Lug16



Joined: 18 Sep 2008
Posts: 3

PostPosted: Wed Oct 29, 2008 6:26 am    Post subject: Reply with quote

Hello Again...

I've read the clock example again( http://www.pdfsharp.com/PDFsharp/index.php?option=com_content&task=view&id=26&Itemid=36 ) and it looks like the whole asp page is converted to a MemoryStream object.
The clock is created with de XGraphics functions and the stream is loaded with it.
But I really try to get the stream data from my current page in asp(without any XGraphics creation, just a repeater with some information) and load it in the pdfDocument but it just create an empty pdf file...

I hope your help in this issue...

Thanks for your replies...
Back to top
View user's profile Send private message
Moviaa



Joined: 23 Nov 2008
Posts: 1

PostPosted: Sun Nov 23, 2008 4:46 pm    Post subject: Reply with quote

Do someone know how to achieve this?
Is this at all possible with PDFSharp?
Back to top
View user's profile Send private message
Thomas Hoevel



Joined: 16 Oct 2006
Posts: 387
Location: Cologne, Germany

PostPosted: Mon Nov 24, 2008 9:07 am    Post subject: Reply with quote

Moviaa wrote:
Do someone know how to achieve this?
Is this at all possible with PDFSharp?

Stardust gave you the answer:
http://pdfsharp.s3.bizhat.com/viewtopic.php?p=1107#1107
_________________
Regards
Thomas Hoevel
PDFsharp Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    PDFsharp - moved to http://forum.pdfsharp.net/ Forum Index -> Support - moved to http://forum.pdfsharp.net/ All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © phpBB Group. Hosted by phpBB.BizHat.com


Start Your Own YouTube Clone

Free Web Hosting | Free Forum Hosting | FlashWebHost.com | Image Hosting | Photo Gallery | FreeMarriage.com

Powered by PhpBBweb.com, setup your forum now!
For Support, visit Forums.BizHat.com