Platforms to show: All Mac Windows Linux Cross-Platform

Back to DynaPDFMBS class.

DynaPDFMBS.EditPage(PageNum 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
This function prepares a page for editing.
Example
Var pdf as DynaPDFMBS // your dynapdf instance

// edit page 1
call pdf.EditPage(1)
// set a font
call pdf.SetFont( "Times New Roman",pdf.kfsNone,46,True,pdf.kcp1252 )
// set a color
call pdf.SetFillColor(0)

// now add a text annotation
call pdf.FreeTextAnnot( 100, 100, 100, 100, "author", "test", 0 )

// end page
call pdf.EndPage

Some examples using this method:

See also EditPage function in DynaPDF manual.

DynaPDFMBS.EditTemplate(index 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
This function prepares a template for editing.

Some examples using this method:

See also EditTemplate function in DynaPDF manual.

DynaPDFMBS.EditTemplate2(handle 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 prepares the template for editing.

See also EditTemplate2 function in DynaPDF manual.

DynaPDFMBS.Ellipse(PosX as Double, PosY as Double, Width as Double, Height as Double, FillMode 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
This function draws an ellipse.

See also Ellipse function in DynaPDF manual.

DynaPDFMBS.EnableImageCache(MaxImageCount as UInt32, Size as UInt32) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 24.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Creates an image cache that is used when rendering PDF pages.

The maximum number of images and the maximum cache size can be set independently of each other.
Caching can speed up rendering dramatically but caching can also slow down rendering if too many images are in the cache. Therefore, the maximum number of images must be restricted. The value should be between 256 and 1024 but not much higher.
The optimal cache size depends on the number of pages and whether the app is 32 or 64 bit. The cache size can be large, e.g. up to 1 GB on 32 bit or 2 GB on 64 bit systems, if a document contains only a few pages. Images are cached only if the system contains enough memory.
The size of the image cache should be around 30% of the entire cache size for rendered images. If the full cache size is 1 GB, for example, then around 300 MB should be used for the image cache. Keep all caches dynamic depending on the currently available memory.
The cache size is automatically reduced if the system has not sufficient memory.
The cache is always cleared when the PDF file in memory was closed or when FreePDF() was called. In order to disable or delete the cache set MaxImageCount or Size to zero.

Returns true on success and false on failure.

See also EnableImageCache function in DynaPDF manual.

DynaPDFMBS.EnableMutex(Value as boolean)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 14.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Whether to enable mutex or not.

DynaPDFMBS.EncryptPDF(File as folderitem, OpenPwd as string, OwnerPwd as string, KeyLen as Integer, Restrict 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
This function encrypts a PDF file.

Some examples using this method:

See also EncryptPDF function in DynaPDF manual.

DynaPDFMBS.EncryptPDFAnsi(Path as string, OpenPwd as string, OwnerPwd as string, KeyLen as Integer, Restrict as Integer) as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use the non ANSI function instead.
This function encrypts a PDF file.

Same as EncryptPDF, but takes path name in Windows ANSI encoding.

See also EncryptPDF function in DynaPDF manual.

DynaPDFMBS.EndContinueText as Boolean   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.
This function finishes a continue text block that was created with the function BeginContinueText() beforehand.

See also EndContinueText function in DynaPDF manual.

DynaPDFMBS.EndLayer as boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 10.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function closes a layer that was opened by BeginLayer.

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

See also EndLayer function in DynaPDF manual.

DynaPDFMBS.EndPage as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function closes an open page that was opened by Append() or EditPage().
Example
Var pdf as DynaPDFMBS // your DynaPDF object
Var bBool as Boolean

bBool=pdf.EndPage

See also EndPage function in DynaPDF manual.

DynaPDFMBS.EndPattern as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function closes an open pattern that was opened by BeginPattern() or CreateStdPattern().

See also EndPattern function in DynaPDF manual.

DynaPDFMBS.EndTemplate as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 8.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This function closes an open template that was opened by BeginTemplate(), EditTemplate() or EditTemplate2().

See also EndTemplate function in DynaPDF manual.

DynaPDFMBS.EnumDocFonts 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 enumerates all fonts used in the current PDF document.

Will call the EnumDocFont event.

See also EnumDocFonts function in DynaPDF manual.

DynaPDFMBS.EnumDocFontsCount as Integer

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 7.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
The function enumerates all fonts used in the current PDF document and returns the count.

Returns the number of fonts found. Does not call the event.

DynaPDFMBS.EnumHostFonts as Integer   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 GetSysFontInfos instead.
This function enumerates all fonts found in the search directories by passing the font names to a callback function.

Calls the EnumHostFont event.

See also EnumHostFonts function in DynaPDF manual.

DynaPDFMBS.EnumHostFontsCount as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 7.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use GetSysFontInfos instead.
This function enumerates all fonts found in the search directories.

Returns the number of fonts found. Does not call the event.

DynaPDFMBS.EnumHostFontsEx as Integer   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 GetSysFontInfos instead.
The function enumerates all fonts found in the search directories in the same way as EnumHostFonts().

Calls the EnumHostFontEx event.

See also EnumHostFontsEx function in DynaPDF manual.

DynaPDFMBS.EnumHostFontsExCount as Integer   Deprecated

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 7.7 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
This item is deprecated and should no longer be used. You can use GetSysFontInfos instead.
The function enumerates all fonts found in the search directories in the same way as EnumHostFontsCount().

Returns the number of fonts found. Does not call the event.

DynaPDFMBS.ExchangeBookmarks(Bmk1 as Integer, Bmk2 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
This function exchanges two bookmarks.

See also ExchangeBookmarks function in DynaPDF manual.

DynaPDFMBS.ExchangePages(first as Integer, second 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 exchanges two pages.

See also ExchangePages function in DynaPDF manual.

DynaPDFMBS.ExtractPageText(RemoveText as boolean = false) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 12.5 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Extracts text of current open page.

This is a convenience function so you don't need to use DynaPDFStackMBS class yourself.
Returns the text of the page. Use EditPage() to open a page and than EndPage() to close it.

If you have problems with asian characters, please make sure you use SetCMapDir and load the CMAPs.
Requires DynaPDF Pro license.

Deprecated in favor of newer ExtractText function.

Some examples using this method:

DynaPDFMBS.ExtractPageTextRect(Left as Double, Top as Double, Right as Double, Bottom as Double, RemoveText as boolean = false) as String

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 16.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Extracts text of current open page within given rectangle.

Text that starts within the given rectangle is captured.
Be aware that PDF coordinates start on bottom left of page with 0/0.

This is a convenience function so you don't need to use DynaPDFStackMBS class yourself.
Returns the text of the page. Use EditPage() to open a page and than EndPage() to close it.

If you have problems with asian characters, please make sure you use SetCMapDir and load the CMAPs.
Requires DynaPDF Pro license.

Deprecated in favor of newer ExtractText function.

Some examples using this method:

DynaPDFMBS.ExtractText(PageNum as Integer, Flags as Integer, rect as DynaPDFRectMBS = nil, byref text as string) as Boolean

Type Topic Plugin Version macOS Windows Linux iOS Targets
method DynaPDF MBS DynaPDF Plugin 18.0 ✅ Yes ✅ Yes ✅ Yes ✅ Yes All
Extracts the text of the page PageNum.
Example
Var pdf as DynaPDFMBS

Var Page as Integer = 1 // first page
Var Flags as Integer = ktefDefault
Var text as string
Var ok as boolean = pdf.ExtractText(Page, Flags, text)

if ok then
MessageBox text
end if

The first page is denoted by 1.

Text lines can be sorted in x- and y-direction. The flag ktefDeleteOverlappingText causes that identical text records which are placed on the same position (with a tolerance of 2 units) will be deleted. The records must occur one after the other in order to detect them.

The optional parameter Area can be set to restrict the text extraction to that rectangle. The rectangle must be defined according to the current coordinate system. That means either in bottom up or top down coordinates, see SetPageCoords() for further information. Note also that the function considers the orientation of the page. The width and height of the rectangle must be exchanged if the orientation is 90, -90, 270, or -270 degrees.

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

See also ExtractText function in DynaPDF manual.

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


The biggest plugin in space...