m-Power Reports include the option to output to PDF. The painting for the PDF comes directly from the HTML presentation layer. Therefore, m-Painter is the WYSIWYG editor for HTML, Formatted Excel, and PDF.
Options (shown with default)
- Page Size and Orientation: Portrait (8.5in x 11in) — (For landscape, use 11in x 8.5in)
- Outside Border Page Margin (.5 in)
- Border (thin solid black)
- Inside Border Page Margin Padding (.0 in)
- Footer (Page 1 of 100)
These can all be changed per application by tweaking the generated HTML output. To modify these settings from their default, open m-Painter, toggle to the source, and change the PDF settings within the style tag.
Note: You can now change the orientation of your PDF in Application Properties. To change this, open the properties and toggle to the Print Optimized tab. Look for the page_orientation property. Use this property to switch between orientation layouts.
Issues to Consider:
- The conversion from HTML to PDF requires strictly-formed HTML. Simply put, this means that all HTML tags must be complete. For example, for every begin-table tag (
<table>
), there must be a corresponding end-table tag (</table>
). Even though the HTML might render acceptably in a browser, it might not be complete enough for the conversion from HTML to PDF. If there is a problem with the HTML, you will see an appropriate error message when you attempt to create the PDF output, including some mention of the incomplete tag.
Note: For users with data dictionaries older than October 2007, you will need to make two small changes to your Header file. Specifically look for the lines that begin with < img
and end with >
.
Be sure to end them with />
. This ensures that the IMG tag is complete and will minimize the chance of generating an error message on the conversion. For example:
- Change this
< img src ="/mrcjava/image/ top.jpg " border="0" >
to read this:< img src ="/mrcjava/image/ top.jpg " border="0" />
By default, there are two images in the mrc header. Be sure to change both of them. - In your footer file, you will see one table referenced as
<TABLE>
, please change this to read<table>
. - If you will include images in the PDF output, the best practice is to specifically specify the image alignment. This means using
align="left"
oralign="right"
on the image tag. This should correct any problems you see with image alignment or unwanted spacing gaps.
Repeating images used in backgrounds might cause performance problems. The performance problem appears in that it takes longer for the PDF to be created, and any PDF Reader takes a long time to both render and print the output. For the fastest possible responses, consider using a simple color for a background instead of an image. Specifically, in the inline style sheet, mrc_servlet_stylesheet_css.html, consider changing this line:
. back { color : black; background-image: url("/mrcjava/image/back.gif"); font: 8pt verdana ;}
To something like this:
. back { color : black; background: #d8d8d8 ; font: 8pt verdana ;}
To control the maximum number of rows on each page of the PDF output, set the max_rows parameter on the Print-Optimized tab in the Application Properties.