Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFRasterizerMBS class.

DynaPDFRasterizerMBS.Abort

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Aborts raster process.

Stops the function RenderPage as soon as possible when RenderPage() is running in a separate thread.

DynaPDFRasterizerMBS.AddRasImage(Filter as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function adds an image from the rasterizer to the current open image file.

The output image must be opened with CreateImage() beforehand.

DynaPDFRasterizerMBS.AttachImageBuffer(Pic as Picture, RenderWithAlpha as boolean = false) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Attaches a new image buffer of the same pixelformat.

Returns true on success.
Added RenderWithAlpha parameter in plugin version 19.0.
If RenderWithAlpha is true, we render with alpha channel. If the destination is a picture has alpha channel, you should get the alpha there. Otherwise for picture without alpha channel, we only copy RGB channels.

See also:

DynaPDFRasterizerMBS.AttachImageBuffer(Rows as Memoryblock, Buffer as Memoryblock, Width as UInt32, Height as UInt32, ScanlineLen as Int32, PixelFormat as UInt32) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Attaches a new image buffer of the same pixelformat.

For Pixelformat pass one of the kpx* constants.
You can pass Rows or Buffer, but the other memoryblock should be nil.
Returns true on success.

See also:

DynaPDFRasterizerMBS.Constructor(PDF as DynaPDFMBS, DeviceContextHandle as Integer, Width as UInt32, Height as UInt32, PixFmt as UInt32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Initializes rasterizer targeting a device context.

Special version to simplify rendering into a device context. It creates a DIB Section into which pages can be rendered.

See also:

DynaPDFRasterizerMBS.Constructor(PDF as DynaPDFMBS, Pic as Picture, RenderWithAlpha as boolean = false)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new rasterizer object targeting the given picture.

Added RenderWithAlpha parameter in plugin version 19.0.
If RenderWithAlpha is true, we render with alpha channel. If the destination is a picture has alpha channel, you should get the alpha there. Otherwise for picture without alpha channel, we only copy RGB channels.

See also:

DynaPDFRasterizerMBS.Constructor(PDF as DynaPDFMBS, Rows as Memoryblock, Buffer as Memoryblock, Width as UInt32, Height as UInt32, ScanlineLen as Int32, PixelFormat as UInt32)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates a new rasterizer object targeting the given memory area.

For Pixelformat pass one of the kpx* constants.
You can pass Rows or Buffer, but the other memoryblock should be nil.

See also:

DynaPDFRasterizerMBS.Constructor(PDF as DynaPDFMBS, Width as Integer, Height as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The constructor.

Creates a new picture as buffer for you with the given size.
PDF must not be nil and point to a valid DynaPDF context.

See also:

DynaPDFRasterizerMBS.Redraw(DeviceContextHandle as Integer, DestX as Integer, DestY as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 13.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Because there is no direct access to the internal DIB Sesction when rendering into a device context, this function can be used to redraw the bitmap on the device context.

If RenderPageEx() was called in a separate thread then this function can be called after the thread returned. While the thread is running you can change the position by directly manipulating the coordinate variables which were passed to RenderPageEx().
The function calls the system function SetDIBitsToDevice() to copy the image into the device context.

Some examples using this method:

DynaPDFRasterizerMBS.RenderPageEx(DeviceContextHandle as Integer, byref DestX as Integer, byref DestY as Integer, page as DynaPDFPageMBS, options as DynaPDFRasterImageMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Renders a page into a device context.

Only valid if you called Constructor with DeviceContextHandle.
Returns true on success.

DynaPDFRasterizerMBS.RenderPageMT(page as DynaPDFPageMBS, options as DynaPDFRasterImageMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Renders a page of a PDF Document with the given options.

Returns true on success and false on failure.

Same as RenderPage, but with additional multithreading.

As the actual transfer runs on a preemptive thread, the event UpdateWindow is called asynchrounously and run a few milliseconds later.

Do not call other functions on this DynaPDFRasterizerMBS instance while RenderPageMT is running!

The work is performed on a preemptive thread, so this function does not block the application and can yield time to other Xojo threads. Must be called in a Xojo thread to enjoy benefits. If called in main thread will block, but keep other background threads running.
If you run several threads calling MT methods, you can get all CPU cores busy while main thread shows GUI with progress window.

DynaPDFRasterizerMBS.ResizeBitmap(DeviceContextHandle as Integer, Width as Integer, Height as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Changes the size of the DIB Section.

Only valid if you called Constructor with DeviceContextHandle.
Returns true on success.

The items on this page are in the following plugins: MBS DynaPDF Plugin.


The biggest plugin in space...