Skip to main content

%DeepSee.Component.deepseeSvgImageProvider

class %DeepSee.Component.deepseeSvgImageProvider extends %ZEN.ComponentEx.svgImageProvider

SVGImageProvider These utilities are built upon the java .jar libraries in the FOP distribution included with modern releases of InterSystems IRIS

Property Inventory

Method Inventory

Parameters

parameter DOMAIN = %DeepSee;
parameter NAMESPACE = http://www.intersystems.com/deepsee;
This is the XML namespace used for library components.

Properties

property printParameters;
Property methods: printParametersDisplayToLogical(), printParametersGet(), printParametersIsValid(), printParametersLogicalToDisplay(), printParametersLogicalToOdbc(), printParametersNormalize(), printParametersSet()

Methods

classmethod MergeXSLFiles(pOutFile, pTargetFile, pSourceFiles, pSessionId="") as %Status [ ZenMethod ]
Do the work of performing the merge of two or more xsl files into a single file pOutfile. All files must be located in the mgr/Temp directory. The pTargetFile is the master file which will provide the page settings. The argument pSourceFiles is a list of file names delimited by "||". The page content of each of these files will be appended to the content of the pTargetFile spearated by a page break.
clientmethod addSVGLegendToChart(chartDocument, legendSVG, legendPosition) [ Language = javascript ]
- chartDocument is the document obtained using %DeepSee.Component.deepseeSvgImageProvider:getSVGDOMRoot(chartSVGFrameId) - legendSVG is manufactured by %DeepSee.Component.deepseeSvgImageProvider:createSVGTableFromZenComponent(chartLegendId)
clientmethod applyHTMLStyleToSVG(svgNode, htmlStyle, forBatik, suppressPadding) [ Language = javascript ]
As closely as possible copy an html css style definition to an SVG object. This can sanitize the style input for compatibility printing in Batik or retain more complex styling for browser display.
clientmethod calculateMaxImageHeight(metaDataJS) [ Language = javascript ]
This interprets the current page margin settings and returns the maximum height available for the svg image. The value is returned in points.
clientmethod calculateMaxImageWidth(metaDataJS) [ Language = javascript ]
This interprets the current page margin settings and returns the maximum width available for the svg image. The value is returned in points.
clientmethod clipSvgContent(svgContent, height, width, clipTargetId, clipX, clipY) [ Language = javascript ]
Create a clipPath to add to a limited copy of the svgContent that will appropriately size one page of printable content. The function assumes a provided svgcontent which uses absolute positioning relative to the frame and produces a copy of the content visible inside the clip window.
clientmethod convertHTMLCellToSVGRect(htmlCell, geometry) [ Language = javascript ]
Given an htmlCell representing a cell of an html table, return an equivalent representation as a member of an svg group.
clientmethod convertHTMLTableToSVG(table, defaultId) [ Language = javascript ]
Create an SVG representation of a single HTML table. These could be:
- Components of a pivot or listing table
- Chart legends
clientmethod convertSizeToPoint(sizeStr) [ Language = javascript ]
Given a size attribute setting, convert it to points. The size is returned in an object:
size.value
size.units
clientmethod createSVGTableFromResultSet(jsRS, htmlTemplateId, parms) [ Language = javascript ]
Create and return an SVG materialization of a DeepSeeResultSet client object. The resultset is required, styling and sizing templates may be included to influence cell sizes, headers, and font styling in the final SVG product.
clientmethod createSVGTableFromZenComponent(componentId) [ Language = javascript ]
Given the ID of a Zen component, attempt to extract the primary html table and convert it to an SVG representation. This also supports 4-quadrant tables used for some DeepSee widgets.
clientmethod createSVGTextCell(text, id, geometry, htmlStyle) [ Language = javascript ]
Create a fully styled cell around a particular text. The {x,y,h,w} geometry can be supplied as this is created using geometry.
clientmethod createSVGTextNode(text, id, geometry, htmlStyle) [ Language = javascript ]
Create the specific text
clientmethod createSvgTableFrame(refId, height, width) [ Language = javascript ]
Produce a standard SVG container for the printable tables which can get filled with resultset content.
clientmethod createTempSvgContainer() [ Language = javascript ]
Create a temporary SVG container in the body of the Zen component. This is used to trigger the calcualation of bounding boxes of temporary elements that would not otherwise be committed to the DOM.
clientmethod destroyTempSvgContainer() [ Language = javascript ]
Remove the temporary SVG container from the Zen body.
clientmethod dumpDOMNodeGeometry(node, level, stem, last, pst, psl, svgGroup) [ Language = javascript ]
Recursive function to dump the nesting structure and base geometry of a tree of DOM nodes node: the root the of the current subtree level: the currnet depth of recursion stem: a string of 0s and 1s used to indicate the location of leaves in the tree already encountered last: a boolean flag used to tell the current node whether or not it is the last child element of its parent pst: parentScrollTop offset psl: parentScrollLeft offset
clientmethod dumpDOMTreeGeometry(root, svgGroup) [ Language = javascript ]
Output a text representation of a DOM subtree showing element nesting and basic goemetry parameters starting from the given root node. To dump the entire DOM to the error console, pass this function document.body as the root.
clientmethod getPPI() [ Language = javascript ]
Get the pixels per inch
clientmethod getPrintParameters() [ Language = javascript ]
Get the print parameters stored in this provider.
clientmethod getTempSvgContainer() [ Language = javascript ]
Return the current temporary SVG container, if it exists.
clientmethod mergeTempXSLFiles(parms, targetFileName, tempFiles) [ Language = javascript ]
Perform the merge of tempFiles into the fileName. This assumes tempFiles is an array.
clientmethod parseCssStyleString(cssString) [ Language = javascript ]
Parse a bare css style string into an object
clientmethod parseSize(size) [ Language = javascript ]
Parse a size attribute into its value and units.
clientmethod prepareFilterTable(filterNames, filterValues, parms) [ Language = javascript ]
This method takes as input the filterNames and filterValues arrays that are commonly built for DeepSee widgets. The array is reshaped into a table that can be digested by the fo conversion utilities.
clientmethod printSVGFollowingPage(parms, pageNo, clipX, clipY, tempFiles) [ Language = javascript ]
Clip svgContent for a particular page in a multi-page pring. This will collect all pages into the tempFiles. Upon completion of the current page this method will advance to the next page and fire the method again to print the next temp document. Once the last page is reached, the method to merge is fired. PAGES 2-N: - Advance the clipY to scroll the content under the clipPath
clientmethod producePDF(parms, fileName, outName) [ Language = javascript ]
Convert the complete XSL file to PDF and launch the viewer in a new browser tab. This is a terminal method in an async execution chain.
clientmethod removeSVGLegendFromChart(chartDocument, legendGroupId, legendPosition) [ Language = javascript ]
Pull the svg legend from the chart document
clientmethod setPrintParameters(parms) [ Language = javascript ]
Set the print parameters for reference when converting style information.
clientmethod wrapSvgText(words, id, geometry, htmlStyle) [ Language = javascript ]
Return an array with the components of wrapped SVG text

Inherited Members

Inherited Properties

Inherited Methods

FeedbackOpens in a new tab