PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Sun Jun 30, 2024 6:18 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Tue Sep 18, 2012 1:13 pm 
Offline

Joined: Mon Sep 10, 2012 11:25 am
Posts: 5
Hello,

I have a PagePreview control on my form.I would like to draw on this control, but have no idea how.(I have no problem to create a PDF with PDFSharp).
Someone has a code example for me?

:? Günter


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 18, 2012 1:31 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
Hi!

Look at the Preview sample:
http://www.pdfsharp.net/wiki/Preview-sample.ashx

Complete source code included in the PDFsharp source ZIP file.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 18, 2012 1:42 pm 
Offline

Joined: Mon Sep 10, 2012 11:25 am
Posts: 5
Hello Thomas,

I know this code.But I do not see here how I draw on the PagePreview control.

Günter


Top
 Profile  
Reply with quote  
PostPosted: Tue Sep 18, 2012 1:58 pm 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
You write a Render method. This method is called to draw on the Preview.
Assign it to "form.RenderEvent" of the Preview form.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 20, 2012 7:34 am 
Offline

Joined: Mon Sep 10, 2012 11:25 am
Posts: 5
Hi Thomas,

I do not come on.
You've probably got a small code example for the render method and call?

Günter


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 20, 2012 8:34 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3100
Location: Cologne, Germany
The Preview sample is included in the source code ZIP file.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 84 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