Accusoft.PdfXpress7.Net
RenderPageToDib(Int32) Method




An integer value which represents the page number to render.
Renders a page to a Device-Independent-Bitmap at screen resolution.
Syntax
'Declaration
 
Public Overloads Function RenderPageToDib( _
   ByVal pageNumber As Integer _
) As Integer
'Usage
 
Dim instance As Document
Dim pageNumber As Integer
Dim value As Integer
 
value = instance.RenderPageToDib(pageNumber)
public int RenderPageToDib( 
   int pageNumber
)
public: int RenderPageToDib( 
   int pageNumber
) 
public:
int RenderPageToDib( 
   int pageNumber
) 

Parameters

pageNumber
An integer value which represents the page number to render.
Remarks

This method creates an unmanaged Windows GDI bitmap object.

Note: This object must be deleted specifically, as the .NET runtime garbage collectors cannot clear up unmanaged resources. Clean up can be done via a call to DeleteObject(hBitmap).

Calling RenderPageToDib(Int32) is equivalent to calling RenderPageToDib(Int32, rendOptions), where rendOptions is a RenderOptions object with rendOptions.ProduceDibSection=true. That makes calling DeleteObject() necessary.

C# Signature:

[DllImport("gdi32.dll")]

static extern bool DeleteObject(IntPtr hObject);

VB.NET Signature:

Publlic Declare Function DeleteObject Lib "gdi32" (ByVal hObject As IntPtr) As Boolean

A call would look like:

int DIB=document.RenderPageToDib(0);

DeleteObject(new System.IntPtr(DIB));

Copy protected rendering functionality is to be used only for viewing of copy protected PDF documents. This functionality should not be used to violate or bypass PDF file security measures which prevent copying or editing the PDF documents.

See Also

Reference

Document Class
Document Members
Overload List

 

 


©2017. Accusoft Corporation. All Rights Reserved.

Send Feedback