Community
    • Categories
    • Recent
    • Popular
    • Users
    • Search
    • Register
    • Login

    Isys_report_fpdf.class.php

    Scheduled Pinned Locked Moved Entwicklung
    2 Posts 2 Posters 844 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C Offline
      crispp
      last edited by

      Hi liebe Developer!

      Ich habe mal ein paar Zeilen zur Berechung der Spaltenbreite für die PDF-Reports in obige PHP-Datei eingebaut. Hierdurch werden die Spalten in vernünftiger Spaltenbreite erzeugt. Vielleicht könnt ihr die paar Zeilen gebrauchen….

      61a62,77

      // Width
                  $widths = array();
                  for($i=0;$i<count($header);$i++) {<br="">>                $widths[$i] = strlen($header[$i])*2;
                  }
                  foreach($data as $row) {
                      $count = 0;
                      foreach($row as $l_table => $l_value) {
                          if (strlen($l_value)*2 > $widths[$count]) {
                              $widths[$count] = strlen($l_value)*2;
                          }
                          $count++;
                      }
                  }

      64,65c80,81
      <              $this->Cell(strlen($header[$i])*7,7,$header[$i],1,0,'C',1);
      <              $l_sum += strlen($header[$i])*7;
      –-

      $this->Cell($widths[$i],7,$header[$i],1,0,'C',1);
                    $l_sum += $widths[$i];
      82,85c98,101
      < //                    if (!preg_match("/^[\w]+$/i", $l_table)) {
      <                                      $this->Cell(strlen($header[$i])*7, 6, $g_comp_template_language_manager->get($l_value), 'LR', 0, 'L', 1);
      <                                      $i++;
      < //                    }
      –-
                            if (!preg_match("/^[\w]+$/i", $l_table)) {
                                            $this->Cell($widths[$i], 6, $g_comp_template_language_manager->get($l_value), 'LR', 0, 'L', 1);
                            $i++;
                            }

      Ansonsten braucht der PDF-Export noch ein paar andere Einstellmöglichkeiten (Papierformat, Papiergröße etc.).

      Gruß
      Christof</count($header);$i++)>

      1 Reply Last reply Reply Quote 0
      • D Offline
        dbluemer
        last edited by

        Hallo,
        danke für die Mühe, ich werde das mal einbauen und testen.

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post