Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFMBS class.

DynaPDFMBS.AofLAB(LAB as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns A of a LAB color value.
Example
dim lab as Integer = DynaPDFMBS.LAB(1,2,3)
MsgBox str(DynaPDFMBS.AofLAB(lab)) // shows 2

Some examples using this method:

DynaPDFMBS.BofLAB(LAB as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns B of a LAB color value.
Example
dim lab as Integer = DynaPDFMBS.LAB(1,2,3)
MsgBox str(DynaPDFMBS.BofLAB(lab)) // shows 3

Some examples using this method:

DynaPDFMBS.BofRGB(RGB as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns B of a RGB color value.
Example
dim rgb as Integer = DynaPDFMBS.RGB(1,2,3)
MsgBox str(DynaPDFMBS.BofRGB(rgb)) // shows 3

Some examples using this method:

DynaPDFMBS.BuildFamilyNameAndStyle(IFont as Integer, byref name as string, byref style as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a family name and style from a font object.

See also BuildFamilyNameAndStyle function in DynaPDF manual.

DynaPDFMBS.CMYK(C as Integer, M as Integer, Y as Integer, K as Integer) as UInt32

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a CMYK color value based on the given component values.
Example
dim cmyk as Integer = DynaPDFMBS.CMYK(1,2,3,4)
MsgBox hex(cmyk)

Returns different values on BigEndian and LittleEndian systems.

DynaPDFMBS.CofCMYK(CMYK as UInt32) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns C of a CMYK color value.
Example
dim cmyk as Integer = DynaPDFMBS.CMYK(1,2,3,4)
MsgBox str(DynaPDFMBS.CofCMYK(cmyk)) // shows 1

Returns different values on BigEndian and LittleEndian systems.

Some examples using this method:

DynaPDFMBS.ConvColor(Colors() as Double, SourceColorSpaceHandle as Integer, DestColorSpace as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 9.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a color from one ColorSpace to another.
Example
// setup Environment
dim dy as new DynaPDFMBS
call dy.CreateNewPDF(nil)

// create a simple RGB colorspace
dim whitePoint as MemoryBlock = NewMemoryBlock(12)
whitePoint.SingleValue(0)=1.0
whitePoint.SingleValue(4)=1.0
whitePoint.SingleValue(8)=1.0

dim BlackPoint as MemoryBlock = nil // default
dim Gamma as MemoryBlock = nil // default
dim Matrix as MemoryBlock = nil // default

dim h as Integer = dy.CreateCIEColorSpace(dy.kesCalRGB, WhitePoint, BlackPoint, Gamma, Matrix)

// do we have one?
if dy.GetColorSpaceCount=0 then
MsgBox "No color space!"
Return
else
MsgBox str(dy.GetColorSpaceCount)+" Colorspace defined"
end if

// Now get the colorspace information including the Object reference:
dim c as DynaPDFColorSpaceMBS = dy.GetColorSpaceObj(h)

dim d(-1) as Double = array(0.3,0.5,0.7)
dim IColorSpace as Integer = c.Handle
dim DestCS as Integer = DynaPDFMBS.kesDeviceCMYK

// convert a color
dim n as Integer = dy.ConvColor(d, IColorSpace, DestCS)

MsgBox hex(n)

Colors: The array of color values. 3 values for RGB, 4 values for CMYK and one value for Gray.
IColorSpaceSource: The source color space object reference.
DestCS: The destination color space. One of the kes* constants.

Some examples using this method:

See also ConvColor function in DynaPDF manual.

DynaPDFMBS.GetDynaPDFVersion as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the version string of DynaPDF.

Result is an ASCII string.

See also GetDynaPDFVersion function in DynaPDF manual.

DynaPDFMBS.GetJPEGVersion as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries JPEG library version.

Currently reporting 9.1 for version 9b.

DynaPDFMBS.GetPNGVersion as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries PNG library version used in DynaPDF.

DynaPDFMBS.GetSpaceWidth(FontHandle as Integer, FontSize as Double) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the width of the space character of the font depending on the font size.

If the font contains no space character a default size is used to compute the space width.
The parameter FontHandle must be a valid pointer to a PDF font. Such a reference is returned by GetPageText, EnumDocFonts, or by the content parser (see ParseContent).

Returns: If the function succeeds the return value is the space width. If the function fails the return value is zero. This function does not use the exception handling of DynaPDF. No error message is set on failure.

See also GetSpaceWidth function in DynaPDF manual.

DynaPDFMBS.GetTextWidth(FontHandle as integer, Text as String, CharSpacing as Single, WordSpacing as Single, TextScale as Single) as double

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 18.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Calculates text width.

The function can be used to calculate the width of a sub string that was returned by the content parser (see ParseContent() for further information). The parameter FontHandle must be a valid handle of a font object that was provided in the SetFont event. Note that this function is optimized for speed and does not use the normal error handling of DynaPDF. The parameters CharSpacing, WordSpacing, and TextScale must be taken from the current graphics state.

If the function succeeds the return value is the string width measured in text space. If the parameter FontHandle is set 0 the return value is 0.0.

See also:

See also GetTextWidth function in DynaPDF manual.

DynaPDFMBS.GetTIFFVersion as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries version of tiff library.

Should be 3.7.2 on plugins 17.1.
Version is always same on Mac, Windows and Linux.
If you notice a mismatch, something is wrong!

DynaPDFMBS.GetZlibVersion as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries version of zlib library.

Should be 1.2.7 on plugins 17.x.
Version is always same on Mac, Windows and Linux.
If you notice a mismatch, something is wrong!

DynaPDFMBS.GofRGB(RGB as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns G of a RGB color value.
Example
dim rgb as Integer = DynaPDFMBS.RGB(1,2,3)
MsgBox str(DynaPDFMBS.GofRGB(rgb)) // shows 2

Some examples using this method:

DynaPDFMBS.IsWrongPwd(errCode as Integer) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether an error code is for a wrong password.

We have several error codes which result from different password protections and this function considers them all.

See also IsWrongPwd function in DynaPDF manual.

DynaPDFMBS.KofCMYK(CMYK as UInt32) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns K of a CMYK color value.
Example
dim cmyk as Integer = DynaPDFMBS.CMYK(1,2,3,4)
MsgBox str(DynaPDFMBS.KofCMYK(cmyk)) // shows 4

Returns different values on BigEndian and LittleEndian systems.

Some examples using this method:

DynaPDFMBS.LAB(L as Integer, A as Integer, B as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a LAB color value based on the given component values.
Example
dim lab as Integer = DynaPDFMBS.LAB(1,2,3)
MsgBox hex(lab)

DynaPDFMBS.LoadError as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The last error message from LoadLibrary call.
Example
dim f as FolderItem = SpecialFolder.Desktop.Child("test.dylib")

if DynaPDFMBS.LoadLibrary(f) then
MsgBox "OK"
else
MsgBox DynaPDFMBS.LoadError
end if

DynaPDFMBS.LoadLibrary(File as FolderItem) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads the dynapdf library file.
Example
MsgBox "Version before: "+DynaPDFMBS.DynaPDFVersion

dim f as FolderItem = SpecialFolder.Desktop.Child("dynapdf.dylib")

if DynaPDFMBS.LoadLibrary(f) then
MsgBox "Version after: "+DynaPDFMBS.DynaPDFVersion
else
MsgBox DynaPDFMBS.LoadError
end if

Returns true on success or false on failure.

While the plugin comes with an internal dynapdf library, you can use this method to load a different version of the library.

See also:

DynaPDFMBS.LoadLibrary(Path as string) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 17.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads the dynapdf library file.

Returns true on success or false on failure.

While the plugin comes with an internal dynapdf library, you can use this method to load a different version of the library.

See also:

DynaPDFMBS.LofLAB(LAB as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns L of a LAB color value.
Example
dim lab as Integer = DynaPDFMBS.LAB(1,2,3)
MsgBox str(DynaPDFMBS.LofLAB(lab)) // shows 1

Some examples using this method:

DynaPDFMBS.MofCMYK(CMYK as UInt32) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns M of a CMYK color value.
Example
dim cmyk as Integer = DynaPDFMBS.CMYK(1,2,3,4)
MsgBox str(DynaPDFMBS.MofCMYK(cmyk)) // shows 2

Returns different values on BigEndian and LittleEndian systems.

Some examples using this method:

DynaPDFMBS.MultiplyMatrix(M1 as DynaPDFMatrixMBS, M2 as DynapdfMatrixMBS, NewMatrix as DynapdfMatrixMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function multiplies two transformation matrices and stores the result in the parameter NewMatrix.

You must pass three non nil matrix references into the function.

See also MultiplyMatrix function in DynaPDF manual.

DynaPDFMBS.RGB(R as Integer, G as Integer, B as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Builds a RGB color value based on the given component values.
Example
dim rgb as Integer = DynaPDFMBS.RGB(1,2,3)
MsgBox hex(rgb)

DynaPDFMBS.RofRGB(RGB as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns R of a RGB color value.
Example
dim rgb as Integer = DynaPDFMBS.RGB(1,2,3)
MsgBox str(DynaPDFMBS.RofRGB(rgb)) // shows 1

Some examples using this method:

DynaPDFMBS.SetLicenseKeyGlobal(Value as string)

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 11.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Use this function to enter your license key.

This method stores the key for later use. The constructor uses than this key to call SetLicenseKey for any new instance of the DynaPDFMBS class. This way you can register in the app.open event for your whole application.

See also:

DynaPDFMBS.TranslateRawCode(IFont as integer, text as string, textOffset as Integer, byref Width as double, byref Decoded as boolean, CharSpacing as double, WordSpacing as double, TextScale as double, byref count as integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 18.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function converts a source character to Unicode.

The code length of a character depends on the font's encoding. PDF supports encodings with fixed and variable code lengths from one through four bytes per character. The Count parameter provides the number of bytes which were consumed to convert the character to Unicode; this value must be used to increment the textOffset parameter for further calls.
The resulting Unicode character or sequence is returned in function result. The width parameter is used to return the character width.
The parameter Decoded is set to true if the source character could be sucsessfully converted to Unicode. If Decode is false the output string and character width contain no meaningful values.
The function can only fail when processing strings of CID fonts, e.g. if the font depends on an external CMap that could not be loaded, or if the font uses a damaged CMap. The search path(s) to external CMaps should always be set before extracting text from PDF files with SetCMapDir().
Passing an invalid or undefined code sequence to the function does not result in an error. In this case the notdef character is added to the output string (this is usually 0 or 0xFFFD if the font contains a ToUnicode CMap).
Notice:
To improve processing speed the function does not check whether the parameters are valid.
Remarks:
This function was designed to convert raw strings on a per character basis to Unicode which were returned by ParseContent() or GetPageText(). The parameters CharSpacing, WordSpacing, and TextScale must be taken from the current graphics state or from the structure DynaPDFStackMBS.
Return values:
The count value of this function is always greater or equal to one. Check the parameter Decoded to determine whether the function succeed.

See also:

See also TranslateRawCode function in DynaPDF manual.

DynaPDFMBS.TranslateString(IFont as Integer, text as string, flags as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Translates a string.

See also:

See also TranslateString function in DynaPDF manual.

DynaPDFMBS.TranslateString(stack as DynaPDFStackMBS, flags as Integer) as string

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 8.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function translates a binary string returned by GetPageText() to Unicode.

See also:

See also TranslateString function in DynaPDF manual.

DynaPDFMBS.WeightToStyle(s as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a weight value to a style value.

DynaPDFMBS.WidthFromStyle(s as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a style constant to the width value.

Some examples using this method:

DynaPDFMBS.WidthToStyle(s as Integer) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Converts a width value to a style value.

DynaPDFMBS.YofCMYK(CMYK as UInt32) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
shared method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns Y of a CMYK color value.
Example
dim cmyk as Integer = DynaPDFMBS.CMYK(1,2,3,4)
MsgBox str(DynaPDFMBS.YofCMYK(cmyk)) // shows 3

Returns different values on BigEndian and LittleEndian systems.

Some examples using this method:

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


The biggest plugin in space...