Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFMBS class.

Previous items Next items

DynaPDFMBS.GetOCG(Handle as UInt32) as DynaPDFOCGMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the properties of an OCG, also called layer.

An OCG handle is a simple array index. You can loop over all available OCGs from 0 to GetOCGCount - 1.
If the member HaveContUsage is true, the OCG contains a Content Usage dictionary. The contents of this dictionary can be accessed with the function GetOCGContUsage. A Content Usage dictionary contains additional information about a layer or OCG.

If the OCG is also included in an application event, this is the case if AppEvent is non-zero, then the Content Usage dictionary is used to control the visibility state of the layer. The member Categories specifies which categories control the visibility state.

Returns nil on any error.

Some examples using this method:

See also GetOCG function in DynaPDF manual.

DynaPDFMBS.GetOCGContUsage(Handle as UInt32) as DynaPDFOCGContUsageMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the properties of the Content Usage dictionary that is associated with an OCG or layer.

If the OCG is not included in an application event, then the contents in this dictionary serves as pure information.
If the OCG is included in one or more application events, then these settings control also the visibility state of the OCG. The function GetOCG returns the events and categories which control the layer visibility.
If UserNamesCount is greater zero, the dictionary contains also user names. The user names can be accessed with GetOCGUsageUserName.


Returns nil on any error.

See also GetOCGContUsage function in DynaPDF manual.

DynaPDFMBS.GetOCGCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the number of OCGs or layers which are available in document.

This function cannot fail, the return value is always greater or equal zero.

Some examples using this method:

See also GetOCGCount function in DynaPDF manual.

