Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

DynaPDFMBS.EnumDocFont(Font as DynaPDFFontMBS, FontInfo as DynaPDFFontInfoMBS, Type as Integer, BaseFont as string, Fontname as string, Embedded as boolean, IsFormFont as boolean, Flags as Integer, FontRef as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The event being called if you use the EnumDocFonts function.
Notes:
Font is deprecated. FontRef is the internal reference to the font.
FontInfo is the new property to use for font details.

Feedback, Comments & Corrections

DynaPDFMBS.EnumHostFont(FamilyName as string, PostScriptName as string, Style as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The event called by EnumHostFonts.

Feedback, Comments & Corrections

DynaPDFMBS.EnumHostFontEx(FamilyName as string, PostScriptName as string, Style as Integer, BaseType as Integer, Embeddable as boolean, Flags as Integer, FilePath as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The event called by EnumHostFontsEx.

Feedback, Comments & Corrections

DynaPDFMBS.Error(ErrorCode as Integer, ErrorMessage as string, ErrorType as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The error callback.
Notes:
ErrCode is a positive error number starting at zero; it is an index into the array of error messages. ErrType is a bitmask to determine what kind of error occurred. The following
constants are defined:

const E_WARNING = &h02000000
const E_SYNTAX_ERROR = &h04000000
const E_VALUE_ERROR = &h08000000
const E_FONT_ERROR = &h10000000
const E_FATAL_ERROR = &h20000000
const E_FILE_ERROR = &h40000000

At time of publication only one flag is set at any one time. Future versions may be set multiple flags, e.g. E_SYNTAX_ERROR and E_WARNING. Because of this, it is recommended to mask out the error type with a bitwise and operator.
If the callback function returns a value other than zero (0), processing stops immediately.

Feedback, Comments & Corrections

DynaPDFMBS.InitProgress(ProgType as Integer, MaxCount as Integer)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: Called when a progress ist starting.
Notes:
The return value of the progress callback function must be 0, any other return value breaks processing.

See pt* constants for ProgType.

Feedback, Comments & Corrections

DynaPDFMBS.OnFontNotFound(PDFFontRef as Integer, FontName as string, Style as Integer, StdFontIndex as Integer, IsSymbolFont as boolean) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The events called when a font is not found.
Notes:
Please call one of the ReplaceFont functions here and return their return code from the callback.
Or return -1 if your code has an error.

See also OnFontNotFound function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.OnReplaceICCProfile(Type as Integer, ColorSpace as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The event called when an ICC profile is replaced.

See also OnReplaceICCProfile function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PageBreak(LastPosX as Double, LastPosY as Double, PageBreak as boolean) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The event called on every pagebreak.
Notes:
The parameter PageBreak of the event specifies why the event was called:
  • If true, a page break tag in the string was found (see WriteFText for further information).
  • If false, the output rectangle was filled with text entirely.

The usage of the event is described in detail under WriteFText(). However, the following
return values of the event can be used the change the text alignment:

New Alignment Left 1
New Alignment Right 2
New Alignment Center 3
New Alignment Justify 4

A return value of zero indicates that the alignment must not be changed. Negative return values break processing immediately. WriteFText() returns then with a warning.

When the event is called, the coordinate system is always bottom-up, it can be changed to top-down coordinates inside the event if necessary. The current page is still open, the page must be closed with EndPage() before a new page can be added or opened with Append() or EditPage(). To determine the current page number, call GetPageNum().

For example SetFont may fail if you try normal font family names. That is because SetFontSelMode is used with postscript names and you may want to set it to ksmPostScriptName using SetFontSelMode for SetFont to accept family names.

Feedback, Comments & Corrections

DynaPDFMBS.Progress(ActivePage as Integer) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes No No
Function: The progress callback.
Notes: The return value of the progress callback function must be 0, any other return value breaks processing.

Feedback, Comments & Corrections

DynaPDFMBS.RasterShowText(MatrixBefore as DynaPDFMatrixMBS, MatrixAfter as DynapdfMatrixMBS, TextBuffers() as DynaPDFTextRecordAMBS, Texts() as String, Width as Double, Vertical as boolean, FontRef as Integer, textScaling as Double)
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
event DynaPDF MBS DynaPDF Plugin 16.2 Yes Yes Yes No No
Function: Rastering draws text.
Notes:
This is experimental and will be replaced later with a better API in a future DynaPDF release.
Works only if you have a plugin where this is enabled by us.

If you implement this event, you get an event whenever one of the rasterizers draws some text on a page.
MatrixBefore tells you start position, MatrixAfter end position. TextBuffers provide raw text data. Texts array the matching unicode text. Width is length of text in points. Vertical is true for vertical text. FontRef is the internal font reference. You can query fonts with EnumDocFont before to get a list of all fonts and find it in the array. Do not use font functions in the event as that can confuse the rasterizer.

Do not use with MT methods, please.

Feedback, Comments & Corrections

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




Links
MBS Xojo Plugins