PDF output is abnormal

Status
Not open for further replies.
Thanks, Please check my custom_css.php
(Code copied from http://fabrikar.com/forums/index.php?wiki/pdf-output/)
<?php
/**
* Default Form Template: Custom CSS
*
* @package Joomla
* @subpackage Fabrik
* @copyright Copyright (C) 2005-2016 Media A-Team, Inc. - All rights reserved.
* @license GNU/GPL http://www.gnu.org/copyleft/gpl.html
* @since 3.0
*/

/**
* If you need to make small adjustments or additions to the CSS for a Fabrik
* template, you can create a custom_css.php file, which will be loaded after
* the main template_css.php for the template.
*
* This file will be invoked as a PHP file, so the view type and form ID
* can be used in order to narrow the scope of any style changes. You do
* this by prepending #{$view}_$c to any selectors you use. This will become
* (say) #form_12, or #details_11, which will be the HTML ID of your form
* on the page.
*
* See examples below, which you should remove if you copy this file.
*
* Don't edit anything outside of the BEGIN and END comments.
*
* For more on custom CSS, see the Wiki at:
*
* http://www.fabrikar.com/forums/index.php?wiki/form-and-details-templates/#the-custom-css-file
*
* NOTE - for backward compatibility with Fabrik 2.1, and in case you
* just prefer a simpler CSS file, without the added PHP parsing that
* allows you to be be more specific in your selectors, we will also include
* a custom.css we find in the same location as this file.
*
*/

header('Content-type: text/css');
$c = (int) $_REQUEST['c'];
$view = isset($_REQUEST['view']) ? $_REQUEST['view'] : 'form';
$rowid = isset($_REQUEST['rowid']) ? $_REQUEST['rowid'] : '';
$form = $view . '_' . $c;
if ($rowid !== '')
{
$form .= '_' . $rowid;
}
echo <<<EOT

/* BEGIN - Your CSS styling starts here */

#$form .foobar {
display: none;
}

* {font-size:7.0pt;line-height:120%;font-family:'DroidSans'!important}

#{$form} .fabrikElementContainer.span12 {position:relative;margin-bottom:10px}
#{$form} .fabrikElementContainer .span4 {display:inline-block;width:30%}
#{$form} .fabrikElementContainer .span8 {display:inline-block;left:31%;width:68%}

#{$form} .icon-checkmark:before {content:'yes'}
#{$form} .icon-remove:before {content:'no'}

/* END - Your CSS styling ends here */

EOT;
 
Last edited:
For this list,the original bootstrap without custom css has the same problem also.
By the way,Another list detail could output pdf but labels and data overlapped:
overlap.PNG
 
Last edited:
The overlap is the reason why you need a custom template (domPDF doesn't support float).

Blank data in your form:
If clicking "Print" I'll get the message "We are unable to find this record" and inspecting the link it shows that your record is not accessible with the "unSEFed" link
http://bluetooth.com.cn/index.php/?...w=details&formid=95&listid=95&rowid=1&lang=en

So something got screwed up with your settings.

BTW:
loading the record lasts very long and the (empty) PDF has 3.6MB...
 
Status
Not open for further replies.
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top