Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Next items

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

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

DynaPDFMBS.BuildFamilyNameAndStyle(IFont as Integer, byref name as string, byref style as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: Builds a family name and style from a font object.

See also BuildFamilyNameAndStyle function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.CMYK(C as Integer, M as Integer, Y as Integer, K as Integer) as UInt32
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: 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)
Notes: Returns different values on BigEndian and LittleEndian systems.

Feedback, Comments & Corrections

DynaPDFMBS.CofCMYK(CMYK as UInt32) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: 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
Notes: Returns different values on BigEndian and LittleEndian systems.

Feedback, Comments & Corrections

DynaPDFMBS.ConvColor(Colors() as Double, SourceColorSpaceHandle as Integer, DestColorSpace as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 9.6 Yes Yes Yes Yes No
Function: 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)
Notes:
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.

See also ConvColor function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.GetDynaPDFVersion as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function returns the version string of DynaPDF.
Notes: Result is an ASCII string.

See also GetDynaPDFVersion function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.GetJPEGVersion as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.3 Yes Yes Yes Yes No
Function: Queries JPEG library version.
Notes: Currently reporting 9.1 for version 9b.

Feedback, Comments & Corrections

DynaPDFMBS.GetPNGVersion as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.3 Yes Yes Yes Yes No
Function: Queries PNG library version used in DynaPDF.

Feedback, Comments & Corrections

DynaPDFMBS.GetSpaceWidth(FontHandle as Integer, FontSize as Double) as Double
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: Returns the width of the space character of the font depending on the font size.
Notes:
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.

Feedback, Comments & Corrections

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 Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 18.1 Yes Yes Yes Yes No
Function: Calculates text width.
Notes:
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.

Feedback, Comments & Corrections

DynaPDFMBS.GetTIFFVersion as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.3 Yes Yes Yes Yes No
Function: Queries version of tiff library.
Notes:
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!

Feedback, Comments & Corrections

DynaPDFMBS.GetZlibVersion as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.3 Yes Yes Yes Yes No
Function: Queries version of zlib library.
Notes:
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!

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

DynaPDFMBS.IsWrongPwd(errCode as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: Whether an error code is for a wrong password.
Notes: We have several error codes which result from different password protections and this function considers them all.

See also IsWrongPwd function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.KofCMYK(CMYK as UInt32) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: 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
Notes: Returns different values on BigEndian and LittleEndian systems.

Feedback, Comments & Corrections

DynaPDFMBS.LAB(L as Integer, A as Integer, B as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 8.4 Yes Yes Yes Yes No
Function: Builds a LAB color value based on the given component values.
Example:
dim lab as Integer = DynaPDFMBS.LAB(1,2,3)
MsgBox hex(lab)

Feedback, Comments & Corrections

DynaPDFMBS.LoadError as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.0 Yes Yes Yes Yes No
Function: 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

Feedback, Comments & Corrections

DynaPDFMBS.LoadLibrary(File as FolderItem) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.0 Yes Yes Yes Yes No
Function: 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
Notes:
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:

Feedback, Comments & Corrections

DynaPDFMBS.LoadLibrary(Path as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 17.0 Yes Yes Yes Yes No
Function: Loads the dynapdf library file.
Notes:
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:

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

DynaPDFMBS.MofCMYK(CMYK as UInt32) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: 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
Notes: Returns different values on BigEndian and LittleEndian systems.

Feedback, Comments & Corrections

DynaPDFMBS.MultiplyMatrix(M1 as DynaPDFMatrixMBS, M2 as DynapdfMatrixMBS, NewMatrix as DynapdfMatrixMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function multiplies two transformation matrices and stores the result in the parameter NewMatrix.
Notes: You must pass three non nil matrix references into the function.

See also MultiplyMatrix function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.RGB(R as Integer, G as Integer, B as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: Builds a RGB color value based on the given component values.
Example:
dim rgb as Integer = DynaPDFMBS.RGB(1,2,3)
MsgBox hex(rgb)

Feedback, Comments & Corrections

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

Feedback, Comments & Corrections

DynaPDFMBS.SetLicenseKeyGlobal(Value as string)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 11.0 Yes Yes Yes Yes No
Function: Use this function to enter your license key.
Notes: 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:

Feedback, Comments & Corrections

DynaPDFMBS.TranslateRawCode(IFont as Integer, text as string, byref Width as Double, byref Decoded as boolean, CharSpacing as Double, WordSpacing as Double, TextScale as Double) as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: Translates a raw code.
Notes: Deprecated. Please use other variant with more parameters.

See also:

Feedback, Comments & Corrections

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 Console & Web iOS
shared method DynaPDF MBS DynaPDF Plugin 18.1 Yes Yes Yes Yes No
Function: The function converts a source character to Unicode.
Notes:
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:

Feedback, Comments & Corrections

Next items

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




Links
MBS Xojo Plugins