fpdf image problem

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • K.

    fpdf image problem

    Hello!

    Could you be so kind and help me with one problem I have.

    I would like to put an image into the table while creating PDF file. I use
    fpdf class (www.fpdf.org).

    I cannot find any example in internet and group archieves and www.fpdf.org
    page.

    Thank you in advance
    Marcin


  • Gary Hasler

    #2
    Re: fpdf image problem

    "K." wrote:
    >
    Hello!
    >
    Could you be so kind and help me with one problem I have.
    >
    I would like to put an image into the table while creating PDF file. I use
    fpdf class (www.fpdf.org).
    >
    I cannot find any example in internet and group archieves and www.fpdf.org
    page.
    Say what? It's right there in the Manual under "Image".
    Also in the tutorials--see #2.

    Example:
    $this->Image('logo_pb .png',10,8,33);

    Comment

    • MZ

      #3
      Re: fpdf image problem


      Uzytkownik "Gary Hasler" <garyhasler@the logconnection.c omnapisal w
      wiadomosci news:4602E907.1 94DD2A@thelogco nnection.com...
      "K." wrote:
      >>
      >Hello!
      >>
      >Could you be so kind and help me with one problem I have.
      >>
      >I would like to put an image into the table while creating PDF file. I
      >use
      >fpdf class (www.fpdf.org).
      >>
      >I cannot find any example in internet and group archieves and
      >www.fpdf.org
      >page.
      >
      Say what? It's right there in the Manual under "Image".
      Also in the tutorials--see #2.
      >
      Example:
      $this->Image('logo_pb .png',10,8,33);

      I knew this solution, but this code $this->Image('logo_pb .png',10,8,33)
      doesn`t work when I put this into the table.
      I would like to put image into the 4th column

      $this->Cell($w[0],6,$wiersz["pozycja_aktual na"],'LR');
      $this->Cell($w[1],6,$wiersz["pozycja_poprze dnia"],'LR');
      $this->Cell($w[2],6,$wiersz_il_t yg["ilosc_tyg"],'LR',0,'R');
      $this->Cell($w[3],6,$ile_oczek_g ora_dol,'LR',0, 'R');
      $this->Cell($w[4],6,'A','LR',0,' R');
      $this->Ln();

      but when I replace code

      $this->Cell($w[4],6,'A','LR',0,' R');

      on/for:
      $image_photo=$t his->Image('logo_pb .png',10,8,33);
      $this->Cell($w[4],$image_photo,' LR',0,'R');
      or
      $this->Cell($w[4],$this->Image('logo_pb .png',10,8,33); ,'LR',0,'R');
      both of two ways don`t work, and I don`t know why

      How to write the right code to make it work?

      Thank you in advance for help
      Marcin


      Comment

      • MZ

        #4
        Re: fpdf image problem


        U¿ytkownik "MZ" <marcinzmyslows ki@poczta.onet. plnapisa³ w wiadomo¶ci
        news:etupo0$3rl $1@news.onet.pl ...
        >
        Uzytkownik "Gary Hasler" <garyhasler@the logconnection.c omnapisal w
        wiadomosci news:4602E907.1 94DD2A@thelogco nnection.com...
        >"K." wrote:
        >>>
        >>Hello!
        >>>
        >>Could you be so kind and help me with one problem I have.
        >>>
        >>I would like to put an image into the table while creating PDF file. I
        >>use
        >>fpdf class (www.fpdf.org).
        >>>
        >>I cannot find any example in internet and group archieves and
        >>www.fpdf.org
        >>page.
        >>
        >Say what? It's right there in the Manual under "Image".
        >Also in the tutorials--see #2.
        >>
        >Example:
        >$this->Image('logo_pb .png',10,8,33);
        >
        >
        I knew this solution, but this code $this->Image('logo_pb .png',10,8,33)
        doesn`t work when I put this into the table.
        I would like to put image into the 4th column
        >
        $this->Cell($w[0],6,$wiersz["pozycja_aktual na"],'LR');
        $this->Cell($w[1],6,$wiersz["pozycja_poprze dnia"],'LR');
        $this->Cell($w[2],6,$wiersz_il_t yg["ilosc_tyg"],'LR',0,'R');
        $this->Cell($w[3],6,$ile_oczek_g ora_dol,'LR',0, 'R');
        $this->Cell($w[4],6,'A','LR',0,' R');
        $this->Ln();
        >
        but when I replace code
        >
        $this->Cell($w[4],6,'A','LR',0,' R');
        >
        on/for:
        $image_photo=$t his->Image('logo_pb .png',10,8,33);
        $this->Cell($w[4],$image_photo,' LR',0,'R');
        or
        $this->Cell($w[4],$this->Image('logo_pb .png',10,8,33); ,'LR',0,'R');
        both of two ways don`t work, and I don`t know why
        >
        How to write the right code to make it work?
        >
        Thank you in advance for help
        Marcin
        >

        OK. I found out about it myself.

        Here is the resolution:

        $this->Cell($w[4],6,$this->Image('img/lp_ikona_up.png ',$this->GetX(),$this->GetY()),'LR',0 ,'R');

        Marcin


        Comment

        Working...