While m-Power has always supported PDF as an output choice, we are excited to support a secondary PDF render. A few highlights of the new PDF render include:
- -Forgiving to HTML errors
- -Wide support for a variety of output page sizes
Installation Instructions for Windows
- Ensure you are running the August 2015 release of m-Power (or later).
- Visit this resource to download 3rd party binaries. Please choose the download that suits the server that is running m-Power. Ex: For users running on a Windows 64 bit server, please select the 64-bit installer option.
- Extract the contents into your /m-power folder within a folder titled “wkhtmltopdf”.
For most m-Power Windows installations, the installation path would look like this:
Please be sure to install these files within the QA and Production folders as well.
Editors Note: Please verify that post installation that a folder title wkhtmltopdf now exists within the /m-power folder.
Congratulations — all future reports will support using the improved PDF Render.
If this property in the previous step was not available, please click the “Text” button and look for the following code:
Directly before this, please add the following code:
Press Save. Close the text editor.
Customizing and Building PDFs
To customize page size, please visit your report’s Application Properties file and navigate to the “Print Optimized” tab. In the event you wish to revert your PDF to the Legacy PDF render, please blank out the value in the pdf_page_size.
Please see the below table to learn more about available PDF page sizes supported by the render:
|PDF PAGE SIZE||Description|
|A0||841 x 1189 mm|
|A1||594 x 841 mm|
|A2||420 x 594 mm|
|A3||297 x 420 mm|
|A4||210 x 297 mm, 8.26 x 11.69 inches|
|A5||148 x 210 mm|
|A6||105 x 148 mm|
|A7||74 x 105 mm|
|A8||52 x 74 mm|
|A9||37 x 52 mm|
|B0||1000 x 1414 mm|
|B1||707 x 1000 mm|
|B2||500 x 707 mm|
|B3||353 x 500 mm|
|B4||250 x 353 mm|
|B5||176 x 250 mm, 6.93 x 9.84 inches|
|B6||125 x 176 mm|
|B7||88 x 125 mm|
|B8||62 x 88 mm|
|B9||33 x 62 mm|
|B10||31 x 44 mm|
|C5E||163 x 229 mm|
|Comm10E||105 x 241 mm, U.S. Common 10 Envelope|
|DLE||110 x 220 mm|
|Executive||7.5 x 10 inches, 190.5 x 254 mm|
|Folio||210 x 330 mm|
|Ledger||431.8 x 279.4 mm|
|Legal||8.5 x 14 inches, 215.9 x 355.6 mm|
|Letter||8.5 x 11 inches, 215.9 x 279.4 mm|
|Tabloid||279.4 x 431.8 mm|
|Custom||Unknown, or a user defined size.|
Installation Instructions for Linux (Fedora)
- Please download the correct binary from this page.
- Transfer the file to your Fedora based system.
- Install the file via rpm -i filename.rpm
- Create a directory within m-power named “wkhtmltopdf”. Within this new folder, create a folder named “bin”.
- Go to /usr/local/bin. Run the following command: cp wkhtmltopdf /mrc/development/m-power/wkhtmltopdf/bin/wkhtmltopdf.exe
- Continue on with Step 4 from the “Installation Instructions for Windows” section above.”
- If your application continues to use the legacy PDF renderer, verify that your application has the “pdf_page_size” property within the “Print Optimized” tab within Application Properties.
- Ensure that the value listed within “pdf_page_size” is a valid value (Please see the above table for valid options).
- If your PDF downloads as zero bytes, ensure you have installed the proper version of the wkhtmltopdf and that it is installed in the correct location.
- Due to encoding issues with the pdf engine, users who wish to print a comma within the footer should escape the value with a backslash. So, for instance, if I wanted my footer to read: michaels, ross, and cole. I would edit my Report’s application properties value of “PDF Footer” as such: michaels\, ross\, and cole