Question

I'm attempting to place the first IF statement below (a TCPDF barcode) into the content of the next IF statement. This should place the barcode right before the break (above the title key).

Whenever $content is called inside of $rset_html, it displays the specified key in the IF statement.

if($key == 'field_cinfo_zip_1') {
    $rset_html .= $view->pdf->write1DBarcode('01234567094987654321-'.str_replace("-","",$content), 'IMB', '', '', '', 0.1, 0.01, $barstyle, '');
}

How to put this IF statement above into <CONTENTS OF IF STATEMENT ABOVE HERE> below?

if ($key == 'title'){
    $rset_html .= <CONTENTS OF IF STATEMENT ABOVE HERE>."<br>$content";
}

Though this seems very basic, I don't know how easy this really is. I might have to figure out how to call fields without using IF statements and the $rset_html variable, but have no idea how that can be done.

No correct solution

OTHER TIPS

would this suit your needs?

    if($key == 'field_cinfo_zip_1') {
        $rset_html .= $view->pdf->write1DBarcode('01234567094987654321-'.str_replace("-","",$content), 'IMB', '', '', '', 0.1, 0.01, $barstyle, '');
    } 

    if ($key == 'title'){
        $rset_html .= $rset_html."<br>$content";
    }

Update: Looks like the libraries had to be updated. Views PDF the Drupal module comes with an older version of the libraries. Ever since I've updated the libraries, there is no further Adobe Reader errors.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top