Questions and discussion about using ProcessMaker: user interface, running cases & functionality

Moderator: amosbatto

By zainab
#788815
I am not sure about the exact change required to reduce the paragraph spacing, but you can have a look at the source code of tcpdf, where the structure of tcpdf is defined.
The files related to tcpdf is located in the following directory:
Code: Select all
INSTALL_DIRECTORY/gulliver/thirdparty/tcpdf
Hope this helps.
#788826
Edit the HTML code for your Output Document template and add this code to the top:
Code: Select all
<style type="text/css">
p {
    margin: 0;
    padding:0
}
</style>
If that doesn't work, then change each of your <p> tags to <p style="margin:0; padding:0">
By nobody
#814473
If that still does not work (it did not for me) add these lines to the outputdocument.php, located e.g. at opt/processmaker/workflow/engine/classes
Code: Select all
$tagvs = array(
 'p' => array(0 => array('n' => 0, 'h' => ''), 1 => array('n' => 0, 'h' => ''))
 );
 $pdf->setHtmlVSpace($tagvs);
 
This will definitelly help, though this will change the behaviour for all generated output documents.
If that is not what you want, than add this to the outputdocument.php
Code: Select all
$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);
 };
The second solution allows you to define (e.g. in a trigger) whether you want to suppress the additional lines in the tcPDF or not. For this second method to work, it is necessary to create a variable in your process (e.g. suppresslines) and run a trigger that fires before the output document step/task (e.g. at the start of the case).
The trigger can be very simple, one line of code, such as
Code: Select all
@@suppressLines = "Yes";
#814492
nobody,
That's a nice solution to the problem. I'm impressed that you dug through the code to find it.
By nobody
#814646
Thank you Amos. I also find the tcPdf code cumbersome, but still, it is a great tool if treated carefully. I try not to touch anything generic in tcpdf.php (such as paths, constants...) and I only use the outputdocument.php code to pass variables to tcpdf.php that are already defined therein. Otherwise, I always ended up with errors or malfunction.

This way, I was able to make very customizable (dynamic) headers, with logos and line breaks. Even page breaks are possible, so in the end, tcPdf can be used as (almost) fully fledged tool for letters or contracts generation (which way my main objective).

I will share my code in a more relevant topic on the forum later on.
#814649
Please post the code that you used for page breaks and images. I have played with tcpdf a bit and had a lot of trouble. Adding one element often breaks another. I was never able to get a header with an image to work correctly.
GLOBAL FONT SETTINGS

Hello everyone, Is there a way by which one can c[…]

hey, I want to have link in dynaform which has e[…]

Cookies in Search filter

Hello, Thanks for your reply. I have tested it an[…]

I am currently new to process maker, I set up ever[…]