![]() |
|
|||||||
| SDK ( DLL or ActiveX) Integrate PDF functions into your application easily. The SDK shares the same technology that powers Foxit Reader. |
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Is there a way to get a handle to the device context for the currently displayed page in the viewer? Something that I could attach an InkOverlay to? Not the viewer control size, but the PDF 'canvas' itself?
Thanks. David Keith
|
|
#2
|
||||
|
||||
|
Hi David,
Let me explain how our DLL works. It uses the following function to render one PDF page directly onto the DC of a viewer control: void FPDF_RenderPage(HDC dc, FPDF_PAGE page, int start_x, int start_y, int size_x, int size_y, int rotate, int flags); Therefore, there is no other DC or Canvas associated with the PDF page itself. All you can get is the DC of the viewer control. Please notice that the final paramter of the above function is a flag. If you set it to 0, then the PDF page will be rendered without annotation. If you set it to 1, then the PDF page will be rendered with annotation. |
|
#3
|
|||
|
|||
|
Should have explained, I'm using the ActiveX version.
Thanks. David Keith Quote:
|
|
#4
|
|||
|
|||
|
Function: BeforeDraw
Sent just before the painting of the viewer contents is about to begin. Prototype: void BeforeDraw (long dc) Parameters: dc - Handle to the DC on which painting is about to take place. Return value: None Function: AfterDraw Sent just after the painting of the viewer contents is completed. Prototype: void AfterDraw (long dc) Parameters: dc - Handle to the DC on which painting is about to take place. Return value: None |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|