DynaPDFMBS.GetOCGUsageUserName(Handle as UInt32, Index as UInt32, byref Name as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns a user name of a Content Usage dictionary that is associated with an OCG or layer.

The functions a pointer of the original string that is stored in the PDF file.
If the function succeeds the return value is true. If the function fails the return value is false.

See also GetOCGUsageUserName function in DynaPDF manual.

DynaPDFMBS.GetOCUINode(Node as Integer) as DynaPDFOCUINodeMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 17.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Retrieves the most important properties of an Optional Content UI node (UI stands for User Interface).

If the PDF file was not already imported with ImportPDFFile() the function ImportOCProperties() must be called to import the global Optional Content Properties.
UI nodes are part of a layer configuration. Therefore, a layer configuration must be loaded with LoadLayerConfig() before the function can be called.

Optional Content Groups (OCGs) which are returned by this function should be visible in the user interface of a viewer application. All other OCGs should not be shown by default.
UI nodes are stored in a single linked list. To get the pointer of the root node set the parameter Node to 0. The parameter OutNode will be ignored in this case but it is required otherwise.
The next node of the root is in the NextItem property. If no further node is available the return value will be 0.
Every node can contain one or more child nodes, an optional label, or a reference to an OCG.

See also GetOCUINode function in DynaPDF manual.

DynaPDFMBS.GetOpacity as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the opacity value used to draw the visible appearance of an annotation (requires Acrobat 5 or higher).

See also GetOpacity function in DynaPDF manual.

DynaPDFMBS.GetOrientation as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the orientation of the current open page if an open page was detected or the default orientation for newly created pages if no open page was detected.

Some examples using this method:

See also GetOrientation function in DynaPDF manual.

DynaPDFMBS.GetOutputIntent(Index as Integer) as DynaPDFOutputIntentMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an output intent as well as the properties of it.

An output intent is an ICC profile that describes the characteristics of the output device. The profile is mostly embedded but certain standards like PDF/X 4p, for example, allow also the usage of non-embedded profiles.

The parameter Index is the array index of the output intent. To determine the number of available intents call GetOutputIntentCount.

Returns nil in case of error.

See also GetOutputIntent function in DynaPDF manual.

DynaPDFMBS.GetOutputIntentCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the number of available output intents.

See also GetOutputIntentCount function in DynaPDF manual.

DynaPDFMBS.GetPageAnnot(index as Integer) as DynaPDFAnnotationMBS   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use GetPageAnnotEx instead.
Retrieves the page annotation with the given index.

See also GetPageAnnot function in DynaPDF manual.

DynaPDFMBS.GetPageAnnotCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the page annotation count.

See also GetPageAnnotCount function in DynaPDF manual.

DynaPDFMBS.GetPageAnnotEx(index as Integer) as DynaPDFAnnotationExMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.6 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries an extended annotation with the given index.

See also GetPageAnnotEx function in DynaPDF manual.

DynaPDFMBS.GetPageColorSpaces as DynaPDFColorSpaceMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 16.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries for current open page the color spaces used.

Color spaces used for drawing colors (Stroke and Fill Color) and for image color space.
The list may be empty if for example everything is drawn in standard color spaces like RGB.

Some examples using this method:

DynaPDFMBS.GetPageCoords as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the page coordinate system setting.

The native coordinate system of the Portable Document Format is bottom up.

Some examples using this method:

See also GetPageCoords function in DynaPDF manual.

DynaPDFMBS.GetPageField(Index as Integer) as DynaPDFFieldMBS   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use GetPageFieldEx instead.
The function retrieves the most important properties of a field.

See also GetPageField function in DynaPDF manual.

DynaPDFMBS.GetPageFieldCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the number of fields used by a page.

See also GetPageFieldCount function in DynaPDF manual.

DynaPDFMBS.GetPageFieldEx(Index as Integer) as DynaPDFFieldExMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function retrieves the most important properties of a field.

The parameter Index must be a valid index to the page's field array. To enumerate the fields of a page execute the function in a loop from 0 to GetPageFieldCount - 1.

See also GetPageFieldEx function in DynaPDF manual.

DynaPDFMBS.GetPageLabel(index as Integer, byref Label as DynaPDFPageLabelMBS) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function retrieves the properties of a page label.

See also GetPageLabel function in DynaPDF manual.

DynaPDFMBS.GetPageLabelCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the number of page labels defined in the document.

See also GetPageLabelCount function in DynaPDF manual.

DynaPDFMBS.GetPageLayout as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the page layout that is used when opening the document with Adobe s Acrobat.

See also GetPageLayout function in DynaPDF manual.

DynaPDFMBS.GetPageMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the page mode that is used when opening the document with Adobe's Acrobat.

See also GetPageMode function in DynaPDF manual.

DynaPDFMBS.GetPageNum as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the page number of the currently open page.

See also GetPageNum function in DynaPDF manual.

DynaPDFMBS.GetPageText(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
This function can be used to extract the text of a page or template, or to find a specific text that should be replaced or deleted with the function ReplacePageText() or ReplacePageTextEx().

InitStack must be called before you use GetPageText.


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 GetPageText function in DynaPDF manual.

DynaPDFMBS.GetPDFVersion as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the minor version of the output PDF file as Integer value.

Zero stand for PDF 1.0, one for PDF 1.1 and so on.

See also GetPDFVersion function in DynaPDF manual.

DynaPDFMBS.GetPDFVersionEx as DynaPDFVersionInfoMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 21.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Retrieves the major and minor version of the PDF document as well as the underlying PDF standard, if any.
Example
Dim d As New DynaPDFMBS
Dim v As DynaPDFVersionInfoMBS = d.GetPDFVersionEx

Break // check in debugger

Result includes:
MajorPDF major version, e.g. 1
MinorPDF minor version, e.g. 7
MainVerSet only if the file conforms to a specific PDF standard, e.g. "PDF/X // 1a:2003", "PDF/A 3b", and so on.
SubVere.g. "ZUGFeRD 2.0", "Factur-X", and so on

Returns nil in case of an error.

See also GetPDFVersionEx function in DynaPDF manual.

DynaPDFMBS.GetPrintSettings as DynaPDFPrintSettingsMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the print settings for the current document.

This is a PDF 1.7 extension.

See also GetPrintSettings function in DynaPDF manual.

DynaPDFMBS.GetResetAction(Handle as UInt32) as DynaPDFResetFormActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the properties of a Reset Form Action.

See also GetResetAction function in DynaPDF manual.

DynaPDFMBS.GetResolution as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the resolution in DPI (Dots per Inch), in which images are stored by DynaPDF.

See also GetResolution function in DynaPDF manual.

DynaPDFMBS.GetSaveNewImageFormat as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
If false, images are not downscaled if necessary.

See also GetSaveNewImageFormat function in DynaPDF manual.

DynaPDFMBS.GetSeparationInfo(byref Colorant as string, byref ColorSpace 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
The function returns the separation info stored in the current open page.

See also GetSeparationInfo function in DynaPDF manual.

DynaPDFMBS.GetStrokeColor as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the current stroke color.

See also GetStrokeColor function in DynaPDF manual.

DynaPDFMBS.GetSubmitAction(Handle as UInt32) as DynaPDFSubmitFormActionMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the properties of a Submit Form Action.

Returns nil in case of an error.

See also GetSubmitAction function in DynaPDF manual.

DynaPDFMBS.GetSysFontInfo as DynaPDFSysFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the most important properties of a system font.
Example
// list all fonts
dim d as new DynaPDFMBS

dim f as DynaPDFSysFontMBS = d.GetSysFontInfo
while f<>nil
Listbox1.AddRow f.FamilyName

f = f.NextFont
wend

The function returns the fonts in the current font search order. That means if the search order is {fbtTrueType, fbtOpenType, fbtType1, fbtStdFont}, for example, then the function returns first all TrueType fonts sorted in ascending order, then all OpenType fonts, and so on.
Since standard fonts are no system fonts, these fonts are not returned.

See also:

Some examples using this method:

See also GetSysFontInfo function in DynaPDF manual.

DynaPDFMBS.GetSysFontInfo(PostscriptName as String) as DynaPDFSysFontMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 17.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries system font with given postscript name.
Example
dim d as new DynaPDFMBS

// find one font with postscript name
dim font as DynaPDFSysFontMBS = d.GetSysFontInfo("Verdana-BoldItalic")

// find all with family name
dim fonts() as DynaPDFSysFontMBS = d.GetSysFontInfos("Verdana")

Break // see in debugger

Returns nil if font is not found.

See also:

See also GetSysFontInfo function in DynaPDF manual.

DynaPDFMBS.GetSysFontInfos as DynaPDFSysFontMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 16.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an array with the most important properties of system fonts.
Example
dim pdf as new MyDynaPDFMBS

// get all fonts
dim fonts() as DynaPDFSysFontMBS = pdf.GetSysFontInfos

// add one row for each font
for each f as DynaPDFSysFontMBS in fonts

dim name as string = f.FamilyName

if f.BaseType = pdf.kfbtOpenType and f.CIDOrdering = "" then
// This font cannot be used with Unicode

else
// Anything is ok
end if

next

The function returns the fonts in the current font search order. That means if the search order is {fbtTrueType, fbtOpenType, fbtType1, fbtStdFont}, for example, then the function returns first all TrueType fonts sorted in ascending order, then all OpenType fonts, and so on.
Since standard fonts are no system fonts, these fonts are not returned.

See also:

Some examples using this method:

DynaPDFMBS.GetSysFontInfos(Name as String) as DynaPDFSysFontMBS()

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 17.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns an array with the most important properties of system fonts.
Example
dim d as new DynaPDFMBS

// find one font with postscript name
dim font as DynaPDFSysFontMBS = d.GetSysFontInfo("Verdana-BoldItalic")

// find all with family name
dim fonts() as DynaPDFSysFontMBS = d.GetSysFontInfos("Verdana")

Break // see in debugger

Matchs fonts by family name, full name or Postscript name.

The function returns the fonts in the current font search order. That means if the search order is {fbtTrueType, fbtOpenType, fbtType1, fbtStdFont}, for example, then the function returns first all TrueType fonts sorted in ascending order, then all OpenType fonts, and so on.
Since standard fonts are no system fonts, these fonts are not returned.

See also:

DynaPDFMBS.GetTabLen as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the tabulator length in spaces that is used to emulate tabulators during text formatting (see WriteFText() for further information).

See also GetTabLen function in DynaPDF manual.

DynaPDFMBS.GetTemplCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the number of templates used by a page.

Some examples using this method:

See also GetTemplCount function in DynaPDF manual.

DynaPDFMBS.GetTemplHandle as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the handle of the current open template or a negative error code on failure.

Some examples using this method:

See also GetTemplHandle function in DynaPDF manual.

DynaPDFMBS.GetTemplHeight(Handle as Integer) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the height of a template.

Some examples using this method:

See also GetTemplHeight function in DynaPDF manual.

DynaPDFMBS.GetTemplWidth(Handle as Integer) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Returns the width of a template. The parameter Handle must be a valid template handle.

If the function succeeds the return value is the width of the template. If the function fails the return value is a negative error code.

Some examples using this method:

See also GetTemplWidth function in DynaPDF manual.

DynaPDFMBS.GetTextDrawMode as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function returns the text draw mode. Se draw modes are described in detail under SetTextDrawMode().

See also GetTextDrawMode function in DynaPDF manual.

DynaPDFMBS.GetTextFieldValue(Field as Integer, byref Value as string, byref DefValue as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 9.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Queries the text of a field.

The strings may be ANSI or Unicode encoded.

See also GetTextFieldValue function in DynaPDF manual.

DynaPDFMBS.GetTextHeight(Align as Integer, aText as string) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 13.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function measures the height of a formatted text block.
Example
dim pdf as DynaPDFMBS // your PDF instance

dim text as string = "Hello \ul#World"

dim h1 as Integer = pdf.GetTextHeight(pdf.ktaLeft, text)
dim h2 as Integer = pdf.GetFTextHeight(pdf.ktaLeft, text)

dim h3 as Integer = pdf.GetTextHeightEx(150, pdf.ktaLeft, text)
dim h4 as Integer = pdf.GetFTextHeightEx(150, pdf.ktaLeft, text)

// see different heights in debugger.

GetTextHeight does escape backslashes so no formatting commands are taken from the string.
The text parameter is converted to unicode.

DynaPDFMBS.GetTextHeightAnsi(Align as Integer, aText as string) as Double   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 13.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use the non ANSI function instead.
The function measures the height of a formatted text block.

GetTextHeightAnsi does escape backslashes so no formatting commands are taken from the string.

The text parameter is converted to ANSI.

DynaPDFMBS.GetTextHeightEx(Width as Double, Align as Integer, aText as string) as Double

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 13.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function measures the height of a formatted text block.
Example
dim pdf as new MyDynaPDFMBS

call pdf.CreateNewPDF nil
call pdf.Append

call pdf.SetFont("Helvetica", pdf.kfsnone, 12, true, pdf.kcpUnicode)

dim h as Double = pdf.GetTextHeightEx(100, pdf.ktaLeft, "Hello World. Just a test string.")

MsgBox "height: "+str(h)

call pdf.EndPage
call pdf.CloseFile

GetTextHeightEx does escape backslashes so no formatting commands are taken from the string.
The text parameter is converted to unicode.

Some examples using this method:

Previous items Next items

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


The biggest plugin in space...