Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFMBS class.

DynaPDFMBS.HaveDPartRoot as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Checks whether the PDF file in memory contains a DPartRoot dictionary.

DPart stands for Document Parts. DParts are a feature of PDF/VT, a PDF format for the printing
industry.
The function should be used to determine whether a DPart structure is already in memory, before calling CreateDPartRoot() since the function would fail if this is the case.
An existing DPart structure can be extended with additional DPart nodes, but it is not yet possible to edit existing nodes.

If the document contains a DPartRoot dictionary, the return value is true or false otherwise.

See also HaveDPartRoot function in DynaPDF manual.

DynaPDFMBS.HaveOpenDoc as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
If an error occurred it is not always clear whether the PDF file was already deleted or if it is still in memory.

Some examples using this method:

See also HaveOpenDoc function in DynaPDF manual.

DynaPDFMBS.HaveOpenPage as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 11.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether a page is open.

See also HaveOpenPage function in DynaPDF manual.

DynaPDFMBS.HighlightAnnot(SubType as Integer, PosX as Double, PosY as Double, Width as Double, Height as Double, ColorValue as Integer, Author as string, Subject as string, Comment as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Adds a highlight annotation with unicode text.

Some examples using this method:

See also HighlightAnnot function in DynaPDF manual.

DynaPDFMBS.HighlightAnnotAnsi(SubType as Integer, PosX as Double, PosY as Double, Width as Double, Height as Double, ColorValue as Integer, Author as string, Subject as string, Comment as string) as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use the non ANSI function instead.
Adds a highlight annotation with ANSI text.

See also HighlightAnnot function in DynaPDF manual.

DynaPDFMBS.HighlightOnAllPages(SearchText as string, ColorValue as Color, CaseInsenitive as boolean = false) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Highlights text on all pages of the current document.

If CaseInsenitive is true, the case of letters is ignored (also umlauts and accents)
Searches on all pages in the document.
Returns number of times the text was found.

Some examples using this method:

DynaPDFMBS.HighlightOnCurrentPage(SearchText as string, ColorValue as Color, CaseInsenitive as boolean = false) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Highlights text on all pages of the current page.

If CaseInsenitive is true, the case of letters is ignored (also umlauts and accents)
Use EditPage function to open the page before you search on it.
Returns number of times the text was found.

Some examples using this method:

DynaPDFMBS.MarkTemplateAsWatermark(TemplateHandle as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Marks template as watermark.

The function adds additional metadata to a template (XObject type Form in PDF terms, see BeginTemplate() or BeginTransparencyGroup() for further information) so that PDF editors like Adobe Acrobat are able to identify the template as watermark.

Watermarks can be deleted with Acrobat and many other PDF editors. DynaPDF can delete such watermarks too with DeleteWatermark() or Optimize().

Returns true on success or false on failure.

See also MarkTemplateAsWatermark function in DynaPDF manual.

DynaPDFMBS.MovePage(source as Integer, dest 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 moves a page to another position in the document.

See also MovePage function in DynaPDF manual.

DynaPDFMBS.MoveTo(PosX as Double, PosY 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
The function moves the current position to the point specified by PosX, PosY.
Example
Var pdf as new DynaPDFMBS
Var f as FolderItem = SpecialFolder.Desktop.Child("Create PDF with Line.pdf")

pdf.SetLicenseKey "Starter" // For this example you can use a Starter, Lite, Pro or Enterprise License

// Create a new PDF
call pdf.CreateNewPDF f

// We want to use top-down coordinates
call pdf.SetPageCoords pdf.kpcTopDown

// Add a page
call pdf.Append

// black
call pdf.SetStrokeColor 0

// line down
call pdf.MoveTo(100,100)
call pdf.LineTo(200,200)
call pdf.StrokePath

// line up
call pdf.MoveTo(200,200)
call pdf.LineTo(300,100)
call pdf.StrokePath

// end page
call pdf.EndPage

// Close page
call pdf.CloseFile

// Open PDF
f.Launch

See also MoveTo function in DynaPDF manual.

DynaPDFMBS.TestGlyphs(FontHandle as Integer, Text as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function checks whether all glyphs of the text are available in the specified font.
Example
// create dummy PDF with one page
Var d as new myDynaPDFMBS

call d.CreateNewPDF
call d.Append

// check this text
Var x as string = "您好" // Hello in Chinese

// load 2 fonts to check
Var FontHandle1 as Integer = d.SetFont("Times", 12)
Var FontHandle2 as Integer = d.SetFont("Arial Unicode MS", 12)

Var r1 as Integer = d.TestGlyphs(FontHandle1, x)

if r1 = -1 then
MsgBox "Times supports chinese characters"
else
MsgBox "Times does not support chinese characters"
end if

Var r2 as Integer = d.TestGlyphs(FontHandle2, x)

if r2 = -1 then
MsgBox "Arial Unicode MS supports chinese characters"
else
MsgBox "Arial Unicode MS does not support chinese characters"
end if

The return value is the position of the first missing glyph, or -1 if all glyphs are available.
If the font uses a mixed 8/16 bit CJK code page that requires a conversion to Unicode (a code page that ends with "_Uni"), then the return value corresponds to the converted Unicode string and not to the CJK input string.

Some examples using this method:

See also TestGlyphs function in DynaPDF manual.

DynaPDFMBS.TestGlyphsAnsi(FontHandle as Integer, Text as string) as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 15.0 ✅ 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 checks whether all glyphs of the text are available in the specified font.

The return value is the position of the first missing glyph, or -1 if all glyphs are available.
If the font uses a mixed 8/16 bit CJK code page that requires a conversion to Unicode (a code page that ends with "_Uni"), then the return value corresponds to the converted Unicode string and not to the CJK input string.
The text parameter is converted to ANSI.

See also TestGlyphs function in DynaPDF manual.

DynaPDFMBS.TestPassword(PwdType as Integer, Value as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 24.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Test the given password against the owner one.

The main purpose of the function is to test the file against the owner password if the encryption settings should be changed by the user. It is not meaningful to call this function for non-encrypted files. To determine whether a PDF file is encrypted call DynaPDF.GetInIsEncrypted.

See also TestPassword function in DynaPDF manual.

DynaPDFMBS.TextAnnot(PosX as Double, PosY as Double, Width as Double, Height as Double, Author as string, Text as string, Icon as Integer, Open as boolean) 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 creates a text annotation.

The text and the author parameters are converted to unicode.

Some examples using this method:

See also TextAnnot function in DynaPDF manual.

DynaPDFMBS.TextAnnotAnsi(PosX as Double, PosY as Double, Width as Double, Height as Double, Author as string, Text as string, Icon as Integer, Open as boolean) as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.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 creates a text annotation.

The text and the author parameters are converted to ANSI.

See also TextAnnot function in DynaPDF manual.

DynaPDFMBS.TranslateCoords(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
The function translates the coordinate system to the new origin OriginX, OriginY.

Some examples using this method:

See also TranslateCoords function in DynaPDF manual.

DynaPDFMBS.UnLockLayer(layer as UInt32) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Locks a layer.

See also UnLockLayer function in DynaPDF manual.

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


The biggest plugin in space...