Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFMBS class.

Previous items Next items

DynaPDFMBS.IterateOCGs as DynaPDFIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Iterate over OCGs.
Example
Dim d As New DynaPDFMBS

// load a PDF here or add pages with layers

For Each layer As DynaPDFOCGMBS In d.IterateOCGs

Dim IsVisible As Boolean = layer.IsVisible

Break
Next

The value is a DynaPDFOCGMBS object.

DynaPDFMBS.IterateOutputIntents as DynaPDFIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Iterate over output intents.
Example
Dim d As New DynaPDFMBS

// load a PDF here or add output intent

For Each OutputIntent As DynaPDFOutputIntentMBS In d.IterateOutputIntents

Dim RegistryName As String = OutputIntent.RegistryName

Break
Next

The value is a DynaPDFOutputIntentMBS object.

DynaPDFMBS.IteratePageAnnotations as DynaPDFIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Iterate over page annotations.
Example
Dim d As New DynaPDFMBS

// load a PDF here or add annotation

For Each Annotation As DynaPDFAnnotationExMBS In d.IteratePageAnnotations

Dim Name As String = Annotation.Name

Break
Next

The value is a DynaPDFAnnotationExMBS object.

DynaPDFMBS.IteratePageLabels as DynaPDFIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Iterate over page labels.
Example
Dim d As New DynaPDFMBS

// load a PDF here or add page labels

For Each PageLabel As DynaPDFPageLabelMBS In d.IteratePageAnnotations

Dim Prefix As String = PageLabel.Prefix

Break
Next

The value is a DynaPDFPageLabelMBS object.

DynaPDFMBS.IterateSysFonts as DynaPDFIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Iterate over system fonts.
Example
Dim d As New DynaPDFMBS

For Each Font As DynaPDFSysFontMBS In d.IterateSysFonts

Dim Name As String = Font.FullName

Break
Next

The value is a DynaPDFSysFontMBS object.

DynaPDFMBS.IterateXFAStreams as DynaPDFIteratorMBS

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Iterate over XFA Streams.
Example
Dim d As New DynaPDFMBS

// load a PDF here or add a XFAStream

For Each XFAStream As DynaPDFXFAStreamMBS In d.IterateXFAStreams

Dim Nmae As String = XFAStream.Name

Break
Next

The value is a DynaPDFXFAStreamMBS object.

DynaPDFMBS.LineAnnotAnsi(x1 as Double, y1 as Double, x2 as Double, y2 as Double, LineWidth as Double, StartLineEndStyle as Integer, EndLineEndStyle as Integer, FillColor as UInt32, StrokeColor as UInt32, ColorSpace as Integer, Author as string, Subject as string, Content as string) as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.0 ✅ 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 line annotation.

See also LineAnnot function in DynaPDF manual.

