Platforms to show: All Mac Windows Linux Cross-Platform
Back to DynaPDFRasterizerMBS class.
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DynaPDF | MBS DynaPDF Plugin | 11.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
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 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 |
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 |
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 |
Special version to simplify rendering into a device context. It creates a DIB Section into which pages can be rendered.
See also:
- Constructor(PDF as DynaPDFMBS, Pic as Picture, RenderWithAlpha as boolean = false)
- Constructor(PDF as DynaPDFMBS, Rows as Memoryblock, Buffer as Memoryblock, Width as UInt32, Height as UInt32, ScanlineLen as Int32, PixelFormat as UInt32)
- Constructor(PDF as DynaPDFMBS, Width as Integer, Height as Integer)
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 |
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:
- Constructor(PDF as DynaPDFMBS, DeviceContextHandle as Integer, Width as UInt32, Height as UInt32, PixFmt as UInt32)
- Constructor(PDF as DynaPDFMBS, Rows as Memoryblock, Buffer as Memoryblock, Width as UInt32, Height as UInt32, ScanlineLen as Int32, PixelFormat as UInt32)
- Constructor(PDF as DynaPDFMBS, Width as Integer, Height as Integer)
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 |
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 |
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:
- Constructor(PDF as DynaPDFMBS, DeviceContextHandle as Integer, Width as UInt32, Height as UInt32, PixFmt as UInt32)
- Constructor(PDF as DynaPDFMBS, Pic as Picture, RenderWithAlpha as boolean = false)
- Constructor(PDF as DynaPDFMBS, Rows as Memoryblock, Buffer as Memoryblock, Width as UInt32, Height as UInt32, ScanlineLen as Int32, PixelFormat as UInt32)
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 |
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.RenderPage(page as DynaPDFPageMBS, options as DynaPDFRasterImageMBS) as boolean
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
method | DynaPDF | MBS DynaPDF Plugin | 11.1 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns true on success and false on failure.
Some examples using this method:
- /DynaPDF/PDF Viewer Example with links
- /DynaPDF/Raster/DynaPDF Display PDF
- /DynaPDF/Raster/DynaPDF Display PDF with Links
- /DynaPDF/Raster/DynaPDF Raster to MemoryBlock
- /DynaPDF/Raster/PDF Benchmark
- /DynaPDF/Raster/Render Tests/Render Test 4
- /DynaPDF/Raster/updatewindow event/Display PDF
- /DynaPDF/Tables/Dynamic Table/DynaPDF Table Multi Page
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 |
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 |
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 |
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.