- Sat Jan 28, 2017 6:38 am
#788801
how can i reduce the space in the TCPPDF paragragh . While printing it give lots of space between 2 paragraphs .
INSTALL_DIRECTORY/gulliver/thirdparty/tcpdf
<style type="text/css">
p {
margin: 0;
padding:0
}
</style>
$tagvs = array(
'p' => array(0 => array('n' => 0, 'h' => ''), 1 => array('n' => 0, 'h' => ''))
);
$pdf->setHtmlVSpace($tagvs);
$suppressLines = $aFields['suppressLines'];
echo ($suppressLines);
if (isset ($suppressLines) && $suppressLines == "Yes") {
$tagvs = array(
'p' => array(0 => array('n' => 0, 'h' => ''), 1 => array('n' => 0, 'h' => ''))
);
$pdf->setHtmlVSpace($tagvs);
};
@@suppressLines = "Yes";
<p style="page-break-before: always;"></p>
$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
$pdf->SetLeftMargin($margins['left']);
$pdf->SetTopMargin($margins['top']);
$pdf->SetRightMargin($margins['right']);
$pdf->SetAutoPageBreak(true, $margins['bottom']);
$myHeaderMargin = $aFields['myHeaderMargin']; //In the trigger, you can define an additional margin to be added to the top
$pdf->SetLeftMargin($margins['left']); //this I have not changed
$pdf->SetTopMargin($margins['top']+$myHeaderMargin); //Note that here the top header margin is increased if you set so in the trigger. It is useful to set some margin (lets say 15) in the trigger if the header has to have two or more lines
$pdf->SetRightMargin($margins['right']);
$pdf->SetAutoPageBreak(true, $margins['bottom']-15);//I subtracted 15 to add more space for footer, though so far I were not able to get the footers work
/*This snippet suppresses the additional lines that are added by the tcPDF when generating the output document.
It is necessary to create a variable (e.g. suppresslines) and define it in the trigger;
*/
$suppressLines = $aFields['suppressLines'];
if (isset ($suppressLines) && $suppressLines == "Yes") {
$tagvs = array(
'p' => array(0 => array('n' => 0, 'h' => ''), 1 => array('n' => 0, 'h' => ''))
);
$pdf->setHtmlVSpace($tagvs);
};
/*This is where the variables defined in the trigger for the logo come into play
*/
$logoHeaderSource = $aFields['logoHeaderSource'];
$logoHeaderWidth = $aFields['logoHeaderWidth'];
$logoString = $aFields['logoString'];
$headerLineColor = $aFields['headerLineColor'];
$pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, 'B', PDF_FONT_SIZE_MAIN));
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetHeaderData( $logoHeaderSource, $logoHeaderWidth, '', $logoString,'',$headerLineColor);
$pdf->setPrintHeader(true);
$pdf->setPrintFooter(true);
//define headers for output document
@@logoHeaderSource = "yourImageFileName.png";
@@logoHeaderWidth = 140;
@@myHeaderMargin = 0;
@@logoString = "APPLICATION FORM" .$randomString;
@@headerLineColor = array(255,255,255); //white, for black type "0,0,0"
//@@suppressLines = "Yes";
Check out Xtraxtor PST to MBOX Converter on your[…]
DO we have to pay tax for trade https://www.getfir[…]