Platforms to show: All Mac Windows Linux Cross-Platform
Back to DynaPDFMBS class.
DynaPDFMBS.ReplaceFontEx(PDFFontRef as Integer, FontFile as FolderItem, Embed as boolean = true) as integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The font file can be loaded directly. It is not required to install the font on the system. The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.
If the function succeeds the return value is zero. If the function fails the return value is a negative error code.
See also:
See also ReplaceFontEx function in DynaPDF manual.
DynaPDFMBS.ReplaceFontEx(PDFFontRef as Integer, FontFilePath as string, Embed as boolean = true) as integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The font file can be loaded directly. It is not required to install the font on the system. The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.
If the function succeeds the return value is zero. If the function fails the return value is a negative error code.
See also:
See also ReplaceFontEx function in DynaPDF manual.
DynaPDFMBS.ReplaceFontExAnsi(PDFFontRef as Integer, FontFilePath as string, Embed as boolean = true) as integer Deprecated
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The font file can be loaded directly. It is not required to install the font on the system. The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.
If the function succeeds the return value is zero. If the function fails the return value is a negative error code.
See also ReplaceFontEx function in DynaPDF manual.
DynaPDFMBS.ReplaceICCProfile(ColorSpace as Integer, ICCFile as folderitem) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Use in OnReplaceICCProfile event.
Some examples using this method:
- /DynaPDF/PDF-A/Combine PDF files to PDFA
- /DynaPDF/PDF-A/Create PDFA
- /DynaPDF/PDF-A/Normalize PDF
- /DynaPDF/signed pdfa/signed pdfa
See also ReplaceICCProfile function in DynaPDF manual.
DynaPDFMBS.ReplaceICCProfileEx(ColorSpace as integer, ICCFileData as MemoryBlock) as integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the function succeeds the return value is zero. If the function fails the return value is a negative error code.
Use in OnReplaceICCProfile event.
See also:
See also ReplaceICCProfileEx function in DynaPDF manual.
DynaPDFMBS.ReplaceICCProfileEx(ColorSpace as integer, ICCFileData as String) as integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the function succeeds the return value is zero. If the function fails the return value is a negative error code.
Use in OnReplaceICCProfile event.
See also:
See also ReplaceICCProfileEx function in DynaPDF manual.
DynaPDFMBS.ReplaceImage(ImageToReplace as DynaPDFImageMBS, ImageFile as FolderItem, Index as Integer = 1, ColorSpace as Integer = 0, CSHandle as Integer = -1, Flags as Integer = 0) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The parameter ImageToReplace must be a valid pointer of an image object which is retrieved by functions like GetImageObj() or ParseContent().
The resolution, aspect ratio, color space and so on can be freely chosen. However, note that this function does not change the output position or size. If the aspect ratio of the new image is different, then it will be stretched or shrinked to fit into the output rectangle.
The parameter ColorSpace specifies the destination color space into which the image should be converted or saved, if the image is already defined in that color space. CSHandle must be the handle of that color space if a non-device space is used. The will be ignored for devices spaces.
The function works in the very same way as InsertImageEx() with the following differences:
• The color of an image mask cannot be set or changed because this would require changes on the content stream in which the image is used. An image mask will be created if the image color depth is 1 bit and if color key masking is enabled (see SetUseTransparency()). SetUseTransparency() should normally be set to false before calling this function.
• The image will never be downscaled, independent of the current resolution, because the size of the output rectangle is not known.
If the image that should be replaced is a soft mask of another base image, then make sure that the destination color space is set to kesDeviceGray, kesCalGray, or to a one channel ICC based color space because a soft mask must not contain more than one color channel.
The flags kgfUseImageColorSpace, kgfIgnoreICCProfiles, kgfRealPassThrough, and kfNoBitmapAlpha are all supported. See SetGStateFlags() for further information.
If the function succeeds the return value is true. If the function fails the return value is false.
See also ReplaceImage function in DynaPDF manual.
DynaPDFMBS.ReplaceImageEx(ImageToReplace as DynaPDFImageMBS, ImageData as MemoryBlock, Index as Integer = 1, ColorSpace as Integer = 0, CSHandle as Integer = -1, Flags as Integer = 0) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See ReplaceImage() for further information.
If the function succeeds the return value is 1. If the function fails the return value is 0.
See also:
See also ReplaceImageEx function in DynaPDF manual.
DynaPDFMBS.ReplaceImageEx(ImageToReplace as DynaPDFImageMBS, ImageData as String, Index as Integer = 1, ColorSpace as Integer = 0, CSHandle as Integer = -1, Flags as Integer = 0) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.5 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See ReplaceImage() for further information.
If the function succeeds the return value is 1. If the function fails the return value is 0.
See also:
See also ReplaceImageEx function in DynaPDF manual.
DynaPDFMBS.ReplacePageText(text as string, stack as DynaPDFStackMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Be aware that ReplacePageText can't always replace text as encoding must match and fonts may not have the characters for the new text. For that better use ReplacePageTextEx.
If you have problems with asian characters, please make sure you use SetCMapDir and load the CMAPs.
Requires DynaPDF Pro license.
Some examples using this method:
See also ReplacePageText function in DynaPDF manual.
DynaPDFMBS.ReplacePageTextEx(text as string, stack as DynaPDFStackMBS) as boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 7.7 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The text parameter is converted to unicode.
If you have problems with asian characters, please make sure you use SetCMapDir and load the CMAPs.
Requires DynaPDF Pro license.
See also ReplacePageTextEx function in DynaPDF manual.
DynaPDFMBS.ReplacePageTextExAnsi(text as string, stack as DynaPDFStackMBS) as boolean Deprecated
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
The text parameter is converted to ANSI.
Requires DynaPDF Pro license.
See also ReplacePageTextEx function in DynaPDF manual.
DynaPDFMBS.ResetAnnotAP(Handle as integer = -1) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 20.3 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If Handle is set to -1 all annotation appearances will be rebuild. This function be useful if an imported annotation has an invalid or empty appearance stream.
See also ResetAnnotAP function in DynaPDF manual.
DynaPDFMBS.ResetEncryptionSettings as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
If the function succeeds the return value is true. If the function fails the return value is false.
See also ResetEncryptionSettings function in DynaPDF manual.
DynaPDFMBS.ResetLineDashPattern as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also ResetLineDashPattern function in DynaPDF manual.
DynaPDFMBS.RestoreGraphicState as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
See also RestoreGraphicState function in DynaPDF manual.
DynaPDFMBS.RotateCoords(alpha as Double, OriginX as Double, OriginY as Double) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Please do not try to scale/skew/translate back later. use SaveGraphicState and RestoreGraphicState.
Some examples using this method:
- /DynaPDF/Create PDF with object2d
- /DynaPDF/Create PDF with vertical text
- /DynaPDF/place centered/place centered and rotate
See also RotateCoords function in DynaPDF manual.
DynaPDFMBS.RotateTemplate(OldTemplate as Integer, Rotation as Integer, RotateCoords as boolean = true) as Integer
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 17.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Returns a new template handle.
This is a convenience function which creates a new template and draws the existing template there with rotation.
Returns negative number for errors. The plugin uses -1 for plugin errors like wrong rotation angle.
RotateCoords: Whether to rotate coordinate system.
This is now done by DynaPDF automatically, so for current version of the library, this must be false. But older versions need the true.
Some examples using this method:
DynaPDFMBS.RoundRect(PosX as Double, PosY as Double, Width as Double, Height as Double, Radius as Double, FillMode as Integer) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
See also RoundRect function in DynaPDF manual.
DynaPDFMBS.RoundRectEx(PosX as Double, PosY as Double, Width as Double, Height as Double, rWidth as Double, rHeight as Double, FillMode as Integer) as Boolean
| Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
| method | DynaPDF | MBS DynaPDF Plugin | 8.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | All |
Some examples using this method:
See also RoundRectEx function in DynaPDF manual.
The items on this page are in the following plugins: MBS DynaPDF Plugin.