Accusoft.PdfXpress7.Net
RenderPageToDib(Int32,RenderOptions) Method




An integer value which represents the page to render.
A RenderOptions object which contains information about how to render the page.
Renders a page to a device-independent bitmap (DIB).
Syntax
'Declaration
 
Public Overloads Function RenderPageToDib( _
   ByVal pageNumber As Integer, _
   ByVal options As RenderOptions _
) As Integer
'Usage
 
Dim instance As Document
Dim pageNumber As Integer
Dim options As RenderOptions
Dim value As Integer
 
value = instance.RenderPageToDib(pageNumber, options)
public int RenderPageToDib( 
   int pageNumber,
   RenderOptions options
)
public: int RenderPageToDib( 
   int pageNumber,
   RenderOptions* options
) 
public:
int RenderPageToDib( 
   int pageNumber,
   RenderOptions^ options
) 

Parameters

pageNumber
An integer value which represents the page to render.
options
A RenderOptions object which contains information about how to render the page.

Return Value

Returns either an unmanaged HGLOBAL or a HGDIOBJ handle.

When options.ProduceDibSection=false, HGLOBAL is created.

When options.ProduceDibSection=true, HGDIOBJ is created.

Remarks

This method creates an unmanaged Windows DIB section or a global memory buffer containing a packed bitmap (DIB).

Note: The produced object must be deleted specifically, as the .NET runtime garbage collectors cannot clear up unmanaged resources.

C# Signature:

[DllImport("gdi32.dll")]

static extern bool DeleteObject(IntPtr hObject);

VB.NET Signature:

Public 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));

C# Signature:

[DllImport("kernel32.dll")]

static extern IntPtr GlobalFree(IntPtr hObject);

VB.NET Signature:

Public Declare GlobalFree Lib "kernel32" (ByVal hObject As IntPtr) As Boolean As System.IntPtr

A call would look like:

int DIB=document.RenderPageToDib(0);

GlobalFree(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