DynaPDFMBS.LineTo(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 draws a path from the current position up to the specified point.
Example
dim pdf as new DynaPDFMBS
dim 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 LineTo function in DynaPDF manual.

DynaPDFMBS.LoadCMap(CMapName as string, Embed as Boolean) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 10.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads a character map.

See also LoadCMap function in DynaPDF manual.

DynaPDFMBS.LoadFDFData(FileName as folderitem, Password as string, Flags as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads PDF form data from the given PDF file.

See also LoadFDFData function in DynaPDF manual.

DynaPDFMBS.LoadFDFDataEx(Buffer as memoryblock, Password as string, Flags as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads PDF form data from the given PDF file in the buffer.

See also:

See also LoadFDFDataEx function in DynaPDF manual.

DynaPDFMBS.LoadFDFDataEx(Buffer as string, Password as string, Flags as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 9.4 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads PDF form data from the given PDF file in the buffer.

See also:

See also LoadFDFDataEx function in DynaPDF manual.

DynaPDFMBS.LoadFont(Buffer as memoryblock, Style as Integer, size as Double, Embed as Boolean = false, CodePage as Integer = 2, CollectionIndex as UInt32 = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 13.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function loads a font from a file buffer.

Added CollectionIndex parameter in 12.1 plugin version.

See also:

See also LoadFont function in DynaPDF manual.

DynaPDFMBS.LoadFont(Buffer as string, Style as Integer, size as Double, Embed as Boolean = false, CodePage as Integer = 2, CollectionIndex as UInt32 = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function loads a font from a file buffer.

Added CollectionIndex parameter in 12.1 plugin version.

See also:

See also LoadFont function in DynaPDF manual.

DynaPDFMBS.LoadFontEx(File as folderitem, Style as Integer, size as Double, Embed as Boolean = false, CodePage as Integer = 2, CollectionIndex as UInt32 = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function loads a font from a font file and activates it in the graphics state if the function was called within an open page or template.

See also:

See also LoadFontEx function in DynaPDF manual.

DynaPDFMBS.LoadFontEx(Filepath as string, Style as Integer, size as Double, Embed as Boolean = false, CodePage as Integer = 2, CollectionIndex as UInt32 = 0) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function loads a font from a font file and activates it in the graphics state if the function was called within an open page or template.

See also:

See also LoadFontEx function in DynaPDF manual.

DynaPDFMBS.LoadLayerConfig(Index as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 17.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Loads the specified layer configuration.

A PDF file that contains layers (Optional Content Groups in PDF syntax) contains usually at least a default configuration dictionary. This configuration is loaded by default when the visibility state of a layer or optional content group must be determined, e.g. when rendering a page.
Use this function to load another configuration if available. To determine the number of available configurations call GetLayerConfigCount().

The paramter Index can be one of the following:

  • -1: Load the default configuration.
  • -2: If a configuration was already loaded, leave it unchanged. Load
  • the default configuration otherwise.
  • 0..Count -1: Load the specified configuration.

If the function succeeds the return value is true. If the function fails the return value is false.

See also LoadLayerConfig function in DynaPDF manual.

DynaPDFMBS.LockLayer(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
Unlocks a layer.

See also LockLayer function in DynaPDF manual.

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
dim pdf as new DynaPDFMBS
dim 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.OpenImportBuffer(Buffer as string, PwdType as Integer = 0, Password as string = "") 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 reads an external PDF from a file buffer so that it can be imported entirely or parts of it.

Requires DynaPDF Lite license.

See also:

See also OpenImportBuffer function in DynaPDF manual.

DynaPDFMBS.OpenImportFile(Path as String, PwdType as integer = 0, Password as string = "") as integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 19.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function opens an external PDF file so that it can be imported entirely or parts of it.

Requires DynaPDF Lite license.

See also:

See also OpenImportFile function in DynaPDF manual.

DynaPDFMBS.OpenOutputFile(File as folderitem) 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 opens the output file into which the PDF file should be written.
Example
Dim d As New DynaPDFMBS

// create PDF in memory
Call d.CreateNewPDF

// add a picture
Call d.Append
Call d.InsertImageEx(100, 100, 100, 100, "/Users/cs/Pictures/mond.jpg")
Call d.EndPage

// okay?
If d.HaveOpenDoc Then

// open target file
Dim f As FolderItem = SpecialFolder.Desktop.Child("mond.pdf")
Call d.OpenOutputFile(f)

// write and close
Call d.CloseFile

End If

See also:

Some examples using this method:

See also OpenOutputFile function in DynaPDF manual.

DynaPDFMBS.OpenOutputFile(Path as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 19.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function opens the output file into which the PDF file should be written.
Example
Dim d As New MyDynaPDFMBS

// create PDF in memory
Call d.CreateNewPDF

// add a picture
Call d.Append
Call d.InsertImageEx(100, 100, 100, 100, "/Users/cs/Pictures/mond.jpg")
Call d.EndPage

// okay?
If d.HaveOpenDoc Then

// open target file
Call d.OpenOutputFile("/Users/cs/Desktop/mond.pdf")

// write and close
Call d.CloseFile

End If

See also:

See also OpenOutputFile function in DynaPDF manual.

DynaPDFMBS.OpenOutputFileEncrypted(File as folderitem, OpenPwd as string, OwnerPwd as string, KeyLen as Integer, Restrict as Integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 16.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens the output file and sets the encryption parameters.

This function enables in combination with FlushPages the creation of very large encrypted PDF files with minimal memory usage.
The function can be called in a while statement, e.g. to display a open file dialog if the file could not be opened. Once the function succeeds the PDF file can be finished with CloseFile.

If the function succeeds the return value is true. If the function fails the return value is false.

See also:

See also OpenOutputFileEncrypted function in DynaPDF manual.

DynaPDFMBS.OpenOutputFileEncrypted(Path as String, OpenPwd as string, OwnerPwd as string, KeyLen as integer, Restrict as integer) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 19.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens the output file and sets the encryption parameters.

This function enables in combination with FlushPages the creation of very large encrypted PDF files with minimal memory usage.
The function can be called in a while statement, e.g. to display a open file dialog if the file could not be opened. Once the function succeeds the PDF file can be finished with CloseFile.

If the function succeeds the return value is true. If the function fails the return value is false.

See also:

See also OpenOutputFileEncrypted function in DynaPDF manual.

DynaPDFMBS.OpenTag(Tag as Integer, Lang as string, AltText as string, Expansion as string, BBox as DynaPDFRectMBS = nil) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tag.

Rect: Optional parameter BBox that is required by the tags btFigure and btTable.

BBox must be defined in the current coordinate system that is used to output the corresponding contents. All transformations will be taken into account.

Some examples using this method:

See also OpenTag function in DynaPDF manual.

DynaPDFMBS.OpenTagAnsi(Tag as Integer, Lang as string, AltText as string, Expansion as string, BBox as DynaPDFRectMBS = nil) as boolean   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.
Opens a tag with ANSI encoding.

Rect: Optional parameter BBox that is required by the tags btFigure and btTable.

See also OpenTag function in DynaPDF manual.

DynaPDFMBS.OpenTagEx(Tag as integer, Lang as string, AltText as string, Expansion as string, Attributes as String) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 23.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Opens a tag in the very same way as DynaPDF.OpenTag but supports additional parameters which can be set in a JSON (Javascript Object Notation) like format.

The optional parameter Attributes is a JSON like string. The JSON parser in DynaPDF supports a few extensions to make the definition of additional attributes as easy as possible.

See also OpenTagEx function in DynaPDF manual.

DynaPDFMBS.Optimize(Flags as Integer = 0, Params as DynaPDFOptimizeParamsMBS = nil) as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Optimizes PDF.
Example
dim pdf as new DynapdfMBS
// import PDF here

dim flags as integer = Bitwise.BitOr(_
pdf.kofInMemory, _ // Optimize the file fully in memory. Only useful for small PDF files.
pdf.kofScaleImages, _ // Scale images as specified in the DynaPDFOptimizeParamsMBS class.
pdf.kofNewLinkNames, _ // If set, rename all object links to short names like F1, F2 etc.
pdf.kofDeleteInvPaths, _ // Delete invisible paths.
pdf.kofDeletePrivateData, _ // Delete private data objects from pages, templates, and images.
pdf.kofIgnoreZeroLineWidth, _
pdf.kofDeleteAlternateImages, _ // If set, alternate images will be deleted.
pdf.kofDeleteThumbnails) // Thumbnails can be deleted since PDF viewers can create thumbnails easily on demand.


// pdf.kofInMemory // Optimize the file fully in memory. Only useful for small PDF files.
// pdf.kofConvertAllColors // If set, Separation, DeviceN, and NChannel color spaces will be converted to the device space.
// pdf.kofIgnoreICCBased // If set, ICCBased color spaces will be left unchanged.
// pdf.kofScaleImages // Scale all images
// pdf.kofNewLinkNames // If set, rename all object links to short names like F1, F2 etc.
// pdf.kofDeleteInvPaths // Delete invisible paths. An invisible path is a path that was finished with the no-op operator "n".
// more flags in DynaPDF documentation

Dim o As New DynaPDFOptimizeParamsMBS

o.MinColorRes = 100 // scale images with more than 100 dpi
o.ResColorImages = 150 // down to 150 dpi

call pdf.Optimize(flags, o)

This repairs also a lot of errors in the PDF and can shrink the PDF size.
After optimize, please close PDF. If you need to further edit it, please import it again in a new environment.

You need to use InitColorManagement to get color conversion working well if needed.

Note that this function requires the DynaPDF Pro.

See also Optimize function in DynaPDF manual.

DynaPDFMBS.PageLink(PosX as Double, PosY as Double, Width as Double, Height as Double, DestPage as Integer) 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 inserts a page link onto the current open page.

Some examples using this method:

See also PageLink function in DynaPDF manual.

DynaPDFMBS.PageLink2(PosX as Double, PosY as Double, Width as Double, Height as Double, NamedDest as Integer) 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 inserts a page link onto the current open page by using a named destination as target.

Some examples using this method:

See also PageLink2 function in DynaPDF manual.

DynaPDFMBS.PageLink3(PosX as Double, PosY as Double, Width as Double, Height as Double, NamedDest as string) as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.1 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function adds a page link to the current open page by using a named destination as target.

The difference in comparison to PageLink2() is that the named destination can be defined as string.
This makes it possible to create the link, also if you don't have the required information to create the named destination at this point. If the named destination does not exist when the file is closed then the link does nothing. See also, CreateNamedDest().

Return values:
If the function succeeds the return value is the annotation handle, a value greater or equal zero. If the function fails the return value is a negative error code.

See also PageLink3 function in DynaPDF manual.

Previous items Next items

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


The biggest plugin in space...