Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

DynaPDFMBS.LoadLayerConfig(Index as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.5 Yes Yes Yes Yes No
Function: Loads the specified layer configuration.
Notes:
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.

Feedback, Comments & Corrections

DynaPDFMBS.LockLayer(layer as UInt32) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 12.4 Yes Yes Yes Yes No
Function: Unlocks a layer.

See also LockLayer function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.MovePage(source as Integer, dest as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function moves a page to another position in the document.

See also MovePage function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.MoveTo(PosX as Double, PosY as Double) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: 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.

Feedback, Comments & Corrections

DynaPDFMBS.OpenImportBuffer(Buffer as Memoryblock, PwdType as Integer = 0, Password as string = "") as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 13.0 Yes Yes Yes Yes No
Function: The function reads an external PDF from a file buffer so that it can be imported entirely or parts of it.
Notes: Requires DynaPDF Lite license.

See also:

See also OpenImportBuffer function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.OpenImportBuffer(Buffer as string, PwdType as Integer = 0, Password as string = "") as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function reads an external PDF from a file buffer so that it can be imported entirely or parts of it.
Notes: Requires DynaPDF Lite license.

See also:

See also OpenImportBuffer function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.OpenImportFile(File as folderitem, PwdType as Integer = 0, Password as string = "") as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function opens an external PDF file so that it can be imported entirely or parts of it.
Notes:
Also check the dynapdf manual on the pdfOpenImportFileA function (pdfOpenImportFileW on Windows).
Requires DynaPDF Lite license.

See also OpenImportFile function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.OpenOutputFile(File as folderitem) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function opens the output file into which the PDF file should be written.
Notes: Also check the dynapdf manual on the pdfOpenOutputFileA function (pdfOpenOutputFileW on Windows).

See also OpenOutputFile function in DynaPDF manual.

Feedback, Comments & Corrections

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 Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 16.3 Yes Yes Yes Yes No
Function:
Opens the output file and sets the encryption parameters.
Remarks:
Notes:
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 OpenOutputFileEncrypted function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.OpenTag(Tag as Integer, Lang as string, AltText as string, Expansion as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.2 Yes Yes Yes Yes No
Function: Opens a tag.

See also OpenTag function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.OpenTagAnsi(Tag as Integer, Lang as string, AltText as string, Expansion as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.3 Yes Yes Yes Yes No
Function: Opens a tag with ANSI encoding.

Feedback, Comments & Corrections

DynaPDFMBS.Optimize(Flags as Integer, Params as DynaPDFOptimizeParamsMBS = nil) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 14.2 Yes Yes Yes Yes No
Function: Optimizes PDF.
Notes: See dynapdf manual for details.

See also Optimize function in DynaPDF manual.

Feedback, Comments & Corrections

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 Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function inserts a page link onto the current open page.

See also PageLink function in DynaPDF manual.

Feedback, Comments & Corrections

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 Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function inserts a page link onto the current open page by using a named destination as target.

See also PageLink2 function in DynaPDF manual.

Feedback, Comments & Corrections

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 Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 12.1 Yes Yes Yes Yes No
Function: The function adds a page link to the current open page by using a named destination as target.
Notes:
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.

Feedback, Comments & Corrections

DynaPDFMBS.PageLinkEx(PosX as Double, PosY as Double, Width as Double, Height as Double, DestType as Integer, DestPage as Integer, a as Double, b as Double, c as Double, d as Double) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function inserts a page link onto the current open page.

See also PageLinkEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PageStatistic(page as Integer = -1) as DynaPDFPageStatisticMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 12.5 Yes Yes Yes Yes No
Function: Queries statistics from a page.
Notes:
If page is -1 the current open page is used. Else the plugin uses editpage(page) to open the page and run the statistics on that.
Returns nil on any error or statistic value.

Feedback, Comments & Corrections

DynaPDFMBS.ParseContent(ParseInterface as DynaPDFParseInterfaceMBS, flags as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.6 Yes Yes Yes Yes No
Function: Parses the content of a page.
Notes: Requires DynaPDF Pro license.

See also ParseContent function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PlaceImage(ImgHandle as Integer, PosX as Double, PosY as Double, Width as Double, Height as Double) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: Images can be used multiple times on different positions and with different sizes. This function places an image onto a page or template that was already inserted beforehand by an image function.

See also PlaceImage function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PlaceSigFieldValidateIcon(SigField as Integer, PosX as Double, PosY as Double, Width as Double, Height as Double) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function places the validation icon in a signature field to the whished position.

See also PlaceSigFieldValidateIcon function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PlaceTemplate(TmplHandle as Integer, PosX as Double, PosY as Double, Width as Double, Height as Double) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 8.0 Yes Yes Yes Yes No
Function: The function places a template onto a page, another open template, or pattern.

See also PlaceTemplate function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PlaceTemplateEx(TmplHandle as Integer, PosX as Double, PosY as Double, ScaleWidth as Double, ScaleHeight as Double) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 10.1 Yes Yes Yes Yes No
Function: Places a template.

See also PlaceTemplateEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PolygonAnnot(Vertices() as DynaPDFPointMBS, LineWidth as Double, FillColor as UInt32, StrokeColor as UInt32, ColorSpace as Integer, Author as string, Subject as string, Content as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 14.0 Yes Yes Yes Yes No
Function: The function creates a Polygon Annotation.
Notes:
The vertices are connected by straight lines. The path is always closed before it will be drawn. It is not required to close the path explicitly. At least two vertices must be provided.
The coordinates of the vertices are interpretet in current user space. Any transformation that was applied on the coordinate system will be taken into account.
The stroke or fill color can be set to the special constant kNO_COLOR to fill or stroke the polygon. It is not allowed to set both colors to kNO_COLOR since this would result in an invisible annotation.
This annotation type has an associated PopUp annotation that displays the string Content in a floating window. The initial window state of the associated PopUp annotation is closed by default but the state can be changed with SetAnnotOpenState if necessary.


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

Feedback, Comments & Corrections

DynaPDFMBS.PolygonAnnotAnsi(Vertices() as DynaPDFPointMBS, LineWidth as Double, FillColor as UInt32, StrokeColor as UInt32, ColorSpace as Integer, Author as string, Subject as string, Content as string) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 14.0 Yes Yes Yes Yes No
Function: The function creates a Polygon Annotation.
Notes:
The vertices are connected by straight lines. The path is always closed before it will be drawn. It is not required to close the path explicitly. At least two vertices must be provided.
The coordinates of the vertices are interpretet in current user space. Any transformation that was applied on the coordinate system will be taken into account.
The stroke or fill color can be set to the special constant kNO_COLOR to fill or stroke the polygon. It is not allowed to set both colors to kNO_COLOR since this would result in an invisible annotation.
This annotation type has an associated PopUp annotation that displays the string Content in a floating window. The initial window state of the associated PopUp annotation is closed by default but the state can be changed with SetAnnotOpenState if necessary.


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.

Feedback, Comments & Corrections

DynaPDFMBS.PolyLineAnnot(Vertices() as DynaPDFPointMBS, 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
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 14.0 Yes Yes Yes Yes No
Function: The function creates a PolyLine Annotation.
Notes:
The vertices are connected by straight lines. At least two vertices must be provided.
The coordinates of the vertices are interpretet in current user space. Any transformation that was applied on the coordinate system will be taken into account.
The parameter FillColor is only used if the line end style of the start or end point has an interior that can be filled. The special constant kNO_COLOR represents a transparent interior.
The stroke color is required and must not be set to kNO_COLOR.

This annotation type has an associated PopUp annotation that displays the string Content in a floating window. The initial window state of the associated PopUp annotation is closed by default but the state can be changed with SetAnnotOpenState if necessary.
The parameter LineWidth must be in the range 0 through 12 units. Values outside the valid range will be adjusted to the nearest allowed value. A zero line width produces a 1 pixel wide line.
The line end styles can be changed if necessary with SetAnnotLineEndStyle.

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

Feedback, Comments & Corrections

DynaPDFMBS.PolyLineAnnotAnsi(Vertices() as DynaPDFPointMBS, 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
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 14.0 Yes Yes Yes Yes No
Function: The function creates a PolyLine Annotation.
Notes:
The vertices are connected by straight lines. At least two vertices must be provided.
The coordinates of the vertices are interpretet in current user space. Any transformation that was applied on the coordinate system will be taken into account.
The parameter FillColor is only used if the line end style of the start or end point has an interior that can be filled. The special constant kNO_COLOR represents a transparent interior.
The stroke color is required and must not be set to kNO_COLOR.

This annotation type has an associated PopUp annotation that displays the string Content in a floating window. The initial window state of the associated PopUp annotation is closed by default but the state can be changed with SetAnnotOpenState if necessary.
The parameter LineWidth must be in the range 0 through 12 units. Values outside the valid range will be adjusted to the nearest allowed value. A zero line width produces a 1 pixel wide line.
The line end styles can be changed if necessary with SetAnnotLineEndStyle.

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.

Feedback, Comments & Corrections

DynaPDFMBS.PrintGetDevMode as String
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 No Yes No No No
Function: Queries last print dev mode.
Notes:
You can store this in a preferences file for next printing.
This is same data structure as in WindowsDeviceModeMBS class.

Feedback, Comments & Corrections

DynaPDFMBS.PrintGetDevNames(byref Driver as String, byref Device as String, byref Output as String, byref DefaultFlag as Integer) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 No Yes No No No
Function: Queries printer device names.
Notes:
Driver: File name (without the extension) of the device driver.
Device: Name of the device.
Output: Device name for the physical output medium (output port).
DefaultFlag: 1 if the selected printer is the default one.

Returns true on success or false on failure.

Feedback, Comments & Corrections

DynaPDFMBS.PrintPDFFile(TmpDir as FolderItem, DocName as string, DCHandle as integer, Flags as Integer = 0, Margin as DynaPDFRectMBS = nil, PrintParams as DynaPDFPrintParamsMBS = nil) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 15.1 No Yes No Yes, Windows only No
Function: Prints current PDF file.
Notes:
Returns true on success and false on failure.
Flags can be a combination of the flag values kpffPrintAsImage, kpffDefault, kpffColor, kpffAutoRotateAndCenter and kpff1Bit.
Margin can be nil. If not nil, specifies the margins to use.
DCHandle is the handle of the graphics context.

If you only want to print a selection of pages, please only import those pages via ImportPDFPage function. Or use DeletePage to remove the pages you don't want to print.

Does not work with a graphics handle from Xojo 2016r4 and newer due to switch to DirectDraw APIs.
Or in other words, you can use a HDC handle from graphics class in Xojo 2016r3 and older to print PDF.

See also:

See also PrintPDFFile function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.PrintPDFFile(TmpDir as FolderItem, DocName as string, PrinterName as String, Flags as Integer = 0, Margin as DynaPDFRectMBS = nil, PrintParams as DynaPDFPrintParamsMBS = nil) as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 No Yes No Yes, Windows only No
Function: Prints current PDF file.
Notes:
Returns true on success and false on failure.
Flags can be a combination of the flag values kpffPrintAsImage, kpffDefault, kpffColor, kpffAutoRotateAndCenter and kpff1Bit.
Margin can be nil. If not nil, specifies the margins to use.
PrinterName is the name of the printer to use. The plugin will open the printer and print PDF there with default settings.

If you only want to print a selection of pages, please only import those pages via ImportPDFPage function. Or use DeletePage to remove the pages you don't want to print.

See also:

See also PrintPDFFile function in DynaPDF manual.

Feedback, Comments & Corrections

Previous items Next items

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





Links
MBS Xojo Chart Plugins