This topic describes the options for printing drawings to PDF and DOC format.
You add drawings to your paginated reports views using the techniques in this topic: Display highlighted drawings in paginated reports.
The datasource in the view controls which drawings the program adds to the report, how the program highlights each drawing, and what text labels the program adds to the drawing on the reports.
When creating the PDF, the program finds the enterprise graphics (the .emf and .json files) for those drawings, highlights and labels them, and adds them to the printed PDF report. You can create these enterprise graphics from either Revit or AutoCAD.
An example of paginated report that contains drawings is this:
You can create a Word document that the program will use as a template to present the drawing. This document can use a number of features.
To set the alternate text, right click on the edge of the text box, and use the Alt Text tab of the Format Text Box dialog.
You can remove any of the text boxes in the standard template that you do not wish to use.
If the legend defined in the template is on a second page, then the printed PDF output shows the floor plan on one page and the legend on the second page, and alternates between floor and legend on subsequent pages.
When there are more than five fields in a legend panel, it's better to have the legend displayed on a separate page.
Example:
The template is located in:
\schema\ab-products\solutions\parts\pagereports\report-cadplan-imperial-landscape-17x22-legend-page.docx
To control a report's legend table look, the following predefined Microsoft Word styles should be defined in template files.
Your title block text may need to change from drawing to drawing. You can embed these text macros which the program will replace with the value appropriate for your drawing. Insert the macro in your Word document template surrounded by curly braces {}.
You can use these macros:
For Imperial drawings, the scales are: 1"=1-0’, 3/4"=1-0’, 1/2"=1-0’, 3/8"=1-0’, 1/4"=1-0’, 3/16"=1-0’, 1/8"=1-0’, 3/32"=1-0’, 1/16"=1-0’, 1/32"=1-0’, 1/64"=1-0’, 1/128"=1-0’.
For metric drawings, the scales are: 1:1, 1:2, 1:5, 1:10, 1:20, 1:25, 1:50, 1:100, 1:200, 1:250, 1:500, 1:1000, 1:2000.
Do not use the SCALE macro if you intend to print the resulting plan at other than 1:1 scale. For instance, if you intend to print 11" x 17" output on a smaller 8-1/2" x 11" printer, or if you intend to print 17 " x 22" output on a larger E-Size plotter, use the no scale option (scale="null"), or a graphics scale instead. The graphics scale will scale with the output.
Use the N0, and N1 macros for Imperial graphic scale numbers, and N0, N1, and N2 for the metric graphic scale numbers.Use tab stops rather than spaces to place the macro text, so that when the program replaces the macro text with the actual values, they still line up with the graphic scale.
You can remove any of the macros in the standard template that you do not wish to use.
You can use the macros to add more fields to the title block. For example, if you add the macros {bl_name}, {site_id} and {site_name} to a template, PDF reports will show Building Name, Site Code, and Site Name .
Example to display building and site names:
http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw
To add more fields to the title block:
schema\ab-products\common\resources\src\main\com\archibus\service\common\report\pdf\TitleBlock.java
This example shows how to use properties within the <report /> tag of your view file (.axvw file) to control paginated reports with drawings.
Example: outputFileType="pdf"
This parameter can also be passed from JavaScript to the core/
This property can be "Pdf", "doc", or "docx" and it specifies the output file type of Adobe format, Word 97-2003 format, or Microsoft Word format, which is the default. You may wish to use the Word 97-2003 format if you have a large number of reports, since it consumes less memory on the application server when generating the report than the other formats.
The file name of template docx or doc, it'll determine which template is used to generate reports.
This parameter can also be passed from JavaScript to the core.
Example: documentTemplate="report-tabloid-cadplan-r02.docx"
With this property, you can specify your own document template file to use, as described above. Place this file in the same folder as the view (.axvw) file that references it.
You can pass documentTemplate in JavaScript at run-time.
Example:
http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw
Example:
showHeader="false"
showFooter="false"
By using those two properties, you could turn on/off the report’s default header or footer.
Example: orientation="landscape"
This setting is not supported due to an issue in one of the third-party libraries. To use a portrait or landscape orientation, create your Word document in the desired orientation. The paginated report will then use the orientation and page size you established in Word.
Example: labelHeight =”1.5”
You can pass labelHeight in JavaScript at run-time.
This property overrides the default label font size of 8 points. Text is specified in terms of the output paper size and this text is the same size regardless of the drawing scale. Sites typically set this to the smallest text size that is legible on the scale of the printout, and then the program uses that text height consistently for all text.
You may wish to set a very small text size (e.g. 1.5) in cases in which you have a large drawing that will be scaled down to fit.
One case in which a small text size is called for is when you are creating a 17" x 22" size PDF (the largest size that you can create using a Word document template) that you will scale up by a factor of two to print on an E-Size plotter. The text size is small in the PDF, but legible in the E-Size output.
In all cases, label text in PDFs is searchable, so you can find and zoom in on even finely detailed text.
Example: scale=”null"
If you specify this property with "null" for a value, the paginated reports will scale the drawing to fit the available text box space in your template. If you do not specify this property, the paginated reports will scale the drawing to match the largest standard scale that will fit on the page. If you use the standard scales, make certain you publish your enterprise graphics with V.21.1 or later of the Smart Client. The Smart Client adds additional scale information to the header of the enterprise graphics to support this scaling feature.
You can pass scale in JavaScript at run-time, and when scale=”consistent” the core will print all drawings in same standard scale for comparison purpose.
You may have colors, such as yellow or light blue, that print too faintly in your Word or Adobe PDF output. You can map colors in the Drawing Publishing Rule. For instance, to specify that all colors for background architectural lines be printed black, change the Color Mapping field of the AbPubBackground rule in the ARCHIBUS Drawing Publishing Rules table (afm_dwgpub) to black (0x000000).
You can use the Color Mapping field to explicitly specify the color that should be output for any given layer, for example, eq$:Red.
Using the Color Mapping field. you can also specify a color for a background layer. For example the entry for a background layer, such as -eq background would be:
Gray;eq$:Red
This entry causes all published elements in the Background file to be 'Gray' except for the eq$ layer which will be 'Red'.
Setting a color for the background layer has the following advantages:
The core can publish layers as part of the background floor material. Based on publishing rules, the system can publish multiple SWF (or viewing drawings) / EMF (or printing drawings) files for multiple background options (rooms, equipment, emergency egress, lines, etc.), each with a different suffix.
Publishing rules for the following background layers are included out-of-the-box.
Tip: When publishing a background layer for leader lines, the leader lines must be on the same layer as the asset text.
You can create publishing rules for including additional elements within layers to be used when exporting drawings for printing..
The Additional Layers field in the afm_dwgpub table supports the following optional value: TURNOFFALL*
. This value enables you to restrict publishing to only the layers listed in the Additional Layers field.
The core enables you to publish drawings with the CAD-specified position on the published JSON file, and that position will be used on the report by default. If the JSON file does not have this information (for example, when you have upgraded and the JSON file has not yet been re-published), then the system reverts to the method of the weighted center, that is, it uses a system-generated position for printed output.
Plan types provide different views of your drawings, such as different highlights, labels, and legends, for both online viewing and for printing. The plan type also sets a maximum for label lines, and the label height. Plan types are another method to define standard highlighting , labels, and legend for use when viewing and printing drawings. Plan types are a bit more flexible than defining templates for highlights and labels, but you can use either or both methods in your deployment.
The process for creating plan types is as follows:
This parameter determines text size. The default label height for PDF output in points (1 point = 1.333 pixels). The default is 3, but the user can override this value for the current printing session only by changing this value from the Space Console when printing by using the PDF Print Options.
The core applies the label height value that comes from the Print Options dialog (into a JS file). In other areas of the product where there is no Print Options dialog, the core gets label heights from the below sources, in this order:
In addition, the core supports bringing over the label height from the published CAD plan.
If the user selects a plan type, then the printed output can limit the number of text label lines any asset (room) prints. For example, if there are multiple employees in the same room, this would restrict the number of employees (text label lines) to show. The system gets the value from active_plantypes.max_label_lines for the selected plan type, and passes it using the parameter labelLines to the Core. If the value is NULL, or if the user did not select a plan type, then do not pass anything. A default value of “0” means “show all”.
The Active Plan Types table includes label, highlight, and legend datasource information, the name of the view file that contains the datasources, as well as the Label Height and Max Label Lines fields that determines the text size. You can create a record in this table for the plan types you create. The Business Process Owner can also enter information for the plan type in this table from the Edit Print and Drawing Attributes dialog.
This table maps plan types to the grouping of views that will use those plan types, such as "drawing” or “campus.” For plan types to appear in the Space Console, they must have the Plan Type Group of "Standard Space Highlights." Using this table. you also set the display order for the plan type in selection lists, and designate plan types as Active.
All active plan types are exposed in all views, unless the application developer explicitly overrides the default behavior.
Each of the following parameters can be passed from JavaScript to the core.
Example: outputFileType="pdf"
This property can be "Pdf", "doc", or "docx" and it specifies the output file type of Adobe format, Word 97-2003 format, or Microsoft Word format, which is the default. You may wish to use the Word 97-2003 format if you have a large number of reports, since it consumes less memory on the application server when generating the report than the other formats.
Determines label's size in reports.
The core applies the label height value that comes from the Print Options dialog (into a JS file). In other areas of the product where there is no Print Options dialog, the core gets label heights from the below sources, in this order:
The priority order of labelHeight: (1) from JavaScript; (2) from AXVW; (3) from reports-docx.xml
In addition, the core supports bringing over the label height from the published CAD plan.
This parameter can be referenced in a view file.
Example: Print Option dialog from
http://localhost:8080/archibus/schema/ab-products/ab-sp-console.axvw
Determines which emf and related zlib files the core will use when generating reports.
The core can publish layers as part of the background floor material. Based on publishing rules, the system can publish multiple SWF/EMF files for multiple background options (rooms, equipment, emergency egress, lines, etc.), each with a different suffix.
This parameter cannot be referenced in a view file.
Example: Background dialog from
http://localhost:8080/archibus/schema/ab-products/ab-sp-console.axvw
The file name of template docx or doc, it'll determine which template is used to generate reports.
This parameter can be referenced in a view file.
Example:
http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw
Determines how the core displays drawing images in reports.
When scale="null", the core displays drawing images as large as possible.
When scale="consistent", the core displays all drawings in the smallest standard scale per report for visual comparison.
This parameter can be referenced in a view file.
Example: Print Option dialog from
http://localhost:8080/archibus/schema/ab-products/ab-sp-console.axvw
Determines the legend image size in report's legend table. Its value can be small, or medium, or large, and medium by default.
This parameter cannot be referenced in a view file.
Example: Print Option dialog from
http://localhost:8080/archibus/schema/ab-products/ab-sp-console.axvw
Specifies the maximum number of lines a text label can be. If its default value is 0, it means "show all".
This parameter cannot be referenced in a view file.
Example: Print Option dialog accessed from the Space Console (non-transacitonal)
http://localhost:8080/archibus/schema/ab-products/ab-sp-console.axvw
Determines if the core will use published label size in reports. Its default value is false.
This parameter cannot be referenced in a view file.
Example: Print Option dialog from the Space Console (non-transacitonal)
http://localhost:8080/archibus/schema/ab-products/ab-sp-console.axvw
Determines if the core displays the zoomed-in drawing image (Flash drawing screen-shot image).
JavaScript code snippet showing how to enable this parameter:
var reportParameter = {}; //drawing control API getDrawingZoomInfo() will return a null object if the Flash drawing has not been zoomed in var drawingZoomInfo = drawingPanel.getDrawingZoomInfo(); if(drawingZoomInfo !== null){ //drawing control API getImageBytes() to get zoomed drawing png image data drawingZoomInfo.image = drawingPanel.getImageBytes(); //assgin drawingZoomInfo to the report parameter reportParameter.drawingZoomInfo = drawingZoomInfo; }
This parameter cannot be referenced in a view file.
Example to have zoomed drawing in PDF if the Flash drawing is zoomed:
http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw
Determines which color will be used for legend table row ledger color. Its default color is "0xDBE5F1". To turn off the ledger color in reports, its value should be "0xFFFFFF".
This parameter cannot be referenced in a view file.
Example to turn off legend table's ledger color:
http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw
Used to control report's legend table look, a few predefined Microsoft Word styles should be defined in template files. See Predefined legend display styles.
legendHeading:
Determines legend table's heading look.
legendData:
Determines the data row look for string values.
legendDataRJ:
Determines the data row look for numeric values.
legendTotalHeading:
Determines the total heading look.
legendTotalData:
Determines the total value look.
Example: \schema\ab-products\solutions\parts\pagereports\report-cadplan-imperial-landscape-17x22.docx
http://localhost:8080/archibus/schema/ab-products/solutions/drawing/ab-ex-drawing-rpt-pdf.axvw
Copyright © 1984-2016, ARCHIBUS, Inc. All rights reserved. |