PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Mon Aug 19, 2024 12:17 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: PDF Sharp Page Handle
PostPosted: Fri Sep 10, 2010 6:41 am 
Offline

Joined: Fri Sep 10, 2010 6:30 am
Posts: 2
Hi ,

How to get the handle of the page. i want to pass the handle of the page to my method that will render the content on the object associated with handle.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 13, 2010 8:45 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3108
Location: Cologne, Germany
Ramashankar wrote:
i want to pass the handle of the page to my method

Pass the PdfPage object to your method.
Maybe I don't understand the question correctly.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 13, 2010 10:33 am 
Offline

Joined: Fri Sep 10, 2010 6:30 am
Posts: 2
Ramashankar wrote:
i want to pass the handle of the page to my method

Pass the PdfPage object to your method.
Maybe I don't understand the question correctly.

_________________
Regards
Thomas Hoevel
PDFsharp Team


Hi Thomas,
Thank you very much for your reply.
Let me explain my question again-
I have controls library written in vb6.0.
Every control has their Draw Method, which is used to render the object on the surface (screen / Printer).
Basically that method can accept the any object as a surface, provided it will have HWND (pointer) Property.
For ex: - VB Printer, Picture Box, etc.
I want to pass HWND (pointer) of PdSharp objects, but I am unable to find the HWND property or any method similar to that.
As like we have for other objects-
Graphics graphicsDisplay = CreateGraphics();
IntPtr hdc = graphicsDisplay.GetHdc();

Form _frmSurface = _PrintObjectContainger;
IntPtr handle = _frmSurface.Handle;

I want something like

IntPtr handle = PDFPage.Handle [/color]
Or
IntPtr handle = _paragraph.HWND

Thanks.


Top
 Profile  
Reply with quote  
PostPosted: Mon Sep 13, 2010 11:40 am 
Offline
PDFsharp Guru
User avatar

Joined: Mon Oct 16, 2006 8:16 am
Posts: 3108
Location: Cologne, Germany
A PdfPage is a PDF page and not a window. There is no HWND.

You can try to have your controls draw on a memory bitmap and then draw that bitmap on the PDF page.

_________________
Regards
Thomas Hoevel
PDFsharp Team


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 65 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