Guidelines |
Top Previous Next |
|
Many strategies exist for creating and formatting a FO document to be processed with a layout. The following recommendations can be used to create FO documents that are consistent with Crash Magic built-in FO documents.
oPage layouts have left and right margins of 0.25 inches. Most printers can print up to the edge of this size margin. oDon't forget to always include units such as "in", "cm", "mm" etc. (i.e. left="0.25in") Don't use "px". oWhen preparing an area to place pdEl graphic, use code like this, starting with a block-container something like this: <fo:block-container position="absolute" left="0.5in" top="1.0in" width="4in" height="9.25in" overflow="hidden"> ▪fo:block-container attributes: •position="absolute" means that the left and top values will be relative to the margins. (as opposed to the parent container) •left="0.5in" and top="1.0in" means that the left edge of the block will be .5 inches from the left margin and the top will be 1 inch from the top margin. •width="4in" and height="9.25in" define the space reserved for the content of the block. •overflow="hidden" will cause the content inside the block to be clipped in case it is too large. This is required for all PdMagic created templates. ▪fo:block attributes are not needed. All alignment is performed in the block-container ▪pdEl:Insert attributes •ForUseIn="FO" means that Crash Magic will format the desired output as a fo element. Another option is "ASCII" which returns the content as simple text, with all formatting and layout performed by its parent elements. ASCII is typically used for simple text items such as names, counts, etc. •Name="Main" Used to name the pdEl element. Crash Magic layouts map reports like pin maps, diagrams, etc. to pdEl names. •[left="1in"] and [top="0.5in"] are optional parameters move the content within the block-container. If these are not included, the system will use 0,0. •[width="4.5in"] and [height="3.0in"] are optional Insert parameters that can be used to set the size of the content being rendered. If these are not included, the system will look to parent elements with width and height attributes.
Steps for creating a new FO document: 1.Determine the reports to be displayed in the layout. 2.Determine the desired sizes and positions of the desired reports. ("content") 3.Create a new or use an existing XSL-FO document. 4.Use standard XSL-FO elements to create the PDF structure you need. 5.View and update the XSL-FO document in the preview tab before adding the pdEl:Insert elements. Blocks will be outlined with blue dots. 6.Add the pdEl:Insert elements and view in the preview tab. pdEl:Insert blocks will be green with dark green borders. 7.Proceed to Analysis and create a layout that utilizes this new FO template. Apply reports or templates to the various pdEl elements |