Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

Previous items Next items

DynaPDFMBS.RenderPDFFileExMT(OutFile as folderitem, Resolution as UInt32, Width as Integer, Height as Integer, Flags as UInt32, PixFmt as UInt32, Filter as UInt32, Format as UInt32) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 18.0 Yes Yes Yes Yes No
Function: Renders all PDF pages which are currently in memory and stores the result in a proprietary image format.
Notes:
The pages in memory could be imported from one or more external PDF files, e.g. with ImportPDFFile(), created with DynaPDF functions, or a combination of both.

The parameter OutFile can be a path to an existing directory or the file name of the output image. The latter type can be used with TIFF images because this format supports multi-page output. When a file path is used with a single page image format only the first page will be rendered.

The function checks whether the path is a directory or a file name.
The function can render pages in a specific resolution, or scale them to a given width or height.

Depending on which parameters are set the image size is calculated as follows:
  • Resolution > 0 and Width == 0 and Height == 0: Pages are rendered according to the given resolution. Note that PDF pages can be very large. Therefore, it is maybe not possible to render all pages in the whished resolution.
  • Resolution > 0 and Width < 0 and or Height < 0: Pages are rendered according to the given resolution. Negative values of Width and Height are interpreted as maximum width or height if Resolution is greater zero. Since PDF pages can be very large, it is recommended to set the maximum width and height to a value that is low enough so that no out of memory exception occurs, e.g. 5000 x 5000 pixels.
  • Resolution == 0 and Width > 0 or Height > 0: Pages are scaled to the given Width or Height. If Width and Height are greater zero then pages are scaled to that size independent of the original page format (not recommended). It is usually best to set the width or height to zero so that the function can calculate the missing value to preserve the aspect ratio.

On a 32 bit system it is possible to render PDF pages in RGB with up to around 1200 DPI, depending on the page format and available memory. The resolution of gray images can be higher but the encoder must be able to handle such large images. The PNG and bitmap encoders accept images in almost arbitrary resolutions but all other encoders can fail when the resolution is larger than about 2000 DPI.

The function calls the progress events.
Returns true on success or false on failure.

Same as RenderPDFFile, but multithreaded.

Must be called inside a Xojo (Real Studio) thread so time yields to main thread and you can keep the GUI running.
Requires DynaPDF Pro license.

Feedback, Comments & Corrections

DynaPDFMBS.RenderPDFFileMT(OutFile as folderitem, Resolution as UInt32, Flags as UInt32, PixFmt as UInt32, Filter as UInt32, Format as UInt32) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 18.0 Yes Yes Yes Yes No
Function: The function renders all PDF pages which are currently in memory and stores the result in a proprietary image format.
Notes:
Same as RenderPDFFile, but multithreaded.
Also check the dynapdf manual on the pdfRenderPDFFileA function (pdfRenderPDFFileW on Windows).

Must be called inside a Xojo (Real Studio) thread so time yields to main thread and you can keep the GUI running.
Requires DynaPDF Pro license.

Feedback, Comments & Corrections

DynaPDFMBS.ReOpenImportFile(Handle as Integer) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 13.2 Yes Yes Yes Yes No
Function: The function re-opens a PDf file so that further contents can be imported from it.
Notes:
The parameter Handle must be a valid file handle that OpenImportFile() or OpenImportBuffer() returned.
When the file is no longer needed close the parser instance with CloseImportFileEx().
If the function succeeds the return value is true. If the function fails the return value is false.

See also ReOpenImportFile function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceFont(PDFFontRef as Integer, Name as string, Style as integer = 0, NameIsFamilyName as boolean = true) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 Yes Yes Yes Yes No
Function: Replaces a PDF font with another one.
Notes:
The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.

On Linux or Unix system fonts must be loaded with AddFontSearchPath() before this function can be called. This should be done before the first PDF file is imported.

If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also ReplaceFont function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceFontAnsi(PDFFontRef as Integer, Name as string, Style as integer = 0, NameIsFamilyName as boolean = true) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 Yes Yes Yes Yes No
Function: Replaces a PDF font with another one.
Notes:
The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.

On Linux or Unix system fonts must be loaded with AddFontSearchPath() before this function can be called. This should be done before the first PDF file is imported.

If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also ReplaceFont function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceFontEx(PDFFontRef as Integer, FontFile as FolderItem, Embed as boolean = true) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 Yes Yes Yes Yes No
Function: Replaces a PDF font with another one.
Notes:
The font file can be loaded directly. It is not required to install the font on the system. The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.

If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also:

See also ReplaceFontEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceFontEx(PDFFontRef as Integer, FontFilePath as string, Embed as boolean = true) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 Yes Yes Yes Yes No
Function: Replaces a PDF font with another one.
Notes:
The font file can be loaded directly. It is not required to install the font on the system. The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.

If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also:

