Use SymbolsHandler.java for Enhanced MetaFile PDF reports
HTML Drawing Control
Use SymbolsHandler.java for Enhanced MetaFile PDF reports
The core provides a mechanism to allow application developers to implement their own print logic for EMF or Enhanced MetaFile-based PDF reports. The mechanism is
SymbolsHandler.java
, which has one method:
draw(final java.awt.Graphics emfGraphics, final ReportPropertiesDef reportPropertiesDef,
final double emfScale, final JSONObject publishedJSONHeader)
Developers can implement the
draw()
method for their PDF. For example, if developers create their own symbols handler as
com.archibus.app.solution.common.report.mySymbolsHandler
, they set up the following in their javaScript:
pdfParameters.symbolsHandler = 'com.archibus.app.solution.common.report.mySymbolsHandler';
The core invokes the
draw()
function defined in
mySymbolsHandler.java
after drawing highlights, but before drawing labels.
Example outputs are:
Examples:
To implement this feature in your views, review the following examples. Consult your Archibus Business Partner or Archibus Professional Services for more details.
-
Zoomed-in case gets PDF with client-side bitmap or non-zoomed case gets EMF-based PDF:
http://localhost:8080/archibus/schema/ab-products/solutions/programming/svg/ab-ex-svg-dwg-drawing.axvw -
Get PDF with client-side bitmap (try to drag/drop legends from symbols tab before PDF):
http://localhost:8080/archibus/schema/ab-products/solutions/programming/svg/ab-ex-svg-dwg-placement-and-redlining.axvw - /schema/ab-products/solutions/common/src/main/com/archibus/app/solution/common/report/docx/SymbolsHandlerExample.java