See also ReplaceFontEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceFontExAnsi(PDFFontRef as Integer, FontFilePath as string, Embed as boolean = true) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.2 Yes Yes Yes Yes No
Function: Replaces a PDF font with another one.
Notes:
The font file can be loaded directly. It is not required to install the font on the system. The function can be called in the OnFontNotFound event of the function CheckConformance(). The return value of the event should be the return value of this function. The parameter PDFFontRef is a parameter of the event. The font reference is required and must be passed unchanged to the function.

If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also ReplaceFontEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceICCProfile(ColorSpace as Integer, ICCFile as folderitem) 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: This function is used to dynamically create ICC based color spaces within the callback function OnReplaceICCProfile of CheckConformance().

See also ReplaceICCProfile function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceICCProfileEx(ColorSpace as integer, ICCFileData as MemoryBlock) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.5 Yes Yes Yes Yes No
Function: Replaces an ICC profile exactly in the same way as ReplaceICCProfile() but accepts a file buffer as input.
Notes: If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also:

See also ReplaceICCProfileEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceICCProfileEx(ColorSpace as integer, ICCFileData as String) as integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.5 Yes Yes Yes Yes No
Function: Replaces an ICC profile exactly in the same way as ReplaceICCProfile() but accepts a file buffer as input.
Notes: If the function succeeds the return value is zero. If the function fails the return value is a negative error code.

See also:

See also ReplaceICCProfileEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceImage(ImageToReplace as DynaPDFImageMBS, ImageFile as FolderItem, Index as Integer = 1, ColorSpace as Integer = 0, CSHandle as Integer = -1, Flags as Integer = 0) 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: Replaces an image with another image.
Notes:
The parameter ImageToReplace must be a valid pointer of an image object which is retrieved by functions like GetImageObj() or ParseContent().
The resolution, aspect ratio, color space and so on can be freely chosen. However, note that this function does not change the output position or size. If the aspect ratio of the new image is different, then it will be stretched or shrinked to fit into the output rectangle.
The parameter ColorSpace specifies the destination color space into which the image should be converted or saved, if the image is already defined in that color space. CSHandle must be the handle of that color space if a non-device space is used. The will be ignored for devices spaces.

The function works in the very same way as InsertImageEx() with the following differences:
• The color of an image mask cannot be set or changed because this would require changes on the content stream in which the image is used. An image mask will be created if the image color depth is 1 bit and if color key masking is enabled (see SetUseTransparency()). SetUseTransparency() should normally be set to false before calling this function.
• The image will never be downscaled, independent of the current resolution, because the size of the output rectangle is not known.

If the image that should be replaced is a soft mask of another base image, then make sure that the destination color space is set to kesDeviceGray, kesCalGray, or to a one channel ICC based color space because a soft mask must not contain more than one color channel.
The flags kgfUseImageColorSpace, kgfIgnoreICCProfiles, kgfRealPassThrough, and kfNoBitmapAlpha are all supported. See SetGStateFlags() for further information.

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

See also ReplaceImage function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceImageEx(ImageToReplace as DynaPDFImageMBS, ImageData as MemoryBlock, Index as Integer = 1, ColorSpace as Integer = 0, CSHandle as Integer = -1, Flags as Integer = 0) 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: Replaces an image with a new image exactly like ReplaceImage() but accepts a file buffer as input.
Notes:
See ReplaceImage() for further information.

If the function succeeds the return value is 1. If the function fails the return value is 0.

See also:

See also ReplaceImageEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplaceImageEx(ImageToReplace as DynaPDFImageMBS, ImageData as String, Index as Integer = 1, ColorSpace as Integer = 0, CSHandle as Integer = -1, Flags as Integer = 0) 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: Replaces an image with a new image exactly like ReplaceImage() but accepts a file buffer as input.
Notes:
See ReplaceImage() for further information.

If the function succeeds the return value is 1. If the function fails the return value is 0.

See also:

See also ReplaceImageEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplacePageText(text as string, stack as DynaPDFStackMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 7.7 Yes Yes Yes Yes No
Function: The function deletes or replaces a text string of a content stream that was found by the function GetPageText() beforehand.
Notes:

Be aware that ReplacePageText can't always replace text as encoding must match and fonts may not have the characters for the new text. For that better use ReplacePageTextEx.

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

See also ReplacePageText function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplacePageTextEx(text as string, stack as DynaPDFStackMBS) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 7.7 Yes Yes Yes Yes No
Function: The function deletes or replaces a text string of a content stream that was found by the function GetPageText() beforehand.
Notes:
The text parameter is converted to unicode.

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

See also ReplacePageTextEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ReplacePageTextExAnsi(text as string, stack as DynaPDFStackMBS) 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: The function deletes or replaces a text string of a content stream that was found by the function GetPageText() beforehand.
Notes:
The text parameter is converted to ANSI.
Requires DynaPDF Pro license.

See also ReplacePageTextEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ResetEncryptionSettings as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.0 Yes Yes Yes Yes No
Function: Resets the encryption settings which were imported from an external PDF file so that the PDF file in memory can be saved unencrypted.
Notes: If the function succeeds the return value is true. If the function fails the return value is false.

See also ResetEncryptionSettings function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ResetLineDashPattern 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 resets a previously defined line dash pattern to its default value (straight line).

See also ResetLineDashPattern function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.RestoreGraphicState 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 restores a previously saved graphics state.

See also RestoreGraphicState function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.RotateCoords(alpha as Double, OriginX as Double, OriginY 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 rotates the coordinate system at the point OriginX, OriginY by applying a transformation matrix.
Notes: Please do not try to scale/skew/translate back later. use SaveGraphicState and RestoreGraphicState.

See also RotateCoords function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.RotateTemplate(OldTemplate as Integer, Rotation as Integer, RotateCoords as boolean = false) as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 17.0 Yes Yes Yes Yes No
Function: Rotates a template.
Notes:
Returns a new template handle.
This is a convenience function which creates a new template and draws the existing template there with rotation.
Returns negative number for errors. The plugin uses -1 for plugin errors like wrong rotation angle.

RotateCoords: Whether to rotate coordinate system.
This is now done by DynaPDF automatically, so for current version of the library, this must be false. But older versions need the true.

Feedback, Comments & Corrections

DynaPDFMBS.RoundRect(PosX as Double, PosY as Double, Width as Double, Height as Double, Radius as Double, FillMode 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 draws a rectangle with rounded corners.
Example:
dim pdf as new DynaPDFMBS
dim f as FolderItem = SpecialFolder.Desktop.Child("Create PDF with Round Rectangles.pdf")

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

call pdf.CreateNewPDF f
call pdf.Append

dim PosX as Double = 100.0
dim PosY as Double = 100.0
dim Width as Double = 100.0
dim Height as Double = 100.0
dim Radius as Double = 20.0
dim FillMode as Integer = pdf.kfmFill

call pdf.RoundRect(PosX, PosY, Width, Height, Radius, FillMode)

PosX = 300.0
dim RadiusX as Double = 30.0
dim RadiusY as Double = 30.0

call pdf.RoundRectEx(PosX, PosY, Width, Height, RadiusX, RadiusY, FillMode)

call pdf.EndPage
call pdf.CloseFile

f.Launch

See also RoundRect function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.RoundRectEx(PosX as Double, PosY as Double, Width as Double, Height as Double, rWidth as Double, rHeight as Double, FillMode 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 draws a rectangle with elliptical corners.
Example:
dim pdf as new DynaPDFMBS
dim f as FolderItem = SpecialFolder.Desktop.Child("Create PDF with Round Rectangles.pdf")

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

call pdf.CreateNewPDF f
call pdf.Append

dim PosX as Double = 100.0
dim PosY as Double = 100.0
dim Width as Double = 100.0
dim Height as Double = 100.0
dim Radius as Double = 20.0
dim FillMode as Integer = pdf.kfmFill

call pdf.RoundRect(PosX, PosY, Width, Height, Radius, FillMode)

PosX = 300.0
dim RadiusX as Double = 30.0
dim RadiusY as Double = 30.0

call pdf.RoundRectEx(PosX, PosY, Width, Height, RadiusX, RadiusY, FillMode)

call pdf.EndPage
call pdf.CloseFile

f.Launch

See also RoundRectEx function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.SaveGraphicState 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 saves the current graphics state.

See also SaveGraphicState function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.ScaleCoords(sx as Double, sy 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 scales the coordinate system by applying a transformation matrix.
Notes: Please do not try to scale/skew/translate back later. use SaveGraphicState and RestoreGraphicState.

See also ScaleCoords function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.SelfTest 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 checks the size of all required data types and checks whether the endian configuration of the library is correct.

See also SelfTest function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.Set3DAnnotProps(Annot as Integer, ActType as Integer, DeActType as Integer, InstType as Integer, DeInstType as Integer, DisplayToolbar as boolean, DisplayModelTree as boolean) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 9.8 Yes Yes Yes Yes No
Function: Sets the properties of a 3D Annotation.

See also Set3DAnnotProps function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.Set3DAnnotScriptAnsi(Annot as Integer, Value as string) as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
method DynaPDF MBS DynaPDF Plugin 9.8 Yes Yes Yes Yes No
Function: Sets the 3D Annoation Script.

See also Set3DAnnotScript function in DynaPDF manual.

Feedback, Comments & Corrections

DynaPDFMBS.SetAllocBy(Value 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 sets the size of the memory blocks in kilo bytes, which will be allocated if memory must be allocated for page content streams.

See also SetAllocBy 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